@arcgis/core 4.34.0-next.37 → 4.34.0-next.38

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 (1022) hide show
  1. package/Basemap.js +1 -1
  2. package/Camera.js +1 -1
  3. package/Color.js +1 -1
  4. package/Graphic.js +1 -1
  5. package/Ground.js +1 -1
  6. package/PopupTemplate.js +1 -1
  7. package/Viewpoint.js +1 -1
  8. package/WebDocument2D.js +1 -1
  9. package/WebScene.js +1 -1
  10. package/analysis/Analysis.js +1 -1
  11. package/analysis/DimensionSimpleStyle.js +1 -1
  12. package/analysis/LengthDimension.js +1 -1
  13. package/analysis/LineOfSightAnalysisObserver.js +1 -1
  14. package/analysis/LineOfSightAnalysisTarget.js +1 -1
  15. package/analysis/SlicePlane.js +1 -1
  16. package/analysis/Viewshed.js +1 -1
  17. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  18. package/analysis/support/SliceAnalysisExcludedLayer.js +1 -1
  19. package/assets/esri/core/workers/RemoteClient.js +1 -1
  20. package/assets/esri/core/workers/chunks/{1c8dbdb833a66f7183fc.js → 00f3fe4a09bbdbc8f8b4.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{36d15d1dd19417b37d2f.js → 01ae7d36bda6b6186786.js} +1 -1
  22. package/assets/esri/core/workers/chunks/01bd8f90e55081e65b38.js +1 -0
  23. package/assets/esri/core/workers/chunks/022091e5240b9d872dd2.js +1 -0
  24. package/assets/esri/core/workers/chunks/03df4668002eb4cb4f98.js +1 -0
  25. package/assets/esri/core/workers/chunks/{c4a20b8038bfbb2af329.js → 09f0c9f0b6aa58ae3c52.js} +1 -1
  26. package/assets/esri/core/workers/chunks/0a27f9b11d03874809ee.js +346 -0
  27. package/assets/esri/core/workers/chunks/{1a5ddb6d36249fe09cc8.js → 0e8d3d38e9b1f6abf6f2.js} +1 -1
  28. package/assets/esri/core/workers/chunks/0faec78b2dd6990a5da0.js +1 -0
  29. package/assets/esri/core/workers/chunks/{2d7bbd001b64138db3c1.js → 14b536e0c1de6c7422bc.js} +1 -1
  30. package/assets/esri/core/workers/chunks/19391d60c76a1dc7c262.js +1 -0
  31. package/assets/esri/core/workers/chunks/{7e9d5beca1991c961ed8.js → 1acc620bfd2983d6853f.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{6b5be459ec4c418cc6fd.js → 1d9212a70df68a508dca.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{ee28cd411a93245fb90c.js → 21aaf2dede61f28727a9.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{5d4e74eb4c659e8f42d6.js → 21dd626a5b5ea6a7e18e.js} +1 -1
  35. package/assets/esri/core/workers/chunks/224872bfd923cf4c9d78.js +1 -0
  36. package/assets/esri/core/workers/chunks/{5c5509147bda78ce338a.js → 23a85252e4164354553e.js} +1 -1
  37. package/assets/esri/core/workers/chunks/257428fff4bef42716e0.js +1 -0
  38. package/assets/esri/core/workers/chunks/27027493a8dba8305693.js +1 -0
  39. package/assets/esri/core/workers/chunks/{2b9c403f4b20b8f62804.js → 2a26c3fc324d672ebe88.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{7efc3ac70a005a771b9c.js → 2c399991e8627baa51b3.js} +1 -1
  41. package/assets/esri/core/workers/chunks/306a68137e62656b0f05.js +1 -0
  42. package/assets/esri/core/workers/chunks/{4c54239974a5847b8fdd.js → 30b9c131b69297ee186f.js} +1 -1
  43. package/assets/esri/core/workers/chunks/31ad9949b08a5b07218c.js +989 -0
  44. package/assets/esri/core/workers/chunks/{2177c0ef06c8e7e3e28e.js → 31c6716d9ca188d3b870.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{e4d08a85d158c705aa3d.js → 31e6eb2685872baf538a.js} +1 -1
  46. package/assets/esri/core/workers/chunks/3264d58aeef8cf074b86.js +1 -0
  47. package/assets/esri/core/workers/chunks/3358c1b04490706681cc.js +1 -0
  48. package/assets/esri/core/workers/chunks/3386420c9ae891db5be7.js +2 -0
  49. package/assets/esri/core/workers/chunks/3488e88882f40199ab33.js +1 -0
  50. package/assets/esri/core/workers/chunks/34f677e8c1691c10e4e9.js +1 -0
  51. package/assets/esri/core/workers/chunks/35df19d1eab3a694c3fa.js +1 -0
  52. package/assets/esri/core/workers/chunks/{33aafaabea07b4f80209.js → 3984ca7e05f30724adaf.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{02435c653064f879f547.js → 4162c633efefc63c5506.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{0852abaa440c14cc2b36.js → 4459c8e495a37d4c4eb8.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{6e36b247a24172edd5ea.js → 476a6e5ca558db2adaa1.js} +1 -1
  56. package/assets/esri/core/workers/chunks/48369e4c340413c531ff.js +1 -0
  57. package/assets/esri/core/workers/chunks/49eac96a01931b8c4ace.js +1 -0
  58. package/assets/esri/core/workers/chunks/{5228f535719f5fc38b28.js → 4ae15645e68e7f6dd6b7.js} +1 -1
  59. package/assets/esri/core/workers/chunks/508c302fed242956d3b7.js +1 -0
  60. package/assets/esri/core/workers/chunks/5156410dd84ea1232a6c.js +1 -0
  61. package/assets/esri/core/workers/chunks/{c64aa9793764eba2c6da.js → 51ddda291bbbf5db9905.js} +1 -1
  62. package/assets/esri/core/workers/chunks/54658c87396223d85abd.js +1 -0
  63. package/assets/esri/core/workers/chunks/{5fac0b2a5aa33e8a3a84.js → 5b2d40a2ce2594ce8eef.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{36024406932b0a44a74a.js → 5b2ff220aebe464dac23.js} +1 -1
  65. package/assets/esri/core/workers/chunks/5b91a49202129eedaf00.js +1 -0
  66. package/assets/esri/core/workers/chunks/{a0dfd99dc8f4eac0b7ae.js → 5d1d909354c90cb8eb60.js} +1 -1
  67. package/assets/esri/core/workers/chunks/5fe3c279d57f44416c28.js +1 -0
  68. package/assets/esri/core/workers/chunks/60d889c58a542e59b07b.js +1 -0
  69. package/assets/esri/core/workers/chunks/{1c87ed3a5960f8f06fc8.js → 647cff1eaaf1b622f439.js} +1 -1
  70. package/assets/esri/core/workers/chunks/6530449cd1975deb61f1.js +1 -0
  71. package/assets/esri/core/workers/chunks/{c78d98ab82f31ddda362.js → 6759319f3fd2d03c446b.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{e91800c1ea026e5b2d9b.js → 6acffacbb4a03af52e3b.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{23e0fd2d921f74834b12.js → 6b5b609b357924fa35be.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{170fa807b71babedd185.js → 6e82c1d1e02e320ec5e7.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{cab294fd04f2a5eda81d.js → 712c740cf58c2e282efc.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{54a686643e1ec1ea00ac.js → 7159e7a3274e64b337ce.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{68edbc3b124eb8e28dd6.js → 719b89341b26c3568c2f.js} +1 -1
  78. package/assets/esri/core/workers/chunks/7617fe2fbf223c108f1e.js +1 -0
  79. package/assets/esri/core/workers/chunks/{6f122e4a2a1f913523b4.js → 774844eea928efa811f2.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{5cdeb6dc72f452d6d1bc.js → 77ee4afaa4a1c7047940.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{904e701e1a12f67beaee.js → 787d281b2fe1edf6cf30.js} +1 -1
  82. package/assets/esri/core/workers/chunks/78de16f65ea297452a65.js +1 -0
  83. package/assets/esri/core/workers/chunks/{056fdd5570af28d334cd.js → 79b389baf972d329c38d.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{cf1f8fd1d62be0e02e10.js → 7a5808c6e67c43274d86.js} +1 -1
  85. package/assets/esri/core/workers/chunks/7b1fc59822ac2d421a5a.js +1 -0
  86. package/assets/esri/core/workers/chunks/{826e4bf6374f324d7f19.js → 7b82ed4cc475c782256b.js} +1 -1
  87. package/assets/esri/core/workers/chunks/7b95da70d39ba316b051.js +1 -0
  88. package/assets/esri/core/workers/chunks/{ccf3f29d0b1bde90c3cf.js → 7c97c4c8c2cf73835517.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{bb1213adeb05d89fbfdb.js → 7d082bfcd13ad6e8c89d.js} +1 -1
  90. package/assets/esri/core/workers/chunks/7e04b4592128e884b58c.js +1 -0
  91. package/assets/esri/core/workers/chunks/{7641e24ffa0215d51c34.js → 7ef29640de297a0cf744.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{ac88e0aabbd6c1f1ec98.js → 7f523fa4d4ade4316625.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{2f52a57e8c05a3ca1de8.js → 80a930881a99ceda240a.js} +1 -1
  94. package/assets/esri/core/workers/chunks/85bfd380d4f522ff8e83.js +1 -0
  95. package/assets/esri/core/workers/chunks/{21ea48186d01bf459ef6.js → 88308a0dcc479688e67c.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{360223d8bd4ee77ecda1.js → 896c7d137bfd7a8fa0bc.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{74db0831bcbd48152c1d.js → 899f493412acd5a5d91f.js} +1 -1
  98. package/assets/esri/core/workers/chunks/{b8c1a08020d44ee03a17.js → 8ad95fe91ba0a9f284a2.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{b331543767c35e5edcc6.js → 8c1bd9bcfc59497de3b5.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{ce211163d078d3d742ce.js → 8ca95499e00ce8b0af9a.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{4ff7c8420c77256f595a.js → 8d51b6823ef5d290c670.js} +1 -1
  102. package/assets/esri/core/workers/chunks/{1512ed7b869b3e8e07bc.js → 8e40c409a9b0a2a768a9.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{a76792c4edd1d688fba2.js → 9155dbfce5ef2c25bbbf.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{938baf4f99332dfdf29d.js → 91be247f868ce6596c9e.js} +1 -1
  105. package/assets/esri/core/workers/chunks/{64553b5eae4edc7f46dc.js → 9247d768c3eccc0828a9.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{02bd15e0adaffcdd645b.js → 947085d176bd3a930e6f.js} +1 -1
  107. package/assets/esri/core/workers/chunks/{dca2b487152cde45fb65.js → 94850c094e076d81a016.js} +1 -1
  108. package/assets/esri/core/workers/chunks/9595b39e882f9a9ac839.js +1 -0
  109. package/assets/esri/core/workers/chunks/{b45dbbeae54cea2bbc10.js → 962c0ef63de1635fb4aa.js} +1 -1
  110. package/assets/esri/core/workers/chunks/98ac849cccc4d5316021.js +1 -0
  111. package/assets/esri/core/workers/chunks/9928e432b884c75c3436.js +1 -0
  112. package/assets/esri/core/workers/chunks/{d80e26a1f4a61b1c4cf9.js → 9b5e04d87116ce2b68b2.js} +1 -1
  113. package/assets/esri/core/workers/chunks/9c60599131860f635483.js +1 -0
  114. package/assets/esri/core/workers/chunks/{ca5f63c0297612059486.js → 9cd9b22354dbdf1b1df0.js} +1 -1
  115. package/assets/esri/core/workers/chunks/{bd1ba44362b967977003.js → 9e7af4c3c0f8cf0f5c5b.js} +1 -1
  116. package/assets/esri/core/workers/chunks/9f869b331dff505b6b55.js +1 -0
  117. package/assets/esri/core/workers/chunks/9ffbd5216aa0a45a4199.js +1 -0
  118. package/assets/esri/core/workers/chunks/{183130521210c855c565.js → a13a36207f265f720255.js} +1 -1
  119. package/assets/esri/core/workers/chunks/a5c0b365b9f55e63ab52.js +1 -0
  120. package/assets/esri/core/workers/chunks/{afb51b8562f8cb29b97e.js → a89c060ad302381aaf7d.js} +1 -1
  121. package/assets/esri/core/workers/chunks/a939d2af7e4a359c7b4d.js +1 -0
  122. package/assets/esri/core/workers/chunks/{ada46055fafb8ae21dbe.js → aaab7694eb333ad480f5.js} +1 -1
  123. package/assets/esri/core/workers/chunks/{871da12fb3029177df6f.js → ad106f5f6d6848f40de3.js} +1 -1
  124. package/assets/esri/core/workers/chunks/{dec9656997683ef01ba6.js → ad1e5c24c1eae5ab8e45.js} +1 -1
  125. package/assets/esri/core/workers/chunks/b1c2e5e0a70fb5d27da5.js +1 -0
  126. package/assets/esri/core/workers/chunks/b40845b45f8d7cd347a1.js +1 -0
  127. package/assets/esri/core/workers/chunks/b5f6a0607b620b027cdd.js +1 -0
  128. package/assets/esri/core/workers/chunks/{8abcf9d3343dd8d45103.js → b884bd2f50aaccfa24c5.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{1285ccdde515aca9a2d5.js → bb23371335ac049861e6.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{469a018d94080fbcde22.js → bbdadced49446c907361.js} +1 -1
  131. package/assets/esri/core/workers/chunks/{c06dda7263e64d696c88.js → c110941e87923ba47193.js} +1 -1
  132. package/assets/esri/core/workers/chunks/{67627b1965b27b2f1857.js → c51e2a048df152abd901.js} +1 -1
  133. package/assets/esri/core/workers/chunks/{b12c44faa1efa60067b0.js → c660b6e67d5d13583f19.js} +1 -1
  134. package/assets/esri/core/workers/chunks/c6e3d4c6bb02d58d5cfe.js +1 -0
  135. package/assets/esri/core/workers/chunks/{fae53d825dd9fef0426c.js → c8c85ba6451b5dfc2fc0.js} +1 -1
  136. package/assets/esri/core/workers/chunks/{a1591d7f82e06cab5de4.js → c8d57588267e2fc4406c.js} +1 -1
  137. package/assets/esri/core/workers/chunks/{f5bb7c90f48cae594bc3.js → ca7c9756802214e41c56.js} +1 -1
  138. package/assets/esri/core/workers/chunks/cf474c055a85bdbfa8d0.js +1 -0
  139. package/assets/esri/core/workers/chunks/{9f933a7e9d3b0cd69383.js → d08b80583a23ba253c7e.js} +1 -1
  140. package/assets/esri/core/workers/chunks/d29f894491618931d92a.js +1 -0
  141. package/assets/esri/core/workers/chunks/{d16484b389d56a43d204.js → d465e1b3a8a53d9c0a12.js} +1 -1
  142. package/assets/esri/core/workers/chunks/d5262c95116d3bdfd117.js +1 -0
  143. package/assets/esri/core/workers/chunks/{4c7162883b228db563c6.js → d578c3880eaf2dd62324.js} +1 -1
  144. package/assets/esri/core/workers/chunks/{b8bd0f1be54b318990f6.js → d7c679374aa2d256becf.js} +1 -1
  145. package/assets/esri/core/workers/chunks/{bb0c5275e51d170ac795.js → d93b24e863379116b2aa.js} +1 -1
  146. package/assets/esri/core/workers/chunks/{6589133542fa130c0628.js → dd1d9913b33d4e48baff.js} +1 -1
  147. package/assets/esri/core/workers/chunks/{b49b73e2d0d643dfa351.js → de499e33035b56b6697d.js} +1 -1
  148. package/assets/esri/core/workers/chunks/{c5c9f0c8da5f7bf41728.js → e177d0ab454dfa024b39.js} +1 -1
  149. package/assets/esri/core/workers/chunks/{948ecf0bfbc886ec3b52.js → e1b25b1ce3bd4f0f2cda.js} +1 -1
  150. package/assets/esri/core/workers/chunks/{eedf97211883713c413e.js → e1b573840ec1f7c3afd3.js} +1 -1
  151. package/assets/esri/core/workers/chunks/{b117e054a2bc54f5f93b.js → e3f2cdf5d71a7040894b.js} +1 -1
  152. package/assets/esri/core/workers/chunks/{dfc5936fbbd26f27a92a.js → e666ca4d14b6490485d6.js} +1 -1
  153. package/assets/esri/core/workers/chunks/{672751823261a5763684.js → e92d9e0ac789bcf1cdf4.js} +1 -1
  154. package/assets/esri/core/workers/chunks/{d3b932ff2299c89c2582.js → e95a8c988ef822723503.js} +1 -1
  155. package/assets/esri/core/workers/chunks/{ae667084cb6a08b97c37.js → eb7dd722e4cd7f83b3f5.js} +1 -1
  156. package/assets/esri/core/workers/chunks/ec9ed7c9d64f88fcb806.js +1 -0
  157. package/assets/esri/core/workers/chunks/{06bd2f5358c6b85d5420.js → f42938e1602306cfa7a8.js} +1 -1
  158. package/assets/esri/core/workers/chunks/{77e083d1e425026fa030.js → f4b145feab275b268c2e.js} +1 -1
  159. package/assets/esri/core/workers/chunks/{568f49f9e50c505b2736.js → f4d7cbd33ef8710d7316.js} +1 -1
  160. package/assets/esri/core/workers/chunks/{451ae19a0a120b27c6da.js → fb0f729eff2f2911d6c3.js} +1 -1
  161. package/assets/esri/core/workers/chunks/{ce0683921ccefc580018.js → fd3009164d5e38fda85f.js} +1 -1
  162. package/assets/esri/core/workers/chunks/{4c77102f083198ae2a6a.js → ff34fdda7899e784ac73.js} +1 -1
  163. package/chunks/ColorMaterial.glsl.js +2 -2
  164. package/chunks/DefaultMaterial.glsl.js +4 -4
  165. package/chunks/HUDMaterial.glsl.js +5 -5
  166. package/chunks/LineMarker.glsl.js +19 -19
  167. package/chunks/Pattern.glsl.js +6 -6
  168. package/chunks/RibbonLine.glsl.js +2 -2
  169. package/chunks/TimeExtent.js +1 -1
  170. package/chunks/TimeInterval.js +1 -1
  171. package/chunks/pe.js +1 -1
  172. package/colorUtils.js +1 -1
  173. package/config.js +1 -1
  174. package/core/JSONSupport.d.ts +1 -1
  175. package/core/JSONSupport.js +1 -1
  176. package/core/Loadable.js +1 -1
  177. package/core/Promise.d.ts +1 -1
  178. package/core/Promise.js +1 -1
  179. package/core/has.js +1 -1
  180. package/core/object.js +1 -1
  181. package/core/workers/RemoteClient.js +1 -1
  182. package/core/workers/utils.js +1 -1
  183. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  184. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  185. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  186. package/editing/sharedTemplates/templateDefinitions/parts/TemplatePartBase.js +1 -1
  187. package/effects/FocusArea.js +1 -1
  188. package/effects/FocusAreaOutline.js +1 -1
  189. package/effects/FocusAreas.js +1 -1
  190. package/form/ExpressionInfo.js +1 -1
  191. package/form/FormTemplate.js +1 -1
  192. package/form/elements/Element.js +1 -1
  193. package/form/elements/inputs/Input.js +1 -1
  194. package/form/elements/inputs/attachments/Input.js +1 -1
  195. package/geometry/Geometry.js +1 -1
  196. package/geometry/HeightModelInfo.js +1 -1
  197. package/geometry/Mesh.js +1 -1
  198. package/geometry/SpatialReference.js +1 -1
  199. package/geometry/support/MeshComponent.js +1 -1
  200. package/geometry/support/MeshGeoreferencedVertexSpace.js +1 -1
  201. package/geometry/support/MeshLocalVertexSpace.js +1 -1
  202. package/geometry/support/MeshMaterial.js +1 -1
  203. package/geometry/support/MeshTexture.js +1 -1
  204. package/geometry/support/MeshTextureTransform.js +1 -1
  205. package/geometry/support/MeshTransform.js +1 -1
  206. package/geometry/support/MeshVertexAttributes.js +1 -1
  207. package/geometry/support/heightModelInfoUtils.js +1 -1
  208. package/grids/MeasuredGrid.js +1 -1
  209. package/ground/NavigationConstraint.js +1 -1
  210. package/identity/OAuthInfo.js +1 -1
  211. package/identity/ServerInfo.js +1 -1
  212. package/kernel.js +1 -1
  213. package/layers/BuildingSceneLayer.js +1 -1
  214. package/layers/GaussianSplatLayer.js +5 -0
  215. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  216. package/layers/buildingSublayers/BuildingGroupSublayer.js +1 -1
  217. package/layers/buildingSublayers/utils.js +5 -0
  218. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  219. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  220. package/layers/graphics/sources/MemorySource.js +1 -1
  221. package/layers/knowledgeGraph/IdealEdgeLengthTypeOptions.js +1 -1
  222. package/layers/mixins/OperationalLayer.js +1 -1
  223. package/layers/mixins/TemporalSceneLayer.js +1 -1
  224. package/layers/mixins/operationalLayerModuleMap.js +1 -1
  225. package/layers/orientedImagery/core/CameraOrientationHPR.js +1 -1
  226. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  227. package/layers/orientedImagery/core/CameraOrientationOPK.js +1 -1
  228. package/layers/orientedImagery/core/CameraOrientationYPR.js +1 -1
  229. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
  230. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  231. package/layers/pointCloudFilters/PointCloudFilter.js +1 -1
  232. package/layers/support/AggregateField.js +1 -1
  233. package/layers/support/BuildingFilter.js +1 -1
  234. package/layers/support/BuildingFilterAuthoringInfo.js +1 -1
  235. package/layers/support/BuildingFilterAuthoringInfoBlock.js +1 -1
  236. package/layers/support/BuildingFilterAuthoringInfoType.js +1 -1
  237. package/layers/support/BuildingFilterBlock.js +1 -1
  238. package/layers/support/BuildingFilterMode.js +1 -1
  239. package/layers/support/BuildingSummaryStatistics.js +1 -1
  240. package/layers/support/CodedValue.js +1 -1
  241. package/layers/support/ControlPointsGeoreference.js +1 -1
  242. package/layers/support/DimensionalDefinition.js +1 -1
  243. package/layers/support/DisplayFilter.js +1 -1
  244. package/layers/support/DisplayFilterInfo.js +1 -1
  245. package/layers/support/Domain.js +1 -1
  246. package/layers/support/EditFieldsInfo.js +1 -1
  247. package/layers/support/ExportImageServiceParameters.js +1 -1
  248. package/layers/support/ExpressionInfo.js +1 -1
  249. package/layers/support/FacilityLayerInfo.js +1 -1
  250. package/layers/support/FeatureEffect.js +1 -1
  251. package/layers/support/FeatureFilter.js +1 -1
  252. package/layers/support/FeatureIndex.js +1 -1
  253. package/layers/support/FeatureReduction.js +1 -1
  254. package/layers/support/FeatureReductionCluster.js +1 -1
  255. package/layers/support/FeatureTemplate.js +1 -1
  256. package/layers/support/FeatureType.js +1 -1
  257. package/layers/support/Field.js +1 -1
  258. package/layers/support/GeometryFieldsInfo.js +1 -1
  259. package/layers/support/I3SLayerDefinitions.js +1 -1
  260. package/layers/support/KMLMapImage.js +1 -1
  261. package/layers/support/KMLSublayer.js +1 -1
  262. package/layers/support/LOD.js +1 -1
  263. package/layers/support/LabelClass.js +1 -1
  264. package/layers/support/LabelExpressionInfo.js +1 -1
  265. package/layers/support/LayerContingentValuesCache.js +1 -1
  266. package/layers/support/LayerFloorInfo.js +1 -1
  267. package/layers/support/LayerTimeOptions.js +1 -1
  268. package/layers/support/LevelLayerInfo.js +1 -1
  269. package/layers/support/LocalMediaElementSource.js +1 -1
  270. package/layers/support/MapImage.js +1 -1
  271. package/layers/support/MosaicRule.js +1 -1
  272. package/layers/support/MultidimensionalSubset.js +1 -1
  273. package/layers/support/OrderByInfo.js +1 -1
  274. package/layers/support/ParquetEncodingBase.js +1 -1
  275. package/layers/support/ParquetEncodingLocation.js +1 -1
  276. package/layers/support/ParquetEncodingWkb.js +1 -1
  277. package/layers/support/PixelBlock.js +1 -1
  278. package/layers/support/PlaybackInfo.js +1 -1
  279. package/layers/support/PolygonCollection.js +1 -1
  280. package/layers/support/PurgeOptions.js +1 -1
  281. package/layers/support/RangeInfo.js +1 -1
  282. package/layers/support/RasterBandInfo.js +1 -1
  283. package/layers/support/RasterFunction.js +1 -1
  284. package/layers/support/RasterFunctionInfo.js +1 -1
  285. package/layers/support/RasterFunctionProperties.js +1 -1
  286. package/layers/support/RasterFunctionTemplate.js +1 -1
  287. package/layers/support/RasterFunctionVariable.js +1 -1
  288. package/layers/support/RasterInfo.js +1 -1
  289. package/layers/support/RasterSensorInfo.js +1 -1
  290. package/layers/support/RasterStorageInfo.js +1 -1
  291. package/layers/support/Relationship.js +1 -1
  292. package/layers/support/RouteStopSymbols.js +1 -1
  293. package/layers/support/RouteSymbols.js +1 -1
  294. package/layers/support/SceneFilter.js +1 -1
  295. package/layers/support/SceneModification.js +1 -1
  296. package/layers/support/SceneModifications.js +1 -1
  297. package/layers/support/SiteLayerInfo.js +1 -1
  298. package/layers/support/Subtype.js +1 -1
  299. package/layers/support/TelemetryData.js +1 -1
  300. package/layers/support/TelemetryDisplay.js +1 -1
  301. package/layers/support/TileInfo.js +1 -1
  302. package/layers/support/TileMatrixSet.js +1 -1
  303. package/layers/support/TimeInfo.js +1 -1
  304. package/layers/support/TrackInfo.js +1 -1
  305. package/layers/support/TrackPartInfo.js +1 -1
  306. package/layers/support/VideoFrame.js +1 -1
  307. package/layers/support/VideoTimeExtent.js +1 -1
  308. package/layers/support/WMTSLayerInfo.js +1 -1
  309. package/layers/support/WMTSStyle.js +1 -1
  310. package/layers/support/WMTSSublayer.js +1 -1
  311. package/layers/support/lazyLayerLoader.js +1 -1
  312. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  313. package/layers/support/rasterFunctions/BaseFunctionArguments.js +1 -1
  314. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  315. package/layers/support/rasterTransforms/BaseRasterTransform.js +1 -1
  316. package/layers/support/source/DataLayerSource.js +1 -1
  317. package/layers/support/source/MapLayerSource.js +1 -1
  318. package/layers/support/source/QueryTableDataSource.js +1 -1
  319. package/layers/support/source/RasterDataSource.js +1 -1
  320. package/layers/support/source/TableDataSource.js +1 -1
  321. package/layers/voxel/VoxelColorStop.js +1 -1
  322. package/layers/voxel/VoxelDimension.js +1 -1
  323. package/layers/voxel/VoxelDynamicSection.js +1 -1
  324. package/layers/voxel/VoxelFormat.js +1 -1
  325. package/layers/voxel/VoxelIrregularSpacing.js +1 -1
  326. package/layers/voxel/VoxelIsosurface.js +1 -1
  327. package/layers/voxel/VoxelOpacityStop.js +1 -1
  328. package/layers/voxel/VoxelRangeFilter.js +1 -1
  329. package/layers/voxel/VoxelRegularSpacing.js +1 -1
  330. package/layers/voxel/VoxelSection.js +1 -1
  331. package/layers/voxel/VoxelSimpleShading.js +1 -1
  332. package/layers/voxel/VoxelSlice.js +1 -1
  333. package/layers/voxel/VoxelTransferFunctionStyle.js +1 -1
  334. package/layers/voxel/VoxelUniqueValue.js +1 -1
  335. package/layers/voxel/VoxelVariable.js +1 -1
  336. package/layers/voxel/VoxelVariableStyle.js +1 -1
  337. package/layers/voxel/VoxelVolume.js +1 -1
  338. package/layers/voxel/VoxelVolumeIndex.js +1 -1
  339. package/layers/voxel/VoxelVolumeStyle.js +1 -1
  340. package/libs/linkchartlayout/LinkChartLayout.js +1 -1
  341. package/linkChart/ChronologicalLayoutSettings.js +1 -1
  342. package/linkChart/LayoutSettings.js +1 -1
  343. package/linkChart/NonspatialDataDisplay.js +1 -1
  344. package/linkChart/OrganicLayoutSettings.js +1 -1
  345. package/networks/CircuitManager.js +1 -1
  346. package/networks/RulesTable.js +1 -1
  347. package/networks/UnitIdentifierManager.js +1 -1
  348. package/networks/support/Terminal.js +1 -1
  349. package/networks/support/TerminalConfiguration.js +1 -1
  350. package/networks/support/TraceConfiguration.js +1 -1
  351. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  352. package/package.json +2 -2
  353. package/popup/ElementExpressionInfo.js +1 -1
  354. package/popup/ExpressionInfo.js +1 -1
  355. package/popup/FieldInfo.js +1 -1
  356. package/popup/LayerOptions.js +1 -1
  357. package/popup/RelatedRecordsInfo.js +1 -1
  358. package/popup/content/Content.js +1 -1
  359. package/popup/content/mixins/MediaInfo.js +1 -1
  360. package/popup/content/support/ChartMediaInfoValue.js +1 -1
  361. package/popup/content/support/ImageMediaInfoValue.js +1 -1
  362. package/popup/support/AttachmentsOrderByInfo.js +1 -1
  363. package/popup/support/FieldInfoFormat.js +1 -1
  364. package/popup/support/RelatedRecordsInfoFieldOrder.js +1 -1
  365. package/popup/support/UtilityNetworkAssociationType.js +1 -1
  366. package/portal/Portal.js +1 -1
  367. package/portal/PortalFolder.js +1 -1
  368. package/portal/PortalGroup.js +1 -1
  369. package/portal/PortalItem.js +1 -1
  370. package/portal/PortalUser.js +1 -1
  371. package/renderers/FlowRenderer.js +1 -1
  372. package/renderers/PointCloudClassBreaksRenderer.js +1 -1
  373. package/renderers/PointCloudRenderer.js +1 -1
  374. package/renderers/PointCloudStretchRenderer.js +1 -1
  375. package/renderers/PointCloudUniqueValueRenderer.js +1 -1
  376. package/renderers/RasterColormapRenderer.js +1 -1
  377. package/renderers/RasterShadedReliefRenderer.js +1 -1
  378. package/renderers/RasterStretchRenderer.js +1 -1
  379. package/renderers/Renderer.js +1 -1
  380. package/renderers/VectorFieldRenderer.js +1 -1
  381. package/renderers/support/AttributeColorInfo.js +1 -1
  382. package/renderers/support/AuthoringInfo.js +1 -1
  383. package/renderers/support/AuthoringInfoClassBreakInfo.js +1 -1
  384. package/renderers/support/AuthoringInfoFieldInfo.js +1 -1
  385. package/renderers/support/AuthoringInfoSizeStop.js +1 -1
  386. package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
  387. package/renderers/support/ClassBreakInfo.js +1 -1
  388. package/renderers/support/ColormapInfo.js +1 -1
  389. package/renderers/support/DotDensityLegendOptions.js +1 -1
  390. package/renderers/support/HeatmapColorStop.js +1 -1
  391. package/renderers/support/HeatmapLegendOptions.js +1 -1
  392. package/renderers/support/OthersCategory.js +1 -1
  393. package/renderers/support/RasterPresetRenderer.js +1 -1
  394. package/renderers/support/RasterSymbolizer.js +1 -1
  395. package/renderers/support/RendererLegendOptions.js +1 -1
  396. package/renderers/support/UniqueValue.js +1 -1
  397. package/renderers/support/UniqueValueClass.js +1 -1
  398. package/renderers/support/UniqueValueGroup.js +1 -1
  399. package/renderers/support/UniqueValueInfo.js +1 -1
  400. package/renderers/support/pointCloud/ColorClassBreakInfo.js +1 -1
  401. package/renderers/support/pointCloud/ColorModulation.js +1 -1
  402. package/renderers/support/pointCloud/ColorUniqueValueInfo.js +1 -1
  403. package/renderers/support/pointCloud/PointSizeAlgorithm.js +1 -1
  404. package/renderers/support/pointCloud/fieldsMap.js +5 -0
  405. package/renderers/visualVariables/VisualVariable.js +1 -1
  406. package/renderers/visualVariables/support/ColorSizeStop.js +1 -1
  407. package/renderers/visualVariables/support/ColorStop.js +1 -1
  408. package/renderers/visualVariables/support/OpacityStop.js +1 -1
  409. package/renderers/visualVariables/support/SizeStop.js +1 -1
  410. package/renderers/visualVariables/support/VisualVariableLegendOptions.js +1 -1
  411. package/rest/featureService/FeatureService.js +1 -1
  412. package/rest/knowledgeGraph/DataModel.js +1 -1
  413. package/rest/knowledgeGraph/FieldIndex.js +1 -1
  414. package/rest/knowledgeGraph/GraphObject.js +1 -1
  415. package/rest/knowledgeGraph/GraphObjectType.js +1 -1
  416. package/rest/knowledgeGraph/GraphProperty.js +1 -1
  417. package/rest/knowledgeGraph/KnowledgeGraph.js +1 -1
  418. package/rest/knowledgeGraph/Path.js +1 -1
  419. package/rest/knowledgeGraph/ProtoFeatureCollection.js +1 -1
  420. package/rest/knowledgeGraph/ServiceDefinition.js +1 -1
  421. package/rest/knowledgeGraph/SourceTypeValueBehavior.js +1 -1
  422. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.js +1 -1
  423. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.js +1 -1
  424. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.js +1 -1
  425. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.js +1 -1
  426. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
  427. package/rest/knowledgeGraph/wasmInterface/WasmQueryWrapperInterfaces.js +1 -1
  428. package/rest/knowledgeGraph/wasmInterface/WasmSerializedLayerData.js +1 -1
  429. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
  430. package/rest/knowledgeGraph/wasmInterface/wasmToFeatureFactories.js +1 -1
  431. package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
  432. package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
  433. package/rest/networks/circuits/support/CreateAlterCircuitParameters.js +1 -1
  434. package/rest/networks/circuits/support/DeleteCircuitsParameters.js +1 -1
  435. package/rest/networks/circuits/support/EditCircuitsResult.js +1 -1
  436. package/rest/networks/circuits/support/ExportCircuitsParameters.js +1 -1
  437. package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
  438. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  439. package/rest/networks/circuits/support/QueryCircuitsResult.js +1 -1
  440. package/rest/networks/circuits/support/VerifyCircuitsParameters.js +1 -1
  441. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  442. package/rest/networks/support/AggregatedGeometry.js +1 -1
  443. package/rest/networks/support/Association.js +1 -1
  444. package/rest/networks/support/AssociationGeometriesResult.js +1 -1
  445. package/rest/networks/support/CircuitPath.js +1 -1
  446. package/rest/networks/support/CircuitPathConnectivityElement.js +1 -1
  447. package/rest/networks/support/CircuitTraceResult.js +1 -1
  448. package/rest/networks/support/FunctionResult.js +1 -1
  449. package/rest/networks/support/NetworkElement.js +1 -1
  450. package/rest/networks/support/QueryAssociationsParameters.js +1 -1
  451. package/rest/networks/support/QueryAssociationsResult.js +1 -1
  452. package/rest/networks/support/QueryNamedTraceConfigurationsParameters.js +1 -1
  453. package/rest/networks/support/QueryNamedTraceConfigurationsResult.js +1 -1
  454. package/rest/networks/support/SynthesizeAssociationGeometriesParameters.js +1 -1
  455. package/rest/networks/support/TraceLocation.js +1 -1
  456. package/rest/networks/support/TraceParameters.js +1 -1
  457. package/rest/networks/support/TraceResult.js +1 -1
  458. package/rest/networks/support/ValidateNetworkTopologyParameters.js +1 -1
  459. package/rest/networks/support/ValidateNetworkTopologyResult.js +1 -1
  460. package/rest/networks/unitIdentifiers/support/EditUnitIdentifiersResult.js +1 -1
  461. package/rest/networks/unitIdentifiers/support/InsertGapParameters.js +1 -1
  462. package/rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js +1 -1
  463. package/rest/networks/unitIdentifiers/support/ResetParameters.js +1 -1
  464. package/rest/networks/unitIdentifiers/support/ResizeParameters.js +1 -1
  465. package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +1 -1
  466. package/rest/query/support/AttachmentInfo.js +1 -1
  467. package/rest/support/AddressCandidate.js +1 -1
  468. package/rest/support/AddressToLocationsParameters.js +1 -1
  469. package/rest/support/AddressesToLocationsParameters.js +1 -1
  470. package/rest/support/ArealUnit.js +1 -1
  471. package/rest/support/AreasAndLengthsParameters.js +1 -1
  472. package/rest/support/AttachmentQuery.js +1 -1
  473. package/rest/support/AttributeBinsGrouping.js +1 -1
  474. package/rest/support/AttributeBinsQuery.js +1 -1
  475. package/rest/support/BaseImageMeasureParameters.js +1 -1
  476. package/rest/support/BaseImageMeasureResult.js +1 -1
  477. package/rest/support/BinParametersBase.js +1 -1
  478. package/rest/support/BufferParameters.js +1 -1
  479. package/rest/support/CameraInfo.js +1 -1
  480. package/rest/support/ClassBreaksDefinition.js +1 -1
  481. package/rest/support/ClosestFacilityParameters.js +1 -1
  482. package/rest/support/ClosestFacilitySolveResult.js +1 -1
  483. package/rest/support/ColorRamp.js +1 -1
  484. package/rest/support/DataFile.js +1 -1
  485. package/rest/support/DataLayer.js +1 -1
  486. package/rest/support/DateBinTimeInterval.js +1 -1
  487. package/rest/support/DensifyParameters.js +1 -1
  488. package/rest/support/DirectionLine.js +1 -1
  489. package/rest/support/DirectionPoint.js +1 -1
  490. package/rest/support/DirectionsEvent.js +1 -1
  491. package/rest/support/DirectionsString.js +1 -1
  492. package/rest/support/FeatureSet.js +1 -1
  493. package/rest/support/FindImagesParameters.js +1 -1
  494. package/rest/support/FindImagesResult.js +1 -1
  495. package/rest/support/FindParameters.js +1 -1
  496. package/rest/support/FindResult.js +1 -1
  497. package/rest/support/FullTextSearch.js +1 -1
  498. package/rest/support/GPMessage.js +1 -1
  499. package/rest/support/GeneralizeParameters.js +1 -1
  500. package/rest/support/GenerateRendererParameters.js +1 -1
  501. package/rest/support/IdentifyParameters.js +1 -1
  502. package/rest/support/IdentifyResult.js +1 -1
  503. package/rest/support/ImageAngleParameters.js +1 -1
  504. package/rest/support/ImageAngleResult.js +1 -1
  505. package/rest/support/ImageBoundaryParameters.js +1 -1
  506. package/rest/support/ImageBoundaryResult.js +1 -1
  507. package/rest/support/ImageGPSInfo.js +1 -1
  508. package/rest/support/ImageGPSInfoParameters.js +1 -1
  509. package/rest/support/ImageGPSInfoResult.js +1 -1
  510. package/rest/support/ImageHistogramParameters.js +1 -1
  511. package/rest/support/ImageIdentifyParameters.js +1 -1
  512. package/rest/support/ImageIdentifyResult.js +1 -1
  513. package/rest/support/ImageInspectionInfo.js +1 -1
  514. package/rest/support/ImagePixelLocationParameters.js +1 -1
  515. package/rest/support/ImagePixelLocationResult.js +1 -1
  516. package/rest/support/ImageSample.js +1 -1
  517. package/rest/support/ImageSampleParameters.js +1 -1
  518. package/rest/support/ImageSampleResult.js +1 -1
  519. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  520. package/rest/support/ImageToMapParameters.js +1 -1
  521. package/rest/support/ImageUrlParameters.js +1 -1
  522. package/rest/support/ImageUrlResult.js +1 -1
  523. package/rest/support/ImageVolume.js +1 -1
  524. package/rest/support/ImageVolumeParameters.js +1 -1
  525. package/rest/support/ImageVolumeResult.js +1 -1
  526. package/rest/support/JobInfo.js +1 -1
  527. package/rest/support/LegendLayer.js +1 -1
  528. package/rest/support/LengthsParameters.js +1 -1
  529. package/rest/support/LinearUnit.js +1 -1
  530. package/rest/support/LocationToAddressParameters.js +1 -1
  531. package/rest/support/MapToImageParameters.js +1 -1
  532. package/rest/support/MeasureAreaFromImageResult.js +1 -1
  533. package/rest/support/MeasureFromImageParameters.js +1 -1
  534. package/rest/support/MeasureLengthFromImageResult.js +1 -1
  535. package/rest/support/MultipartColorRamp.js +1 -1
  536. package/rest/support/NetworkAttribute.js +1 -1
  537. package/rest/support/NetworkDataset.js +1 -1
  538. package/rest/support/NetworkServiceDescription.js +1 -1
  539. package/rest/support/NetworkUrl.js +1 -1
  540. package/rest/support/OffsetParameters.js +1 -1
  541. package/rest/support/ParameterValue.js +1 -1
  542. package/rest/support/PointBarrier.js +1 -1
  543. package/rest/support/PolygonBarrier.js +1 -1
  544. package/rest/support/PolylineBarrier.js +1 -1
  545. package/rest/support/ProjectParameters.js +1 -1
  546. package/rest/support/QuantizationParameters.js +1 -1
  547. package/rest/support/Query.js +1 -1
  548. package/rest/support/RasterData.js +1 -1
  549. package/rest/support/RelationParameters.js +1 -1
  550. package/rest/support/RelationshipQuery.js +1 -1
  551. package/rest/support/RouteInfo.js +1 -1
  552. package/rest/support/RouteParameters.js +1 -1
  553. package/rest/support/RouteResult.js +1 -1
  554. package/rest/support/RouteSettings.js +1 -1
  555. package/rest/support/RouteSolveResult.js +1 -1
  556. package/rest/support/ServiceAreaParameters.js +1 -1
  557. package/rest/support/ServiceAreaSolveResult.js +1 -1
  558. package/rest/support/StatisticDefinition.js +1 -1
  559. package/rest/support/Stop.js +1 -1
  560. package/rest/support/SuggestLocationsParameters.js +1 -1
  561. package/rest/support/SuggestionCandidate.js +1 -1
  562. package/rest/support/TopFeaturesQuery.js +1 -1
  563. package/rest/support/TopFilter.js +1 -1
  564. package/rest/support/TranslateContent.js +1 -1
  565. package/rest/support/TranslateParameters.js +1 -1
  566. package/rest/support/TranslateResult.js +1 -1
  567. package/rest/support/TravelMode.js +1 -1
  568. package/rest/support/TrimExtendParameters.js +1 -1
  569. package/rest/support/UniqueValueDefinition.js +1 -1
  570. package/rest/support/imageMeasureUtils.js +1 -1
  571. package/rest/versionManagement/gdbVersion/support/AlterVersionParameters.js +1 -1
  572. package/rest/versionManagement/gdbVersion/support/ConflictsParameters.js +1 -1
  573. package/rest/versionManagement/gdbVersion/support/ConflictsResult.js +1 -1
  574. package/rest/versionManagement/gdbVersion/support/DeleteForwardEditsParameters.js +1 -1
  575. package/rest/versionManagement/gdbVersion/support/DifferencesParameters.js +1 -1
  576. package/rest/versionManagement/gdbVersion/support/DifferencesResult.js +1 -1
  577. package/rest/versionManagement/gdbVersion/support/InspectConflictsParameters.js +1 -1
  578. package/rest/versionManagement/gdbVersion/support/PostParameters.js +1 -1
  579. package/rest/versionManagement/gdbVersion/support/PostResult.js +1 -1
  580. package/rest/versionManagement/gdbVersion/support/ReconcileParameters.js +1 -1
  581. package/rest/versionManagement/gdbVersion/support/ReconcileResult.js +1 -1
  582. package/rest/versionManagement/gdbVersion/support/RestoreRowsParameters.js +1 -1
  583. package/rest/versionManagement/gdbVersion/support/RestoreRowsResult.js +1 -1
  584. package/rest/versionManagement/support/CreateVersionParameters.js +1 -1
  585. package/rest/versionManagement/support/DeleteVersionParameters.js +1 -1
  586. package/rest/versionManagement/support/GetVersionInfosParameters.js +1 -1
  587. package/rest/versionManagement/support/GetVersionInfosResult.js +1 -1
  588. package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
  589. package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
  590. package/support/MapFloorInfo.js +1 -1
  591. package/support/revision.js +1 -1
  592. package/symbols/Font.js +1 -1
  593. package/symbols/LineStyleMarker3D.js +1 -1
  594. package/symbols/LineSymbolMarker.js +1 -1
  595. package/symbols/Symbol.js +1 -1
  596. package/symbols/Symbol3DLayer.js +1 -1
  597. package/symbols/WaterSymbol3DLayer.js +1 -1
  598. package/symbols/callouts/Callout3D.js +1 -1
  599. package/symbols/callouts/LineCallout3DBorder.js +1 -1
  600. package/symbols/edges/Edges3D.js +1 -1
  601. package/symbols/patterns/LinePattern3D.js +1 -1
  602. package/symbols/patterns/Pattern3D.js +1 -1
  603. package/symbols/support/ElevationInfo.js +1 -1
  604. package/symbols/support/FeatureExpressionInfo.js +1 -1
  605. package/symbols/support/IconSymbol3DLayerResource.js +1 -1
  606. package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
  607. package/symbols/support/Symbol3DEmissive.js +1 -1
  608. package/symbols/support/Symbol3DHalo.js +1 -1
  609. package/symbols/support/Symbol3DIconOutline.js +1 -1
  610. package/symbols/support/Symbol3DMaterial.js +1 -1
  611. package/symbols/support/Symbol3DOutline.js +1 -1
  612. package/symbols/support/Symbol3DTextBackground.js +1 -1
  613. package/symbols/support/Symbol3DVerticalOffset.js +1 -1
  614. package/tables/AttributeTableTemplate.js +1 -1
  615. package/tables/elements/AttributeTableElement.js +1 -1
  616. package/tables/support/FieldOrder.js +1 -1
  617. package/undoredo/support/Services.js +1 -1
  618. package/versionManagement/VersionManagementService.js +1 -1
  619. package/versionManagement/VersioningState.js +1 -1
  620. package/views/2d/AnimationManager.js +1 -1
  621. package/views/2d/ViewState.js +1 -1
  622. package/views/2d/engine/Stage.js +1 -1
  623. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  624. package/views/2d/engine/flow/styles/Particles.js +1 -1
  625. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  626. package/views/2d/engine/imagery/BrushVectorField.js +1 -1
  627. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  628. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  629. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  630. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  631. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  632. package/views/2d/engine/webgl/BitBlitRenderer.js +1 -1
  633. package/views/2d/engine/webgl/ClippingInfo.js +1 -1
  634. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  635. package/views/2d/engine/webgl/MaterialManager.js +1 -1
  636. package/views/2d/engine/webgl/Mesh2D.js +1 -1
  637. package/views/2d/engine/webgl/Painter.js +1 -1
  638. package/views/2d/engine/webgl/Utils.js +1 -1
  639. package/views/2d/engine/webgl/VertexStream.js +1 -1
  640. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  641. package/views/2d/engine/webgl/animations/store/AnimationStore.js +1 -1
  642. package/views/2d/engine/webgl/brushes/BrushClip.js +1 -1
  643. package/views/2d/engine/webgl/brushes/WGLBrushStencil.js +1 -1
  644. package/views/2d/engine/webgl/brushes/WGLBrushTileDebugInfo.js +1 -1
  645. package/views/2d/engine/webgl/brushes/WGLBrushVTLBackground.js +1 -1
  646. package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
  647. package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
  648. package/views/2d/engine/webgl/effects/highlight/HighlightRenderer.js +1 -1
  649. package/views/2d/engine/webgl/effects/post-processing/Bloom.js +1 -1
  650. package/views/2d/engine/webgl/effects/post-processing/Blur.js +1 -1
  651. package/views/2d/engine/webgl/effects/post-processing/Colorize.js +1 -1
  652. package/views/2d/engine/webgl/effects/post-processing/DropShadow.js +1 -1
  653. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  654. package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
  655. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  656. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
  657. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapResources.js +1 -1
  658. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/textureUtils.js +1 -1
  659. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  660. package/views/2d/engine/webgl/shaders/BackgroundPrograms.js +1 -1
  661. package/views/2d/engine/webgl/shaders/BitBlitPrograms.js +1 -1
  662. package/views/2d/engine/webgl/shaders/HighlightPrograms.js +1 -1
  663. package/views/2d/engine/webgl/shaders/MaterialPrograms.js +1 -1
  664. package/views/2d/engine/webgl/shaders/StencilPrograms.js +1 -1
  665. package/views/2d/engine/webgl/shaders/TileInfoPrograms.js +1 -1
  666. package/views/2d/layerViewModuleImportUtils.js +1 -1
  667. package/views/2d/layers/MediaLayerView2D.js +1 -1
  668. package/views/2d/layers/TileLayerView2D.js +1 -1
  669. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  670. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  671. package/views/2d/layers/support/DebugOverlay.js +1 -1
  672. package/views/3d/FocusAreasView.js +1 -1
  673. package/views/3d/analysis/AnalysisView3D.js +1 -1
  674. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  675. package/views/3d/environment/CloudsCompositionTechnique.js +1 -1
  676. package/views/3d/environment/CloudsRenderer.js +1 -1
  677. package/views/3d/environment/CloudsTechnique.js +1 -1
  678. package/views/3d/environment/CloudyWeather.js +1 -1
  679. package/views/3d/environment/FogTechnique.js +1 -1
  680. package/views/3d/environment/FoggyWeather.js +1 -1
  681. package/views/3d/environment/LocalAtmosphere.js +1 -1
  682. package/views/3d/environment/MarsAtmosphere.js +1 -1
  683. package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
  684. package/views/3d/environment/Precipitation.js +1 -1
  685. package/views/3d/environment/RainyWeather.js +1 -1
  686. package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
  687. package/views/3d/environment/SnowyWeather.js +1 -1
  688. package/views/3d/environment/SunLighting.js +1 -1
  689. package/views/3d/environment/SunnyWeather.js +1 -1
  690. package/views/3d/glTF/internal/Resource.js +1 -1
  691. package/views/3d/glTF/loader.js +1 -1
  692. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  693. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  694. package/views/3d/layerViewModuleImportUtils.js +1 -1
  695. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  696. package/views/3d/layers/GaussianSplatLayerView3D.js +5 -0
  697. package/views/3d/layers/I3SMeshView3D.js +1 -1
  698. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  699. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  700. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  701. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  702. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  703. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  704. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  705. package/views/3d/layers/graphics/StreamController.js +1 -1
  706. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  707. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  708. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  709. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  710. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  711. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
  712. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  713. package/views/3d/layers/graphics/pipeline/symbolization/ObjectSymbolLayerRenderer.js +1 -1
  714. package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
  715. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  716. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  717. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  718. package/views/3d/layers/support/FeatureTile.js +1 -1
  719. package/views/3d/layers/support/FlowTileTree3DDebugger.js +5 -0
  720. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  721. package/views/3d/state/controllers/AnimationController.js +1 -1
  722. package/views/3d/support/DisplayQualityProfile.js +1 -1
  723. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  724. package/views/3d/support/buffer/glUtil.js +1 -1
  725. package/views/3d/terrain/BlendLayersTechnique.js +1 -1
  726. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  727. package/views/3d/terrain/PatchRenderData.js +1 -1
  728. package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
  729. package/views/3d/terrain/TerrainAttributes.js +1 -1
  730. package/views/3d/terrain/TerrainAttributesCache.js +1 -1
  731. package/views/3d/terrain/TileCompositor.js +1 -1
  732. package/views/3d/terrain/isTerrainSurfaceLayer.js +1 -1
  733. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  734. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  735. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  736. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  737. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  738. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  739. package/views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js +2 -2
  740. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -2
  741. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +4 -4
  742. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -2
  743. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
  744. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +1 -1
  745. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +4 -4
  746. package/views/3d/webgl-engine/core/shaderModules/glsl.js +1 -1
  747. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  748. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  749. package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
  750. package/views/3d/webgl-engine/effects/bloom/BloomBlurTechnique.js +1 -1
  751. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechnique.js +1 -1
  752. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +3 -3
  753. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
  754. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  755. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
  756. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  757. package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
  758. package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
  759. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  760. package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
  761. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
  762. package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
  763. package/views/3d/webgl-engine/effects/highlight/HighlightToSingleTechnique.js +1 -1
  764. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  765. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
  766. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  767. package/views/3d/webgl-engine/effects/laserlines/LaserlineTechnique.js +1 -1
  768. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  769. package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
  770. package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
  771. package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
  772. package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
  773. package/views/3d/webgl-engine/effects/ssao/SSAOBlurTechnique.js +1 -1
  774. package/views/3d/webgl-engine/effects/ssao/SSAOTechnique.js +1 -1
  775. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  776. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  777. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  778. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  779. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  780. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  781. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  782. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  783. package/views/3d/webgl-engine/lib/Material.js +1 -1
  784. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  785. package/views/3d/webgl-engine/lib/Program.js +1 -1
  786. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  787. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  788. package/views/3d/webgl-engine/lib/RenderingContextOptions.js +5 -0
  789. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  790. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  791. package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
  792. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  793. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  794. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  795. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  796. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  797. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  798. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  799. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  800. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  801. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  802. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  803. package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
  804. package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
  805. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  806. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  807. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  808. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  809. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  810. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  811. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  812. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  813. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  814. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  815. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  816. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  817. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  818. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  819. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  820. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  821. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  822. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  823. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  824. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  825. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  826. package/views/3d/webgl-engine/materials/renderers/VaoCache.js +1 -1
  827. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  828. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  829. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +5 -5
  830. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  831. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  832. package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
  833. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  834. package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
  835. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  836. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  837. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  838. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +1 -1
  839. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  840. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  841. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  842. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
  843. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  844. package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
  845. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  846. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  847. package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
  848. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  849. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  850. package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +0 -1
  851. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
  852. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  853. package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
  854. package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
  855. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  856. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  857. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  858. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  859. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
  860. package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
  861. package/views/3d/webgl-engine/shaders/ShadowCastClearTechnique.js +1 -1
  862. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
  863. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  864. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  865. package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
  866. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  867. package/views/3d/webgl.js +1 -1
  868. package/views/SceneView.js +1 -1
  869. package/views/VideoView.js +1 -1
  870. package/views/View.js +1 -1
  871. package/views/View2D.js +1 -1
  872. package/views/ViewAnimation.js +1 -1
  873. package/views/draw/DrawAction.js +1 -1
  874. package/views/draw/support/ConnectedReshapeManager.js +1 -1
  875. package/views/interactive/snapping/Settings.js +1 -1
  876. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  877. package/views/layers/LayerView.js +1 -1
  878. package/views/layers/support/ClipArea.js +1 -1
  879. package/views/support/PixelHighlightOptions.js +1 -1
  880. package/views/support/Scheduler.js +1 -1
  881. package/views/support/TileTreeDebugger.js +1 -1
  882. package/views/support/imageReprojection.js +1 -1
  883. package/views/support/screenshotUtils.js +1 -1
  884. package/views/webgl/FramebufferObject.js +1 -1
  885. package/views/webgl/InstanceCounter.js +1 -1
  886. package/views/webgl/Parameters.js +1 -1
  887. package/views/webgl/Program.js +1 -1
  888. package/views/webgl/ProgramCache.js +1 -1
  889. package/views/webgl/ProgramTemplate.js +1 -1
  890. package/views/webgl/RenderingContext.js +1 -1
  891. package/views/webgl/RenderingContextOptions.js +5 -0
  892. package/views/webgl/ShaderBuilder.js +1 -1
  893. package/views/webgl/Texture.js +1 -1
  894. package/views/webgl/TextureDescriptor.js +1 -1
  895. package/views/webgl/Util.js +1 -1
  896. package/views/webgl/VertexArrayObject.js +1 -1
  897. package/views/webgl/VertexAttributeLayouts.js +5 -0
  898. package/views/webgl/VertexAttributeLocations.js +5 -0
  899. package/views/webgl/VertexBuffer.js +5 -0
  900. package/views/webgl/capabilities/Capabilities.js +1 -1
  901. package/views/webgl/enums.js +1 -1
  902. package/views/webgl/heatmapTextureUtils.js +1 -1
  903. package/views/webgl/rasterUtils.js +1 -1
  904. package/views/webgl/testAppleAmdDrawArrays.js +1 -1
  905. package/views/webgl/testFloatBufferBlend.js +1 -1
  906. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  907. package/views/webgl/textureUtils.js +1 -1
  908. package/webdoc/GeotriggersInfo.js +1 -1
  909. package/webdoc/IPSInfo.js +1 -1
  910. package/webdoc/RangeInfo.js +1 -1
  911. package/webdoc/Widgets.js +1 -1
  912. package/webdoc/applicationProperties/Search.js +1 -1
  913. package/webdoc/applicationProperties/SearchLayer.js +1 -1
  914. package/webdoc/applicationProperties/SearchLayerField.js +1 -1
  915. package/webdoc/applicationProperties/SearchTable.js +1 -1
  916. package/webdoc/applicationProperties/SearchTableField.js +1 -1
  917. package/webdoc/applicationProperties/Viewing.js +1 -1
  918. package/webdoc/geotriggersInfo/DeviceLocationFeed.js +1 -1
  919. package/webdoc/geotriggersInfo/ExpressionInfo.js +1 -1
  920. package/webdoc/geotriggersInfo/FeatureFenceParameters.js +1 -1
  921. package/webdoc/geotriggersInfo/FeatureFilter.js +1 -1
  922. package/webdoc/geotriggersInfo/FeatureLayerSource.js +1 -1
  923. package/webdoc/geotriggersInfo/Geotrigger.js +1 -1
  924. package/webdoc/geotriggersInfo/GeotriggerNotificationOptions.js +1 -1
  925. package/webdoc/ips/AppleIPSProperties.js +1 -1
  926. package/webdoc/ips/Configuration.js +1 -1
  927. package/webdoc/ips/GNSSProperties.js +1 -1
  928. package/webdoc/ips/PathSnappingProperties.js +1 -1
  929. package/webdoc/ips/PositioningService.js +1 -1
  930. package/webdoc/ips/SmoothingProperties.js +1 -1
  931. package/webdoc/support/SlideThumbnail.js +1 -1
  932. package/webdoc/widgets/FloorFilter.js +1 -1
  933. package/webdoc/widgets/Range.js +1 -1
  934. package/webdoc/widgets/TimeSlider.js +1 -1
  935. package/webmap/ApplicationProperties.js +1 -1
  936. package/webmap/Bookmark.js +1 -1
  937. package/webmap/background/ColorBackground.js +1 -1
  938. package/webscene/ApplicationProperties.js +1 -1
  939. package/webscene/Environment.js +1 -1
  940. package/webscene/InitialViewProperties.js +1 -1
  941. package/webscene/Presentation.js +1 -1
  942. package/webscene/Slide.js +1 -1
  943. package/webscene/SlideLegendInfo.js +1 -1
  944. package/webscene/SunLighting.js +1 -1
  945. package/webscene/TransportationNetwork.js +1 -1
  946. package/webscene/VirtualLighting.js +1 -1
  947. package/webscene/background/Background.js +1 -1
  948. package/webscene/support/Description.js +1 -1
  949. package/webscene/support/FeatureReference.js +1 -1
  950. package/webscene/support/FeatureReferenceId.js +1 -1
  951. package/webscene/support/LayerReference.js +1 -1
  952. package/webscene/support/SlideElements.js +1 -1
  953. package/webscene/support/SlideEnvironment.js +1 -1
  954. package/webscene/support/SlideGround.js +1 -1
  955. package/webscene/support/SlidePopupInfo.js +1 -1
  956. package/webscene/support/SlideVisibleLayer.js +1 -1
  957. package/webscene/support/Title.js +1 -1
  958. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  959. package/widgets/Directions/support/directionsUtils.js +1 -1
  960. package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
  961. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  962. package/widgets/FeatureForm/Format.js +1 -1
  963. package/widgets/FeatureTable/support/ColumnTemplateBase.js +1 -1
  964. package/widgets/FeatureTable/support/TableTemplate.js +1 -1
  965. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  966. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  967. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  968. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  969. package/widgets/Print/CustomTemplate.js +1 -1
  970. package/widgets/Print/PrintViewModel.js +1 -1
  971. package/widgets/Search/SearchSource.js +1 -1
  972. package/widgets/Widget.js +1 -1
  973. package/assets/esri/core/workers/chunks/040a233ce6fbcc061cdb.js +0 -1
  974. package/assets/esri/core/workers/chunks/04798411698a48438bd3.js +0 -1
  975. package/assets/esri/core/workers/chunks/053086e0a043b00f1cca.js +0 -1
  976. package/assets/esri/core/workers/chunks/05d6ccca0cf38c012873.js +0 -1
  977. package/assets/esri/core/workers/chunks/0801f9dde41ec5f36cca.js +0 -1
  978. package/assets/esri/core/workers/chunks/08b4a4c9f3d6478df40a.js +0 -1
  979. package/assets/esri/core/workers/chunks/0906f977d50b1c5d6ed5.js +0 -1
  980. package/assets/esri/core/workers/chunks/307df66d00ba5f88780d.js +0 -1
  981. package/assets/esri/core/workers/chunks/47cdd5a6351e0db3b2e9.js +0 -346
  982. package/assets/esri/core/workers/chunks/4d2dcd667b30a98dd341.js +0 -1
  983. package/assets/esri/core/workers/chunks/50f56b417992eb30243e.js +0 -1
  984. package/assets/esri/core/workers/chunks/56aafa6f8862629070d8.js +0 -1
  985. package/assets/esri/core/workers/chunks/5c5678b15b59f9964bf0.js +0 -1
  986. package/assets/esri/core/workers/chunks/641ca71d7c1a07bde66a.js +0 -1
  987. package/assets/esri/core/workers/chunks/6b6ab092f578b20c8e56.js +0 -1
  988. package/assets/esri/core/workers/chunks/72e0fda211d980572292.js +0 -1
  989. package/assets/esri/core/workers/chunks/761dab8780495286ec4e.js +0 -1
  990. package/assets/esri/core/workers/chunks/860bd6d6f0c74ca301a4.js +0 -1
  991. package/assets/esri/core/workers/chunks/8d914ea9b18b32fd62b8.js +0 -1
  992. package/assets/esri/core/workers/chunks/8e7dced4a8d089185c3a.js +0 -1
  993. package/assets/esri/core/workers/chunks/97a56b058f8472fec1b2.js +0 -1
  994. package/assets/esri/core/workers/chunks/9a4d0006c118ae5b45c0.js +0 -1
  995. package/assets/esri/core/workers/chunks/a2bfb7b2f3f909dc5e59.js +0 -1
  996. package/assets/esri/core/workers/chunks/afb7e346779adefa4b05.js +0 -1
  997. package/assets/esri/core/workers/chunks/b2f2c1108fb7cbdd1a68.js +0 -1
  998. package/assets/esri/core/workers/chunks/b3466edccd553ae0a5d0.js +0 -990
  999. package/assets/esri/core/workers/chunks/b50841f898d4eb420b73.js +0 -1
  1000. package/assets/esri/core/workers/chunks/b810e2f87c9c59ae04b1.js +0 -1
  1001. package/assets/esri/core/workers/chunks/bf60d4da0dff1e14da8e.js +0 -1
  1002. package/assets/esri/core/workers/chunks/c18ac2018aea6ba97eec.js +0 -1
  1003. package/assets/esri/core/workers/chunks/c3d3e55abf01dae271fb.js +0 -1
  1004. package/assets/esri/core/workers/chunks/cd9e6b86ab0103044370.js +0 -1
  1005. package/assets/esri/core/workers/chunks/d54e18e0f30734610f35.js +0 -1
  1006. package/assets/esri/core/workers/chunks/d7ec905d87a19a1061e7.js +0 -1
  1007. package/assets/esri/core/workers/chunks/d9f206e7ac1fad940be7.js +0 -2
  1008. package/assets/esri/core/workers/chunks/ddeaf688d72b2873c4ac.js +0 -1
  1009. package/assets/esri/core/workers/chunks/debd832b6c2c0b2ea362.js +0 -1
  1010. package/assets/esri/core/workers/chunks/dfa3ad5d750d7b143a06.js +0 -1
  1011. package/assets/esri/core/workers/chunks/e01fa6389bd0b1ae51a5.js +0 -1
  1012. package/assets/esri/core/workers/chunks/e59fdb8f625e9080f097.js +0 -1
  1013. package/assets/esri/core/workers/chunks/e7cbd1b5e4cb32851a5c.js +0 -1
  1014. package/assets/esri/core/workers/chunks/ed1cd90e899dc9c15ee3.js +0 -1
  1015. package/assets/esri/core/workers/chunks/ef3a11f7e047cff6183c.js +0 -1
  1016. package/assets/esri/core/workers/chunks/f79c9b37f2842ed88a9b.js +0 -1
  1017. package/assets/esri/core/workers/chunks/faa0cfee8c1de9b5b78c.js +0 -1
  1018. package/assets/esri/core/workers/chunks/fe6fa1f2c2d54d41645e.js +0 -1
  1019. package/views/2d/engine/webgl/DefaultVertexAttributeLayouts.js +0 -5
  1020. package/views/2d/engine/webgl/shaderGraph/typed/TypedVertexArrayObject.js +0 -5
  1021. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +0 -5
  1022. /package/assets/esri/core/workers/chunks/{d9f206e7ac1fad940be7.js.LICENSE.txt → 3386420c9ae891db5be7.js.LICENSE.txt} +0 -0
@@ -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 n from"../../../Color.js";import t from"../../../core/JSONSupport.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";let o=class extends t{constructor(){super(...arguments),this.enabled=!0}};e([i({type:Boolean})],o.prototype,"enabled",void 0),o=e([r("esri.views.interactive.snapping.Settings.DefaultSnappingAlgorithm")],o);let l=class extends t{constructor(e){super(e),this.lineSnapper=new o,this.parallelLineSnapper=new o,this.rightAngleSnapper=new o,this.rightAngleTriangleSnapper=new o,this.shortLineThreshold=15,this.distance=5,this.pointThreshold=1e-6,this.intersectionParallelLineThreshold=1e-6,this.parallelLineThreshold=1e-6,this.verticalLineThresholdMeters=.3,this.touchSensitivityMultiplier=1.5,this.pointOnLineThreshold=1e-6,this.orange=new n([255,127,0]),this.orangeTransparent=new n([255,127,0,.5]),this.lineHintWidthReference=3,this.lineHintWidthTarget=3,this.lineHintFadedExtensions=.3,this.parallelLineHintWidth=2,this.parallelLineHintLength=24,this.parallelLineHintOffset=1.5,this.rightAngleHintSize=24,this.rightAngleHintOutlineSize=1.5,this.satisfiesConstraintScreenThreshold=1}};e([i({type:o,constructOnly:!0,nonNullable:!0,json:{write:!0}})],l.prototype,"lineSnapper",void 0),e([i({type:o,constructOnly:!0,nonNullable:!0,json:{write:!0}})],l.prototype,"parallelLineSnapper",void 0),e([i({type:o,constructOnly:!0,nonNullable:!0,json:{write:!0}})],l.prototype,"rightAngleSnapper",void 0),e([i({type:o,constructOnly:!0,nonNullable:!0,json:{write:!0}})],l.prototype,"rightAngleTriangleSnapper",void 0),e([i({type:Number,nonNullable:!0,range:{min:-1,max:50,step:1},json:{write:!0}})],l.prototype,"shortLineThreshold",void 0),e([i({type:Number,nonNullable:!0,range:{min:-1,max:50,step:1},json:{write:!0}})],l.prototype,"distance",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1e-5},json:{write:!0}})],l.prototype,"pointThreshold",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1e-5},json:{write:!0}})],l.prototype,"intersectionParallelLineThreshold",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1e-5},json:{write:!0}})],l.prototype,"parallelLineThreshold",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1},json:{write:!0}})],l.prototype,"verticalLineThresholdMeters",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],l.prototype,"touchSensitivityMultiplier",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1e-5},json:{write:!0}})],l.prototype,"pointOnLineThreshold",void 0),e([i({type:n,nonNullable:!0})],l.prototype,"orange",void 0),e([i({type:n,nonNullable:!0})],l.prototype,"orangeTransparent",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],l.prototype,"lineHintWidthReference",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],l.prototype,"lineHintWidthTarget",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1},json:{write:!0}})],l.prototype,"lineHintFadedExtensions",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],l.prototype,"parallelLineHintWidth",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:50},json:{write:!0}})],l.prototype,"parallelLineHintLength",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:5},json:{write:!0}})],l.prototype,"parallelLineHintOffset",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:46},json:{write:!0}})],l.prototype,"rightAngleHintSize",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:6},json:{write:!0}})],l.prototype,"rightAngleHintOutlineSize",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:5},json:{write:!0}})],l.prototype,"satisfiesConstraintScreenThreshold",void 0),l=e([r("esri.views.interactive.snapping.Settings.Defaults")],l);const p=new l;export{p as defaults};
5
+ import{__decorate as e}from"tslib";import n from"../../../Color.js";import{JSONSupport as t}from"../../../core/JSONSupport.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";let o=class extends t{constructor(){super(...arguments),this.enabled=!0}};e([i({type:Boolean})],o.prototype,"enabled",void 0),o=e([r("esri.views.interactive.snapping.Settings.DefaultSnappingAlgorithm")],o);let l=class extends t{constructor(e){super(e),this.lineSnapper=new o,this.parallelLineSnapper=new o,this.rightAngleSnapper=new o,this.rightAngleTriangleSnapper=new o,this.shortLineThreshold=15,this.distance=5,this.pointThreshold=1e-6,this.intersectionParallelLineThreshold=1e-6,this.parallelLineThreshold=1e-6,this.verticalLineThresholdMeters=.3,this.touchSensitivityMultiplier=1.5,this.pointOnLineThreshold=1e-6,this.orange=new n([255,127,0]),this.orangeTransparent=new n([255,127,0,.5]),this.lineHintWidthReference=3,this.lineHintWidthTarget=3,this.lineHintFadedExtensions=.3,this.parallelLineHintWidth=2,this.parallelLineHintLength=24,this.parallelLineHintOffset=1.5,this.rightAngleHintSize=24,this.rightAngleHintOutlineSize=1.5,this.satisfiesConstraintScreenThreshold=1}};e([i({type:o,constructOnly:!0,nonNullable:!0,json:{write:!0}})],l.prototype,"lineSnapper",void 0),e([i({type:o,constructOnly:!0,nonNullable:!0,json:{write:!0}})],l.prototype,"parallelLineSnapper",void 0),e([i({type:o,constructOnly:!0,nonNullable:!0,json:{write:!0}})],l.prototype,"rightAngleSnapper",void 0),e([i({type:o,constructOnly:!0,nonNullable:!0,json:{write:!0}})],l.prototype,"rightAngleTriangleSnapper",void 0),e([i({type:Number,nonNullable:!0,range:{min:-1,max:50,step:1},json:{write:!0}})],l.prototype,"shortLineThreshold",void 0),e([i({type:Number,nonNullable:!0,range:{min:-1,max:50,step:1},json:{write:!0}})],l.prototype,"distance",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1e-5},json:{write:!0}})],l.prototype,"pointThreshold",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1e-5},json:{write:!0}})],l.prototype,"intersectionParallelLineThreshold",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1e-5},json:{write:!0}})],l.prototype,"parallelLineThreshold",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1},json:{write:!0}})],l.prototype,"verticalLineThresholdMeters",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],l.prototype,"touchSensitivityMultiplier",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1e-5},json:{write:!0}})],l.prototype,"pointOnLineThreshold",void 0),e([i({type:n,nonNullable:!0})],l.prototype,"orange",void 0),e([i({type:n,nonNullable:!0})],l.prototype,"orangeTransparent",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],l.prototype,"lineHintWidthReference",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],l.prototype,"lineHintWidthTarget",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:1},json:{write:!0}})],l.prototype,"lineHintFadedExtensions",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:10},json:{write:!0}})],l.prototype,"parallelLineHintWidth",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:50},json:{write:!0}})],l.prototype,"parallelLineHintLength",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:5},json:{write:!0}})],l.prototype,"parallelLineHintOffset",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:46},json:{write:!0}})],l.prototype,"rightAngleHintSize",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:6},json:{write:!0}})],l.prototype,"rightAngleHintOutlineSize",void 0),e([i({type:Number,nonNullable:!0,range:{min:0,max:5},json:{write:!0}})],l.prototype,"satisfiesConstraintScreenThreshold",void 0),l=e([r("esri.views.interactive.snapping.Settings.Defaults")],l);const p=new l;export{p as defaults};
@@ -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{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import"../../../../../core/Logger.js";import"../../../../../core/has.js";import"../../../../../core/RandomLCG.js";import"../../../../../core/Error.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{f as s,j as n}from"../../../../../chunks/vec32.js";import{create as i,clone as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as c,fromPoints as d,projectPoint as a}from"../../../../../geometry/support/lineSegment.js";import{a as p,o as m}from"../../../../../chunks/sphere.js";import u from"../../../../3d/webgl-engine/lib/Octree.js";import{extractComponentsEdgeLocationsLayout as h}from"../../../../3d/webgl-engine/lib/edgeRendering/edgeProcessing.js";import{maxCandidateCount as g,boundsFromEdge as l}from"./sceneLayerSnappingUtils.js";let f=class{constructor(){this._idToComponent=new Map,this._components=new u(e=>e.bounds),this._edges=new u(e=>e.bounds),this._tmpLineSegment=c(),this._tmpP1=i(),this._tmpP2=i(),this._tmpP3=i(),this.remoteClient=null}async fetchCandidates(e,o){await Promise.resolve(),t(o),await this._ensureEdgeLocations(e,o);const s=[];return this._edges.forEachNeighbor(t=>(this._addCandidates(e,t,s),s.length<g),e.bounds),{result:{candidates:s}}}async _ensureEdgeLocations(e,t){const o=[];if(this._components.forEachNeighbor(e=>{if(null==e.info){const{id:t,uid:s}=e;o.push({id:t,uid:s})}return!0},e.bounds),!o.length)return;const s={components:o},n=await this.remoteClient.invoke("fetchAllEdgeLocations",s,t??{});for(const i of n.components)this._setFetchEdgeLocations(i)}async add(e){const t=new j(e.id,e.bounds);return this._idToComponent.set(t.id,t),this._components.add([t]),{result:{}}}async remove(e){const t=this._idToComponent.get(e.id);if(t){const e=[];this._edges.forEachNeighbor(o=>(o.component===t&&e.push(o),!0),t.bounds),this._edges.remove(e),this._components.remove([t]),this._idToComponent.delete(t.id)}return{result:{}}}_setFetchEdgeLocations(e){const t=this._idToComponent.get(e.id);if(null==t||e.uid!==t.uid)return;const o=h.createView(e.locations),s=new Array(o.count),n=i(),r=i();for(let i=0;i<o.count;i++){o.position0.getVec(i,n),o.position1.getVec(i,r);const c=l(n,r,e.origin),d=new w(t,i,c);s[i]=d}this._edges.add(s);const{objectIds:c,origin:d}=e;t.info={locations:o,objectIds:c,origin:d}}_addCandidates(e,t,o){const{info:n}=t.component,{origin:i,objectIds:r}=n,c=n.locations,d=c.position0.getVec(t.index,this._tmpP1),a=c.position1.getVec(t.index,this._tmpP2);s(d,d,i),s(a,a,i);const p=r[c.componentIndex.get(t.index)];this._addEdgeCandidate(e,p,d,a,o),b(e,p,d,o),b(e,p,a,o)}_addEdgeCandidate(e,t,o,s,i){if(!e.returnEdge)return;const c=p(e.bounds),u=d(o,s,this._tmpLineSegment),h=a(u,c,this._tmpP3);m(e.bounds,h)&&i.push({type:"edge",objectId:t,target:r(h),distance:n(c,h),start:r(o),end:r(s)})}};f=e([o("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],f);const _=f;function b(e,t,o,s){if(!e.returnVertex||!m(e.bounds,o))return;const i=p(e.bounds);s.push({type:"vertex",objectId:t,target:r(o),distance:n(i,o)})}class j{constructor(e,t){this.id=e,this.bounds=t,this.info=null,this.uid=++j.uid}static{this.uid=0}}class w{constructor(e,t,o){this.component=e,this.index=t,this.bounds=o}}export{_ as default};
5
+ import{__decorate as e}from"tslib";import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import"../../../../../core/Logger.js";import"../../../../../core/has.js";import"../../../../../core/RandomLCG.js";import"../../../../../core/Error.js";import{subclass as o}from"../../../../../core/accessorSupport/decorators/subclass.js";import{f as s,j as n}from"../../../../../chunks/vec32.js";import{create as i,clone as r}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as c,fromPoints as d,projectPoint as a}from"../../../../../geometry/support/lineSegment.js";import{a as p,o as m}from"../../../../../chunks/sphere.js";import{Octree as u}from"../../../../3d/webgl-engine/lib/Octree.js";import{extractComponentsEdgeLocationsLayout as h}from"../../../../3d/webgl-engine/lib/edgeRendering/edgeProcessing.js";import{maxCandidateCount as g,boundsFromEdge as l}from"./sceneLayerSnappingUtils.js";let f=class{constructor(){this._idToComponent=new Map,this._components=new u(e=>e.bounds),this._edges=new u(e=>e.bounds),this._tmpLineSegment=c(),this._tmpP1=i(),this._tmpP2=i(),this._tmpP3=i(),this.remoteClient=null}async fetchCandidates(e,o){await Promise.resolve(),t(o),await this._ensureEdgeLocations(e,o);const s=[];return this._edges.forEachNeighbor(t=>(this._addCandidates(e,t,s),s.length<g),e.bounds),{result:{candidates:s}}}async _ensureEdgeLocations(e,t){const o=[];if(this._components.forEachNeighbor(e=>{if(null==e.info){const{id:t,uid:s}=e;o.push({id:t,uid:s})}return!0},e.bounds),!o.length)return;const s={components:o},n=await this.remoteClient.invoke("fetchAllEdgeLocations",s,t??{});for(const i of n.components)this._setFetchEdgeLocations(i)}async add(e){const t=new j(e.id,e.bounds);return this._idToComponent.set(t.id,t),this._components.add([t]),{result:{}}}async remove(e){const t=this._idToComponent.get(e.id);if(t){const e=[];this._edges.forEachNeighbor(o=>(o.component===t&&e.push(o),!0),t.bounds),this._edges.remove(e),this._components.remove([t]),this._idToComponent.delete(t.id)}return{result:{}}}_setFetchEdgeLocations(e){const t=this._idToComponent.get(e.id);if(null==t||e.uid!==t.uid)return;const o=h.createView(e.locations),s=new Array(o.count),n=i(),r=i();for(let i=0;i<o.count;i++){o.position0.getVec(i,n),o.position1.getVec(i,r);const c=l(n,r,e.origin),d=new w(t,i,c);s[i]=d}this._edges.add(s);const{objectIds:c,origin:d}=e;t.info={locations:o,objectIds:c,origin:d}}_addCandidates(e,t,o){const{info:n}=t.component,{origin:i,objectIds:r}=n,c=n.locations,d=c.position0.getVec(t.index,this._tmpP1),a=c.position1.getVec(t.index,this._tmpP2);s(d,d,i),s(a,a,i);const p=r[c.componentIndex.get(t.index)];this._addEdgeCandidate(e,p,d,a,o),b(e,p,d,o),b(e,p,a,o)}_addEdgeCandidate(e,t,o,s,i){if(!e.returnEdge)return;const c=p(e.bounds),u=d(o,s,this._tmpLineSegment),h=a(u,c,this._tmpP3);m(e.bounds,h)&&i.push({type:"edge",objectId:t,target:r(h),distance:n(c,h),start:r(o),end:r(s)})}};f=e([o("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],f);const _=f;function b(e,t,o,s){if(!e.returnVertex||!m(e.bounds,o))return;const i=p(e.bounds);s.push({type:"vertex",objectId:t,target:r(o),distance:n(i,o)})}class j{constructor(e,t){this.id=e,this.bounds=t,this.info=null,this.uid=++j.uid}static{this.uid=0}}class w{constructor(e,t,o){this.component=e,this.index=t,this.bounds=o}}export{_ 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 t from"../../core/Accessor.js";import{EventedMixin as r}from"../../core/Evented.js";import{IdentifiableMixin as i}from"../../core/Identifiable.js";import s from"../../core/Logger.js";import{destroyMaybe as n}from"../../core/maybe.js";import l from"../../core/Promise.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as p}from"../../core/support/UpdatingHandles.js";import{validateScaleRange as d}from"../support/layerViewUtils.js";let u=class extends(i(l.EsriPromiseMixin(r(t)))){get spatialReferenceSupported(){return!0}constructor(e){super(e),this._updatingHandles=new p,this.layer=null,this.parent=null}initialize(){this.when().catch(e=>{if("layerview:create-error"!==e.name){const t=this.layer&&this.layer.id||"no id",r=this.layer?.title||"no title";s.getLogger(this).error("#resolve()",`Failed to resolve layer view (layer title: '${r}', id: '${t}')`,e)}})}destroy(){this._updatingHandles=n(this._updatingHandles),this._set("parent",null)}get fullOpacity(){return(this.layer?.opacity??1)*(this.parent?.fullOpacity??1)}get suspended(){return this.destroyed||!this.canResume()}get suspendInfo(){return this.getSuspendInfo()}get legendEnabled(){return!this.suspended&&!0===this.layer?.legendEnabled}get updating(){return!(!this._updatingHandles?.updating&&!this.isUpdating())}get updatingProgress(){return this.updating?0:1}get updateSuspended(){return this.suspended}get visible(){return!0===this.layer?.visible}set visible(e){this._overrideIfSome("visible",e)}get visibleAtCurrentScale(){return!0}get visibleAtCurrentTimeExtent(){const e=this.view.timeExtent,t=this.layer?.visibilityTimeExtent;return!e||!t||!e.intersection(t).isEmpty}canResume(){const e=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return this.visible&&this.layer?.loaded&&this.parent&&!this.parent.suspended&&this.view?.ready&&d(e)&&this.visibleAtCurrentScale&&this.visibleAtCurrentTimeExtent||!1}getSuspendInfo(){const e=this.parent?.suspended?this.parent.suspendInfo:{},t=this;t.view?.ready||(e.viewNotReady=!0),this.layer&&this.layer.loaded||(e.layerNotLoaded=!0);const r=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return d(r)&&this.visibleAtCurrentScale||(e.outsideScaleRange=!0),this.visibleAtCurrentTimeExtent||(e.outsideVisibilityTimeExtent=!0),this.visible||(e.layerInvisible=!0),e}isUpdating(){return!1}};e([o({readOnly:!0})],u.prototype,"spatialReferenceSupported",null),e([o()],u.prototype,"view",void 0),e([o()],u.prototype,"fullOpacity",null),e([o()],u.prototype,"layer",void 0),e([o()],u.prototype,"parent",void 0),e([o({readOnly:!0})],u.prototype,"suspended",null),e([o({readOnly:!0})],u.prototype,"suspendInfo",null),e([o({readOnly:!0})],u.prototype,"legendEnabled",null),e([o({type:Boolean,readOnly:!0})],u.prototype,"updating",null),e([o({readOnly:!0})],u.prototype,"updatingProgress",null),e([o()],u.prototype,"updateSuspended",null),e([o()],u.prototype,"visible",null),e([o({readOnly:!0})],u.prototype,"visibleAtCurrentScale",null),e([o({readOnly:!0})],u.prototype,"visibleAtCurrentTimeExtent",null),u=e([a("esri.views.layers.LayerView")],u);export{u as default};
5
+ import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{EventedMixin as r}from"../../core/Evented.js";import{IdentifiableMixin as i}from"../../core/Identifiable.js";import s from"../../core/Logger.js";import{destroyMaybe as n}from"../../core/maybe.js";import{EsriPromiseMixin as l}from"../../core/Promise.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as p}from"../../core/support/UpdatingHandles.js";import{validateScaleRange as d}from"../support/layerViewUtils.js";let u=class extends(i(l(r(t)))){get spatialReferenceSupported(){return!0}constructor(e){super(e),this._updatingHandles=new p,this.layer=null,this.parent=null}initialize(){this.when().catch(e=>{if("layerview:create-error"!==e.name){const t=this.layer&&this.layer.id||"no id",r=this.layer?.title||"no title";s.getLogger(this).error("#resolve()",`Failed to resolve layer view (layer title: '${r}', id: '${t}')`,e)}})}destroy(){this._updatingHandles=n(this._updatingHandles),this._set("parent",null)}get fullOpacity(){return(this.layer?.opacity??1)*(this.parent?.fullOpacity??1)}get suspended(){return this.destroyed||!this.canResume()}get suspendInfo(){return this.getSuspendInfo()}get legendEnabled(){return!this.suspended&&!0===this.layer?.legendEnabled}get updating(){return!(!this._updatingHandles?.updating&&!this.isUpdating())}get updatingProgress(){return this.updating?0:1}get updateSuspended(){return this.suspended}get visible(){return!0===this.layer?.visible}set visible(e){this._overrideIfSome("visible",e)}get visibleAtCurrentScale(){return!0}get visibleAtCurrentTimeExtent(){const e=this.view.timeExtent,t=this.layer?.visibilityTimeExtent;return!e||!t||!e.intersection(t).isEmpty}canResume(){const e=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return this.visible&&this.layer?.loaded&&this.parent&&!this.parent.suspended&&this.view?.ready&&d(e)&&this.visibleAtCurrentScale&&this.visibleAtCurrentTimeExtent||!1}getSuspendInfo(){const e=this.parent?.suspended?this.parent.suspendInfo:{},t=this;t.view?.ready||(e.viewNotReady=!0),this.layer&&this.layer.loaded||(e.layerNotLoaded=!0);const r=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;return d(r)&&this.visibleAtCurrentScale||(e.outsideScaleRange=!0),this.visibleAtCurrentTimeExtent||(e.outsideVisibilityTimeExtent=!0),this.visible||(e.layerInvisible=!0),e}isUpdating(){return!1}};e([o({readOnly:!0})],u.prototype,"spatialReferenceSupported",null),e([o()],u.prototype,"view",void 0),e([o()],u.prototype,"fullOpacity",null),e([o()],u.prototype,"layer",void 0),e([o()],u.prototype,"parent",void 0),e([o({readOnly:!0})],u.prototype,"suspended",null),e([o({readOnly:!0})],u.prototype,"suspendInfo",null),e([o({readOnly:!0})],u.prototype,"legendEnabled",null),e([o({type:Boolean,readOnly:!0})],u.prototype,"updating",null),e([o({readOnly:!0})],u.prototype,"updatingProgress",null),e([o()],u.prototype,"updateSuspended",null),e([o()],u.prototype,"visible",null),e([o({readOnly:!0})],u.prototype,"visibleAtCurrentScale",null),e([o({readOnly:!0})],u.prototype,"visibleAtCurrentTimeExtent",null),u=e([a("esri.views.layers.LayerView")],u);export{u 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 r}from"tslib";import o from"../../../core/JSONSupport.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";let t=class extends o{get version(){return this.commitVersionProperties(),(this._get("version")||0)+1}};r([e({readOnly:!0})],t.prototype,"version",null),t=r([s("esri.views.layers.support.ClipArea")],t);export{t as default};
5
+ import{__decorate as r}from"tslib";import{JSONSupport as o}from"../../../core/JSONSupport.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";let t=class extends o{get version(){return this.commitVersionProperties(),(this._get("version")||0)+1}};r([e({readOnly:!0})],t.prototype,"version",null),t=r([s("esri.views.layers.support.ClipArea")],t);export{t as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import r from"../../Color.js";import t from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{defaultColor as p}from"./HighlightDefaults.js";let i=class extends t{constructor(o){super(o),this.color=p.clone()}};o([s({type:r,nonNullable:!0,json:{write:!0}})],i.prototype,"color",void 0),o([s({nonNullable:!0,json:{write:!0}})],i.prototype,"ranges",void 0),o([s({json:{write:!0}})],i.prototype,"bandId",void 0),i=o([e("esri.views.support.PixelHighlightOptions")],i);export{i as default};
5
+ import{__decorate as o}from"tslib";import r from"../../Color.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{defaultColor as p}from"./HighlightDefaults.js";let i=class extends t{constructor(o){super(o),this.color=p.clone()}};o([s({type:r,nonNullable:!0,json:{write:!0}})],i.prototype,"color",void 0),o([s({nonNullable:!0,json:{write:!0}})],i.prototype,"ranges",void 0),o([s({json:{write:!0}})],i.prototype,"bandId",void 0),i=o([e("esri.views.support.PixelHighlightOptions")],i);export{i 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{removeUnordered as e,filterInPlace as t}from"../../core/arrayUtils.js";import s from"../../core/Handles.js";import"../../core/has.js";import r from"../../core/Logger.js";import{removeMaybe as i}from"../../core/maybe.js";import a from"../../core/PerformanceSampler.js";import{isAborted as n,createAbortError as h,when as u,isPromiseLike as _}from"../../core/promiseUtils.js";import{watch as o,initial as d,when as E}from"../../core/reactiveUtils.js";import{signal as l}from"../../core/signal.js";import{Milliseconds as c}from"../../core/time.js";import{PromiseQueue as T}from"../../layers/support/PromiseQueue.js";import m from"./debugFlags.js";import{Yield as g}from"./Yield.js";function R(){return new U.Scheduler}var I;!function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.STREAM_CONTROLLER="stream controller",e.OVERLAY="overlay",e.OVERLAY_RENDERER="overlay renderer",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.FLOW_GENERATOR="flow generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(I||(I={}));const p=0,f=new Map([[I.RESOURCE_CONTROLLER_IMMEDIATE,p],[I.RESOURCE_CONTROLLER,4],[I.SLIDE,p],[I.STREAM_DATA_LOADER,p],[I.ELEVATION_QUERY,p],[I.TERRAIN_SURFACE,1],[I.SURFACE_GEOMETRY_UPDATES,1],[I.LOD_RENDERER,2],[I.GRAPHICS_CORE,2],[I.I3S_CONTROLLER,2],[I.POINT_CLOUD_LAYER,2],[I.FEATURE_TILE_FETCHER,2],[I.STREAM_CONTROLLER,2],[I.CLOUDS_GENERATOR,2],[I.OVERLAY,4],[I.OVERLAY_RENDERER,4],[I.STAGE,4],[I.GRAPHICS_DECONFLICTOR,4],[I.FILTER_VISIBILITY,4],[I.SCALE_VISIBILITY,4],[I.FRUSTUM_VISIBILITY,4],[I.POINT_OF_INTEREST_FREQUENT,6],[I.POINT_OF_INTEREST_INFREQUENT,30],[I.LABELER,8],[I.FEATURE_QUERY_ENGINE,8],[I.FEATURE_TILE_TREE,16],[I.FEATURE_TILE_TREE_ACTIVE,p],[I.ELEVATION_ALIGNMENT,12],[I.ELEVATION_ALIGNMENT_SCENE,14],[I.TEXT_TEXTURE_ATLAS,12],[I.TEXTURE_UNLOAD,12],[I.LINE_OF_SIGHT_TOOL,16],[I.LINE_OF_SIGHT_TOOL_INTERACTIVE,p],[I.SNAPPING,p],[I.SHADOW_ACCUMULATOR,30],[I.FLOW_GENERATOR,12],[I.MAPVIEW_FETCH_QUEUE,p],[I.MAPVIEW_LAYERVIEW_UPDATE,2],[I.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,p]]);function L(e){return f.has(e)?f.get(e):"number"==typeof e?e:1}const O=c(6.5),A=c(1),N=c(30),S=c(1e3/30),b=c(100),k=.9;var U;!function(n){class h{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=l(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new a("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new _,this._state=1,this._tasks=new Array,this._runQueue=new Array,this._load=0,this._idleStateCallbacks=new Array,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=o(()=>m.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,d);for(const e of Object.keys(I))this.performanceInfo.tasks.set(I[e],new a(I[e]))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._idleStateCallbacks.length=0,this._runQueue.length=0,i(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,t){const s=new u(this,e,t);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new a(e)),s}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),2===this.state&&this._idleUpdatesStartFired&&s.idleBegin();const r=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){r._idleUpdatesStartFired&&(s.idleEnd(),2===r._state&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,2!==this.state&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forEach(e=>e.idleEnd())))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=O,s=e.frameDuration,r=A;switch(this.state){case 2:t=c(0),s=c(Math.max(b,e.frameDuration)),r=N;break;case 1:s=c(Math.max(S,e.frameDuration))}return s=c(s-e.elapsedFrameTime-t),2!==this.state&&s<A&&!this._forceTask?(this._forceTask=!0,!1):(s=c(Math.max(s,r)),this._budget.reset(s),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case 2:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forEach(e=>e.idleBegin())),this._runIdle();break;case 1:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(c(0)),this._budget.madeProgress()}_removeIdleStateCallbacks(t){this._idleUpdatesStartFired&&t.idleEnd(),e(this._idleStateCallbacks,t)}removeTask(t){e(this._tasks,t),e(this._runQueue,t),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return"s";let t="i";return this._tasks.forEach(s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t="r":"r"!==t&&(t="w"))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(s=>{s.name===e&&(t+=s.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`}),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*k+e*(1-k)}_schedule(){for(t(this._runQueue,e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{e.basePriority===p&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forEach(s=>{if(s.needsUpdate&&0!==s.schedulePriority&&s.basePriority!==p&&s.blockFrame!==this._frameNumber)if(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority)s.schedulePriority=0,this._runQueue.push(s);else--s.schedulePriority}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===g&&(s.blockFrame=this._frameNumber)}catch(e){r.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,I.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(I))this._frameTaskTimes.set(I[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}}n.Scheduler=h;class u{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,r){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new T,this._handles=new s,this._basePriority=L(t),this.schedulePriority=this._basePriority,this._task=l(null!=r?r:this._queue),this._handles.add(E(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this.processQueue(C),this._scheduler.removeTask(this),this.schedule=y.schedule,this.reschedule=y.reschedule,this.scheduleGenerator=y.scheduleGenerator,this.rescheduleGenerator=y.rescheduleGenerator,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=L(e);this._basePriority!==p&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}scheduleGenerator(e,t,s){return this._queue.pushGenerator(e,t,s)}rescheduleGenerator(e,t,s){return this._queue.unshiftGenerator(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class _{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}n.Budget=_}(U||(U={}));const C=new U.Budget;function P(e){const t=new U.Budget;return t.reset(e),t}C.enabled=!1;class F{remove(){}processQueue(){}schedule(e,t,s){try{if(n(t)){const e=h();return s?Promise.resolve(s(e)):Promise.reject(e)}return u(e(C))}catch(r){return Promise.reject(r)}}reschedule(e,t,s){return this.schedule(e,t,s)}async scheduleGenerator(e,t,s){if(n(t)){const e=h();if(s)return s(e);throw e}const r=e(C);for(;;){const e=r.next(C),i=_(e)?await e:e;if(n(t)){const e=h();if(s)return s(e);throw e}if(i.done)return i.value}}rescheduleGenerator(e,t,s){return this.rescheduleGenerator(e,t,s)}}const y=new F;export{y as ImmediateTask,I as TaskPriority,L as getTaskPriority,P as makeBudget,R as newScheduler,C as noBudget,f as taskPriorities};
5
+ import{removeUnordered as e,filterInPlace as t}from"../../core/arrayUtils.js";import s from"../../core/Handles.js";import"../../core/has.js";import r from"../../core/Logger.js";import{removeMaybe as i}from"../../core/maybe.js";import a from"../../core/PerformanceSampler.js";import{isAborted as n,createAbortError as h,when as _,isPromiseLike as u}from"../../core/promiseUtils.js";import{watch as o,initial as d,when as E}from"../../core/reactiveUtils.js";import{signal as l}from"../../core/signal.js";import{Milliseconds as c}from"../../core/time.js";import{PromiseQueue as T}from"../../layers/support/PromiseQueue.js";import m from"./debugFlags.js";import{Yield as g}from"./Yield.js";function R(){return new U}const I={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S_CONTROLLER:"I3S",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"Graphics3D filter visibility",SCALE_VISIBILITY:"Graphics3D scale visibility",FRUSTUM_VISIBILITY:"Graphics3D frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1},p=0,f=new Map([[I.RESOURCE_CONTROLLER_IMMEDIATE,p],[I.RESOURCE_CONTROLLER,4],[I.SLIDE,p],[I.STREAM_DATA_LOADER,p],[I.ELEVATION_QUERY,p],[I.TERRAIN_SURFACE,1],[I.SURFACE_GEOMETRY_UPDATES,1],[I.LOD_RENDERER,2],[I.GRAPHICS_CORE,2],[I.I3S_CONTROLLER,2],[I.POINT_CLOUD_LAYER,2],[I.FEATURE_TILE_FETCHER,2],[I.STREAM_CONTROLLER,2],[I.CLOUDS_GENERATOR,2],[I.OVERLAY,4],[I.OVERLAY_RENDERER,4],[I.STAGE,4],[I.GRAPHICS_DECONFLICTOR,4],[I.FILTER_VISIBILITY,4],[I.SCALE_VISIBILITY,4],[I.FRUSTUM_VISIBILITY,4],[I.POINT_OF_INTEREST_FREQUENT,6],[I.POINT_OF_INTEREST_INFREQUENT,30],[I.LABELER,8],[I.FEATURE_QUERY_ENGINE,8],[I.FEATURE_TILE_TREE,16],[I.FEATURE_TILE_TREE_ACTIVE,p],[I.ELEVATION_ALIGNMENT,12],[I.ELEVATION_ALIGNMENT_SCENE,14],[I.TEXT_TEXTURE_ATLAS,12],[I.TEXTURE_UNLOAD,12],[I.LINE_OF_SIGHT_TOOL,16],[I.LINE_OF_SIGHT_TOOL_INTERACTIVE,p],[I.SNAPPING,p],[I.SHADOW_ACCUMULATOR,30],[I.FLOW_GENERATOR,12],[I.MAPVIEW_FETCH_QUEUE,p],[I.MAPVIEW_LAYERVIEW_UPDATE,2],[I.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,p]]);function L(e){return f.has(e)?f.get(e):"number"==typeof e?e:1}const A=c(6.5),O=c(1),b=c(30),N=c(1e3/30),S=c(100),k=.9;class U{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=l(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new a("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new P,this._state=1,this._tasks=new Array,this._runQueue=new Array,this._load=0,this._idleStateCallbacks=new Array,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=o(()=>m.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,d);for(const e of Object.keys(I))this.performanceInfo.tasks.set(I[e],new a(String(I[e])))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._idleStateCallbacks.length=0,this._runQueue.length=0,i(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,t){const s=new C(this,e,t);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new a(e)),s}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),2===this.state&&this._idleUpdatesStartFired&&s.idleBegin();const r=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){r._idleUpdatesStartFired&&(s.idleEnd(),2===r._state&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,2!==this.state&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forEach(e=>e.idleEnd())))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=A,s=e.frameDuration,r=O;switch(this.state){case 2:t=c(0),s=c(Math.max(S,e.frameDuration)),r=b;break;case 1:s=c(Math.max(N,e.frameDuration))}return s=c(s-e.elapsedFrameTime-t),2!==this.state&&s<O&&!this._forceTask?(this._forceTask=!0,!1):(s=c(Math.max(s,r)),this._budget.reset(s),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case 2:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forEach(e=>e.idleBegin())),this._runIdle();break;case 1:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(c(0)),this._budget.madeProgress()}_removeIdleStateCallbacks(t){this._idleUpdatesStartFired&&t.idleEnd(),e(this._idleStateCallbacks,t)}removeTask(t){e(this._tasks,t),e(this._runQueue,t),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return"s";let t="i";return this._tasks.forEach(s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t="r":"r"!==t&&(t="w"))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(s=>{s.name===e&&(t+=s.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`}),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*k+e*(1-k)}_schedule(){for(t(this._runQueue,e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{e.basePriority===p&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forEach(s=>{if(s.needsUpdate&&0!==s.schedulePriority&&s.basePriority!==p&&s.blockFrame!==this._frameNumber)if(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority)s.schedulePriority=0,this._runQueue.push(s);else--s.schedulePriority}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===g&&(s.blockFrame=this._frameNumber)}catch(e){r.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,I.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(I))this._frameTaskTimes.set(I[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}}class C{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,r){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new T,this._handles=new s,this._basePriority=L(t),this.schedulePriority=this._basePriority,this._task=l(null!=r?r:this._queue),this._handles.add(E(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this.processQueue(F),this._scheduler.removeTask(this),this.schedule=G.schedule,this.reschedule=G.reschedule,this.scheduleGenerator=G.scheduleGenerator,this.rescheduleGenerator=G.rescheduleGenerator,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=L(e);this._basePriority!==p&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}scheduleGenerator(e,t,s){return this._queue.pushGenerator(e,t,s)}rescheduleGenerator(e,t,s){return this._queue.unshiftGenerator(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class P{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}const F=new P;function y(e){const t=new P;return t.reset(e),t}F.enabled=!1;class w{remove(){}processQueue(){}schedule(e,t,s){try{if(n(t)){const e=h();return s?Promise.resolve(s(e)):Promise.reject(e)}return _(e(F))}catch(r){return Promise.reject(r)}}reschedule(e,t,s){return this.schedule(e,t,s)}async scheduleGenerator(e,t,s){if(n(t)){const e=h();if(s)return s(e);throw e}const r=e(F);for(;;){const e=r.next(F),i=u(e)?await e:e;if(n(t)){const e=h();if(s)return s(e);throw e}if(i.done)return i.value}}rescheduleGenerator(e,t,s){return this.rescheduleGenerator(e,t,s)}}const G=new w;export{G as ImmediateTask,I as TaskPriority,L as getTaskPriority,y as makeBudget,R as newScheduler,F as noBudget,f as taskPriorities};
@@ -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"../../Color.js";import o from"../../Graphic.js";import t from"../../core/Accessor.js";import l from"../../core/Collection.js";import{lerp as r}from"../../core/mathUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import n from"../../symbols/PointSymbol3D.js";import m from"../../symbols/SimpleFillSymbol.js";import h from"../../symbols/TextSymbol.js";import c from"../../symbols/TextSymbol3DLayer.js";import p from"../../symbols/callouts/LineCallout3D.js";import y from"../../symbols/callouts/LineCallout3DBorder.js";import b from"../../symbols/support/Symbol3DVerticalOffset.js";const u=[[0,179,255],[117,62,128],[0,104,255],[215,189,166],[32,0,193],[98,162,206],[102,112,129],[52,125,0],[142,118,246],[138,83,0],[92,122,255],[122,55,83],[0,142,255],[81,40,179],[0,200,244],[13,24,127],[0,170,147],[19,58,241],[22,44,35]];let d=class extends t{constructor(e){super(e),this.updating=!1,this.enablePolygons=!0,this.enableLabels=!0,this._polygons=new Map,this._labels=new Map,this._symbols=u.map(e=>new m({color:[e[0],e[1],e[2],.6],outline:{color:"black",width:1}})),this._enabled=!0}initialize(){this.update()}destroy(){this._enabled=!1,this.clear()}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&(this._enabled=e,this.update())}update(){if(!this._enabled)return void this.clear();const e=e=>{if(null!=e.label)return e.label;let s=e.lij.toString();return null!=e.loadPriority&&(s+=` (${e.loadPriority})`),e.measures&&(s+=`[${e.measures.lodLevel}]`),s},t=this.getTiles(),i=new Array,a=new Set((this._labels.size,this._labels.keys()));t.forEach((m,u)=>{const d=m.lij.toString();a.delete(d);const g=m.measures?.lodLevel??m.level,f=m.geometry;if(this.enablePolygons&&!this._polygons.has(d)){const e=new o({geometry:f,symbol:this._symbols[g%this._symbols.length]});this._polygons.set(d,e),i.push(e)}if(this.enableLabels){const a=e(m),g=u/(t.length-1),w=r(0,200,g),_=r(20,6,g)/.75,j=null!=m.loadPriority&&m.loadPriority>=t.length,v=new s([w,j?0:w,j?0:w]),S="3d"===this.view.type?()=>new n({verticalOffset:new b({screenLength:40/.75}),callout:new p({color:new s("white"),border:new y({color:new s("black")})}),symbolLayers:new l([new c({text:a,halo:{color:"white",size:1/.75},material:{color:v},size:_})])}):()=>new h({text:a,haloColor:"white",haloSize:1/.75,color:v,size:_}),L=this._labels.get(d);if(L){const e=S();null!=L.symbol&&JSON.stringify(e)===JSON.stringify(L.symbol)||(L.symbol=e)}else{const e=new o({geometry:f.extent.center,symbol:S()});this._labels.set(d,e),i.push(e)}}});const m=new Array;a.forEach(e=>{const s=this._polygons.get(e);null!=s&&(m.push(s),this._polygons.delete(e));const o=this._labels.get(e);null!=o&&(m.push(o),this._labels.delete(e))}),this.view.graphics.removeMany(m),this.view.graphics.addMany(i)}clear(){this.view.graphics.removeMany(Array.from(this._polygons.values())),this.view.graphics.removeMany(Array.from(this._labels.values())),this._polygons.clear(),this._labels.clear()}};e([i({constructOnly:!0})],d.prototype,"view",void 0),e([i({readOnly:!0})],d.prototype,"updating",void 0),e([i()],d.prototype,"enabled",null),d=e([a("esri.views.support.TileTreeDebugger")],d);export{d as TileTreeDebugger};
5
+ import{__decorate as e}from"tslib";import o from"../../Color.js";import s from"../../Graphic.js";import t from"../../core/Accessor.js";import l from"../../core/Collection.js";import{lerp as r}from"../../core/mathUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import n from"../../symbols/PointSymbol3D.js";import m from"../../symbols/SimpleFillSymbol.js";import h from"../../symbols/TextSymbol.js";import p from"../../symbols/TextSymbol3DLayer.js";import c from"../../symbols/callouts/LineCallout3D.js";import y from"../../symbols/callouts/LineCallout3DBorder.js";import b from"../../symbols/support/Symbol3DVerticalOffset.js";const u=[[0,179,255],[117,62,128],[0,104,255],[215,189,166],[32,0,193],[98,162,206],[102,112,129],[52,125,0],[142,118,246],[138,83,0],[92,122,255],[122,55,83],[0,142,255],[81,40,179],[0,200,244],[13,24,127],[0,170,147],[19,58,241],[22,44,35]];let d=class extends t{constructor(e){super(e),this.updating=!1,this.enablePolygons=!0,this.enableLabels=!0,this._polygons=new Map,this._labels=new Map,this._symbols=u.map(e=>new m({color:[e[0],e[1],e[2],.6],outline:{color:"black",width:1}})),this._enabled=!0}initialize(){this.update()}destroy(){this._enabled=!1,this.clear()}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&(this._enabled=e,this.update())}update(){if(!this._enabled)return void this.clear();const e=e=>{if(null!=e.label)return e.label;let o=e.lij.toString();return null!=e.loadPriority&&(o+=` (${e.loadPriority})`),e.measures&&(o+=`[${e.measures.lodLevel}]`),o},t=this.getTiles(),i=new Array,a=new Set((this._labels.size,this._labels.keys()));t.forEach((m,u)=>{const d=m.lij.toString();a.delete(d);const g=m.measures?.lodLevel??m.level,f=m.geometry;if(this.enablePolygons&&!this._polygons.has(d)){const e=m.polygonSymbol??this._symbols[g%this._symbols.length],o=new s({geometry:f,symbol:e});this._polygons.set(d,o),i.push(o)}if(this.enableLabels){const a=e(m),g=u/(t.length-1),w=r(0,200,g),_=r(20,6,g)/.75,j=null!=m.loadPriority&&m.loadPriority>=t.length,v=new o([w,j?0:w,j?0:w]),S="3d"===this.view.type?()=>new n({verticalOffset:new b({screenLength:40/.75}),callout:new c({color:new o("white"),border:new y({color:new o("black")})}),symbolLayers:new l([new p({text:a,halo:{color:"white",size:1/.75},material:{color:v},size:_})])}):()=>new h({text:a,haloColor:"white",haloSize:1/.75,color:v,size:_}),L=this._labels.get(d);if(L){const e=S();null!=L.symbol&&JSON.stringify(e)===JSON.stringify(L.symbol)||(L.symbol=e)}else{const e=new s({geometry:f.extent.center,symbol:S()});this._labels.set(d,e),i.push(e)}}});const m=new Array;a.forEach(e=>{const o=this._polygons.get(e);null!=o&&(m.push(o),this._polygons.delete(e));const s=this._labels.get(e);null!=s&&(m.push(s),this._labels.delete(e))}),this.view.graphics.removeMany(m),this.view.graphics.addMany(i)}clear(){this.view.graphics.removeMany(Array.from(this._polygons.values())),this.view.graphics.removeMany(Array.from(this._labels.values())),this._polygons.clear(),this._labels.clear()}};e([i({constructOnly:!0})],d.prototype,"view",void 0),e([i({readOnly:!0})],d.prototype,"updating",void 0),e([i()],d.prototype,"enabled",null),d=e([a("esri.views.support.TileTreeDebugger")],d);export{d as TileTreeDebugger};
@@ -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 t from"../../request.js";import e from"../../geometry/Point.js";import{execute as r}from"../../geometry/operators/projectOperator.js";import{projectResolution as i,getProjectionOffsetGrid as a,load as s}from"../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{isImageSource as n,rasterize as o}from"../2d/engine/Bitmap.js";import m from"../2d/engine/webgl/VertexStream.js";import{createProgramTemplate as c}from"../2d/engine/webgl/shaders/MaterialPrograms.js";import{FramebufferObject as p}from"../webgl/FramebufferObject.js";import{createTransformTexture as h}from"../webgl/rasterUtils.js";import{RenderingContext as x}from"../webgl/RenderingContext.js";import{Texture as u}from"../webgl/Texture.js";import{TextureDescriptor as d}from"../webgl/TextureDescriptor.js";class g{static{this._instanceRefCount=0}constructor(t){if(this._ownsRctx=!1,t)this._ownsRctx=!1,this._rctx=t;else{if(g._instance)return g._instanceRefCount++,g._instance;g._instanceRefCount=1,g._instance=this,this._ownsRctx=!0;const t=document.createElement("canvas").getContext("webgl2");t.getExtension("OES_texture_float"),this._rctx=new x(t,{})}const e={applyProjection:!0,bilinear:!1,bicubic:!1},r=c("raster/reproject","raster/reproject",new Map([["a_position",0]]),e);this._program=this._rctx.programCache.acquire(r.shaders.vertexShader,r.shaders.fragmentShader,r.attributes),this._rctx.useProgram(this._program),this._program.setUniform1f("u_opacity",1),this._program.setUniform1i("u_image",0),this._program.setUniform1i("u_flipY",0),this._program.setUniform1i("u_transformGrid",1),this._quad=new m(this._rctx,[0,0,1,0,0,1,1,1])}reprojectTexture(t,s,n=!1){const o=r(t.extent,s),m=new e({x:(t.extent.xmax-t.extent.xmin)/t.texture.descriptor.width,y:(t.extent.ymax-t.extent.ymin)/t.texture.descriptor.height,spatialReference:t.extent.spatialReference}),{x:c,y:x}=i(m,s,t.extent);let u=(c+x)/2;const g=Math.round((o.xmax-o.xmin)/u),_=Math.round((o.ymax-o.ymin)/u);u=(o.width/g+o.height/_)/2;const f=new e({x:u,y:u,spatialReference:o.spatialReference}),l=a({projectedExtent:o,srcBufferExtent:t.extent,pixelSize:f,hasWrapAround:!0,spacing:[16,16]}),w=h(this._rctx,l),b=new d(g,_);b.wrapMode=33071;const j=new p(this._rctx,b);this._rctx.bindFramebuffer(j),this._rctx.setViewport(0,0,g,_),this._rctx.useProgram(this._program),this._rctx.bindTexture(t.texture,0),this._rctx.bindTexture(w,1),this._quad.bind();const{width:D=0,height:R=0}=t.texture.descriptor;if(this._program.setUniform2f("u_srcImageSize",D,R),this._program.setUniform2fv("u_transformSpacing",l.spacing),this._program.setUniform2fv("u_transformGridSize",l.size),this._program.setUniform2f("u_targetImageSize",g,_),this._quad.draw(),this._quad.unbind(),this._rctx.useProgram(null),this._rctx.bindFramebuffer(null),w.dispose(),n){const{width:t,height:e}=j,r=new ImageData(t??0,e??0);j.readPixels(0,0,t??0,e??0,6408,5121,r.data);const i=j.detachColorTexture();return j.dispose(),{texture:i,extent:o,imageData:r}}const y=j.detachColorTexture();return j.dispose(),{texture:y,extent:o}}reprojectBitmapData(t,e){const r=n(t.bitmapData)?o(t.bitmapData):t.bitmapData,i=new d(t.bitmapData.width,t.bitmapData.height);i.wrapMode=33071;const a=new u(this._rctx,i,r),s=this.reprojectTexture({texture:a,extent:t.extent},e,!0);s.texture.dispose();const m=document.createElement("canvas"),c=s.imageData;m.width=c.width,m.height=c.height;return m.getContext("2d").putImageData(c,0,0),{bitmapData:m,extent:s.extent}}async loadAndReprojectBitmapData(e,r,i){const[a]=await Promise.all([t(e,{responseType:"image"}).then(t=>t.data),s()]),n=document.createElement("canvas");n.width=a.width,n.height=a.height;const o=n.getContext("2d");o.drawImage(a,0,0);const m=o.getImageData(0,0,n.width,n.height);if(r.spatialReference.equals(i))return{bitmapData:m,extent:r};const c=this.reprojectBitmapData({bitmapData:m,extent:r},i);return{bitmapData:c.bitmapData,extent:c.extent}}destroy(){this._ownsRctx?(g._instanceRefCount--,0===g._instanceRefCount&&(this._quad.dispose(),this._program.dispose(),this._rctx.dispose(),g._instance=null)):(this._quad.dispose(),this._program.dispose())}}export{g as ImageReprojector};
5
+ import t from"../../request.js";import e from"../../geometry/Point.js";import{execute as r}from"../../geometry/operators/projectOperator.js";import{projectResolution as i,getProjectionOffsetGrid as a,load as s}from"../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{isImageSource as n,rasterize as o}from"../2d/engine/Bitmap.js";import m from"../2d/engine/webgl/VertexStream.js";import{createProgramTemplate as c}from"../2d/engine/webgl/shaders/MaterialPrograms.js";import{PixelType as p}from"../webgl/enums.js";import{FramebufferObject as h}from"../webgl/FramebufferObject.js";import{createTransformTexture as x}from"../webgl/rasterUtils.js";import{RenderingContext as u}from"../webgl/RenderingContext.js";import{RenderingContextOptions as d}from"../webgl/RenderingContextOptions.js";import{Texture as g}from"../webgl/Texture.js";import{TextureDescriptor as _}from"../webgl/TextureDescriptor.js";class f{static{this._instanceRefCount=0}constructor(t){if(this._ownsRctx=!1,t)this._ownsRctx=!1,this._rctx=t;else{if(f._instance)return f._instanceRefCount++,f._instance;f._instanceRefCount=1,f._instance=this,this._ownsRctx=!0;const t=document.createElement("canvas").getContext("webgl2");t.getExtension("OES_texture_float"),this._rctx=new u(t,new d)}this._quad=new m(this._rctx,[0,0,1,0,0,1,1,1]);const e=c("raster/reproject","raster/reproject",{applyProjection:!0,bilinear:!1,bicubic:!1});this._program=this._rctx.programCache.acquire(e.vertexShader,e.fragmentShader,this._quad.locations),this._rctx.useProgram(this._program),this._program.setUniform1f("u_opacity",1),this._program.setUniform1i("u_image",0),this._program.setUniform1i("u_flipY",0),this._program.setUniform1i("u_transformGrid",1)}reprojectTexture(t,s,n=!1){const o=r(t.extent,s),m=new e({x:(t.extent.xmax-t.extent.xmin)/t.texture.descriptor.width,y:(t.extent.ymax-t.extent.ymin)/t.texture.descriptor.height,spatialReference:t.extent.spatialReference}),{x:c,y:u}=i(m,s,t.extent);let d=(c+u)/2;const g=Math.round((o.xmax-o.xmin)/d),f=Math.round((o.ymax-o.ymin)/d);d=(o.width/g+o.height/f)/2;const l=new e({x:d,y:d,spatialReference:o.spatialReference}),w=a({projectedExtent:o,srcBufferExtent:t.extent,pixelSize:l,hasWrapAround:!0,spacing:[16,16]}),b=x(this._rctx,w),j=new _(g,f);j.wrapMode=33071;const D=new h(this._rctx,j);this._rctx.bindFramebuffer(D),this._rctx.setViewport(0,0,g,f),this._rctx.useProgram(this._program),this._rctx.bindTexture(t.texture,0),this._rctx.bindTexture(b,1),this._quad.bind();const{width:R=0,height:y=0}=t.texture.descriptor;if(this._program.setUniform2f("u_srcImageSize",R,y),this._program.setUniform2fv("u_transformSpacing",w.spacing),this._program.setUniform2fv("u_transformGridSize",w.size),this._program.setUniform2f("u_targetImageSize",g,f),this._quad.draw(),this._quad.unbind(),this._rctx.useProgram(null),this._rctx.bindFramebuffer(null),b.dispose(),n){const{width:t,height:e}=D,r=new ImageData(t??0,e??0);D.readPixels(0,0,t??0,e??0,6408,p.UNSIGNED_BYTE,r.data);const i=D.detachColorTexture();return D.dispose(),{texture:i,extent:o,imageData:r}}const C=D.detachColorTexture();return D.dispose(),{texture:C,extent:o}}reprojectBitmapData(t,e){const r=n(t.bitmapData)?o(t.bitmapData):t.bitmapData,i=new _(t.bitmapData.width,t.bitmapData.height);i.wrapMode=33071;const a=new g(this._rctx,i,r),s=this.reprojectTexture({texture:a,extent:t.extent},e,!0);s.texture.dispose();const m=document.createElement("canvas"),c=s.imageData;m.width=c.width,m.height=c.height;return m.getContext("2d").putImageData(c,0,0),{bitmapData:m,extent:s.extent}}async loadAndReprojectBitmapData(e,r,i){const[a]=await Promise.all([t(e,{responseType:"image"}).then(t=>t.data),s()]),n=document.createElement("canvas");n.width=a.width,n.height=a.height;const o=n.getContext("2d");o.drawImage(a,0,0);const m=o.getImageData(0,0,n.width,n.height);if(r.spatialReference.equals(i))return{bitmapData:m,extent:r};const c=this.reprojectBitmapData({bitmapData:m,extent:r},i);return{bitmapData:c.bitmapData,extent:c.extent}}destroy(){this._ownsRctx?(f._instanceRefCount--,0===f._instanceRefCount&&(this._quad.dispose(),this._program.dispose(),this._rctx.dispose(),f._instance=null)):(this._quad.dispose(),this._program.dispose())}}export{f as ImageReprojector};
@@ -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"../../core/has.js";import{clamp as t}from"../../core/mathUtils.js";export{createEmptyImageData}from"../../core/imageUtils.js";const h=2048,i=1.5,e=8;function o(h,i){const{format:e,quality:o,rotation:n,disableDecorations:a}=h||{},r=b(h,i.padding),l=p(h,{width:i.width-r.left-r.right,height:i.height-r.top-r.bottom}),{width:g,height:f}=m(h,l),d=j(e),u=R[d];return{format:d,quality:t(null!=o?o:u,0,100),area:l,width:g,height:f,rotation:n,disableDecorations:!!a,ignoreBackground:!!h?.ignoreBackground,ignorePadding:!!h?.ignorePadding}}function n(t,h){const i=o(t,h),e=i.area,n=i.width/e.width,a=b(i,h.padding),r=a.left+a.right,l=a.top+a.bottom,g=h.width-r,f=h.height-l,d=Math.floor(g*n+r),u=Math.floor(f*n+l),c=t?.layers??[],s=i.ignoreBackground,w=i.ignorePadding;return{framebufferWidth:d,framebufferHeight:u,region:{x:Math.floor(e.x*n)+a.left,y:Math.floor(e.y*n)+a.top,width:i.width,height:i.height},format:i.format,quality:i.quality,rotation:i.rotation,pixelRatio:n,layers:c,disableDecorations:i.disableDecorations,ignoreBackground:s,ignorePadding:w,objectAndLayerIdColor:!1}}function a(t,h,i){const{ctx:e,canvas:o}=l(t,i),n=e.getImageData(0,0,t.width,t.height),a=u(o,h);return g(o),{dataUrl:a,data:n}}function r(t,h){const{ctx:i,canvas:e}=l(t,h),o=i.getImageData(0,0,t.width,t.height);return g(e),o}function l(t,h){const i=f();h.premultipliedAlpha&&q(t),i.width=t.width,i.height=t.height;const e=i.getContext("2d",{willReadFrequently:!0});return e.putImageData(t,0,0),h.flipY&&D(e),{ctx:e,canvas:i}}function g(t){t.width=0,t.height=0}function f(){return null==d&&(d=document.createElement("canvas")),d}let d=null;function u(t,h){const i=v[h.format],e=h.quality/100;return t.toDataURL(i,e)}function c(h,i){const e=j(h),o=R[e];return{format:e,quality:t(null!=i?i:o,0,100)}}function s(t,h){return h/Math.max(t[0],t[1])}function w(t,h,i,e=0,o=0,n=t.width-e,a=t.height-o,r=!1){const{data:l}=t,{width:g,height:f,data:d}=h,u=n/g,c=a/f,s=Math.ceil(u/2),w=Math.ceil(c/2),M=t.width;for(let m=0;m<f;m++)for(let t=0;t<g;t++){const h=4*(t+(r?f-m-1:m)*g);let n=0,a=0,p=0,x=0,y=0,b=0;const j=(m+.5)*c;for(let r=Math.floor(m*c);r<(m+1)*c;r++){const h=Math.abs(j-(r+.5))/w,g=(t+.5)*u,f=h*h;for(let d=Math.floor(t*u);d<(t+1)*u;d++){const t=Math.abs(g-(d+.5))/s,h=Math.sqrt(f+t*t);if(h>=1)continue;let u=2*h*h*h-3*h*h+1;const c=4*(e+d+(o+r)*M);b+=u*l[c+3],a+=u,!i&&l[c+3]<255&&(u=u*l[c+3]/255),p+=u*l[c],x+=u*l[c+1],y+=u*l[c+2],n+=u}}d[h]=p/n,d[h+1]=x/n,d[h+2]=y/n,d[h+3]=b/a}return h}function M(t,o,n){if(!o)return t;const{framebufferWidth:a,framebufferHeight:r,pixelRatio:l,region:g}=t,f=b(t,n),d=f.left+f.right,u=f.top+f.bottom,c=a-d,s=r-u,w=Math.min(e,Math.min((h-d)/c,(h-u)/s));return w<i?t:{...t,framebufferWidth:Math.round(c*w)+d,framebufferHeight:Math.round(s*w)+u,pixelRatio:l*w,resample:{region:{x:Math.round((g.x-f.left)*w)+f.left,y:Math.round((g.y-f.top)*w)+f.top,width:Math.round(g.width*w),height:Math.round(g.height*w)},width:a,height:r}}}function m(t,h){if(!t)return h;const i=t.width,e=t.height;if(null!=i&&null!=e)return{width:Math.floor(i),height:Math.floor(e)};if(null==i&&null==e)return h;const o=h.width/h.height;return null==e?{width:Math.floor(i),height:Math.floor(i/o)}:{width:Math.floor(e*o),height:Math.floor(e)}}function p(t,h){const i={x:0,y:0,width:h.width,height:h.height};if(t?.area){null!=t.area.x&&(i.x=Math.floor(t.area.x)),null!=t.area.y&&(i.y=Math.floor(t.area.y));const e=null!=t.area.width?Math.floor(t.area.width):null,o=null!=t.area.height?Math.floor(t.area.height):null;if(i.width=h.width-i.x,i.height=h.height-i.y,null!=e&&null!=o)i.width=Math.min(i.width,e),i.height=Math.min(i.height,o);else if(null==e&&null!=o){const t=Math.min(i.width,e);i.height=t/i.width*i.height,i.width=t}else if(null!=e&&null==o){const t=Math.min(i.height,o);i.width=t/i.height*i.width,i.height=t}}return x(y(i,t),h)}function x(t,h){const i=Math.floor(Math.max(t.x,0)),e=Math.floor(Math.max(t.y,0)),o={x:i,y:e,width:Math.floor(Math.min(t.width,h.width-i)),height:Math.floor(Math.min(t.height,h.height-e))},n=o.width/o.height,a=t.width/t.height;if(a===n)return o;if(a>n){const t=Math.floor(o.width/a),h=o.height-t;return{x:o.x,y:Math.floor(o.y+h/2),width:o.width,height:t}}const r=Math.floor(o.height*a),l=o.width-r;return{x:Math.floor(o.x+l/2),y:o.y,width:r,height:o.height}}function y(t,h){if(null==h?.width||null==h.height)return t;const i=h.width/h.height,e=t.width/t.height;if(e===i)return t;if(e<i){const h=Math.floor(t.height*i);return t.x-=(h-t.width)/2,t.width=h,t}const o=Math.floor(t.width/i);return t.y-=(o-t.height)/2,t.height=o,t}function b(t,h){return!h||t?.ignorePadding?k:h}function j(t){switch(t){case"png":case"jpg":case"jpeg":return t;default:return P}}function D(t){t.save(),t.globalCompositeOperation="copy",t.scale(1,-1),t.translate(0,-t.canvas.height),t.drawImage(t.canvas,0,0),t.restore()}function q(t){const h=t.data,i=h.length;for(let e=0;e<i;e+=4){const t=h[e+3];if(255!==t&&t>0){const i=255/t;h[e]=h[e]*i,h[e+1]=h[e+1]*i,h[e+2]=h[e+2]*i}}}const v={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"},I=98,P="png",R={png:100,jpg:I,jpeg:I},k={top:0,right:0,bottom:0,left:0};export{o as completeUserSettings,a as encode,r as encodeData,c as getFormatAndQuality,s as getMaximumResolutionScale,w as resampleHermite,M as screenshotSuperSampleSettings,u as toDataUrl,n as toRenderSettings};
5
+ import"../../core/has.js";import{clamp as t}from"../../core/mathUtils.js";export{createEmptyImageData}from"../../core/imageUtils.js";const h=2048,i=1.5,e=8;function o(h,i){const{format:e,quality:o,rotation:n,disableDecorations:a}=h||{},r=b(h,i.padding),l=p(h,{width:i.width-r.left-r.right,height:i.height-r.top-r.bottom}),{width:g,height:f}=m(h,l),u=j(e),d=R[u];return{format:u,quality:t(null!=o?o:d,0,100),area:l,width:g,height:f,rotation:n,disableDecorations:!!a,ignoreBackground:!!h?.ignoreBackground,ignorePadding:!!h?.ignorePadding}}function n(t,h){const i=o(t,h),e=i.area,n=i.width/e.width,a=b(i,h.padding),r=a.left+a.right,l=a.top+a.bottom,g=h.width-r,f=h.height-l,u=Math.floor(g*n+r),d=Math.floor(f*n+l),c=t?.layers??[],s=i.ignoreBackground,w=i.ignorePadding;return{framebufferWidth:u,framebufferHeight:d,region:{x:Math.floor(e.x*n)+a.left,y:Math.floor(e.y*n)+a.top,width:i.width,height:i.height},format:i.format,quality:i.quality,rotation:i.rotation,pixelRatio:n,layers:c,disableDecorations:i.disableDecorations,ignoreBackground:s,ignorePadding:w,olidColor:!1}}function a(t,h,i){const{ctx:e,canvas:o}=l(t,i),n=e.getImageData(0,0,t.width,t.height),a=d(o,h);return g(o),{dataUrl:a,data:n}}function r(t,h){const{ctx:i,canvas:e}=l(t,h),o=i.getImageData(0,0,t.width,t.height);return g(e),o}function l(t,h){const i=f();h.premultipliedAlpha&&q(t),i.width=t.width,i.height=t.height;const e=i.getContext("2d",{willReadFrequently:!0});return e.putImageData(t,0,0),h.flipY&&D(e),{ctx:e,canvas:i}}function g(t){t.width=0,t.height=0}function f(){return null==u&&(u=document.createElement("canvas")),u}let u=null;function d(t,h){const i=v[h.format],e=h.quality/100;return t.toDataURL(i,e)}function c(h,i){const e=j(h),o=R[e];return{format:e,quality:t(null!=i?i:o,0,100)}}function s(t,h){return h/Math.max(t[0],t[1])}function w(t,h,i,e=0,o=0,n=t.width-e,a=t.height-o,r=!1){const{data:l}=t,{width:g,height:f,data:u}=h,d=n/g,c=a/f,s=Math.ceil(d/2),w=Math.ceil(c/2),M=t.width;for(let m=0;m<f;m++)for(let t=0;t<g;t++){const h=4*(t+(r?f-m-1:m)*g);let n=0,a=0,p=0,x=0,y=0,b=0;const j=(m+.5)*c;for(let r=Math.floor(m*c);r<(m+1)*c;r++){const h=Math.abs(j-(r+.5))/w,g=(t+.5)*d,f=h*h;for(let u=Math.floor(t*d);u<(t+1)*d;u++){const t=Math.abs(g-(u+.5))/s,h=Math.sqrt(f+t*t);if(h>=1)continue;let d=2*h*h*h-3*h*h+1;const c=4*(e+u+(o+r)*M);b+=d*l[c+3],a+=d,!i&&l[c+3]<255&&(d=d*l[c+3]/255),p+=d*l[c],x+=d*l[c+1],y+=d*l[c+2],n+=d}}u[h]=p/n,u[h+1]=x/n,u[h+2]=y/n,u[h+3]=b/a}return h}function M(t,o,n){if(!o)return t;const{framebufferWidth:a,framebufferHeight:r,pixelRatio:l,region:g}=t,f=b(t,n),u=f.left+f.right,d=f.top+f.bottom,c=a-u,s=r-d,w=Math.min(e,Math.min((h-u)/c,(h-d)/s));return w<i?t:{...t,framebufferWidth:Math.round(c*w)+u,framebufferHeight:Math.round(s*w)+d,pixelRatio:l*w,resample:{region:{x:Math.round((g.x-f.left)*w)+f.left,y:Math.round((g.y-f.top)*w)+f.top,width:Math.round(g.width*w),height:Math.round(g.height*w)},width:a,height:r}}}function m(t,h){if(!t)return h;const i=t.width,e=t.height;if(null!=i&&null!=e)return{width:Math.floor(i),height:Math.floor(e)};if(null==i&&null==e)return h;const o=h.width/h.height;return null==e?{width:Math.floor(i),height:Math.floor(i/o)}:{width:Math.floor(e*o),height:Math.floor(e)}}function p(t,h){const i={x:0,y:0,width:h.width,height:h.height};if(t?.area){null!=t.area.x&&(i.x=Math.floor(t.area.x)),null!=t.area.y&&(i.y=Math.floor(t.area.y));const e=null!=t.area.width?Math.floor(t.area.width):null,o=null!=t.area.height?Math.floor(t.area.height):null;if(i.width=h.width-i.x,i.height=h.height-i.y,null!=e&&null!=o)i.width=Math.min(i.width,e),i.height=Math.min(i.height,o);else if(null==e&&null!=o){const t=Math.min(i.width,e);i.height=t/i.width*i.height,i.width=t}else if(null!=e&&null==o){const t=Math.min(i.height,o);i.width=t/i.height*i.width,i.height=t}}return x(y(i,t),h)}function x(t,h){const i=Math.floor(Math.max(t.x,0)),e=Math.floor(Math.max(t.y,0)),o={x:i,y:e,width:Math.floor(Math.min(t.width,h.width-i)),height:Math.floor(Math.min(t.height,h.height-e))},n=o.width/o.height,a=t.width/t.height;if(a===n)return o;if(a>n){const t=Math.floor(o.width/a),h=o.height-t;return{x:o.x,y:Math.floor(o.y+h/2),width:o.width,height:t}}const r=Math.floor(o.height*a),l=o.width-r;return{x:Math.floor(o.x+l/2),y:o.y,width:r,height:o.height}}function y(t,h){if(null==h?.width||null==h.height)return t;const i=h.width/h.height,e=t.width/t.height;if(e===i)return t;if(e<i){const h=Math.floor(t.height*i);return t.x-=(h-t.width)/2,t.width=h,t}const o=Math.floor(t.width/i);return t.y-=(o-t.height)/2,t.height=o,t}function b(t,h){return!h||t?.ignorePadding?k:h}function j(t){switch(t){case"png":case"jpg":case"jpeg":return t;default:return P}}function D(t){t.save(),t.globalCompositeOperation="copy",t.scale(1,-1),t.translate(0,-t.canvas.height),t.drawImage(t.canvas,0,0),t.restore()}function q(t){const h=t.data,i=h.length;for(let e=0;e<i;e+=4){const t=h[e+3];if(255!==t&&t>0){const i=255/t;h[e]=h[e]*i,h[e+1]=h[e+1]*i,h[e+2]=h[e+2]*i}}}const v={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg"},I=98,P="png",R={png:100,jpg:I,jpeg:I},k={top:0,right:0,bottom:0,left:0};export{o as completeUserSettings,a as encode,r as encodeData,c as getFormatAndQuality,s as getMaximumResolutionScale,w as resampleHermite,M as screenshotSuperSampleSettings,d as toDataUrl,n as toRenderSettings};
@@ -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"../../core/has.js";import t from"../../core/Logger.js";import{disposeMaybe as e}from"../../core/maybe.js";import{BufferObject as r}from"./BufferObject.js";import{webglDebugEnabled as i}from"./checkWebGLError.js";import{ResourceType as s,ColorAttachment0 as n,StencilAttachment as h,SizedDepthStencilFormat as o,DepthStencilAttachment as c,SizedDepthFormat as a,DepthAttachment as u}from"./enums.js";import{Renderbuffer as f}from"./Renderbuffer.js";import{Texture as l}from"./Texture.js";const d=()=>t.getLogger("esri.views.webgl.FramebufferObject");class _{constructor(t,e,r){if(this._context=t,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,t.instanceCounter.increment(s.FramebufferObject,this),null!=e){const r=S(t,e);null!=r&&(this._colorAttachments.set(n,r),m(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(n)}if(null!=r)if(T(r))this._depthStencilTexture=m(r)?r:new l(t,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=p(r)?r:new f(t,r);this._depthStencilBuffer=e,this._validateRenderbufferDescriptor(e.descriptor)}}dispose(){const{_colorAttachments:t,_glName:e}=this;if(0===t.size&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!e)return;const{_context:r}=this,i=r.getBoundFramebufferObject();t.forEach((t,e)=>this.detachColorTexture(e)?.dispose()),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),r.gl.deleteFramebuffer(e),this._glName=null,r.bindFramebuffer(i===this?null:i),r.instanceCounter.decrement(s.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){const t=this._colorAttachments.get(n);return m(t)?t:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(n)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(n)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce((t,[e,r])=>t+r.usedMemory,this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&m(e)?e:null}get colorAttachments(){return[...this._colorAttachments.keys()]}attachColorTexture(t,e=n){if(!t)return;this._validateColorAttachmentPoint(e);const{descriptor:r}=t;this._validateTextureDescriptor(r),this.detachColorTexture(e)?.dispose(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e)),this._colorAttachments.set(e,t)}detachColorTexture(t=n){const e=this._colorAttachments.get(t);if(!e)return;const r=m(e);return this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{if(r)this._framebufferTexture2D(null,t);else{const e=this._context.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)}}),this._colorAttachments.delete(t),r?e:void 0}setColorTextureTarget(t,e=n,r=0){const i=this._colorAttachments.get(e);i&&(35866===t?this._framebufferTextureLayer(i.glName,e,36160,0,r):this._framebufferTexture2D(i.glName,e,t,36160,0))}attachDepthStencil(t){if(t)switch(t.type){case 1:return this._attachDepthStencilTexture(t);case 2:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:r,dataType:i}=e;34041===r||6402===r?34041!==r||34042===i?6402!==r||5125===i||5123===i?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,D(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{this._framebufferTexture2D(null,D(t.descriptor.pixelFormat))}),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const{gl:r}=this._context,i=this._getGLAttachmentPoint(e);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._initialized){const{_context:e}=this,r=e.getBoundFramebufferObject();e.bindFramebuffer(this);const{gl:i}=e,s=this._getGLAttachmentPoint(t.descriptor);i.framebufferRenderbuffer(36160,s,i.RENDERBUFFER,null),e.bindFramebuffer(r)}return this._depthStencilBuffer=null,t}invalidateAttachments(t){const{_context:e}=this;e.temporaryBindFramebufferObject(this,()=>e.gl.invalidateFramebuffer(36160,t),!0)}copyToTexture(t,e,r,i,s,n,h){(t<0||e<0||s<0||n<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const o=h.descriptor;3553!==h.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==o?.width||null==o?.height||t+r>this.width||e+i>this.height||s+r>o.width||n+i>o.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,a=c.bindTexture(h,l.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(l.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,s,n,t,e,r,i),c.bindTexture(a,l.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,r,i,s,n,h){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),h||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,r,i,s,n,h)}async readPixelsAsync(t,e,i,s,n,h,o){const{gl:c}=this._context,a=r.createPixelPack(this._context,35041,o.byteLength);this._context.bindBuffer(a);const u=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this),c.readPixels(t,e,i,s,n,h,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(u),await a.getSubDataAsync(o),a.dispose()}resize(t,e){if(this.width===t&&this.height===e)return;const r={width:t,height:e};E(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(t=>t.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(E(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1)}initializeAndBind(t=36160){const{gl:e}=this._context;if(this._initialized)return void e.bindFramebuffer(t,this.glName);this._glName&&e.deleteFramebuffer(this._glName);const r=e.createFramebuffer();if(e.bindFramebuffer(t,r),this._colorAttachments.forEach((e,r)=>{if(m(e)){const i=F(e);35866===i?this._framebufferTextureLayer(e.glName,r,t,0,0):this._framebufferTexture2D(e.glName,r,i,t)}else if(p(e)){const i=this._context.gl;i.framebufferRenderbuffer(t,r,i.RENDERBUFFER,e.glName)}}),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,r,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=D(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,F(this._depthStencilTexture),t)}if(i()){e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}this._glName=r,this._initialized=!0}_framebufferTexture2D(t,e=n,r=3553,i=36160,s=0){this._context.gl.framebufferTexture2D(i,e,r,t,s)}_framebufferTextureLayer(t,e=n,r=36160,i=0,s=0){this._context.gl.framebufferTextureLayer(r,e,t,i,s)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(36160,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=e(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,D(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=e(this._depthStencilTexture))}_validateTextureDescriptor(t){3553!==t.target&&34067!==t.target&&35866!==t.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),E(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){E(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case a.DEPTH_COMPONENT16:case a.DEPTH_COMPONENT24:case a.DEPTH_COMPONENT32F:return u;case o.DEPTH24_STENCIL8:case o.DEPTH32F_STENCIL8:return c;case 36168:return h;default:return n}}_validateColorAttachmentPoint(e){if(-1===_._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;_._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const r=e-n;r+1>_._MAX_COLOR_ATTACHMENTS&&t.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${r+1}. Implementation supports up to ${_._MAX_COLOR_ATTACHMENTS} color attachments`)}}function m(t){return 1===g(t)}function p(t){return 2===g(t)}function T(t){return m(t)||x(t)}function x(t){return 0===g(t)}function b(t){return 3===g(t)||null!=t&&"samples"in t}function g(t){return null!=t&&"type"in t?t.type:null}function S(t,e){return m(e)||p(e)?e:x(e)?new l(t,e):b(e)?new f(t,e):null}function E(t,e){const r=Math.max(t.width,t.height);if(r>e){d().warnOnce(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const i=e/r;return t.width=Math.round(t.width*i),t.height=Math.round(t.height*i),!1}return!0}function F(t){return 34067===t.descriptor.target?34069:35866===t.descriptor.target?35866:3553}function D(t){return 6402===t?u:c}export{_ as FramebufferObject,E as ensureAttachmentMaxSize};
5
+ import"../../core/has.js";import t from"../../core/Logger.js";import{disposeMaybe as e}from"../../core/maybe.js";import{BufferObject as r}from"./BufferObject.js";import{webglDebugEnabled as i}from"./checkWebGLError.js";import{ResourceType as s,ColorAttachment0 as n,PixelType as h,StencilAttachment as o,SizedDepthStencilFormat as c,DepthStencilAttachment as a,SizedDepthFormat as u,DepthAttachment as f}from"./enums.js";import{Renderbuffer as l}from"./Renderbuffer.js";import{Texture as d}from"./Texture.js";const _=()=>t.getLogger("esri.views.webgl.FramebufferObject");class m{constructor(t,e,r){if(this._context=t,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,t.instanceCounter.increment(s.FramebufferObject,this),null!=e){const r=E(t,e);null!=r&&(this._colorAttachments.set(n,r),p(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(n)}if(null!=r)if(x(r))this._depthStencilTexture=p(r)?r:new d(t,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=T(r)?r:new l(t,r);this._depthStencilBuffer=e,this._validateRenderbufferDescriptor(e.descriptor)}}dispose(){const{_colorAttachments:t,_glName:e}=this;if(0===t.size&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!e)return;const{_context:r}=this,i=r.getBoundFramebufferObject();t.forEach((t,e)=>this.detachColorTexture(e)?.dispose()),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),r.gl.deleteFramebuffer(e),this._glName=null,r.bindFramebuffer(i===this?null:i),r.instanceCounter.decrement(s.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){const t=this._colorAttachments.get(n);return p(t)?t:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(n)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(n)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce((t,[e,r])=>t+r.usedMemory,this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&p(e)?e:null}get colorAttachments(){return[...this._colorAttachments.keys()]}attachColorTexture(t,e=n){if(!t)return;this._validateColorAttachmentPoint(e);const{descriptor:r}=t;this._validateTextureDescriptor(r),this.detachColorTexture(e)?.dispose(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e)),this._colorAttachments.set(e,t)}detachColorTexture(t=n){const e=this._colorAttachments.get(t);if(!e)return;const r=p(e);return this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{if(r)this._framebufferTexture2D(null,t);else{const e=this._context.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)}}),this._colorAttachments.delete(t),r?e:void 0}setColorTextureTarget(t,e=n,r=0){const i=this._colorAttachments.get(e);i&&(35866===t?this._framebufferTextureLayer(i.glName,e,36160,0,r):this._framebufferTexture2D(i.glName,e,t,36160,0))}attachDepthStencil(t){if(t)switch(t.type){case 1:return this._attachDepthStencilTexture(t);case 2:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:r,dataType:i}=e;34041===r||6402===r?34041!==r||i===h.UNSIGNED_INT_24_8?6402!==r||i===h.UNSIGNED_INT||i===h.UNSIGNED_SHORT?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,A(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{this._framebufferTexture2D(null,A(t.descriptor.pixelFormat))}),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const{gl:r}=this._context,i=this._getGLAttachmentPoint(e);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._initialized){const{_context:e}=this,r=e.getBoundFramebufferObject();e.bindFramebuffer(this);const{gl:i}=e,s=this._getGLAttachmentPoint(t.descriptor);i.framebufferRenderbuffer(36160,s,i.RENDERBUFFER,null),e.bindFramebuffer(r)}return this._depthStencilBuffer=null,t}invalidateAttachments(t){const{_context:e}=this;e.temporaryBindFramebufferObject(this,()=>e.gl.invalidateFramebuffer(36160,t),!0)}copyToTexture(t,e,r,i,s,n,h){(t<0||e<0||s<0||n<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const o=h.descriptor;3553!==h.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==o?.width||null==o?.height||t+r>this.width||e+i>this.height||s+r>o.width||n+i>o.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,a=c.bindTexture(h,d.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(d.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,s,n,t,e,r,i),c.bindTexture(a,d.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,r,i,s,n,h){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),h||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,r,i,s,n,h)}async readPixelsAsync(t,e,i,s,n,h,o){const{gl:c}=this._context,a=r.createPixelPack(this._context,35041,o.byteLength);this._context.bindBuffer(a);const u=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this),c.readPixels(t,e,i,s,n,h,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(u),await a.getSubDataAsync(o),a.dispose()}resize(t,e){if(this.width===t&&this.height===e)return;const r={width:t,height:e};D(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(t=>t.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(D(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1)}initializeAndBind(t=36160){const{gl:e}=this._context;if(this._initialized)return void e.bindFramebuffer(t,this.glName);this._glName&&e.deleteFramebuffer(this._glName);const r=e.createFramebuffer();if(e.bindFramebuffer(t,r),this._colorAttachments.forEach((e,r)=>{if(p(e)){const i=F(e);35866===i?this._framebufferTextureLayer(e.glName,r,t,0,0):this._framebufferTexture2D(e.glName,r,i,t)}else if(T(e)){const i=this._context.gl;i.framebufferRenderbuffer(t,r,i.RENDERBUFFER,e.glName)}}),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,r,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=A(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,F(this._depthStencilTexture),t)}if(i()){e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}this._glName=r,this._initialized=!0}_framebufferTexture2D(t,e=n,r=3553,i=36160,s=0){this._context.gl.framebufferTexture2D(i,e,r,t,s)}_framebufferTextureLayer(t,e=n,r=36160,i=0,s=0){this._context.gl.framebufferTextureLayer(r,e,t,i,s)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(36160,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=e(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,A(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=e(this._depthStencilTexture))}_validateTextureDescriptor(t){3553!==t.target&&34067!==t.target&&35866!==t.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),D(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){D(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case u.DEPTH_COMPONENT16:case u.DEPTH_COMPONENT24:case u.DEPTH_COMPONENT32F:return f;case c.DEPTH24_STENCIL8:case c.DEPTH32F_STENCIL8:return a;case 36168:return o;default:return n}}_validateColorAttachmentPoint(e){if(-1===m._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;m._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const r=e-n;r+1>m._MAX_COLOR_ATTACHMENTS&&t.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${r+1}. Implementation supports up to ${m._MAX_COLOR_ATTACHMENTS} color attachments`)}}function p(t){return 1===S(t)}function T(t){return 2===S(t)}function x(t){return p(t)||b(t)}function b(t){return 0===S(t)}function g(t){return 3===S(t)||null!=t&&"samples"in t}function S(t){return null!=t&&"type"in t?t.type:null}function E(t,e){return p(e)||T(e)?e:b(e)?new d(t,e):g(e)?new l(t,e):null}function D(t,e){const r=Math.max(t.width,t.height);if(r>e){_().warnOnce(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const i=e/r;return t.width=Math.round(t.width*i),t.height=Math.round(t.height*i),!1}return!0}function F(t){return 34067===t.descriptor.target?34069:35866===t.descriptor.target?35866:3553}function A(t){return 6402===t?f:a}export{m as FramebufferObject,D as ensureAttachmentMaxSize};
@@ -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{AllocationTracer as t}from"./AllocationTracer.js";import{ResourceType as r}from"./enums.js";const e={RECORD_ALLOCATIONS:!1};class n{constructor(){for(this._current=new Array,this._allocations=e.RECORD_ALLOCATIONS?new t("WebGLObject"):null;this._current.length<r.COUNT;)this._current.push(0)}increment(t,r,e=1){this._current[t]+=e,this._allocations?.add(r)}decrement(t,r,e=1){this._current[t]-=e,this._allocations?.remove(r)}get current(){return this._current}get total(){return this.current.reduce((t,e,n)=>t+(n<r.UNCOUNTED?e:0),0)}get resourceInformation(){let t="";if(this.total>0){t+="Live objects:\n";for(let e=0;e<r.COUNT;++e){const n=this._current[e];n>0&&(t+=`${r[e]}: ${n}\n`)}}return t+=this._allocations?.resetLog(),t}}export{n as InstanceCounter,e as test};
5
+ import{getKey as t}from"../../core/object.js";import{AllocationTracer as r}from"./AllocationTracer.js";import{ResourceType as e}from"./enums.js";const o={RECORD_ALLOCATIONS:!1};class n{constructor(){for(this._current=new Array,this._allocations=o.RECORD_ALLOCATIONS?new r("WebGLObject"):null;this._current.length<e.COUNT;)this._current.push(0)}increment(t,r,e=1){this._current[t]+=e,this._allocations?.add(r)}decrement(t,r,e=1){this._current[t]-=e,this._allocations?.remove(r)}get current(){return this._current}get total(){return this.current.reduce((t,r,o)=>t+(o<e.UNCOUNTED?r:0),0)}get resourceInformation(){let r="";if(this.total>0){r+="Live objects:\n";for(let o=0;o<e.COUNT;++o){const n=this._current[o];n>0&&(r+=`${t(e,o)}: ${n}\n`)}}return r+=this._allocations?.resetLog(),r}}export{n as InstanceCounter,o as test};
@@ -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
- class e{constructor(e,t,r){const a=t.textureFilterAnisotropic;this.versionString=e.getParameter(e.VERSION),this.maxVertexTextureImageUnits=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),this.maxVertexAttributes=e.getParameter(e.MAX_VERTEX_ATTRIBS);const m=r.maxAnisotropy??1/0;this.maxMaxAnisotropy=a?Math.min(e.getParameter(a.MAX_TEXTURE_MAX_ANISOTROPY),m):1,this.maxTextureImageUnits=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),this.maxPreferredTexturePixels=r.maxPreferredTexturePixels??1/0,this.maxRenderbufferSize=e.getParameter(e.MAX_RENDERBUFFER_SIZE),this.maxViewportDims=e.getParameter(e.MAX_VIEWPORT_DIMS),this.maxUniformBufferBindings=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS),this.maxVertexUniformBlocks=e.getParameter(e.MAX_VERTEX_UNIFORM_BLOCKS),this.maxFragmentUniformBlocks=e.getParameter(e.MAX_FRAGMENT_UNIFORM_BLOCKS),this.maxUniformBlockSize=e.getParameter(e.MAX_UNIFORM_BLOCK_SIZE),this.uniformBufferOffsetAlignment=e.getParameter(e.UNIFORM_BUFFER_OFFSET_ALIGNMENT),this.maxArrayTextureLayers=e.getParameter(e.MAX_ARRAY_TEXTURE_LAYERS),this.maxSamples=e.getParameter(e.MAX_SAMPLES),this.maxDrawBuffers=e.getParameter(e.MAX_DRAW_BUFFERS)}}export{e as Parameters};
5
+ class e{constructor(e,t,r){const a=t.textureFilterAnisotropic;this.versionString=e.getParameter(e.VERSION),this.maxVertexTextureImageUnits=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),this.maxVertexAttributes=e.getParameter(e.MAX_VERTEX_ATTRIBS);const m=r.maxAnisotropy;this.maxMaxAnisotropy=a?Math.min(e.getParameter(a.MAX_TEXTURE_MAX_ANISOTROPY),m):1,this.maxTextureImageUnits=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),this.maxPreferredTexturePixels=r.maxPreferredTexturePixels,this.maxRenderbufferSize=e.getParameter(e.MAX_RENDERBUFFER_SIZE),this.maxViewportDims=e.getParameter(e.MAX_VIEWPORT_DIMS),this.maxUniformBufferBindings=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS),this.maxVertexUniformBlocks=e.getParameter(e.MAX_VERTEX_UNIFORM_BLOCKS),this.maxFragmentUniformBlocks=e.getParameter(e.MAX_FRAGMENT_UNIFORM_BLOCKS),this.maxUniformBlockSize=e.getParameter(e.MAX_UNIFORM_BLOCK_SIZE),this.uniformBufferOffsetAlignment=e.getParameter(e.UNIFORM_BUFFER_OFFSET_ALIGNMENT),this.maxArrayTextureLayers=e.getParameter(e.MAX_ARRAY_TEXTURE_LAYERS),this.maxSamples=e.getParameter(e.MAX_SAMPLES),this.maxDrawBuffers=e.getParameter(e.MAX_DRAW_BUFFERS)}}export{e as Parameters};
@@ -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 has from"../../core/has.js";import{webglValidateShadersEnabled as t,webglDebugEnabled as e}from"./checkWebGLError.js";import{ResourceType as o}from"./enums.js";import{transpileShader as i}from"./ShaderTranspiler.js";const n=4294967295,r=!!has("esri-tests-disable-gpu-memory-measurements");class s{constructor(e,s,m,h,f=new Map,_=[]){this._context=e,this._locations=h,this._uniformBlockBindings=f,this._transformFeedbackVaryings=_,this._refCount=1,this._compiled=!1,this._linesOfCode=0,this._nameToUniformLocation=new Map,this._nameToUniform1=new Map,this._nameToUniform1v=new Map,this._nameToUniform2=new Map,this._nameToUniform3=new Map,this._nameToUniform4=new Map,this._nameToUniformMatrix3=new Map,this._nameToUniformMatrix4=new Map,e||console.error("RenderingContext isn't initialized!"),0===s.length&&console.error("Shaders source should not be empty!"),s=i(s,35633),m=i(m,35632),this._vShader=a(this._context,35633,s),this._fShader=a(this._context,35632,m),c.enabled&&(this._linesOfCode=s.match(/\n/g).length+m.match(/\n/g).length+2,this._context.instanceCounter.increment(o.LinesOfCode,this._vShader,this._linesOfCode)),this._vShader&&this._fShader||console.error("Error loading shaders!"),this._context.instanceCounter.increment(o.Shader,this),t()&&(this.vertexShader=s,this.fragmentShader=m),this.usedMemory=r?0:s.length+m.length;const l=this._context.gl,g=l.createProgram();l.attachShader(g,this._vShader),l.attachShader(g,this._fShader),this._locations.forEach((t,e)=>l.bindAttribLocation(g,t,e)),this._transformFeedbackVaryings?.length&&l.transformFeedbackVaryings(g,this._transformFeedbackVaryings,l.SEPARATE_ATTRIBS),l.linkProgram(g),t()&&!l.getProgramParameter(g,l.LINK_STATUS)&&console.error(`Could not link shader\nvalidated: ${l.getProgramParameter(g,l.VALIDATE_STATUS)}, gl error ${l.getError()}, vertex: ${l.getShaderParameter(this._vShader,l.COMPILE_STATUS)}, fragment: ${l.getShaderParameter(this._fShader,l.COMPILE_STATUS)}, info log: ${l.getProgramInfoLog(g)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`);for(const[t,o]of this._uniformBlockBindings){const e=l.getUniformBlockIndex(g,t);e<n&&l.uniformBlockBinding(g,e,o)}this._glName=g,this._context.instanceCounter.increment(o.Program,this)}get glName(){return this._glName}get hasGLName(){return null!=this._glName}get hasTransformFeedbackVaryings(){return!!this._transformFeedbackVaryings?.length}get compiled(){return!!this._compiled||(this._context.capabilities.parallelShaderCompile&&null!=this.glName?(this._compiled=!!this._context.gl.getProgramParameter(this.glName,37297),this._compiled):(this._compiled=!0,!0))}dispose(){if(--this._refCount>0)return;const t=this._context.gl,e=this._context.instanceCounter;this._nameToUniformLocation.forEach(t=>t&&e.decrement(o.Uniform,t)),this._nameToUniformLocation.clear(),this._vShader&&(this._linesOfCode>0&&(e.decrement(o.LinesOfCode,this._vShader,this._linesOfCode),this._linesOfCode=0),t.deleteShader(this._vShader),this._vShader=null,e.decrement(o.Shader,this)),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null),this._glName&&(t.deleteProgram(this._glName),this._glName=null,e.decrement(o.Program,this))}ref(){++this._refCount}_getUniformLocation(t){const e=this._nameToUniformLocation.get(t);if(void 0!==e)return e;if(this.glName){const e=this._context.gl.getUniformLocation(this.glName,t);return this._nameToUniformLocation.set(t,e),e&&this._context.instanceCounter.increment(o.Uniform,e),e}return null}hasUniform(t){return null!=this._getUniformLocation(t)}setUniform1i(t,e,o){_(o,e);const i=this._nameToUniform1.get(t);void 0!==i&&e===i||(this._context.gl.uniform1i(this._getUniformLocation(t),e),this._nameToUniform1.set(t,e))}setUniform1iv(t,e,o){l(o,e),f(this._nameToUniform1v,t,e)&&this._context.gl.uniform1iv(this._getUniformLocation(t),e)}setUniform2iv(t,e,o){l(o,e),f(this._nameToUniform2,t,e)&&this._context.gl.uniform2iv(this._getUniformLocation(t),e)}setUniform3iv(t,e,o){l(o,e),f(this._nameToUniform3,t,e)&&this._context.gl.uniform3iv(this._getUniformLocation(t),e)}setUniform4iv(t,e,o){l(o,e),f(this._nameToUniform4,t,e)&&this._context.gl.uniform4iv(this._getUniformLocation(t),e)}setUniform1f(t,e,o){_(o,e);const i=this._nameToUniform1.get(t);void 0!==i&&e===i||(this._context.gl.uniform1f(this._getUniformLocation(t),e),this._nameToUniform1.set(t,e))}setUniform1fv(t,e,o){l(o,e),f(this._nameToUniform1v,t,e)&&this._context.gl.uniform1fv(this._getUniformLocation(t),e)}setUniform2f(t,e,o,i){_(i,e,o);const n=this._nameToUniform2.get(t);void 0===n?(this._context.gl.uniform2f(this._getUniformLocation(t),e,o),this._nameToUniform2.set(t,[e,o])):e===n[0]&&o===n[1]||(this._context.gl.uniform2f(this._getUniformLocation(t),e,o),n[0]=e,n[1]=o)}setUniform2fv(t,e,o){l(o,e),f(this._nameToUniform2,t,e)&&this._context.gl.uniform2fv(this._getUniformLocation(t),e)}setUniform3f(t,e,o,i,n){_(n,e,o,i);const r=this._nameToUniform3.get(t);void 0===r?(this._context.gl.uniform3f(this._getUniformLocation(t),e,o,i),this._nameToUniform3.set(t,[e,o,i])):e===r[0]&&o===r[1]&&i===r[2]||(this._context.gl.uniform3f(this._getUniformLocation(t),e,o,i),r[0]=e,r[1]=o,r[2]=i)}setUniform3fv(t,e,o){l(o,e);const i=this._getUniformLocation(t);null!=i&&f(this._nameToUniform3,t,e)&&this._context.gl.uniform3fv(i,e)}setUniform4f(t,e,o,i,n,r){_(r,e,o,i,n);const s=this._nameToUniform4.get(t);void 0===s?(this._context.gl.uniform4f(this._getUniformLocation(t),e,o,i,n),this._nameToUniform4.set(t,[e,o,i,n])):void 0!==s&&e===s[0]&&o===s[1]&&i===s[2]&&n===s[3]||(this._context.gl.uniform4f(this._getUniformLocation(t),e,o,i,n),s[0]=e,s[1]=o,s[2]=i,s[3]=n)}setUniform4fv(t,e,o){l(o,e);const i=this._getUniformLocation(t);null!=i&&f(this._nameToUniform4,t,e)&&this._context.gl.uniform4fv(i,e)}setUniformMatrix3fv(t,e,o=!1,i){l(i,e);const n=this._getUniformLocation(t);null!=n&&f(this._nameToUniformMatrix3,t,e)&&this._context.gl.uniformMatrix3fv(n,o,e)}setUniformMatrix4fv(t,e,o=!1,i){l(i,e);const n=this._getUniformLocation(t);null!=n&&f(this._nameToUniformMatrix4,t,e)&&this._context.gl.uniformMatrix4fv(n,o,e)}stop(){}}function a(e,o,i){const n=e.gl,r=n.createShader(o);return n.shaderSource(r,i),n.compileShader(r),t()&&!n.getShaderParameter(r,n.COMPILE_STATUS)&&(console.error("Compile error in ".concat(35633===o?"vertex":"fragment"," shader")),console.error(n.getShaderInfoLog(r)),console.error(m(i))),r}function m(t){let e=2;return t.replaceAll("\n",()=>"\n"+h(e++)+":")}function h(t){return t>=1e3?t.toString():(" "+t).slice(-3)}function f(t,e,o){const i=t.get(e);if(!i)return t.set(e,Array.from(o)),!0;const n=o.length;if(i.length!==n)return t.set(e,Array.from(o)),!0;for(let r=0;r<n;++r){const t=o[r];if(i[r]!==t){for(i[r]=t;r<n;++r)i[r]=o[r];return!0}}return!1}const c={enabled:!1},_=e()?(t,...e)=>l(t,e):()=>{},l=e()?(t,e)=>{if(t?.supportsNaN)return;const o=e.length;for(let i=0;i<o;++i){const t=e[i];Number.isNaN(t)&&console.error(`Got ${t} as uniform value from ${(new Error).stack}`)}}:()=>{};export{s as Program,c as test};
5
+ import has from"../../core/has.js";import{webglValidateShadersEnabled as t,webglDebugEnabled as e}from"./checkWebGLError.js";import{ResourceType as o}from"./enums.js";import{transpileShader as i}from"./ShaderTranspiler.js";const n=4294967295,r=!!has("esri-tests-disable-gpu-memory-measurements");class s{constructor(e,s,m,h,f=new Map,_=[]){this._context=e,this._refCount=1,this._compiled=!1,this._linesOfCode=0,this._nameToUniformLocation=new Map,this._nameToUniform1=new Map,this._nameToUniform1v=new Map,this._nameToUniform2=new Map,this._nameToUniform3=new Map,this._nameToUniform4=new Map,this._nameToUniformMatrix3=new Map,this._nameToUniformMatrix4=new Map,e||console.error("RenderingContext isn't initialized!"),0===s.length&&console.error("Shaders source should not be empty!"),s=i(s,35633),m=i(m,35632),this._vShader=a(this._context,35633,s),this._fShader=a(this._context,35632,m),c.enabled&&(this._linesOfCode=s.match(/\n/g).length+m.match(/\n/g).length+2,e.instanceCounter.increment(o.LinesOfCode,this._vShader,this._linesOfCode)),this._vShader&&this._fShader||console.error("Error loading shaders!"),e.instanceCounter.increment(o.Shader,this),t()&&(this.vertexShader=s,this.fragmentShader=m),this.usedMemory=r?0:s.length+m.length;const l=this._context.gl,g=l.createProgram();l.attachShader(g,this._vShader),l.attachShader(g,this._fShader),h.forEach((t,e)=>l.bindAttribLocation(g,t,e)),this.hasTransformFeedbackVaryings=!!_?.length,this.hasTransformFeedbackVaryings&&l.transformFeedbackVaryings(g,_,l.SEPARATE_ATTRIBS),l.linkProgram(g),t()&&!l.getProgramParameter(g,l.LINK_STATUS)&&console.error(`Could not link shader\nvalidated: ${l.getProgramParameter(g,l.VALIDATE_STATUS)}, gl error ${l.getError()}, vertex: ${l.getShaderParameter(this._vShader,l.COMPILE_STATUS)}, fragment: ${l.getShaderParameter(this._fShader,l.COMPILE_STATUS)}, info log: ${l.getProgramInfoLog(g)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`);for(const[t,o]of f){const e=l.getUniformBlockIndex(g,t);e<n&&l.uniformBlockBinding(g,e,o)}this._glName=g,e.instanceCounter.increment(o.Program,this)}get glName(){return this._glName}get hasGLName(){return null!=this._glName}get compiled(){return!!this._compiled||(this._context.capabilities.parallelShaderCompile&&null!=this.glName?(this._compiled=!!this._context.gl.getProgramParameter(this.glName,37297),this._compiled):(this._compiled=!0,!0))}dispose(){if(--this._refCount>0)return;const t=this._context.gl,e=this._context.instanceCounter;this._nameToUniformLocation.forEach(t=>t&&e.decrement(o.Uniform,t)),this._nameToUniformLocation.clear(),this._vShader&&(this._linesOfCode>0&&(e.decrement(o.LinesOfCode,this._vShader,this._linesOfCode),this._linesOfCode=0),t.deleteShader(this._vShader),this._vShader=null,e.decrement(o.Shader,this)),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null),this._glName&&(t.deleteProgram(this._glName),this._glName=null,e.decrement(o.Program,this))}ref(){++this._refCount}_getUniformLocation(t){const e=this._nameToUniformLocation.get(t);if(void 0!==e)return e;if(this.glName){const e=this._context.gl.getUniformLocation(this.glName,t);return this._nameToUniformLocation.set(t,e),e&&this._context.instanceCounter.increment(o.Uniform,e),e}return null}hasUniform(t){return null!=this._getUniformLocation(t)}setUniform1i(t,e,o){_(o,e);const i=this._nameToUniform1.get(t);void 0!==i&&e===i||(this._context.gl.uniform1i(this._getUniformLocation(t),e),this._nameToUniform1.set(t,e))}setUniform1iv(t,e,o){l(o,e),f(this._nameToUniform1v,t,e)&&this._context.gl.uniform1iv(this._getUniformLocation(t),e)}setUniform2iv(t,e,o){l(o,e),f(this._nameToUniform2,t,e)&&this._context.gl.uniform2iv(this._getUniformLocation(t),e)}setUniform3iv(t,e,o){l(o,e),f(this._nameToUniform3,t,e)&&this._context.gl.uniform3iv(this._getUniformLocation(t),e)}setUniform4iv(t,e,o){l(o,e),f(this._nameToUniform4,t,e)&&this._context.gl.uniform4iv(this._getUniformLocation(t),e)}setUniform1f(t,e,o){_(o,e);const i=this._nameToUniform1.get(t);void 0!==i&&e===i||(this._context.gl.uniform1f(this._getUniformLocation(t),e),this._nameToUniform1.set(t,e))}setUniform1fv(t,e,o){l(o,e),f(this._nameToUniform1v,t,e)&&this._context.gl.uniform1fv(this._getUniformLocation(t),e)}setUniform2f(t,e,o,i){_(i,e,o);const n=this._nameToUniform2.get(t);void 0===n?(this._context.gl.uniform2f(this._getUniformLocation(t),e,o),this._nameToUniform2.set(t,[e,o])):e===n[0]&&o===n[1]||(this._context.gl.uniform2f(this._getUniformLocation(t),e,o),n[0]=e,n[1]=o)}setUniform2fv(t,e,o){l(o,e),f(this._nameToUniform2,t,e)&&this._context.gl.uniform2fv(this._getUniformLocation(t),e)}setUniform3f(t,e,o,i,n){_(n,e,o,i);const r=this._nameToUniform3.get(t);void 0===r?(this._context.gl.uniform3f(this._getUniformLocation(t),e,o,i),this._nameToUniform3.set(t,[e,o,i])):e===r[0]&&o===r[1]&&i===r[2]||(this._context.gl.uniform3f(this._getUniformLocation(t),e,o,i),r[0]=e,r[1]=o,r[2]=i)}setUniform3fv(t,e,o){l(o,e);const i=this._getUniformLocation(t);null!=i&&f(this._nameToUniform3,t,e)&&this._context.gl.uniform3fv(i,e)}setUniform4f(t,e,o,i,n,r){_(r,e,o,i,n);const s=this._nameToUniform4.get(t);void 0===s?(this._context.gl.uniform4f(this._getUniformLocation(t),e,o,i,n),this._nameToUniform4.set(t,[e,o,i,n])):void 0!==s&&e===s[0]&&o===s[1]&&i===s[2]&&n===s[3]||(this._context.gl.uniform4f(this._getUniformLocation(t),e,o,i,n),s[0]=e,s[1]=o,s[2]=i,s[3]=n)}setUniform4fv(t,e,o){l(o,e);const i=this._getUniformLocation(t);null!=i&&f(this._nameToUniform4,t,e)&&this._context.gl.uniform4fv(i,e)}setUniformMatrix3fv(t,e,o=!1,i){l(i,e);const n=this._getUniformLocation(t);null!=n&&f(this._nameToUniformMatrix3,t,e)&&this._context.gl.uniformMatrix3fv(n,o,e)}setUniformMatrix4fv(t,e,o=!1,i){l(i,e);const n=this._getUniformLocation(t);null!=n&&f(this._nameToUniformMatrix4,t,e)&&this._context.gl.uniformMatrix4fv(n,o,e)}stop(){}}function a(e,o,i){const n=e.gl,r=n.createShader(o);return n.shaderSource(r,i),n.compileShader(r),t()&&!n.getShaderParameter(r,n.COMPILE_STATUS)&&(console.error("Compile error in ".concat(35633===o?"vertex":"fragment"," shader")),console.error(n.getShaderInfoLog(r)),console.error(m(i))),r}function m(t){let e=2;return t.replaceAll("\n",()=>"\n"+h(e++)+":")}function h(t){return t>=1e3?t.toString():(" "+t).slice(-3)}function f(t,e,o){const i=t.get(e);if(!i)return t.set(e,Array.from(o)),!0;const n=o.length;if(i.length!==n)return t.set(e,Array.from(o)),!0;for(let r=0;r<n;++r){const t=o[r];if(i[r]!==t){for(i[r]=t;r<n;++r)i[r]=o[r];return!0}}return!1}const c={enabled:!1},_=e()?(t,...e)=>l(t,e):()=>{},l=e()?(t,e)=>{if(t?.supportsNaN)return;const o=e.length;for(let i=0;i<o;++i){const t=e[i];Number.isNaN(t)&&console.error(`Got ${t} as uniform value from ${(new Error).stack}`)}}:()=>{};export{s as Program,c as test};
@@ -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"../../core/has.js";import{NestedMap as t}from"../../core/NestedMap.js";import{Program as r}from"./Program.js";class s{constructor(r){this._rctx=r,this._store=new t}dispose(){this._store.forAll(t=>t.dispose()),this._store.clear()}acquire(t,s,e,o){const i=this._store.get(t,s);if(null!=i)return i.ref(),i;const c=new r(this._rctx,t,s,e,o);return c.ref(),this._store.set(t,s,c),c}get test(){}}export{s as ProgramCache};
5
+ import"../../core/has.js";import{Program as r}from"./Program.js";class t{constructor(r){this._rctx=r,this._store=new Map}dispose(){this._store.forEach(r=>r.dispose()),this._store.clear()}acquire(t,s,e,o){const i=t+s+JSON.stringify(Array.from(e.entries())),c=this._store.get(i);if(null!=c)return c.ref(),c;const n=new r(this._rctx,t,s,e,o);return n.ref(),this._store.set(i,n),n}get test(){}}export{t as ProgramCache};
@@ -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{Program as r}from"./Program.js";function e(e,t,a=""){return new r(e,a+t.shaders.vertexShader,a+t.shaders.fragmentShader,t.attributes)}export{e as createProgram};
5
+ import{Program as r}from"./Program.js";function e(e,t,n,o=""){return new r(e,o+t.vertexShader,o+t.fragmentShader,n)}export{e as createProgram};
@@ -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 has from"../../core/has.js";import{disposeMaybe as t}from"../../core/maybe.js";import{after as e}from"../../core/promiseUtils.js";import{Milliseconds as s}from"../../core/time.js";import{webglDebugEnabled as i,checkWebGLError as a,getErrorMessage as r}from"./checkWebGLError.js";import{ContextState as n}from"./ContextState.js";import{ColorAttachment0 as l,baseTextureUnit as h,ResourceType as f,PrimitiveType as o}from"./enums.js";import{InstanceCounter as u}from"./InstanceCounter.js";import{Parameters as c}from"./Parameters.js";import{ProgramCache as d}from"./ProgramCache.js";import{StateTracker as _}from"./renderState.js";import{Texture as b}from"./Texture.js";import{WebGLDriverTest as g}from"./WebGLDriverTest.js";import{Capabilities as p}from"./capabilities/Capabilities.js";let m=class{constructor(t,e){this.gl=t,this.instanceCounter=new u,this._programCache=new d(this),this._transformFeedbackRequestInfo=null,this._state=new n,this._numOfDrawCalls=0,this._numOfTriangles=0,this.configure(e)}configure(e){this._capabilities=new p(this.gl,e),this._parameters=new c(this.gl,this._capabilities,e),b.TEXTURE_UNIT_FOR_UPDATES=this._parameters.maxTextureImageUnits-1;const s=this.gl.getParameter(this.gl.VIEWPORT);this._state=new n,this._state.viewport={x:s[0],y:s[1],width:s[2],height:s[3]},this._stateTracker=new _({setBlending:t=>{if(t){this.setBlendingEnabled(!0),this.setBlendEquationSeparate(t.opRgb,t.opAlpha),this.setBlendFunctionSeparate(t.srcRgb,t.dstRgb,t.srcAlpha,t.dstAlpha);const e=t.color;this.setBlendColor(e.r,e.g,e.b,e.a)}else this.setBlendingEnabled(!1)},setCulling:t=>{t?(this.setFaceCullingEnabled(!0),this.setCullFace(t.face),this.setFrontFace(t.mode)):this.setFaceCullingEnabled(!1)},setPolygonOffset:t=>{t?(this.setPolygonOffsetFillEnabled(!0),this.setPolygonOffset(t.factor,t.units)):this.setPolygonOffsetFillEnabled(!1)},setDepthTest:t=>{t?(this.setDepthTestEnabled(!0),this.setDepthFunction(t.func)):this.setDepthTestEnabled(!1)},setStencilTest:t=>{if(t){this.setStencilTestEnabled(!0);const e=t.function;this.setStencilFunction(e.func,e.ref,e.mask);const s=t.operation;this.setStencilOp(s.fail,s.zFail,s.zPass)}else this.setStencilTestEnabled(!1)},setDepthWrite:t=>{t?(this.setDepthWriteEnabled(!0),this.setDepthRange(t.zNear,t.zFar)):this.setDepthWriteEnabled(!1)},setColorWrite:t=>{t?this.setColorMask(t.r,t.g,t.b,t.a):this.setColorMask(!1,!1,!1,!1)},setStencilWrite:t=>{t?this.setStencilWriteMask(t.mask):this.setStencilWriteMask(0)},setDrawBuffers:t=>{if(t)this.setDrawBuffers(t.buffers);else{const{drawFramebuffer:t}=this._state;null===t?this.setDrawBuffers([1029]):0===t.colorAttachments.length?this.setDrawBuffers([0]):this.setDrawBuffers([l])}}}),this.enforceState(),t(this._driverTest),this._driverTest=new g(this)}updateOptions(t){this._parameters=new c(this.gl,this._capabilities,t)}dispose(){this._driverTest=t(this._driverTest),this._programCache=t(this._programCache),this.bindVAO(null),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663),this._state.textureUnitMap.length=0,this._state=null,this._capabilities=null,this._stateTracker=null,i()&&console.log(this.instanceCounter.resourceInformation)}get driverTest(){return this._driverTest}get contextAttributes(){return this.gl.getContextAttributes()}get parameters(){return this._parameters}get programCache(){return this._programCache}setPipelineState(t){this._stateTracker.setPipeline(t)}setBlendingEnabled(t){this._state.blend!==t&&(!0===t?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._state.blend=t,this._stateTracker.invalidateBlending())}externalProgramUpdate(){this._state.program?.stop(),this._state.program=null}externalTextureUnitUpdate(t,e){for(let s=0;s<t.length;++s)this._state.textureUnitMap[t[s]]=null;e>=0&&(this._state.activeTexture=e)}externalVertexArrayObjectUpdate(){this.gl.bindVertexArray(null),this._state.vertexArrayObject=null,this._state.vertexBuffer=null,this._state.indexBuffer=null}externalVertexBufferUpdate(){this._state.vertexBuffer=null}externalIndexBufferUpdate(){this._state.indexBuffer=null}setBlendColor(t,e,s,i){t===this._state.blendColor.r&&e===this._state.blendColor.g&&s===this._state.blendColor.b&&i===this._state.blendColor.a||(this.gl.blendColor(t,e,s,i),this._state.blendColor.r=t,this._state.blendColor.g=e,this._state.blendColor.b=s,this._state.blendColor.a=i,this._stateTracker.invalidateBlending())}setBlendFunction(t,e){t===this._state.blendFunction.srcRGB&&e===this._state.blendFunction.dstRGB||(this.gl.blendFunc(t,e),this._state.blendFunction.srcRGB=t,this._state.blendFunction.srcAlpha=t,this._state.blendFunction.dstRGB=e,this._state.blendFunction.dstAlpha=e,this._stateTracker.invalidateBlending())}setBlendFunctionSeparate(t,e,s,i){this._state.blendFunction.srcRGB===t&&this._state.blendFunction.srcAlpha===s&&this._state.blendFunction.dstRGB===e&&this._state.blendFunction.dstAlpha===i||(this.gl.blendFuncSeparate(t,e,s,i),this._state.blendFunction.srcRGB=t,this._state.blendFunction.srcAlpha=s,this._state.blendFunction.dstRGB=e,this._state.blendFunction.dstAlpha=i,this._stateTracker.invalidateBlending())}setBlendEquation(t){this._state.blendEquation.mode!==t&&(this.gl.blendEquation(t),this._state.blendEquation.mode=t,this._state.blendEquation.modeAlpha=t,this._stateTracker.invalidateBlending())}setBlendEquationSeparate(t,e){this._state.blendEquation.mode===t&&this._state.blendEquation.modeAlpha===e||(this.gl.blendEquationSeparate(t,e),this._state.blendEquation.mode=t,this._state.blendEquation.modeAlpha=e,this._stateTracker.invalidateBlending())}setColorMask(t,e,s,i){this._state.colorMask.r===t&&this._state.colorMask.g===e&&this._state.colorMask.b===s&&this._state.colorMask.a===i||(this.gl.colorMask(t,e,s,i),this._state.colorMask.r=t,this._state.colorMask.g=e,this._state.colorMask.b=s,this._state.colorMask.a=i,this._stateTracker.invalidateColorWrite())}setClearColor(t,e,s,i){this._state.clearColor.r===t&&this._state.clearColor.g===e&&this._state.clearColor.b===s&&this._state.clearColor.a===i||(this.gl.clearColor(t,e,s,i),this._state.clearColor.r=t,this._state.clearColor.g=e,this._state.clearColor.b=s,this._state.clearColor.a=i)}setFaceCullingEnabled(t){this._state.faceCulling!==t&&(!0===t?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._state.faceCulling=t,this._stateTracker.invalidateCulling())}setPolygonOffsetFillEnabled(t){this._state.polygonOffsetFill!==t&&(!0===t?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._state.polygonOffsetFill=t,this._stateTracker.invalidatePolygonOffset())}setPolygonOffset(t,e){this._state.polygonOffset[0]===t&&this._state.polygonOffset[1]===e||(this._state.polygonOffset[0]=t,this._state.polygonOffset[1]=e,this.gl.polygonOffset(t,e),this._stateTracker.invalidatePolygonOffset())}setCullFace(t){this._state.cullFace!==t&&(this.gl.cullFace(t),this._state.cullFace=t,this._stateTracker.invalidateCulling())}setFrontFace(t){this._state.frontFace!==t&&(this.gl.frontFace(t),this._state.frontFace=t,this._stateTracker.invalidateCulling())}setScissorTestEnabled(t){this._state.scissorTest!==t&&(!0===t?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._state.scissorTest=t)}setScissorRect(t,e,s,i){this._state.scissorRect.x===t&&this._state.scissorRect.y===e&&this._state.scissorRect.width===s&&this._state.scissorRect.height===i||(this.gl.scissor(t,e,s,i),this._state.scissorRect.x=t,this._state.scissorRect.y=e,this._state.scissorRect.width=s,this._state.scissorRect.height=i)}setDepthTestEnabled(t){this._state.depthTest!==t&&(!0===t?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._state.depthTest=t,this._stateTracker.invalidateDepthTest())}setClearDepth(t){this._state.clearDepth!==t&&(this.gl.clearDepth(t),this._state.clearDepth=t)}setDepthFunction(t){this._state.depthFunction!==t&&(this.gl.depthFunc(t),this._state.depthFunction=t,this._stateTracker.invalidateDepthTest())}setDepthWriteEnabled(t){this._state.depthWrite!==t&&(this.gl.depthMask(t),this._state.depthWrite=t,this._stateTracker.invalidateDepthWrite())}setDepthRange(t,e){this._state.depthRange.zNear===t&&this._state.depthRange.zFar===e||(this.gl.depthRange(t,e),this._state.depthRange.zNear=t,this._state.depthRange.zFar=e,this._stateTracker.invalidateDepthWrite())}setStencilTestEnabled(t){this._state.stencilTest!==t&&(!0===t?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._state.stencilTest=t,this._stateTracker.invalidateStencilTest())}setClearStencil(t){t!==this._state.clearStencil&&(this.gl.clearStencil(t),this._state.clearStencil=t)}setStencilFunction(t,e,s){this._state.stencilFunction.func===t&&this._state.stencilFunction.ref===e&&this._state.stencilFunction.mask===s||(this.gl.stencilFunc(t,e,s),this._state.stencilFunction.face=1032,this._state.stencilFunction.func=t,this._state.stencilFunction.ref=e,this._state.stencilFunction.mask=s,this._stateTracker.invalidateStencilTest())}setStencilFunctionSeparate(t,e,s,i){this._state.stencilFunction.face===t&&this._state.stencilFunction.func===e&&this._state.stencilFunction.ref===s&&this._state.stencilFunction.mask===i||(this.gl.stencilFuncSeparate(t,e,s,i),this._state.stencilFunction.face=t,this._state.stencilFunction.func=e,this._state.stencilFunction.ref=s,this._state.stencilFunction.mask=i,this._stateTracker.invalidateStencilTest())}setStencilWriteMask(t){this._state.stencilWriteMask!==t&&(this.gl.stencilMask(t),this._state.stencilWriteMask=t,this._stateTracker.invalidateStencilWrite())}setStencilOp(t,e,s){1032===this._state.stencilOperation.face&&this._state.stencilOperation.fail===t&&this._state.stencilOperation.zFail===e&&this._state.stencilOperation.zPass===s||(this.gl.stencilOp(t,e,s),this._state.stencilOperation.face=1032,this._state.stencilOperation.fail=t,this._state.stencilOperation.zFail=e,this._state.stencilOperation.zPass=s,this._stateTracker.invalidateStencilTest())}setStencilOpSeparate(t,e,s,i){this._state.stencilOperation.face===t&&this._state.stencilOperation.fail===e&&this._state.stencilOperation.zFail===s&&this._state.stencilOperation.zPass===i||(this.gl.stencilOpSeparate(t,e,s,i),this._state.stencilOperation.face=t,this._state.stencilOperation.fail=e,this._state.stencilOperation.zFail=s,this._state.stencilOperation.zPass=i,this._stateTracker.invalidateStencilTest())}setActiveTexture(t,e=!1){const s=this._state.activeTexture;return t>=0&&(e||t!==this._state.activeTexture)&&(this.gl.activeTexture(h+t),this._state.activeTexture=t),s}setDrawBuffers(t){const{drawFramebuffer:e}=this._state,s=null===e,i=s?this._state.drawBuffers.defaultFramebuffer:this._state.drawBuffers.fbos.get(e);if(i?.length!==t.length||!i.every((e,s)=>e===t[s]))if(t.length>this.parameters.maxDrawBuffers)console.error("Setting more active draw buffers than GL.MAX_DRAW_BUFFERS allows.");else{if(s){if(t.length>1)return void console.error("The default framebuffer can only have one active draw buffer.");if(1029!==t[0]&&0!==t[0])return void console.error("The default framebuffer can only use the constants GL.BACK or GL.NONE as draw buffers.")}s||!t.includes(1029)?(this.gl.drawBuffers(t),s?this._state.drawBuffers.defaultFramebuffer=t:this._state.drawBuffers.fbos.set(e,t),this._stateTracker.invalidateDrawBuffers()):console.error("A framebuffer object can only use the constants GL.COLOR_ATTACHMENTi or GL.NONE as draw buffers.")}}clear(t,e=255){if(t){if(16384&t){const t=this._state.drawFramebuffer?.colorAttachments;t&&this.setDrawBuffers(t),this.setColorMask(!0,!0,!0,!0)}256&t&&this.setDepthWriteEnabled(!0),1024&t&&this.setStencilWriteMask(e),this.gl.clear(t)}}clearFramebuffer(t,e=!1,s=!1){let i=0;if(t){const e=1e-13,s=Math.max(e,t[3]);this.setClearColor(t[0],t[1],t[2],s),i|=16384}e&&(i|=256),!1===s?s=0:(!0===s&&(s=255),i|=1024),i&&this.clear(i,s)}clearBuffer(t,e,s=6144,i=void 0){this.gl.clearBufferfv(s,t,e,i)}clearBufferInteger(t,e,s=6144,i=void 0){this.gl.clearBufferiv(s,t,e,i)}clearBufferUnsignedInteger(t,e,s=6144,i=void 0){this.gl.clearBufferuiv(s,t,e,i)}drawArrays(t,e,s){if(this._transformFeedbackRequestInfo){if(t!==this._transformFeedbackRequestInfo.primitiveType)throw new Error("DrawArrays called during transform feedback, but primitiveType does not match that of the current transform feedback request");if(null==this._state.program?.hasTransformFeedbackVaryings)throw new Error("DrawArrays called during transform feedback, but the shader program was not linked with a transform feedback varying")}if(i()&&(this._numOfDrawCalls++,this._numOfTriangles+=F(t,s),has("enable-feature:webgl-debug:textureReadWrite"))){const t=this._state.textureUnitMap;for(let e=0;e<t.length;e++){const s=t[e];if(null!=s&&s===this._state.drawFramebuffer?.colorTexture)throw new Error(`Detected readWrite. Texture already bound at index ${e}`)}}this.gl.drawArrays(t,e,s),a(this.gl)}drawArraysInstanced(t,e,s,i){this.gl.drawArraysInstanced(t,e,s,i),a(this.gl)}drawElements(t,e,s,a){if(this._transformFeedbackRequestInfo)throw new Error("Cannot called drawElements during a transform feedback request");if(i()&&(this._numOfDrawCalls++,this._numOfTriangles+=F(t,e)),this.gl.drawElements(t,e,s,a),i()){const i=r(this.gl);if(i){const r=this.getBoundVAO(),n=r?.indexBuffer,l=r?.vertexBuffers,h={indexBuffer:n,vertexBuffers:l},f={mode:t,count:e,type:s,offset:a},o=n?.size??0,u=a+e,c=o<u?`. Buffer is too small. Attempted to draw index ${u} of ${o}`:"";console.error(`drawElements: ${i}${c}`,{args:f,vao:h})}}}drawElementsInstanced(t,e,s,i,r){this.gl.drawElementsInstanced(t,e,s,i,r),a(this.gl)}logInfo(){i()&&console.log(`DrawCalls: ${this._numOfDrawCalls}, Triangles: ${this._numOfTriangles}`)}resetInfo(){i()&&(this._numOfDrawCalls=0,this._numOfTriangles=0)}get capabilities(){return this._capabilities}setViewport(t,e,s,i){s=Math.max(Math.round(s),1),i=Math.max(Math.round(i),1);const a=this._state.viewport;a.x===t&&a.y===e&&a.width===s&&a.height===i||(a.x=t,a.y=e,a.width=s,a.height=i,this.gl.viewport(t,e,s,i))}setViewport4fv(t){this.setViewport(t[0],t[1],t[2],t[3])}restoreViewport({x:t,y:e,width:s,height:i}){this.setViewport(t,e,s,i)}getViewport(){const t=this._state.viewport;return{x:t.x,y:t.y,width:t.width,height:t.height}}useProgram(t){this._state.program!==t&&(this._state.program?.stop(),this._state.program=t,this.gl.useProgram(t?.glName??null))}bindTexture(t,e,s=!1){(e>=this.parameters.maxTextureImageUnits||e<0)&&console.error("Input texture unit is out of range of available units!");const i=this._state.textureUnitMap[e];return null==t?.glName?(null!=i&&(this.setActiveTexture(e,s),this.gl.bindTexture(i.descriptor.target,null)),this._state.textureUnitMap[e]=null,i):s||i!==t?(this.setActiveTexture(e,s),this.gl.bindTexture(t.descriptor.target,t.glName),t.applyChanges(),this._state.textureUnitMap[e]=t,i):(t.isDirty&&(this.setActiveTexture(e,s),t.applyChanges()),i)}unbindTexture(t){if(null!=t)for(let e=0;e<this.parameters.maxTextureImageUnits;e++)this._state.textureUnitMap[e]===t&&(this.bindTexture(null,e),this._state.textureUnitMap[e]=null)}bindFramebuffer(t,e=!1){if(e||this._state.readFramebuffer!==t||this._state.drawFramebuffer!==t){if(this._stateTracker.invalidateDrawBuffers(),null==t)return this.gl.bindFramebuffer(36160,null),void(this._state.readFramebuffer=this._state.drawFramebuffer=null);t.initializeAndBind(36160),this._state.readFramebuffer=t,this._state.drawFramebuffer=t}}bindFramebufferSeparate(t,e,s=!1){const i=36008===e,a=i?this._state.readFramebuffer:this._state.drawFramebuffer;(s||a!==t)&&(null==t?this.gl.bindFramebuffer(e,null):t.initializeAndBind(e),i?this._state.readFramebuffer=t??null:(this._stateTracker.invalidateDrawBuffers(),this._state.drawFramebuffer=t??null))}blitFramebuffer(t,e,s=16384,i=9728,a=0,r=0,n=t.width,l=t.height,h=0,f=0,o=e.width,u=e.height){this.bindFramebufferSeparate(t,36008,!0),this.bindFramebufferSeparate(e,36009,!0),this.gl.blitFramebuffer(a,r,n,l,h,f,o,u,s,i)}bindBuffer(t,e){if(t)switch(e??=t.bufferType,e){case 34962:this._state.vertexBuffer=B(this.gl,t,e,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=B(this.gl,t,e,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=B(this.gl,t,e,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=B(this.gl,t,e,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=B(this.gl,t,e,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=B(this.gl,t,e,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=B(this.gl,t,e,this._state.copyWriteBuffer);break;case 35982:this._state.transformFeedbackBuffer=B(this.gl,t,e,this._state.transformFeedbackBuffer)}}bindRenderbuffer(t){const e=this.gl;t||(e.bindRenderbuffer(e.RENDERBUFFER,null),this._state.renderbuffer=null),this._state.renderbuffer!==t&&(e.bindRenderbuffer(e.RENDERBUFFER,t.glName),this._state.renderbuffer=t)}_getBufferBinding(t,e){if(e>=this.parameters.maxUniformBufferBindings||e<0)return console.error("Uniform buffer binding point is out of range!"),null;const s=35345===t?this._state.uniformBufferBindingPoints:this._state.transformBufferBindingPoints;let i=s[e];return null==i&&(i={buffer:null,offset:0,size:0},s[e]=i),i}bindBufferBase(t,e,s){const i=this._getBufferBinding(t,e);null!=i&&(i.buffer===s&&0===i.offset&&0===i.size||(this.gl.bindBufferBase(t,e,s?s.glName:null),i.buffer=s,i.offset=0,i.size=0))}bindBufferRange(t,e,s,i,a){const r=this._getBufferBinding(t,e);null!=r&&(r.buffer===s&&r.offset===i&&r.size===a||(i%this._parameters.uniformBufferOffsetAlignment===0?(this.gl.bindBufferRange(t,e,s.glName,i,a),r.buffer=s,r.offset=i,r.size=a):console.error("Uniform buffer binding offset is not a multiple of the context offset alignment")))}bindUBO(t,e,s,a){null!=e?(i()&&(a??e.byteLength)>this._parameters.maxUniformBlockSize&&console.error("Attempting to bind more data than the maximum uniform block size"),e.initialize(),void 0!==s&&void 0!==a?this.bindBufferRange(35345,t,e.buffer,s,a):this.bindBufferBase(35345,t,e.buffer)):this.bindBufferBase(35345,t,null)}unbindUBO(t){for(let e=0,s=this._state.uniformBufferBindingPoints.length;e<s;e++){const s=this._state.uniformBufferBindingPoints[e];null!=s&&s.buffer===t.buffer&&this.bindBufferBase(35345,e,null)}}unbindBuffer(t){switch(t){case 34962:this._state.vertexBuffer=B(this.gl,null,t,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=B(this.gl,null,t,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=B(this.gl,null,t,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=B(this.gl,null,t,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=B(this.gl,null,t,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=B(this.gl,null,t,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=B(this.gl,null,t,this._state.copyWriteBuffer)}}bindVAO(t=null){null!=t?this._state.vertexArrayObject!==t&&(t.bind(),this._state.vertexArrayObject=t):this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null)}bindTransformFeedback(t){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,t.glName)}beginTransformFeedback(t,e){if(this._transformFeedbackRequestInfo)throw new Error("Already in a transform feedback request");const{gl:s}=this;s.bindTransformFeedback(s.TRANSFORM_FEEDBACK,t.glName),s.beginTransformFeedback(e),this._transformFeedbackRequestInfo={primitiveType:e}}endTransformFeedback(){if(!this._transformFeedbackRequestInfo)throw new Error("Not in a transform feedback request");const{gl:t}=this;t.endTransformFeedback(),t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null),this._transformFeedbackRequestInfo=null}async clientWaitAsync(t=s(10)){const{gl:i}=this,a=i.fenceSync(37143,0);if(!a)throw new Error("Client wait failed, could not create sync object");let r;this.instanceCounter.increment(f.Sync,a),i.flush();do{await e(t),r=i.clientWaitSync(a,0,0)}while(37147===r);if(this.instanceCounter.decrement(f.Sync,a),i.deleteSync(a),37149===r)throw new Error("Client wait failed")}getBoundFramebufferObject(t=36160){return 36008===t?this._state.readFramebuffer:this._state.drawFramebuffer}temporaryBindFramebufferObject(t,e,s=!1){const i=this.getBoundFramebufferObject();try{this.bindFramebuffer(t,s),e()}finally{this.bindFramebuffer(i,s)}}getBoundVAO(){return this._state.vertexArrayObject}resetState(){this.useProgram(null),this.bindVAO(null),this.bindFramebuffer(null,!0),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663);for(let t=0;t<this.parameters.maxTextureImageUnits;++t)this.bindTexture(null,t);this.setBlendingEnabled(!1),this.setBlendFunction(1,0),this.setBlendEquation(32774),this.setBlendColor(0,0,0,0),this.setFaceCullingEnabled(!1),this.setCullFace(1029),this.setFrontFace(2305),this.setPolygonOffsetFillEnabled(!1),this.setPolygonOffset(0,0),this.setScissorTestEnabled(!1),this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height),this.setDepthTestEnabled(!1),this.setDepthFunction(513),this.setDepthRange(0,1),this.setStencilTestEnabled(!1),this.setStencilFunction(519,0,0),this.setStencilOp(7680,7680,7680),this.setClearColor(0,0,0,0),this.setClearDepth(1),this.setClearStencil(0),this.setColorMask(!0,!0,!0,!0),this.setStencilWriteMask(4294967295),this.setDepthWriteEnabled(!0),this.setDrawBuffers([1029]),this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}enforceState(){const{gl:t}=this;t.bindVertexArray(null);for(let s=0;s<this.parameters.maxVertexAttributes;s++)t.disableVertexAttribArray(s);this._state.vertexBuffer?t.bindBuffer(this._state.vertexBuffer.bufferType,this._state.vertexBuffer.glName):t.bindBuffer(34962,null),this._state.indexBuffer?t.bindBuffer(this._state.indexBuffer.bufferType,this._state.indexBuffer.glName):t.bindBuffer(34963,null),this._state.uniformBuffer?t.bindBuffer(this._state.uniformBuffer.bufferType,this._state.uniformBuffer.glName):t.bindBuffer(35345,null);for(let s=0;s<this._parameters.maxUniformBufferBindings;s++){const e=this._state.uniformBufferBindingPoints[s];if(null!=e){const{buffer:i,offset:a,size:r}=e;null!==i?0===a&&0===r?t.bindBufferBase(35345,s,i.glName):t.bindBufferRange(35345,s,i.glName,a,r):t.bindBufferBase(35345,s,null)}}if(this._state.pixelPackBuffer?t.bindBuffer(this._state.pixelPackBuffer.bufferType,this._state.pixelPackBuffer.glName):t.bindBuffer(35051,null),this._state.pixelUnpackBuffer?t.bindBuffer(this._state.pixelUnpackBuffer.bufferType,this._state.pixelUnpackBuffer.glName):t.bindBuffer(35052,null),this._state.copyReadBuffer?t.bindBuffer(this._state.copyReadBuffer.bufferType,this._state.copyReadBuffer.glName):t.bindBuffer(36662,null),this._state.copyWriteBuffer?t.bindBuffer(this._state.copyWriteBuffer.bufferType,this._state.copyWriteBuffer.glName):t.bindBuffer(36663,null),t.bindFramebuffer(36008,null),t.readBuffer(t.BACK),this._state.readFramebuffer&&(t.bindFramebuffer(36008,this._state.readFramebuffer.glName),t.readBuffer(l)),t.bindFramebuffer(36009,this._state.drawFramebuffer?.glName??null),null===this._state.drawFramebuffer){const e=this._state.drawBuffers.defaultFramebuffer;t.drawBuffers(e??[1029])}else{const e=this._state.drawBuffers.fbos.get(this._state.drawFramebuffer);t.drawBuffers(e??[l])}if(this._state.vertexArrayObject){const t=this._state.vertexArrayObject;this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null),this.bindVAO(t)}t.useProgram(this._state.program?.glName??null),t.blendColor(this._state.blendColor.r,this._state.blendColor.g,this._state.blendColor.b,this._state.blendColor.a),t.bindRenderbuffer(t.RENDERBUFFER,this._state.renderbuffer?.glName??null),!0===this._state.blend?t.enable(this.gl.BLEND):t.disable(this.gl.BLEND),t.blendEquationSeparate(this._state.blendEquation.mode,this._state.blendEquation.modeAlpha),t.blendFuncSeparate(this._state.blendFunction.srcRGB,this._state.blendFunction.dstRGB,this._state.blendFunction.srcAlpha,this._state.blendFunction.dstAlpha),t.clearColor(this._state.clearColor.r,this._state.clearColor.g,this._state.clearColor.b,this._state.clearColor.a),t.clearDepth(this._state.clearDepth),t.clearStencil(this._state.clearStencil),t.colorMask(this._state.colorMask.r,this._state.colorMask.g,this._state.colorMask.b,this._state.colorMask.a),t.cullFace(this._state.cullFace),t.depthFunc(this._state.depthFunction),t.depthRange(this._state.depthRange.zNear,this._state.depthRange.zFar),!0===this._state.depthTest?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),t.depthMask(this._state.depthWrite),t.frontFace(this._state.frontFace),t.lineWidth(1),!0===this._state.faceCulling?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),t.polygonOffset(this._state.polygonOffset[0],this._state.polygonOffset[1]),!0===this._state.polygonOffsetFill?t.enable(t.POLYGON_OFFSET_FILL):t.disable(t.POLYGON_OFFSET_FILL),t.scissor(this._state.scissorRect.x,this._state.scissorRect.y,this._state.scissorRect.width,this._state.scissorRect.height),!0===this._state.scissorTest?t.enable(t.SCISSOR_TEST):t.disable(t.SCISSOR_TEST),t.stencilFunc(this._state.stencilFunction.func,this._state.stencilFunction.ref,this._state.stencilFunction.mask),t.stencilOpSeparate(this._state.stencilOperation.face,this._state.stencilOperation.fail,this._state.stencilOperation.zFail,this._state.stencilOperation.zPass),!0===this._state.stencilTest?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),t.stencilMask(this._state.stencilWriteMask);for(let s=0;s<this.parameters.maxTextureImageUnits;s++){t.activeTexture(h+s),t.bindTexture(3553,null),t.bindTexture(34067,null),t.bindTexture(32879,null),t.bindTexture(35866,null);const e=this._state.textureUnitMap[s];null!=e&&t.bindTexture(e.descriptor.target,e.glName)}t.activeTexture(h+this._state.activeTexture);const e=this._state.viewport;t.viewport(e.x,e.y,e.width,e.height),this.resetInfo()}};function B(t,e,s,i){return e?i!==e&&t.bindBuffer(s,e.glName):t.bindBuffer(s,null),e}function F(t,e){switch(t){case o.POINTS:return 2*e;case o.TRIANGLES:return e/3;case o.TRIANGLE_STRIP:case o.TRIANGLE_FAN:return e-2;default:return 0}}export{m as RenderingContext};
5
+ import has from"../../core/has.js";import{disposeMaybe as t}from"../../core/maybe.js";import{after as e}from"../../core/promiseUtils.js";import{Milliseconds as s}from"../../core/time.js";import{webglDebugEnabled as i,checkWebGLError as a,getErrorMessage as r}from"./checkWebGLError.js";import{ContextState as n}from"./ContextState.js";import{ColorAttachment0 as l,baseTextureUnit as h,ResourceType as f,PrimitiveType as o}from"./enums.js";import{InstanceCounter as u}from"./InstanceCounter.js";import{Parameters as c}from"./Parameters.js";import{ProgramCache as d}from"./ProgramCache.js";import{StateTracker as _}from"./renderState.js";import{Texture as b}from"./Texture.js";import{WebGLDriverTest as g}from"./WebGLDriverTest.js";import{Capabilities as p}from"./capabilities/Capabilities.js";let m=class{constructor(t,e){this.gl=t,this.instanceCounter=new u,this._programCache=new d(this),this._transformFeedbackRequestInfo=null,this._state=new n,this._numOfDrawCalls=0,this._numOfTriangles=0,this._options=e,this.configure(e)}configure(e){this._options=e,this._capabilities=new p(this.gl,e),this._parameters=new c(this.gl,this._capabilities,e),b.TEXTURE_UNIT_FOR_UPDATES=this._parameters.maxTextureImageUnits-1;const s=this.gl.getParameter(this.gl.VIEWPORT);this._state=new n,this._state.viewport={x:s[0],y:s[1],width:s[2],height:s[3]},this._stateTracker=new _({setBlending:t=>{if(t){this.setBlendingEnabled(!0),this.setBlendEquationSeparate(t.opRgb,t.opAlpha),this.setBlendFunctionSeparate(t.srcRgb,t.dstRgb,t.srcAlpha,t.dstAlpha);const e=t.color;this.setBlendColor(e.r,e.g,e.b,e.a)}else this.setBlendingEnabled(!1)},setCulling:t=>{t?(this.setFaceCullingEnabled(!0),this.setCullFace(t.face),this.setFrontFace(t.mode)):this.setFaceCullingEnabled(!1)},setPolygonOffset:t=>{t?(this.setPolygonOffsetFillEnabled(!0),this.setPolygonOffset(t.factor,t.units)):this.setPolygonOffsetFillEnabled(!1)},setDepthTest:t=>{t?(this.setDepthTestEnabled(!0),this.setDepthFunction(t.func)):this.setDepthTestEnabled(!1)},setStencilTest:t=>{if(t){this.setStencilTestEnabled(!0);const e=t.function;this.setStencilFunction(e.func,e.ref,e.mask);const s=t.operation;this.setStencilOp(s.fail,s.zFail,s.zPass)}else this.setStencilTestEnabled(!1)},setDepthWrite:t=>{t?(this.setDepthWriteEnabled(!0),this.setDepthRange(t.zNear,t.zFar)):this.setDepthWriteEnabled(!1)},setColorWrite:t=>{t?this.setColorMask(t.r,t.g,t.b,t.a):this.setColorMask(!1,!1,!1,!1)},setStencilWrite:t=>{t?this.setStencilWriteMask(t.mask):this.setStencilWriteMask(0)},setDrawBuffers:t=>{if(t)this.setDrawBuffers(t.buffers);else{const{drawFramebuffer:t}=this._state;null===t?this.setDrawBuffers([1029]):0===t.colorAttachments.length?this.setDrawBuffers([0]):this.setDrawBuffers([l])}}}),this.enforceState(),t(this._driverTest),this._driverTest=new g(this)}updateOptions(t){this._options={...this._options,...t},this._parameters=new c(this.gl,this._capabilities,this._options)}dispose(){this._driverTest=t(this._driverTest),this._programCache=t(this._programCache),this.bindVAO(null),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663),this._state.textureUnitMap.length=0,this._state=null,this._capabilities=null,this._stateTracker=null,i()&&console.log(this.instanceCounter.resourceInformation)}get driverTest(){return this._driverTest}get contextAttributes(){return this.gl.getContextAttributes()}get parameters(){return this._parameters}get programCache(){return this._programCache}setPipelineState(t){this._stateTracker.setPipeline(t)}setBlendingEnabled(t){this._state.blend!==t&&(!0===t?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._state.blend=t,this._stateTracker.invalidateBlending())}externalProgramUpdate(){this._state.program?.stop(),this._state.program=null}externalTextureUnitUpdate(t,e){for(let s=0;s<t.length;++s)this._state.textureUnitMap[t[s]]=null;e>=0&&(this._state.activeTexture=e)}externalVertexArrayObjectUpdate(){this.gl.bindVertexArray(null),this._state.vertexArrayObject=null,this._state.vertexBuffer=null,this._state.indexBuffer=null}externalVertexBufferUpdate(){this._state.vertexBuffer=null}externalIndexBufferUpdate(){this._state.indexBuffer=null}setBlendColor(t,e,s,i){t===this._state.blendColor.r&&e===this._state.blendColor.g&&s===this._state.blendColor.b&&i===this._state.blendColor.a||(this.gl.blendColor(t,e,s,i),this._state.blendColor.r=t,this._state.blendColor.g=e,this._state.blendColor.b=s,this._state.blendColor.a=i,this._stateTracker.invalidateBlending())}setBlendFunction(t,e){t===this._state.blendFunction.srcRGB&&e===this._state.blendFunction.dstRGB||(this.gl.blendFunc(t,e),this._state.blendFunction.srcRGB=t,this._state.blendFunction.srcAlpha=t,this._state.blendFunction.dstRGB=e,this._state.blendFunction.dstAlpha=e,this._stateTracker.invalidateBlending())}setBlendFunctionSeparate(t,e,s,i){this._state.blendFunction.srcRGB===t&&this._state.blendFunction.srcAlpha===s&&this._state.blendFunction.dstRGB===e&&this._state.blendFunction.dstAlpha===i||(this.gl.blendFuncSeparate(t,e,s,i),this._state.blendFunction.srcRGB=t,this._state.blendFunction.srcAlpha=s,this._state.blendFunction.dstRGB=e,this._state.blendFunction.dstAlpha=i,this._stateTracker.invalidateBlending())}setBlendEquation(t){this._state.blendEquation.mode!==t&&(this.gl.blendEquation(t),this._state.blendEquation.mode=t,this._state.blendEquation.modeAlpha=t,this._stateTracker.invalidateBlending())}setBlendEquationSeparate(t,e){this._state.blendEquation.mode===t&&this._state.blendEquation.modeAlpha===e||(this.gl.blendEquationSeparate(t,e),this._state.blendEquation.mode=t,this._state.blendEquation.modeAlpha=e,this._stateTracker.invalidateBlending())}setColorMask(t,e,s,i){this._state.colorMask.r===t&&this._state.colorMask.g===e&&this._state.colorMask.b===s&&this._state.colorMask.a===i||(this.gl.colorMask(t,e,s,i),this._state.colorMask.r=t,this._state.colorMask.g=e,this._state.colorMask.b=s,this._state.colorMask.a=i,this._stateTracker.invalidateColorWrite())}setClearColor(t,e,s,i){this._state.clearColor.r===t&&this._state.clearColor.g===e&&this._state.clearColor.b===s&&this._state.clearColor.a===i||(this.gl.clearColor(t,e,s,i),this._state.clearColor.r=t,this._state.clearColor.g=e,this._state.clearColor.b=s,this._state.clearColor.a=i)}setFaceCullingEnabled(t){this._state.faceCulling!==t&&(!0===t?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._state.faceCulling=t,this._stateTracker.invalidateCulling())}setPolygonOffsetFillEnabled(t){this._state.polygonOffsetFill!==t&&(!0===t?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._state.polygonOffsetFill=t,this._stateTracker.invalidatePolygonOffset())}setPolygonOffset(t,e){this._state.polygonOffset[0]===t&&this._state.polygonOffset[1]===e||(this._state.polygonOffset[0]=t,this._state.polygonOffset[1]=e,this.gl.polygonOffset(t,e),this._stateTracker.invalidatePolygonOffset())}setCullFace(t){this._state.cullFace!==t&&(this.gl.cullFace(t),this._state.cullFace=t,this._stateTracker.invalidateCulling())}setFrontFace(t){this._state.frontFace!==t&&(this.gl.frontFace(t),this._state.frontFace=t,this._stateTracker.invalidateCulling())}setScissorTestEnabled(t){this._state.scissorTest!==t&&(!0===t?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._state.scissorTest=t)}setScissorRect(t,e,s,i){this._state.scissorRect.x===t&&this._state.scissorRect.y===e&&this._state.scissorRect.width===s&&this._state.scissorRect.height===i||(this.gl.scissor(t,e,s,i),this._state.scissorRect.x=t,this._state.scissorRect.y=e,this._state.scissorRect.width=s,this._state.scissorRect.height=i)}setDepthTestEnabled(t){this._state.depthTest!==t&&(!0===t?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._state.depthTest=t,this._stateTracker.invalidateDepthTest())}setClearDepth(t){this._state.clearDepth!==t&&(this.gl.clearDepth(t),this._state.clearDepth=t)}setDepthFunction(t){this._state.depthFunction!==t&&(this.gl.depthFunc(t),this._state.depthFunction=t,this._stateTracker.invalidateDepthTest())}setDepthWriteEnabled(t){this._state.depthWrite!==t&&(this.gl.depthMask(t),this._state.depthWrite=t,this._stateTracker.invalidateDepthWrite())}setDepthRange(t,e){this._state.depthRange.zNear===t&&this._state.depthRange.zFar===e||(this.gl.depthRange(t,e),this._state.depthRange.zNear=t,this._state.depthRange.zFar=e,this._stateTracker.invalidateDepthWrite())}setStencilTestEnabled(t){this._state.stencilTest!==t&&(!0===t?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._state.stencilTest=t,this._stateTracker.invalidateStencilTest())}setClearStencil(t){t!==this._state.clearStencil&&(this.gl.clearStencil(t),this._state.clearStencil=t)}setStencilFunction(t,e,s){this._state.stencilFunction.func===t&&this._state.stencilFunction.ref===e&&this._state.stencilFunction.mask===s||(this.gl.stencilFunc(t,e,s),this._state.stencilFunction.face=1032,this._state.stencilFunction.func=t,this._state.stencilFunction.ref=e,this._state.stencilFunction.mask=s,this._stateTracker.invalidateStencilTest())}setStencilFunctionSeparate(t,e,s,i){this._state.stencilFunction.face===t&&this._state.stencilFunction.func===e&&this._state.stencilFunction.ref===s&&this._state.stencilFunction.mask===i||(this.gl.stencilFuncSeparate(t,e,s,i),this._state.stencilFunction.face=t,this._state.stencilFunction.func=e,this._state.stencilFunction.ref=s,this._state.stencilFunction.mask=i,this._stateTracker.invalidateStencilTest())}setStencilWriteMask(t){this._state.stencilWriteMask!==t&&(this.gl.stencilMask(t),this._state.stencilWriteMask=t,this._stateTracker.invalidateStencilWrite())}setStencilOp(t,e,s){1032===this._state.stencilOperation.face&&this._state.stencilOperation.fail===t&&this._state.stencilOperation.zFail===e&&this._state.stencilOperation.zPass===s||(this.gl.stencilOp(t,e,s),this._state.stencilOperation.face=1032,this._state.stencilOperation.fail=t,this._state.stencilOperation.zFail=e,this._state.stencilOperation.zPass=s,this._stateTracker.invalidateStencilTest())}setStencilOpSeparate(t,e,s,i){this._state.stencilOperation.face===t&&this._state.stencilOperation.fail===e&&this._state.stencilOperation.zFail===s&&this._state.stencilOperation.zPass===i||(this.gl.stencilOpSeparate(t,e,s,i),this._state.stencilOperation.face=t,this._state.stencilOperation.fail=e,this._state.stencilOperation.zFail=s,this._state.stencilOperation.zPass=i,this._stateTracker.invalidateStencilTest())}setActiveTexture(t,e=!1){const s=this._state.activeTexture;return t>=0&&(e||t!==this._state.activeTexture)&&(this.gl.activeTexture(h+t),this._state.activeTexture=t),s}setDrawBuffers(t){const{drawFramebuffer:e}=this._state,s=null===e,i=s?this._state.drawBuffers.defaultFramebuffer:this._state.drawBuffers.fbos.get(e);if(i?.length!==t.length||!i.every((e,s)=>e===t[s]))if(t.length>this.parameters.maxDrawBuffers)console.error("Setting more active draw buffers than GL.MAX_DRAW_BUFFERS allows.");else{if(s){if(t.length>1)return void console.error("The default framebuffer can only have one active draw buffer.");if(1029!==t[0]&&0!==t[0])return void console.error("The default framebuffer can only use the constants GL.BACK or GL.NONE as draw buffers.")}s||!t.includes(1029)?(this.gl.drawBuffers(t),s?this._state.drawBuffers.defaultFramebuffer=t:this._state.drawBuffers.fbos.set(e,t),this._stateTracker.invalidateDrawBuffers()):console.error("A framebuffer object can only use the constants GL.COLOR_ATTACHMENTi or GL.NONE as draw buffers.")}}clear(t,e=255){if(t){if(16384&t){const t=this._state.drawFramebuffer?.colorAttachments;t&&this.setDrawBuffers(t),this.setColorMask(!0,!0,!0,!0)}256&t&&this.setDepthWriteEnabled(!0),1024&t&&this.setStencilWriteMask(e),this.gl.clear(t)}}clearFramebuffer(t,e=!1,s=!1){let i=0;if(t){const e=1e-13,s=Math.max(e,t[3]);this.setClearColor(t[0],t[1],t[2],s),i|=16384}e&&(i|=256),!1===s?s=0:(!0===s&&(s=255),i|=1024),i&&this.clear(i,s)}clearBuffer(t,e,s=6144,i=void 0){this.gl.clearBufferfv(s,t,e,i)}clearBufferInteger(t,e,s=6144,i=void 0){this.gl.clearBufferiv(s,t,e,i)}clearBufferUnsignedInteger(t,e,s=6144,i=void 0){this.gl.clearBufferuiv(s,t,e,i)}drawArrays(t,e,s){if(this._transformFeedbackRequestInfo){if(t!==this._transformFeedbackRequestInfo.primitiveType)throw new Error("DrawArrays called during transform feedback, but primitiveType does not match that of the current transform feedback request");if(null==this._state.program?.hasTransformFeedbackVaryings)throw new Error("DrawArrays called during transform feedback, but the shader program was not linked with a transform feedback varying")}if(i()&&(this._numOfDrawCalls++,this._numOfTriangles+=F(t,s),has("enable-feature:webgl-debug:textureReadWrite"))){const t=this._state.textureUnitMap;for(let e=0;e<t.length;e++){const s=t[e];if(null!=s&&s===this._state.drawFramebuffer?.colorTexture)throw new Error(`Detected readWrite. Texture already bound at index ${e}`)}}this.gl.drawArrays(t,e,s),a(this.gl)}drawArraysInstanced(t,e,s,i){this.gl.drawArraysInstanced(t,e,s,i),a(this.gl)}drawElements(t,e,s,a){if(this._transformFeedbackRequestInfo)throw new Error("Cannot called drawElements during a transform feedback request");if(i()&&(this._numOfDrawCalls++,this._numOfTriangles+=F(t,e)),this.gl.drawElements(t,e,s,a),i()){const i=r(this.gl);if(i){const r=this.getBoundVAO(),n=r?.indexBuffer,l=r?.buffers,h={indexBuffer:n,vertexBuffers:l},f={mode:t,count:e,type:s,offset:a},o=n?.size??0,u=a+e,c=o<u?`. Buffer is too small. Attempted to draw index ${u} of ${o}`:"";console.error(`drawElements: ${i}${c}`,{args:f,vao:h})}}}drawElementsInstanced(t,e,s,i,r){this.gl.drawElementsInstanced(t,e,s,i,r),a(this.gl)}logInfo(){i()&&console.log(`DrawCalls: ${this._numOfDrawCalls}, Triangles: ${this._numOfTriangles}`)}resetInfo(){i()&&(this._numOfDrawCalls=0,this._numOfTriangles=0)}get capabilities(){return this._capabilities}setViewport(t,e,s,i){s=Math.max(Math.round(s),1),i=Math.max(Math.round(i),1);const a=this._state.viewport;a.x===t&&a.y===e&&a.width===s&&a.height===i||(a.x=t,a.y=e,a.width=s,a.height=i,this.gl.viewport(t,e,s,i))}setViewport4fv(t){this.setViewport(t[0],t[1],t[2],t[3])}restoreViewport({x:t,y:e,width:s,height:i}){this.setViewport(t,e,s,i)}getViewport(){const t=this._state.viewport;return{x:t.x,y:t.y,width:t.width,height:t.height}}useProgram(t){this._state.program!==t&&(this._state.program?.stop(),this._state.program=t,this.gl.useProgram(t?.glName??null))}bindTexture(t,e,s=!1){(e>=this.parameters.maxTextureImageUnits||e<0)&&console.error("Input texture unit is out of range of available units!");const i=this._state.textureUnitMap[e];return null==t?.glName?(null!=i&&(this.setActiveTexture(e,s),this.gl.bindTexture(i.descriptor.target,null)),this._state.textureUnitMap[e]=null,i):s||i!==t?(this.setActiveTexture(e,s),this.gl.bindTexture(t.descriptor.target,t.glName),t.applyChanges(),this._state.textureUnitMap[e]=t,i):(t.isDirty&&(this.setActiveTexture(e,s),t.applyChanges()),i)}unbindTexture(t){if(null!=t)for(let e=0;e<this.parameters.maxTextureImageUnits;e++)this._state.textureUnitMap[e]===t&&(this.bindTexture(null,e),this._state.textureUnitMap[e]=null)}bindFramebuffer(t,e=!1){if(e||this._state.readFramebuffer!==t||this._state.drawFramebuffer!==t){if(this._stateTracker.invalidateDrawBuffers(),null==t)return this.gl.bindFramebuffer(36160,null),void(this._state.readFramebuffer=this._state.drawFramebuffer=null);t.initializeAndBind(36160),this._state.readFramebuffer=t,this._state.drawFramebuffer=t}}bindFramebufferSeparate(t,e,s=!1){const i=36008===e,a=i?this._state.readFramebuffer:this._state.drawFramebuffer;(s||a!==t)&&(null==t?this.gl.bindFramebuffer(e,null):t.initializeAndBind(e),i?this._state.readFramebuffer=t??null:(this._stateTracker.invalidateDrawBuffers(),this._state.drawFramebuffer=t??null))}blitFramebuffer(t,e,s=16384,i=9728,a=0,r=0,n=t.width,l=t.height,h=0,f=0,o=e.width,u=e.height){this.bindFramebufferSeparate(t,36008,!0),this.bindFramebufferSeparate(e,36009,!0),this.gl.blitFramebuffer(a,r,n,l,h,f,o,u,s,i)}bindBuffer(t,e){if(t)switch(e??=t.bufferType,e){case 34962:this._state.vertexBuffer=B(this.gl,t,e,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=B(this.gl,t,e,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=B(this.gl,t,e,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=B(this.gl,t,e,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=B(this.gl,t,e,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=B(this.gl,t,e,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=B(this.gl,t,e,this._state.copyWriteBuffer);break;case 35982:this._state.transformFeedbackBuffer=B(this.gl,t,e,this._state.transformFeedbackBuffer)}}bindRenderbuffer(t){const e=this.gl;t||(e.bindRenderbuffer(e.RENDERBUFFER,null),this._state.renderbuffer=null),this._state.renderbuffer!==t&&(e.bindRenderbuffer(e.RENDERBUFFER,t.glName),this._state.renderbuffer=t)}_getBufferBinding(t,e){if(e>=this.parameters.maxUniformBufferBindings||e<0)return console.error("Uniform buffer binding point is out of range!"),null;const s=35345===t?this._state.uniformBufferBindingPoints:this._state.transformBufferBindingPoints;let i=s[e];return null==i&&(i={buffer:null,offset:0,size:0},s[e]=i),i}bindBufferBase(t,e,s){const i=this._getBufferBinding(t,e);null!=i&&(i.buffer===s&&0===i.offset&&0===i.size||(this.gl.bindBufferBase(t,e,s?s.glName:null),i.buffer=s,i.offset=0,i.size=0))}bindBufferRange(t,e,s,i,a){const r=this._getBufferBinding(t,e);null!=r&&(r.buffer===s&&r.offset===i&&r.size===a||(i%this._parameters.uniformBufferOffsetAlignment===0?(this.gl.bindBufferRange(t,e,s.glName,i,a),r.buffer=s,r.offset=i,r.size=a):console.error("Uniform buffer binding offset is not a multiple of the context offset alignment")))}bindUBO(t,e,s,a){null!=e?(i()&&(a??e.byteLength)>this._parameters.maxUniformBlockSize&&console.error("Attempting to bind more data than the maximum uniform block size"),e.initialize(),void 0!==s&&void 0!==a?this.bindBufferRange(35345,t,e.buffer,s,a):this.bindBufferBase(35345,t,e.buffer)):this.bindBufferBase(35345,t,null)}unbindUBO(t){for(let e=0,s=this._state.uniformBufferBindingPoints.length;e<s;e++){const s=this._state.uniformBufferBindingPoints[e];null!=s&&s.buffer===t.buffer&&this.bindBufferBase(35345,e,null)}}unbindBuffer(t){switch(t){case 34962:this._state.vertexBuffer=B(this.gl,null,t,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=B(this.gl,null,t,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=B(this.gl,null,t,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=B(this.gl,null,t,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=B(this.gl,null,t,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=B(this.gl,null,t,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=B(this.gl,null,t,this._state.copyWriteBuffer)}}bindVAO(t,e){if(null==t)return this._state.vertexArrayObject?.unbind(),void(this._state.vertexArrayObject=null);this._state.vertexArrayObject!==t&&(t.bind(e),this._state.vertexArrayObject=t)}bindTransformFeedback(t){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,t.glName)}beginTransformFeedback(t,e){if(this._transformFeedbackRequestInfo)throw new Error("Already in a transform feedback request");const{gl:s}=this;s.bindTransformFeedback(s.TRANSFORM_FEEDBACK,t.glName),s.beginTransformFeedback(e),this._transformFeedbackRequestInfo={primitiveType:e}}endTransformFeedback(){if(!this._transformFeedbackRequestInfo)throw new Error("Not in a transform feedback request");const{gl:t}=this;t.endTransformFeedback(),t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null),this._transformFeedbackRequestInfo=null}async clientWaitAsync(t=s(10)){const{gl:i}=this,a=i.fenceSync(37143,0);if(!a)throw new Error("Client wait failed, could not create sync object");let r;this.instanceCounter.increment(f.Sync,a),i.flush();do{await e(t),r=i.clientWaitSync(a,0,0)}while(37147===r);if(this.instanceCounter.decrement(f.Sync,a),i.deleteSync(a),37149===r)throw new Error("Client wait failed")}getBoundFramebufferObject(t=36160){return 36008===t?this._state.readFramebuffer:this._state.drawFramebuffer}temporaryBindFramebufferObject(t,e,s=!1){const i=this.getBoundFramebufferObject();try{this.bindFramebuffer(t,s),e()}finally{this.bindFramebuffer(i,s)}}getBoundVAO(){return this._state.vertexArrayObject}resetState(){this.useProgram(null),this.bindVAO(null),this.bindFramebuffer(null,!0),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663);for(let t=0;t<this.parameters.maxTextureImageUnits;++t)this.bindTexture(null,t);this.setBlendingEnabled(!1),this.setBlendFunction(1,0),this.setBlendEquation(32774),this.setBlendColor(0,0,0,0),this.setFaceCullingEnabled(!1),this.setCullFace(1029),this.setFrontFace(2305),this.setPolygonOffsetFillEnabled(!1),this.setPolygonOffset(0,0),this.setScissorTestEnabled(!1),this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height),this.setDepthTestEnabled(!1),this.setDepthFunction(513),this.setDepthRange(0,1),this.setStencilTestEnabled(!1),this.setStencilFunction(519,0,0),this.setStencilOp(7680,7680,7680),this.setClearColor(0,0,0,0),this.setClearDepth(1),this.setClearStencil(0),this.setColorMask(!0,!0,!0,!0),this.setStencilWriteMask(4294967295),this.setDepthWriteEnabled(!0),this.setDrawBuffers([1029]),this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}enforceState(){const{gl:t}=this;t.bindVertexArray(null);for(let s=0;s<this.parameters.maxVertexAttributes;s++)t.disableVertexAttribArray(s);this._state.vertexBuffer?t.bindBuffer(this._state.vertexBuffer.bufferType,this._state.vertexBuffer.glName):t.bindBuffer(34962,null),this._state.indexBuffer?t.bindBuffer(this._state.indexBuffer.bufferType,this._state.indexBuffer.glName):t.bindBuffer(34963,null),this._state.uniformBuffer?t.bindBuffer(this._state.uniformBuffer.bufferType,this._state.uniformBuffer.glName):t.bindBuffer(35345,null);for(let s=0;s<this._parameters.maxUniformBufferBindings;s++){const e=this._state.uniformBufferBindingPoints[s];if(null!=e){const{buffer:i,offset:a,size:r}=e;null!==i?0===a&&0===r?t.bindBufferBase(35345,s,i.glName):t.bindBufferRange(35345,s,i.glName,a,r):t.bindBufferBase(35345,s,null)}}if(this._state.pixelPackBuffer?t.bindBuffer(this._state.pixelPackBuffer.bufferType,this._state.pixelPackBuffer.glName):t.bindBuffer(35051,null),this._state.pixelUnpackBuffer?t.bindBuffer(this._state.pixelUnpackBuffer.bufferType,this._state.pixelUnpackBuffer.glName):t.bindBuffer(35052,null),this._state.copyReadBuffer?t.bindBuffer(this._state.copyReadBuffer.bufferType,this._state.copyReadBuffer.glName):t.bindBuffer(36662,null),this._state.copyWriteBuffer?t.bindBuffer(this._state.copyWriteBuffer.bufferType,this._state.copyWriteBuffer.glName):t.bindBuffer(36663,null),t.bindFramebuffer(36008,null),t.readBuffer(t.BACK),this._state.readFramebuffer&&(t.bindFramebuffer(36008,this._state.readFramebuffer.glName),t.readBuffer(l)),t.bindFramebuffer(36009,this._state.drawFramebuffer?.glName??null),null===this._state.drawFramebuffer){const e=this._state.drawBuffers.defaultFramebuffer;t.drawBuffers(e??[1029])}else{const e=this._state.drawBuffers.fbos.get(this._state.drawFramebuffer);t.drawBuffers(e??[l])}if(this._state.vertexArrayObject){const t=this._state.vertexArrayObject;this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null),this.bindVAO(t)}t.useProgram(this._state.program?.glName??null),t.blendColor(this._state.blendColor.r,this._state.blendColor.g,this._state.blendColor.b,this._state.blendColor.a),t.bindRenderbuffer(t.RENDERBUFFER,this._state.renderbuffer?.glName??null),!0===this._state.blend?t.enable(this.gl.BLEND):t.disable(this.gl.BLEND),t.blendEquationSeparate(this._state.blendEquation.mode,this._state.blendEquation.modeAlpha),t.blendFuncSeparate(this._state.blendFunction.srcRGB,this._state.blendFunction.dstRGB,this._state.blendFunction.srcAlpha,this._state.blendFunction.dstAlpha),t.clearColor(this._state.clearColor.r,this._state.clearColor.g,this._state.clearColor.b,this._state.clearColor.a),t.clearDepth(this._state.clearDepth),t.clearStencil(this._state.clearStencil),t.colorMask(this._state.colorMask.r,this._state.colorMask.g,this._state.colorMask.b,this._state.colorMask.a),t.cullFace(this._state.cullFace),t.depthFunc(this._state.depthFunction),t.depthRange(this._state.depthRange.zNear,this._state.depthRange.zFar),!0===this._state.depthTest?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),t.depthMask(this._state.depthWrite),t.frontFace(this._state.frontFace),t.lineWidth(1),!0===this._state.faceCulling?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),t.polygonOffset(this._state.polygonOffset[0],this._state.polygonOffset[1]),!0===this._state.polygonOffsetFill?t.enable(t.POLYGON_OFFSET_FILL):t.disable(t.POLYGON_OFFSET_FILL),t.scissor(this._state.scissorRect.x,this._state.scissorRect.y,this._state.scissorRect.width,this._state.scissorRect.height),!0===this._state.scissorTest?t.enable(t.SCISSOR_TEST):t.disable(t.SCISSOR_TEST),t.stencilFunc(this._state.stencilFunction.func,this._state.stencilFunction.ref,this._state.stencilFunction.mask),t.stencilOpSeparate(this._state.stencilOperation.face,this._state.stencilOperation.fail,this._state.stencilOperation.zFail,this._state.stencilOperation.zPass),!0===this._state.stencilTest?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),t.stencilMask(this._state.stencilWriteMask);for(let s=0;s<this.parameters.maxTextureImageUnits;s++){t.activeTexture(h+s),t.bindTexture(3553,null),t.bindTexture(34067,null),t.bindTexture(32879,null),t.bindTexture(35866,null);const e=this._state.textureUnitMap[s];null!=e&&t.bindTexture(e.descriptor.target,e.glName)}t.activeTexture(h+this._state.activeTexture);const e=this._state.viewport;t.viewport(e.x,e.y,e.width,e.height),this.resetInfo()}};function B(t,e,s,i){return e?i!==e&&t.bindBuffer(s,e.glName):t.bindBuffer(s,null),e}function F(t,e){switch(t){case o.POINTS:return 2*e;case o.TRIANGLES:return e/3;case o.TRIANGLE_STRIP:case o.TRIANGLE_FAN:return e-2;default:return 0}}export{m as RenderingContext};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ let e=class{constructor(e={},s={},t=8,i=1/0){this.disabledExtensions=e,this.debugWebGLExtensions=s,this.maxAnisotropy=t,this.maxPreferredTexturePixels=i}};export{e as RenderingContextOptions};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import"../../core/has.js";import t from"../../core/Logger.js";const r=()=>t.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class n{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class s extends n{constructor(){super(...arguments),this.vertex=new u,this.fragment=new u,this.attributes=new c,this.varyings=new h,this.extensions=new m,this.outputs=new _}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e,t=!1){const r=this.extensions.generateSource(e),n=this.attributes.generateSource(e),s=this.varyings.generateSource(e),i="vertex"===e?this.vertex:this.fragment,a=i.uniforms.generateSource(),o=i.code.generateSource(),u=i.main.generateSource(t),c="vertex"===e?p:d,h=i.constants.generateSource(),m=this.outputs.generateSource(e);return`#version 300 es\n${r.join("\n")}\n${c}\n${h.join("\n")}\n${a.join("\n")}\n${n.join("\n")}\n${s.join("\n")}\n${m.join("\n")}\n${o.join("\n")}\n${u.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)});const r=Array.from(t.values()),n=r.length;return t=>{for(let s=0;s<n;++s)r[s](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)});const r=Array.from(t.values()),n=r.length;return(t,s)=>{for(let i=0;i<n;++i)r[i](e,t,s)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)});const r=Array.from(t.values()),n=r.length;return(t,s,i)=>{for(let a=0;a<n;++a)r[a](e,i,t,s)}}}class i{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(t){if(null!=t){if(this._entries.has(t.name)&&!this._entries.get(t.name).equals(t))throw new e("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${t.name} for different uniform type`);this._entries.set(t.name,t)}else r().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:r})=>null!=t?`uniform ${r} ${e}[${t}];`:`uniform ${r} ${e};`)}get entries(){return Array.from(this._entries.values())}}class a{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(t){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(t)throw new e("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class o{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class u extends n{constructor(){super(...arguments),this.uniforms=new i(this),this.main=new a(this),this.code=new o(this),this.constants=new l(this)}get builder(){return this}}class c{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}}class h{constructor(){this._entries=new Map}add(e,t,n){this._entries.has(e)?r().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,invariant:n?.invariant??!1,flat:n?.flat??!1})}generateSource(e){const t=new Array;return this._entries.forEach((r,n)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+(r.flat||"int"===r.type?"flat ":"")+("vertex"===e?"out":"in")+` ${r.type} ${n};`)),t}}class m{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?m.ALLOWLIST_VERTEX:m.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter(e=>t.includes(e)).map(e=>`#extension ${e} : enable`)}static{this.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"]}static{this.ALLOWLIST_VERTEX=[]}}class _{constructor(){this._entries=new Map}add(e,t,n=0){const s=this._entries.get(n);s?.name!==e||s?.type!==t?this._entries.set(n,{name:e,type:t}):r().warn(`Fragment shader output location ${n} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:_.DEFAULT_NAME,type:_.DEFAULT_TYPE});const t=new Array;return this._entries.forEach((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`)),t}}class l{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let n="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":n=l._numberToFloatStr(r);break;case"int":n=l._numberToIntStr(r);break;case"bool":n=r.toString();break;case"vec2":n=`vec2(${l._numberToFloatStr(r[0])}, ${l._numberToFloatStr(r[1])})`;break;case"vec3":n=`vec3(${l._numberToFloatStr(r[0])}, ${l._numberToFloatStr(r[1])}, ${l._numberToFloatStr(r[2])})`;break;case"vec4":n=`vec4(${l._numberToFloatStr(r[0])}, ${l._numberToFloatStr(r[1])}, ${l._numberToFloatStr(r[2])}, ${l._numberToFloatStr(r[3])})`;break;case"ivec2":n=`ivec2(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])})`;break;case"ivec3":n=`ivec3(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])}, ${l._numberToIntStr(r[2])})`;break;case"ivec4":n=`ivec4(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])}, ${l._numberToIntStr(r[2])}, ${l._numberToIntStr(r[3])})`;break;case"uvec2":n=`uvec2(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])})`;break;case"uvec3":n=`uvec3(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])}, ${l._numberToIntStr(r[2])})`;break;case"uvec4":n=`uvec4(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])}, ${l._numberToIntStr(r[2])}, ${l._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":n=`${t}(${Array.prototype.map.call(r,e=>l._numberToFloatStr(e)).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${n};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const d="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",p="precision highp float;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n ";export{o as Code,n as Includes,a as Main,s as ShaderBuilder,u as Stage,i as Uniforms};
5
+ import e from"../../core/Error.js";import"../../core/has.js";import t from"../../core/Logger.js";const r=()=>t.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder");class n{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class s extends n{constructor(){super(...arguments),this.vertex=new u,this.fragment=new u,this.attributes=new c,this.varyings=new h,this.extensions=new m,this.outputs=new _}get fragmentUniforms(){return this.fragment.uniforms.entries}get attributeNames(){return this.attributes.names}get builder(){return this}generate(e,t=!1){const r=this.extensions.generateSource(e),n=this.attributes.generateSource(e),s=this.varyings.generateSource(e),i="vertex"===e?this.vertex:this.fragment,a=i.uniforms.generateSource(),o=i.code.generateSource(),u=i.main.generateSource(t),c="vertex"===e?p:d,h=i.constants.generateSource(),m=this.outputs.generateSource(e);return`#version 300 es\n${r.join("\n")}\n${c}\n${h.join("\n")}\n${a.join("\n")}\n${n.join("\n")}\n${s.join("\n")}\n${m.join("\n")}\n${o.join("\n")}\n${u.join("\n")}`}generateBind(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[0];r&&t.set(e.name,r)});const r=Array.from(t.values()),n=r.length;return t=>{for(let s=0;s<n;++s)r[s](e,t)}}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[1];r&&t.set(e.name,r)});const r=Array.from(t.values()),n=r.length;return(t,s)=>{for(let i=0;i<n;++i)r[i](e,t,s)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)}),this.fragment.uniforms.entries.forEach(e=>{const r=e.bind[2];r&&t.set(e.name,r)});const r=Array.from(t.values()),n=r.length;return(t,s,i)=>{for(let a=0;a<n;++a)r[a](e,i,t,s)}}}class i{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(t){if(null!=t){if(this._entries.has(t.name)&&!this._entries.get(t.name).equals(t))throw new e("shaderbuilder:duplicate-uniform",`Duplicate uniform name ${t.name} for different uniform type`);this._entries.set(t.name,t)}else r().error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map(({name:e,arraySize:t,type:r})=>null!=t?`uniform ${r} ${e}[${t}];`:`uniform ${r} ${e};`)}get entries(){return Array.from(this._entries.values())}}class a{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(t){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];if(t)throw new e("shaderbuilder:missing-main","Shader does not contain main function body.");return[]}}class o{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class u extends n{constructor(){super(...arguments),this.uniforms=new i(this),this.main=new a(this),this.code=new o(this),this.constants=new l(this)}get builder(){return this}}class c{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map(e=>`in ${e[1]} ${e[0]};`)}get names(){return this._entries.map(([e])=>e)}}class h{constructor(){this._entries=new Map}add(e,t,n){this._entries.has(e)?r().warn(`Ignoring duplicate varying ${t} ${e}`):this._entries.set(e,{type:t,invariant:n?.invariant??!1,flat:n?.flat??!1})}generateSource(e){const t=new Array;return this._entries.forEach((r,n)=>t.push((r.invariant&&"vertex"===e?"invariant ":"")+(r.flat||"int"===r.type?"flat ":"")+("vertex"===e?"out":"in")+` ${r.type} ${n};`)),t}}class m{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?m.ALLOWLIST_VERTEX:m.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter(e=>t.includes(e)).map(e=>`#extension ${e} : enable`)}static{this.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"]}static{this.ALLOWLIST_VERTEX=[]}}class _{constructor(){this._entries=new Map}add(e,t,n=0){const s=this._entries.get(n);s?.name!==e||s?.type!==t?this._entries.set(n,{name:e,type:t}):r().warn(`Fragment shader output location ${n} occupied`)}static{this.DEFAULT_TYPE="vec4"}static{this.DEFAULT_NAME="fragColor"}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:_.DEFAULT_NAME,type:_.DEFAULT_TYPE});const t=new Array;return this._entries.forEach((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`)),t}}class l{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let n="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":n=l._numberToFloatStr(r);break;case"int":n=l._numberToIntStr(r);break;case"bool":n=r.toString();break;case"vec2":n=`vec2(${l._numberToFloatStr(r[0])}, ${l._numberToFloatStr(r[1])})`;break;case"vec3":n=`vec3(${l._numberToFloatStr(r[0])}, ${l._numberToFloatStr(r[1])}, ${l._numberToFloatStr(r[2])})`;break;case"vec4":n=`vec4(${l._numberToFloatStr(r[0])}, ${l._numberToFloatStr(r[1])}, ${l._numberToFloatStr(r[2])}, ${l._numberToFloatStr(r[3])})`;break;case"ivec2":n=`ivec2(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])})`;break;case"ivec3":n=`ivec3(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])}, ${l._numberToIntStr(r[2])})`;break;case"ivec4":n=`ivec4(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])}, ${l._numberToIntStr(r[2])}, ${l._numberToIntStr(r[3])})`;break;case"uvec2":n=`uvec2(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])})`;break;case"uvec3":n=`uvec3(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])}, ${l._numberToIntStr(r[2])})`;break;case"uvec4":n=`uvec4(${l._numberToIntStr(r[0])}, ${l._numberToIntStr(r[1])}, ${l._numberToIntStr(r[2])}, ${l._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":n=`${t}(${Array.prototype.map.call(r,e=>l._numberToFloatStr(e)).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${n};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const d="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n#else\n precision mediump float;\n precision mediump int;\n precision mediump sampler2D;\n precision mediump usampler2D;\n precision mediump sampler2DArray;\n precision mediump sampler2DShadow;\n#endif",p="precision highp float;\n precision highp sampler2D;\n precision highp usampler2D;\n precision highp sampler2DArray;\n precision highp sampler2DShadow;\n\n\n invariant gl_Position;\n ";export{o as Code,n as Includes,a as Main,s as ShaderBuilder,u as Stage,i as Uniforms};