@arcgis/core 4.23.0-next.20220126 → 4.23.0-next.20220130

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 (523) hide show
  1. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/02fbc76dfdc20e628c61.js +1 -0
  4. package/assets/esri/core/workers/chunks/0453fad5cb819797b4f6.js +1 -0
  5. package/assets/esri/core/workers/chunks/0463ba46df855a92b9c0.js +1 -0
  6. package/assets/esri/core/workers/chunks/0cd0a6eef51fc5b9ea61.js +1 -0
  7. package/assets/esri/core/workers/chunks/{97ec9eef0048760fa260.js → 0d02c6ad1f4688bfa374.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0d684f16f37d5dc385dd.js +1 -0
  9. package/assets/esri/core/workers/chunks/0e17691520d890d34efb.js +1 -0
  10. package/assets/esri/core/workers/chunks/16b6d0f8378582c051c3.js +1 -0
  11. package/assets/esri/core/workers/chunks/{0ce1dc14280d6f188468.js → 17de7a324dfa7f57ad5d.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{b313ab14a643273e7d09.js → 1877ab1b6a115dbba1c5.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{c36f84daa7736878418d.js → 197ec52641aed20029c6.js} +1 -1
  14. package/assets/esri/core/workers/chunks/1b2a961f776a0b57e57a.js +1 -0
  15. package/assets/esri/core/workers/chunks/1b3fd66577b19aa5f2b6.js +1 -0
  16. package/assets/esri/core/workers/chunks/1c733b7db092a2a88ef3.js +1 -0
  17. package/assets/esri/core/workers/chunks/1f8c6a179e39fd4c5e6f.js +1 -0
  18. package/assets/esri/core/workers/chunks/2076fcbae63f1bfb7143.js +1 -0
  19. package/assets/esri/core/workers/chunks/{9387db408f496e7dd003.js → 214910032945dd2d86b0.js} +1 -1
  20. package/assets/esri/core/workers/chunks/27474b007988855bea9d.js +1 -0
  21. package/assets/esri/core/workers/chunks/281b89dbf5574fc642ae.js +1 -0
  22. package/assets/esri/core/workers/chunks/2c8fe9bc988c3c5760a5.js +1 -0
  23. package/assets/esri/core/workers/chunks/34b59d7099904dcb28b5.js +1 -0
  24. package/assets/esri/core/workers/chunks/357033117dfe61eb81ea.js +1 -0
  25. package/assets/esri/core/workers/chunks/{b2ebe4f6d100e15b512d.js → 37c03cfc19086ce631c6.js} +1 -1
  26. package/assets/esri/core/workers/chunks/386f86f961146f530aa7.js +1 -0
  27. package/assets/esri/core/workers/chunks/{e6165e17fbb07bfc40a1.js → 391e96192d1ec4e55ce2.js} +1 -1
  28. package/assets/esri/core/workers/chunks/44f0c3663b293afbd172.js +1 -0
  29. package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +1 -0
  30. package/assets/esri/core/workers/chunks/{c959e0d1cf7dce0421b9.js → 48fa8aed6c24877b44c4.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{438f0b5ae5c53ae4f06a.js → 4954fd86b48cc68b737c.js} +1 -1
  32. package/assets/esri/core/workers/chunks/49a1a633bb0d93764aae.js +1 -0
  33. package/assets/esri/core/workers/chunks/4ba6de8aa7e2960bad49.js +1 -0
  34. package/assets/esri/core/workers/chunks/4be35af7d6babbfe9d84.js +1 -0
  35. package/assets/esri/core/workers/chunks/5457962a70bd3c557a75.js +1 -0
  36. package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +1 -0
  37. package/assets/esri/core/workers/chunks/{b9c177524b3e7de1ffd1.js → 5790d171072b3c7d108f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{5dfe1f8d520025e2118b.js → 57b349d1dbc0bed75b79.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{97a28641b3b2fd31bea2.js → 5bcb3240b3c005e5fe72.js} +1 -1
  40. package/assets/esri/core/workers/chunks/5d11b97b667921d67ae7.js +1 -0
  41. package/assets/esri/core/workers/chunks/5dbe555a5a662ff3d9ce.js +1 -0
  42. package/assets/esri/core/workers/chunks/5ec98f4ddac707d0fbd1.js +1 -0
  43. package/assets/esri/core/workers/chunks/64b7e8d812ea8fcf269e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{ba5eb394f098968c22d2.js → 655b55ac0cd533d7e9d7.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{b0b036ad3ad3cd956747.js → 69fd99b7c76e9992ccf3.js} +1 -1
  46. package/assets/esri/core/workers/chunks/75d812955a473d0e8960.js +1 -0
  47. package/assets/esri/core/workers/chunks/7903a3e2e0faff0f86c0.js +1 -0
  48. package/assets/esri/core/workers/chunks/{cc146c57bbdac8029fd8.js → 7a5f5acfbd4ca1a5c1f3.js} +1 -1
  49. package/assets/esri/core/workers/chunks/83d00afae4406ec78bc9.js +1 -0
  50. package/assets/esri/core/workers/chunks/{434b16731c6a81f868ef.js → 85b1f36790df95b17659.js} +1 -1
  51. package/assets/esri/core/workers/chunks/89820b200ee44e678af5.js +1 -0
  52. package/assets/esri/core/workers/chunks/918bb7a7d901544a7367.js +1 -0
  53. package/assets/esri/core/workers/chunks/{94b8dbf859df71858d1c.js → 929c9b7cdab7c4ca3d87.js} +1 -1
  54. package/assets/esri/core/workers/chunks/949b2269457302ffc64b.js +1 -0
  55. package/assets/esri/core/workers/chunks/{601e697dc7414bda128a.js → 952980635afc7ec81804.js} +1 -1
  56. package/assets/esri/core/workers/chunks/9876a1bae350795fab36.js +1 -0
  57. package/assets/esri/core/workers/chunks/99619fcb772807c74f3b.js +1 -0
  58. package/assets/esri/core/workers/chunks/{010a71c2aa1b7681e191.js → 9d11f84e6c893b9d0019.js} +1 -1
  59. package/assets/esri/core/workers/chunks/a1930e4f035bc9aa1ae5.js +1 -0
  60. package/assets/esri/core/workers/chunks/a8692bffb76444c34760.js +1 -0
  61. package/assets/esri/core/workers/chunks/{f760a3e030b0f358a92a.js → aeaa1667c2d9f1b3366b.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{3f343f792fd9f44d6f25.js → b3f5e91116112b0b612a.js} +1 -1
  63. package/assets/esri/core/workers/chunks/b97953694f42bfec1b3c.js +1 -0
  64. package/assets/esri/core/workers/chunks/b9e9cb354822c6d995a4.js +1 -0
  65. package/assets/esri/core/workers/chunks/ba762bcfd74af0bb8218.js +1 -0
  66. package/assets/esri/core/workers/chunks/{e4b84ca8ddfd48dd79b1.js → bac9fc90e6756e211160.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{4c76146014dc15143ba3.js → be588873c16770ceb9ef.js} +1 -1
  68. package/assets/esri/core/workers/chunks/bf97a933ea3b220115e1.js +1 -0
  69. package/assets/esri/core/workers/chunks/bfedd6ebff817c9b31c0.js +1 -0
  70. package/assets/esri/core/workers/chunks/c093dff4592832ac0973.js +1 -0
  71. package/assets/esri/core/workers/chunks/c1135cb02ec46c491459.js +1 -0
  72. package/assets/esri/core/workers/chunks/{e4e2036373166c1d5cf5.js → c2253a9f29c1aabb2b75.js} +1 -1
  73. package/assets/esri/core/workers/chunks/d04fca5d46cca02500b7.js +1 -0
  74. package/assets/esri/core/workers/chunks/d08efbc349dd9f999497.js +1 -0
  75. package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +1 -0
  76. package/assets/esri/core/workers/chunks/{a8b13fb804bb775e4967.js → db3c729ce0c0b2690dc9.js} +1 -1
  77. package/assets/esri/core/workers/chunks/dd13772a5e2eccc6a2bc.js +1 -0
  78. package/assets/esri/core/workers/chunks/dedc333a61081772ca7b.js +1 -0
  79. package/assets/esri/core/workers/chunks/{6f50a9647f026a8d4729.js → e0c8d61c7a85ce15499a.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{199670a3a564ebe3bd79.js → e218bde41ffbcc5194f5.js} +1 -1
  81. package/assets/esri/core/workers/chunks/e21b211913aefde47e30.js +1 -0
  82. package/assets/esri/core/workers/chunks/e287f49184d076af17e2.js +1 -0
  83. package/assets/esri/core/workers/chunks/{bde1d5b0a7717350986e.js → e4019b63a1fe74e2c842.js} +1 -1
  84. package/assets/esri/core/workers/chunks/e8e775758b79c5a084c8.js +1 -0
  85. package/assets/esri/core/workers/chunks/e93dfdede0532a89ffa5.js +1 -0
  86. package/assets/esri/core/workers/chunks/ea595b0df5050eda2a13.js +1 -0
  87. package/assets/esri/core/workers/chunks/eb82ff10cef2bde6e57f.js +1 -0
  88. package/assets/esri/core/workers/chunks/ebc6f4764b82d4104c65.js +1 -0
  89. package/assets/esri/core/workers/chunks/{1305ef8717da6e902a55.js → ec10151a2a95e95a0bb5.js} +1 -1
  90. package/assets/esri/core/workers/chunks/eccba071ced2d922bb85.js +1 -0
  91. package/assets/esri/core/workers/chunks/ee6e0db58dc64410e687.js +1 -0
  92. package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +1 -0
  93. package/assets/esri/core/workers/chunks/f2124f4d0f2b8a91f0ea.js +1 -0
  94. package/assets/esri/core/workers/chunks/ff6abdc72076f3994659.js +981 -0
  95. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  96. package/assets/esri/themes/base/widgets/_Weather.scss +1 -1
  97. package/assets/esri/themes/dark/main.css +1 -1
  98. package/assets/esri/themes/dark-blue/main.css +1 -1
  99. package/assets/esri/themes/dark-green/main.css +1 -1
  100. package/assets/esri/themes/dark-purple/main.css +1 -1
  101. package/assets/esri/themes/dark-red/main.css +1 -1
  102. package/assets/esri/themes/light/main.css +1 -1
  103. package/assets/esri/themes/light/view.css +1 -1
  104. package/assets/esri/themes/light-blue/main.css +1 -1
  105. package/assets/esri/themes/light-green/main.css +1 -1
  106. package/assets/esri/themes/light-purple/main.css +1 -1
  107. package/assets/esri/themes/light-red/main.css +1 -1
  108. package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
  109. package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
  110. package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
  111. package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
  112. package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
  113. package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
  114. package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
  115. package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
  116. package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
  117. package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
  118. package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
  119. package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
  120. package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
  121. package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
  122. package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
  123. package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
  124. package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
  125. package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
  126. package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
  127. package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
  128. package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
  129. package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
  130. package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
  131. package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
  132. package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
  133. package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
  134. package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
  135. package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
  136. package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
  137. package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
  138. package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
  139. package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
  140. package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
  141. package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
  142. package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
  143. package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
  144. package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
  145. package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
  146. package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
  147. package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
  148. package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
  149. package/chunks/BlendLayers.glsl.js +2 -2
  150. package/chunks/ChapmanAtmosphere.glsl.js +17 -17
  151. package/chunks/CheckerBoard.glsl.js +3 -3
  152. package/chunks/Clouds.glsl.js +2 -2
  153. package/chunks/CloudsComposition.glsl.js +1 -1
  154. package/chunks/ColorMaterial.glsl.js +12 -12
  155. package/chunks/ComponentShader.glsl.js +3 -3
  156. package/chunks/Compositing.glsl.js +1 -1
  157. package/chunks/DefaultMaterial.glsl.js +33 -33
  158. package/chunks/EdgeShaderProgram.glsl.js +7 -7
  159. package/chunks/Fog.glsl.js +10 -12
  160. package/chunks/HUDMaterial.glsl.js +2 -2
  161. package/chunks/HighlightComposition.glsl.js +5 -5
  162. package/chunks/ImageMaterial.glsl.js +6 -6
  163. package/chunks/LaserlinePath.glsl.js +8 -8
  164. package/chunks/LineCallout.glsl.js +6 -6
  165. package/chunks/MeasurementArrow.glsl.js +1 -1
  166. package/chunks/NativeLine.glsl.js +1 -1
  167. package/chunks/Path.glsl.js +5 -5
  168. package/chunks/Pattern.glsl.js +9 -9
  169. package/chunks/PointRenderer.glsl.js +14 -14
  170. package/chunks/Precipitation.glsl.js +91 -0
  171. package/chunks/RealisticTree.glsl.js +21 -21
  172. package/chunks/RibbonLine.glsl.js +11 -11
  173. package/chunks/SMAA.glsl.js +40 -40
  174. package/chunks/ShadedColorMaterial.glsl.js +12 -12
  175. package/chunks/ShadowCast.glsl.js +6 -6
  176. package/chunks/ShadowHighlight.glsl.js +4 -4
  177. package/chunks/SimpleAtmosphere.glsl.js +3 -3
  178. package/chunks/SlicePlaneMaterial.glsl.js +3 -3
  179. package/chunks/Stars.glsl.js +3 -3
  180. package/chunks/Terrain.glsl.js +11 -11
  181. package/chunks/TextureOnly.glsl.js +2 -2
  182. package/chunks/WaterSurface.glsl.js +5 -5
  183. package/chunks/boundedPlane.js +1 -1
  184. package/chunks/vxlLayer.js +1 -1
  185. package/core/accessorSupport/watch.js +1 -1
  186. package/core/clock.js +1 -1
  187. package/core/jsonMap.js +1 -1
  188. package/core/loadAll.js +1 -1
  189. package/core/promiseUtils.js +1 -1
  190. package/core/reactiveUtils.js +1 -1
  191. package/form/ExpressionInfo.js +1 -1
  192. package/geometry/support/frustum.js +1 -1
  193. package/geometry/support/plane.js +1 -1
  194. package/interfaces.d.ts +232 -38
  195. package/layers/VectorTileLayer.js +1 -1
  196. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  197. package/layers/graphics/featureConversionUtils.js +1 -1
  198. package/layers/support/LayerContingentValuesCache.js +1 -1
  199. package/layers/support/TileInfo.js +1 -1
  200. package/package.json +1 -1
  201. package/rest/print.js +1 -1
  202. package/smartMapping/statistics/support/predominanceUtils.d.ts +4 -0
  203. package/support/arcadeOnDemand.js +1 -1
  204. package/support/featureFlags.js +1 -1
  205. package/support/revision.js +1 -1
  206. package/symbols/FillSymbol3DLayer.js +1 -1
  207. package/symbols/IconSymbol3DLayer.js +1 -1
  208. package/symbols/ObjectSymbol3DLayer.js +1 -1
  209. package/symbols/Symbol3D.js +1 -1
  210. package/symbols/WebStyleSymbol.js +1 -1
  211. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  212. package/symbols/support/IconSymbol3DLayerResource.js +1 -1
  213. package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
  214. package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
  215. package/symbols/support/Symbol3DAnchorPosition3D.js +1 -1
  216. package/symbols/support/Symbol3DFillMaterial.js +1 -1
  217. package/symbols/support/Symbol3DIconOutline.js +1 -1
  218. package/symbols/support/Symbol3DOutline.js +1 -1
  219. package/symbols/support/Thumbnail.js +1 -1
  220. package/symbols/support/webStyleSymbolUtils.js +1 -1
  221. package/views/2d/MapViewConstraints.js +1 -1
  222. package/views/2d/engine/vectorTiles/SchemaHelper.js +1 -1
  223. package/views/2d/viewpointUtils.js +1 -1
  224. package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
  225. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  226. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  227. package/views/3d/environment/CloudsGenerator.js +1 -1
  228. package/views/3d/environment/CloudsPresets.js +1 -1
  229. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  230. package/views/3d/environment/Fog.glsl.js +1 -1
  231. package/views/3d/environment/Fog.js +1 -1
  232. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  233. package/views/3d/environment/Precipitation.glsl.js +5 -0
  234. package/views/3d/environment/Precipitation.js +5 -0
  235. package/views/3d/environment/PrecipitationTechnique.js +5 -0
  236. package/views/3d/environment/RainyWeather.js +1 -1
  237. package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
  238. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  239. package/views/3d/environment/SnowyWeather.js +5 -0
  240. package/views/3d/environment/Stars.glsl.js +1 -1
  241. package/views/3d/environment/Stars.js +1 -1
  242. package/views/3d/environment/weather.js +1 -1
  243. package/views/3d/interactive/analysisTools/slice/SliceTool.js +1 -1
  244. package/views/3d/interactive/analysisTools/slice/sliceToolUtils.js +1 -1
  245. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  246. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  247. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  248. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  249. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  250. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  251. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  252. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  253. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  254. package/views/3d/layers/GraphicsView3D.js +1 -1
  255. package/views/3d/layers/I3SMeshView3D.js +1 -1
  256. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  257. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  258. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  259. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  260. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  261. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  262. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  263. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  264. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  265. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  266. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  267. package/views/3d/layers/graphics/lineUtils.js +1 -1
  268. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  269. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  270. package/views/3d/layers/graphics/symbolComplexity.js +1 -1
  271. package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
  272. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  273. package/views/3d/layers/support/HeatmapFeatureProcessor.js +5 -0
  274. package/views/3d/layers/support/overlayImageUtils.js +1 -1
  275. package/views/3d/layers/support/patternUtils.js +1 -1
  276. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  277. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  278. package/views/3d/support/LaserLineRenderer.js +1 -1
  279. package/views/3d/support/LaserlinePathData.js +1 -1
  280. package/views/3d/support/sunUtils.js +1 -1
  281. package/views/3d/terrain/OverlayRenderer.js +1 -1
  282. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  283. package/views/3d/terrain/TerrainRenderer.js +1 -1
  284. package/views/3d/terrain/TerrainSurface.js +1 -1
  285. package/views/3d/terrain/Tile.js +1 -1
  286. package/views/3d/terrain/terrainUtils.js +1 -1
  287. package/views/3d/terrain/tileUtils.js +1 -1
  288. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  289. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  290. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  291. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +10 -10
  292. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  293. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  294. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  295. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  296. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
  297. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +2 -2
  298. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.js +2 -2
  299. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +2 -2
  300. package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
  301. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +1 -1
  302. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +1 -1
  303. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
  304. package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +1 -1
  305. package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +3 -3
  306. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +1 -1
  307. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -6
  308. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +12 -12
  309. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +4 -4
  310. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
  311. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +16 -16
  312. package/views/3d/webgl-engine/core/shaderLibrary/default/RealisticTree.glsl.js +1 -1
  313. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +5 -5
  314. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +3 -3
  315. package/views/3d/webgl-engine/core/shaderLibrary/raster/BasicGrid.glsl.js +2 -2
  316. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +6 -6
  317. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
  318. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +10 -11
  319. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +2 -2
  320. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +2 -2
  321. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js +2 -2
  322. package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +6 -6
  323. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +4 -4
  324. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -6
  325. package/views/3d/webgl-engine/core/shaderLibrary/shading/Reprojection.glsl.js +4 -4
  326. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +5 -5
  327. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
  328. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +10 -10
  329. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
  330. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
  331. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +4 -4
  332. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  333. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  334. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  335. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  336. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  337. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  338. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  339. package/views/3d/webgl-engine/lib/MagnifierHelper.js +1 -1
  340. package/views/3d/webgl-engine/lib/Material.js +1 -1
  341. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  342. package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
  343. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  344. package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
  345. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  346. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  347. package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
  348. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  349. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  350. package/views/3d/webgl-engine/lib/TextureUniformName.js +4 -0
  351. package/views/3d/webgl-engine/lib/UniformName.js +4 -0
  352. package/views/3d/webgl-engine/lib/VertexAttribute.js +5 -0
  353. package/views/3d/webgl-engine/lib/basicInterfaces.js +1 -1
  354. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  355. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  356. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  357. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  358. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  359. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  360. package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
  361. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  362. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  363. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  364. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  365. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  366. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  367. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  368. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  369. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  370. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  371. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  372. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  373. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  374. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  375. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  376. package/views/3d/webgl-engine/materials/VisualVariableMaterialParameters.js +1 -1
  377. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  378. package/views/3d/webgl-engine/materials/internal/DefaultBufferWriter.js +1 -1
  379. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  380. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  381. package/views/3d/webgl-engine/materials/internal/waterMaterialUtils.js +1 -1
  382. package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
  383. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  384. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  385. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  386. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  387. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  388. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  389. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  390. package/views/3d/webgl-engine/shaders/HighlightComposition.glsl.js +1 -1
  391. package/views/3d/webgl-engine/shaders/HighlightTechnique.js +1 -1
  392. package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
  393. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  394. package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +1 -1
  395. package/views/3d/webgl-engine/shaders/LaserlinePathTechnique.js +1 -1
  396. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  397. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  398. package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +1 -1
  399. package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
  400. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  401. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  402. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  403. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  404. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  405. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  406. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  407. package/views/3d/webgl-engine/shaders/SMAA.glsl.js +1 -1
  408. package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
  409. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  410. package/views/3d/webgl-engine/shaders/ShadowCastTechnique.js +1 -1
  411. package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
  412. package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
  413. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  414. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +10 -10
  415. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardShortEdges.glsl.js +1 -1
  416. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShaderProgram.glsl.js +1 -1
  417. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +21 -21
  418. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +6 -6
  419. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +13 -13
  420. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/UnpackAttributes.glsl.js +6 -6
  421. package/views/MapView.js +1 -1
  422. package/views/SceneView.js +1 -1
  423. package/views/View.js +1 -1
  424. package/views/input/recognizers/DoubleTapDrag.js +1 -1
  425. package/views/input/recognizers/ImmediateDoubleClick.js +1 -1
  426. package/views/input/recognizers/PointerClickHoldAndDrag.js +1 -1
  427. package/views/input/recognizers/SingleAndDoubleClick.js +1 -1
  428. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  429. package/views/support/DefaultsFromMap.js +1 -1
  430. package/views/support/WatchUpdatingTracking.js +1 -1
  431. package/views/support/projectionUtils.js +5 -0
  432. package/views/webgl/BufferObject.js +1 -1
  433. package/views/webgl/InstanceCounter.js +1 -1
  434. package/views/webgl/Program.js +1 -1
  435. package/webdoc/support/{Thumbnail.js → SlideThumbnail.js} +1 -1
  436. package/webmap/Bookmark.js +1 -1
  437. package/webmap/Version.js +1 -1
  438. package/webscene/Slide.js +1 -1
  439. package/webscene/Version.js +1 -1
  440. package/webscene/support/SlideVisibleLayer.js +1 -1
  441. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  442. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  443. package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
  444. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  445. package/widgets/BasemapGallery.js +1 -1
  446. package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
  447. package/widgets/Bookmarks.js +1 -1
  448. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  449. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  450. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  451. package/widgets/Search/support/locatorUtils.js +1 -1
  452. package/widgets/Search.js +1 -1
  453. package/widgets/Slice/SliceViewModel.js +1 -1
  454. package/widgets/TimeSlider.js +1 -1
  455. package/widgets/Weather/WeatherViewModel.js +1 -1
  456. package/widgets/Weather/css.js +1 -1
  457. package/widgets/Weather/enums.js +5 -0
  458. package/widgets/Weather.js +1 -1
  459. package/widgets/support/InteractiveToolViewModel.js +1 -1
  460. package/assets/esri/core/workers/chunks/00c5bb5eecb0e89266df.js +0 -1
  461. package/assets/esri/core/workers/chunks/021a37e2b191298e80b7.js +0 -1
  462. package/assets/esri/core/workers/chunks/1370c92c40fd6271553c.js +0 -1
  463. package/assets/esri/core/workers/chunks/14bef72154b3a19561a7.js +0 -1
  464. package/assets/esri/core/workers/chunks/18668dc45eb9e35530df.js +0 -1
  465. package/assets/esri/core/workers/chunks/1e4d37c2b9dc83d20a11.js +0 -1
  466. package/assets/esri/core/workers/chunks/1fbcc8424452d0256bd6.js +0 -1
  467. package/assets/esri/core/workers/chunks/208a7e24e19fc5633dd7.js +0 -1
  468. package/assets/esri/core/workers/chunks/22b09e276c9b9f22f0f8.js +0 -1
  469. package/assets/esri/core/workers/chunks/23b15e7c2f96d260e16c.js +0 -1
  470. package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +0 -1
  471. package/assets/esri/core/workers/chunks/2792ca40f1e92849247c.js +0 -1
  472. package/assets/esri/core/workers/chunks/2a96f1bba9ce6883e5e0.js +0 -1
  473. package/assets/esri/core/workers/chunks/3231ee3e090bb4cac3fc.js +0 -1
  474. package/assets/esri/core/workers/chunks/36a3f6fb4d1d18fcb642.js +0 -1
  475. package/assets/esri/core/workers/chunks/36e250278b5622ccf068.js +0 -1
  476. package/assets/esri/core/workers/chunks/395ba088d4864588ff66.js +0 -1
  477. package/assets/esri/core/workers/chunks/3aa4194dc5497c57647f.js +0 -1
  478. package/assets/esri/core/workers/chunks/3cc77692b2eee27b9c9e.js +0 -1
  479. package/assets/esri/core/workers/chunks/40a1e713f63ec77110c0.js +0 -1
  480. package/assets/esri/core/workers/chunks/4385a268c2a64281d1c1.js +0 -1
  481. package/assets/esri/core/workers/chunks/46b4bb66a54bbd8e2e57.js +0 -1
  482. package/assets/esri/core/workers/chunks/4bfbf5a34c9207fdcf44.js +0 -1
  483. package/assets/esri/core/workers/chunks/5a4a5585ec8027079f32.js +0 -1
  484. package/assets/esri/core/workers/chunks/5d4863a92b03bebc1b54.js +0 -1
  485. package/assets/esri/core/workers/chunks/5d991b74d958005c26c4.js +0 -1
  486. package/assets/esri/core/workers/chunks/634b5ccd7a3ac67f855d.js +0 -1
  487. package/assets/esri/core/workers/chunks/662d13f68cf3ec92439b.js +0 -1
  488. package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +0 -1
  489. package/assets/esri/core/workers/chunks/7bc5cc5dbf1b7b70ddac.js +0 -1
  490. package/assets/esri/core/workers/chunks/7d661129a0d8c466eeec.js +0 -1
  491. package/assets/esri/core/workers/chunks/8070972c0efb78523b68.js +0 -1
  492. package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.js +0 -1
  493. package/assets/esri/core/workers/chunks/8b6ab6202a40fe622833.js +0 -1
  494. package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +0 -1
  495. package/assets/esri/core/workers/chunks/9796d54ff12b6429164a.js +0 -1
  496. package/assets/esri/core/workers/chunks/98986e6601b0366376b4.js +0 -1
  497. package/assets/esri/core/workers/chunks/9cdcf9309d6feda70185.js +0 -1
  498. package/assets/esri/core/workers/chunks/aa861b8eae6c85f3dad4.js +0 -1
  499. package/assets/esri/core/workers/chunks/aace7e1fef256bb961c9.js +0 -1
  500. package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +0 -1
  501. package/assets/esri/core/workers/chunks/af5694b4d278cf1db2d9.js +0 -1
  502. package/assets/esri/core/workers/chunks/afbb4f802ca5774f0326.js +0 -1
  503. package/assets/esri/core/workers/chunks/b2c5f92e3d7606297ca9.js +0 -1
  504. package/assets/esri/core/workers/chunks/b8316c6469a543029bc6.js +0 -1
  505. package/assets/esri/core/workers/chunks/ba615f118a3a8970ef25.js +0 -1
  506. package/assets/esri/core/workers/chunks/ba6654a885be4b7a43f0.js +0 -1
  507. package/assets/esri/core/workers/chunks/bf0a65b4be31959f921d.js +0 -1
  508. package/assets/esri/core/workers/chunks/c11474b702dfb94e8e87.js +0 -1
  509. package/assets/esri/core/workers/chunks/c890c7fca27170e3341f.js +0 -1
  510. package/assets/esri/core/workers/chunks/c976785f2391c77d8a30.js +0 -1
  511. package/assets/esri/core/workers/chunks/ca2f5faa01d99c21ec14.js +0 -1
  512. package/assets/esri/core/workers/chunks/cef4af64860ebbfc1c47.js +0 -1
  513. package/assets/esri/core/workers/chunks/cfbffa429d88e7709c3f.js +0 -1
  514. package/assets/esri/core/workers/chunks/d24c4fbc567486b1188f.js +0 -1
  515. package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +0 -981
  516. package/assets/esri/core/workers/chunks/e4f93c55eaefab4192b5.js +0 -1
  517. package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +0 -1
  518. package/assets/esri/core/workers/chunks/ec89466f76d0ba22525e.js +0 -1
  519. package/assets/esri/core/workers/chunks/ee45618c45806ab654cb.js +0 -1
  520. package/assets/esri/core/workers/chunks/f467c8f1fce22f6f599c.js +0 -1
  521. package/assets/esri/core/workers/chunks/f4baa5ea2e42b1317941.js +0 -1
  522. package/assets/esri/core/workers/chunks/face43cf5abcd2f5bd9d.js +0 -1
  523. package/assets/esri/core/workers/chunks/ffaf091c6023225cf5aa.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../Color.js";import t from"../../request.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{pt2px as a}from"../../core/screenUtils.js";import{numericHash as i}from"../../core/string.js";import{getJsonType as s,isPolygon as o,isPolyline as n}from"../../geometry/support/jsonUtils.js";import{analyzeCIMSymbol as c,analyzeCIMResource as l}from"./cimAnalyzer.js";import m from"./CIMResourceManager.js";import h from"./Rasterizer.js";import{TextRasterizer as f}from"./TextRasterizer.js";import{createLabelOverrideFunction as g,evaluateValueOrFunction as u,colorToArray as y}from"./utils.js";import{scaleCIMMarker as p}from"../support/cimSymbolUtils.js";import d from"../support/Symbol3DAnchorPosition2D.js";var M;!function(e){e.Legend="legend",e.Preview="preview"}(M||(M={}));const C=(e,t,r)=>{if(e&&e.targetSize){let i;if(r){const t=Math.max(r.frame.xmax-r.frame.xmin,r.frame.ymax-r.frame.ymin);i=e.targetSize/a(t)}else i=e.targetSize/t.referenceSize;return i}return e&&e.scaleFactor?e.scaleFactor:1},I={fill:{legend:{frame:{xmax:15,xmin:0,ymax:15,ymin:0},geometry:{rings:[[[0,15],[15,7.5],[15,0],[0,0],[0,15]]]},canvasPaths:{rings:[[[0,15],[0,0],[15,7.5],[15,15],[0,15]]]}},preview:{frame:{xmax:100,xmin:0,ymax:100,ymin:0},geometry:{rings:[[[0,100],[100,100],[100,0],[0,0],[0,100]]]},canvasPaths:{rings:[[[0,100],[0,0],[100,0],[100,100],[0,100]]]}}},stroke:{legend:{frame:{xmax:24,xmin:0,ymax:2,ymin:-2},geometry:{paths:[[[0,0],[12,0],[24,0]]]},canvasPaths:{paths:[[[0,2],[12,2],[24,2]]]}},preview:{frame:{xmax:100,xmin:0,ymax:2,ymin:-2},geometry:{paths:[[[0,0],[50,0],[100,0]]]},canvasPaths:{paths:[[[0,2],[50,2],[100,2]]]}}}};class z{constructor(e,t){this._spatialReference=e,this._avoidSDF=t,this._resourceCache=new Map,this._pictureMarkerCache=new Map,this._textRasterizer=new f,this._cimResourceManager=new m,this._rasterizer=new h(this._cimResourceManager)}async rasterizeCIMSymbolAsync(e,t,r,a,i,o,n,c){a=a||(t?null!=t.centroid?"esriGeometryPolygon":s(t.geometry):null)||x(e);const l=await this.analyzeCIMSymbol(e,t?P(t.attributes):null,r,a,c);return this.rasterizeCIMSymbol(l,t,a,i,o,n)}async analyzeCIMSymbol(e,t,a,i,s){const o=[],n=t?{geometryType:i,spatialReference:this._spatialReference,fields:t}:null;let l;await c(e.data,n,this._cimResourceManager,o,this._avoidSDF),r(s);for(const r of o)"CIMPictureMarker"!==r.cim.type&&"CIMPictureFill"!==r.cim.type&&"CIMPictureStroke"!==r.cim.type||(l||(l=[]),l.push(this._fetchPictureMarkerResource(r,s))),a&&"text"===r.type&&"string"==typeof r.text&&r.text.indexOf("[")>-1&&(r.text=g(a,r.text,r.cim.textCase));return l&&await Promise.all(l),o}async _fetchPictureMarkerResource(e,r){const a=e.materialHash;if(!this._pictureMarkerCache.get(a)){const i=(await t(e.cim.url,{responseType:"image",signal:r&&r.signal})).data;this._pictureMarkerCache.set(a,i)}}rasterizeCIMSymbol(e,t,r,a,i,s){const o=[];for(const n of e){a&&"function"==typeof a.scaleFactor&&(a.scaleFactor=a.scaleFactor(t,i,s));const e=this._getRasterizedResource(n,t,r,a,i,s);if(!e)continue;let c=0,l=e.anchorX||0,m=e.anchorY||0,h=!1,f=0,g=0;if("esriGeometryPoint"===r){const e=C(a,n,null);if(f=u(n.offsetX,t,i,s)*e||0,g=u(n.offsetY,t,i,s)*e||0,"marker"===n.type)c=u(n.rotation,t,i,s)||0,h=!!n.rotateClockwise&&n.rotateClockwise;else if("text"===n.type){if(c=u(n.angle,t,i,s)||0,void 0!==n.horizontalAlignment)switch(n.horizontalAlignment){case"left":l=-.5;break;case"right":l=.5;break;default:l=0}if(void 0!==n.verticalAlignment)switch(n.verticalAlignment){case"top":m=.5;break;case"bottom":m=-.5;break;case"baseline":m=-.25;break;default:m=0}}}null!=e&&o.push({angle:c,rotateClockWise:h,anchorX:l,anchorY:m,offsetX:f,offsetY:g,rasterizedResource:e})}return this.getSymbolImage(o)}getSymbolImage(e){const t=document.createElement("canvas"),r=t.getContext("2d");let i=0,s=0,o=0,n=0;const c=[];for(let f=0;f<e.length;f++){const t=e[f],l=t.rasterizedResource;if(!l)continue;const m=l.size,h=t.offsetX,g=t.offsetY,u=t.anchorX,y=t.anchorY,p=t.rotateClockWise||!1;let d=t.angle,M=a(h)-m[0]*(.5+u),C=a(g)-m[1]*(.5+y),I=M+m[0],z=C+m[1];if(d){p&&(d=-d);const e=Math.sin(d*Math.PI/180),t=Math.cos(d*Math.PI/180),r=M*t-C*e,a=M*e+C*t,i=M*t-z*e,s=M*e+z*t,o=I*t-z*e,n=I*e+z*t,c=I*t-C*e,l=I*e+C*t;M=Math.min(r,i,o,c),C=Math.min(a,s,n,l),I=Math.max(r,i,o,c),z=Math.max(a,s,n,l)}i=M<i?M:i,s=C<s?C:s,o=I>o?I:o,n=z>n?z:n;const P=r.createImageData(l.size[0],l.size[1]);P.data.set(new Uint8ClampedArray(l.image.buffer));const x={offsetX:h,offsetY:g,rotateClockwise:p,angle:d,rasterizedImage:P,anchorX:u,anchorY:y};c.push(x)}t.width=o-i,t.height=n-s;const l=-i,m=n;for(let f=0;f<c.length;f++){const e=c[f],t=this._imageDataToCanvas(e.rasterizedImage),i=e.rasterizedImage.width,s=e.rasterizedImage.height,o=l-i*(.5+e.anchorX),n=m-s*(.5-e.anchorY);if(e.angle){const i=(360-e.angle)*Math.PI/180;r.save(),r.translate(a(e.offsetX),-a(e.offsetY)),r.translate(l,m),r.rotate(i),r.translate(-l,-m),r.drawImage(t,o,n),r.restore()}else r.drawImage(t,o+a(e.offsetX),n-a(e.offsetY))}const h=new d({x:l/t.width-.5,y:m/t.height-.5});return{imageData:0!==t.width&&0!==t.height?r.getImageData(0,0,t.width,t.height):r.createImageData(1,1),anchorPosition:h}}_imageDataToCanvas(e){this._imageDataCanvas||(this._imageDataCanvas=document.createElement("canvas"));const t=this._imageDataCanvas,r=t.getContext("2d");return t.width=e.width,t.height=e.height,r.putImageData(e,0,0),t}_imageTo32Array(t,r,a,i){this._imageDataCanvas||(this._imageDataCanvas=document.createElement("canvas"));const s=this._imageDataCanvas,o=s.getContext("2d");if(s.width=r,s.height=a,o.drawImage(t,0,0,r,a),i){o.save();const s=new e(i);o.fillStyle=s.toHex(),o.globalCompositeOperation="multiply",o.fillRect(0,0,r,a),o.globalCompositeOperation="destination-atop",o.drawImage(t,0,0,r,a),o.restore()}return new Uint32Array(o.getImageData(0,0,r,a).data.buffer)}_getRasterizedResource(e,t,r,a,s,o){let n,c,l,m,h=null,f=null;if("esriGeometryPolyline"===r||"esriGeometryPolygon"===r){const m=a&&a.style?a.style:M.Legend,g="esriGeometryPolyline"===r?I.stroke[m]:I.fill[m];if("line"===e.type){if("CIMSolidStroke"!==e.cim.type){if("CIMPictureStroke"===e.cim.type){const r=u(e.width,t,s,o),a=u(e.color,t,s,o),{image:i,width:n,height:c}=this._getPictureResource(e,r,a);return this._rasterizePictureResource(e,i,n,c,g,r)}return null}({analyzedCIM:n,hash:l}=w(e,t,s,o)),c=this._embedCIMLayerInVectorMarker(n,g)}else if("marker"===e.type){if("CIMPictureMarker"===e.cim.type){const r=u(e.size,t,s,o),a=u(e.color,t,s,o),{image:i,width:n,height:c}=this._getPictureResource(e,r,a);return this._rasterizePictureResource(e,i,n,c,g,r)}if("CIMVectorMarker"!==e.cim.type)return null;e.cim.offsetX=u(e.offsetX,t,s,o),e.cim.offsetY=u(e.offsetY,t,s,o),e.cim.rotation=u(e.rotation,t,s,o),e.cim.markerPlacement=e.markerPlacement,({analyzedCIM:n}=w(e,t,s,o)),l=i(JSON.stringify(n)).toString(),c=this._embedCIMLayerInVectorMarker(n,g),h=u(e.size,t,s,o),f=e.path}else{if("text"===e.type)return null;if("fill"===e.type){if("CIMHatchFill"===e.cim.type||"CIMVectorMarker"===e.cim.type||"CIMPictureMarker"===e.cim.type||"CIMPictureFill"===e.cim.type){const r=e.cim.size||e.cim.height;let a,i,c;if("CIMPictureMarker"===e.cim.type||"CIMPictureFill"===e.cim.type)({image:a,width:i,height:c}=this._getPictureResource(e,r,u(e.color,t,s,o)));else{({analyzedCIM:n,hash:l}=w(e,t,s,o));const m=this._rasterizer.rasterizeJSONResource({cim:n,type:e.type,url:e.url,mosaicHash:l,size:r,path:f},1,this._avoidSDF);a=m.image,i=m.size[0],c=m.size[1]}return this._rasterizePictureResource(e,a,i,c,g,null)}if("CIMSolidFill"!==e.cim.type)return null;({analyzedCIM:n,hash:l}=w(e,t,s,o)),c=this._embedCIMLayerInVectorMarker(n,g)}}}else{if("text"===e.type)return m=this._rasterizeTextResource(e,t,a,s,o),m;({analyzedCIM:n,hash:l}=w(e,t,s,o));const r=C(a,e,null);if("CIMPictureMarker"===e.cim.type){const a=u(e.size,t,s,o)*r,{image:i,width:n,height:c}=this._getPictureResource(e,a,u(e.color,t,s,o));return m={image:i,size:[n,c],sdf:!1,simplePattern:!1,anchorX:e.anchorPoint?e.anchorPoint.x:0,anchorY:e.anchorPoint?e.anchorPoint.y:0},m}p(n,r,{preserveOutlineWidth:!1}),c=n}l+=r,a&&(l+=JSON.stringify(a));const g=this._resourceCache;return g.has(l)?g.get(l):(m=this._rasterizer.rasterizeJSONResource({cim:c,type:e.type,url:e.url,mosaicHash:l,size:h,path:f},window.devicePixelRatio||1,this._avoidSDF),g.set(l,m),m)}_rasterizeTextResource(e,t,r,a,i){const s=C(r,e,null),o=u(e.text,t,a,i);if(!o||0===o.length)return null;const n=u(e.fontName,t,a,i),c=u(e.style,t,a,i),l=u(e.weight,t,a,i),m=u(e.decoration,t,a,i),h=u(e.size,t,a,i)*s,f=u(e.horizontalAlignment,t,a,i),g=u(e.verticalAlignment,t,a,i),p=y(u(e.color,t,a,i)),d=y(u(e.outlineColor,t,a,i)),M={color:p,size:h,horizontalAlignment:f,verticalAlignment:g,font:{family:n,style:c,weight:l,decoration:m},halo:{size:u(e.outlineSize,t,a,i)||0,color:d,style:c},pixelRatio:1,premultiplyColors:!this._avoidSDF};return this._textRasterizer.rasterizeText(o,M)}_rasterizePictureResource(e,t,r,i,s,c){const l=document.createElement("canvas"),m=l.getContext("2d");l.height=a(Math.max(s.frame.ymax-s.frame.ymin,c)),l.width=a(s.frame.xmax-s.frame.xmin);const h=m.createImageData(r,i);h.data.set(new Uint8ClampedArray(t.buffer));const f=this._imageDataToCanvas(h),g=m.createPattern(f,"repeat"),u=Math.cos((-e.cim.rotation||0)*Math.PI/180),y=Math.sin((-e.cim.rotation||0)*Math.PI/180);g.setTransform({m11:u,m12:y,m21:-y,m22:u,m41:a(e.cim.offsetX)||0,m42:a(e.cim.offsetY)||0});const p=s.canvasPaths;let d,M,C;o(p)?(d=p.rings,m.fillStyle=g,M=m.fill,C=["evenodd"]):n(p)&&(d=p.paths,m.strokeStyle=g,m.lineWidth=c,M=m.stroke,d[0][0][1]=l.height/2,d[0][1][1]=l.height/2),m.beginPath();for(const o of d){const e=o?o.length:0;if(e>1){let t=o[0];m.moveTo(a(t[0]),a(t[1]));for(let r=1;r<e;++r)t=o[r],m.lineTo(a(t[0]),a(t[1]));m.closePath()}}M.apply(m,C);const I=m.getImageData(0,0,l.width,l.height),z=new Uint8Array(I.data);return{size:[l.width,l.height],image:new Uint32Array(z.buffer),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0}}_getPictureResource(e,t,r){const i=this._pictureMarkerCache.get(e.materialHash);if(!i)return null;const s=i.height/i.width,o=t?s>1?a(t):a(t)/s:i.width,n=t?s>1?a(t)*s:a(t):i.height;return{image:this._imageTo32Array(i,o,n,r),width:o,height:n}}_embedCIMLayerInVectorMarker(e,t){const r=o(t.geometry)?"CIMPolygonSymbol":"CIMLineSymbol",a=t.frame;return{type:"CIMVectorMarker",frame:a,size:a.ymax-a.ymin,markerGraphics:[{type:"CIMMarkerGraphic",geometry:t.geometry,symbol:{type:r,symbolLayers:[e]}}]}}}function P(e){return(e?Object.keys(e):[]).map((t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"})))}function x(e){if(!(e&&e.data&&e.data.symbol))return null;switch(e.data.symbol.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function w(e,t,r,a){let i,s;if("function"==typeof e.materialHash){i=(0,e.materialHash)(t,r,a),s=l(e.cim,e.materialOverrides)}else i=e.materialHash,s=e.cim;return{analyzedCIM:s,hash:i}}export{z as CIMSymbolRasterizer,M as GeometryStyle};
5
+ import e from"../../Color.js";import t from"../../request.js";import{throwIfAborted as r}from"../../core/promiseUtils.js";import{pt2px as a}from"../../core/screenUtils.js";import{numericHash as i}from"../../core/string.js";import{getJsonType as s,isPolygon as o,isPolyline as n}from"../../geometry/support/jsonUtils.js";import{analyzeCIMSymbol as c,analyzeCIMResource as l}from"./cimAnalyzer.js";import m from"./CIMResourceManager.js";import h from"./Rasterizer.js";import{TextRasterizer as f}from"./TextRasterizer.js";import{createLabelOverrideFunction as g,evaluateValueOrFunction as u,colorToArray as y}from"./utils.js";import{scaleCIMMarker as p}from"../support/cimSymbolUtils.js";import{Symbol3DAnchorPosition2D as d}from"../support/Symbol3DAnchorPosition2D.js";var M;!function(e){e.Legend="legend",e.Preview="preview"}(M||(M={}));const C=(e,t,r)=>{if(e&&e.targetSize){let i;if(r){const t=Math.max(r.frame.xmax-r.frame.xmin,r.frame.ymax-r.frame.ymin);i=e.targetSize/a(t)}else i=e.targetSize/t.referenceSize;return i}return e&&e.scaleFactor?e.scaleFactor:1},I={fill:{legend:{frame:{xmax:15,xmin:0,ymax:15,ymin:0},geometry:{rings:[[[0,15],[15,7.5],[15,0],[0,0],[0,15]]]},canvasPaths:{rings:[[[0,15],[0,0],[15,7.5],[15,15],[0,15]]]}},preview:{frame:{xmax:100,xmin:0,ymax:100,ymin:0},geometry:{rings:[[[0,100],[100,100],[100,0],[0,0],[0,100]]]},canvasPaths:{rings:[[[0,100],[0,0],[100,0],[100,100],[0,100]]]}}},stroke:{legend:{frame:{xmax:24,xmin:0,ymax:2,ymin:-2},geometry:{paths:[[[0,0],[12,0],[24,0]]]},canvasPaths:{paths:[[[0,2],[12,2],[24,2]]]}},preview:{frame:{xmax:100,xmin:0,ymax:2,ymin:-2},geometry:{paths:[[[0,0],[50,0],[100,0]]]},canvasPaths:{paths:[[[0,2],[50,2],[100,2]]]}}}};class z{constructor(e,t){this._spatialReference=e,this._avoidSDF=t,this._resourceCache=new Map,this._pictureMarkerCache=new Map,this._textRasterizer=new f,this._cimResourceManager=new m,this._rasterizer=new h(this._cimResourceManager)}async rasterizeCIMSymbolAsync(e,t,r,a,i,o,n,c){a=a||(t?null!=t.centroid?"esriGeometryPolygon":s(t.geometry):null)||x(e);const l=await this.analyzeCIMSymbol(e,t?P(t.attributes):null,r,a,c);return this.rasterizeCIMSymbol(l,t,a,i,o,n)}async analyzeCIMSymbol(e,t,a,i,s){const o=[],n=t?{geometryType:i,spatialReference:this._spatialReference,fields:t}:null;let l;await c(e.data,n,this._cimResourceManager,o,this._avoidSDF),r(s);for(const r of o)"CIMPictureMarker"!==r.cim.type&&"CIMPictureFill"!==r.cim.type&&"CIMPictureStroke"!==r.cim.type||(l||(l=[]),l.push(this._fetchPictureMarkerResource(r,s))),a&&"text"===r.type&&"string"==typeof r.text&&r.text.indexOf("[")>-1&&(r.text=g(a,r.text,r.cim.textCase));return l&&await Promise.all(l),o}async _fetchPictureMarkerResource(e,r){const a=e.materialHash;if(!this._pictureMarkerCache.get(a)){const i=(await t(e.cim.url,{responseType:"image",signal:r&&r.signal})).data;this._pictureMarkerCache.set(a,i)}}rasterizeCIMSymbol(e,t,r,a,i,s){const o=[];for(const n of e){a&&"function"==typeof a.scaleFactor&&(a.scaleFactor=a.scaleFactor(t,i,s));const e=this._getRasterizedResource(n,t,r,a,i,s);if(!e)continue;let c=0,l=e.anchorX||0,m=e.anchorY||0,h=!1,f=0,g=0;if("esriGeometryPoint"===r){const e=C(a,n,null);if(f=u(n.offsetX,t,i,s)*e||0,g=u(n.offsetY,t,i,s)*e||0,"marker"===n.type)c=u(n.rotation,t,i,s)||0,h=!!n.rotateClockwise&&n.rotateClockwise;else if("text"===n.type){if(c=u(n.angle,t,i,s)||0,void 0!==n.horizontalAlignment)switch(n.horizontalAlignment){case"left":l=-.5;break;case"right":l=.5;break;default:l=0}if(void 0!==n.verticalAlignment)switch(n.verticalAlignment){case"top":m=.5;break;case"bottom":m=-.5;break;case"baseline":m=-.25;break;default:m=0}}}null!=e&&o.push({angle:c,rotateClockWise:h,anchorX:l,anchorY:m,offsetX:f,offsetY:g,rasterizedResource:e})}return this.getSymbolImage(o)}getSymbolImage(e){const t=document.createElement("canvas"),r=t.getContext("2d");let i=0,s=0,o=0,n=0;const c=[];for(let f=0;f<e.length;f++){const t=e[f],l=t.rasterizedResource;if(!l)continue;const m=l.size,h=t.offsetX,g=t.offsetY,u=t.anchorX,y=t.anchorY,p=t.rotateClockWise||!1;let d=t.angle,M=a(h)-m[0]*(.5+u),C=a(g)-m[1]*(.5+y),I=M+m[0],z=C+m[1];if(d){p&&(d=-d);const e=Math.sin(d*Math.PI/180),t=Math.cos(d*Math.PI/180),r=M*t-C*e,a=M*e+C*t,i=M*t-z*e,s=M*e+z*t,o=I*t-z*e,n=I*e+z*t,c=I*t-C*e,l=I*e+C*t;M=Math.min(r,i,o,c),C=Math.min(a,s,n,l),I=Math.max(r,i,o,c),z=Math.max(a,s,n,l)}i=M<i?M:i,s=C<s?C:s,o=I>o?I:o,n=z>n?z:n;const P=r.createImageData(l.size[0],l.size[1]);P.data.set(new Uint8ClampedArray(l.image.buffer));const x={offsetX:h,offsetY:g,rotateClockwise:p,angle:d,rasterizedImage:P,anchorX:u,anchorY:y};c.push(x)}t.width=o-i,t.height=n-s;const l=-i,m=n;for(let f=0;f<c.length;f++){const e=c[f],t=this._imageDataToCanvas(e.rasterizedImage),i=e.rasterizedImage.width,s=e.rasterizedImage.height,o=l-i*(.5+e.anchorX),n=m-s*(.5-e.anchorY);if(e.angle){const i=(360-e.angle)*Math.PI/180;r.save(),r.translate(a(e.offsetX),-a(e.offsetY)),r.translate(l,m),r.rotate(i),r.translate(-l,-m),r.drawImage(t,o,n),r.restore()}else r.drawImage(t,o+a(e.offsetX),n-a(e.offsetY))}const h=new d({x:l/t.width-.5,y:m/t.height-.5});return{imageData:0!==t.width&&0!==t.height?r.getImageData(0,0,t.width,t.height):r.createImageData(1,1),anchorPosition:h}}_imageDataToCanvas(e){this._imageDataCanvas||(this._imageDataCanvas=document.createElement("canvas"));const t=this._imageDataCanvas,r=t.getContext("2d");return t.width=e.width,t.height=e.height,r.putImageData(e,0,0),t}_imageTo32Array(t,r,a,i){this._imageDataCanvas||(this._imageDataCanvas=document.createElement("canvas"));const s=this._imageDataCanvas,o=s.getContext("2d");if(s.width=r,s.height=a,o.drawImage(t,0,0,r,a),i){o.save();const s=new e(i);o.fillStyle=s.toHex(),o.globalCompositeOperation="multiply",o.fillRect(0,0,r,a),o.globalCompositeOperation="destination-atop",o.drawImage(t,0,0,r,a),o.restore()}return new Uint32Array(o.getImageData(0,0,r,a).data.buffer)}_getRasterizedResource(e,t,r,a,s,o){let n,c,l,m,h=null,f=null;if("esriGeometryPolyline"===r||"esriGeometryPolygon"===r){const m=a&&a.style?a.style:M.Legend,g="esriGeometryPolyline"===r?I.stroke[m]:I.fill[m];if("line"===e.type){if("CIMSolidStroke"!==e.cim.type){if("CIMPictureStroke"===e.cim.type){const r=u(e.width,t,s,o),a=u(e.color,t,s,o),{image:i,width:n,height:c}=this._getPictureResource(e,r,a);return this._rasterizePictureResource(e,i,n,c,g,r)}return null}({analyzedCIM:n,hash:l}=w(e,t,s,o)),c=this._embedCIMLayerInVectorMarker(n,g)}else if("marker"===e.type){if("CIMPictureMarker"===e.cim.type){const r=u(e.size,t,s,o),a=u(e.color,t,s,o),{image:i,width:n,height:c}=this._getPictureResource(e,r,a);return this._rasterizePictureResource(e,i,n,c,g,r)}if("CIMVectorMarker"!==e.cim.type)return null;e.cim.offsetX=u(e.offsetX,t,s,o),e.cim.offsetY=u(e.offsetY,t,s,o),e.cim.rotation=u(e.rotation,t,s,o),e.cim.markerPlacement=e.markerPlacement,({analyzedCIM:n}=w(e,t,s,o)),l=i(JSON.stringify(n)).toString(),c=this._embedCIMLayerInVectorMarker(n,g),h=u(e.size,t,s,o),f=e.path}else{if("text"===e.type)return null;if("fill"===e.type){if("CIMHatchFill"===e.cim.type||"CIMVectorMarker"===e.cim.type||"CIMPictureMarker"===e.cim.type||"CIMPictureFill"===e.cim.type){const r=e.cim.size||e.cim.height;let a,i,c;if("CIMPictureMarker"===e.cim.type||"CIMPictureFill"===e.cim.type)({image:a,width:i,height:c}=this._getPictureResource(e,r,u(e.color,t,s,o)));else{({analyzedCIM:n,hash:l}=w(e,t,s,o));const m=this._rasterizer.rasterizeJSONResource({cim:n,type:e.type,url:e.url,mosaicHash:l,size:r,path:f},1,this._avoidSDF);a=m.image,i=m.size[0],c=m.size[1]}return this._rasterizePictureResource(e,a,i,c,g,null)}if("CIMSolidFill"!==e.cim.type)return null;({analyzedCIM:n,hash:l}=w(e,t,s,o)),c=this._embedCIMLayerInVectorMarker(n,g)}}}else{if("text"===e.type)return m=this._rasterizeTextResource(e,t,a,s,o),m;({analyzedCIM:n,hash:l}=w(e,t,s,o));const r=C(a,e,null);if("CIMPictureMarker"===e.cim.type){const a=u(e.size,t,s,o)*r,{image:i,width:n,height:c}=this._getPictureResource(e,a,u(e.color,t,s,o));return m={image:i,size:[n,c],sdf:!1,simplePattern:!1,anchorX:e.anchorPoint?e.anchorPoint.x:0,anchorY:e.anchorPoint?e.anchorPoint.y:0},m}p(n,r,{preserveOutlineWidth:!1}),c=n}l+=r,a&&(l+=JSON.stringify(a));const g=this._resourceCache;return g.has(l)?g.get(l):(m=this._rasterizer.rasterizeJSONResource({cim:c,type:e.type,url:e.url,mosaicHash:l,size:h,path:f},window.devicePixelRatio||1,this._avoidSDF),g.set(l,m),m)}_rasterizeTextResource(e,t,r,a,i){const s=C(r,e,null),o=u(e.text,t,a,i);if(!o||0===o.length)return null;const n=u(e.fontName,t,a,i),c=u(e.style,t,a,i),l=u(e.weight,t,a,i),m=u(e.decoration,t,a,i),h=u(e.size,t,a,i)*s,f=u(e.horizontalAlignment,t,a,i),g=u(e.verticalAlignment,t,a,i),p=y(u(e.color,t,a,i)),d=y(u(e.outlineColor,t,a,i)),M={color:p,size:h,horizontalAlignment:f,verticalAlignment:g,font:{family:n,style:c,weight:l,decoration:m},halo:{size:u(e.outlineSize,t,a,i)||0,color:d,style:c},pixelRatio:1,premultiplyColors:!this._avoidSDF};return this._textRasterizer.rasterizeText(o,M)}_rasterizePictureResource(e,t,r,i,s,c){const l=document.createElement("canvas"),m=l.getContext("2d");l.height=a(Math.max(s.frame.ymax-s.frame.ymin,c)),l.width=a(s.frame.xmax-s.frame.xmin);const h=m.createImageData(r,i);h.data.set(new Uint8ClampedArray(t.buffer));const f=this._imageDataToCanvas(h),g=m.createPattern(f,"repeat"),u=Math.cos((-e.cim.rotation||0)*Math.PI/180),y=Math.sin((-e.cim.rotation||0)*Math.PI/180);g.setTransform({m11:u,m12:y,m21:-y,m22:u,m41:a(e.cim.offsetX)||0,m42:a(e.cim.offsetY)||0});const p=s.canvasPaths;let d,M,C;o(p)?(d=p.rings,m.fillStyle=g,M=m.fill,C=["evenodd"]):n(p)&&(d=p.paths,m.strokeStyle=g,m.lineWidth=c,M=m.stroke,d[0][0][1]=l.height/2,d[0][1][1]=l.height/2),m.beginPath();for(const o of d){const e=o?o.length:0;if(e>1){let t=o[0];m.moveTo(a(t[0]),a(t[1]));for(let r=1;r<e;++r)t=o[r],m.lineTo(a(t[0]),a(t[1]));m.closePath()}}M.apply(m,C);const I=m.getImageData(0,0,l.width,l.height),z=new Uint8Array(I.data);return{size:[l.width,l.height],image:new Uint32Array(z.buffer),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0}}_getPictureResource(e,t,r){const i=this._pictureMarkerCache.get(e.materialHash);if(!i)return null;const s=i.height/i.width,o=t?s>1?a(t):a(t)/s:i.width,n=t?s>1?a(t)*s:a(t):i.height;return{image:this._imageTo32Array(i,o,n,r),width:o,height:n}}_embedCIMLayerInVectorMarker(e,t){const r=o(t.geometry)?"CIMPolygonSymbol":"CIMLineSymbol",a=t.frame;return{type:"CIMVectorMarker",frame:a,size:a.ymax-a.ymin,markerGraphics:[{type:"CIMMarkerGraphic",geometry:t.geometry,symbol:{type:r,symbolLayers:[e]}}]}}}function P(e){return(e?Object.keys(e):[]).map((t=>({name:t,alias:t,type:"string"==typeof e[t]?"esriFieldTypeString":"esriFieldTypeDouble"})))}function x(e){if(!(e&&e.data&&e.data.symbol))return null;switch(e.data.symbol.type){case"CIMPointSymbol":case"CIMTextSymbol":return"esriGeometryPoint";case"CIMLineSymbol":return"esriGeometryPolyline";case"CIMPolygonSymbol":return"esriGeometryPolygon";default:return null}}function w(e,t,r,a){let i,s;if("function"==typeof e.materialHash){i=(0,e.materialHash)(t,r,a),s=l(e.cim,e.materialOverrides)}else i=e.materialHash,s=e.cim;return{analyzedCIM:s,hash:i}}export{z as CIMSymbolRasterizer,M as GeometryStyle};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{strict as e}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isDataProtocol as t,isAbsolute as s,normalize as p}from"../../core/urlUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{enumeration as i}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as a}from"../../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{writer as f}from"../../core/accessorSupport/decorators/writer.js";import{f as u,t as l}from"../../chunks/persistableUrlUtils.js";var n;const d=e()({circle:"circle",square:"square",cross:"cross",x:"x",kite:"kite",triangle:"triangle"});let h=n=class extends o{constructor(r){super(r)}readHref(r,e,o){return r?u(r,o):e.dataURI}writeHref(r,e,o,c){r&&(t(r)?e.dataURI=r:(e.href=l(r,c),s(e.href)&&(e.href=p(e.href))))}clone(){return new n({href:this.href,primitive:this.primitive})}};r([c({type:String,json:{write:!0,read:{source:["href","dataURI"]}}})],h.prototype,"href",void 0),r([a("href")],h.prototype,"readHref",null),r([f("href",{href:{type:String},dataURI:{type:String}})],h.prototype,"writeHref",null),r([i(d)],h.prototype,"primitive",void 0),h=n=r([m("esri.symbols.support.IconSymbol3DLayerResource")],h);const j="circle",y=h;export{h as IconSymbol3DLayerResource,y as default,j as defaultPrimitive};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{strict as e}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isDataProtocol as t,isAbsolute as s,normalize as p}from"../../core/urlUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{enumeration as i}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as a}from"../../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{writer as f}from"../../core/accessorSupport/decorators/writer.js";import{f as u,t as n}from"../../chunks/persistableUrlUtils.js";var l;const d=e()({circle:"circle",square:"square",cross:"cross",x:"x",kite:"kite",triangle:"triangle"});let h=l=class extends o{constructor(r){super(r)}readHref(r,e,o){return r?u(r,o):e.dataURI}writeHref(r,e,o,c){r&&(t(r)?e.dataURI=r:(e.href=n(r,c),s(e.href)&&(e.href=p(e.href))))}clone(){return new l({href:this.href,primitive:this.primitive})}};r([c({type:String,json:{write:!0,read:{source:["href","dataURI"]}}})],h.prototype,"href",void 0),r([a("href")],h.prototype,"readHref",null),r([f("href",{href:{type:String},dataURI:{type:String}})],h.prototype,"writeHref",null),r([i(d)],h.prototype,"primitive",void 0),h=l=r([m("esri.symbols.support.IconSymbol3DLayerResource")],h);const j="circle";export{h as IconSymbol3DLayerResource,j as defaultPrimitive};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{strict as e}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{enumeration as t}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{r as i,w as c}from"../../chunks/persistableUrlUtils.js";var a;const n=e()({sphere:"sphere",cylinder:"cylinder",cube:"cube",cone:"cone",diamond:"diamond",tetrahedron:"tetrahedron",invertedCone:"inverted-cone"});let m=a=class extends o{clone(){return new a({href:this.href,primitive:this.primitive})}};r([s({type:String,json:{read:i,write:c}})],m.prototype,"href",void 0),r([t(n)],m.prototype,"primitive",void 0),m=a=r([p("esri.symbols.support.ObjectSymbol3DLayerResource")],m);const d="sphere",u=m;export{m as ObjectSymbol3DLayerResource,u as default,d as defaultPrimitive};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{strict as e}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{enumeration as t}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{r as i,w as c}from"../../chunks/persistableUrlUtils.js";var n;const a=e()({sphere:"sphere",cylinder:"cylinder",cube:"cube",cone:"cone",diamond:"diamond",tetrahedron:"tetrahedron",invertedCone:"inverted-cone"});let m=n=class extends o{clone(){return new n({href:this.href,primitive:this.primitive})}};r([s({type:String,json:{read:i,write:c}})],m.prototype,"href",void 0),r([t(a)],m.prototype,"primitive",void 0),m=n=r([p("esri.symbols.support.ObjectSymbol3DLayerResource")],m);const d="sphere";export{m as ObjectSymbol3DLayerResource,d as defaultPrimitive};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";var e;let p=e=class extends o{constructor(){super(...arguments),this.x=0,this.y=0}clone(){return new e({x:this.x,y:this.y})}};r([s({type:Number})],p.prototype,"x",void 0),r([s({type:Number})],p.prototype,"y",void 0),p=e=r([t("esri.symbols.support.Symbol3DAnchorPosition2D")],p);const c=p;export{p as Symbol3DAnchorPosition2D,c as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";var e;let p=e=class extends o{constructor(){super(...arguments),this.x=0,this.y=0}clone(){return new e({x:this.x,y:this.y})}};r([s({type:Number})],p.prototype,"x",void 0),r([s({type:Number})],p.prototype,"y",void 0),p=e=r([t("esri.symbols.support.Symbol3DAnchorPosition2D")],p);export{p as Symbol3DAnchorPosition2D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import r from"../../core/Accessor.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";var e;let p=e=class extends r{constructor(){super(...arguments),this.x=0,this.y=0,this.z=0}clone(){return new e({x:this.x,y:this.y,z:this.z})}};o([s({type:Number})],p.prototype,"x",void 0),o([s({type:Number})],p.prototype,"y",void 0),o([s({type:Number})],p.prototype,"z",void 0),p=e=o([t("esri.symbols.support.Symbol3DAnchorPosition3D")],p);const c=p;export{p as Symbol3DAnchorPosition3D,c as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";var e;let p=e=class extends o{constructor(){super(...arguments),this.x=0,this.y=0,this.z=0}clone(){return new e({x:this.x,y:this.y,z:this.z})}};r([s({type:Number})],p.prototype,"x",void 0),r([s({type:Number})],p.prototype,"y",void 0),r([s({type:Number})],p.prototype,"z",void 0),p=e=r([t("esri.symbols.support.Symbol3DAnchorPosition3D")],p);export{p as Symbol3DAnchorPosition3D};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import{isSome as r}from"../../core/maybe.js";import"../../core/Logger.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/set.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{Symbol3DMaterial as t}from"./Symbol3DMaterial.js";var c;let l=c=class extends t{constructor(o){super(o),this.colorMixMode=null}clone(){const o={color:r(this.color)?this.color.clone():null,colorMixMode:this.colorMixMode};return new c(o)}};o([s({multiply:"multiply",replace:"replace",tint:"tint"})],l.prototype,"colorMixMode",void 0),l=c=o([e("esri.symbols.support.Symbol3DFillMaterial")],l);const i=l;export{l as Symbol3DFillMaterial,i as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import{isSome as r}from"../../core/maybe.js";import"../../core/Logger.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/set.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{Symbol3DMaterial as t}from"./Symbol3DMaterial.js";var c;let l=c=class extends t{constructor(o){super(o),this.colorMixMode=null}clone(){const o={color:r(this.color)?this.color.clone():null,colorMixMode:this.colorMixMode};return new c(o)}};o([s({multiply:"multiply",replace:"replace",tint:"tint"})],l.prototype,"colorMixMode",void 0),l=c=o([e("esri.symbols.support.Symbol3DFillMaterial")],l);export{l as Symbol3DFillMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import r from"../../Color.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{isSome as t}from"../../core/maybe.js";import{px2pt as e}from"../../core/screenUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{colorAndTransparencyProperty as i,screenSizeProperty as m}from"./materialUtils.js";var l;let a=l=class extends s{constructor(o){super(o),this.color=new r([0,0,0,1]),this.size=e(1)}clone(){const o={color:t(this.color)?this.color.clone():null,size:this.size};return new l(o)}};o([c(i)],a.prototype,"color",void 0),o([c(m)],a.prototype,"size",void 0),a=l=o([p("esri.symbols.support.Symbol3DIconOutline")],a);const n=a;export{n as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import r from"../../Color.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{isSome as t}from"../../core/maybe.js";import{px2pt as e}from"../../core/screenUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{colorAndTransparencyProperty as i,screenSizeProperty as m}from"./materialUtils.js";var l;let a=l=class extends s{constructor(o){super(o),this.color=new r([0,0,0,1]),this.size=e(1)}clone(){const o={color:t(this.color)?this.color.clone():null,size:this.size};return new l(o)}};o([c(i)],a.prototype,"color",void 0),o([c(m)],a.prototype,"size",void 0),a=l=o([p("esri.symbols.support.Symbol3DIconOutline")],a);export{a as Symbol3DIconOutline};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import r from"../../Color.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isSome as s}from"../../core/maybe.js";import{px2pt as e}from"../../core/screenUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{symbol3dLinePatternProperty as a}from"../patterns/utils.js";import{colorAndTransparencyProperty as c,screenSizeProperty as l}from"./materialUtils.js";import{lineCaps as n}from"./symbolLayerUtils3D.js";var m;let u=m=class extends o{constructor(t){super(t),this.color=new r([0,0,0,1]),this.size=e(1),this.pattern=null,this.patternCap="butt"}clone(){const t={color:s(this.color)?this.color.clone():null,size:this.size,pattern:s(this.pattern)?this.pattern.clone():null,patternCap:this.patternCap};return new m(t)}};t([p(c)],u.prototype,"color",void 0),t([p(l)],u.prototype,"size",void 0),t([p(a)],u.prototype,"pattern",void 0),t([p({type:n,json:{default:"butt",write:{overridePolicy(){return{enabled:s(this.pattern)}}}}})],u.prototype,"patternCap",void 0),u=m=t([i("esri.symbols.support.Symbol3DOutline")],u);const j=u;export{j as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import t from"../../Color.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{isSome as s}from"../../core/maybe.js";import{px2pt as e}from"../../core/screenUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{symbol3dLinePatternProperty as a}from"../patterns/utils.js";import{colorAndTransparencyProperty as c,screenSizeProperty as l}from"./materialUtils.js";import{lineCaps as n}from"./symbolLayerUtils3D.js";var m;let u=m=class extends o{constructor(r){super(r),this.color=new t([0,0,0,1]),this.size=e(1),this.pattern=null,this.patternCap="butt"}clone(){const r={color:s(this.color)?this.color.clone():null,size:this.size,pattern:s(this.pattern)?this.pattern.clone():null,patternCap:this.patternCap};return new m(r)}};r([p(c)],u.prototype,"color",void 0),r([p(l)],u.prototype,"size",void 0),r([p(a)],u.prototype,"pattern",void 0),r([p({type:n,json:{default:"butt",write:{overridePolicy(){return{enabled:s(this.pattern)}}}}})],u.prototype,"patternCap",void 0),u=m=r([i("esri.symbols.support.Symbol3DOutline")],u);export{u as Symbol3DOutline};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";var t;let p=t=class extends o{clone(){return new t({url:this.url})}};r([s({type:String})],p.prototype,"url",void 0),p=t=r([e("esri.symbols.support.Thumbnail")],p);const c=p;export{p as Thumbnail,c as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";var t;let p=t=class extends o{clone(){return new t({url:this.url})}};r([s({type:String})],p.prototype,"url",void 0),p=t=r([e("esri.symbols.support.Thumbnail")],p);export{p as Thumbnail};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{isSymbol3D as t}from"../../symbols.js";import{isDevEnvironment as e,adjustStaticAGOUrl as r}from"../../core/devEnvironmentUtils.js";import o from"../../core/Error.js";import{urlToObject as l,removeFile as n}from"../../core/urlUtils.js";import s from"../../portal/Portal.js";import{f as m}from"../../chunks/persistableUrlUtils.js";import{fromJSON as i}from"./jsonUtils.js";import a from"./StyleOrigin.js";import{requestJSON as u,makeCIMSymbolRef as p,fetchStyle as y,symbolUrlFromStyleItem as f,Style2DUrlTemplate as c}from"./styleUtils.js";import b from"./Thumbnail.js";function g(t,e,r,l){return t.name?t.styleName&&"Esri2DPointSymbolsStyle"===t.styleName?j(t,e,l):y(t,e,l).then((o=>h(o,t.name,e,r,l))):Promise.reject(new o("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))}function h(y,c,g,h,j){const d=y.data,U={portal:g&&g.portal||s.getDefault(),url:l(y.baseUrl),origin:"portal-item"},N=d.items.find((t=>t.name===c));if(!N){const t=`The symbol name '${c}' could not be found`;return Promise.reject(new o("symbolstyleutils:symbol-name-not-found",t,{symbolName:c}))}let w=m(f(N,h),U),P=N.thumbnail&&N.thumbnail.href;const S=N.thumbnail&&N.thumbnail.imageData;e()&&(w=r(w),P=r(P));const D={portal:g.portal,url:l(n(w)),origin:"portal-item"};return u(w,j).then((e=>{const r="cimRef"===h?p(e.data):e.data,o=i(r,D);if(o&&t(o)){if(P){const t=m(P,U);o.thumbnail=new b({url:t})}else S&&(o.thumbnail=new b({url:`data:image/png;base64,${S}`}));y.styleUrl?o.styleOrigin=new a({portal:g.portal,styleUrl:y.styleUrl,name:c}):y.styleName&&(o.styleOrigin=new a({portal:g.portal,styleName:y.styleName,name:c}))}return o}))}function j(t,e,r){const o=c.replace(/\{SymbolName\}/gi,t.name);return u(o,r).then((t=>{const r=p(t.data);return i(r,{portal:e.portal,url:l(n(o)),origin:"portal-item"})}))}export{h as fetchSymbolFromStyle,g as resolveWebStyleSymbol};
5
+ import{isSymbol3D as t}from"../../symbols.js";import{isDevEnvironment as e,adjustStaticAGOUrl as r}from"../../core/devEnvironmentUtils.js";import o from"../../core/Error.js";import{urlToObject as l,removeFile as n}from"../../core/urlUtils.js";import s from"../../portal/Portal.js";import{f as m}from"../../chunks/persistableUrlUtils.js";import{fromJSON as i}from"./jsonUtils.js";import a from"./StyleOrigin.js";import{requestJSON as u,makeCIMSymbolRef as p,fetchStyle as y,symbolUrlFromStyleItem as f,Style2DUrlTemplate as c}from"./styleUtils.js";import{Thumbnail as b}from"./Thumbnail.js";function g(t,e,r,l){return t.name?t.styleName&&"Esri2DPointSymbolsStyle"===t.styleName?j(t,e,l):y(t,e,l).then((o=>h(o,t.name,e,r,l))):Promise.reject(new o("symbolstyleutils:style-symbol-reference-name-missing","Missing name in style symbol reference"))}function h(y,c,g,h,j){const d=y.data,U={portal:g&&g.portal||s.getDefault(),url:l(y.baseUrl),origin:"portal-item"},N=d.items.find((t=>t.name===c));if(!N){const t=`The symbol name '${c}' could not be found`;return Promise.reject(new o("symbolstyleutils:symbol-name-not-found",t,{symbolName:c}))}let w=m(f(N,h),U),P=N.thumbnail&&N.thumbnail.href;const S=N.thumbnail&&N.thumbnail.imageData;e()&&(w=r(w),P=r(P));const D={portal:g.portal,url:l(n(w)),origin:"portal-item"};return u(w,j).then((e=>{const r="cimRef"===h?p(e.data):e.data,o=i(r,D);if(o&&t(o)){if(P){const t=m(P,U);o.thumbnail=new b({url:t})}else S&&(o.thumbnail=new b({url:`data:image/png;base64,${S}`}));y.styleUrl?o.styleOrigin=new a({portal:g.portal,styleUrl:y.styleUrl,name:c}):y.styleName&&(o.styleOrigin=new a({portal:g.portal,styleName:y.styleName,name:c}))}return o}))}function j(t,e,r){const o=c.replace(/\{SymbolName\}/gi,t.name);return u(o,r).then((t=>{const r=p(t.data);return i(r,{portal:e.portal,url:l(n(o)),origin:"portal-item"})}))}export{h as fetchSymbolFromStyle,g as resolveWebStyleSymbol};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../core/Evented.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import r from"../../layers/support/LOD.js";import{GeometryConstraint as i}from"./constraints/GeometryConstraint.js";import a from"./constraints/RotationConstraint.js";import n from"./constraints/ZoomConstraint.js";import m from"../../geometry/Extent.js";import l from"../../geometry/Polygon.js";const p={base:null,key:"type",typeMap:{extent:m,polygon:l}};let c=class extends t.EventedAccessor{constructor(){super(...arguments),this.lods=null,this.minScale=0,this.maxScale=0,this.minZoom=-1,this.maxZoom=-1,this.rotationEnabled=!0,this.snapToZoom=!0}initialize(){this.watch(["_zoom","_rotation"],this.emit.bind(this,"update"),!0)}destroy(){this.view=null,this._set("_zoom",null),this._set("_rotation",null)}set geometry(o){o?this._set("geometry",o):this._set("geometry",null)}get _defaultLODs(){var o,t,e;const s=null==(o=this.view)||null==(t=o.defaultsFromMap)?void 0:t.tileInfo,r=null==(e=this.view)?void 0:e.spatialReference;return s&&r&&s.spatialReference.equals(r)?s.lods:null}get _geometry(){return new i({geometry:this.geometry,spatialReference:this.view.spatialReference})}get _rotation(){return new a({rotationEnabled:this.rotationEnabled})}get _zoom(){const o=this._get("_zoom"),t=this.lods||this._defaultLODs,e=this.minZoom,s=this.maxZoom,r=this.minScale,i=this.maxScale,a=this.snapToZoom;return o&&o.lods===t&&o.minZoom===e&&o.maxZoom===s&&o.minScale===r&&o.maxScale===i&&o.snapToZoom===a?o:new n({lods:t,minZoom:e,maxZoom:s,minScale:r,maxScale:i,snapToZoom:a})}canZoomInTo(o){const t=this.effectiveMaxScale;return 0===t||o>=t}canZoomOutTo(o){const t=this.effectiveMinScale;return 0===t||o<=t}constrain(o,t){return this._zoom.constrain(o,t),this._rotation.constrain(o,t),this._geometry.constrain(o,t),o}constrainByGeometry(o){return this._geometry.constrain(o)}fit(o){return this._zoom.fit(o)}zoomToScale(o){return this._zoom.zoomToScale(o)}scaleToZoom(o){return this._zoom.scaleToZoom(o)}snapScale(o){return this._zoom.snapToClosestScale(o)}snapToNextScale(o){return this._zoom.snapToNextScale(o)}snapToPreviousScale(o){return this._zoom.snapToPreviousScale(o)}};o([e({readOnly:!0,aliasOf:"_zoom.effectiveLODs"})],c.prototype,"effectiveLODs",void 0),o([e({readOnly:!0,aliasOf:"_zoom.effectiveMinScale"})],c.prototype,"effectiveMinScale",void 0),o([e({readOnly:!0,aliasOf:"_zoom.effectiveMaxScale"})],c.prototype,"effectiveMaxScale",void 0),o([e({readOnly:!0,aliasOf:"_zoom.effectiveMinZoom"})],c.prototype,"effectiveMinZoom",void 0),o([e({readOnly:!0,aliasOf:"_zoom.effectiveMaxZoom"})],c.prototype,"effectiveMaxZoom",void 0),o([e({types:p,value:null})],c.prototype,"geometry",null),o([e({type:[r]})],c.prototype,"lods",void 0),o([e()],c.prototype,"minScale",void 0),o([e()],c.prototype,"maxScale",void 0),o([e()],c.prototype,"minZoom",void 0),o([e()],c.prototype,"maxZoom",void 0),o([e()],c.prototype,"rotationEnabled",void 0),o([e()],c.prototype,"snapToZoom",void 0),o([e()],c.prototype,"view",void 0),o([e()],c.prototype,"_defaultLODs",null),o([e({type:i})],c.prototype,"_geometry",null),o([e({type:a})],c.prototype,"_rotation",null),o([e({readOnly:!0,type:n})],c.prototype,"_zoom",null),c=o([s("esri.views.2d.MapViewConstraints")],c);const y=c;export{y as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../core/Accessor.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import s from"../../layers/support/LOD.js";import{GeometryConstraint as i}from"./constraints/GeometryConstraint.js";import n from"./constraints/RotationConstraint.js";import a from"./constraints/ZoomConstraint.js";import m from"../../geometry/Extent.js";import l from"../../geometry/Polygon.js";const p={base:null,key:"type",typeMap:{extent:m,polygon:l}};let c=class extends t{constructor(o){super(o),this.lods=null,this.minScale=0,this.maxScale=0,this.minZoom=-1,this.maxZoom=-1,this.rotationEnabled=!0,this.snapToZoom=!0}destroy(){this.view=null,this._set("_zoom",null),this._set("_rotation",null),this._set("_geometry",null)}set geometry(o){o?this._set("geometry",o):this._set("geometry",null)}get version(){var o;return this.commitProperty("_zoom"),this.commitProperty("_rotation"),this.commitProperty("_geometry"),(null!=(o=this._get("version"))?o:0)+1}get _defaultLODs(){var o,t,e;const r=null==(o=this.view)||null==(t=o.defaultsFromMap)?void 0:t.tileInfo,s=null==(e=this.view)?void 0:e.spatialReference;return r&&s&&r.spatialReference.equals(s)?r.lods:null}get _geometry(){var o;return new i({geometry:this.geometry,spatialReference:null==(o=this.view)?void 0:o.spatialReference})}get _rotation(){return new n({rotationEnabled:this.rotationEnabled})}get _zoom(){const o=this._get("_zoom"),t=this.lods||this._defaultLODs,e=this.minZoom,r=this.maxZoom,s=this.minScale,i=this.maxScale,n=this.snapToZoom;return o&&o.lods===t&&o.minZoom===e&&o.maxZoom===r&&o.minScale===s&&o.maxScale===i&&o.snapToZoom===n?o:new a({lods:t,minZoom:e,maxZoom:r,minScale:s,maxScale:i,snapToZoom:n})}canZoomInTo(o){const t=this.effectiveMaxScale;return 0===t||o>=t}canZoomOutTo(o){const t=this.effectiveMinScale;return 0===t||o<=t}constrain(o,t){return this._zoom.constrain(o,t),this._rotation.constrain(o,t),this._geometry.constrain(o,t),o}constrainByGeometry(o){return this._geometry.constrain(o)}fit(o){return this._zoom.fit(o)}zoomToScale(o){return this._zoom.zoomToScale(o)}scaleToZoom(o){return this._zoom.scaleToZoom(o)}snapScale(o){return this._zoom.snapToClosestScale(o)}snapToNextScale(o){return this._zoom.snapToNextScale(o)}snapToPreviousScale(o){return this._zoom.snapToPreviousScale(o)}};o([e({readOnly:!0,aliasOf:"_zoom.effectiveLODs"})],c.prototype,"effectiveLODs",void 0),o([e({readOnly:!0,aliasOf:"_zoom.effectiveMinScale"})],c.prototype,"effectiveMinScale",void 0),o([e({readOnly:!0,aliasOf:"_zoom.effectiveMaxScale"})],c.prototype,"effectiveMaxScale",void 0),o([e({readOnly:!0,aliasOf:"_zoom.effectiveMinZoom"})],c.prototype,"effectiveMinZoom",void 0),o([e({readOnly:!0,aliasOf:"_zoom.effectiveMaxZoom"})],c.prototype,"effectiveMaxZoom",void 0),o([e({types:p,value:null})],c.prototype,"geometry",null),o([e({type:[s]})],c.prototype,"lods",void 0),o([e()],c.prototype,"minScale",void 0),o([e()],c.prototype,"maxScale",void 0),o([e()],c.prototype,"minZoom",void 0),o([e()],c.prototype,"maxZoom",void 0),o([e()],c.prototype,"rotationEnabled",void 0),o([e()],c.prototype,"snapToZoom",void 0),o([e()],c.prototype,"view",void 0),o([e({readOnly:!0})],c.prototype,"version",null),o([e()],c.prototype,"_defaultLODs",null),o([e({type:i})],c.prototype,"_geometry",null),o([e({type:n})],c.prototype,"_rotation",null),o([e({readOnly:!0,type:a})],c.prototype,"_zoom",null),c=o([r("esri.views.2d.MapViewConstraints")],c);const y=c;export{y 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.23/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../layers/support/LOD.js";import i from"../../../../layers/support/TileInfo.js";class s{constructor(e,i){this.lockedSchemaPixelSize=e,this.isGCS=i}getLevelRowColumn(e){return this.isGCS?[e[0],e[1]>>1,e[2]>>1]:256===this.lockedSchemaPixelSize&&e[0]>0?[e[0]-1,e[1]>>1,e[2]>>1]:e}adjustLevel(e){return this.isGCS?e:256===this.lockedSchemaPixelSize?e>0?e-1:0:e}getShift(e,i){let s=0,t=0;return(256===this.lockedSchemaPixelSize||this.isGCS)&&(e[2]%2&&(s=i),e[1]%2&&(t=i)),[s,t]}getScale(e){if(this.isGCS){if(512===this.lockedSchemaPixelSize)return 4}else if(256===this.lockedSchemaPixelSize&&0===e)return 1;return 2}static create256x256CompatibleTileInfo(s){if(!s)return null;if(256===s.size[0]&&256===s.size[1])return s;const t=256,l=s.spatialReference.isGeographic,r=[],o=s.lods.length;for(let i=0;i<o;i++){const t=s.lods[i],o=l?t.resolution:2*t.resolution;r.push(new e({level:t.level,scale:t.scale,resolution:o}))}return new i({size:[t,t],dpi:s.dpi,format:s.format,compressionQuality:s.compressionQuality,origin:s.origin,spatialReference:s.spatialReference,lods:r})}static create512x512CompatibleTileInfo(s){if(!s)return null;if(256===s.size[0]||256===s.size[1])return null;const t=512,l=[],r=s.lods.length;for(let i=0;i<r;i++){const t=s.lods[i],r=.5*t.resolution;l.push(new e({level:t.level,scale:t.scale,resolution:r}))}return new i({size:[t,t],dpi:s.dpi,format:s.format,compressionQuality:s.compressionQuality,origin:s.origin,spatialReference:s.spatialReference,lods:l})}}export{s as default};
5
+ class e{constructor(e,i){this.lockedSchemaPixelSize=e,this.isGCS=i}getLevelRowColumn(e){return this.isGCS?[e[0],e[1]>>1,e[2]>>1]:256===this.lockedSchemaPixelSize&&e[0]>0?[e[0]-1,e[1]>>1,e[2]>>1]:e}adjustLevel(e){return this.isGCS?e:256===this.lockedSchemaPixelSize?e>0?e-1:0:e}getShift(e,i){let t=0,s=0;return(256===this.lockedSchemaPixelSize||this.isGCS)&&(e[2]%2&&(t=i),e[1]%2&&(s=i)),[t,s]}getScale(e){if(this.isGCS){if(512===this.lockedSchemaPixelSize)return 4}else if(256===this.lockedSchemaPixelSize&&0===e)return 1;return 2}}export{e as SchemaHelper};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../Viewpoint.js";import e from"../../core/Collection.js";import{isSome as n,get as r,isNone as o}from"../../core/maybe.js";import{getMetersPerUnitForSR as a}from"../../core/unitUtils.js";import{t as i,a as s}from"../../chunks/common.js";import{f as c,r as u,t as f,a as l,s as m,i as y,b as p}from"../../chunks/mat2d.js";import{c as g}from"../../chunks/mat2df64.js";import{s as h,c as x,g as b,h as d,n as w,f as j,i as G,j as M,k,l as A,t as R,m as S}from"../../chunks/vec2.js";import{a as v,f as P}from"../../chunks/vec2f64.js";import q from"../../geometry/Extent.js";import F from"../../geometry/Geometry.js";import I from"../../geometry/Point.js";import N from"../../geometry/SpatialReference.js";import{earth as z}from"../../geometry/support/Ellipsoid.js";import{isValid as V,getInfo as E}from"../../geometry/support/spatialReferenceUtils.js";import{canProject as L,project as O}from"../../geometry/support/webMercatorUtils.js";const W=39.37,C=180/Math.PI;function U(t,e,n){const r=s(e[0]/z.radius);return h(t,n?r:r-360*Math.floor((r+180)/360),s(.5*Math.PI-2*Math.atan(Math.exp(-e[1]/z.radius))))}function Q(t,e){let n=e[1];return n>89.99999?n=89.99999:n<-89.99999&&(n=-89.99999),n=Math.sin(i(n)),h(t,i(e[0])*z.radius,.5*z.radius*Math.log((1+n)/(1-n)))}function B(t,e,n,r){return r&&n&&!r.equals(n)&&L(r,n)&&r.isWebMercator?r.isWebMercator?Q(t,e):U(t,e):x(t,e)}function D(t){return t.wkid?t:t.spatialReference||N.WGS84}function T(t,e){return e.type?h(t,e.x,e.y):x(t,e)}function H(t){return a(t)}function J(t,e){return Math.max(t.width/e[0],t.height/e[1])*ct(t.spatialReference)}async function K(t,a,i,s){let c,u;if(!t)return null;if(Array.isArray(t)&&!t.length)return null;if(e.isCollection(t)&&(t=t.toArray()),Array.isArray(t)&&t.length&&"object"==typeof t[0]){const e=t.every((t=>"attributes"in t)),r=t.some((t=>!t.geometry));let o=t;if(e&&r&&a&&a.allLayerViews){const e=new Map;for(const n of t){const t=n.layer,r=e.get(t)||[],o=n.attributes[t.objectIdField];null!=o&&r.push(o),e.set(t,r)}const r=[];e.forEach(((t,e)=>{const n=a.allLayerViews.find((t=>t.layer.id===e.id));if("queryFeatures"in n){const o=e.createQuery();o.objectIds=t,o.returnGeometry=!0,r.push(n.queryFeatures(o))}}));const i=await Promise.all(r),s=[];for(const t of i)if(t&&t.features&&t.features.length)for(const e of t.features)n(e.geometry)&&s.push(e.geometry);o=s}for(const t of o)s=await K(t,a,i,s);return s}if(Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1])c=new I(t);else if(t instanceof F)c=t;else if("geometry"in t)if(t.geometry)c=t.geometry;else if(t.layer){const e=t.layer,n=a.allLayerViews.find((t=>t.layer.id===e.id));if("queryFeatures"in n){const o=e.createQuery();o.objectIds=[t.attributes[e.objectIdField]],o.returnGeometry=!0;const a=await n.queryFeatures(o);c=r(a,"features",0,"geometry")}}if(o(c))return null;if(u="point"===c.type?new q({xmin:c.x,ymin:c.y,xmax:c.x,ymax:c.y,spatialReference:c.spatialReference}):c.extent,!u)return null;const f=O(u,i);return o(f)?null:s=s?s.union(f):f}function X(t){if(t&&(!Array.isArray(t)||"number"!=typeof t[0])&&("object"==typeof t||Array.isArray(t)&&"object"==typeof t[0])){if("layer"in t&&t.layer&&t.layer.minScale&&t.layer.maxScale){const e=t.layer;return{min:e.minScale,max:e.maxScale}}if(Array.isArray(t)&&t.length&&t.every((t=>"layer"in t))){let e=0,n=0;for(const r of t){const t=r.layer;t&&t.minScale&&t.maxScale&&(e=t.minScale<e?t.minScale:e,n=t.maxScale>n?t.maxScale:n)}return e&&n?{min:e,max:n}:null}}}async function Y(e,r){if(!e||!r)return new t({targetGeometry:new I,scale:0,rotation:0});let o=r.spatialReference;const{constraints:a,padding:i,viewpoint:s,size:c}=r,u=[i?c[0]-i.left-i.right:c[0],i?c[1]-i.top-i.bottom:c[1]];let f=null;e instanceof t?f=e:e.viewpoint?f=e.viewpoint:e.target&&"esri.Viewpoint"===e.target.declaredClass&&(f=e.target);let l=null;f&&f.targetGeometry?l=f.targetGeometry:e instanceof q?l=e:(e||e&&("center"in e||"extent"in e||"target"in e))&&(l=await K(e.center,r,o)||await K(e.extent,r,o)||await K(e.target,r,o)||await K(e,r,o)),!l&&s&&s.targetGeometry?l=s.targetGeometry:!l&&r.extent&&(l=r.extent);const m=D(l);if(o||(o=D(r.spatialReference||r.extent||l)),!L(l,o)&&m&&!m.equals(o))return null;const y=T(v(),l.center?l.center:l),p=new I(B(y,y,m,o),o);let g=null;if(f&&n(f.targetGeometry)&&"point"===f.targetGeometry.type)g=f.scale;else if(e.hasOwnProperty("scale")&&e.scale)g=e.scale;else if(e.hasOwnProperty("zoom")&&-1!==e.zoom&&a&&a.effectiveLODs)g=a.zoomToScale(e.zoom);else if(Array.isArray(l)||"point"===l.type||"extent"===l.type&&0===l.width&&0===l.height){const t=O(r.extent,o);g=n(t)?J(t,u):r.extent?J(r.extent,u):s.scale}else g=L(l.extent,o)?J(O(l.extent,o),u):J(l.extent,u);const h=X(e);h&&(h.min&&h.min>g?g=h.min:h.max&&h.max<g&&(g=h.max));let x=0;f?x=f.rotation:e.hasOwnProperty("rotation")?x=e.rotation:s&&(x=s.rotation);let b=new t({targetGeometry:p,scale:g,rotation:x});return a&&(b=a.fit(b),a.constrainByGeometry(b),a.rotationEnabled||(b.rotation=x)),b}function Z(t,e){const n=t.targetGeometry,r=e.targetGeometry;return n.x=r.x,n.y=r.y,n.spatialReference=r.spatialReference,t.scale=e.scale,t.rotation=e.rotation,t}function $(t,e,n){return n?h(t,.5*(e[0]-n.right+n.left),.5*(e[1]-n.bottom+n.top)):b(t,e,.5)}const _=function(){const t=v();return function(e,n,r){const o=n.targetGeometry;T(t,o);const a=.5*at(n);return e.xmin=t[0]-a*r[0],e.ymin=t[1]-a*r[1],e.xmax=t[0]+a*r[0],e.ymax=t[1]+a*r[1],e.spatialReference=o.spatialReference,e}}();function tt(t,e,n,r,o){return wt(t,e,n.center),t.scale=J(n,r),o&&o.constraints&&o.constraints.constrain(t),t}function et(t,e,n,r){return mt(t,e,n,r),y(t,t)}function nt(t,e,n){const r=st(e),o=Math.abs(Math.cos(r)),a=Math.abs(Math.sin(r));return h(t,Math.round(n[1]*a+n[0]*o),Math.round(n[1]*o+n[0]*a))}const rt=function(){const t=v();return function(e,n,r){return d(e,ut(e,n),$(t,n,r))}}(),ot=function(){const t=g(),e=v();return function(n,r,o,a){const i=at(r),s=st(r);return h(e,i,i),c(t,e),u(t,t,s),f(t,t,rt(e,o,a)),f(t,t,[0,a.top-a.bottom]),h(n,t[4],t[5])}}();function at(t){return t.scale*it(t.targetGeometry)}function it(t){return n(t)&&V(t.spatialReference)?1/(H(t.spatialReference)*W*ft()):1}function st(t){return i(t.rotation)||0}function ct(t){return V(t)?H(t)*W*ft():1}function ut(t,e){return b(t,e,.5)}function ft(){return 96}const lt=function(){const t=v(),e=v(),n=v();return function(r,o,a,i,s,c){return w(t,o),b(e,a,.5*c),h(n,1/i*c,-1/i*c),l(r,e),s&&u(r,r,s),m(r,r,n),f(r,r,t),r}}(),mt=function(){const t=v();return function(e,n,r,o){const a=at(n),i=st(n);return T(t,n.targetGeometry),lt(e,t,r,a,i,o)}}(),yt=function(){const t=v();return function(e,n,r,o){const a=at(n);return T(t,n.targetGeometry),lt(e,t,r,a,0,o)}}();function pt(t){if(t.isWrappable){const e=E(t);return e.valid[1]-e.valid[0]}return 0}function gt(t,e){return Math.round(pt(t)/e)}function ht(t,e){return Y(t,e)}const xt=function(){const t=v(),e=v(),n=[0,0,0];return function(r,o,a){j(t,r,o),G(t,t),j(e,r,a),G(e,e),M(n,t,e);let i=Math.acos(k(t,e)/(A(t)*A(e)))*C;return n[2]<0&&(i=-i),isNaN(i)&&(i=0),i}}(),bt=function(){const t=v();return function(e,n,r,o){const a=e.targetGeometry;return Z(e,n),ot(t,n,r,o),a.x+=t[0],a.y+=t[1],e}}(),dt=function(){const t=v();return function(e,n,r,o){const a=e.targetGeometry;return Z(e,n),ot(t,n,r,o),a.x-=t[0],a.y-=t[1],e}}(),wt=function(){const t=v();return function(e,n,r){Z(e,n);const o=e.targetGeometry,a=D(r),i=D(o);return T(t,r),B(t,t,a,i),o.x=t[0],o.y=t[1],e}}();function jt(t){return at(t)}const Gt=function(){const t=v();return function(e,n,r,o,a){a||(a="center"),d(t,r,o),b(t,t,.5);const i=t[0],s=t[1];switch(a){case"center":h(t,0,0);break;case"left":h(t,-i,0);break;case"top":h(t,0,s);break;case"right":h(t,i,0);break;case"bottom":h(t,0,-s);break;case"top-left":h(t,-i,s);break;case"bottom-left":h(t,-i,-s);break;case"top-right":h(t,i,s);break;case"bottom-right":h(t,i,-s)}return Ft(e,n,t),e}}();function Mt(t,e,n){return Z(t,e),t.rotation+=n,t}function kt(t,e,n){return Z(t,e),t.rotation=n,t}const At=function(){const t=v();return function(e,n,r,o,a){return Z(e,n),isNaN(r)||0===r||(Pt(t,o,n,a),e.scale=n.scale*r,qt(t,t,e,a),Ft(e,e,h(t,t[0]-o[0],o[1]-t[1]))),e}}();function Rt(t,e,n){return Z(t,e),t.scale=n,t}const St=function(){const t=v();return function(e,n,r,o,a,i){return Z(e,n),isNaN(r)||0===r||(Pt(t,a,n,i),e.scale=n.scale*r,e.rotation+=o,qt(t,t,e,i),Ft(e,e,h(t,t[0]-a[0],a[1]-t[1]))),e}}(),vt=function(){const t=v(),e=v();return function(n,r,o,a,i,s,c){return rt(e,s,c),S(t,i,e),a?St(n,r,o,a,t,s):At(n,r,o,t,s)}}(),Pt=function(){const t=g();return function(e,n,r,o){return R(e,n,et(t,r,o,1))}}(),qt=function(){const t=g();return function(e,n,r,o){return R(e,n,mt(t,r,o,1))}}(),Ft=function(){const t=v(),e=g();return function(n,r,o){Z(n,r);const a=at(r),i=n.targetGeometry;return p(e,st(r)),m(e,e,P(a,a)),R(t,o,e),i.x+=t[0],i.y+=t[1],n}}();export{bt as addPadding,xt as angleBetween,wt as centerAt,Z as copy,Y as create,ht as createAsync,J as extentToScale,$ as getAnchor,_ as getExtent,lt as getMatrix,nt as getOuterSize,ot as getPaddingMapTranslation,rt as getPaddingScreenTranslation,at as getResolution,ct as getResolutionToScaleFactor,mt as getTransform,yt as getTransformNoRotation,gt as getWorldScreenWidth,pt as getWorldWidth,vt as padAndScaleAndRotateBy,jt as pixelSize,dt as removePadding,Gt as resize,Mt as rotateBy,kt as rotateTo,St as scaleAndRotateBy,At as scaleBy,Rt as scaleTo,tt as setExtent,Pt as toMap,qt as toScreen,Ft as translateBy};
5
+ import t from"../../Viewpoint.js";import e from"../../core/Collection.js";import{isSome as n,get as r,isNone as o}from"../../core/maybe.js";import{getMetersPerUnitForSR as a}from"../../core/unitUtils.js";import{t as i}from"../../chunks/common.js";import{f as c,r as s,t as u,a as f,s as l,i as m,b as y}from"../../chunks/mat2d.js";import{c as p}from"../../chunks/mat2df64.js";import{g,s as x,c as h,h as b,n as w,f as d,i as j,j as G,k as R,l as k,t as A,m as S}from"../../chunks/vec2.js";import{f as v,a as F}from"../../chunks/vec2f64.js";import N from"../../geometry/Extent.js";import z from"../../geometry/Geometry.js";import I from"../../geometry/Point.js";import{isLoaded as M,canProjectWithoutEngine as V,load as q,project as L}from"../../geometry/projection.js";import P from"../../geometry/SpatialReference.js";import{isValid as C,equals as E,getInfo as O}from"../../geometry/support/spatialReferenceUtils.js";const Q=96,U=39.37,W=180/Math.PI;function B(t){return t.wkid?t:t.spatialReference||P.WGS84}function D(t,e){return e.type?x(t,e.x,e.y):h(t,e)}function T(t){return a(t)}function H(t,e){return Math.max(t.width/e[0],t.height/e[1])*ct(t.spatialReference)}async function J(t,a,i,c){let s,u;if(!t)return null;if(Array.isArray(t)&&!t.length)return null;if(e.isCollection(t)&&(t=t.toArray()),Array.isArray(t)&&t.length&&"object"==typeof t[0]){const e=t.every((t=>"attributes"in t)),r=t.some((t=>!t.geometry));let o=t;if(e&&r&&a&&a.allLayerViews){const e=new Map;for(const n of t){const t=n.layer,r=e.get(t)||[],o=n.attributes[t.objectIdField];null!=o&&r.push(o),e.set(t,r)}const r=[];e.forEach(((t,e)=>{const n=a.allLayerViews.find((t=>t.layer.id===e.id));if("queryFeatures"in n){const o=e.createQuery();o.objectIds=t,o.returnGeometry=!0,r.push(n.queryFeatures(o))}}));const i=await Promise.all(r),c=[];for(const t of i)if(t&&t.features&&t.features.length)for(const e of t.features)n(e.geometry)&&c.push(e.geometry);o=c}for(const t of o)c=await J(t,a,i,c);return c}if(Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1])s=new I(t);else if(t instanceof z)s=t;else if("geometry"in t)if(t.geometry)s=t.geometry;else if(t.layer){const e=t.layer,n=a.allLayerViews.find((t=>t.layer.id===e.id));if("queryFeatures"in n){const o=e.createQuery();o.objectIds=[t.attributes[e.objectIdField]],o.returnGeometry=!0;const a=await n.queryFeatures(o);s=r(a,"features",0,"geometry")}}if(o(s))return null;if(u="point"===s.type?new N({xmin:s.x,ymin:s.y,xmax:s.x,ymax:s.y,spatialReference:s.spatialReference}):s.extent,!u)return null;M()||V(u.spatialReference,i)||await q();const f=L(u,i);return f?c=c?c.union(f):f:null}function K(t){if(t&&(!Array.isArray(t)||"number"!=typeof t[0])&&("object"==typeof t||Array.isArray(t)&&"object"==typeof t[0])){if("layer"in t&&t.layer&&t.layer.minScale&&t.layer.maxScale){const e=t.layer;return{min:e.minScale,max:e.maxScale}}if(Array.isArray(t)&&t.length&&t.every((t=>"layer"in t))){let e=0,n=0;for(const r of t){const t=r.layer;t&&t.minScale&&t.maxScale&&(e=t.minScale<e?t.minScale:e,n=t.maxScale>n?t.maxScale:n)}return e&&n?{min:e,max:n}:null}}}function X(t,e){return E(B(t),e)?t:L(t,e)}async function Y(e,r){if(!e||!r)return new t({targetGeometry:new I,scale:0,rotation:0});let o=r.spatialReference;const{constraints:a,padding:i,viewpoint:c,size:s}=r,u=[i?s[0]-i.left-i.right:s[0],i?s[1]-i.top-i.bottom:s[1]];let f=null;e instanceof t?f=e:e.viewpoint?f=e.viewpoint:e.target&&"esri.Viewpoint"===e.target.declaredClass&&(f=e.target);let l=null;f&&f.targetGeometry?l=f.targetGeometry:e instanceof N?l=e:(e||e&&("center"in e||"extent"in e||"target"in e))&&(l=await J(e.center,r,o)||await J(e.extent,r,o)||await J(e.target,r,o)||await J(e,r,o)),!l&&c&&c.targetGeometry?l=c.targetGeometry:!l&&r.extent&&(l=r.extent),o||(o=B(r.spatialReference||r.extent||l)),M()||E(l.spatialReference,o)||V(l,o)||await q();const m=X(l.center?l.center:l,o);let y=null;if(f&&n(f.targetGeometry)&&"point"===f.targetGeometry.type)y=f.scale;else if("scale"in e&&e.scale)y=e.scale;else if("zoom"in e&&-1!==e.zoom&&a&&a.effectiveLODs)y=a.zoomToScale(e.zoom);else if(Array.isArray(l)||"point"===l.type||"extent"===l.type&&0===l.width&&0===l.height){const t=X(r.extent,o);y=n(t)?H(t,u):r.extent?H(r.extent,u):c.scale}else y=H(X(l.extent,o),u);const p=K(e);p&&(p.min&&p.min>y?y=p.min:p.max&&p.max<y&&(y=p.max));let g=0;f?g=f.rotation:e.hasOwnProperty("rotation")?g=e.rotation:c&&(g=c.rotation);let x=new t({targetGeometry:m,scale:y,rotation:g});return a&&(x=a.fit(x),a.constrainByGeometry(x),a.rotationEnabled||(x.rotation=g)),x}function Z(t,e){const n=t.targetGeometry,r=e.targetGeometry;return n.x=r.x,n.y=r.y,n.spatialReference=r.spatialReference,t.scale=e.scale,t.rotation=e.rotation,t}function $(t,e,n){return n?x(t,.5*(e[0]-n.right+n.left),.5*(e[1]-n.bottom+n.top)):g(t,e,.5)}const _=function(){const t=F();return function(e,n,r){const o=n.targetGeometry;D(t,o);const a=.5*ot(n);return e.xmin=t[0]-a*r[0],e.ymin=t[1]-a*r[1],e.xmax=t[0]+a*r[0],e.ymax=t[1]+a*r[1],e.spatialReference=o.spatialReference,e}}();function tt(t,e,n,r,o){return xt(t,e,n.center),t.scale=H(n,r),o&&o.constraints&&o.constraints.constrain(t),t}function et(t,e,n,r){return ft(t,e,n,r),m(t,t)}const nt=function(){const t=F();return function(e,n,r){return b(e,st(e,n),$(t,n,r))}}(),rt=function(){const t=p(),e=F();return function(n,r,o,a){const i=ot(r),f=it(r);return x(e,i,i),c(t,e),s(t,t,f),u(t,t,nt(e,o,a)),u(t,t,[0,a.top-a.bottom]),x(n,t[4],t[5])}}();function ot(t){return t.scale*at(t.targetGeometry)}function at(t){return n(t)&&C(t.spatialReference)?1/(T(t.spatialReference)*U*Q):1}function it(t){return i(t.rotation)||0}function ct(t){return C(t)?T(t)*U*Q:1}function st(t,e){return g(t,e,.5)}const ut=function(){const t=F(),e=F(),n=F();return function(r,o,a,i,c,m){return w(t,o),g(e,a,.5*m),x(n,1/i*m,-1/i*m),f(r,e),c&&s(r,r,c),l(r,r,n),u(r,r,t),r}}(),ft=function(){const t=F();return function(e,n,r,o){const a=ot(n),i=it(n);return D(t,n.targetGeometry),ut(e,t,r,a,i,o)}}(),lt=function(){const t=F();return function(e,n,r,o){const a=ot(n);return D(t,n.targetGeometry),ut(e,t,r,a,0,o)}}();function mt(t){if(t.isWrappable){const e=O(t);return e.valid[1]-e.valid[0]}return 0}function yt(t,e){return Math.round(mt(t)/e)}const pt=function(){const t=F(),e=F(),n=[0,0,0];return function(r,o,a){d(t,r,o),j(t,t),d(e,r,a),j(e,e),G(n,t,e);let i=Math.acos(R(t,e)/(k(t)*k(e)))*W;return n[2]<0&&(i=-i),isNaN(i)&&(i=0),i}}(),gt=function(){const t=F();return function(e,n,r,o){const a=e.targetGeometry;return Z(e,n),rt(t,n,r,o),a.x+=t[0],a.y+=t[1],e}}(),xt=function(t,e,n){Z(t,e);const r=t.targetGeometry;return r.x=n.x,r.y=n.y,t},ht=function(){const t=F();return function(e,n,r,o,a){a||(a="center"),b(t,r,o),g(t,t,.5);const i=t[0],c=t[1];switch(a){case"center":x(t,0,0);break;case"left":x(t,-i,0);break;case"top":x(t,0,c);break;case"right":x(t,i,0);break;case"bottom":x(t,0,-c);break;case"top-left":x(t,-i,c);break;case"bottom-left":x(t,-i,-c);break;case"top-right":x(t,i,c);break;case"bottom-right":x(t,i,-c)}return St(e,n,t),e}}();function bt(t,e,n){return Z(t,e),t.rotation+=n,t}function wt(t,e,n){return Z(t,e),t.rotation=n,t}const dt=function(){const t=F();return function(e,n,r,o,a){return Z(e,n),isNaN(r)||0===r||(kt(t,o,n,a),e.scale=n.scale*r,At(t,t,e,a),St(e,e,x(t,t[0]-o[0],o[1]-t[1]))),e}}();function jt(t,e,n){return Z(t,e),t.scale=n,t}const Gt=function(){const t=F();return function(e,n,r,o,a,i){return Z(e,n),isNaN(r)||0===r||(kt(t,a,n,i),e.scale=n.scale*r,e.rotation+=o,At(t,t,e,i),St(e,e,x(t,t[0]-a[0],a[1]-t[1]))),e}}(),Rt=function(){const t=F(),e=F();return function(n,r,o,a,i,c,s){return nt(e,c,s),S(t,i,e),a?Gt(n,r,o,a,t,c):dt(n,r,o,t,c)}}(),kt=function(){const t=p();return function(e,n,r,o){return A(e,n,et(t,r,o,1))}}(),At=function(){const t=p();return function(e,n,r,o){return A(e,n,ft(t,r,o,1))}}(),St=function(){const t=F(),e=p();return function(n,r,o){Z(n,r);const a=ot(r),i=n.targetGeometry;return y(e,it(r)),l(e,e,v(a,a)),A(t,o,e),i.x+=t[0],i.y+=t[1],n}}();export{gt as addPadding,pt as angleBetween,xt as centerAt,Z as copy,Y as create,H as extentToScale,$ as getAnchor,_ as getExtent,ut as getMatrix,rt as getPaddingMapTranslation,nt as getPaddingScreenTranslation,ot as getResolution,ct as getResolutionToScaleFactor,ft as getTransform,lt as getTransformNoRotation,yt as getWorldScreenWidth,mt as getWorldWidth,Rt as padAndScaleAndRotateBy,ht as resize,bt as rotateBy,wt as rotateTo,Gt as scaleAndRotateBy,jt as scaleTo,tt as setExtent,kt as toMap,At as toScreen,St as translateBy};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import"../webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/basicInterfaces.js";export{b as build}from"../../../chunks/ChapmanAtmosphere.glsl.js";
5
+ import"../webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{b as build}from"../../../chunks/ChapmanAtmosphere.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Handles.js";import{lerp as t,smoothstep as i}from"../../../core/mathUtils.js";import{releaseMaybe as s,disposeMaybe as a,destroyMaybe as r,isSome as h,isNone as n,unwrapOr as o}from"../../../core/maybe.js";import{on as d}from"../../../core/watchUtils.js";import{a as _}from"../../../chunks/mat4.js";import{c as m}from"../../../chunks/mat4f64.js";import{s as c}from"../../../chunks/vec2.js";import{a as u}from"../../../chunks/vec2f64.js";import{s as l,l as p,g as f}from"../../../chunks/vec3.js";import{c as v}from"../../../chunks/vec3f64.js";import{c as g,f as b}from"../../../chunks/vec4f64.js";import{earth as T}from"../../../geometry/support/Ellipsoid.js";import{rayLeighScaleHeight as w,atmosphereHeight as R,betaRayleigh as H,betaOzone as j,betaMie as x,innerAtmosphereDepth as q,computeInnerAltitudeFade as E}from"./atmosphereUtils.js";import{ChapmanAtmosphereTechniqueConfiguration as U,ChapmanAtmosphereTechnique as z}from"./ChapmanAtmosphereTechnique.js";import{Pos2Tex as B}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as F}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as P}from"../../webgl/enums.js";class y{constructor(e){this._view=e,this.type="realistic",this.canRender=!0,this._cameraPosition=v(),this._projectionInverse=m(),this._viewInverse=m(),this._heightParameters=g(),this._betasRayleigh=v(),this._betasCombined=v(),this._scaleHeight=0,this._radii=u(),this._nearFar=u(),this._cameraHeight=0,this._cameraHeightSq=0,this._cAtmosphere=0,this._innerFadeDistance=0,this._altitudeFade=0,this._lowerElevationBoundRadius=0,this._lowerBoundEarthRadius=T.radius,this._hazeStrength=1,this._darkenHaze=!1,this._updateRadius(T.radius)}destroy(){this._atmosphereTechnique=s(this._atmosphereTechnique),this._atmosphereHazeTechnique=s(this._atmosphereHazeTechnique),this._vao=a(this._vao),this._handles=r(this._handles)}when(){return Promise.resolve()}initializeRenderContext(t){const i=t.renderContext.rctx;this._handles=new e,h(this._view.basemapTerrain.rootTiles)&&this._updateElevation({spatialReference:this._view.basemapTerrain.spatialReference,tile:this._view.basemapTerrain.rootTiles[0],extent:this._view.basemapTerrain.rootTiles[0].extent,context:"ground"}),this._handles.add(d(this._view,"basemapTerrain","elevation-change",(e=>this._updateElevation(e)),(()=>this._updateElevation()))),this._handles.add(d(this._view,"basemapTerrain","elevation-bounds-change",(()=>this._updateVisibleElevationBounds())));const s=new U;s.haze=!1,this._atmosphereTechnique=t.shaderTechniqueRep.acquire(z,s),s.haze=!0,this._atmosphereHazeTechnique=t.shaderTechniqueRep.acquire(z,s),this._vao=F(i,B),this._scaleHeight=w*R,l(this._betasRayleigh,H[0],H[1],H[2]),l(this._betasCombined,H[0]+j[0],H[1]+j[1],H[2]+j[2])}render(e){this._render(e,this._atmosphereTechnique,e.offscreenRenderingHelper.depthTexture)}renderHaze(e,t){this._darkenHaze=t,this._render(e,this._atmosphereHazeTechnique,e.offscreenRenderingHelper.linearDepthTexture)}_render(e,t,i){this._update(e.camera);const s=e.rctx,a=e.offscreenRenderingHelper;s.useProgram(t.program),t.bindPipelineState(s),a.renderDepthDetached((()=>{t.program.bindTexture(i,"depthTex"),this._renderCommon(t.program,e)}))}_renderCommon(e,t){if(n(this._vao))return;const i=t.rctx;t.scenelightingData.setLightDirectionUniform(e),e.setUniform4fv("heightParameters",this._heightParameters),e.setUniform3fv("cameraPosition",this._cameraPosition),e.setUniformMatrix4fv("projectionInverse",this._projectionInverse),e.setUniformMatrix4fv("viewInverse",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform2fv("radii",this._radii),e.setUniform1f("scaleHeight",this._scaleHeight),e.setUniform1f("betaMie",x),e.setUniform3fv("betaRayleigh",this._betasRayleigh),e.setUniform3fv("betaCombined",this._betasCombined),e.setUniform1f("innerFadeDistance",this._innerFadeDistance),e.setUniform1f("altitudeFade",this._altitudeFade),e.setUniform1f("hazeStrength",this._hazeStrength),i.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),i.drawArrays(P.TRIANGLE_STRIP,0,4)}_adjustRadiusForTesselation(e){return e*Math.cos(Math.PI/16/16)}_updateElevation(e){const t=e?e.tile:o(this._view.basemapTerrain.rootTiles,[null])[0];if(n(t)||0!==t.level)return;const i=this._adjustRadiusForTesselation(T.radius+t.elevationBounds[0]);i!==this._lowerElevationBoundRadius&&(this._lowerElevationBoundRadius=i,this._lowerBoundEarthRadius=-1,this._updateVisibleElevationBounds())}_updateVisibleElevationBounds(){const e=this._adjustRadiusForTesselation(T.radius+this._view.basemapTerrain.elevationBounds.min);(this._lowerBoundEarthRadius<0||e<this._lowerBoundEarthRadius)&&this._updateRadius(e)}_updateRadius(e){this._lowerBoundEarthRadius=e,c(this._radii,e,e+R),this._innerFadeDistance=2*Math.sqrt((2*e-q)*q)}_update(e){if(n(e))return;this._cameraHeight=p(e.eye),this._cameraHeightSq=this._cameraHeight*this._cameraHeight,this._cAtmosphere=this._cameraHeightSq-this._radii[1]*this._radii[1];const s=Math.min(1,Math.max(0,(this._cameraHeight-this._radii[0])/R));this._heightParameters=b(this._cameraHeight,this._cameraHeightSq,this._cAtmosphere,s),f(this._cameraPosition,e.eye),_(this._projectionInverse,e.projectionMatrix),_(this._viewInverse,e.viewMatrix),c(this._nearFar,e.near,e.far),this._altitudeFade=E(this._cameraHeight-this._lowerBoundEarthRadius),this._hazeStrength=this._darkenHaze?t(.6,1,i(9500,10500,this._cameraHeight-T.radius)):1}static isSupported(e){return e.renderContext.rctx.capabilities.depthTexture}}export{y as ChapmanAtmosphere};
5
+ import e from"../../../core/Handles.js";import{lerp as t,smoothstep as i}from"../../../core/mathUtils.js";import{releaseMaybe as s,disposeMaybe as a,destroyMaybe as r,isSome as h,isNone as n,unwrapOr as o}from"../../../core/maybe.js";import{on as d}from"../../../core/watchUtils.js";import{a as _}from"../../../chunks/mat4.js";import{c as m}from"../../../chunks/mat4f64.js";import{s as c}from"../../../chunks/vec2.js";import{a as u}from"../../../chunks/vec2f64.js";import{s as l,l as p,g as f}from"../../../chunks/vec3.js";import{c as v}from"../../../chunks/vec3f64.js";import{c as g,f as b}from"../../../chunks/vec4f64.js";import{earth as T}from"../../../geometry/support/Ellipsoid.js";import{rayLeighScaleHeight as w,atmosphereHeight as R,betaRayleigh as H,betaOzone as j,betaMie as x,innerAtmosphereDepth as q,computeInnerAltitudeFade as E}from"./atmosphereUtils.js";import{ChapmanAtmosphereTechniqueConfiguration as U,ChapmanAtmosphereTechnique as z}from"./ChapmanAtmosphereTechnique.js";import{Pos2Tex as B}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as F}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as P}from"../../webgl/enums.js";class y{constructor(e){this._view=e,this.type="realistic",this.canRender=!0,this._cameraPosition=v(),this._projectionInverse=m(),this._viewInverse=m(),this._heightParameters=g(),this._betasRayleigh=v(),this._betasCombined=v(),this._scaleHeight=0,this._radii=u(),this._nearFar=u(),this._cameraHeight=0,this._cameraHeightSq=0,this._cAtmosphere=0,this._innerFadeDistance=0,this._altitudeFade=0,this._lowerElevationBoundRadius=0,this._lowerBoundEarthRadius=T.radius,this._hazeStrength=1,this._darkenHaze=!1,this._updateRadius(T.radius)}destroy(){this._atmosphereTechnique=s(this._atmosphereTechnique),this._atmosphereHazeTechnique=s(this._atmosphereHazeTechnique),this._vao=a(this._vao),this._handles=r(this._handles)}when(){return Promise.resolve()}initializeRenderContext(t){const i=t.renderContext.rctx;this._handles=new e,h(this._view.basemapTerrain.rootTiles)&&this._updateElevation({spatialReference:this._view.basemapTerrain.spatialReference,tile:this._view.basemapTerrain.rootTiles[0],extent:this._view.basemapTerrain.rootTiles[0].extent,context:"ground"}),this._handles.add(d(this._view,"basemapTerrain","elevation-change",(e=>this._updateElevation(e)),(()=>this._updateElevation()))),this._handles.add(d(this._view,"basemapTerrain","elevation-bounds-change",(()=>this._updateVisibleElevationBounds())));const s=new U;s.haze=!1,this._atmosphereTechnique=t.shaderTechniqueRep.acquire(z,s),s.haze=!0,this._atmosphereHazeTechnique=t.shaderTechniqueRep.acquire(z,s),this._vao=F(i,B),this._scaleHeight=w*R,l(this._betasRayleigh,H[0],H[1],H[2]),l(this._betasCombined,H[0]+j[0],H[1]+j[1],H[2]+j[2])}render(e){this._render(e,this._atmosphereTechnique,e.offscreenRenderingHelper.depthTexture)}renderHaze(e,t){this._darkenHaze=t,this._render(e,this._atmosphereHazeTechnique,e.offscreenRenderingHelper.linearDepthTexture)}_render(e,t,i){this._update(e.camera);const s=e.rctx,a=e.offscreenRenderingHelper;s.useProgram(t.program),t.bindPipelineState(s),a.renderDepthDetached((()=>{t.program.bindTexture(i,"depthTex"),this._renderCommon(t.program,e)}))}_renderCommon(e,t){if(n(this._vao))return;const i=t.rctx;t.scenelightingData.setLightDirectionUniform(e),e.setUniform4fv("heightParameters",this._heightParameters),e.setUniform3fv("cameraPosition",this._cameraPosition),e.setUniformMatrix4fv("inverseProjectionMatrix",this._projectionInverse),e.setUniformMatrix4fv("inverseViewMatrix",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform2fv("radii",this._radii),e.setUniform1f("scaleHeight",this._scaleHeight),e.setUniform1f("betaMie",x),e.setUniform3fv("betaRayleigh",this._betasRayleigh),e.setUniform3fv("betaCombined",this._betasCombined),e.setUniform1f("innerFadeDistance",this._innerFadeDistance),e.setUniform1f("altitudeFade",this._altitudeFade),e.setUniform1f("hazeStrength",this._hazeStrength),i.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),i.drawArrays(P.TRIANGLE_STRIP,0,4)}_adjustRadiusForTesselation(e){return e*Math.cos(Math.PI/16/16)}_updateElevation(e){const t=e?e.tile:o(this._view.basemapTerrain.rootTiles,[null])[0];if(n(t)||0!==t.level)return;const i=this._adjustRadiusForTesselation(T.radius+t.elevationBounds[0]);i!==this._lowerElevationBoundRadius&&(this._lowerElevationBoundRadius=i,this._lowerBoundEarthRadius=-1,this._updateVisibleElevationBounds())}_updateVisibleElevationBounds(){const e=this._adjustRadiusForTesselation(T.radius+this._view.basemapTerrain.elevationBounds.min);(this._lowerBoundEarthRadius<0||e<this._lowerBoundEarthRadius)&&this._updateRadius(e)}_updateRadius(e){this._lowerBoundEarthRadius=e,c(this._radii,e,e+R),this._innerFadeDistance=2*Math.sqrt((2*e-q)*q)}_update(e){if(n(e))return;this._cameraHeight=p(e.eye),this._cameraHeightSq=this._cameraHeight*this._cameraHeight,this._cAtmosphere=this._cameraHeightSq-this._radii[1]*this._radii[1];const s=Math.min(1,Math.max(0,(this._cameraHeight-this._radii[0])/R));this._heightParameters=b(this._cameraHeight,this._cameraHeightSq,this._cAtmosphere,s),f(this._cameraPosition,e.eye),_(this._projectionInverse,e.projectionMatrix),_(this._viewInverse,e.viewMatrix),c(this._nearFar,e.near,e.far),this._altitudeFade=E(this._cameraHeight-this._lowerBoundEarthRadius),this._hazeStrength=this._darkenHaze?t(.6,1,i(9500,10500,this._cameraHeight-T.radius)):1}static isSupported(e){return e.renderContext.rctx.capabilities.depthTexture}}export{y as ChapmanAtmosphere};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import"../webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/EvaluateMainLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import"../webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import"../webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import"../webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/basicInterfaces.js";export{b as build}from"../../../chunks/CloudsComposition.glsl.js";
5
+ import"../webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/EvaluateMainLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import"../webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import"../webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import"../webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{b as build}from"../../../chunks/CloudsComposition.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import i from"../../../core/Handles.js";import s from"../../../core/has.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as o,disposeMaybe as h,destroyMaybe as a,isNone as n}from"../../../core/maybe.js";import{init as c}from"../../../core/watchUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{c as d}from"../../../chunks/mat3f64.js";import{x as f}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{f as _,z as g}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as y}from"../../../geometry/projectionEllipsoid.js";import{cloudPresets as v}from"./CloudsPresets.js";import{CloudsTechniqueConfiguration as x,CloudsTechnique as b}from"./CloudsTechnique.js";import{NoiseTextureAtlas as S}from"./NoiseTextureAtlas.js";import{createQuadVAO as T}from"../webgl-engine/lib/glUtil3D.js";import{TaskPriority as w}from"../../support/Scheduler.js";import{TextureType as z,PixelFormat as M,PixelType as j,TextureWrapMode as C,TextureSamplingMode as U,TargetType as E}from"../../webgl/enums.js";import{FramebufferObject as R}from"../../webgl/FramebufferObject.js";let q=class extends e{constructor(t){super(t),this._frameTask=null,this._handles=new i,this._cubeMapSize=s("esri-mobile")?1024:2048,this._techniques=[],this._techniqueConfiguration=new x,this.coverage=r(P.coverage[0],P.coverage[1],.5),this.density=r(P.density[0],P.density[1],.5),this.absorption=r(P.absorption[0],P.absorption[1],.5),this.cloudSize=r(P.cloudSize[0],P.cloudSize[1],.5),this.detailSize=r(P.detailSize[0],P.detailSize[1],.5),this.smoothness=r(P.smoothness[0],P.smoothness[1],.5),this.cloudHeight=r(P.cloudHeight[0],P.cloudHeight[1],.5),this.raymarchingStepType=P.raymarchingStepType,this._cloudRadius=0,this._viewMatrix=l(),this._viewMatrix3=d(),this.running=!1}_getTechnique(t){const e=this._techniques[t];return e||(this._techniqueConfiguration.steps=t,this._techniques[t]=new b({rctx:this.rctx,viewingMode:this.view.state.viewingMode},this._techniqueConfiguration),this._techniques[t])}initialize(){this._vao=T(this.rctx);const t=y(this.view.spatialReference);this._cloudRadius=.5*t.radius,this.setDirty(),this._frameTask=this.view.resourceController.scheduler.registerTask(w.CLOUDS_GENERATOR,this),this._handles.add(this._frameTask),this._handles.add(c(this,"coverage",(()=>this.setDirty())));["coverage","density","absorption","cloudSize","detailSize","smoothness","cloudHeight","raymarchingStepType"].forEach((t=>this._handles.add(c(this,t,(()=>this.setDirty())))))}destroy(){this._handles.destroy(),this._techniques.forEach((t=>o(t))),this._techniques=null,this._frameBufferCube=h(this._frameBufferCube),this._vao=h(this._vao),this._noiseTexture=a(this._noiseTexture)}_ensureNoiseTexture(){return n(this._noiseTexture)&&(this._noiseTexture=new S(this.rctx,this.view),this._noiseTexture.render(this.rctx)),this._noiseTexture}get frameBufferCube(){if(n(this._frameBufferCube)){const t={target:z.TEXTURE_CUBE_MAP,pixelFormat:M.RGBA,dataType:j.UNSIGNED_BYTE,wrapMode:C.CLAMP_TO_EDGE,samplingMode:U.LINEAR,hasMipmap:!1,width:this._cubeMapSize,height:this._cubeMapSize};this._frameBufferCube=new R(this.rctx,{colorTarget:E.CUBEMAP,width:this._cubeMapSize,height:this._cubeMapSize},t)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}applyPreset(t,e){const i=t.median,s=t=>{const s=r(t[0],t[1],i);return e<.5?r(t[0],s,2*e):r(s,t[1],2*(e-.5))};this.coverage=s(t.coverage),this.density=s(t.density),this.absorption=s(t.absorption),this.cloudSize=s(t.cloudSize),this.detailSize=s(t.detailSize),this.smoothness=s(t.smoothness),this.cloudHeight=s(t.cloudHeight),this.raymarchingStepType=t.raymarchingStepType}setDirty(){this.running=!0}runTask(t){if(0===this.coverage||n(this._vao))return void(this.running=!1);const e=this._ensureNoiseTexture().textureAtlas;if(n(e))return void(this.running=!1);const i=this.rctx.getViewport();this.rctx.setViewport(0,0,this._cubeMapSize,this._cubeMapSize),this.rctx.bindFramebuffer(this.frameBufferCube);const s=this._getTechnique(this.raymarchingStepType),o=s.program;this.rctx.useProgram(o);const h=1+this.absorption,a=r(35,120,this.absorption);o.bindTexture(e,"cloudShapeTexture"),o.setUniform1f("cloudRadius",this._cloudRadius),o.setUniform1f("halfCubeMapSize",.5*this._cubeMapSize),o.setUniform1f("power",a),o.setUniform1f("sigmaE",h),o.setUniform1f("density",r(0,.3,this.density)),o.setUniform1f("cloudSize",r(0,.02,Math.max(.01,1-this.cloudSize))),o.setUniform1f("detailSize",r(0,.2,Math.max(.01,1-this.detailSize))),o.setUniform1f("smoothness",r(0,.5,1-this.smoothness)),o.setUniform1f("cloudHeight",r(0,1500,this.cloudHeight)),o.setUniform1f("coverage",this.coverage),this.rctx.bindVAO(this._vao),o.assertCompatibleVertexAttributeLocations(this._vao),s.bindPipelineState(this.rctx);for(let r=0;r<5;r++){const t=A[r],e=B[r];f(this._viewMatrix,k,t,e),m(this._viewMatrix3,this._viewMatrix),o.setUniformMatrix3fv("viewMatrix",this._viewMatrix3);const i=z.TEXTURE_CUBE_MAP_POSITIVE_X+r;this.frameBufferCube.setColorTextureTarget(i),this.rctx.gl.drawArrays(this.rctx.gl.TRIANGLE_STRIP,0,4),this.rctx.gl.flush()}this.running=!1,this.rctx.setViewport(i.x,i.y,i.width,i.height),this.requestRender(),t.madeProgress()}};t([u({constructOnly:!0})],q.prototype,"rctx",void 0),t([u({constructOnly:!0})],q.prototype,"view",void 0),t([u({constructOnly:!0})],q.prototype,"requestRender",void 0),t([u()],q.prototype,"_frameTask",void 0),t([u()],q.prototype,"coverage",void 0),t([u()],q.prototype,"density",void 0),t([u()],q.prototype,"absorption",void 0),t([u()],q.prototype,"cloudSize",void 0),t([u()],q.prototype,"detailSize",void 0),t([u()],q.prototype,"smoothness",void 0),t([u()],q.prototype,"cloudHeight",void 0),t([u()],q.prototype,"raymarchingStepType",void 0),t([u()],q.prototype,"running",void 0),q=t([p("esri.views.3d.environment.CloudsGenerator")],q);const A=[_(1,0,0),_(-1,0,0),_(0,1,0),_(0,-1,0),_(0,0,1)],B=[_(0,1,0),_(0,1,0),_(0,0,-1),_(0,0,1),_(0,1,0)],k=g(),P=v.sunny;export{q as CloudsGenerator};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import i from"../../../core/Handles.js";import s from"../../../core/has.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as o,disposeMaybe as h,destroyMaybe as a,isNone as n}from"../../../core/maybe.js";import{init as c}from"../../../core/watchUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{c as d}from"../../../chunks/mat3f64.js";import{x as f}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{f as _,z as g}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as y}from"../../../geometry/projectionEllipsoid.js";import{cloudPresets as v}from"./CloudsPresets.js";import{CloudsTechniqueConfiguration as b,CloudsTechnique as x}from"./CloudsTechnique.js";import{NoiseTextureAtlas as S}from"./NoiseTextureAtlas.js";import{createQuadVAO as T}from"../webgl-engine/lib/glUtil3D.js";import{TaskPriority as w}from"../../support/Scheduler.js";import{TextureType as z,PixelFormat as M,PixelType as j,TextureWrapMode as C,TextureSamplingMode as U,TargetType as E}from"../../webgl/enums.js";import{FramebufferObject as R}from"../../webgl/FramebufferObject.js";let q=class extends e{constructor(t){super(t),this._frameTask=null,this._handles=new i,this._cubeMapSize=s("esri-mobile")?1024:2048,this._techniques=[],this._techniqueConfiguration=new b,this.coverage=r(P.coverage[0],P.coverage[1],.5),this.density=r(P.density[0],P.density[1],.5),this.absorption=r(P.absorption[0],P.absorption[1],.5),this.cloudSize=r(P.cloudSize[0],P.cloudSize[1],.5),this.detailSize=r(P.detailSize[0],P.detailSize[1],.5),this.smoothness=r(P.smoothness[0],P.smoothness[1],.5),this.cloudHeight=r(P.cloudHeight[0],P.cloudHeight[1],.5),this.raymarchingStepType=P.raymarchingStepType,this._cloudRadius=0,this._viewMatrix=l(),this._viewMatrix3=d(),this.running=!1}_getTechnique(t){const e=this._techniques[t];return e||(this._techniqueConfiguration.steps=t,this._techniques[t]=new x({rctx:this.rctx,viewingMode:this.view.state.viewingMode},this._techniqueConfiguration),this._techniques[t])}initialize(){this._vao=T(this.rctx);const t=y(this.view.spatialReference);this._cloudRadius=.5*t.radius,this.setDirty(),this._frameTask=this.view.resourceController.scheduler.registerTask(w.CLOUDS_GENERATOR,this),this._handles.add(this._frameTask),this._handles.add(c(this,"coverage",(()=>this.setDirty())));["coverage","density","absorption","cloudSize","detailSize","smoothness","cloudHeight","raymarchingStepType"].forEach((t=>this._handles.add(c(this,t,(()=>this.setDirty())))))}destroy(){this._handles.destroy(),this._techniques.forEach((t=>o(t))),this._techniques=null,this._frameBufferCube=h(this._frameBufferCube),this._vao=h(this._vao),this._noiseTexture=a(this._noiseTexture)}_ensureNoiseTexture(){return n(this._noiseTexture)&&(this._noiseTexture=new S(this.rctx,this.view),this._noiseTexture.render(this.rctx)),this._noiseTexture}get frameBufferCube(){if(n(this._frameBufferCube)){const t={target:z.TEXTURE_CUBE_MAP,pixelFormat:M.RGBA,dataType:j.UNSIGNED_BYTE,wrapMode:C.CLAMP_TO_EDGE,samplingMode:U.LINEAR,hasMipmap:!1,width:this._cubeMapSize,height:this._cubeMapSize};this._frameBufferCube=new R(this.rctx,{colorTarget:E.CUBEMAP,width:this._cubeMapSize,height:this._cubeMapSize},t)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}applyPreset(t,e){const i=t.median,s=t=>{const s=r(t[0],t[1],i);return e<.5?r(t[0],s,2*e):r(s,t[1],2*(e-.5))};this.coverage=s(t.coverage),this.density=s(t.density),this.absorption=s(t.absorption),this.cloudSize=s(t.cloudSize),this.detailSize=s(t.detailSize),this.smoothness=s(t.smoothness),this.cloudHeight=s(t.cloudHeight),this.raymarchingStepType=t.raymarchingStepType}setDirty(){this.running=!0}runTask(t){if(0===this.coverage||n(this._vao))return void(this.running=!1);const e=this._ensureNoiseTexture().textureAtlas;if(n(e))return void(this.running=!1);const i=this.rctx.getViewport();this.rctx.setViewport(0,0,this._cubeMapSize,this._cubeMapSize),this.rctx.bindFramebuffer(this.frameBufferCube);const s=this._getTechnique(this.raymarchingStepType),o=s.program;this.rctx.useProgram(o);const h=1+this.absorption,a=r(35,120,this.absorption);o.bindTexture(e,"cloudShapeTexture"),o.setUniform1f("cloudRadius",this._cloudRadius),o.setUniform1f("halfCubeMapSize",.5*this._cubeMapSize),o.setUniform1f("power",a),o.setUniform1f("sigmaE",h),o.setUniform1f("density",r(0,.3,this.density)),o.setUniform1f("cloudSize",r(0,.02,Math.max(.01,1-this.cloudSize))),o.setUniform1f("detailSize",r(0,.2,Math.max(.01,1-this.detailSize))),o.setUniform1f("smoothness",r(0,.5,1-this.smoothness)),o.setUniform1f("cloudHeight",r(0,1500,this.cloudHeight)),o.setUniform1f("coverage",this.coverage),this.rctx.bindVAO(this._vao),o.assertCompatibleVertexAttributeLocations(this._vao),s.bindPipelineState(this.rctx);for(let r=0;r<5;r++){const t=A[r],e=B[r];f(this._viewMatrix,k,t,e),m(this._viewMatrix3,this._viewMatrix),o.setUniformMatrix3fv("view",this._viewMatrix3);const i=z.TEXTURE_CUBE_MAP_POSITIVE_X+r;this.frameBufferCube.setColorTextureTarget(i),this.rctx.gl.drawArrays(this.rctx.gl.TRIANGLE_STRIP,0,4),this.rctx.gl.flush()}this.running=!1,this.rctx.setViewport(i.x,i.y,i.width,i.height),this.requestRender(),t.madeProgress()}};t([u({constructOnly:!0})],q.prototype,"rctx",void 0),t([u({constructOnly:!0})],q.prototype,"view",void 0),t([u({constructOnly:!0})],q.prototype,"requestRender",void 0),t([u()],q.prototype,"_frameTask",void 0),t([u()],q.prototype,"coverage",void 0),t([u()],q.prototype,"density",void 0),t([u()],q.prototype,"absorption",void 0),t([u()],q.prototype,"cloudSize",void 0),t([u()],q.prototype,"detailSize",void 0),t([u()],q.prototype,"smoothness",void 0),t([u()],q.prototype,"cloudHeight",void 0),t([u()],q.prototype,"raymarchingStepType",void 0),t([u()],q.prototype,"running",void 0),q=t([p("esri.views.3d.environment.CloudsGenerator")],q);const A=[_(1,0,0),_(-1,0,0),_(0,1,0),_(0,-1,0),_(0,0,1)],B=[_(0,1,0),_(0,1,0),_(0,0,-1),_(0,0,1),_(0,1,0)],k=g(),P=v.sunny;export{q as CloudsGenerator};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{R as s}from"../../../chunks/Clouds.glsl.js";class t{constructor(s,t,i,e,o,n,h,c,r=.5){this.coverage=s,this.density=t,this.absorption=i,this.cloudSize=e,this.detailSize=o,this.smoothness=n,this.cloudHeight=h,this.raymarchingStepType=c,this.median=r}}const i={sunny:new t([.1,.7],[.02,.02],[0,0],[.86,.86],[.8,.8],[.5,.5],[.05,.05],s.SIXTEEN),cloudy:new t([.24,.7],[.135,.2],[0,0],[.5,.5],[.65,.7],[.3,.3],[1,1],s.TWOHUNDRED),rainy:new t([.5,.9],[.2,.5],[.3,.6],[.4,.4],[.7,.7],[.5,.5],[1,1],s.TWOHUNDRED),foggy:new t([.8,.8],[.5,.5],[0,0],[.85,.85],[.75,.75],[.8,.8],[.3,.3],s.HUNDRED)};export{t as CloudPresets,i as cloudPresets};
5
+ import{R as s}from"../../../chunks/Clouds.glsl.js";class t{constructor(s,t,i,e,n,o,h,c,r=.5){this.coverage=s,this.density=t,this.absorption=i,this.cloudSize=e,this.detailSize=n,this.smoothness=o,this.cloudHeight=h,this.raymarchingStepType=c,this.median=r}}const i={sunny:new t([.1,.7],[.02,.02],[0,0],[.86,.86],[.8,.8],[.5,.5],[.05,.05],s.SIXTEEN),cloudy:new t([.24,.7],[.135,.2],[0,0],[.5,.5],[.65,.7],[.3,.3],[1,1],s.TWOHUNDRED),rainy:new t([.5,.9],[.2,.5],[.3,.6],[.4,.4],[.7,.7],[.5,.5],[1,1],s.TWOHUNDRED),snowy:new t([.5,.9],[.2,.5],[0,0],[.4,.4],[.7,.7],[.5,.5],[1,1],s.TWOHUNDRED),foggy:new t([.8,.8],[.5,.5],[0,0],[.85,.85],[.75,.75],[.8,.8],[.3,.3],s.HUNDRED)};export{t as CloudPresets,i as cloudPresets};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import"../../../core/has.js";import s from"../../../core/Handles.js";import{equalsShallow as i}from"../../../core/lang.js";import{lerp as r}from"../../../core/mathUtils.js";import{isSome as o,destroyMaybe as n,applySome as a,isNone as h}from"../../../core/maybe.js";import{watch as p,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{when as d}from"../../../core/watchUtils.js";import{property as m}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as _}from"../../../core/accessorSupport/decorators/subclass.js";import{l as u}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as c}from"../../../geometry/projectionEllipsoid.js";import{isMoon as g,isEarth as w}from"../../../geometry/support/spatialReferenceUtils.js";import{ChapmanAtmosphere as v}from"./ChapmanAtmosphere.js";import{CloudsComposition as y}from"./CloudsComposition.js";import{isReadyCloudsData as f}from"./CloudsData.js";import{CloudsGenerator as R}from"./CloudsGenerator.js";import{cloudPresets as A}from"./CloudsPresets.js";import{Fog as C}from"./Fog.js";import{PanoramicAtmosphere as E}from"./PanoramicAtmosphere.js";import N from"./SimpleAtmosphere.js";import{Stars as T}from"./Stars.js";import{weatherHeightLimit as j}from"./weather.js";import{RenderPass as P}from"../webgl-engine/lib/RenderPass.js";import{RenderSlot as b}from"../webgl-engine/lib/RenderSlot.js";const x=[b.POSTPROCESSING_ENVIRONMENT_OPAQUE,b.POSTPROCESSING_ENVIRONMENT_TRANSPARENT];let S=class extends t{constructor(e){super(e),this._handles=new s,this._context=null,this._pendingAtmosphere=null,this._atmosphere=null,this._stars=null,this._clouds=null,this._cloudComposition=null,this._fog=null}get atmosphereType(){return o(this._pendingAtmosphere)?this._pendingAtmosphere.type:o(this._atmosphere)?this._atmosphere.type:"none"}get canRender(){var e;return!(null==(e=this.view.basemapTerrain)||!e.renderer.canRender)||"global"!==this.view.viewingMode}get needsLinearDepth(){return"realistic"===this._selectAtmosphereType()}get updating(){return o(this._pendingAtmosphere)||o(this._stars)&&this._stars.updating||o(this._clouds)&&this._clouds.running}get weatherVisible(){return u(this.view.state.camera.eye)-c(this.view.spatialReference).radius<=j}get weatherEnabled(){var e;return!(null==(e=this.view.environmentManager)||!e.weatherEnabled)}initialize(){this.view._stage.addRenderPlugin(x,this)}destroy(){this._pendingAtmosphere=n(this._pendingAtmosphere),this.uninitializeRenderContext(),this._handles=n(this._handles),this.view&&null!=this.view._stage&&(this.view._stage.removeRenderPlugin(this),this._set("view",null))}initializeRenderContext(e=null){this._context=e,this._handles.add([d(this.view,"basemapTerrain",(()=>this._updateBasemapTerrain()),!0),p((()=>({viewingMode:this.view.viewingMode,atmosphereEnabled:this.view.environment.atmosphereEnabled,atmosphereQuality:this.view.environment.atmosphere.quality})),(()=>this._updateAtmosphere()),l),p((()=>this._starsCreationParameters),(e=>this._createOrDestroyStars(e)),{sync:!0,initial:!0,equals:i}),p((()=>this._cloudsCreationParameters),(e=>this._createOrDestroyClouds(e)),{sync:!0,initial:!0,equals:i}),p((()=>this._fogCreationParameters),(e=>this._createOrDestroyFog(e)),{sync:!0,initial:!0,equals:i}),p((()=>this._weatherUpdateParameters),(e=>{this._updateWeather(e),this._updateFog(e)}),l)])}uninitializeRenderContext(){this._stars=n(this._stars),this._atmosphere=n(this._atmosphere),this._clouds=n(this._clouds),this._cloudComposition=n(this._cloudComposition),this._fog=n(this._fog)}render(e){if(e.pass===P.MATERIAL)switch(e.slot){case b.POSTPROCESSING_ENVIRONMENT_OPAQUE:o(this._stars)&&this._stars.render(e),o(this._atmosphere)&&this._atmosphere.canRender&&(this._atmosphere.render(e),f(this._clouds)&&o(this._cloudComposition)&&(this._cloudComposition.render(e,this._clouds,o(this.view.animation)),this._cloudComposition.isFading&&this._setNeedsRender()));break;case b.POSTPROCESSING_ENVIRONMENT_TRANSPARENT:if(o(this._atmosphere)&&this._atmosphere.canRender){const t=this.weatherEnabled?this.view.environment.weather.type:"disabled";this._atmosphere.renderHaze(e,"rainy"===t),o(this._fog)&&("foggy"!==t&&"realistic"===this._selectAtmosphereType()||this._fog.render(e,"foggy"===t,"rainy"===t))}}}get _cloudsCreationParameters(){return this.weatherEnabled?{view:this.view,viewingMode:this.view.state.viewingMode,rctx:o(this._context)?this._context.renderContext.rctx:null,radius:c(this.view.spatialReference).radius}:null}_createOrDestroyClouds(e){this._clouds=n(this._clouds),this._cloudComposition=n(this._cloudComposition),a(e,(({view:e,viewingMode:t,rctx:s,radius:i})=>{this._clouds=new R({rctx:s,view:e,requestRender:()=>this._setNeedsRender()}),this._cloudComposition=new y(s,t,i,u(e.state.camera.eye)-i)})),this._setNeedsRender()}get _weatherUpdateParameters(){const e=this.weatherEnabled?this.view.environment.weather:null;return h(e)?null:{type:e.type,weatherAdjustment:"foggy"===e.type?e.fogStrength:e.cloudCover}}_updateWeather(e){h(e)||h(this._clouds)||this._clouds.applyPreset(A[e.type],e.weatherAdjustment)}_setNeedsRender(){o(this._context)&&this._context.requestRender()}get _starsCreationParameters(){var e,t,s;return{view:this.view,starsEnabled:null!=(e=null==(t=this.view)||null==(s=t.environment)?void 0:s.starsEnabled)&&e}}_createOrDestroyStars({view:e,starsEnabled:t}){t&&h(this._stars)?(this._stars=new T({view:e,requestRender:()=>this._setNeedsRender()}),this._setNeedsRender()):!t&&o(this._stars)&&(this._stars.destroy(),this._stars=null,this._setNeedsRender())}_updateFog(e){h(this._fog)||h(e)||("foggy"===e.type?this._fog.strength=r(3e-5,.005,e.weatherAdjustment**3):this._fog.strength=4e-6)}get _fogCreationParameters(){return!this.weatherEnabled||h(this._context)?null:{view:this.view,context:this._context}}_createOrDestroyFog(e){this.weatherEnabled&&h(this._fog)?(a(e,(({view:e,context:t})=>{this._fog=new C(t,e)})),this._updateFog(this._weatherUpdateParameters),this._setNeedsRender()):o(this._fog)&&(this._fog.destroy(),this._fog=null,this._setNeedsRender())}_updateAtmosphere(){const e=this._selectAtmosphereType();if(this.atmosphereType===e)return;o(this._pendingAtmosphere)&&(this._pendingAtmosphere!==this._atmosphere&&this._pendingAtmosphere.destroy(),this._pendingAtmosphere=null);const t=this._getAtmosphereClass();if(!t)return o(this._atmosphere)&&(this._atmosphere.destroy(),this._atmosphere=null,this._setNeedsRender()),void this._updateBasemapTerrain();const s=new t(this.view);o(this._context)&&s.initializeRenderContext(this._context),h(this._atmosphere)&&(this._atmosphere=s,this._setNeedsRender()),this._pendingAtmosphere=s,s.when().then((()=>{o(this._atmosphere)&&this._pendingAtmosphere&&this._pendingAtmosphere!==this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=this._pendingAtmosphere),this._pendingAtmosphere=null,this._setNeedsRender(),this._updateBasemapTerrain()})).catch((()=>{this._pendingAtmosphere===s&&(this._pendingAtmosphere=null)}))}_getAtmosphereClass(){switch(this._selectAtmosphereType()){case"none":return null;case"realistic":return v;case"panoramic":return E;case"simple":return N;default:return}}_selectAtmosphereType(){const e=this.view.get("environment.atmosphereEnabled"),t=this.view.get("environment.atmosphere.quality"),s=this.view.viewingMode;return!e||null==t||g(this.view.spatialReference)?"none":"local"===s?"panoramic":"high"===t&&o(this._context)&&v.isSupported(this._context)&&w(this.view.spatialReference)?"realistic":"simple"}_updateBasemapTerrain(){this.view.basemapTerrain&&(this.view.basemapTerrain.velvetOverground=o(this._atmosphere)&&"simple"===this.atmosphereType)}get test(){return{atmosphere:this._atmosphere,clouds:this._clouds,selectAtmosphereType:()=>this._selectAtmosphereType()}}};e([m({constructOnly:!0})],S.prototype,"view",void 0),e([m({type:Boolean,readOnly:!0})],S.prototype,"updating",null),e([m()],S.prototype,"weatherVisible",null),e([m()],S.prototype,"_pendingAtmosphere",void 0),e([m()],S.prototype,"_stars",void 0),e([m()],S.prototype,"_clouds",void 0),e([m()],S.prototype,"_cloudComposition",void 0),e([m()],S.prototype,"_fog",void 0),e([m()],S.prototype,"weatherEnabled",null),e([m()],S.prototype,"_cloudsCreationParameters",null),e([m()],S.prototype,"_weatherUpdateParameters",null),e([m()],S.prototype,"_starsCreationParameters",null),e([m()],S.prototype,"_fogCreationParameters",null),S=e([_("esri.views.3d.environment.EnvironmentRenderer")],S);export{S as EnvironmentRenderer};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import"../../../core/has.js";import s from"../../../core/Handles.js";import{equalsShallow as i}from"../../../core/lang.js";import{lerp as r}from"../../../core/mathUtils.js";import{isSome as o,destroyMaybe as n,applySome as a,isNone as h}from"../../../core/maybe.js";import{watch as p,syncAndInitial as l}from"../../../core/reactiveUtils.js";import{when as d}from"../../../core/watchUtils.js";import{property as m}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as _}from"../../../core/accessorSupport/decorators/subclass.js";import{l as c}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as u}from"../../../geometry/projectionEllipsoid.js";import{isMoon as g,isEarth as w}from"../../../geometry/support/spatialReferenceUtils.js";import{enablePrecipitation as v}from"../../../support/featureFlags.js";import{ChapmanAtmosphere as y}from"./ChapmanAtmosphere.js";import{CloudsComposition as f}from"./CloudsComposition.js";import{isReadyCloudsData as R}from"./CloudsData.js";import{CloudsGenerator as A}from"./CloudsGenerator.js";import{cloudPresets as P}from"./CloudsPresets.js";import{Fog as C}from"./Fog.js";import{PanoramicAtmosphere as E}from"./PanoramicAtmosphere.js";import{Precipitation as N}from"./Precipitation.js";import{P as b}from"../../../chunks/Precipitation.glsl.js";import j from"./SimpleAtmosphere.js";import{Stars as T}from"./Stars.js";import{weatherHeightLimit as x}from"./weather.js";import{RenderPass as O}from"../webgl-engine/lib/RenderPass.js";import{RenderSlot as S}from"../webgl-engine/lib/RenderSlot.js";const M=[S.POSTPROCESSING_ENVIRONMENT_OPAQUE,S.POSTPROCESSING_ENVIRONMENT_TRANSPARENT];let D=class extends t{constructor(e){super(e),this._handles=new s,this._context=null,this._pendingAtmosphere=null,this._atmosphere=null,this._stars=null,this._precipitation=null,this._clouds=null,this._cloudComposition=null,this._fog=null}get atmosphereType(){return o(this._pendingAtmosphere)?this._pendingAtmosphere.type:o(this._atmosphere)?this._atmosphere.type:"none"}get canRender(){var e;return!(null==(e=this.view.basemapTerrain)||!e.renderer.canRender)||"global"!==this.view.viewingMode}get needsLinearDepth(){return"realistic"===this._selectAtmosphereType()}updateAnimation(e){return!!o(this._precipitation)&&this._precipitation.update(e)}get updating(){return o(this._pendingAtmosphere)||o(this._stars)&&this._stars.updating||o(this._clouds)&&this._clouds.running}get weatherVisible(){return c(this.view.state.camera.eye)-u(this.view.spatialReference).radius<=x}get weatherEnabled(){var e;return!(null==(e=this.view.environmentManager)||!e.weatherEnabled)}get precipitationEnabled(){return v()}initialize(){this.view._stage.addRenderPlugin(M,this)}destroy(){this._pendingAtmosphere=n(this._pendingAtmosphere),this.uninitializeRenderContext(),this._handles=n(this._handles),this.view&&null!=this.view._stage&&(this.view._stage.removeRenderPlugin(this),this._set("view",null))}initializeRenderContext(e=null){this._context=e,this._handles.add([d(this.view,"basemapTerrain",(()=>this._updateBasemapTerrain()),!0),p((()=>({viewingMode:this.view.viewingMode,atmosphereEnabled:this.view.environment.atmosphereEnabled,atmosphereQuality:this.view.environment.atmosphere.quality})),(()=>this._updateAtmosphere()),l),p((()=>this._starsCreationParameters),(e=>this._createOrDestroyStars(e)),{sync:!0,initial:!0,equals:i}),p((()=>this._environmentPostProcessCreationParameters),(e=>this._createOrDestroyPrecipitation(e)),{sync:!0,initial:!0,equals:i}),p((()=>this._cloudsCreationParameters),(e=>this._createOrDestroyClouds(e)),{sync:!0,initial:!0,equals:i}),p((()=>this._environmentPostProcessCreationParameters),(e=>this._createOrDestroyFog(e)),{sync:!0,initial:!0,equals:i}),p((()=>this._weatherUpdateParameters),(e=>{this._updateWeather(e),this._updateFog(e)}),l)])}uninitializeRenderContext(){this._stars=n(this._stars),this._precipitation=n(this._precipitation),this._atmosphere=n(this._atmosphere),this._clouds=n(this._clouds),this._cloudComposition=n(this._cloudComposition),this._fog=n(this._fog)}render(e){if(e.pass===O.MATERIAL)switch(e.slot){case S.POSTPROCESSING_ENVIRONMENT_OPAQUE:o(this._stars)&&this._stars.render(e),o(this._atmosphere)&&this._atmosphere.canRender&&(this._atmosphere.render(e),R(this._clouds)&&o(this._cloudComposition)&&(this._cloudComposition.render(e,this._clouds,o(this.view.animation)),this._cloudComposition.isFading&&this._setNeedsRender()));break;case S.POSTPROCESSING_ENVIRONMENT_TRANSPARENT:if(o(this._atmosphere)&&this._atmosphere.canRender){const t=this.weatherEnabled?this.view.environment.weather.type:"disabled";this._atmosphere.renderHaze(e,"rainy"===t),o(this._fog)&&("foggy"!==t&&"realistic"===this._selectAtmosphereType()||this._fog.render(e,"foggy"===t,"rainy"===t)),"rainy"!==this.view.environment.weather.type&&"snowy"!==this.view.environment.weather.type||o(this._precipitation)&&this._precipitation.render(e,this.view.environment.weather.precipitation,"rainy"===this.view.environment.weather.type?b.RAIN:b.SNOW)}}}get _cloudsCreationParameters(){return this.weatherEnabled?{view:this.view,viewingMode:this.view.state.viewingMode,rctx:o(this._context)?this._context.renderContext.rctx:null,radius:u(this.view.spatialReference).radius}:null}_createOrDestroyClouds(e){this._clouds=n(this._clouds),this._cloudComposition=n(this._cloudComposition),a(e,(({view:e,viewingMode:t,rctx:s,radius:i})=>{this._clouds=new A({rctx:s,view:e,requestRender:()=>this._setNeedsRender()}),this._cloudComposition=new f(s,t,i,c(e.state.camera.eye)-i)})),this._setNeedsRender()}get _weatherUpdateParameters(){const e=this.weatherEnabled?this.view.environment.weather:null;return h(e)?null:{type:e.type,weatherAdjustment:"foggy"===e.type?e.fogStrength:e.cloudCover}}_updateWeather(e){h(e)||h(this._clouds)||this._clouds.applyPreset(P[e.type],e.weatherAdjustment)}_setNeedsRender(){o(this._context)&&this._context.requestRender()}get _starsCreationParameters(){var e,t,s;return{view:this.view,starsEnabled:null!=(e=null==(t=this.view)||null==(s=t.environment)?void 0:s.starsEnabled)&&e}}_createOrDestroyStars({view:e,starsEnabled:t}){t&&h(this._stars)?(this._stars=new T({view:e,requestRender:()=>this._setNeedsRender()}),this._setNeedsRender()):!t&&o(this._stars)&&(this._stars.destroy(),this._stars=null,this._setNeedsRender())}_createOrDestroyPrecipitation(e){this.precipitationEnabled&&h(this._precipitation)?(a(e,(({context:e,view:t})=>{this._precipitation=new N(e,t)})),this._setNeedsRender()):!this.precipitationEnabled&&o(this._precipitation)&&(this._precipitation=n(this._precipitation),this._setNeedsRender())}_updateFog(e){h(this._fog)||h(e)||("foggy"===e.type?this._fog.strength=r(3e-5,.005,e.weatherAdjustment**3):this._fog.strength=4e-6)}get _environmentPostProcessCreationParameters(){return!this.weatherEnabled||h(this._context)?null:{view:this.view,context:this._context}}_createOrDestroyFog(e){this.weatherEnabled&&h(this._fog)?(a(e,(({view:e,context:t})=>{this._fog=new C(t,e)})),this._updateFog(this._weatherUpdateParameters),this._setNeedsRender()):o(this._fog)&&(this._fog.destroy(),this._fog=null,this._setNeedsRender())}_updateAtmosphere(){const e=this._selectAtmosphereType();if(this.atmosphereType===e)return;o(this._pendingAtmosphere)&&(this._pendingAtmosphere!==this._atmosphere&&this._pendingAtmosphere.destroy(),this._pendingAtmosphere=null);const t=this._getAtmosphereClass();if(!t)return o(this._atmosphere)&&(this._atmosphere.destroy(),this._atmosphere=null,this._setNeedsRender()),void this._updateBasemapTerrain();const s=new t(this.view);o(this._context)&&s.initializeRenderContext(this._context),h(this._atmosphere)&&(this._atmosphere=s,this._setNeedsRender()),this._pendingAtmosphere=s,s.when().then((()=>{o(this._atmosphere)&&this._pendingAtmosphere&&this._pendingAtmosphere!==this._atmosphere&&(this._atmosphere.destroy(),this._atmosphere=this._pendingAtmosphere),this._pendingAtmosphere=null,this._setNeedsRender(),this._updateBasemapTerrain()})).catch((()=>{this._pendingAtmosphere===s&&(this._pendingAtmosphere=null)}))}_getAtmosphereClass(){switch(this._selectAtmosphereType()){case"none":return null;case"realistic":return y;case"panoramic":return E;case"simple":return j;default:return}}_selectAtmosphereType(){const e=this.view.get("environment.atmosphereEnabled"),t=this.view.get("environment.atmosphere.quality"),s=this.view.viewingMode;return!e||null==t||g(this.view.spatialReference)?"none":"local"===s?"panoramic":"high"===t&&o(this._context)&&y.isSupported(this._context)&&w(this.view.spatialReference)?"realistic":"simple"}_updateBasemapTerrain(){this.view.basemapTerrain&&(this.view.basemapTerrain.velvetOverground=o(this._atmosphere)&&"simple"===this.atmosphereType)}get test(){return{atmosphere:this._atmosphere,clouds:this._clouds,selectAtmosphereType:()=>this._selectAtmosphereType()}}};e([m({constructOnly:!0})],D.prototype,"view",void 0),e([m({type:Boolean,readOnly:!0})],D.prototype,"updating",null),e([m()],D.prototype,"weatherVisible",null),e([m()],D.prototype,"_pendingAtmosphere",void 0),e([m()],D.prototype,"_stars",void 0),e([m()],D.prototype,"_precipitation",void 0),e([m()],D.prototype,"_clouds",void 0),e([m()],D.prototype,"_cloudComposition",void 0),e([m()],D.prototype,"_fog",void 0),e([m()],D.prototype,"weatherEnabled",null),e([m()],D.prototype,"precipitationEnabled",null),e([m()],D.prototype,"_cloudsCreationParameters",null),e([m()],D.prototype,"_weatherUpdateParameters",null),e([m()],D.prototype,"_starsCreationParameters",null),e([m()],D.prototype,"_environmentPostProcessCreationParameters",null),D=e([_("esri.views.3d.environment.EnvironmentRenderer")],D);export{D as EnvironmentRenderer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import"../webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/basicInterfaces.js";export{b as build}from"../../../chunks/Fog.glsl.js";
5
+ import"../webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import"../webgl-engine/core/shaderLibrary/output/ReadLinearDepth.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{b as build}from"../../../chunks/Fog.glsl.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{smoothstep as e,lerp as t}from"../../../core/mathUtils.js";import{isNone as i,releaseMaybe as r,disposeMaybe as s}from"../../../core/maybe.js";import{a}from"../../../chunks/mat4.js";import{c as h}from"../../../chunks/mat4f64.js";import{s as o}from"../../../chunks/vec2.js";import{a as n}from"../../../chunks/vec2f64.js";import{l as c}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as u}from"../../../geometry/projectionEllipsoid.js";import{atmosphereHeight as _}from"./atmosphereUtils.js";import{FogTechniqueConfiguration as f,FogTechnique as m}from"./FogTechnique.js";import{weatherHeightLimit as g}from"./weather.js";import{Pos2Tex as p}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as d}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as l}from"../../webgl/enums.js";class v{constructor(e,t){this._projectionInverse=h(),this._viewInverse=h(),this._nearFar=n(),this._darkenHaze=!1,this._hazeMultiplier=1,this._foggyFadeStart=.3,this._foggyFadeEnd=.6,this._hazeFadeStart=.7,this._hazeFadeEnd=1,this._hazeFadeBuffer=500,this._strength=4e-6,this._view=t;const i=e.renderContext.rctx;this._vao=d(i,p),this._shaderTechniqueRepository=e.shaderTechniqueRep;const r=u(t.spatialReference);this._planetRadius=r.radius,this._atmosphereRadius=r.radius+_}set strength(e){this._strength=e}get strength(){return this._strength}get foggyWeatherTechnique(){if(i(this._foggyWeatherTechnique)){const e=new f;e.haze=!1,this._foggyWeatherTechnique=this._shaderTechniqueRepository.acquire(m,e)}return this._foggyWeatherTechnique}get distanceFogTechnique(){if(i(this._distanceFogTechnique)){const e=new f;e.haze=!0,this._distanceFogTechnique=this._shaderTechniqueRepository.acquire(m,e)}return this._distanceFogTechnique}destroy(){this._distanceFogTechnique=r(this._distanceFogTechnique),this._foggyWeatherTechnique=r(this._foggyWeatherTechnique),this._vao=s(this._vao)}when(){return Promise.resolve()}render(e,t,i){if(0===this._view.basemapTerrain.baseOpacity&&!t)return;if(this._darkenHaze=i,this._update(e.camera,t),this._fogAmount<=0)return;const r=e.rctx,s=e.offscreenRenderingHelper,a=t?this.foggyWeatherTechnique:this.distanceFogTechnique;r.useProgram(a.program),a.bindPipelineState(r),s.renderDepthDetached((()=>{a.program.bindTexture(s.depthTexture,"depthTex"),this._renderFog(a.program,e)}))}_renderFog(e,t){if(i(this._vao))return!1;const r=t.rctx;return t.scenelightingData.setLightDirectionUniform(e),e.setUniform3fv("cameraPosition",t.camera.eye),e.setUniformMatrix4fv("projectionInverse",this._projectionInverse),e.setUniformMatrix4fv("viewInverse",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform1f("atmosphereC",this._atmosphereC),e.setUniform1f("strength",this._strength),e.setUniform1f("fogAmount",this._hazeMultiplier*this._fogAmount),r.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(l.TRIANGLE_STRIP,0,4),!0}_update(r,s){if(i(r))return;a(this._projectionInverse,r.projectionMatrix),a(this._viewInverse,r.viewMatrix),o(this._nearFar,r.near,r.far);const h=c(r.eye),n=h*h;this._atmosphereC=n-this._atmosphereRadius*this._atmosphereRadius,this._fogAmount=s?1-e(this._foggyFadeStart*g,this._foggyFadeEnd*g,Math.abs(h-this._planetRadius)):1-e(this._hazeFadeStart*g,this._hazeFadeEnd*g,Math.abs(h-this._planetRadius)),this._hazeMultiplier=this._darkenHaze?t(.4,1,e(g-this._hazeFadeBuffer,g+this._hazeFadeBuffer,Math.abs(h-this._planetRadius))):1}static isSupported(e){return e.capabilities.depthTexture}}export{v as Fog};
5
+ import{smoothstep as e,lerp as t}from"../../../core/mathUtils.js";import{isNone as i,releaseMaybe as r,disposeMaybe as s}from"../../../core/maybe.js";import{a}from"../../../chunks/mat4.js";import{c as h}from"../../../chunks/mat4f64.js";import{s as o}from"../../../chunks/vec2.js";import{a as n}from"../../../chunks/vec2f64.js";import{l as c}from"../../../chunks/vec3.js";import{getReferenceEllipsoid as u}from"../../../geometry/projectionEllipsoid.js";import{atmosphereHeight as _}from"./atmosphereUtils.js";import{FogTechniqueConfiguration as f,FogTechnique as m}from"./FogTechnique.js";import{weatherHeightLimit as g}from"./weather.js";import{Pos2Tex as d}from"../webgl-engine/lib/DefaultVertexBufferLayouts.js";import{createQuadVAO as p}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as l}from"../../webgl/enums.js";class v{constructor(e,t){this._projectionInverse=h(),this._viewInverse=h(),this._nearFar=n(),this._darkenHaze=!1,this._hazeMultiplier=1,this._foggyFadeStart=.3,this._foggyFadeEnd=.6,this._hazeFadeStart=.7,this._hazeFadeEnd=1,this._hazeFadeBuffer=500,this._strength=4e-6,this._view=t;const i=e.renderContext.rctx;this._vao=p(i,d),this._shaderTechniqueRepository=e.shaderTechniqueRep;const r=u(t.spatialReference);this._planetRadius=r.radius,this._atmosphereRadius=r.radius+_}set strength(e){this._strength=e}get strength(){return this._strength}get foggyWeatherTechnique(){if(i(this._foggyWeatherTechnique)){const e=new f;e.haze=!1,this._foggyWeatherTechnique=this._shaderTechniqueRepository.acquire(m,e)}return this._foggyWeatherTechnique}get distanceFogTechnique(){if(i(this._distanceFogTechnique)){const e=new f;e.haze=!0,this._distanceFogTechnique=this._shaderTechniqueRepository.acquire(m,e)}return this._distanceFogTechnique}destroy(){this._distanceFogTechnique=r(this._distanceFogTechnique),this._foggyWeatherTechnique=r(this._foggyWeatherTechnique),this._vao=s(this._vao)}when(){return Promise.resolve()}render(e,t,i){if(0===this._view.basemapTerrain.baseOpacity&&!t)return;if(this._darkenHaze=i,this._update(e.camera,t),this._fogAmount<=0)return;const r=e.rctx,s=e.offscreenRenderingHelper,a=t?this.foggyWeatherTechnique:this.distanceFogTechnique;r.useProgram(a.program),a.bindPipelineState(r),s.renderDepthDetached((()=>{a.program.bindTexture(s.depthTexture,"depthTex"),this._renderFog(a.program,e)}))}_renderFog(e,t){if(i(this._vao))return!1;const r=t.rctx;return t.scenelightingData.setLightDirectionUniform(e),e.setUniform3fv("cameraPosition",t.camera.eye),e.setUniformMatrix4fv("inverseProjectionMatrix",this._projectionInverse),e.setUniformMatrix4fv("inverseViewMatrix",this._viewInverse),e.setUniform2fv("nearFar",this._nearFar),e.setUniform1f("atmosphereC",this._atmosphereC),e.setUniform1f("fogStrength",this._strength),e.setUniform1f("fogAmount",this._hazeMultiplier*this._fogAmount),r.bindVAO(this._vao),e.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(l.TRIANGLE_STRIP,0,4),!0}_update(r,s){if(i(r))return;a(this._projectionInverse,r.projectionMatrix),a(this._viewInverse,r.viewMatrix),o(this._nearFar,r.near,r.far);const h=c(r.eye),n=h*h;this._atmosphereC=n-this._atmosphereRadius*this._atmosphereRadius,this._fogAmount=s?1-e(this._foggyFadeStart*g,this._foggyFadeEnd*g,Math.abs(h-this._planetRadius)):1-e(this._hazeFadeStart*g,this._hazeFadeEnd*g,Math.abs(h-this._planetRadius)),this._hazeMultiplier=this._darkenHaze?t(.4,1,e(g-this._hazeFadeBuffer,g+this._hazeFadeBuffer,Math.abs(h-this._planetRadius))):1}static isSupported(e){return e.capabilities.depthTexture}}export{v as Fog};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Logger.js";import{disposeMaybe as r,abortMaybe as t}from"../../../core/maybe.js";import{createResolver as o,isAbortError as i}from"../../../core/promiseUtils.js";import{c as s}from"../../../chunks/mat4.js";import{c as n}from"../../../chunks/mat4f64.js";import{requestImage as a}from"../../../support/requestImageUtils.js";import{S as m}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechniqueConfiguration as l,SimpleAtmosphereTechnique as h}from"./SimpleAtmosphereTechnique.js";import c from"./resources/SimpleAtmosphereTexture.js";import{glLayout as p}from"../support/buffer/glUtil.js";import{newLayout as u}from"../support/buffer/InterleavedLayout.js";import{bindProjectionMatrix as f}from"../webgl-engine/core/shaderLibrary/util/View.glsl.js";import{VertexAttribute as g}from"../webgl-engine/lib/basicInterfaces.js";import{Default3D as _}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import d from"../webgl-engine/lib/GeometryUtil.js";import{BufferObject as b}from"../../webgl/BufferObject.js";import{PixelFormat as y,PixelType as j,TextureWrapMode as x,TextureSamplingMode as v,PrimitiveType as w,Usage as T}from"../../webgl/enums.js";import{Texture as A}from"../../webgl/Texture.js";import{vertexCount as C}from"../../webgl/Util.js";import{VertexArrayObject as I}from"../../webgl/VertexArrayObject.js";const R=e.getLogger("esri.views.3d.environment.PanoramicAtmosphere");class q{constructor(){this.type="panoramic",this._atmosphereTechniqueConfig=new l,this._readyResolver=o(),this._readyController=new AbortController}destroy(){this._readyResolver.reject(),this._texture=r(this._texture),this._vao=r(this._vao),this._readyController=t(this._readyController)}when(){return this._readyResolver.promise}initializeRenderContext(e){this._atmosphereTechniqueConfig.geometry=m.Cylinder,this._atmosphereTechnique=e.shaderTechniqueRep.acquire(h,this._atmosphereTechniqueConfig);const r=e.renderContext.rctx;this._vao=this._createVertexArrayObject(r),this._vaoCount=C(this._vao,"geometry"),a(c,{signal:this._readyController.signal}).then((t=>{this._texture=new A(r,{pixelFormat:y.RGBA,dataType:j.UNSIGNED_BYTE,wrapMode:x.CLAMP_TO_EDGE,samplingMode:v.LINEAR,flipped:!0},t),e.requestRender(),this._readyController=null,this._readyResolver.resolve()})).catch((e=>{i(e)||R.error("Unable to initialize atmosphere: image request failed",e),this._readyResolver.reject()}))}get canRender(){return null!=this._texture}render(e){const r=e.rctx,t=this._atmosphereTechnique.program;r.useProgram(t),this._atmosphereTechnique.bindPipelineState(r),t.bindTexture(this._texture,"tex"),f(t,e.camera.projectionMatrix),O(S,e.camera.viewMatrix),t.setUniformMatrix4fv("view",S),t.setUniform4f("color",1,1,1,1),e.scenelightingData.setLightDirectionUniform(t),r.bindVAO(this._vao),t.assertCompatibleVertexAttributeLocations(this._vao),r.drawArrays(w.TRIANGLES,0,this._vaoCount)}renderHaze(){return!1}_createVertexArrayObject(e){const r=d.createPolySphereGeometry(1,2,!1),t=r.indices.get(g.POSITION);for(let n=0;n<t.length;n+=3){const e=t[n];t[n]=t[n+2],t[n+2]=e}const o=r.vertexAttributes.get(g.POSITION).data,i=L.createBuffer(t.length),s=i.position;for(let n=0;n<t.length;++n){const e=3*t[n];s.set(n,0,o[e]),s.set(n,1,o[e+1]),s.set(n,2,o[e+2])}return new I(e,_,{geometry:p(L)},{geometry:b.createVertex(e,T.STATIC_DRAW,i.buffer)})}}function O(e,r){s(e,r),e[12]=0,e[13]=0,e[14]=0,e[15]=1}const S=n(),L=u().vec3f(g.POSITION);export{q as PanoramicAtmosphere};
5
+ import e from"../../../core/Logger.js";import{disposeMaybe as t,abortMaybe as r}from"../../../core/maybe.js";import{createResolver as o,isAbortError as i}from"../../../core/promiseUtils.js";import{c as s}from"../../../chunks/mat4.js";import{c as n}from"../../../chunks/mat4f64.js";import{requestImage as a}from"../../../support/requestImageUtils.js";import{S as m}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereTechniqueConfiguration as l,SimpleAtmosphereTechnique as h}from"./SimpleAtmosphereTechnique.js";import c from"./resources/SimpleAtmosphereTexture.js";import{glLayout as p}from"../support/buffer/glUtil.js";import{newLayout as u}from"../support/buffer/InterleavedLayout.js";import{bindProjectionMatrix as f}from"../webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Default3D as g}from"../webgl-engine/lib/DefaultVertexAttributeLocations.js";import _ from"../webgl-engine/lib/GeometryUtil.js";import{VertexAttribute as d}from"../webgl-engine/lib/VertexAttribute.js";import{BufferObject as b}from"../../webgl/BufferObject.js";import{PixelFormat as y,PixelType as j,TextureWrapMode as x,TextureSamplingMode as v,PrimitiveType as w,Usage as A}from"../../webgl/enums.js";import{Texture as T}from"../../webgl/Texture.js";import{vertexCount as C}from"../../webgl/Util.js";import{VertexArrayObject as R}from"../../webgl/VertexArrayObject.js";const q=e.getLogger("esri.views.3d.environment.PanoramicAtmosphere");class I{constructor(){this.type="panoramic",this._atmosphereTechniqueConfig=new l,this._readyResolver=o(),this._readyController=new AbortController}destroy(){this._readyResolver.reject(),this._texture=t(this._texture),this._vao=t(this._vao),this._readyController=r(this._readyController)}when(){return this._readyResolver.promise}initializeRenderContext(e){this._atmosphereTechniqueConfig.geometry=m.Cylinder,this._atmosphereTechnique=e.shaderTechniqueRep.acquire(h,this._atmosphereTechniqueConfig);const t=e.renderContext.rctx;this._vao=this._createVertexArrayObject(t),this._vaoCount=C(this._vao,"geometry"),a(c,{signal:this._readyController.signal}).then((r=>{this._texture=new T(t,{pixelFormat:y.RGBA,dataType:j.UNSIGNED_BYTE,wrapMode:x.CLAMP_TO_EDGE,samplingMode:v.LINEAR,flipped:!0},r),e.requestRender(),this._readyController=null,this._readyResolver.resolve()})).catch((e=>{i(e)||q.error("Unable to initialize atmosphere: image request failed",e),this._readyResolver.reject()}))}get canRender(){return null!=this._texture}render(e){const t=e.rctx,r=this._atmosphereTechnique.program;t.useProgram(r),this._atmosphereTechnique.bindPipelineState(t),r.bindTexture(this._texture,"tex"),f(r,e.camera.projectionMatrix),O(S,e.camera.viewMatrix),r.setUniformMatrix4fv("view",S),r.setUniform4f("uColor",1,1,1,1),e.scenelightingData.setLightDirectionUniform(r),t.bindVAO(this._vao),r.assertCompatibleVertexAttributeLocations(this._vao),t.drawArrays(w.TRIANGLES,0,this._vaoCount)}renderHaze(){return!1}_createVertexArrayObject(e){const t=_.createPolySphereGeometry(1,2,!1),r=t.indices.get(d.POSITION);for(let n=0;n<r.length;n+=3){const e=r[n];r[n]=r[n+2],r[n+2]=e}const o=t.vertexAttributes.get(d.POSITION).data,i=L.createBuffer(r.length),s=i.position;for(let n=0;n<r.length;++n){const e=3*r[n];s.set(n,0,o[e]),s.set(n,1,o[e+1]),s.set(n,2,o[e+2])}return new R(e,g,{geometry:p(L)},{geometry:b.createVertex(e,A.STATIC_DRAW,i.buffer)})}}function O(e,t){s(e,t),e[12]=0,e[13]=0,e[14]=0,e[15]=1}const S=n(),L=u().vec3f(d.POSITION);export{I as PanoramicAtmosphere};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
+ */
5
+ import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{P as PrecipitationType,b as build}from"../../../chunks/Precipitation.glsl.js";
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
+ */
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{isNone as t,disposeMaybe as r,isSome as i}from"../../../core/maybe.js";import{secondsFromMilliseconds as s}from"../../../core/time.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{getReferenceEllipsoid as o}from"../../../geometry/projectionEllipsoid.js";import{P as c}from"../../../chunks/Precipitation.glsl.js";import{PrecipitationTechniqueConfiguration as u,PrecipitationTechnique as h}from"./PrecipitationTechnique.js";import{glLayout as p}from"../support/buffer/glUtil.js";import{newLayout as m}from"../support/buffer/InterleavedLayout.js";import{AnimationTimer as _}from"../webgl-engine/lib/AnimationTimer.js";import{VertexAttribute as d}from"../webgl-engine/lib/VertexAttribute.js";import{WatchUpdatingTracking as f}from"../../support/WatchUpdatingTracking.js";import{BufferObject as l}from"../../webgl/BufferObject.js";import{PrimitiveType as T,Usage as g}from"../../webgl/enums.js";import{bindVertexBufferLayout as b,unbindVertexBufferLayout as y}from"../../webgl/Util.js";import{VertexArrayObject as j}from"../../webgl/VertexArrayObject.js";let w=class{constructor(e,t){this._numParticles=25e4,this._rainSpeed=.1,this._snowSpeed=.01,this._renderParameter={camera:null,time:0,radius:1},this._animation=new _,this._updatingTracking=new f,this._renderParameter.time=0,this._renderParameter.radius=o(t.spatialReference).radius,this._shaderTechniqueRepository=e.shaderTechniqueRep}get updating(){return this._updatingTracking.updating}get rainTechnique(){if(t(this._rainTechnique)){const e=new u;e.type=c.RAIN,this._rainTechnique=this._shaderTechniqueRepository.acquire(h,e)}return this._rainTechnique}get snowTechnique(){if(t(this._snowTechnique)){const e=new u;e.type=c.SNOW,this._snowTechnique=this._shaderTechniqueRepository.acquire(h,e)}return this._snowTechnique}destroy(){this._updatingTracking.destroy(),this._numParticles=0,this._snowTechnique=r(this._snowTechnique),this._rainTechnique=r(this._rainTechnique),this._vao=r(this._vao),this._instanceIdBuffer=r(this._instanceIdBuffer)}update(e){return this._animation.advance(e)}render(e,r,i){const{rctx:n,camera:a}=e;this._ensureResources(n);const o=i===c.RAIN?this.rainTechnique:this.snowTechnique;if(t(o)||t(this._vao)||t(this._instanceIdBuffer))return!1;const u=o.program,p=h.attributeLocation;return n.useProgram(u),this._renderParameter.camera=a,this._renderParameter.time=(i===c.RAIN?this._rainSpeed:this._snowSpeed)*s(this._animation.time),o.bindPass(this._renderParameter),o.bindPipelineState(n),n.bindVAO(this._vao),u.assertCompatibleVertexAttributeLocations(this._vao),b(n,p,this._instanceIdBuffer,q,0),n.capabilities.instancing.drawArraysInstanced(T.TRIANGLES,0,3,this._numParticles*r),y(n,p,this._instanceIdBuffer,q),!0}_ensureResources(e){i(this._vao)||(this._vao=this._createVertexArrayObject(e),i(this._instanceIdBuffer)||(this._instanceIdBuffer=this._createInstanceIndices(e)))}_createInstanceIndices(e){const t=[];for(let r=0;r<this._numParticles;r++)t.push(r);return l.createVertex(e,g.STATIC_DRAW,new Float32Array(t))}_createVertexArrayObject(e){const t=new Float32Array([-1,0,1,1,0,-1,1,0,1]);return new j(e,h.attributeLocation,{geometry:p(I)},{geometry:l.createVertex(e,g.STATIC_DRAW,t)})}};e([n({constructOnly:!0})],w.prototype,"requestRender",void 0),e([n({readOnly:!0})],w.prototype,"updating",null),e([n()],w.prototype,"_updatingTracking",void 0),w=e([a("esri.views.3d.environment.Precipitation")],w);const I=m().vec3f(d.POSITION),q=p(m().f32(d.INSTANCEFEATUREATTRIBUTE),1);export{w as Precipitation};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
+ */
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import{smoothstep as i}from"../../../core/mathUtils.js";import{l as e}from"../../../chunks/vec3.js";import{c as r}from"../../../chunks/vec3f64.js";import{a as s,P as o}from"../../../chunks/Precipitation.glsl.js";import{weatherHeightLimit as h}from"./weather.js";import{bindProjectionMatrix as a}from"../webgl-engine/core/shaderLibrary/util/View.glsl.js";import{ReloadableShaderModule as n}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as m}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{parameter as f,ShaderTechniqueConfiguration as c}from"../webgl-engine/core/shaderTechnique/ShaderTechniqueConfiguration.js";import{Program as l}from"../webgl-engine/lib/Program.js";import{VertexAttribute as p}from"../webgl-engine/lib/VertexAttribute.js";import{BlendFactor as d,CompareFunction as g}from"../../webgl/enums.js";import{makePipelineState as _,separateBlendingParams as w,defaultColorWriteParams as u}from"../../webgl/renderState.js";class b extends m{constructor(){super(...arguments),this._width=500,this._offset=r(),this._tile=r()}initializeProgram(t){const i=b.shader.get(),e=this.configuration,r=i.build({type:e.type});return new l(t.rctx,r,b.attributeLocation)}initializePipeline(){return _({blending:w(d.ONE,d.ONE,d.ONE_MINUS_SRC_ALPHA,d.ONE_MINUS_SRC_ALPHA),depthTest:{func:g.LEQUAL},colorWrite:u})}bindPass(t){const r=t.camera.eye;this._tile[0]=Math.floor((r[0]+.5*this._width)/this._width),this._tile[1]=Math.floor((r[1]+.5*this._width)/this._width),this._tile[2]=Math.floor((r[2]+.5*this._width)/this._width),this._offset[0]=r[0]-this._tile[0]*this._width,this._offset[1]=r[1]-this._tile[1]*this._width,this._offset[2]=r[2]-this._tile[2]*this._width,this.program.setUniform1f("width",this._width),this.program.setUniform3fv("offset",this._offset),this.program.setUniformMatrix4fv("view",t.camera.viewMatrix),this.program.setUniform3fv("cameraPosition",t.camera.eye),a(this.program,t.camera.projectionMatrix),this.program.setUniform1f("time",t.time);const s=1-i(.9*h,h,Math.abs(e(t.camera.eye)-t.radius));this.program.setUniform1f("heightFade",s)}}b.shader=new n(s,(()=>import("./Precipitation.glsl.js"))),b.attributeLocation=new Map([[p.POSITION,0],[p.INSTANCEFEATUREATTRIBUTE,1]]);class j extends c{constructor(){super(...arguments),this.type=o.RAIN}}t([f()],j.prototype,"type",void 0);export{b as PrecipitationTechnique,j as PrecipitationTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../../core/JSONSupport.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{enumeration as s}from"../../../core/accessorSupport/decorators/enumeration.js";import{subclass as t}from"../../../core/accessorSupport/decorators/subclass.js";var p;let c=p=class extends o{constructor(r){super(r),this.type="rainy",this.cloudCover=.5}clone(){return new p({cloudCover:this.cloudCover})}};r([s({rainy:"rainy"})],c.prototype,"type",void 0),r([e({type:Number,nonNullable:!0,range:{min:0,max:1}})],c.prototype,"cloudCover",void 0),c=p=r([t("esri.views.3d.environment.RainyWeather")],c);const a=c;export{a as default};
5
+ import{_ as r}from"../../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../../core/JSONSupport.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{enumeration as t}from"../../../core/accessorSupport/decorators/enumeration.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";var p;let i=p=class extends o{constructor(r){super(r),this.type="rainy",this.cloudCover=.5,this.precipitation=.5}clone(){return new p({cloudCover:this.cloudCover,precipitation:this.precipitation})}};r([t({rainy:"rainy"})],i.prototype,"type",void 0),r([e({type:Number,nonNullable:!0,range:{min:0,max:1}})],i.prototype,"cloudCover",void 0),r([e({type:Number,nonNullable:!0,range:{min:0,max:1}})],i.prototype,"precipitation",void 0),i=p=r([s("esri.views.3d.environment.RainyWeather")],i);const c=i;export{c 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.23/esri/copyright.txt for details.
4
4
  */
5
- import"../webgl-engine/core/shaderLibrary/Transform.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/basicInterfaces.js";export{S as SimpleAtmosphereGeometry,b as build}from"../../../chunks/SimpleAtmosphere.glsl.js";
5
+ import"../webgl-engine/core/shaderLibrary/Transform.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/VertexAttribute.js";export{S as SimpleAtmosphereGeometry,b as build}from"../../../chunks/SimpleAtmosphere.glsl.js";