@arcgis/core 5.1.0-next.112 → 5.1.0-next.114

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 (287) hide show
  1. package/Graphic.d.ts +1 -0
  2. package/arcade.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{31a8bc25aa1441c70caa.js → 009250a7bded12099dd1.js} +1 -1
  5. package/assets/esri/core/workers/chunks/019a4fe7e085b2fc6ae9.js +1 -0
  6. package/assets/esri/core/workers/chunks/023837e5d9d2b6af66d8.js +1 -0
  7. package/assets/esri/core/workers/chunks/{a001e7e8a39f27284d87.js → 03c46880b69ce75a010f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/0a530fbbb4486c670ea2.js +1 -0
  9. package/assets/esri/core/workers/chunks/{14b7b55c42af65ffa024.js → 0bd2b035c6ee89c725f9.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0ded5c114cbb7574f2f4.js +1 -0
  11. package/assets/esri/core/workers/chunks/{b432a5a829e309837db6.js → 0e549d942d6cba1608cf.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{7dafe608c224b9d48ffa.js → 115664cb7d7b22a315bb.js} +1 -1
  13. package/assets/esri/core/workers/chunks/123a67e84ed68b96ac59.js +1 -0
  14. package/assets/esri/core/workers/chunks/14a241b07baa67743248.js +1 -0
  15. package/assets/esri/core/workers/chunks/{054ae729e7cefa2c7778.js → 170f8dc97614e9609443.js} +1 -1
  16. package/assets/esri/core/workers/chunks/179ffa2168c42615ccf2.js +1 -0
  17. package/assets/esri/core/workers/chunks/{4a65bc9091d7ea7e80df.js → 19f07c8d0f32ec889861.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{ca92176d5348e2c533d7.js → 224a9f39876aa426a9bc.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{beff5b4e15edee12bd4c.js → 271e42b7cd3c3441839e.js} +3 -3
  20. package/assets/esri/core/workers/chunks/{0550dc63b6b1274242b8.js → 27d7c701306efeea6b82.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{8aac1155b8ac071cd2ad.js → 2855357a2c1f2ab03fb7.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{33329f5d88e60b4ec568.js → 2a8f198f6c272f92bad5.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{cb3004998eff7c60930e.js → 2b2a09ce14d00b4b1187.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{5d60253ea3d247cdb3d1.js → 2bdfae998371e3aa9f2d.js} +1 -1
  25. package/assets/esri/core/workers/chunks/2f99a95facddc44319a9.js +1 -0
  26. package/assets/esri/core/workers/chunks/{bd17ac2e6f1eb8cf7abf.js → 2fa080539d039c92ce08.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{ee635172be7fdea69367.js → 3109b05fe4fc40d4f25b.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{92db9a6d273ae2862883.js → 315bf08dff4757ffbed3.js} +1 -1
  29. package/assets/esri/core/workers/chunks/32f128a1615d71bbe899.js +2 -0
  30. package/assets/esri/core/workers/chunks/{593772bd8b19ac664b29.js → 35527a01d61cabbfd33e.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{711d1873c760313e287f.js → 39987c06636e757d1f00.js} +1 -1
  32. package/assets/esri/core/workers/chunks/40df608337d562553ce1.js +2 -0
  33. package/assets/esri/core/workers/chunks/41074d383af3662673ca.js +1 -0
  34. package/assets/esri/core/workers/chunks/49675e77a351abda2728.js +1 -0
  35. package/assets/esri/core/workers/chunks/4bfeac7338df9e0b7ce1.js +1 -0
  36. package/assets/esri/core/workers/chunks/4ffcca40e7aa24c8cc35.js +1 -0
  37. package/assets/esri/core/workers/chunks/534dd93c72ea448ee908.js +1 -0
  38. package/assets/esri/core/workers/chunks/{2dc2487d05381de07e3f.js → 548c34ea88f113d03c93.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{fe8334352d256d691a95.js → 5c6742728fa705d2e16e.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{77ac243d4dcd901c2eec.js → 621d71d26bd20e296138.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{7e203e947846d40f897e.js → 67dffb896b6ef4b2038b.js} +1 -1
  42. package/assets/esri/core/workers/chunks/6920e7f700a9ba280dba.js +1 -0
  43. package/assets/esri/core/workers/chunks/696967c8c6f53b94f851.js +1 -0
  44. package/assets/esri/core/workers/chunks/6b1f2b36bdc6b2ff2ea5.js +1 -0
  45. package/assets/esri/core/workers/chunks/{481dc7503587972a6bd2.js → 701125f6cdd91ff3655f.js} +2 -2
  46. package/assets/esri/core/workers/chunks/7014e73dfd3c8baa704c.js +1 -0
  47. package/assets/esri/core/workers/chunks/75dfdd85abbac26ac899.js +1 -0
  48. package/assets/esri/core/workers/chunks/76a9b64fd573775bf6cd.js +1 -0
  49. package/assets/esri/core/workers/chunks/798c4d3201fcc9f2a42b.js +1 -0
  50. package/assets/esri/core/workers/chunks/7995e6983456c779adf9.js +1 -0
  51. package/assets/esri/core/workers/chunks/{6c79e8e840c1d027fbb2.js → 7e0daf0864005cdd63c5.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{c0c693c2e0043ecba4a5.js → 817fd88fe9a48caf69fb.js} +1 -1
  53. package/assets/esri/core/workers/chunks/82f7d83a2073d1b0111c.js +1 -0
  54. package/assets/esri/core/workers/chunks/860465c4f44c373d0a1c.js +1 -0
  55. package/assets/esri/core/workers/chunks/8795c4895df229cb471c.js +1 -0
  56. package/assets/esri/core/workers/chunks/{7bc746ea17f4e336e0b0.js → 8b5ee6be52e892fbd325.js} +1 -1
  57. package/assets/esri/core/workers/chunks/927c8ca7fd385b28a1b7.js +640 -0
  58. package/assets/esri/core/workers/chunks/942e527b9b92999886c7.js +1 -0
  59. package/assets/esri/core/workers/chunks/961995d8da45a9203255.js +1 -0
  60. package/assets/esri/core/workers/chunks/{08efd64acdfe46985293.js → 9a11ff75009fef45b8c1.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{eb1d6614eeac6d26bb9c.js → 9a3344f1dd22c425b8cc.js} +1 -1
  62. package/assets/esri/core/workers/chunks/9a6e62ef984e9c5babc4.js +1 -0
  63. package/assets/esri/core/workers/chunks/a0b6eef4890cc61609dc.js +1 -0
  64. package/assets/esri/core/workers/chunks/{f37be7e517f0892014e3.js → a320c69bc7528ff0d0cf.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{660713adb5a845dfa2ef.js → a40003dfe3c081d1a1d2.js} +1 -1
  66. package/assets/esri/core/workers/chunks/a70fa35b2d19460637e9.js +2 -0
  67. package/assets/esri/core/workers/chunks/ae74f722fb385e45fcf1.js +1 -0
  68. package/assets/esri/core/workers/chunks/b5937ce657c1fff3864f.js +1 -0
  69. package/assets/esri/core/workers/chunks/{63ea9035dcf9ce45560c.js → b684ff4bc93bd60d6a19.js} +1 -1
  70. package/assets/esri/core/workers/chunks/b78fb24b47d9f31f18c6.js +1 -0
  71. package/assets/esri/core/workers/chunks/b7a0a5b895ddd2d3d038.js +1 -0
  72. package/assets/esri/core/workers/chunks/{f3161c47a572194f6017.js → c06ae3a6ecc4a4fc67b2.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{970e91de5dfbbc247afb.js → c5b7ff8650235c464dbf.js} +1 -1
  74. package/assets/esri/core/workers/chunks/c8dedc010fcc2382af24.js +1 -0
  75. package/assets/esri/core/workers/chunks/cd2b2babcdc130b4c368.js +1 -0
  76. package/assets/esri/core/workers/chunks/{5a6523c903b11dea77d4.js → cdef9c3f80588ae45a04.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{e973cab79ec2541cb81b.js → d19600336cb6023d3e34.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{34c11e7c8762fe0c19fb.js → d39f5590022d910ee951.js} +1 -1
  79. package/assets/esri/core/workers/chunks/d412a43060441d347fb4.js +1 -0
  80. package/assets/esri/core/workers/chunks/{01c70c27aa3a955e2928.js → d41b847d08c42e5329d6.js} +2 -2
  81. package/assets/esri/core/workers/chunks/{10491b5b106bc5ad0b2b.js → d66f68a811c90739951a.js} +1 -1
  82. package/assets/esri/core/workers/chunks/d8c2bed12f937228c763.js +1 -0
  83. package/assets/esri/core/workers/chunks/de916dd0c11aefb6832e.js +1 -0
  84. package/assets/esri/core/workers/chunks/{63513e706fe55a1def15.js → e227ae2c1a63e30e62d9.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{e4c350dc65aae121171d.js → e29d182460564c2a52ad.js} +1 -1
  86. package/assets/esri/core/workers/chunks/e87d02af6d6b05e19d93.js +1 -0
  87. package/assets/esri/core/workers/chunks/e95ce76b5b816256a519.js +1 -0
  88. package/assets/esri/core/workers/chunks/f0b5c140a5ba174572b6.js +1 -0
  89. package/assets/esri/core/workers/chunks/{ce3b5b83237cf37ff523.js → f286680e363eefdf27df.js} +1 -1
  90. package/assets/esri/core/workers/chunks/f7698c855800e0af3038.js +1 -0
  91. package/assets/esri/core/workers/chunks/f931d560f3f14598f454.js +1 -0
  92. package/assets/esri/core/workers/chunks/{9890c85a238879490926.js → f9f331c76c96743d8522.js} +1 -1
  93. package/assets/esri/core/workers/chunks/fbcf09526dc1bbe94b91.js +2 -0
  94. package/assets/esri/core/workers/chunks/fcbacca99c5a3ee5b69a.js +1 -0
  95. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  96. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  97. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +22 -6
  98. package/assets/esri/themes/dark/main.css +1 -1
  99. package/assets/esri/themes/light/main.css +1 -1
  100. package/assets/esri/themes/light/view.css +1 -1
  101. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery.json +1 -1
  102. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_en.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  105. package/assets/esri/widgets/Features/t9n/Features_en.json +1 -1
  106. package/chunks/GaussianSplatShadow.glsl.js +11 -9
  107. package/chunks/Path.glsl.js +22 -17
  108. package/chunks/ShadowCastVisualize.glsl.js +26 -18
  109. package/config.js +1 -1
  110. package/geometry/support/DoubleArray.js +1 -1
  111. package/geometry/support/Indices.js +1 -1
  112. package/kernel.js +1 -1
  113. package/layers/DimensionLayer.d.ts +22 -0
  114. package/layers/FeatureLayer.d.ts +15 -12
  115. package/layers/FeatureLayer.js +1 -1
  116. package/layers/GaussianSplatLayer.d.ts +22 -0
  117. package/layers/KnowledgeGraphLayer.d.ts +6 -4
  118. package/layers/KnowledgeGraphLayer.js +1 -1
  119. package/layers/LineOfSightLayer.d.ts +22 -0
  120. package/layers/LinkChartLayer.js +1 -1
  121. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  122. package/layers/PointCloudLayer.d.ts +22 -0
  123. package/layers/ViewshedLayer.d.ts +22 -0
  124. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  125. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  126. package/layers/support/Field.d.ts +1 -0
  127. package/layers/support/Field.js +1 -1
  128. package/layers/support/SceneModification.js +1 -1
  129. package/layers/support/featureLayerUtils.js +1 -1
  130. package/layers/support/types.d.ts +1 -1
  131. package/layers/types.d.ts +1 -0
  132. package/linkChart/LinkChartProperties.js +1 -1
  133. package/linkChart/utils.js +1 -1
  134. package/package.json +1 -1
  135. package/rest/support/Query.d.ts +1 -0
  136. package/support/revision.js +1 -1
  137. package/symbols/cim/animationUtils.js +1 -1
  138. package/symbols/cim/defaultCIMValues.js +1 -1
  139. package/symbols/cim/types.d.ts +45 -1
  140. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  141. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  142. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedFillShader.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  146. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  147. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  148. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  149. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  150. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  151. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  152. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  153. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  154. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  155. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  156. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  157. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  158. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  159. package/views/2d/support/clippingUtils.js +1 -1
  160. package/views/2d/support/hitTestUtils.js +1 -1
  161. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  162. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  163. package/views/3d/analysis/Viewshed/ViewshedDrawToolRenderer.js +1 -1
  164. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  165. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  166. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  167. package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
  168. package/views/3d/environment/EnvironmentManager.js +1 -1
  169. package/views/3d/input/SceneInputManager.js +1 -1
  170. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  171. package/views/3d/layers/IntegratedMesh3DTilesLayerWorkerHandle.js +1 -1
  172. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  173. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  174. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  175. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  176. package/views/3d/layers/graphics/extrudeUtils.js +1 -1
  177. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  178. package/views/3d/support/engineContent/line.js +1 -1
  179. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  180. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  181. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
  182. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +233 -0
  183. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexInfo.glsl.js +19 -0
  184. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +64 -40
  185. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +3 -3
  186. package/views/3d/webgl-engine/core/shaderModules/Float2sPassUniform.js +2 -0
  187. package/views/3d/webgl-engine/core/shaderModules/IntegersPassUniform.js +2 -0
  188. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  189. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  190. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  191. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  192. package/views/3d/webgl-engine/lib/PathProfile.js +1 -1
  193. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  194. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  195. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  196. package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
  197. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  198. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  199. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  200. package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
  201. package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +1 -1
  202. package/views/View2D.d.ts +1 -1
  203. package/views/draw/DrawTool.d.ts +34 -1
  204. package/views/input/EventMatch.js +1 -1
  205. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +17 -3
  206. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  207. package/widgets/BatchAttributeForm/css.js +1 -1
  208. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +25 -1
  209. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  210. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.d.ts +46 -1
  211. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  212. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +1 -1
  213. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  214. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  215. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  216. package/widgets/BatchAttributeForm/types.d.ts +1 -1
  217. package/widgets/BatchAttributeForm.d.ts +2 -1
  218. package/widgets/BatchAttributeForm.js +1 -1
  219. package/widgets/Directions/DirectionsViewModel.js +1 -1
  220. package/widgets/Directions.js +1 -1
  221. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  222. package/widgets/Editor/UpdateWorkflow.js +1 -1
  223. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  224. package/widgets/FeatureForm/RelationshipInput.d.ts +3 -3
  225. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  226. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  227. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +7 -1
  228. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  229. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  230. package/widgets/FeatureTable/support/types.d.ts +11 -1
  231. package/widgets/FeatureTable.d.ts +7 -1
  232. package/widgets/FeatureTable.js +1 -1
  233. package/widgets/Sketch/SketchViewModel.js +1 -1
  234. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +66 -6
  235. package/widgets/support/SelectionToolbar/types.d.ts +20 -1
  236. package/assets/esri/core/workers/chunks/03babc21d1781142a974.js +0 -1
  237. package/assets/esri/core/workers/chunks/0c8e6ccb5a8174718d62.js +0 -640
  238. package/assets/esri/core/workers/chunks/0e6a388d51d9dbae46ba.js +0 -1
  239. package/assets/esri/core/workers/chunks/13f0e08de2dfab07d212.js +0 -1
  240. package/assets/esri/core/workers/chunks/1c0e8808d14d8e6dde2c.js +0 -1
  241. package/assets/esri/core/workers/chunks/1c8c8050d60205cf2156.js +0 -1
  242. package/assets/esri/core/workers/chunks/23119a1b1310b7dab2aa.js +0 -1
  243. package/assets/esri/core/workers/chunks/282f3d364411efac7b80.js +0 -1
  244. package/assets/esri/core/workers/chunks/2ffffc1931b2e27c6617.js +0 -1
  245. package/assets/esri/core/workers/chunks/313a89b334e3518d30a4.js +0 -1
  246. package/assets/esri/core/workers/chunks/340c68d09d2e8bef6727.js +0 -2
  247. package/assets/esri/core/workers/chunks/389e57aab12d52d72695.js +0 -1
  248. package/assets/esri/core/workers/chunks/3fed503185ea1913fb84.js +0 -1
  249. package/assets/esri/core/workers/chunks/4020f95d8131493f799e.js +0 -1
  250. package/assets/esri/core/workers/chunks/4255ad7601c7a7621b71.js +0 -1
  251. package/assets/esri/core/workers/chunks/453c3b265481c80fc625.js +0 -1
  252. package/assets/esri/core/workers/chunks/4a41f98210f1da3b5041.js +0 -1
  253. package/assets/esri/core/workers/chunks/4afe76de6e82e86fe697.js +0 -1
  254. package/assets/esri/core/workers/chunks/5a85cbc04c64091d7f46.js +0 -1
  255. package/assets/esri/core/workers/chunks/5e5c7cc74ff1c9603aff.js +0 -1
  256. package/assets/esri/core/workers/chunks/601edefd8da4eb2eda28.js +0 -1
  257. package/assets/esri/core/workers/chunks/6f02681bcaa9bef501fc.js +0 -1
  258. package/assets/esri/core/workers/chunks/7b66691d133dabd87ce6.js +0 -1
  259. package/assets/esri/core/workers/chunks/7c077e1a63ab97bf3e87.js +0 -1
  260. package/assets/esri/core/workers/chunks/7dc9ff66e1eceadbae24.js +0 -1
  261. package/assets/esri/core/workers/chunks/85a200aecc7a844c9566.js +0 -1
  262. package/assets/esri/core/workers/chunks/8a1751187a20b6578875.js +0 -1
  263. package/assets/esri/core/workers/chunks/958617c3a9854ea04e06.js +0 -1
  264. package/assets/esri/core/workers/chunks/9ebc461529d5286fa2c2.js +0 -2
  265. package/assets/esri/core/workers/chunks/a5b9ae4c93f9af7589f2.js +0 -1
  266. package/assets/esri/core/workers/chunks/a93a058678c8c8996d54.js +0 -1
  267. package/assets/esri/core/workers/chunks/aca9591d3467a24f8329.js +0 -1
  268. package/assets/esri/core/workers/chunks/acb8cff06142f828fb78.js +0 -1
  269. package/assets/esri/core/workers/chunks/b02a68bbab07557cf02d.js +0 -1
  270. package/assets/esri/core/workers/chunks/b891d95b7858665cd6c1.js +0 -1
  271. package/assets/esri/core/workers/chunks/c91d4f1b42cfe474df52.js +0 -1
  272. package/assets/esri/core/workers/chunks/d00b9c1fd0865bf8f317.js +0 -1
  273. package/assets/esri/core/workers/chunks/d02aa7438f46c1c2167a.js +0 -2
  274. package/assets/esri/core/workers/chunks/d33a08e5f589355c57a3.js +0 -1
  275. package/assets/esri/core/workers/chunks/dd29fd1b3da90d3ca6b1.js +0 -1
  276. package/assets/esri/core/workers/chunks/deab352545c34cac148c.js +0 -1
  277. package/assets/esri/core/workers/chunks/e393fd61deb2e7f22ee6.js +0 -1
  278. package/assets/esri/core/workers/chunks/e5854a3f69dffaf9464d.js +0 -2
  279. package/assets/esri/core/workers/chunks/e8518bd3596543b387f8.js +0 -1
  280. package/assets/esri/core/workers/chunks/ee56290e600cbeb25a00.js +0 -1
  281. package/assets/esri/core/workers/chunks/f91a2c69a93295cf4de6.js +0 -1
  282. package/assets/esri/core/workers/chunks/fec3fffcf854a6226df4.js +0 -1
  283. /package/assets/esri/core/workers/chunks/{e5854a3f69dffaf9464d.js.LICENSE.txt → 32f128a1615d71bbe899.js.LICENSE.txt} +0 -0
  284. /package/assets/esri/core/workers/chunks/{340c68d09d2e8bef6727.js.LICENSE.txt → 40df608337d562553ce1.js.LICENSE.txt} +0 -0
  285. /package/assets/esri/core/workers/chunks/{481dc7503587972a6bd2.js.LICENSE.txt → 701125f6cdd91ff3655f.js.LICENSE.txt} +0 -0
  286. /package/assets/esri/core/workers/chunks/{d02aa7438f46c1c2167a.js.LICENSE.txt → a70fa35b2d19460637e9.js.LICENSE.txt} +0 -0
  287. /package/assets/esri/core/workers/chunks/{9ebc461529d5286fa2c2.js.LICENSE.txt → fbcf09526dc1bbe94b91.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import t from"../../core/Logger.js";import{animationDebugFlags as n}from"./animationDebugFlags.js";import{defaultCIMValues as e}from"./defaultCIMValues.js";import{getExtent as o}from"./SDFHelper.js";import{getProcessParam as i,hasProcessParam as r,getSize as a,getValue as s}from"./utils.js";function l(t,n,e){return{transform:b(t,n,e.transform),fromColor:T(t,n,e.fromColor),toColor:I(t,n,e.toColor),colorMix:k(t,n,e.colorMix),toOpacity:O(t,n,e.toOpacity),opacityMix:x(t,n,e.opacityMix),shift:D(t,n,e.shift),hasAnimations:e.hasAnimations||c(n),hasShiftAnimation:e.hasShiftAnimation||m(n),hasMotionAnimations:e.hasMotionAnimations||f(n)}}function c(t){return"animations"in t&&!!t.animations&&t.animations.length>0}function m(t){return"animations"in t&&!!t.animations&&t.animations.some(t=>"CIMSymbolAnimationMoveAlongLine"===t.type)}const p=new Set(["CIMSymbolAnimationOffset","CIMSymbolAnimationRotation","CIMSymbolAnimationSize","CIMSymbolAnimationScale"]);function f(t){return"animations"in t&&!!t.animations&&t.animations.some(t=>p.has(t.type))}function y(t){return!n.forceStaticPath&&(n.forceAnimatedPath||t.hasAnimations)}function u(n,e,o){if("CIMCharacterMarker"===e.type)return t.getLogger("animationUtils").error("#handleMarker()","CIM character markers do not support animations"),o;const r=i(n,e,"OffsetX"),a=i(n,e,"OffsetY");if("CIMPictureMarker"===e.type)return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!0,translation:F([r,a]),rotation:F(0),scale:F(i(n,e,"Size")),parent:o.transform}};const s=e.frame,l=s.ymax-s.ymin;return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:F([r,a]),rotation:F(0),scale:F({type:"Process",op:"Divide",left:i(n,e,"Size"),right:l}),parent:o.transform}}}function d(t,n){let e=0,o=0;const i="Absolute"!==t.anchorPointUnits;return t.anchorPoint&&(e=-t.anchorPoint.x,o=-t.anchorPoint.y),{...n,transform:{type:"AnimatedTransform",relativeTranslation:i,absoluteScale:!1,translation:F([e,o]),rotation:F(0),scale:F(1),parent:n.transform}}}function C(t,n){return"Absolute"===t.anchorPointUnits?n:d(t,n)}function S(t,n){return"Absolute"!==t.anchorPointUnits?n:d(t,n)}function M(t,n,e){return{...t,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:F([n,e]),rotation:F(0),scale:F(1),parent:t.transform}}}function A(t,n){const e=n?.5*-(n.xmin+n.xmax):0,i=n?.5*-(n.ymin+n.ymax):0;let r=0,a=0;if("x"in t&&"y"in t)r=t.x+e,a=t.y+i;else{const n=o(t);if(n){r=(n[0]+n[2])/2+e,a=(n[1]+n[3])/2+i}}return[r,a]}function h(t,n){switch(n.type){case"CIMPictureMarker":case"CIMVectorMarker":return i(t,n,"Rotation")}return 0}function g(t,n){switch(n.type){case"CIMPictureMarker":case"CIMVectorMarker":return i(t,n,"RotateClockwise")}return 0}function P(t,n){switch(n.type){case"CIMPointSymbol":case"CIMVectorMarker":return[1,1,1,1];case"CIMSolidStroke":case"CIMSolidFill":return i(t,n,"Color");case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":return i(t,n,"TintColor")}return[1,1,1,1]}function b(t,n,e){return{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:z(t,n),rotation:j(t,n),scale:R(t,n),parent:e}}function T(t,n,e){return{type:"AnimatedColor",color:F(P(t,n)),opacity:F(1),parent:e,applyToChildren:!1}}function I(t,n,e){const o=w(n);let r,a=v(e);if(a)r=[1,1,1,1];else{r=P(t,n);const e=o?.find(t=>"CIMSymbolAnimationColor"===t.type);e&&(r=i(t,e,"ToColor"),a="Override"===e.colorMode)}return{type:"AnimatedColor",color:F(r),opacity:F(1),parent:e,applyToChildren:a}}function k(t,n,e){const o=w(n),i=o?.find(t=>"CIMSymbolAnimationColor"===t.type);return i?{type:"AnimatedColor",color:F([1,1,1,1]),opacity:{from:0,to:1,timing:L(t,i?.animatedSymbolProperties)},parent:[1,1,1,1],applyToChildren:!1}:e}function v(t){return"object"==typeof t&&"applyToChildren"in t&&t.applyToChildren}function O(t,n,e){const o=w(n);let r=F(1);const a=o?.find(t=>"CIMSymbolAnimationTransparency"===t.type);if(a){r=F({type:"Process",op:"Transparency",value:i(t,a,"ToTransparency")})}return{type:"AnimatedColor",color:F([1,1,1,1]),opacity:r,parent:e,applyToChildren:!1}}function x(t,n,e){const o=w(n),i=o?.find(t=>"CIMSymbolAnimationTransparency"===t.type);return i?{type:"AnimatedColor",color:F([1,1,1,1]),opacity:{from:0,to:1,timing:L(t,i?.animatedSymbolProperties)},parent:[1,1,1,1],applyToChildren:!1}:e}function D(t,n,e){const o=w(n),a=o?.find(t=>"CIMSymbolAnimationMoveAlongLine"===t.type);if(!a)return e;let s,l;const c=L(t,a.animatedSymbolProperties),m=r(t,a,"DistanceAlong"),p=r(t,a,"Speed"),f=m&&i(t,a,"DistanceAlong"),y=p&&i(t,a,"Speed"),u=!0===a.continuous;if(!1!==f)s={type:"Process",op:"Divide",left:f,right:100},l=!0;else if(!1!==y)s={type:"Process",op:"Multiply",left:y,right:c.duration},l=!1;else{if(!u)throw new Error("Either distanceAlong, speed or continuous must be specified.");s=1,l=!0}return{type:"AnimatedShift",multiplyByLineLength:l,shift:{from:0,to:s,timing:c},parent:e}}function L(t,n){if(!n)return{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:"Local",repeatType:"Loop",easing:"Linear",playAnimation:1,reverseAnimation:0};const o=i(t,n,"Duration");let r;if(i(t,n,"RandomizeStartTime")){r={type:"Process",op:"Random",min:0,max:o,seed:i(t,n,"RandomizeStartSeed")}}else r=i(t,n,"StartTimeOffset");const a=i(t,n,"RepeatDelay"),l=i(t,n,"PlayAnimation"),c=i(t,n,"ReverseAnimation"),m=s(n.repeatType,e.CIMAnimatedSymbolProperties.repeattype);return{duration:o,startTimeOffset:r,repeatDelay:a,timeOriginSelector:"None"===m?"Local":"Global",repeatType:m,easing:s(n.easing,e.CIMAnimatedSymbolProperties.easing),playAnimation:l,reverseAnimation:c}}function R(t,n){const e=w(n);let o;o="CIMPictureMarker"===n.type||"CIMVectorMarker"===n.type?i(t,n,"Size"):"CIMSolidStroke"===n.type||"CIMPictureStroke"===n.type?i(t,n,"Width"):a(n)||10;const r=e?.find(t=>"CIMSymbolAnimationScale"===t.type);if(!r){const n=e?.find(t=>"CIMSymbolAnimationSize"===t.type);if(!n)return F(1);return{from:1,to:{type:"Process",op:"Divide",left:i(t,n,"ToSize"),right:o},timing:L(t,n.animatedSymbolProperties)}}return{from:1,to:i(t,r,"ScaleFactor"),timing:L(t,r.animatedSymbolProperties)}}function w(t){return"animations"in t&&t.animations||[]}function z(t,n){const e=w(n),o=e?.find(t=>"CIMSymbolAnimationOffset"===t.type);if(!o)return F([0,0]);return{from:[0,0],to:[i(t,o,"OffsetX"),i(t,o,"OffsetY")],timing:L(t,o.animatedSymbolProperties)}}function j(t,n){const e=w(n),o=g(t,n),r={type:"Process",op:"Divide",left:h(t,n),right:{type:"Process",op:"Cond",condition:o,ifTrue:-1,ifFalse:1}},a=e?.find(t=>"CIMSymbolAnimationRotation"===t.type);if(!a)return F(r);const s={type:"Process",op:"Add",left:i(t,a,"ToRotation"),right:{type:"Process",op:"Divide",left:r,right:-1}};return{from:r,to:{type:"Process",op:"Add",left:r,right:{type:"Process",op:"Cond",condition:i(t,a,"RotateClockwise"),ifTrue:{type:"Process",op:"MatchWinding",sign:-1,angle:s},ifFalse:{type:"Process",op:"MatchWinding",sign:1,angle:s}}},timing:L(t,a.animatedSymbolProperties)}}function F(t){return{from:t,to:t,timing:{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:"Local",repeatType:"Loop",easing:"Linear",playAnimation:1,reverseAnimation:0}}}function V(t){if(null==t)return!1;if("object"!=typeof t)return!1;if(t.animations&&Array.isArray(t.animations)&&t.animations.length>0)return!0;for(const n in t)if(V(t[n]))return!0;return!1}export{V as checkForAnimations,l as getAnimationParams,A as getFrameTranslation,F as getStaticParam,S as handleAbsoluteAnchor,d as handleAnchor,u as handleMarker,C as handleRelativeAnchor,y as shouldUseAnimatedPath,M as translate};
2
+ import t from"../../core/Logger.js";import{animationDebugFlags as e}from"./animationDebugFlags.js";import{defaultCIMValues as n}from"./defaultCIMValues.js";import{getExtent as o}from"./SDFHelper.js";import{getProcessParam as i,getValue as r,hasProcessParam as a,getSize as s}from"./utils.js";function l(t,e,n){return{transform:T(t,e,n.transform),fromColor:b(t,e,n.fromColor),toColor:I(t,e,n.toColor),colorMix:v(t,e,n.colorMix),toOpacity:k(t,e,n.toOpacity),opacityMix:L(t,e,n.opacityMix),shift:w(t,e,n.shift),hasAnimations:n.hasAnimations||m(e),hasShiftAnimation:n.hasShiftAnimation||c(e),hasMotionAnimations:n.hasMotionAnimations||f(e)}}function m(t){return"animations"in t&&!!t.animations&&t.animations.length>0}function c(t){return"animations"in t&&!!t.animations&&t.animations.some(t=>"CIMSymbolAnimationMoveAlongLine"===t.type)}const p=new Set(["CIMSymbolAnimationOffset","CIMSymbolAnimationRotation","CIMSymbolAnimationSize","CIMSymbolAnimationScale"]);function f(t){return"animations"in t&&!!t.animations&&t.animations.some(t=>p.has(t.type))}function y(t){return!e.forceStaticPath&&(e.forceAnimatedPath||t.hasAnimations)}function u(e,n,o){if("CIMCharacterMarker"===n.type)return t.getLogger("animationUtils").error("#handleMarker()","CIM character markers do not support animations"),o;const r=i(e,n,"OffsetX"),a=i(e,n,"OffsetY");if("CIMPictureMarker"===n.type)return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!0,translation:V([r,a]),rotation:V(0),scale:V(i(e,n,"Size")),parent:o.transform}};const s=n.frame,l=s.ymax-s.ymin;return{...o,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:V([r,a]),rotation:V(0),scale:V({type:"Process",op:"Divide",left:i(e,n,"Size"),right:l}),parent:o.transform}}}function d(t,e){let n=0,o=0;const i="Absolute"!==t.anchorPointUnits;return t.anchorPoint&&(n=-t.anchorPoint.x,o=-t.anchorPoint.y),{...e,transform:{type:"AnimatedTransform",relativeTranslation:i,absoluteScale:!1,translation:V([n,o]),rotation:V(0),scale:V(1),parent:e.transform}}}function S(t,e){return"Absolute"===t.anchorPointUnits?e:d(t,e)}function C(t,e){return"Absolute"!==t.anchorPointUnits?e:d(t,e)}function M(t,e,n){return{...t,transform:{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:V([e,n]),rotation:V(0),scale:V(1),parent:t.transform}}}function h(t,e){const n=e?.5*-(e.xmin+e.xmax):0,i=e?.5*-(e.ymin+e.ymax):0;let r=0,a=0;if("x"in t&&"y"in t)r=t.x+n,a=t.y+i;else{const e=o(t);if(e){r=(e[0]+e[2])/2+n,a=(e[1]+e[3])/2+i}}return[r,a]}function A(t,e){switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":return i(t,e,"Rotation")}return 0}function g(t,e){switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":return i(t,e,"RotateClockwise")}return 0}function P(t,e){switch(e.type){case"CIMPointSymbol":case"CIMVectorMarker":return[1,1,1,1];case"CIMSolidStroke":case"CIMSolidFill":return i(t,e,"Color");case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":return i(t,e,"TintColor")}return[1,1,1,1]}function T(t,e,n){return{type:"AnimatedTransform",relativeTranslation:!1,absoluteScale:!1,translation:j(t,e),rotation:F(t,e),scale:R(t,e),parent:n}}function b(t,e,n){return{type:"AnimatedColor",color:V(P(t,e)),opacity:V(1),parent:n,applyToChildren:!1}}function I(t,e,n){const o=z(e);let r,a=D(n);if(a)r=[1,1,1,1];else{r=P(t,e);const n=o?.find(t=>"CIMSymbolAnimationColor"===t.type);n&&(r=i(t,n,"ToColor"),a="Override"===n.colorMode)}return{type:"AnimatedColor",color:V(r),opacity:V(1),parent:n,applyToChildren:a}}function v(t,e,n){const o=z(e),i=o?.find(t=>"CIMSymbolAnimationColor"===t.type);return i?{type:"AnimatedColor",color:V([1,1,1,1]),opacity:{from:0,to:1,timing:x(t,i?.animatedSymbolProperties)},parent:[1,1,1,1],applyToChildren:!1}:n}function D(t){return"object"==typeof t&&"applyToChildren"in t&&t.applyToChildren}function k(t,e,n){const o=z(e);let r=V(1);const a=o?.find(t=>"CIMSymbolAnimationTransparency"===t.type);if(a){r=V({type:"Process",op:"Transparency",value:i(t,a,"ToTransparency")})}return{type:"AnimatedColor",color:V([1,1,1,1]),opacity:r,parent:n,applyToChildren:!1}}function L(t,e,n){const o=z(e),i=o?.find(t=>"CIMSymbolAnimationTransparency"===t.type);return i?{type:"AnimatedColor",color:V([1,1,1,1]),opacity:{from:0,to:1,timing:x(t,i?.animatedSymbolProperties)},parent:[1,1,1,1],applyToChildren:!1}:n}const O=120;function w(t,e,o){const s=z(e),l=s?.find(t=>"CIMSymbolAnimationMoveAlongLine"===t.type);if(!l)return o;const m=r(l.movementType,n.CIMSymbolAnimationMoveAlongLine.movementtype);let c,p=!1,f=!1,y=x(t,l.animatedSymbolProperties);const u=a(t,l,"DistanceAlong"),d=a(t,l,"Speed"),S=u&&i(t,l,"DistanceAlong"),C=d&&i(t,l,"Speed"),M=!0===l.continuous;if("Distance"===m){if(!1===S)throw new Error("distanceAlong must be specified when movementType is 'Distance'.");c={type:"Process",op:"Divide",left:S,right:100},p=!0,C&&(f=!0,y={...y,duration:{type:"Process",op:"Divide",left:c,right:C}})}else{if("Speed"!==m)throw new Error("movementType is required; allowed values are 'Distance' and 'Speed'.");if(!1===C)throw new Error("speed must be specified when movementType is 'Speed'.");c={type:"Process",op:"Multiply",left:C,right:y.duration}}return M&&(c={type:"Process",op:"Multiply",left:c,right:O},y={...y,duration:{type:"Process",op:"Multiply",left:y.duration,right:O}}),{type:"AnimatedShift",multiplyToByLineLength:p,multiplyDurationByLineLength:f,shift:{from:0,to:c,timing:y},parent:o}}function x(t,e){if(!e)return{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:"Local",repeatType:"Loop",easing:"Linear",playAnimation:1,reverseAnimation:0};const o=i(t,e,"Duration");let a;if(i(t,e,"RandomizeStartTime")){a={type:"Process",op:"Random",min:0,max:o,seed:i(t,e,"RandomizeStartSeed")}}else a=i(t,e,"StartTimeOffset");const s=i(t,e,"RepeatDelay"),l=i(t,e,"PlayAnimation"),m=i(t,e,"ReverseAnimation"),c=r(e.repeatType,n.CIMAnimatedSymbolProperties.repeattype);return{duration:o,startTimeOffset:a,repeatDelay:s,timeOriginSelector:"None"===c?"Local":"Global",repeatType:c,easing:r(e.easing,n.CIMAnimatedSymbolProperties.easing),playAnimation:l,reverseAnimation:m}}function R(t,e){const n=z(e);let o;o="CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type?i(t,e,"Size"):"CIMSolidStroke"===e.type||"CIMPictureStroke"===e.type?i(t,e,"Width"):s(e)||10;const r=n?.find(t=>"CIMSymbolAnimationScale"===t.type);if(!r){const e=n?.find(t=>"CIMSymbolAnimationSize"===t.type);if(!e)return V(1);return{from:1,to:{type:"Process",op:"Divide",left:i(t,e,"ToSize"),right:o},timing:x(t,e.animatedSymbolProperties)}}return{from:1,to:i(t,r,"ScaleFactor"),timing:x(t,r.animatedSymbolProperties)}}function z(t){return"animations"in t&&t.animations||[]}function j(t,e){const n=z(e),o=n?.find(t=>"CIMSymbolAnimationOffset"===t.type);if(!o)return V([0,0]);return{from:[0,0],to:[i(t,o,"OffsetX"),i(t,o,"OffsetY")],timing:x(t,o.animatedSymbolProperties)}}function F(t,e){const n=z(e),o=g(t,e),r={type:"Process",op:"Divide",left:A(t,e),right:{type:"Process",op:"Cond",condition:o,ifTrue:-1,ifFalse:1}},a=n?.find(t=>"CIMSymbolAnimationRotation"===t.type);if(!a)return V(r);const s={type:"Process",op:"Add",left:i(t,a,"ToRotation"),right:{type:"Process",op:"Divide",left:r,right:-1}};return{from:r,to:{type:"Process",op:"Add",left:r,right:{type:"Process",op:"Cond",condition:i(t,a,"RotateClockwise"),ifTrue:{type:"Process",op:"MatchWinding",sign:-1,angle:s},ifFalse:{type:"Process",op:"MatchWinding",sign:1,angle:s}}},timing:x(t,a.animatedSymbolProperties)}}function V(t){return{from:t,to:t,timing:{duration:1,startTimeOffset:0,repeatDelay:0,timeOriginSelector:"Local",repeatType:"Loop",easing:"Linear",playAnimation:1,reverseAnimation:0}}}function U(t){if(null==t)return!1;if("object"!=typeof t)return!1;if(t.animations&&Array.isArray(t.animations)&&t.animations.length>0)return!0;for(const e in t)if(U(t[e]))return!0;return!1}export{U as checkForAnimations,l as getAnimationParams,h as getFrameTranslation,V as getStaticParam,C as handleAbsoluteAnchor,d as handleAnchor,u as handleMarker,S as handleRelativeAnchor,y as shouldUseAnimatedPath,M as translate};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{CIMSymbolUnits as e}from"./types.js";const t={color:[128,128,128,1],outlinecolor:[0,0,0,1],backgroundcolor:[128,128,128,1],borderlinecolor:[0,0,0,1],tintcolor:[255,255,255,1]},o={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry",width:25},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,distanceAlong:100}};export{t as defaultCIMColor,o as defaultCIMValues};
2
+ import{CIMSymbolUnits as e}from"./types.js";const t={color:[128,128,128,1],outlinecolor:[0,0,0,1],backgroundcolor:[128,128,128,1],borderlinecolor:[0,0,0,1],tintcolor:[255,255,255,1]},o={CIMVectorMarker:{scalesymbolsproportionally:!1,respectframe:!0,anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMPictureMarker:{scalex:1,texturefilter:"Draft",anchorpointunits:"Relative",offsetx:0,offsety:0,rotateclockwise:!1,rotation:0,size:10,enable:!0,colorlocked:!1},CIMTextSymbol:{angle:0,anglex:0,angley:0,halosize:1,height:10,horizontalalignment:"Left",kerning:!0,letterspacing:0,letterwidth:100,ligatures:!0,linegap:0,offsetx:0,offsety:0,strikethrough:!1,textcase:"Normal",textstring:"",underline:!1,verticalalignment:"Bottom",enable:!0,colorlocked:!1},CIMSolidStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMPictureStroke:{texturefilter:"Draft",capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1},CIMGradientStroke:{capstyle:"Round",joinstyle:"Round",miterlimit:4,width:4,enable:!0,colorlocked:!1,gradientMethod:"AcrossLine",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMSolidFill:{enable:!0,colorlocked:!1},CIMPictureFill:{offsetx:0,offsety:0,rotation:0,scalex:1,height:10,texturefilter:"Draft",enable:!0,colorlocked:!1},CIMHatchFill:{offsetx:0,offsety:0,rotation:0,separation:4,enable:!0,colorlocked:!1},CIMGradientFill:{enable:!0,angle:90,gradientMethod:"Linear",gradientSize:75,gradientSizeUnits:e.Relative,gradientType:"Discrete",interval:5},CIMGeometricEffectAddControlPoints:{angletolerance:120},CIMGeometricEffectArrow:{arrowtype:"OpenEnded",width:5},CIMGeometricEffectBuffer:{size:1},CIMGeometricEffectCut:{begincut:1,endcut:1,middlecut:0,invert:!1},CIMGeometricEffectDashes:{customendingoffset:0,linedashending:"NoConstraint",offsetalongline:0},CIMGeometricEffectDonut:{method:"Mitered",option:"Accurate",width:2},CIMGeometricEffectJog:{angle:225,length:20,position:50},CIMGeometricEffectControlMeasureLine:{rule:"FullGeometry",width:25},CIMGeometricEffectMove:{offsetx:1,offsety:-1},CIMGeometricEffectOffset:{method:"Square",offset:1,option:"Fast"},CIMGeometricEffectRadial:{angle:0,length:5},CIMGeometricEffectRotate:{angle:15},CIMGeometricEffectScale:{xscalefactor:1.15,yscalefactor:1.15},CIMGeometricEffectWave:{amplitude:2,period:3,seed:1,waveform:"Sinus"},CIMMarkerPlacementAlongLine:{customendingoffset:0,endings:"WithHalfGap",offsetalongline:0,placeperpart:!0,angletoline:!0,offset:0},CIMMarkerPlacementAtExtremities:{extremityplacement:"Both",offsetalongline:0,angletoline:!0,offset:0},CIMMarkerPlacementAtRatioPositions:{beginposition:0,endposition:0,flipfirst:!0,angletoline:!0,offset:0},CIMMarkerPlacementInsidePolygon:{gridangle:0,gridtype:"Fixed",offsetx:0,offsety:0,randomness:100,seed:0,shiftoddrows:!1,stepx:16,stepy:16,clipping:"ClipAtBoundary"},CIMMarkerPlacementOnLine:{relativeto:"LineMiddle",startpointoffset:0,angletoline:!0,offset:0},CIMMarkerPlacementOnVertices:{placeperpart:!0,placeoncontrolpoints:!0,placeonendpoints:!0,placeonregularvertices:!0,angletoline:!0,offset:0},CIMMarkerPlacementPolygonCenter:{method:"OnPolygon",offsetx:0,offsety:0,clipatboundary:!1},CIMAnimatedSymbolProperties:{playanimation:!1,reverseanimation:!1,randomizestarttime:!1,randomizestartseed:0,starttimeoffset:0,duration:3,endingduration:3,useendingduration:!1,repeattype:"Loop",repeatdelay:0,easing:"Linear"},CIMSymbolAnimationSize:{tosize:10},CIMSymbolAnimationScale:{scalefactor:1},CIMSymbolAnimationColor:{tocolor:[255,255,255,1],colormode:"Multiply"},CIMSymbolAnimationTransparency:{totransparency:0},CIMSymbolAnimationRotation:{torotation:0,rotateclockwise:!1},CIMSymbolAnimationOffset:{offsetx:0,offsety:0},CIMSymbolAnimationMoveAlongLine:{speed:30,distancealong:100,movementtype:"Distance"}};export{t as defaultCIMColor,o as defaultCIMValues};
@@ -311,7 +311,7 @@ export interface CIMSymbolLayer {
311
311
  * @see [CIMVectorMarker.markerPlacement](https://developers.arcgis.com/javascript/latest/references/core/symbols/cim/types/#CIMVectorMarker)
312
312
  * @see [CIMPictureMarker.markerPlacement](https://developers.arcgis.com/javascript/latest/references/core/symbols/cim/types/#CIMPictureMarker)
313
313
  */
314
- export type CIMMarkerPlacement = CIMMarkerPlacementAlongLineSameSize | CIMMarkerPlacementAtExtremities | CIMMarkerPlacementAtRatioPositions | CIMMarkerPlacementInsidePolygon | CIMMarkerPlacementOnLine | CIMMarkerPlacementOnVertices | CIMMarkerPlacementPolygonCenter;
314
+ export type CIMMarkerPlacement = CIMMarkerPlacementAlongLineSameSize | CIMMarkerPlacementAtMeasuredUnits | CIMMarkerPlacementAtExtremities | CIMMarkerPlacementAtRatioPositions | CIMMarkerPlacementInsidePolygon | CIMMarkerPlacementOnLine | CIMMarkerPlacementOnVertices | CIMMarkerPlacementPolygonCenter;
315
315
 
316
316
  /** @since 5.0 */
317
317
  export interface CIMMarker extends CIMSymbolLayer {
@@ -1643,6 +1643,50 @@ export interface CIMMarkerPlacementAtExtremities extends CIMMarkerStrokePlacemen
1643
1643
  offsetAlongLine?: number;
1644
1644
  }
1645
1645
 
1646
+ /**
1647
+ * Represents marker placement at a set interval according to m-values on the feature. The feature being symbolized must have m-values in its geometry for this type of marker placement to work.
1648
+ *
1649
+ * ```json
1650
+ * "markerPlacement": {
1651
+ * "type": "CIMMarkerPlacementAtMeasuredUnits",
1652
+ * "placePerPart": true,
1653
+ * "angleToLine": true,
1654
+ * "interval": 100
1655
+ * }
1656
+ * ```
1657
+ *
1658
+ * > [!WARNING]
1659
+ * > **Known limitation**
1660
+ * >
1661
+ * > The Arcade [Measure Visualization profile](https://developers.arcgis.com/arcade/profiles/measure-visualization/) is not currently supported, which provides access to the `$measure` variable that represents the interpolated M-value for the marker location.
1662
+ * > This means that while you can place markers at measured units along a line, you cannot currently use Arcade expressions to dynamically change marker properties based on the M-value. Support for the Measure Visualization profile is planned for a future release.
1663
+ *
1664
+ * @since 5.1
1665
+ * @see [ArcGIS Pro: Draw measured hatches along lines](https://doc.esri.com/en/arcgis-pro/latest/help/mapping/layer-properties/linear-referencing-hatch-symbols.html)
1666
+ */
1667
+ export interface CIMMarkerPlacementAtMeasuredUnits extends CIMMarkerStrokePlacement {
1668
+ /** @since 5.1 */
1669
+ type: "CIMMarkerPlacementAtMeasuredUnits";
1670
+ /**
1671
+ * The interval of measured units used to place markers.
1672
+ *
1673
+ * @since 5.1
1674
+ */
1675
+ interval: number;
1676
+ /**
1677
+ * The rate of markers to skip which will suppress markers at certain intervals. This is helpful when two or more levels of interval are being shown in conjunction.
1678
+ *
1679
+ * @since 5.1
1680
+ */
1681
+ skipMarkerRate: number;
1682
+ /**
1683
+ * A value indicating whether markers will be placed at the extremities.
1684
+ *
1685
+ * @since 5.1
1686
+ */
1687
+ placeAtExtremities: boolean;
1688
+ }
1689
+
1646
1690
  /**
1647
1691
  * Represents marker placement at ratio positions which places a set number of markers along the line or the outline of a polygon.
1648
1692
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,this._glyphMosaic?.dispose(),this._glyphMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(e=>e.visible&&e.hasData());if(n&&0!==n.length){for(const e of n)e.triangleCount=0;if(1===e.drawPhase)for(const e of n)e.fader.fade()<1&&this.requestRender();t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(t,i,o){const{state:n}=t,a=this._styleRepository;let d=!1;for(const e of i){const t=a.getLayerById(e);if(t&&0===t.type&&y(a.getLayerById(e),o)){d=!0;break}}if(!d)return;const u=this.tilingScheme,m=u.getTileCoverage(t.state,0,!0,"smallest"),{spans:p,lodInfo:f}=m,{level:g}=f,_=e(),b=[],F=this._backgroundTiles;let R,v=0;for(const{row:h,colFrom:y,colTo:C}of p)for(let t=y;t<=C;t++){if(v<F.length)R=F[v],R.key.set(g,h,f.normalizeCol(t),f.getWorldForColumn(t)),u.getTileBounds(_,R.key,!1),R.x=_[0],R.y=_[3],R.resolution=u.getTileResolution(g);else{const i=new c(g,h,f.normalizeCol(t),f.getWorldForColumn(t)),o=u.getTileBounds(e(),i),n=u.getTileResolution(g);R=new l(i,n,o[0],o[3],r,r,s,s),F.push(R)}R.setTransform(n),b.push(R),v++}const T=this._techniques.getTechnique(0);for(const e of i){const s=a.getLayerById(e);0===s.type&&y(s,o)&&(t.styleLayerUID=s.uid,t.styleLayer=s,T.render(t,{tiles:b}))}h.pool.release(m)}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
2
+ import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,this._glyphMosaic?.dispose(),this._glyphMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null,this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||64===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;64!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(t=>(1===e.drawPhase&&t.fader.fade()<1&&this.requestRender(),t.visible&&t.hasData()));if(n&&0!==n.length){for(const e of n)e.triangleCount=0;t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(t,i,o){const{state:n}=t,a=this._styleRepository;let d=!1;for(const e of i){const t=a.getLayerById(e);if(t&&0===t.type&&y(a.getLayerById(e),o)){d=!0;break}}if(!d)return;const u=this.tilingScheme,m=u.getTileCoverage(t.state,0,!0,"smallest"),{spans:p,lodInfo:g}=m,{level:f}=g,_=e(),b=[],F=this._backgroundTiles;let R,v=0;for(const{row:h,colFrom:y,colTo:C}of p)for(let t=y;t<=C;t++){if(v<F.length)R=F[v],R.key.set(f,h,g.normalizeCol(t),g.getWorldForColumn(t)),u.getTileBounds(_,R.key,!1),R.x=_[0],R.y=_[3],R.resolution=u.getTileResolution(f);else{const i=new c(f,h,g.normalizeCol(t),g.getWorldForColumn(t)),o=u.getTileBounds(e(),i),n=u.getTileResolution(f);R=new l(i,n,o[0],o[3],r,r,s,s),F.push(R)}R.setTransform(n),b.push(R),v++}const T=this._techniques.getTechnique(0);for(const e of i){const s=a.getLayerById(e);0===s.type&&y(s,o)&&(t.styleLayerUID=s.uid,t.styleLayer=s,T.render(t,{tiles:b}))}h.pool.release(m)}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{i8888to32 as t}from"../../webgl/number.js";import{sortByAlignment as e}from"../../webgl/shaderGraph/techniques/mesh/AlignedVertexSpec.js";import{DataType as o}from"../../../../webgl/enums.js";import{fromLayouts as r,fromLayout as n}from"../../../../webgl/VertexAttributeLocations.js";import{VertexElementDescriptor as s}from"../../../../webgl/VertexElementDescriptor.js";class i{constructor(t){this._precisionFactors={},this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._geometryLayout||this._buildMaterialInfo(),this._stride}getAttributeLocations(){return this._geometryLayout||this._buildMaterialInfo(),this._locations}getPrecisionFactors(){return this._precisionFactors||this._buildMaterialInfo(),this._precisionFactors}get geometryLayout(){return this._geometryLayout||this._buildMaterialInfo(),this._geometryLayout}getEncodingInfos(){return this._propertyEncodingInfo||this._buildMaterialInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildMaterialInfo(),this._uniforms}getUsedAttributes(){return this._usedAttributes||this._buildMaterialInfo(),this._usedAttributes}encodeAttributes(t,e,o,r){const n=this.propertyInfos,s=this.getEncodingInfos(),i=[],a=i.length,c=Math.ceil(this._ddStrideInBytes/4);for(let l=0;l<c;l++)i.push(0);let u=0,h=null;for(const l of Object.keys(s)){const c=s[l],{type:y,precisionFactor:d,isLayout:p}=n[l];h===y&&32!==u||(u=0,h=y);const _=p?o.getLayoutProperty(l):o.getPaintProperty(l),m=_.interpolator?.getInterpolationRange(e);let f=0;for(const o of c){const{offset:n}=o,s=a+Math.floor(n/4),c=r??_.getValue(m?m[f]:e,t),h=d||1;switch(y){case 0:case 1:i[s]|=this._encodeByte(c*h,0)<<u,u+=8;break;case 2:case 3:i[s]|=this._encodeShort(c*h,0)<<u,u+=16;break;case 4:case 5:{const t=this._encodeByte(c*h,0),e=this._encodeByte(c*h,8);i[s]|=t<<u,i[s]|=e<<u,u+=16}break;case 6:case 7:i[s]|=this._encodeShort(c*h,0),i[s]|=this._encodeShort(c*h,16);break;case 8:case 9:i[s]|=this._encodeByte(c*h,0),i[s]|=this._encodeByte(c*h,8),i[s]|=this._encodeByte(c*h,16),i[s]|=this._encodeByte(c*h,24);break;case 10:i[s]=this._encodeColor(c);break;case 11:case 12:this._encodePattern(s,i,c);break;default:throw new Error("Unsupported encoding type")}f++}}return i}getAtributeState(t){let e=0;const o=3+2*t;return e|=this._bit(o),e|=this._bit(o+1)<<1,e}static{this._encodingInfo={0:{dataType:o.BYTE,bytesPerElement:1,count:1,normalized:!1},1:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},2:{dataType:o.SHORT,bytesPerElement:2,count:1,normalized:!1},3:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},4:{dataType:o.BYTE,bytesPerElement:1,count:2,normalized:!1},5:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},6:{dataType:o.SHORT,bytesPerElement:2,count:2,normalized:!1},7:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},8:{dataType:o.BYTE,bytesPerElement:1,count:4,normalized:!1},9:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},10:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},11:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},12:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}}}_getLayoutElementsForPropertyState(t,e,o){const r=o[t],n=r.name,{count:s,dataType:a,normalized:c}=i._encodingInfo[r.type],{attribueIdx:u,precisionFactor:h}=r,l=h||1,y=[{location:u[0],name:n,propertyName:t,count:s,type:a,normalized:c,precisionFactor:l}];if(this._precisionFactors[n]=l,2===e){const e=`${n}To`;y.push({location:u[1],name:e,propertyName:t,count:s,type:a,normalized:c,precisionFactor:l}),this._precisionFactors[e]=l}return y}_buildMaterialInfo(){const t=[];this._propertyEncodingInfo={};const e={},o=this.properties,r=this.propertyInfos;let n=-1;for(const i of o){n++;const o=r[i].name;e[o]=!1,e[`${o}To`]=!1;const s=this.getAtributeState(n);if(0===s||3===s)continue;const a=this._getLayoutElementsForPropertyState(i,s,r);t.push(...a)}for(const i of t)e[i.name]=!0;const s=u(t);this._buildLayout(s),this._buildShaderUniforms(),this._usedAttributes=e}_buildLayout(t){this.opacityLayout?this._locations=r([this.baseGeometryLayout,this.opacityLayout]):this._locations=n(this.baseGeometryLayout);const e=this.baseGeometryLayout;let o=e[0].stride;const i=[];let u=0;for(const r of t)u+=a(r.type)*r.count;o=c(o+u);for(const r of e)i.push(new s(r.name,r.count,r.type,r.offset,o,r.normalized));let h=0;for(const r of t)i.push(new s(r.name,r.count,r.type,e[0].stride+h,o,r.normalized)),void 0===this._propertyEncodingInfo[r.propertyName]&&(this._propertyEncodingInfo[r.propertyName]=[]),this._propertyEncodingInfo[r.propertyName].push({offset:h}),h+=a(r.type)*r.count;this._ddStrideInBytes=h,this._geometryLayout=i;const l=this._locations;for(const r of t)l.set(r.name,r.location);this._stride=o}_buildShaderUniforms(){const t=[],e=this.properties,o=this.propertyInfos;let r=-1;for(const n of e){r++;const{name:e,type:s,isLayout:i}=o[n];switch(this.getAtributeState(r)){case 0:t.push({name:e,getValue:(t,e,o,r)=>{const a=i?t.getLayoutValue(n,e):t.getPaintValue(n,e);switch(s){case 11:{const o=t.getDashKey(a,t.getLayoutValue("line-cap",e)),n=r.getMosaicItemPosition(o,!1);if(null==n)return null;const{tl:s,br:i}=n;return[s[0],i[1],i[0],s[1]]}case 12:{const t=r.getMosaicItemPosition(a,!n.includes("line-"));if(null==t)return null;const{tl:e,br:o}=t;return[e[0],o[1],o[0],e[1]]}case 10:{const t=a[3];return[t*a[0],t*a[1],t*a[2],t]}default:return a}}});break;case 2:{const o=`${e}Mix`;t.push({name:o,getValue:(t,e,o,r)=>(i?t.getLayoutProperty(n):t.getPaintProperty(n)).interpolator.interpolationUniformValue(o,e)})}}}this._uniforms=t}_bit(t){return(this._key&1<<t)>>t}_encodeColor(e){const o=255*e[3];return t(e[0]*o,e[1]*o,e[2]*o,o)}_encodePattern(t,e,o){if(!o?.rect)return;const r=2,n=o.rect,s=o.width,i=o.height;e[t]=this._encodeShort(n.x+r,0),e[t]|=this._encodeShort(n.y+r+i,16),e[t+1]=this._encodeShort(n.x+r+s,0),e[t+1]|=this._encodeShort(n.y+r,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}const a=t=>{switch(t){case o.FLOAT:case o.INT:case o.UNSIGNED_INT:return 4;case o.SHORT:case o.UNSIGNED_SHORT:case o.HALF_FLOAT:return 2;case o.BYTE:case o.UNSIGNED_BYTE:return 1}},c=t=>t+3&-4;function u(t){const o=e(t),r=[];let n=0;for(const e of o)r.push({...e,offset:n}),n+=a(e.type)*e.count;return r}export{i as VTLMaterial};
2
+ import{i8888to32 as t}from"../../webgl/number.js";import{sortByAlignment as e}from"../../webgl/shaderGraph/techniques/mesh/AlignedVertexSpec.js";import{DataType as o}from"../../../../webgl/enums.js";import{fromLayouts as r,fromLayout as n}from"../../../../webgl/VertexAttributeLocations.js";import{VertexElementDescriptor as s}from"../../../../webgl/VertexElementDescriptor.js";class i{constructor(t){this._precisionFactors={},this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._geometryLayout||this._buildMaterialInfo(),this._stride}getAttributeLocations(){return this._geometryLayout||this._buildMaterialInfo(),this._locations}getPrecisionFactors(){return this._precisionFactors||this._buildMaterialInfo(),this._precisionFactors}get geometryLayout(){return this._geometryLayout||this._buildMaterialInfo(),this._geometryLayout}getEncodingInfos(){return this._propertyEncodingInfo||this._buildMaterialInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildMaterialInfo(),this._uniforms}getUsedAttributes(){return this._usedAttributes||this._buildMaterialInfo(),this._usedAttributes}encodeAttributes(t,e,o,r){const n=this.propertyInfos,s=this.getEncodingInfos(),i=[],a=Math.ceil(this._ddStrideInBytes/4);for(let c=0;c<a;c++)i.push(0);for(const c of Object.keys(s)){const a=s[c],{type:u,precisionFactor:h,isLayout:y}=n[c],l=y?o.getLayoutProperty(c):o.getPaintProperty(c),d=l.interpolator?.getInterpolationRange(e);let p=0;for(const o of a){const{offset:n}=o,s=Math.floor(n/4),a=n%4*8,c=r??l.getValue(d?d[p]:e,t),y=h||1;switch(u){case 0:case 1:i[s]|=this._encodeByte(c*y,0)<<a;break;case 2:case 3:i[s]|=this._encodeShort(c*y,0)<<a;break;case 4:case 5:{const t=this._encodeByte(c*y,0),e=this._encodeByte(c*y,8);i[s]|=t<<a,i[s]|=e<<a}break;case 6:case 7:i[s]|=this._encodeShort(c*y,0),i[s]|=this._encodeShort(c*y,16);break;case 8:case 9:i[s]|=this._encodeByte(c*y,0),i[s]|=this._encodeByte(c*y,8),i[s]|=this._encodeByte(c*y,16),i[s]|=this._encodeByte(c*y,24);break;case 10:i[s]=this._encodeColor(c);break;case 11:case 12:this._encodePattern(s,i,c);break;default:throw new Error("Unsupported encoding type")}p++}}return i}getAtributeState(t){let e=0;const o=3+2*t;return e|=this._bit(o),e|=this._bit(o+1)<<1,e}static{this._encodingInfo={0:{dataType:o.BYTE,bytesPerElement:1,count:1,normalized:!1},1:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},2:{dataType:o.SHORT,bytesPerElement:2,count:1,normalized:!1},3:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},4:{dataType:o.BYTE,bytesPerElement:1,count:2,normalized:!1},5:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},6:{dataType:o.SHORT,bytesPerElement:2,count:2,normalized:!1},7:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},8:{dataType:o.BYTE,bytesPerElement:1,count:4,normalized:!1},9:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},10:{dataType:o.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},11:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},12:{dataType:o.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}}}_getLayoutElementsForPropertyState(t,e,o){const r=o[t],n=r.name,{count:s,dataType:a,normalized:c}=i._encodingInfo[r.type],{attribueIdx:u,precisionFactor:h}=r,y=h||1,l=[{location:u[0],name:n,propertyName:t,count:s,type:a,normalized:c,precisionFactor:y}];if(this._precisionFactors[n]=y,2===e){const e=`${n}To`;l.push({location:u[1],name:e,propertyName:t,count:s,type:a,normalized:c,precisionFactor:y}),this._precisionFactors[e]=y}return l}_buildMaterialInfo(){const t=[];this._propertyEncodingInfo={};const e={},o=this.properties,r=this.propertyInfos;let n=-1;for(const i of o){n++;const o=r[i].name;e[o]=!1,e[`${o}To`]=!1;const s=this.getAtributeState(n);if(0===s||3===s)continue;const a=this._getLayoutElementsForPropertyState(i,s,r);t.push(...a)}for(const i of t)e[i.name]=!0;const s=u(t);this._buildLayout(s),this._buildShaderUniforms(),this._usedAttributes=e}_buildLayout(t){this.opacityLayout?this._locations=r([this.baseGeometryLayout,this.opacityLayout]):this._locations=n(this.baseGeometryLayout);const e=this.baseGeometryLayout;let o=e[0].stride;const i=[];let u=0;for(const r of t)u+=a(r.type)*r.count;o=c(o+u);for(const r of e)i.push(new s(r.name,r.count,r.type,r.offset,o,r.normalized));let h=0;for(const r of t)i.push(new s(r.name,r.count,r.type,e[0].stride+h,o,r.normalized)),void 0===this._propertyEncodingInfo[r.propertyName]&&(this._propertyEncodingInfo[r.propertyName]=[]),this._propertyEncodingInfo[r.propertyName].push({offset:h}),h+=a(r.type)*r.count;this._ddStrideInBytes=h,this._geometryLayout=i;const y=this._locations;for(const r of t)y.set(r.name,r.location);this._stride=o}_buildShaderUniforms(){const t=[],e=this.properties,o=this.propertyInfos;let r=-1;for(const n of e){r++;const{name:e,type:s,isLayout:i}=o[n];switch(this.getAtributeState(r)){case 0:t.push({name:e,getValue:(t,e,o,r)=>{const a=i?t.getLayoutValue(n,e):t.getPaintValue(n,e);switch(s){case 11:{const o=t.getDashKey(a,t.getLayoutValue("line-cap",e)),n=r.getMosaicItemPosition(o,!1);if(null==n)return null;const{tl:s,br:i}=n;return[s[0],i[1],i[0],s[1]]}case 12:{const t=r.getMosaicItemPosition(a,!n.includes("line-"));if(null==t)return null;const{tl:e,br:o}=t;return[e[0],o[1],o[0],e[1]]}case 10:{const t=a[3];return[t*a[0],t*a[1],t*a[2],t]}default:return a}}});break;case 2:{const o=`${e}Mix`;t.push({name:o,getValue:(t,e,o,r)=>(i?t.getLayoutProperty(n):t.getPaintProperty(n)).interpolator.interpolationUniformValue(o,e)})}}}this._uniforms=t}_bit(t){return(this._key&1<<t)>>t}_encodeColor(e){const o=255*e[3];return t(e[0]*o,e[1]*o,e[2]*o,o)}_encodePattern(t,e,o){if(!o?.rect)return;const r=2,n=o.rect,s=o.width,i=o.height;e[t]=this._encodeShort(n.x+r,0),e[t]|=this._encodeShort(n.y+r+i,16),e[t+1]=this._encodeShort(n.x+r+s,0),e[t+1]|=this._encodeShort(n.y+r,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}const a=t=>{switch(t){case o.FLOAT:case o.INT:case o.UNSIGNED_INT:return 4;case o.SHORT:case o.UNSIGNED_SHORT:case o.HALF_FLOAT:return 2;case o.BYTE:case o.UNSIGNED_BYTE:return 1}},c=t=>t+3&-4;function u(t){const o=e(t),r=[];let n=0;for(const e of o)r.push({...e,offset:n}),n+=a(e.type)*e.count;return r}export{i as VTLMaterial};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- class t{generateSource(t){const o=[];for(let a=1;a<this.length;a++)o.push(`vec4 atom${a} = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;");for(let a=0;a<this.ins;a++)o.push("top--;"),o.push(`vec4 in${this.ins-a-1} = stack[top];`);for(let a=0;a<this.outs;a++)o.push(`vec4 out${a};`);const{microcode:e}=this;for(const a of e)o.push(a);for(let a=0;a<this.outs;a++)o.push(`stack[top] = out${a};`),o.push("top++;"),o.push(`if (top >= ${d}) { top = ${d-1}; }`);return o}}let o=128;class e extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=0,this.microcode=["break;"]}encode(){return[[this.opcode,0,0,0]]}}class a extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.y, atom0.y, atom0.y, atom0.y);"]}encode(t){return[[this.opcode,t,0,0]]}}class i extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.yzw, 0.0);"]}encode(t){return[[this.opcode,t[0]||0,t[1]||0,t[2]||0]]}}class n extends t{constructor(){super(...arguments),this.opcode=++o,this.length=2,this.ins=0,this.outs=1,this.microcode=["out0 = atom1;"]}encode(t){return[[this.opcode,0,0,0],t]}}function r(t){return[`float duration = clamp(${t.duration}, 0.05, 3600.0);`,`float startTimeOffset = ${t.startTimeOffset};`,`float repeatDelay = ${t.repeatDelay};`,`float timeOriginSelector = ${t.timeOriginSelector};`,`float repeatType = ${t.repeatType};`,`float easing = ${t.easing};`,`float playAnimation = ${t.playAnimation} * (1.0 - step(0.0, -${t.duration}));`,`float reverseAnimation = ${t.reverseAnimation};`,"float time = globalTime - (timeOriginSelector == 1.0 ? localTimeOrigin : 0.0);","time *= playAnimation;","time *= 1.0 - reverseAnimation * 2.0;","float period = duration + repeatDelay;","time += reverseAnimation == 1.0 ? (period - startTimeOffset - 0.001) : startTimeOffset + 0.001;","float omega = time / period;","float oi = floor(omega);","omega = repeatType == 1.0 || repeatType == 3.0 ? omega - oi : omega;","float of = omega * period;","of = (clamp(of, reverseAnimation * repeatDelay, period - (1.0 - reverseAnimation) * repeatDelay) - reverseAnimation * repeatDelay) / duration;","of = easing == 2.0 ? pow(of, 3.0) : of;","of = easing == 3.0 ? 1.0 - pow(1.0 - of, 3.0) : of;","of = easing == 4.0 ? of < 0.5 ? 4.0 * pow(of, 3.0) : 1.0 - pow(-2.0 * of + 2.0, 3.0) / 2.0 : of;","bool oscillate = repeatType == 3.0 && mod(oi, 2.0) == 1.0;",`${t.out} = oscillate ? 1.0 - of : of;`]}const s={Linear:1,EaseIn:2,EaseOut:3,EaseInOut:4},l={Loop:1,None:2,Oscillate:3},m={Local:1,Global:2};function c(t){const o=s[t.easing],e=l[t.repeatType],a=m[t.timeOriginSelector];return[[t.duration,t.startTimeOffset,t.repeatDelay,a],[e,o,t.playAnimation,t.reverseAnimation]]}class f extends t{constructor(){super(...arguments),this.opcode=++o,this.length=10,this.ins=1,this.outs=1,this.microcode=["vec2 fromTranslation = atom1.xy;","vec2 toTranslation = atom1.zw;","float fromRotation = atom2.x;","float toRotation = atom2.y;","float fromScale = atom2.z;","float toScale = atom2.w;","bool relativeTranslation = atom9.x == 1.0;","bool absoluteScale = atom9.y == 1.0;","vec2 translationMultiplier = relativeTranslation ? pixelDimensions : vec2(1.0, 1.0);","float scaleDivisor = absoluteScale ? pixelDimensions.y : 1.0;","float fTranslation;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fTranslation"}),"}","float fRotation;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fRotation"}),"}","float fScale;","{",...r({duration:"atom7.x",startTimeOffset:"atom7.y",repeatDelay:"atom7.z",timeOriginSelector:"atom7.w",repeatType:"atom8.x",easing:"atom8.y",playAnimation:"atom8.z",reverseAnimation:"atom8.w",out:"fScale"}),"}","vec2 aTranslation = mix(fromTranslation, toTranslation, fTranslation);","float aRotation = mix(fromRotation, toRotation, fRotation);","float aScale = mix(fromScale, toScale, fScale);","vec2 pTranslation = in0.xy;","float pRotation = in0.z;","float pScale = in0.w;","aTranslation *= translationMultiplier;","aScale /= scaleDivisor;","float rotation = pRotation + aRotation;","float scale = pScale * aScale;","float sin1 = sin(pRotation);","float cos1 = cos(pRotation);","float s1 = pScale;","float x1 = pTranslation.x;","float y1 = pTranslation.y;","float x2 = aTranslation.x;","float y2 = aTranslation.y;","\n vec2 translation = vec2(\n cos1 * s1 * x2 - sin1 * s1 * y2 + x1,\n sin1 * s1 * x2 + cos1 * s1 * y2 + y1\n );\n ","out0 = vec4(translation, rotation, scale);"]}encode(t){return[[this.opcode,0,0,0],[t.translation.from[0],t.translation.from[1],t.translation.to[0],t.translation.to[1]],[t.rotation.from,t.rotation.to,t.scale.from,t.scale.to],...c(t.translation.timing),...c(t.rotation.timing),...c(t.scale.timing),[t.relativeTranslation?1:0,t.absoluteScale?1:0,0,0]]}}class p extends t{constructor(){super(...arguments),this.opcode=++o,this.length=7,this.ins=1,this.outs=1,this.microcode=["float fromOpacity = atom0.y;","float toOpacity = atom0.z;","vec4 fromColor = atom1;","vec4 toColor = atom2;","float fColor;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fColor"}),"}","float fOpacity;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fOpacity"}),"}","vec4 aColor = mix(fromColor, toColor, fColor);","aColor.a *= mix(fromOpacity, toOpacity, fOpacity);","vec4 pColor = in0;","out0 = aColor * pColor;"]}encode(t){return[[this.opcode,t.opacity.from,t.opacity.to,0],[t.color.from[0],t.color.from[1],t.color.from[2],t.color.from[3]],[t.color.to[0],t.color.to[1],t.color.to[2],t.color.to[3]],...c(t.color.timing),...c(t.opacity.timing)]}}class u extends t{constructor(){super(...arguments),this.opcode=++o,this.length=4,this.ins=1,this.outs=1,this.microcode=["float fromShift = atom0.y;","float toShift = atom0.z;","float duration = atom1.x;","bool multiplyByLineLength = atom3.x == 1.0;","float fShift;","{",...r({duration:"duration",startTimeOffset:"atom1.y",repeatDelay:"atom1.z",timeOriginSelector:"atom1.w",repeatType:"atom2.x",easing:"atom2.y",playAnimation:"atom2.z",reverseAnimation:"atom2.w",out:"fShift"}),"}","toShift *= multiplyByLineLength ? lineLength : 1.0;","float aShift = mix(fromShift, toShift, fShift);","vec4 pShift = in0;","out0 = mod(aShift + pShift, lineLength);"]}encode(t){return[[this.opcode,t.shift.from,t.shift.to,0],...c(t.shift.timing),[t.multiplyByLineLength?1:0,0,0,0]]}}const h={scalar:new a,vector3:new i,vector4:new n,animatedTransform:new f,animatedColor:new p,animatedShift:new u,ret:new e},y=40,d=4;function g(t){const o=[];o.push(`float globalTime = ${t.globalTime};`),o.push(`float localTimeOrigin = ${t.localTimeOrigin};`),o.push(`float lineLength = ${t.lineLength};`),o.push(`vec2 pointer = ${t.animationPointer};`),o.push(`vec2 size = ${t.animationTextureSize};`),o.push("int top = 0;"),o.push(`vec4 stack[${d}];`),o.push(`for (int counter = 0; counter < ${y}; counter++) {`),o.push(`vec4 atom0 = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;"),o.push(`vec2 pixelDimensions = ${t.pixelDimensions};`),o.push("if (false) {");for(const e in h){const a=h[e];o.push(`} else if (int(atom0.x) == ${a.opcode}) {`);for(const e of a.generateSource(t))o.push(e)}return o.push("} // End if-else."),o.push("} // End for."),o.push(`${t.out} = top > 0 ? stack[top - 1] : vec4(0.0);`),o.join("\n")}export{t as AAnimationInstruction,p as AnimatedColorInstruction,u as AnimatedShiftInstruction,f as AnimatedTransformInstruction,e as RetInstruction,a as ScalarInstruction,i as Vector3Instruction,n as Vector4Instruction,s as easingCodes,g as generateVirtualMachineSource,r as getTweenFactor,h as instructions,l as repeatTypeCodes,m as timeOriginSelectorCodes};
2
+ class t{generateSource(t){const o=[];for(let a=1;a<this.length;a++)o.push(`vec4 atom${a} = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;");for(let a=0;a<this.ins;a++)o.push("top--;"),o.push(`vec4 in${this.ins-a-1} = stack[top];`);for(let a=0;a<this.outs;a++)o.push(`vec4 out${a};`);const{microcode:e}=this;for(const a of e)o.push(a);for(let a=0;a<this.outs;a++)o.push(`stack[top] = out${a};`),o.push("top++;"),o.push(`if (top >= ${d}) { top = ${d-1}; }`);return o}}let o=128;class e extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=0,this.microcode=["break;"]}encode(){return[[this.opcode,0,0,0]]}}class a extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.y, atom0.y, atom0.y, atom0.y);"]}encode(t){return[[this.opcode,t,0,0]]}}class i extends t{constructor(){super(...arguments),this.opcode=++o,this.length=1,this.ins=0,this.outs=1,this.microcode=["out0 = vec4(atom0.yzw, 0.0);"]}encode(t){return[[this.opcode,t[0]||0,t[1]||0,t[2]||0]]}}class n extends t{constructor(){super(...arguments),this.opcode=++o,this.length=2,this.ins=0,this.outs=1,this.microcode=["out0 = atom1;"]}encode(t){return[[this.opcode,0,0,0],t]}}function r(t){return[`float duration = clamp(${t.duration}, 0.05, 3600.0);`,`float startTimeOffset = ${t.startTimeOffset};`,`float repeatDelay = ${t.repeatDelay};`,`float timeOriginSelector = ${t.timeOriginSelector};`,`float repeatType = ${t.repeatType};`,`float easing = ${t.easing};`,`float playAnimation = ${t.playAnimation} * (1.0 - step(0.0, -${t.duration}));`,`float reverseAnimation = ${t.reverseAnimation};`,"float time = globalTime - (timeOriginSelector == 1.0 ? localTimeOrigin : 0.0);","time *= playAnimation;","time *= 1.0 - reverseAnimation * 2.0;","float period = duration + repeatDelay;","time += reverseAnimation == 1.0 ? (period - startTimeOffset - 0.001) : startTimeOffset + 0.001;","float omega = time / period;","float oi = floor(omega);","omega = repeatType == 1.0 || repeatType == 3.0 ? omega - oi : omega;","float of = omega * period;","of = (clamp(of, reverseAnimation * repeatDelay, period - (1.0 - reverseAnimation) * repeatDelay) - reverseAnimation * repeatDelay) / duration;","of = easing == 2.0 ? pow(of, 3.0) : of;","of = easing == 3.0 ? 1.0 - pow(1.0 - of, 3.0) : of;","of = easing == 4.0 ? of < 0.5 ? 4.0 * pow(of, 3.0) : 1.0 - pow(-2.0 * of + 2.0, 3.0) / 2.0 : of;","bool oscillate = repeatType == 3.0 && mod(oi, 2.0) == 1.0;",`${t.out} = oscillate ? 1.0 - of : of;`]}const s={Linear:1,EaseIn:2,EaseOut:3,EaseInOut:4},l={Loop:1,None:2,Oscillate:3},m={Local:1,Global:2};function c(t){const o=s[t.easing],e=l[t.repeatType],a=m[t.timeOriginSelector];return[[t.duration,t.startTimeOffset,t.repeatDelay,a],[e,o,t.playAnimation,t.reverseAnimation]]}class f extends t{constructor(){super(...arguments),this.opcode=++o,this.length=10,this.ins=1,this.outs=1,this.microcode=["vec2 fromTranslation = atom1.xy;","vec2 toTranslation = atom1.zw;","float fromRotation = atom2.x;","float toRotation = atom2.y;","float fromScale = atom2.z;","float toScale = atom2.w;","bool relativeTranslation = atom9.x == 1.0;","bool absoluteScale = atom9.y == 1.0;","vec2 translationMultiplier = relativeTranslation ? pixelDimensions : vec2(1.0, 1.0);","float scaleDivisor = absoluteScale ? pixelDimensions.y : 1.0;","float fTranslation;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fTranslation"}),"}","float fRotation;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fRotation"}),"}","float fScale;","{",...r({duration:"atom7.x",startTimeOffset:"atom7.y",repeatDelay:"atom7.z",timeOriginSelector:"atom7.w",repeatType:"atom8.x",easing:"atom8.y",playAnimation:"atom8.z",reverseAnimation:"atom8.w",out:"fScale"}),"}","vec2 aTranslation = mix(fromTranslation, toTranslation, fTranslation);","float aRotation = mix(fromRotation, toRotation, fRotation);","float aScale = mix(fromScale, toScale, fScale);","vec2 pTranslation = in0.xy;","float pRotation = in0.z;","float pScale = in0.w;","aTranslation *= translationMultiplier;","aScale /= scaleDivisor;","float rotation = pRotation + aRotation;","float scale = pScale * aScale;","float sin1 = sin(pRotation);","float cos1 = cos(pRotation);","float s1 = pScale;","float x1 = pTranslation.x;","float y1 = pTranslation.y;","float x2 = aTranslation.x;","float y2 = aTranslation.y;","\n vec2 translation = vec2(\n cos1 * s1 * x2 - sin1 * s1 * y2 + x1,\n sin1 * s1 * x2 + cos1 * s1 * y2 + y1\n );\n ","out0 = vec4(translation, rotation, scale);"]}encode(t){return[[this.opcode,0,0,0],[t.translation.from[0],t.translation.from[1],t.translation.to[0],t.translation.to[1]],[t.rotation.from,t.rotation.to,t.scale.from,t.scale.to],...c(t.translation.timing),...c(t.rotation.timing),...c(t.scale.timing),[t.relativeTranslation?1:0,t.absoluteScale?1:0,0,0]]}}class p extends t{constructor(){super(...arguments),this.opcode=++o,this.length=7,this.ins=1,this.outs=1,this.microcode=["float fromOpacity = atom0.y;","float toOpacity = atom0.z;","vec4 fromColor = atom1;","vec4 toColor = atom2;","float fColor;","{",...r({duration:"atom3.x",startTimeOffset:"atom3.y",repeatDelay:"atom3.z",timeOriginSelector:"atom3.w",repeatType:"atom4.x",easing:"atom4.y",playAnimation:"atom4.z",reverseAnimation:"atom4.w",out:"fColor"}),"}","float fOpacity;","{",...r({duration:"atom5.x",startTimeOffset:"atom5.y",repeatDelay:"atom5.z",timeOriginSelector:"atom5.w",repeatType:"atom6.x",easing:"atom6.y",playAnimation:"atom6.z",reverseAnimation:"atom6.w",out:"fOpacity"}),"}","vec4 aColor = mix(fromColor, toColor, fColor);","aColor.a *= mix(fromOpacity, toOpacity, fOpacity);","vec4 pColor = in0;","out0 = aColor * pColor;"]}encode(t){return[[this.opcode,t.opacity.from,t.opacity.to,0],[t.color.from[0],t.color.from[1],t.color.from[2],t.color.from[3]],[t.color.to[0],t.color.to[1],t.color.to[2],t.color.to[3]],...c(t.color.timing),...c(t.opacity.timing)]}}class u extends t{constructor(){super(...arguments),this.opcode=++o,this.length=4,this.ins=1,this.outs=1,this.microcode=["float fromShift = atom0.y;","float toShift = atom0.z;","float duration = atom1.x;","bool multiplyToByLineLength = atom3.x == 1.0;","bool multiplyDurationByLineLength = atom3.y == 1.0;","duration *= multiplyDurationByLineLength ? lineLength : 1.0;","float fShift;","{",...r({duration:"duration",startTimeOffset:"atom1.y",repeatDelay:"atom1.z",timeOriginSelector:"atom1.w",repeatType:"atom2.x",easing:"atom2.y",playAnimation:"atom2.z",reverseAnimation:"atom2.w",out:"fShift"}),"}","toShift *= multiplyToByLineLength ? lineLength : 1.0;","float aShift = mix(fromShift, toShift, fShift);","vec4 pShift = in0;","out0 = mod(aShift + pShift, lineLength);"]}encode(t){return[[this.opcode,t.shift.from,t.shift.to,0],...c(t.shift.timing),[t.multiplyToByLineLength?1:0,t.multiplyDurationByLineLength?1:0,0,0]]}}const h={scalar:new a,vector3:new i,vector4:new n,animatedTransform:new f,animatedColor:new p,animatedShift:new u,ret:new e},y=40,d=4;function g(t){const o=[];o.push(`float globalTime = ${t.globalTime};`),o.push(`float localTimeOrigin = ${t.localTimeOrigin};`),o.push(`float lineLength = ${t.lineLength};`),o.push(`vec2 pointer = ${t.animationPointer};`),o.push(`vec2 size = ${t.animationTextureSize};`),o.push("int top = 0;"),o.push(`vec4 stack[${d}];`),o.push(`for (int counter = 0; counter < ${y}; counter++) {`),o.push(`vec4 atom0 = texture(${t.animationTexture}, (pointer + 0.5) / size);`),o.push("pointer.x += 1.0;"),o.push(`vec2 pixelDimensions = ${t.pixelDimensions};`),o.push("if (false) {");for(const e in h){const a=h[e];o.push(`} else if (int(atom0.x) == ${a.opcode}) {`);for(const e of a.generateSource(t))o.push(e)}return o.push("} // End if-else."),o.push("} // End for."),o.push(`${t.out} = top > 0 ? stack[top - 1] : vec4(0.0);`),o.join("\n")}export{t as AAnimationInstruction,p as AnimatedColorInstruction,u as AnimatedShiftInstruction,f as AnimatedTransformInstruction,e as RetInstruction,a as ScalarInstruction,i as Vector3Instruction,n as Vector4Instruction,s as easingCodes,g as generateVirtualMachineSource,r as getTweenFactor,h as instructions,l as repeatTypeCodes,m as timeOriginSelectorCodes};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{input as i}from"../../GraphShaderModule.js";import{Float as r,sin as s,cos as o,Vec3 as l,Vec4 as n,mix as a}from"../../graph/glsl.js";import{AAnimatedPolyShader as m,PolyVertexInput as p,PolyHittestVertexInput as u,PolyFragmentInput as d}from"./AAnimatedPolyShader.js";import{getPatternMatrix as h}from"../shaders/ComplexFillShader.js";import{c256ToRad as y}from"../shaders/constants.js";import{hittestFill as c}from"../shaders/hittestUtils.js";class f extends m{constructor(){super(...arguments),this.type="AnimatedFillShader"}vertex(t,e){const{distanceToPx:i,ndc:m,z:p,color:u,isOutline:d,strokeWidth:c,isSDF:f,scale:g,scaleSymbolsProportionally:x}=this._vertexPoly(t),b=this.view.requiredZoomFactor,P=t.sizing.xy,v=P.multiply(b),S=t.angle?t.angle.multiply(y):new r(0),j=s(S),w=o(S),F=h(t.id,v,j,w,t.bitset),O=this.localTileOffset.getPatternOffsetAtTileOrigin(P,j,w),A=b.multiply(t.offset.subtract(O)).divide(v),T=new l(t.pos,1),z=F.multiply(T).xy.subtract(A),k=t.tlbr.divide(this.mosaicInfo.size.xyxy);return{glPosition:new n(m,p,1),tlbr:k,uv:z,color:u.multiply(new r(1).subtract(d)),outlineColor:u.multiply(d),distanceToPx:i,strokeWidth:c.multiply(a(new r(1),g,x)),isOutline:d,isSDF:f,...this.maybeRunHittest(t,e,{})}}fragment(t){const e=this._fragmentPoly(t);return this.getFragmentOutput(e,t)}hittest(t,e,i){return c(this,t,e)}}t([e(0,i(p)),e(1,i(u))],f.prototype,"vertex",null),t([e(0,i(d))],f.prototype,"fragment",null);export{f as AnimatedFillShader};
2
+ import{__decorate as t,__param as e}from"tslib";import{input as s}from"../../GraphShaderModule.js";import{Float as i,sin as r,cos as o,Vec3 as l,Vec4 as n,mix as a,ifElse as m,greaterThan as u}from"../../graph/glsl.js";import{AAnimatedPolyShader as p,PolyVertexInput as h,PolyHittestVertexInput as c,PolyFragmentInput as d}from"./AAnimatedPolyShader.js";import{getPatternMatrix as y}from"../shaders/ComplexFillShader.js";import{c256ToRad as f,noHit as g,trueHit as x}from"../shaders/constants.js";import{isRectHittest as b,hittestFill as w,hittestScreenRect as P}from"../shaders/hittestUtils.js";class v extends p{constructor(){super(...arguments),this.type="AnimatedFillShader"}vertex(t,e){const{distanceToPx:s,ndc:m,z:u,color:p,isOutline:h,strokeWidth:c,isSDF:d,scale:g,scaleSymbolsProportionally:x}=this._vertexPoly(t),b=this.view.requiredZoomFactor,w=t.sizing.xy,P=w.multiply(b),v=t.angle?t.angle.multiply(f):new i(0),S=r(v),j=o(v),F=y(t.id,P,S,j,t.bitset),O=this.localTileOffset.getPatternOffsetAtTileOrigin(w,S,j),T=b.multiply(t.offset.subtract(O)).divide(P),q=new l(t.pos,1),A=F.multiply(q).xy.subtract(T),R=t.tlbr.divide(this.mosaicInfo.size.xyxy);return{glPosition:new n(m,u,1),tlbr:R,uv:A,color:p.multiply(new i(1).subtract(h)),outlineColor:p.multiply(h),distanceToPx:s,strokeWidth:c.multiply(a(new i(1),g,x)),isOutline:h,isSDF:d,...this.maybeRunHittest(t,e,{})}}fragment(t){const e=this._fragmentPoly(t);return this.getFragmentOutput(e,t)}hittest(t,e,s){const{pos0:r,pos1:o,pos2:l}=this.computeHittestTriangle(t,e,null),n=b(this.hittestRequest);return m(n,()=>{const{tlbr:t}=this.hittestRequest;return P(r,o,l,t)},()=>{const s=w(this,t,e);return m(u(s,this.hittestRequest.distance),new i(g),new i(x))})}}t([e(0,s(h)),e(1,s(c))],v.prototype,"vertex",null),t([e(0,s(d))],v.prototype,"fragment",null);export{v as AnimatedFillShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as s,input as l}from"../../GraphShaderModule.js";import{dot as o,Vec2 as a,Float as n,max as r,Vec4 as d,mix as m,length as p,clamp as u,Vec3 as y,step as c,min as h}from"../../graph/glsl.js";import{AAnimatedPolyShader as x,PolyHittestVertexInput as v,PolyVertexInput as f,PolyFragmentInput as w}from"./AAnimatedPolyShader.js";import{getValue as b}from"./AAnimatedShader.js";import{distPointSegment as g}from"../shaders/hittestUtils.js";import{getLineAntialiasing as S,getLineThinFactor as P,AntialiasingControls as z}from"../shaders/LineShader.js";class A extends f{}t([e(10,n)],A.prototype,"accumulatedDistance",void 0),t([e(11,a)],A.prototype,"normal",void 0),t([e(12,a)],A.prototype,"segmentDirection",void 0);class D extends w{}class j extends x{constructor(){super(...arguments),this.type="AnimatedLineShader"}vertex(t,i){const{animationPointerAndBaseSizeAndReferenceSize:e}=t,s=e.xy,{distanceToPx:l,ndc:p,z:u,color:y,isOutline:c,strokeWidth:h,isSDF:x,baseSize:v,scale:f,scaleSymbolsProportionally:w,evalParams:g}=this._vertexPoly(t),S=t.sizing.xy,P=S.x.multiply(v).divide(S.y),z=b(s,6,g).a,A=t.accumulatedDistance.subtract(z),{normal:D}=t,j=t.normal.y,C=A.divide(this.view.displayZoomFactor).add(o(t.segmentDirection,t.offset)).divide(P),F=j.add(1).divide(2),R=new a(C,F),W=t.tlbr.divide(this.mosaicInfo.size.xyxy),M=v.divide(2),O=new n(.5).multiply(this.antialiasingControls.antialiasing),T=r(M.add(O),new n(.45)).add(new n(.1).multiply(O));return{glPosition:new d(p,u,1),tlbr:W,uv:R,color:y.multiply(new n(1).subtract(c)),outlineColor:y.multiply(c),distanceToPx:l,strokeWidth:h.multiply(m(new n(1),f,w)),isOutline:c,isSDF:x,halfWidth:T,normal:D,...this.maybeRunHittest(t,i,T)}}fragment(t){const i=this._fragmentPoly(t),e=S(t,this.antialiasingControls.blur),{halfWidth:s,normal:l}=t,o=P(s),a=p(l).multiply(s),r=u(o.multiply(s.subtract(a)).divide(o.subtract(new n(1))),new n(0),new n(1));return this.getFragmentOutput(i.multiply(r).multiply(e),t)}hittest(t,i,e){const{viewMat3:s,tileMat3:l}=this.view,o=s.multiply(l),a=o.multiply(new y(t.pos,1)),n=o.multiply(new y(i.nextPos1,1)),r=o.multiply(new y(i.nextPos2,1)),{distance:d,smallSymbolDistance:m,smallSymbolSizeThreshold:p}=this.hittestRequest,u=c(e,p.multiply(.5)).multiply(d.subtract(m)),x=this.hittestRequest.position;return h(g(x,a.xy,n.xy),g(x,a.xy,r.xy)).subtract(e).add(u)}}t([s(z)],j.prototype,"antialiasingControls",void 0),t([i(0,l(A)),i(1,l(v))],j.prototype,"vertex",null),t([i(0,l(D))],j.prototype,"fragment",null);export{j as AnimatedLineShader};
2
+ import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as s,input as o}from"../../GraphShaderModule.js";import{dot as l,Vec2 as r,Float as a,max as n,Vec4 as d,mix as m,length as p,clamp as u,step as c,min as h,ifElse as y,greaterThan as f}from"../../graph/glsl.js";import{AAnimatedPolyShader as v,PolyHittestVertexInput as b,PolyVertexInput as g,PolyFragmentInput as x}from"./AAnimatedPolyShader.js";import{getValue as S}from"./AAnimatedShader.js";import{noHit as w,trueHit as P}from"../shaders/constants.js";import{isRectHittest as j,distPointSegment as z,hittestScreenRect as A}from"../shaders/hittestUtils.js";import{getLineAntialiasing as D,getLineThinFactor as R,AntialiasingControls as C}from"../shaders/LineShader.js";class F extends g{}t([e(10,a)],F.prototype,"accumulatedDistance",void 0),t([e(11,r)],F.prototype,"normal",void 0),t([e(12,r)],F.prototype,"segmentDirection",void 0);class T extends x{}class W extends v{constructor(){super(...arguments),this.type="AnimatedLineShader"}vertex(t,i){const{animationPointerAndBaseSizeAndReferenceSize:e}=t,s=e.xy,{distanceToPx:o,ndc:p,z:u,color:c,isOutline:h,strokeWidth:y,isSDF:f,baseSize:v,scale:b,scaleSymbolsProportionally:g,evalParams:x}=this._vertexPoly(t),w=t.sizing.xy,P=w.x.multiply(v).divide(w.y),j=S(s,6,x).a,z=t.accumulatedDistance.subtract(j),{normal:A}=t,D=t.normal.y,R=z.divide(this.view.displayZoomFactor).add(l(t.segmentDirection,t.offset)).divide(P),C=D.add(1).divide(2),F=new r(R,C),T=t.tlbr.divide(this.mosaicInfo.size.xyxy),W=v.divide(2),q=new a(.5).multiply(this.antialiasingControls.antialiasing),O=n(W.add(q),new a(.45)).add(new a(.1).multiply(q));return{glPosition:new d(p,u,1),tlbr:T,uv:F,color:c.multiply(new a(1).subtract(h)),outlineColor:c.multiply(h),distanceToPx:o,strokeWidth:y.multiply(m(new a(1),b,g)),isOutline:h,isSDF:f,halfWidth:O,normal:A,...this.maybeRunHittest(t,i,O)}}fragment(t){const i=this._fragmentPoly(t),e=D(t,this.antialiasingControls.blur),{halfWidth:s,normal:o}=t,l=R(s),r=p(o).multiply(s),n=u(l.multiply(s.subtract(r)).divide(l.subtract(new a(1))),new a(0),new a(1));return this.getFragmentOutput(i.multiply(n).multiply(e),t)}hittest(t,i,e){const{pos0:s,pos1:o,pos2:l}=this.computeHittestTriangle(t,i,null),r=j(this.hittestRequest),{distance:n,smallSymbolDistance:d,smallSymbolSizeThreshold:m,tlbr:p}=this.hittestRequest,u=c(e,m.multiply(.5)).multiply(n.subtract(d)),v=this.hittestRequest.position,b=h(z(v,s,o),z(v,s,l)).subtract(e).add(u);return y(r,A(s,o,l,p),y(f(b,n),new a(w),new a(P)))}}t([s(C)],W.prototype,"antialiasingControls",void 0),t([i(0,o(F)),i(1,o(b))],W.prototype,"vertex",null),t([i(0,o(T))],W.prototype,"fragment",null);export{W as AnimatedLineShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as l}from"../../GraphShaderModule.js";import{Float as r,Vec4 as a,ifElse as n,or as d,Bool as m,mix as u,Mat3 as p,lessThan as h,Vec3 as x,distance as c,greaterThan as y,Vec2 as f,negate as w,step as g}from"../../graph/glsl.js";import{AAnimatedShader as v,getValue as S,AAnimatedVertexInput as b,AAnimatedFragmentInput as _}from"./AAnimatedShader.js";import{MarkerConstants as V}from"../markers/markerConstants.js";import{distPointTriangle as z,xyToBarycentric as C,inTriangle as P,failHittest as N}from"../shaders/hittestUtils.js";import{getBitBool as k}from"../shaders/utils.js";import{getVisualVariableColor as M,getVisualVariableOpacity as D}from"../shaders/vvUtils.js";class R extends b{}t([s(9,f)],R.prototype,"uv",void 0),t([s(10,r)],R.prototype,"angle",void 0);class F extends l{}t([s(11,f)],F.prototype,"offsetNextVertex1",void 0),t([s(12,f)],F.prototype,"offsetNextVertex2",void 0),t([s(13,f)],F.prototype,"textureUVNextVertex1",void 0),t([s(14,f)],F.prototype,"textureUVNextVertex2",void 0);class j extends _{}function T(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}class U extends v{constructor(){super(...arguments),this.type="AnimatedMarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],uv:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=t.uv.divide(this.mosaicInfo.size),{position:s,animationPointer:o,evalParams:l,isOutline:h,unscaledDistanceToPx:x,vvScale:c,strokeWidth:y,scaleSymbolsProportionally:f,scale:w,isSDF:g,baseSize:v,clip:b}=this._vertexPreamble(t,t.angle,t.lineLength||new r(0)),_=this._toNdc(s);let z=S(o,1,l);z=new a(z.rgb.multiply(z.a),z.a);let C=n(k(t.bitset,V.bitset.colorLocked),z,S(o,2,l));C=new a(C.rgb.multiply(C.a),C.a);let P=S(o,3,l);P=new a(P.rgb.multiply(P.a),P.a);const N=S(o,4,l).a,R=S(o,5,l).a,F=M(this,t.id,z,d(k(t.bitset,V.bitset.colorLocked),new m(h))),j=u(F,C,P),T=D(this,t.id),U=u(T,N,R),q=j.multiply(U),A=this.clip(t.id,t.zoomRange).add(b.multiply(2)),I=x.multiply(c);return{glPosition:new a(_,A,1),uv:i,color:q.multiply(new r(1).subtract(h)),outlineColor:q.multiply(h),distanceToPx:I,strokeWidth:y.multiply(u(new r(1),w,f)),isOutline:h,isSDF:g,...this.maybeRunHittest(t,e,{pos:t.pos,size:v,sizeCorrection:new r(1),isMapAligned:new r(1),vvRotationMat3:new p(1,0,0,0,1,0,0,0,1),placementMat3:new p(1,0,0,0,1,0,0,0,1),outlineSize:new r(1),distanceToPx:I,isSDF:g})}}fragment(t){let e=this._getColor(t.uv,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth});return i.spotlightAnimatedSymbols&&(e=e.add(new a(0,.3,0,.3))),this.getFragmentOutput(e,t)}hittest(t,e,i){return n(h(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i))}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:l}=this.hittestRequest,r=o.subtract(l),{viewMat3:a,tileMat3:n}=this.view,d=a.multiply(n).multiply(new x(i.pos,1)).xy,m=i.size.multiply(.5);return c(d,s).subtract(m).add(r)}_hittestMarker(t,e,i){const s=this._vertexPreamble({...t},t.angle,new r(0)).position,o=this._vertexPreamble({...t,offset:e.offsetNextVertex1},t.angle,new r(0)).position,l=this._vertexPreamble({...t,offset:e.offsetNextVertex2},t.angle,new r(0)).position,a=this.hittestRequest.position,d=this.hittestRequest.distance,m=z(a,s,o,l);return n(y(m,d),m,this._hittestSamples(s,o,l,t,e,i))}_hittestSamples(t,e,i,s,o,l){const{outlineSize:n,isSDF:d,distanceToPx:m}=l,u=this.hittestRequest.position,p=this.hittestRequest.distance,h=C(u.add(new f(w(p),w(p))),t,e,i),x=C(u.add(new f(0,w(p))),t,e,i),c=C(u.add(new f(p,w(p))),t,e,i),y=C(u.add(new f(w(p),0)),t,e,i),v=C(u,t,e,i),S=C(u.add(new f(p,0)),t,e,i),b=C(u.add(new f(w(p),p)),t,e,i),_=C(u.add(new f(0,p)),t,e,i),V=C(u.add(new f(p,p)),t,e,i),z=s.uv.divide(this.mosaicInfo.size),k=o.textureUVNextVertex1.divide(this.mosaicInfo.size),M=o.textureUVNextVertex2.divide(this.mosaicInfo.size),D={color:new a(1,1,1,1),outlineSize:n,outlineColor:new a(1,1,1,1),isSDF:d,distanceToPx:m};let R=new r(0);return R=R.add(P(h).multiply(this._getColor(T(h,z,k,M),D).a)),R=R.add(P(x).multiply(this._getColor(T(x,z,k,M),D).a)),R=R.add(P(c).multiply(this._getColor(T(c,z,k,M),D).a)),R=R.add(P(y).multiply(this._getColor(T(y,z,k,M),D).a)),R=R.add(P(v).multiply(this._getColor(T(v,z,k,M),D).a)),R=R.add(P(S).multiply(this._getColor(T(S,z,k,M),D).a)),R=R.add(P(b).multiply(this._getColor(T(b,z,k,M),D).a)),R=R.add(P(_).multiply(this._getColor(T(_,z,k,M),D).a)),R=R.add(P(V).multiply(this._getColor(T(V,z,k,M),D).a)),g(R,new r(.05)).multiply(N(this.hittestRequest))}}t([e(0,o(R)),e(1,o(F))],U.prototype,"vertex",null),t([e(0,o(j))],U.prototype,"fragment",null);export{j as AnimatedMarkerFragmentInput,U as AnimatedMarkerShader,R as AnimatedMarkerVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as l}from"../../GraphShaderModule.js";import{Float as r,Vec4 as a,ifElse as n,or as d,Bool as u,mix as m,Mat3 as p,lessThan as h,greaterThan as c,Vec3 as x,distance as y,Vec2 as f,negate as w,step as g}from"../../graph/glsl.js";import{AAnimatedShader as v,getValue as b,AAnimatedVertexInput as S,AAnimatedFragmentInput as _}from"./AAnimatedShader.js";import{MarkerConstants as V}from"../markers/markerConstants.js";import{noHit as z,trueHit as C}from"../shaders/constants.js";import{isRectHittest as P,hittestScreenRect as N,distPointTriangle as R,xyToBarycentric as k,inTriangle as M,failHittest as q}from"../shaders/hittestUtils.js";import{getBitBool as D}from"../shaders/utils.js";import{getVisualVariableColor as j,getVisualVariableOpacity as F}from"../shaders/vvUtils.js";class T extends S{}t([s(9,f)],T.prototype,"uv",void 0),t([s(10,r)],T.prototype,"angle",void 0);class U extends l{}t([s(11,f)],U.prototype,"offsetNextVertex1",void 0),t([s(12,f)],U.prototype,"offsetNextVertex2",void 0),t([s(13,f)],U.prototype,"textureUVNextVertex1",void 0),t([s(14,f)],U.prototype,"textureUVNextVertex2",void 0);class A extends _{}function I(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}class L extends v{constructor(){super(...arguments),this.type="AnimatedMarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],uv:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=t.uv.divide(this.mosaicInfo.size),{position:s,animationPointer:o,evalParams:l,isOutline:h,unscaledDistanceToPx:c,vvScale:x,strokeWidth:y,scaleSymbolsProportionally:f,scale:w,isSDF:g,baseSize:v,clip:S}=this._vertexPreamble(t,t.angle,t.lineLength||new r(0)),_=this._toNdc(s);let z=b(o,1,l);z=new a(z.rgb.multiply(z.a),z.a);let C=n(D(t.bitset,V.bitset.colorLocked),z,b(o,2,l));C=new a(C.rgb.multiply(C.a),C.a);let P=b(o,3,l);P=new a(P.rgb.multiply(P.a),P.a);const N=b(o,4,l).a,R=b(o,5,l).a,k=j(this,t.id,z,d(D(t.bitset,V.bitset.colorLocked),new u(h))),M=m(k,C,P),q=F(this,t.id),T=m(q,N,R),U=M.multiply(T),A=this.clip(t.id,t.zoomRange).add(S.multiply(2)),I=c.multiply(x);return{glPosition:new a(_,A,1),uv:i,color:U.multiply(new r(1).subtract(h)),outlineColor:U.multiply(h),distanceToPx:I,strokeWidth:y.multiply(m(new r(1),w,f)),isOutline:h,isSDF:g,...this.maybeRunHittest(t,e,{pos:t.pos,size:v,sizeCorrection:new r(1),isMapAligned:new r(1),vvRotationMat3:new p(1,0,0,0,1,0,0,0,1),placementMat3:new p(1,0,0,0,1,0,0,0,1),outlineSize:new r(1),distanceToPx:I,isSDF:g})}}fragment(t){let e=this._getColor(t.uv,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth});return i.spotlightAnimatedSymbols&&(e=e.add(new a(0,.3,0,.3))),this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:s,pos1:o,pos2:l}=this.computeHittestTriangle(t,e,i),a=P(this.hittestRequest);return n(a,()=>{const{tlbr:t}=this.hittestRequest;return N(s,o,l,t)},()=>{const s=n(h(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i));return n(c(s,this.hittestRequest.distance),new r(z),new r(C))})}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:l}=this.hittestRequest,r=o.subtract(l),{viewMat3:a,tileMat3:n}=this.view,d=a.multiply(n).multiply(new x(i.pos,1)).xy,u=i.size.multiply(.5);return y(d,s).subtract(u).add(r)}_hittestMarker(t,e,i){const s=this._vertexPreamble({...t},t.angle,new r(0)).position,o=this._vertexPreamble({...t,offset:e.offsetNextVertex1},t.angle,new r(0)).position,l=this._vertexPreamble({...t,offset:e.offsetNextVertex2},t.angle,new r(0)).position,a=this.hittestRequest.position,d=this.hittestRequest.distance,u=R(a,s,o,l);return n(c(u,d),u,this._hittestSamples(s,o,l,t,e,i))}_hittestSamples(t,e,i,s,o,l){const{outlineSize:n,isSDF:d,distanceToPx:u}=l,m=this.hittestRequest.position,p=this.hittestRequest.distance,h=k(m.add(new f(w(p),w(p))),t,e,i),c=k(m.add(new f(0,w(p))),t,e,i),x=k(m.add(new f(p,w(p))),t,e,i),y=k(m.add(new f(w(p),0)),t,e,i),v=k(m,t,e,i),b=k(m.add(new f(p,0)),t,e,i),S=k(m.add(new f(w(p),p)),t,e,i),_=k(m.add(new f(0,p)),t,e,i),V=k(m.add(new f(p,p)),t,e,i),z=s.uv.divide(this.mosaicInfo.size),C=o.textureUVNextVertex1.divide(this.mosaicInfo.size),P=o.textureUVNextVertex2.divide(this.mosaicInfo.size),N={color:new a(1,1,1,1),outlineSize:n,outlineColor:new a(1,1,1,1),isSDF:d,distanceToPx:u};let R=new r(0);return R=R.add(M(h).multiply(this._getColor(I(h,z,C,P),N).a)),R=R.add(M(c).multiply(this._getColor(I(c,z,C,P),N).a)),R=R.add(M(x).multiply(this._getColor(I(x,z,C,P),N).a)),R=R.add(M(y).multiply(this._getColor(I(y,z,C,P),N).a)),R=R.add(M(v).multiply(this._getColor(I(v,z,C,P),N).a)),R=R.add(M(b).multiply(this._getColor(I(b,z,C,P),N).a)),R=R.add(M(S).multiply(this._getColor(I(S,z,C,P),N).a)),R=R.add(M(_).multiply(this._getColor(I(_,z,C,P),N).a)),R=R.add(M(V).multiply(this._getColor(I(V,z,C,P),N).a)),g(R,new r(.05)).multiply(q(this.hittestRequest))}}t([e(0,o(T)),e(1,o(U))],L.prototype,"vertex",null),t([e(0,o(A))],L.prototype,"fragment",null);export{A as AnimatedMarkerFragmentInput,L as AnimatedMarkerShader,T as AnimatedMarkerVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clamp as t,Float as n,length as y,distance as u,Vec3 as e,and as r,greaterThan as x,lessThan as i,cond as l,not as c,Mat3 as s,abs as a,step as w,greaterThanEqual as d,Vec2 as o,min as b,max as p,equal as m,or as f,ifElse as v,dot as j,normalize as z,lessThanEqual as g}from"../../graph/glsl.js";import{epsilonHitTest as h,trueHit as M,candidateHit as P}from"./constants.js";import{cross2 as q}from"./utils.js";function R(t,n){return j(t,z(n))}function k(e,r,x){const i=x.subtract(r),l=R(e.subtract(r),i),c=t(l.divide(y(i)),new n(0),new n(1));return u(e,r.add(c.multiply(x.subtract(r))))}function A(t){const y=a(t);return w(y.x.add(y.y).add(y.z),new n(1.05))}function B(t,y,u,r){const x=new s(u.x.multiply(r.y).subtract(r.x.multiply(u.y)),r.x.multiply(y.y).subtract(y.x.multiply(r.y)),y.x.multiply(u.y).subtract(u.x.multiply(y.y)),u.y.subtract(r.y),r.y.subtract(y.y),y.y.subtract(u.y),r.x.subtract(u.x),y.x.subtract(r.x),u.x.subtract(y.x)),i=y.x.multiply(u.y.subtract(r.y)),l=u.x.multiply(r.y.subtract(y.y)),c=r.x.multiply(y.y.subtract(u.y)),a=i.add(l).add(c);return new n(1).divide(a).multiply(x.multiply(new e(1,t)))}function C(t,y,u,e){return m(A(B(t,y,u,e)),new n(1))}function D(t,y,u,e){const s=u.subtract(y),a=e.subtract(y),w=q(s,a),d=r(i(w,new n(h)),x(w,new n(-h)));return l([r(c(d),C(t.xy,y,u,e)),new n(-1)],[!0,()=>{const n=k(t,y,u),r=k(t,u,e),x=k(t,e,y);return b(b(n,r),x)}])}function E(t){return t.distance.add(1)}function F(t,n,y){const{viewMat3:u,tileMat3:r}=t.view,x=u.multiply(r),i=x.multiply(new e(n.pos,1)),l=x.multiply(new e(y.nextPos1,1)),c=x.multiply(new e(y.nextPos2,1));return D(t.hittestRequest.position,i.xy,l.xy,c.xy)}function G(t,n,y){return u(t,y).subtract(n)}function H(t,y,u,e){const x=t.x,i=t.y,l=y.x,s=y.y,a=u.x,w=u.y,o=e.x,b=e.y,p=o.subtract(a),f=x.subtract(a),j=l.subtract(x),z=b.subtract(w),h=i.subtract(w),M=s.subtract(i),P=z.multiply(j).subtract(p.multiply(M)),q=p.multiply(h).subtract(z.multiply(f)).divide(P),R=j.multiply(h).subtract(M.multiply(f)).divide(P),k=r(c(m(P,new n(0))),r(r(d(q,new n(0)),g(q,new n(1))),r(d(R,new n(0)),g(R,new n(1)))));return v(k,new n(1),new n(0))}function I(t,n,y,u,e){return r(r(d(t.x,n),d(t.y,y)),r(i(t.x,u),g(t.y,e)))}function J(t,y,u,e){const i=e.xy,l=e.zw,c=new o(l.x,i.y),s=new o(i.x,l.y),a=b(i.x,l.x),w=b(i.y,l.y),d=p(i.x,l.x),j=p(i.y,l.y),z=B(new o(a,w),t,y,u),g=B(new o(d,j),t,y,u),h=B(new o(a,j),t,y,u),q=B(new o(d,w),t,y,u),R=r(m(A(z),new n(1)),r(m(A(g),new n(1)),r(m(A(h),new n(1)),m(A(q),new n(1))))),k=H(i,c,t.xy,y.xy).add(H(c,l,t.xy,y.xy)).add(H(s,l,t.xy,y.xy)).add(H(s,i,t.xy,y.xy)),C=H(i,c,t.xy,u.xy).add(H(c,l,t.xy,u.xy)).add(H(s,l,t.xy,u.xy)).add(H(s,i,t.xy,u.xy)),D=H(i,c,y.xy,u.xy).add(H(c,l,y.xy,u.xy)).add(H(s,l,y.xy,u.xy)).add(H(s,i,y.xy,u.xy)),E=I(t.xy,a,w,d,j),F=I(y.xy,a,w,d,j),G=I(u.xy,a,w,d,j),J=r(E,r(F,G)),K=f(x(k,new n(0)),f(x(C,new n(0)),x(D,new n(0))));return v(f(K,R),new n(P),v(J,new n(M),new n(0)))}function K(t){return r(d(t.tlbr.x,new n(0)),d(t.tlbr.y,new n(0)),d(t.tlbr.z,new n(0)),d(t.tlbr.w,new n(0)))}export{k as distPointSegment,D as distPointTriangle,E as failHittest,F as hittestFill,G as hittestMarker,J as hittestScreenRect,A as inTriangle,K as isRectHittest,I as pointInRect,R as projectScalar,H as segmentIntersects,B as xyToBarycentric};
2
+ import{and as t,greaterThanEqual as n,Float as y,clamp as u,length as e,distance as r,Vec2 as x,min as i,max as l,equal as c,or as s,greaterThan as a,ifElse as w,Vec3 as d,lessThan as o,cond as b,not as p,Mat3 as m,abs as f,step as v,dot as j,normalize as z,lessThanEqual as g}from"../../graph/glsl.js";import{trueHit as h,candidateHit as M,epsilonHitTest as P}from"./constants.js";import{cross2 as q}from"./utils.js";function R(t,n){return j(t,z(n))}function k(t,n,x){const i=x.subtract(n),l=R(t.subtract(n),i),c=u(l.divide(e(i)),new y(0),new y(1));return r(t,n.add(c.multiply(x.subtract(n))))}function A(t){const n=f(t);return v(n.x.add(n.y).add(n.z),new y(1.05))}function B(t,n,u,e){const r=new m(u.x.multiply(e.y).subtract(e.x.multiply(u.y)),e.x.multiply(n.y).subtract(n.x.multiply(e.y)),n.x.multiply(u.y).subtract(u.x.multiply(n.y)),u.y.subtract(e.y),e.y.subtract(n.y),n.y.subtract(u.y),e.x.subtract(u.x),n.x.subtract(e.x),u.x.subtract(n.x)),x=n.x.multiply(u.y.subtract(e.y)),i=u.x.multiply(e.y.subtract(n.y)),l=e.x.multiply(n.y.subtract(u.y)),c=x.add(i).add(l);return new y(1).divide(c).multiply(r.multiply(new d(1,t)))}function C(t,n,u,e){return c(A(B(t,n,u,e)),new y(1))}function D(n,u,e,r){const x=e.subtract(u),l=r.subtract(u),c=q(x,l),s=t(o(c,new y(P)),a(c,new y(-P)));return b([t(p(s),C(n.xy,u,e,r)),new y(-1)],[!0,()=>{const t=k(n,u,e),y=k(n,e,r),x=k(n,r,u);return i(i(t,y),x)}])}function E(t){return t.distance.add(1)}function F(t,n,y){const{viewMat3:u,tileMat3:e}=t.view,r=u.multiply(e),x=r.multiply(new d(n.pos,1)),i=r.multiply(new d(y.nextPos1,1)),l=r.multiply(new d(y.nextPos2,1));return D(t.hittestRequest.position,x.xy,i.xy,l.xy)}function G(t,n,y){return r(t,y).subtract(n)}function H(u,e,r,x){const i=u.x,l=u.y,s=e.x,a=e.y,d=r.x,o=r.y,b=x.x,m=x.y,f=b.subtract(d),v=i.subtract(d),j=s.subtract(i),z=m.subtract(o),h=l.subtract(o),M=a.subtract(l),P=z.multiply(j).subtract(f.multiply(M)),q=f.multiply(h).subtract(z.multiply(v)).divide(P),R=j.multiply(h).subtract(M.multiply(v)).divide(P),k=t(p(c(P,new y(0))),t(t(n(q,new y(0)),g(q,new y(1))),t(n(R,new y(0)),g(R,new y(1)))));return w(k,new y(1),new y(0))}function I(y,u,e,r,x){return t(t(n(y.x,u),n(y.y,e)),t(o(y.x,r),g(y.y,x)))}function J(n,u,e,r){const d=r.xy,o=r.zw,b=new x(o.x,d.y),p=new x(d.x,o.y),m=i(d.x,o.x),f=i(d.y,o.y),v=l(d.x,o.x),j=l(d.y,o.y),z=B(new x(m,f),n,u,e),g=B(new x(v,j),n,u,e),P=B(new x(m,j),n,u,e),q=B(new x(v,f),n,u,e),R=t(c(A(z),new y(1)),t(c(A(g),new y(1)),t(c(A(P),new y(1)),c(A(q),new y(1))))),k=H(d,b,n.xy,u.xy).add(H(b,o,n.xy,u.xy)).add(H(p,o,n.xy,u.xy)).add(H(p,d,n.xy,u.xy)),C=H(d,b,n.xy,e.xy).add(H(b,o,n.xy,e.xy)).add(H(p,o,n.xy,e.xy)).add(H(p,d,n.xy,e.xy)),D=H(d,b,u.xy,e.xy).add(H(b,o,u.xy,e.xy)).add(H(p,o,u.xy,e.xy)).add(H(p,d,u.xy,e.xy)),E=I(n.xy,m,f,v,j),F=I(u.xy,m,f,v,j),G=I(e.xy,m,f,v,j),J=t(E,t(F,G)),K=s(a(k,new y(0)),s(a(C,new y(0)),a(D,new y(0))));return w(s(K,R),new y(M),w(J,new y(h),new y(0)))}function K(u){return t(n(u.tlbr.x,new y(0)),n(u.tlbr.y,new y(0)),n(u.tlbr.z,new y(0)),n(u.tlbr.w,new y(0)))}export{k as distPointSegment,D as distPointTriangle,E as failHittest,F as hittestFill,G as hittestMarker,J as hittestScreenRect,A as inTriangle,K as isRectHittest,I as pointInRect,R as projectScalar,H as segmentIntersects,B as xyToBarycentric};