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

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 (720) hide show
  1. package/AttributeBinsGraphic.js +1 -1
  2. package/Basemap.js +1 -1
  3. package/Camera.js +1 -1
  4. package/CameraLayout.js +1 -1
  5. package/Graphic.js +1 -1
  6. package/Ground.js +1 -1
  7. package/Map.js +1 -1
  8. package/PopupTemplate.js +1 -1
  9. package/WebDocument2D.js +1 -1
  10. package/WebScene.js +1 -1
  11. package/analysis/Analysis.js +1 -1
  12. package/analysis/DimensionSimpleStyle.js +1 -1
  13. package/analysis/ElevationProfileAnalysis.d.ts +4 -0
  14. package/analysis/ElevationProfileAnalysis.js +5 -0
  15. package/analysis/ElevationProfileLine.d.ts +4 -0
  16. package/analysis/ElevationProfileLine.js +5 -0
  17. package/analysis/ElevationProfileLineChartOptions.d.ts +4 -0
  18. package/analysis/ElevationProfileLineChartOptions.js +5 -0
  19. package/analysis/ElevationProfileLineGround.d.ts +4 -0
  20. package/analysis/ElevationProfileLineGround.js +5 -0
  21. package/analysis/ElevationProfileLineInput.d.ts +4 -0
  22. package/analysis/ElevationProfileLineInput.js +5 -0
  23. package/analysis/ElevationProfileLineQuery.d.ts +4 -0
  24. package/analysis/ElevationProfileLineQuery.js +5 -0
  25. package/analysis/ElevationProfileLineScene.d.ts +4 -0
  26. package/analysis/ElevationProfileLineScene.js +5 -0
  27. package/analysis/ElevationProfileLineViewOptions.d.ts +4 -0
  28. package/analysis/ElevationProfileLineViewOptions.js +5 -0
  29. package/analysis/ElevationProfileUnits.d.ts +4 -0
  30. package/analysis/ElevationProfileUnits.js +5 -0
  31. package/analysis/LengthDimension.js +1 -1
  32. package/analysis/LineOfSightAnalysisObserver.js +1 -1
  33. package/analysis/LineOfSightAnalysisTarget.js +1 -1
  34. package/analysis/SlicePlane.js +1 -1
  35. package/analysis/Viewshed.js +1 -1
  36. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  37. package/analysis/support/AnalysisOriginWebScene.js +1 -1
  38. package/analysis/support/elevationProfileLineTypes.js +5 -0
  39. package/arcade/arcadeAsyncRuntime.js +1 -1
  40. package/arcade/arcadeCompiler.js +1 -1
  41. package/arcade/arcadeRuntime.js +1 -1
  42. package/arcade/compilerUtils.js +5 -0
  43. package/arcade/containerUtils.js +1 -1
  44. package/arcade/featureSetUtils.js +1 -1
  45. package/arcade/functions/convertdirection.js +1 -1
  46. package/arcade/functions/date.js +1 -1
  47. package/arcade/functions/feature.js +1 -1
  48. package/arcade/functions/featuresetbase.js +1 -1
  49. package/arcade/functions/featuresetgeom.js +1 -1
  50. package/arcade/functions/featuresetstring.js +1 -1
  51. package/arcade/functions/fieldStats.js +1 -1
  52. package/arcade/functions/geomasync.js +1 -1
  53. package/arcade/functions/geometry.js +1 -1
  54. package/arcade/functions/geomsync.js +1 -1
  55. package/arcade/functions/knowledgegraph.js +1 -1
  56. package/arcade/functions/maths.js +1 -1
  57. package/arcade/functions/string.js +1 -1
  58. package/arcade/functions/track.js +1 -1
  59. package/arcade/geometry/functions.js +1 -1
  60. package/arcade/languageUtils.js +1 -1
  61. package/arcade.js +1 -1
  62. package/assets/esri/core/workers/RemoteClient.js +1 -1
  63. package/assets/esri/core/workers/chunks/02435c653064f879f547.js +1 -0
  64. package/assets/esri/core/workers/chunks/040a233ce6fbcc061cdb.js +1 -0
  65. package/assets/esri/core/workers/chunks/{4930bf8f57f481f3a4a3.js → 053086e0a043b00f1cca.js} +1 -1
  66. package/assets/esri/core/workers/chunks/05d6ccca0cf38c012873.js +1 -0
  67. package/assets/esri/core/workers/chunks/06bd2f5358c6b85d5420.js +1 -0
  68. package/assets/esri/core/workers/chunks/0801f9dde41ec5f36cca.js +1 -0
  69. package/assets/esri/core/workers/chunks/08b4a4c9f3d6478df40a.js +1 -0
  70. package/assets/esri/core/workers/chunks/0906f977d50b1c5d6ed5.js +1 -0
  71. package/assets/esri/core/workers/chunks/170fa807b71babedd185.js +1 -0
  72. package/assets/esri/core/workers/chunks/183130521210c855c565.js +1 -0
  73. package/assets/esri/core/workers/chunks/{ce8f0ed9179c0d314df8.js → 1a5ddb6d36249fe09cc8.js} +1 -1
  74. package/assets/esri/core/workers/chunks/1c87ed3a5960f8f06fc8.js +1 -0
  75. package/assets/esri/core/workers/chunks/1c8dbdb833a66f7183fc.js +1 -0
  76. package/assets/esri/core/workers/chunks/2177c0ef06c8e7e3e28e.js +1 -0
  77. package/assets/esri/core/workers/chunks/{a82d7e2eecfe654a65de.js → 21ea48186d01bf459ef6.js} +1 -1
  78. package/assets/esri/core/workers/chunks/23e0fd2d921f74834b12.js +1 -0
  79. package/assets/esri/core/workers/chunks/2b9c403f4b20b8f62804.js +1 -0
  80. package/assets/esri/core/workers/chunks/2d7bbd001b64138db3c1.js +1 -0
  81. package/assets/esri/core/workers/chunks/2f52a57e8c05a3ca1de8.js +1 -0
  82. package/assets/esri/core/workers/chunks/307df66d00ba5f88780d.js +1 -0
  83. package/assets/esri/core/workers/chunks/33aafaabea07b4f80209.js +1 -0
  84. package/assets/esri/core/workers/chunks/{55a763662bad03ae6bae.js → 36d15d1dd19417b37d2f.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{ddaaff5d6036a5eed50f.js → 44116cf0bd4d6a127c96.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{d6b2ab614f308db50c4a.js → 47cdd5a6351e0db3b2e9.js} +10 -10
  87. package/assets/esri/core/workers/chunks/4c54239974a5847b8fdd.js +1 -0
  88. package/assets/esri/core/workers/chunks/4c7162883b228db563c6.js +1 -0
  89. package/assets/esri/core/workers/chunks/4c77102f083198ae2a6a.js +1 -0
  90. package/assets/esri/core/workers/chunks/4d2dcd667b30a98dd341.js +1 -0
  91. package/assets/esri/core/workers/chunks/4ff7c8420c77256f595a.js +1 -0
  92. package/assets/esri/core/workers/chunks/{82c10f2418e2f754388c.js → 50f56b417992eb30243e.js} +1 -1
  93. package/assets/esri/core/workers/chunks/5228f535719f5fc38b28.js +1 -0
  94. package/assets/esri/core/workers/chunks/{bd6c6acf23db2a2e8ef8.js → 53e166944a42af027345.js} +1 -1
  95. package/assets/esri/core/workers/chunks/54a686643e1ec1ea00ac.js +1 -0
  96. package/assets/esri/core/workers/chunks/568f49f9e50c505b2736.js +1 -0
  97. package/assets/esri/core/workers/chunks/56aafa6f8862629070d8.js +1 -0
  98. package/assets/esri/core/workers/chunks/5c5509147bda78ce338a.js +1 -0
  99. package/assets/esri/core/workers/chunks/{9742804f8ee350bf8052.js → 5c5678b15b59f9964bf0.js} +1 -1
  100. package/assets/esri/core/workers/chunks/5cdeb6dc72f452d6d1bc.js +1 -0
  101. package/assets/esri/core/workers/chunks/5d4e74eb4c659e8f42d6.js +1 -0
  102. package/assets/esri/core/workers/chunks/{b89aacec211c66e3a011.js → 5d8c64693830506c8776.js} +1 -1
  103. package/assets/esri/core/workers/chunks/5fac0b2a5aa33e8a3a84.js +1 -0
  104. package/assets/esri/core/workers/chunks/64553b5eae4edc7f46dc.js +1 -0
  105. package/assets/esri/core/workers/chunks/67627b1965b27b2f1857.js +1 -0
  106. package/assets/esri/core/workers/chunks/{0e7e4426daba4a008849.js → 68edbc3b124eb8e28dd6.js} +1 -1
  107. package/assets/esri/core/workers/chunks/69dc5a7abc1fda2474ad.js +1 -0
  108. package/assets/esri/core/workers/chunks/{d6eff6cc30acdca04835.js → 6c167daf115cd6abb3e5.js} +1 -1
  109. package/assets/esri/core/workers/chunks/6f122e4a2a1f913523b4.js +1 -0
  110. package/assets/esri/core/workers/chunks/{1dc410bc070cabb7198d.js → 72e0fda211d980572292.js} +1 -1
  111. package/assets/esri/core/workers/chunks/761dab8780495286ec4e.js +1 -0
  112. package/assets/esri/core/workers/chunks/7641e24ffa0215d51c34.js +1 -0
  113. package/assets/esri/core/workers/chunks/7e9d5beca1991c961ed8.js +1 -0
  114. package/assets/esri/core/workers/chunks/826e4bf6374f324d7f19.js +1 -0
  115. package/assets/esri/core/workers/chunks/{69d44e08861fb8cdd954.js → 82de1b50ae286f1e6c44.js} +1 -1
  116. package/assets/esri/core/workers/chunks/860bd6d6f0c74ca301a4.js +1 -0
  117. package/assets/esri/core/workers/chunks/8e7dced4a8d089185c3a.js +1 -0
  118. package/assets/esri/core/workers/chunks/{7d25f57299c642e727a6.js → 938baf4f99332dfdf29d.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{0ec7b5f1a614a86ad3db.js → 948ecf0bfbc886ec3b52.js} +1 -1
  120. package/assets/esri/core/workers/chunks/9a4d0006c118ae5b45c0.js +1 -0
  121. package/assets/esri/core/workers/chunks/a1591d7f82e06cab5de4.js +1 -0
  122. package/assets/esri/core/workers/chunks/a44f17397d8589433dae.js +1 -0
  123. package/assets/esri/core/workers/chunks/a76792c4edd1d688fba2.js +1 -0
  124. package/assets/esri/core/workers/chunks/ada46055fafb8ae21dbe.js +1 -0
  125. package/assets/esri/core/workers/chunks/ae667084cb6a08b97c37.js +1 -0
  126. package/assets/esri/core/workers/chunks/{7b1d14a921d30c95d68b.js → afb51b8562f8cb29b97e.js} +1 -1
  127. package/assets/esri/core/workers/chunks/{b00ad853fa4826d0ceb3.js → b12c44faa1efa60067b0.js} +1 -1
  128. package/assets/esri/core/workers/chunks/{c9fe9792312f0161ef5a.js → b1b6300451cc4ccefd46.js} +1 -1
  129. package/assets/esri/core/workers/chunks/b2f2c1108fb7cbdd1a68.js +1 -0
  130. package/assets/esri/core/workers/chunks/{37bfc1a771792b6697fd.js → b3466edccd553ae0a5d0.js} +2 -2
  131. package/assets/esri/core/workers/chunks/b45dbbeae54cea2bbc10.js +1 -0
  132. package/assets/esri/core/workers/chunks/b49b73e2d0d643dfa351.js +1 -0
  133. package/assets/esri/core/workers/chunks/b810e2f87c9c59ae04b1.js +1 -0
  134. package/assets/esri/core/workers/chunks/{20a96c17d1a117dfdf77.js → b8c1a08020d44ee03a17.js} +1 -1
  135. package/assets/esri/core/workers/chunks/bb0c5275e51d170ac795.js +1 -0
  136. package/assets/esri/core/workers/chunks/{7a4730c1e6a5355b7a05.js → bb1213adeb05d89fbfdb.js} +1 -1
  137. package/assets/esri/core/workers/chunks/bd1ba44362b967977003.js +1 -0
  138. package/assets/esri/core/workers/chunks/c18ac2018aea6ba97eec.js +1 -0
  139. package/assets/esri/core/workers/chunks/c3d3e55abf01dae271fb.js +1 -0
  140. package/assets/esri/core/workers/chunks/c5c9f0c8da5f7bf41728.js +1 -0
  141. package/assets/esri/core/workers/chunks/{4784af2b04fafacfcc1b.js → c6077a893d5b5c34a46c.js} +1 -1
  142. package/assets/esri/core/workers/chunks/c78d98ab82f31ddda362.js +1 -0
  143. package/assets/esri/core/workers/chunks/ca5f63c0297612059486.js +1 -0
  144. package/assets/esri/core/workers/chunks/cab294fd04f2a5eda81d.js +1 -0
  145. package/assets/esri/core/workers/chunks/cca36750c86352c6d1f9.js +1 -0
  146. package/assets/esri/core/workers/chunks/ccf3f29d0b1bde90c3cf.js +1 -0
  147. package/assets/esri/core/workers/chunks/cd9e6b86ab0103044370.js +1 -0
  148. package/assets/esri/core/workers/chunks/ce211163d078d3d742ce.js +1 -0
  149. package/assets/esri/core/workers/chunks/{0ca8d6516323fc28dd58.js → cf1f8fd1d62be0e02e10.js} +1 -1
  150. package/assets/esri/core/workers/chunks/d16484b389d56a43d204.js +1 -0
  151. package/assets/esri/core/workers/chunks/d54e18e0f30734610f35.js +1 -0
  152. package/assets/esri/core/workers/chunks/d7ec905d87a19a1061e7.js +1 -0
  153. package/assets/esri/core/workers/chunks/{e9a366c225b0687293e3.js → d80e26a1f4a61b1c4cf9.js} +1 -1
  154. package/assets/esri/core/workers/chunks/{eec36628e638e244f452.js → ddeaf688d72b2873c4ac.js} +1 -1
  155. package/assets/esri/core/workers/chunks/debd832b6c2c0b2ea362.js +1 -0
  156. package/assets/esri/core/workers/chunks/dfa3ad5d750d7b143a06.js +1 -0
  157. package/assets/esri/core/workers/chunks/dfc5936fbbd26f27a92a.js +1 -0
  158. package/assets/esri/core/workers/chunks/e01fa6389bd0b1ae51a5.js +1 -0
  159. package/assets/esri/core/workers/chunks/e4d08a85d158c705aa3d.js +1 -0
  160. package/assets/esri/core/workers/chunks/e59fdb8f625e9080f097.js +1 -0
  161. package/assets/esri/core/workers/chunks/ed1cd90e899dc9c15ee3.js +1 -0
  162. package/assets/esri/core/workers/chunks/ee28cd411a93245fb90c.js +1 -0
  163. package/assets/esri/core/workers/chunks/{41071e672dcddec47492.js → f4e9640306f64b1af7a3.js} +1 -1
  164. package/assets/esri/core/workers/chunks/f5bb7c90f48cae594bc3.js +1 -0
  165. package/assets/esri/core/workers/chunks/f79c9b37f2842ed88a9b.js +1 -0
  166. package/assets/esri/core/workers/chunks/f88fe2e8fbc763bdc940.js +1 -0
  167. package/assets/esri/core/workers/chunks/faa0cfee8c1de9b5b78c.js +1 -0
  168. package/assets/esri/core/workers/chunks/fae53d825dd9fef0426c.js +1 -0
  169. package/chunks/TimeInterval.js +1 -1
  170. package/chunks/arcade.js +1 -1
  171. package/chunks/array.js +1 -1
  172. package/chunks/languageUtils.js +1 -1
  173. package/config.js +1 -1
  174. package/copyright.txt +27 -0
  175. package/core/Clonable.d.ts +1 -1
  176. package/core/Clonable.js +1 -1
  177. package/core/Collection.js +1 -1
  178. package/core/Evented.d.ts +1 -1
  179. package/core/Evented.js +1 -1
  180. package/core/Identifiable.d.ts +1 -1
  181. package/core/Identifiable.js +1 -1
  182. package/core/Loadable.d.ts +1 -1
  183. package/core/Loadable.js +1 -1
  184. package/core/accessorSupport/ensureType.js +1 -1
  185. package/core/loadAll.js +1 -1
  186. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  187. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  188. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  189. package/effects/FocusArea.js +1 -1
  190. package/effects/FocusAreaOutline.js +1 -1
  191. package/effects/FocusAreas.js +1 -1
  192. package/form/elements/UtilityNetworkAssociationsElement.js +1 -1
  193. package/form/elements/inputs/attachments/Input.js +1 -1
  194. package/geometry/Mesh.js +1 -1
  195. package/geometry/support/DoubleArray.js +1 -1
  196. package/geometry/support/MeshComponent.js +1 -1
  197. package/geometry/support/MeshGeoreferencedVertexSpace.js +1 -1
  198. package/geometry/support/MeshLocalVertexSpace.js +1 -1
  199. package/geometry/support/MeshMaterial.js +1 -1
  200. package/geometry/support/MeshTexture.js +1 -1
  201. package/geometry/support/MeshTextureTransform.js +1 -1
  202. package/geometry/support/MeshTransform.js +1 -1
  203. package/geometry/support/MeshVertexAttributes.js +1 -1
  204. package/geometry/support/meshUtils/Metadata.js +1 -1
  205. package/graphic/GeoRSSGraphicOrigin.d.ts +4 -0
  206. package/graphic/GeoRSSGraphicOrigin.js +5 -0
  207. package/graphic/GraphicOrigin.js +1 -1
  208. package/graphic/KnowledgeGraphGraphicOrigin.d.ts +4 -0
  209. package/graphic/KnowledgeGraphGraphicOrigin.js +5 -0
  210. package/graphic/MapImageGraphicOrigin.d.ts +4 -0
  211. package/graphic/MapImageGraphicOrigin.js +5 -0
  212. package/graphic/MapNotesGraphicOrigin.d.ts +4 -0
  213. package/graphic/MapNotesGraphicOrigin.js +5 -0
  214. package/graphic/OrientedImageryGraphicOrigin.d.ts +4 -0
  215. package/graphic/OrientedImageryGraphicOrigin.js +5 -0
  216. package/graphic/ParquetGraphicOrigin.d.ts +4 -0
  217. package/graphic/ParquetGraphicOrigin.js +5 -0
  218. package/graphic/SubtypeGroupGraphicOrigin.d.ts +4 -0
  219. package/graphic/SubtypeGroupGraphicOrigin.js +5 -0
  220. package/graphic/TileGraphicOrigin.d.ts +4 -0
  221. package/graphic/TileGraphicOrigin.js +5 -0
  222. package/graphic/graphicOrigins.d.ts +8 -0
  223. package/graphic/graphicOrigins.js +1 -1
  224. package/{views/3d/terrain/RenderOrder.js → graphic/isGeoRSSGraphicOrigin.js} +1 -0
  225. package/graphic/isKnowledgeGraphGraphicOrigin.js +5 -0
  226. package/graphic/isMapImageGraphicOrigin.js +5 -0
  227. package/graphic/isMapNotesGraphicOrigin.js +5 -0
  228. package/graphic/isOrientedImageryGraphicOrigin.js +5 -0
  229. package/graphic/isParquetGraphicOrigin.js +5 -0
  230. package/graphic/isSubtypeGroupGraphicOrigin.js +5 -0
  231. package/graphic/isTileGraphicOrigin.js +5 -0
  232. package/identity/IdentityManagerBase.js +1 -1
  233. package/interfaces.d.ts +899 -50
  234. package/kernel.js +1 -1
  235. package/layers/CSVLayer.js +1 -1
  236. package/layers/FeatureLayer.js +1 -1
  237. package/layers/GeoJSONLayer.js +1 -1
  238. package/layers/ImageryLayer.js +1 -1
  239. package/layers/ImageryTileLayer.js +1 -1
  240. package/layers/Layer.js +1 -1
  241. package/layers/MapNotesLayer.js +1 -1
  242. package/layers/OGCFeatureLayer.js +1 -1
  243. package/layers/OrientedImageryLayer.js +1 -1
  244. package/layers/ParquetLayer.js +1 -1
  245. package/layers/SceneLayer.js +1 -1
  246. package/layers/StreamLayer.js +1 -1
  247. package/layers/SubtypeGroupLayer.js +1 -1
  248. package/layers/WCSLayer.js +1 -1
  249. package/layers/WFSLayer.js +1 -1
  250. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  251. package/layers/buildingSublayers/BuildingSublayer.js +1 -1
  252. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  253. package/layers/graphics/data/FeatureStore.js +1 -1
  254. package/layers/graphics/sources/CSVSource.js +1 -1
  255. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  256. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  257. package/layers/graphics/sources/MemorySource.js +1 -1
  258. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  259. package/layers/graphics/sources/ParquetSource.js +1 -1
  260. package/layers/graphics/sources/WFSSource.js +1 -1
  261. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  262. package/layers/mixins/EditBusLayer.js +1 -1
  263. package/layers/orientedImagery/core/CameraOrientationHPR.js +1 -1
  264. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  265. package/layers/orientedImagery/core/CameraOrientationOPK.js +1 -1
  266. package/layers/orientedImagery/core/CameraOrientationYPR.js +1 -1
  267. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
  268. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  269. package/layers/support/BuildingSummaryStatistics.js +1 -1
  270. package/layers/support/ControlPointsGeoreference.js +1 -1
  271. package/layers/support/DisplayFilter.js +1 -1
  272. package/layers/support/DisplayFilterInfo.js +1 -1
  273. package/layers/support/EditFieldsInfo.js +1 -1
  274. package/layers/support/ExpressionInfo.js +1 -1
  275. package/layers/support/FeatureIndex.js +1 -1
  276. package/layers/support/FeatureTemplate.js +1 -1
  277. package/layers/support/FeatureType.js +1 -1
  278. package/layers/support/GeometryFieldsInfo.js +1 -1
  279. package/layers/support/GeoreferenceBase.js +1 -1
  280. package/layers/support/KMLSublayer.js +1 -1
  281. package/layers/support/LayerContingentValuesCache.js +1 -1
  282. package/layers/support/LocalMediaElementSource.js +1 -1
  283. package/layers/support/MediaElementBase.js +1 -1
  284. package/layers/support/PlaybackInfo.js +1 -1
  285. package/layers/support/PromiseQueue.js +1 -1
  286. package/layers/support/Relationship.js +1 -1
  287. package/layers/support/StreamConnection.js +1 -1
  288. package/layers/support/Sublayer.js +1 -1
  289. package/layers/support/Subtype.js +1 -1
  290. package/layers/support/SubtypeSublayer.js +1 -1
  291. package/layers/support/TelemetryData.js +1 -1
  292. package/layers/support/TelemetryDisplay.js +1 -1
  293. package/layers/support/TimeInfo.js +1 -1
  294. package/layers/support/TrackInfo.js +1 -1
  295. package/layers/support/TrackPartInfo.js +1 -1
  296. package/layers/support/VideoFrame.js +1 -1
  297. package/layers/support/VideoTimeExtent.js +1 -1
  298. package/layers/support/WMSSublayer.js +1 -1
  299. package/layers/voxel/VoxelColorStop.js +1 -1
  300. package/layers/voxel/VoxelDynamicSection.js +1 -1
  301. package/layers/voxel/VoxelIsosurface.js +1 -1
  302. package/layers/voxel/VoxelOpacityStop.js +1 -1
  303. package/layers/voxel/VoxelRangeFilter.js +1 -1
  304. package/layers/voxel/VoxelSection.js +1 -1
  305. package/layers/voxel/VoxelSlice.js +1 -1
  306. package/layers/voxel/VoxelTransferFunctionStyle.js +1 -1
  307. package/layers/voxel/VoxelUniqueValue.js +1 -1
  308. package/linkChart/ChronologicalLayoutSettings.js +1 -1
  309. package/linkChart/LayoutSettings.js +1 -1
  310. package/linkChart/LinkChartProperties.js +1 -1
  311. package/linkChart/NonspatialDataDisplay.js +1 -1
  312. package/linkChart/OrganicLayoutSettings.js +1 -1
  313. package/networks/Network.js +1 -1
  314. package/networks/RulesTable.js +1 -1
  315. package/networks/UtilityNetwork.js +1 -1
  316. package/networks/support/NetworkSystemLayers.js +1 -1
  317. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  318. package/package.json +1 -1
  319. package/popup/content/AttachmentsContent.js +1 -1
  320. package/popup/content/RelationshipContent.js +1 -1
  321. package/popup/content/UtilityNetworkAssociationsContent.js +1 -1
  322. package/popup/support/AttachmentsOrderByInfo.js +1 -1
  323. package/popup/support/FieldInfoFormat.js +1 -1
  324. package/popup/support/UtilityNetworkAssociationType.js +1 -1
  325. package/portal/Portal.js +1 -1
  326. package/portal/PortalItem.js +1 -1
  327. package/renderers/PieChartRenderer.js +1 -1
  328. package/renderers/support/HeatmapLegendOptions.js +1 -1
  329. package/renderers/support/OthersCategory.js +1 -1
  330. package/renderers/support/RasterPresetRenderer.js +1 -1
  331. package/renderers/support/RendererLegendOptions.js +1 -1
  332. package/renderers/support/UniqueValue.js +1 -1
  333. package/renderers/support/UniqueValueClass.js +1 -1
  334. package/renderers/support/UniqueValueGroup.js +1 -1
  335. package/renderers/visualVariables/support/VisualVariableLegendOptions.js +1 -1
  336. package/rest/featureService/FeatureService.js +1 -1
  337. package/rest/support/AttributeBinsFeatureSet.js +1 -1
  338. package/rest/support/AttributeBinsGrouping.js +1 -1
  339. package/rest/support/AttributeBinsQuery.js +1 -1
  340. package/rest/support/BinParametersBase.js +1 -1
  341. package/rest/support/ClosestFacilityParameters.js +1 -1
  342. package/rest/support/DataLayer.js +1 -1
  343. package/rest/support/DateBinTimeInterval.js +1 -1
  344. package/rest/support/DirectionLine.js +1 -1
  345. package/rest/support/DirectionPoint.js +1 -1
  346. package/rest/support/FindImagesParameters.js +1 -1
  347. package/rest/support/FullTextSearch.js +1 -1
  348. package/rest/support/ImageBoundaryParameters.js +1 -1
  349. package/rest/support/ImageGPSInfoParameters.js +1 -1
  350. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  351. package/rest/support/ImageToMapParameters.js +1 -1
  352. package/rest/support/ImageUrlParameters.js +1 -1
  353. package/rest/support/ImageVolumeParameters.js +1 -1
  354. package/rest/support/MapToImageParameters.js +1 -1
  355. package/rest/support/NetworkUrl.js +1 -1
  356. package/rest/support/PointBarrier.js +1 -1
  357. package/rest/support/PolygonBarrier.js +1 -1
  358. package/rest/support/PolylineBarrier.js +1 -1
  359. package/rest/support/RouteInfo.js +1 -1
  360. package/rest/support/RouteParameters.js +1 -1
  361. package/rest/support/ServiceAreaParameters.js +1 -1
  362. package/rest/support/Stop.js +1 -1
  363. package/rest/support/TravelMode.js +1 -1
  364. package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
  365. package/smartMapping/support/adapters/LayerAdapter.js +1 -1
  366. package/support/actions/ActionBase.js +1 -1
  367. package/support/revision.js +1 -1
  368. package/symbols/LineStyleMarker3D.js +1 -1
  369. package/symbols/PathSymbol3DLayer.js +1 -1
  370. package/symbols/support/ElevationInfo.js +1 -1
  371. package/symbols/support/Symbol3DTextBackground.js +1 -1
  372. package/symbols/support/previewSymbol3D.js +1 -1
  373. package/tables/elements/AttributeTableAttachmentElement.js +1 -1
  374. package/tables/elements/AttributeTableFieldElement.js +1 -1
  375. package/tables/elements/AttributeTableGroupElement.js +1 -1
  376. package/tables/elements/AttributeTableRelationshipElement.js +1 -1
  377. package/tables/support/FieldOrder.js +1 -1
  378. package/undoredo/support/Services.js +1 -1
  379. package/versionManagement/VersionManagementService.js +1 -1
  380. package/versionManagement/VersioningState.js +1 -1
  381. package/views/2d/constraints/GeometryConstraint.js +1 -1
  382. package/views/2d/constraints/RotationConstraint.js +1 -1
  383. package/views/2d/constraints/ZoomConstraint.js +1 -1
  384. package/views/2d/engine/DisplayObject.js +1 -1
  385. package/views/2d/engine/ManagedCanvas.js +1 -1
  386. package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
  387. package/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial.js +1 -1
  388. package/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial.js +1 -1
  389. package/views/2d/engine/vectorTiles/shaders/VTLFillMaterial.js +1 -1
  390. package/views/2d/engine/vectorTiles/shaders/VTLLineMaterial.js +1 -1
  391. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  392. package/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial.js +1 -1
  393. package/views/2d/engine/webgl/Profiler.js +1 -1
  394. package/views/2d/engine/webgl/TextureManager.js +1 -1
  395. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  396. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  397. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  398. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  399. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  400. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  401. package/views/2d/layers/StreamLayerView2D.js +1 -1
  402. package/views/2d/layers/features/FeatureSourceEventLog.js +1 -1
  403. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  404. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  405. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  406. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  407. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  408. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  409. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  410. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  411. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  412. package/views/2d/layers/features/processor/AAggregateStrategy.js +1 -1
  413. package/views/2d/layers/features/schema/processor/LabelMatcherSchema.js +1 -1
  414. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  415. package/views/2d/layers/features/schema/processor/SubtypeProcessorSchema.js +1 -1
  416. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  417. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  418. package/views/2d/layers/features/support/TileStore.js +1 -1
  419. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  420. package/views/2d/layers/support/RouteLayerInteraction.js +1 -1
  421. package/views/3d/FocusAreasView.js +1 -1
  422. package/views/3d/analysis/AnalysisViewManager3D.js +1 -1
  423. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  424. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +4 -0
  425. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +5 -0
  426. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  427. package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
  428. package/views/3d/analysis/Slice/SliceController.js +1 -1
  429. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  430. package/views/3d/constraints/AltitudeConstraint.js +1 -1
  431. package/views/3d/constraints/ClipDistanceConstraint.js +1 -1
  432. package/views/3d/constraints/Constraints.js +1 -1
  433. package/views/3d/constraints/TiltConstraint.js +1 -1
  434. package/views/3d/environment/Clouds.js +1 -1
  435. package/views/3d/environment/CloudsRenderer.js +1 -1
  436. package/views/3d/environment/EnvironmentManager.js +1 -1
  437. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  438. package/views/3d/environment/SunLighting.js +1 -1
  439. package/views/3d/environment/VirtualLighting.js +1 -1
  440. package/views/3d/interactive/Manipulator3D.js +1 -1
  441. package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
  442. package/views/3d/interactive/editingTools/ManipulatedObject3DMediaElement.js +1 -1
  443. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  444. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  445. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  446. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  447. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  448. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  449. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  450. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  451. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
  452. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  453. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  454. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  455. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  456. package/views/3d/layers/FlowSubView3D.js +1 -1
  457. package/views/3d/layers/GraphicsView3D.js +1 -1
  458. package/views/3d/layers/GraphicsView3DDummyLayer.js +5 -0
  459. package/views/3d/layers/I3SMeshView3D.js +1 -1
  460. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  461. package/views/3d/layers/SceneLayerWorker.js +1 -1
  462. package/views/3d/layers/TiledLayerView3D.js +1 -1
  463. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  464. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  465. package/views/3d/layers/graphics/GraphicState.js +1 -1
  466. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  467. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  468. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  469. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  470. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  471. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  472. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  473. package/views/3d/layers/graphics/Labeler.js +1 -1
  474. package/views/3d/layers/graphics/StreamController.js +1 -1
  475. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  476. package/views/3d/layers/graphics/pipeline/featureSet/TiledFeatureStore.js +1 -1
  477. package/views/3d/layers/i3s/I3SAsyncElevationUpdater.js +1 -1
  478. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  479. package/views/3d/layers/i3s/I3SFrameTask.js +1 -1
  480. package/views/3d/layers/i3s/I3SGraphicsMap.js +1 -1
  481. package/views/3d/layers/i3s/I3SQueryFeatureStore.js +1 -1
  482. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  483. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  484. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  485. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  486. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  487. package/views/3d/state/ViewState.js +1 -1
  488. package/views/3d/support/CombinedElevationProvider.js +1 -1
  489. package/views/3d/support/EventedSet.js +1 -1
  490. package/views/3d/support/GraphicsMap.js +1 -1
  491. package/views/3d/support/LimitGraphicsMap.js +1 -1
  492. package/views/3d/support/StreamDataLoader.js +1 -1
  493. package/views/3d/support/flow/geometryUtils.js +1 -1
  494. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  495. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  496. package/views/3d/support/pointsOfInterest/ContentGeometryUpdates.js +1 -1
  497. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  498. package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
  499. package/views/3d/terrain/OverlayManager.js +1 -1
  500. package/views/3d/terrain/OverlayRenderer.js +1 -1
  501. package/views/3d/terrain/TerrainRenderer.js +1 -1
  502. package/views/3d/terrain/TerrainSurface.js +1 -1
  503. package/views/3d/terrain/tileUtils.js +1 -1
  504. package/views/3d/webgl-engine/Stage.js +1 -1
  505. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  506. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  507. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  508. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  509. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  510. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  511. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  512. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  513. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  514. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  515. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  516. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  517. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  518. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  519. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  520. package/views/SceneView.js +1 -1
  521. package/views/SelectionManager.js +1 -1
  522. package/views/Theme.js +1 -1
  523. package/views/VideoView.js +1 -1
  524. package/views/View.js +1 -1
  525. package/views/analysis/ElevationProfileResult.d.ts +4 -0
  526. package/views/analysis/ElevationProfileResult.js +5 -0
  527. package/views/draw/DrawAction.js +1 -1
  528. package/views/draw/DrawGraphicTool.js +1 -1
  529. package/views/draw/DrawManipulator.js +1 -1
  530. package/views/draw/DrawOperation.js +1 -1
  531. package/views/draw/support/Box.js +1 -1
  532. package/views/draw/support/GraphicMover.js +1 -1
  533. package/views/draw/support/Reshape.js +1 -1
  534. package/views/interactive/GraphicManipulator.js +1 -1
  535. package/views/interactive/InteractiveToolBase.js +1 -1
  536. package/views/interactive/Tooltip.js +1 -1
  537. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  538. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  539. package/views/interactive/snapping/SnappingManager.js +1 -1
  540. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  541. package/views/layers/LayerView.js +1 -1
  542. package/views/support/GroundViewElevationSampler.js +1 -1
  543. package/views/support/ScheduledQueueProcessor.js +1 -1
  544. package/views/support/Scheduler.js +1 -1
  545. package/views/ui/UI.js +1 -1
  546. package/webdoc/GeotriggersInfo.js +1 -1
  547. package/webdoc/IPSInfo.js +1 -1
  548. package/webdoc/geotriggersInfo/DeviceLocationFeed.js +1 -1
  549. package/webdoc/geotriggersInfo/ExpressionInfo.js +1 -1
  550. package/webdoc/geotriggersInfo/FeatureFenceParameters.js +1 -1
  551. package/webdoc/geotriggersInfo/FeatureFilter.js +1 -1
  552. package/webdoc/geotriggersInfo/FeatureLayerSource.js +1 -1
  553. package/webdoc/geotriggersInfo/Geotrigger.js +1 -1
  554. package/webdoc/geotriggersInfo/GeotriggerNotificationOptions.js +1 -1
  555. package/webdoc/ips/AppleIPSProperties.js +1 -1
  556. package/webdoc/ips/Configuration.js +1 -1
  557. package/webdoc/ips/GNSSProperties.js +1 -1
  558. package/webdoc/ips/PathSnappingProperties.js +1 -1
  559. package/webdoc/ips/PositioningService.js +1 -1
  560. package/webdoc/ips/SmoothingProperties.js +1 -1
  561. package/webmap/Bookmark.js +1 -1
  562. package/webmap/InitialViewProperties.js +1 -1
  563. package/webscene/InitialViewProperties.js +1 -1
  564. package/webscene/Presentation.js +1 -1
  565. package/webscene/Slide.js +1 -1
  566. package/webscene/SlideLegendInfo.js +1 -1
  567. package/webscene/support/Description.js +1 -1
  568. package/webscene/support/FeatureReference.js +1 -1
  569. package/webscene/support/FeatureReferenceId.js +1 -1
  570. package/webscene/support/LayerReference.js +1 -1
  571. package/webscene/support/SlideElements.js +1 -1
  572. package/webscene/support/SlideEnvironment.js +1 -1
  573. package/webscene/support/SlideGround.js +1 -1
  574. package/webscene/support/SlidePopupInfo.js +1 -1
  575. package/webscene/support/SlideVisibleLayer.js +1 -1
  576. package/webscene/support/Title.js +1 -1
  577. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  578. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  579. package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
  580. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  581. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  582. package/widgets/BasemapLayerList.js +1 -1
  583. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  584. package/widgets/BatchAttributeForm/templates/ElementTemplateBase.js +1 -1
  585. package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
  586. package/widgets/Bookmarks.js +1 -1
  587. package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
  588. package/widgets/CatalogLayerList.js +1 -1
  589. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  590. package/widgets/Daylight/DaylightViewModel.js +1 -1
  591. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  592. package/widgets/Directions/DirectionsViewModel.js +1 -1
  593. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  594. package/widgets/Editor/EditorViewModel.js +1 -1
  595. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  596. package/widgets/Editor/Workflow.js +1 -1
  597. package/widgets/Editor/support/SketchController.js +1 -1
  598. package/widgets/ElevationProfile/ElevationProfileInteraction.js +1 -1
  599. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  600. package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
  601. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
  602. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
  603. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
  604. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  605. package/widgets/Feature/FeatureViewModel.js +1 -1
  606. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  607. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  608. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  609. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  610. package/widgets/FeatureTemplates/TemplateItemGroup.js +1 -1
  611. package/widgets/Home/HomeViewModel.js +1 -1
  612. package/widgets/LayerList/LayerListViewModel.js +1 -1
  613. package/widgets/LayerList/ListItem.js +1 -1
  614. package/widgets/LayerList/ListItemPanel.js +1 -1
  615. package/widgets/LayerList.js +1 -1
  616. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.js +1 -1
  617. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  618. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  619. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  620. package/widgets/OrientedImageryViewer/components/NavigationAction.js +1 -1
  621. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  622. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  623. package/widgets/Print/PrintViewModel.js +1 -1
  624. package/widgets/Search/SearchSource.js +1 -1
  625. package/widgets/Search/SearchViewModel.js +1 -1
  626. package/widgets/Sketch/SketchViewModel.js +1 -1
  627. package/widgets/Sketch/support/OperationHandle.js +1 -1
  628. package/widgets/TableList/ListItem.js +1 -1
  629. package/widgets/TableList/ListItemPanel.js +1 -1
  630. package/widgets/TableList/TableListViewModel.js +1 -1
  631. package/widgets/TableList.js +1 -1
  632. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  633. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  634. package/widgets/ValuePicker/ValuePickerViewModel.js +1 -1
  635. package/widgets/Widget.js +1 -1
  636. package/widgets/support/AnchorElementViewModel.js +1 -1
  637. package/widgets/support/GeolocationPositioning.js +1 -1
  638. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  639. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  640. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  641. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  642. package/assets/esri/core/workers/chunks/00870a35b254295bc408.js +0 -1
  643. package/assets/esri/core/workers/chunks/017adbbb77c9c9b4d49f.js +0 -1
  644. package/assets/esri/core/workers/chunks/038bd2fec9a91b5a949d.js +0 -1
  645. package/assets/esri/core/workers/chunks/086f3bc5938bf9a37274.js +0 -1
  646. package/assets/esri/core/workers/chunks/093de3942e1ead231990.js +0 -1
  647. package/assets/esri/core/workers/chunks/0997e09fe5b0aba1f804.js +0 -1
  648. package/assets/esri/core/workers/chunks/0f6207d84d15484a3181.js +0 -1
  649. package/assets/esri/core/workers/chunks/125fdea50620d4db2678.js +0 -1
  650. package/assets/esri/core/workers/chunks/15a5a89cd228a9364332.js +0 -1
  651. package/assets/esri/core/workers/chunks/173c5b8fa1ac7aa6e072.js +0 -1
  652. package/assets/esri/core/workers/chunks/20aed6e1d9b6bf06a398.js +0 -1
  653. package/assets/esri/core/workers/chunks/21246dfe99a4c5906f71.js +0 -1
  654. package/assets/esri/core/workers/chunks/221748295a5ec633177e.js +0 -1
  655. package/assets/esri/core/workers/chunks/2a695b50a384c45ace9a.js +0 -1
  656. package/assets/esri/core/workers/chunks/2ad63b8d6986ac21c398.js +0 -1
  657. package/assets/esri/core/workers/chunks/2de11a8e5d426c381991.js +0 -1
  658. package/assets/esri/core/workers/chunks/2df9bfddc737d89c94b8.js +0 -1
  659. package/assets/esri/core/workers/chunks/34ddb8da5c5c8533bd71.js +0 -1
  660. package/assets/esri/core/workers/chunks/3a7e43675163f7bed6ac.js +0 -1
  661. package/assets/esri/core/workers/chunks/3cd1ab26396052f17832.js +0 -1
  662. package/assets/esri/core/workers/chunks/40b0c5368b8322498189.js +0 -1
  663. package/assets/esri/core/workers/chunks/427deb82fae9c500b375.js +0 -1
  664. package/assets/esri/core/workers/chunks/4433c195c62a59739c06.js +0 -1
  665. package/assets/esri/core/workers/chunks/4ac6bf9ff1cfbde87c7b.js +0 -1
  666. package/assets/esri/core/workers/chunks/4b9003ddfe61dc3729f4.js +0 -1
  667. package/assets/esri/core/workers/chunks/4bb6148df66e62a5fcf0.js +0 -1
  668. package/assets/esri/core/workers/chunks/50f58b2a933b56effd70.js +0 -1
  669. package/assets/esri/core/workers/chunks/528212fb0474bdb2ec92.js +0 -1
  670. package/assets/esri/core/workers/chunks/5dba8c0c957becedf7f7.js +0 -1
  671. package/assets/esri/core/workers/chunks/6000a302369799ea42a6.js +0 -1
  672. package/assets/esri/core/workers/chunks/61aed9a292c981921869.js +0 -1
  673. package/assets/esri/core/workers/chunks/646227b500b92999f2c8.js +0 -1
  674. package/assets/esri/core/workers/chunks/674970c539d336a93ba1.js +0 -1
  675. package/assets/esri/core/workers/chunks/6aeff5908c41600a5dfc.js +0 -1
  676. package/assets/esri/core/workers/chunks/6c72e2c09ed62cb2fd79.js +0 -1
  677. package/assets/esri/core/workers/chunks/7099ff8dc699fedea931.js +0 -1
  678. package/assets/esri/core/workers/chunks/752eabfbed7b8b65cf3f.js +0 -1
  679. package/assets/esri/core/workers/chunks/773feb0e0fad26df57ef.js +0 -1
  680. package/assets/esri/core/workers/chunks/7848ea5ca13ec350779a.js +0 -1
  681. package/assets/esri/core/workers/chunks/7a4ec66a577f7f7996c5.js +0 -1
  682. package/assets/esri/core/workers/chunks/831d58235b8b9eb4cdc8.js +0 -1
  683. package/assets/esri/core/workers/chunks/90a0c1c5c851cc9b6d6d.js +0 -1
  684. package/assets/esri/core/workers/chunks/91d48c32bf11ad1405c8.js +0 -1
  685. package/assets/esri/core/workers/chunks/9228f760129e48585b54.js +0 -1
  686. package/assets/esri/core/workers/chunks/969a9edba4be8dcbcedd.js +0 -1
  687. package/assets/esri/core/workers/chunks/9a54c96b48e94d816881.js +0 -1
  688. package/assets/esri/core/workers/chunks/aa12ba96fb8c91105473.js +0 -1
  689. package/assets/esri/core/workers/chunks/aaf696a1026de569c82d.js +0 -1
  690. package/assets/esri/core/workers/chunks/acb95ae6203f708d71b4.js +0 -1
  691. package/assets/esri/core/workers/chunks/b28855db6a30d4d4f348.js +0 -1
  692. package/assets/esri/core/workers/chunks/b4bbd38df56e57783cc0.js +0 -1
  693. package/assets/esri/core/workers/chunks/ba29c535128c4e8ae2d3.js +0 -1
  694. package/assets/esri/core/workers/chunks/c038472cb7f60af9426e.js +0 -1
  695. package/assets/esri/core/workers/chunks/c0718a0461839be41a2a.js +0 -1
  696. package/assets/esri/core/workers/chunks/c0aee315b6218d6456cd.js +0 -1
  697. package/assets/esri/core/workers/chunks/c0ec1600a86bb9a848d4.js +0 -1
  698. package/assets/esri/core/workers/chunks/c1e5e2a6e7e2d7a1d63c.js +0 -1
  699. package/assets/esri/core/workers/chunks/c30adbead0ba4722acf9.js +0 -1
  700. package/assets/esri/core/workers/chunks/c9b11c7170c99f9e0e93.js +0 -1
  701. package/assets/esri/core/workers/chunks/ca88859fc69fcb4568c0.js +0 -1
  702. package/assets/esri/core/workers/chunks/cc3ca1729af33688c1e3.js +0 -1
  703. package/assets/esri/core/workers/chunks/cde79c3644166d4798a8.js +0 -1
  704. package/assets/esri/core/workers/chunks/d092a4b8fe3d37a6333d.js +0 -1
  705. package/assets/esri/core/workers/chunks/d6a188a7d55db69ba30b.js +0 -1
  706. package/assets/esri/core/workers/chunks/d7172dc531b4548a8c60.js +0 -1
  707. package/assets/esri/core/workers/chunks/d88935ae5669d14c5b29.js +0 -1
  708. package/assets/esri/core/workers/chunks/d9045b964f536695840b.js +0 -1
  709. package/assets/esri/core/workers/chunks/dde6000aa2f69f6ecad0.js +0 -1
  710. package/assets/esri/core/workers/chunks/e18bb372457cedbf4f8c.js +0 -1
  711. package/assets/esri/core/workers/chunks/e82b1f91465d569012c4.js +0 -1
  712. package/assets/esri/core/workers/chunks/e892ed8b0b990d7eba28.js +0 -1
  713. package/assets/esri/core/workers/chunks/ed05399f9a07fea66685.js +0 -1
  714. package/assets/esri/core/workers/chunks/efec0f496491a0647051.js +0 -1
  715. package/assets/esri/core/workers/chunks/f01a939af200616eb169.js +0 -1
  716. package/assets/esri/core/workers/chunks/f19426eb53d8430ded51.js +0 -1
  717. package/assets/esri/core/workers/chunks/f255b2232f6f049d462d.js +0 -1
  718. package/assets/esri/core/workers/chunks/f3358b19af0f03f16543.js +0 -1
  719. package/assets/esri/core/workers/chunks/f4c38a9c01c29b5a6244.js +0 -1
  720. package/assets/esri/core/workers/chunks/f6c1854f36b029fa6c37.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import t from"../../../core/Identifiable.js";import o from"../../../core/Logger.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{project as n}from"../../../geometry/projectionUtils.js";import{extentContainsPoint as m,polygonContainsPoint as a}from"../../../geometry/support/contains.js";import{nearestCoordinate as c}from"../../../geometry/support/near.js";var l;let p=l=class extends(t.NumericIdentifiableMixin(r)){constructor(e){super(e),this.geometry=null,this.spatialReference=null}get normalizedGeometry(){if(null==this.geometry||!this.spatialReference)return null;if(!this.spatialReference.equals(this.geometry.spatialReference))try{return n(this.geometry,this.spatialReference)}catch(e){return o.getLogger(this).error("#constraints.geometry","could not project the geometry to the view's spatial reference",{geometry:this.geometry,spatialReference:this.spatialReference,error:e}),null}return this.geometry}constrain(e,r){if(null==this.normalizedGeometry)return e;const t=e.targetGeometry;if("extent"===this.normalizedGeometry.type?m(this.normalizedGeometry,t):a(this.normalizedGeometry,t))return e;const{coordinate:o}=c(this.normalizedGeometry,t);return o?(e.targetGeometry=o,e):e}clone(){return new l({geometry:this.geometry?.clone(),spatialReference:this.spatialReference?.clone()})}};e([s({constructOnly:!0})],p.prototype,"geometry",void 0),e([s({readOnly:!0})],p.prototype,"normalizedGeometry",null),e([s({constructOnly:!0})],p.prototype,"spatialReference",void 0),p=l=e([i("esri.views.2d.constraints.GeometryConstraint")],p);export{p as GeometryConstraint};
5
+ import{__decorate as e}from"tslib";import r from"../../../core/Accessor.js";import{NumericIdentifiableMixin as t}from"../../../core/Identifiable.js";import o from"../../../core/Logger.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{project as n}from"../../../geometry/projectionUtils.js";import{extentContainsPoint as m,polygonContainsPoint as a}from"../../../geometry/support/contains.js";import{nearestCoordinate as c}from"../../../geometry/support/near.js";var l;let p=l=class extends(t(r)){constructor(e){super(e),this.geometry=null,this.spatialReference=null}get normalizedGeometry(){if(null==this.geometry||!this.spatialReference)return null;if(!this.spatialReference.equals(this.geometry.spatialReference))try{return n(this.geometry,this.spatialReference)}catch(e){return o.getLogger(this).error("#constraints.geometry","could not project the geometry to the view's spatial reference",{geometry:this.geometry,spatialReference:this.spatialReference,error:e}),null}return this.geometry}constrain(e,r){if(null==this.normalizedGeometry)return e;const t=e.targetGeometry;if("extent"===this.normalizedGeometry.type?m(this.normalizedGeometry,t):a(this.normalizedGeometry,t))return e;const{coordinate:o}=c(this.normalizedGeometry,t);return o?(e.targetGeometry=o,e):e}clone(){return new l({geometry:this.geometry?.clone(),spatialReference:this.spatialReference?.clone()})}};e([s({constructOnly:!0})],p.prototype,"geometry",void 0),e([s({readOnly:!0})],p.prototype,"normalizedGeometry",null),e([s({constructOnly:!0})],p.prototype,"spatialReference",void 0),p=l=e([i("esri.views.2d.constraints.GeometryConstraint")],p);export{p as GeometryConstraint};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as o}from"tslib";import t from"../../../core/Accessor.js";import r from"../../../core/Identifiable.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";var i;let n=i=class extends(r.NumericIdentifiableMixin(t)){constructor(){super(...arguments),this.enabled=!0,this.rotationEnabled=!0}constrain(o,t){return this.enabled&&t?(this.rotationEnabled||(o.rotation=t.rotation),o):o}clone(){return new i({enabled:this.enabled,rotationEnabled:this.rotationEnabled})}};o([e()],n.prototype,"enabled",void 0),o([e()],n.prototype,"rotationEnabled",void 0),n=i=o([s("esri.views.2d.constraints.RotationConstraint")],n);const a=n;export{a as default};
5
+ import{__decorate as o}from"tslib";import t from"../../../core/Accessor.js";import{NumericIdentifiableMixin as r}from"../../../core/Identifiable.js";import{property as e}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";var a;let n=a=class extends(r(t)){constructor(){super(...arguments),this.enabled=!0,this.rotationEnabled=!0}constrain(o,t){return this.enabled&&t?(this.rotationEnabled||(o.rotation=t.rotation),o):o}clone(){return new a({enabled:this.enabled,rotationEnabled:this.rotationEnabled})}};o([e()],n.prototype,"enabled",void 0),o([e()],n.prototype,"rotationEnabled",void 0),n=a=o([s("esri.views.2d.constraints.RotationConstraint")],n);const i=n;export{i as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import o from"../../../core/Identifiable.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";var a;let c=a=class extends(o.NumericIdentifiableMixin(t)){constructor(e){super(e),this._lodByScale={},this._scales=[],this.effectiveLODs=null,this.effectiveMinZoom=-1,this.effectiveMaxZoom=-1,this.effectiveMinScale=0,this.effectiveMaxScale=0,this.lods=null,this.minZoom=-1,this.maxZoom=-1,this.minScale=0,this.maxScale=0,this.snapToZoom=!0}initialize(){let e,{lods:t,minScale:o,maxScale:s,minZoom:i,maxZoom:a}=this,c=-1,r=-1,l=!1,n=!1;if(0!==o&&0!==s&&o<s&&([o,s]=[s,o]),!t?.length)return this._set("effectiveMinScale",o),void this._set("effectiveMaxScale",s);t=t.map(e=>e.clone()),t.sort((e,t)=>t.scale-e.scale),t.forEach((e,t)=>e.level=t);for(const f of t)!l&&o>0&&o>=f.scale&&(c=f.level,l=!0),!n&&s>0&&s>=f.scale&&(r=e?e.level:-1,n=!0),e=f;-1===i&&(i=0===o?0:c),-1===a&&(a=0===s?t.length-1:r),i=Math.max(i,0),i=Math.min(i,t.length-1),a=Math.max(a,0),a=Math.min(a,t.length-1),i>a&&([i,a]=[a,i]),o=t[i].scale,s=t[a].scale,t.splice(0,i),t.splice(a-i+1),t.forEach((e,t)=>{this._lodByScale[e.scale]=e,this._scales[t]=e.scale}),this._set("effectiveLODs",t),this._set("effectiveMinZoom",i),this._set("effectiveMaxZoom",a),this._set("effectiveMinScale",o),this._set("effectiveMaxScale",s)}constrain(e,t){if(t&&e.scale===t.scale)return e;const o=this.effectiveMinScale,s=this.effectiveMaxScale,i=e.targetGeometry,a=t&&t.targetGeometry,c=0!==s&&e.scale<s,r=0!==o&&e.scale>o;if(c||r){const c=r?o:s;if(t&&a){const o=(c-t.scale)/(e.scale-t.scale);i.x=a.x+(i.x-a.x)*o,i.y=a.y+(i.y-a.y)*o}e.scale=c}return this.snapToZoom&&this.effectiveLODs&&(e.scale=this._getClosestScale(e.scale)),e}fit(e){if(!this.effectiveLODs||!this.snapToZoom)return this.constrain(e,null);const t=this.scaleToZoom(e.scale),o=Math.abs(t-Math.floor(t));return e.scale=this.zoomToScale(o>.99?Math.round(t):Math.floor(t)),e}zoomToScale(e){if(!this.effectiveLODs)return 0;e-=this.effectiveMinZoom,e=Math.max(0,e);const t=this._scales;if(e<=0)return t[0];if(e>=t.length)return t[t.length-1];const o=Math.floor(e),s=Math.ceil(e);return t[o]+(e-o)*(t[s]-t[o])}scaleToZoom(e){if(!this.effectiveLODs)return-1;const t=this._scales;let o,s;if(e>=t[0])return this.effectiveMinZoom;if(e<=t[t.length-1])return this.effectiveMaxZoom;for(let i=0;i<t.length-1;i++){if(o=t[i],s=t[i+1],s===e){return i+this.effectiveMinZoom+1}if(o>e&&s<e){return i+this.effectiveMinZoom+1-(e-s)/(o-s)}}return-1}snapToClosestScale(e){if(!this.effectiveLODs)return e;const t=this.scaleToZoom(e);return this.zoomToScale(Math.round(t))}snapToNextScale(e,t=.5){if(!this.effectiveLODs)return e*t;const o=Math.round(this.scaleToZoom(e));return this.zoomToScale(o+1)}snapToPreviousScale(e,t=2){if(!this.effectiveLODs)return e*t;const o=Math.round(this.scaleToZoom(e));return this.zoomToScale(o-1)}clone(){return new a({lods:this.lods,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale})}_getClosestScale(e){return this._lodByScale[e]||(e=this._scales.reduce((t,o)=>Math.abs(o-e)<=Math.abs(t-e)?o:t,this._scales[0])),this._lodByScale[e].scale}};e([s({readOnly:!0})],c.prototype,"effectiveLODs",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMinZoom",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMaxZoom",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMinScale",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMaxScale",void 0),e([s()],c.prototype,"lods",void 0),e([s()],c.prototype,"minZoom",void 0),e([s()],c.prototype,"maxZoom",void 0),e([s()],c.prototype,"minScale",void 0),e([s()],c.prototype,"maxScale",void 0),e([s()],c.prototype,"snapToZoom",void 0),c=a=e([i("esri.views.2d.constraints.ZoomConstraint")],c);const r=c;export{r as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{NumericIdentifiableMixin as o}from"../../../core/Identifiable.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";var a;let c=a=class extends(o(t)){constructor(e){super(e),this._lodByScale={},this._scales=[],this.effectiveLODs=null,this.effectiveMinZoom=-1,this.effectiveMaxZoom=-1,this.effectiveMinScale=0,this.effectiveMaxScale=0,this.lods=null,this.minZoom=-1,this.maxZoom=-1,this.minScale=0,this.maxScale=0,this.snapToZoom=!0}initialize(){let e,{lods:t,minScale:o,maxScale:s,minZoom:i,maxZoom:a}=this,c=-1,r=-1,l=!1,n=!1;if(0!==o&&0!==s&&o<s&&([o,s]=[s,o]),!t?.length)return this._set("effectiveMinScale",o),void this._set("effectiveMaxScale",s);t=t.map(e=>e.clone()),t.sort((e,t)=>t.scale-e.scale),t.forEach((e,t)=>e.level=t);for(const f of t)!l&&o>0&&o>=f.scale&&(c=f.level,l=!0),!n&&s>0&&s>=f.scale&&(r=e?e.level:-1,n=!0),e=f;-1===i&&(i=0===o?0:c),-1===a&&(a=0===s?t.length-1:r),i=Math.max(i,0),i=Math.min(i,t.length-1),a=Math.max(a,0),a=Math.min(a,t.length-1),i>a&&([i,a]=[a,i]),o=t[i].scale,s=t[a].scale,t.splice(0,i),t.splice(a-i+1),t.forEach((e,t)=>{this._lodByScale[e.scale]=e,this._scales[t]=e.scale}),this._set("effectiveLODs",t),this._set("effectiveMinZoom",i),this._set("effectiveMaxZoom",a),this._set("effectiveMinScale",o),this._set("effectiveMaxScale",s)}constrain(e,t){if(t&&e.scale===t.scale)return e;const o=this.effectiveMinScale,s=this.effectiveMaxScale,i=e.targetGeometry,a=t&&t.targetGeometry,c=0!==s&&e.scale<s,r=0!==o&&e.scale>o;if(c||r){const c=r?o:s;if(t&&a){const o=(c-t.scale)/(e.scale-t.scale);i.x=a.x+(i.x-a.x)*o,i.y=a.y+(i.y-a.y)*o}e.scale=c}return this.snapToZoom&&this.effectiveLODs&&(e.scale=this._getClosestScale(e.scale)),e}fit(e){if(!this.effectiveLODs||!this.snapToZoom)return this.constrain(e,null);const t=this.scaleToZoom(e.scale),o=Math.abs(t-Math.floor(t));return e.scale=this.zoomToScale(o>.99?Math.round(t):Math.floor(t)),e}zoomToScale(e){if(!this.effectiveLODs)return 0;e-=this.effectiveMinZoom,e=Math.max(0,e);const t=this._scales;if(e<=0)return t[0];if(e>=t.length)return t[t.length-1];const o=Math.floor(e),s=Math.ceil(e);return t[o]+(e-o)*(t[s]-t[o])}scaleToZoom(e){if(!this.effectiveLODs)return-1;const t=this._scales;let o,s;if(e>=t[0])return this.effectiveMinZoom;if(e<=t[t.length-1])return this.effectiveMaxZoom;for(let i=0;i<t.length-1;i++){if(o=t[i],s=t[i+1],s===e){return i+this.effectiveMinZoom+1}if(o>e&&s<e){return i+this.effectiveMinZoom+1-(e-s)/(o-s)}}return-1}snapToClosestScale(e){if(!this.effectiveLODs)return e;const t=this.scaleToZoom(e);return this.zoomToScale(Math.round(t))}snapToNextScale(e,t=.5){if(!this.effectiveLODs)return e*t;const o=Math.round(this.scaleToZoom(e));return this.zoomToScale(o+1)}snapToPreviousScale(e,t=2){if(!this.effectiveLODs)return e*t;const o=Math.round(this.scaleToZoom(e));return this.zoomToScale(o-1)}clone(){return new a({lods:this.lods,minZoom:this.minZoom,maxZoom:this.maxZoom,minScale:this.minScale,maxScale:this.maxScale})}_getClosestScale(e){return this._lodByScale[e]||(e=this._scales.reduce((t,o)=>Math.abs(o-e)<=Math.abs(t-e)?o:t,this._scales[0])),this._lodByScale[e].scale}};e([s({readOnly:!0})],c.prototype,"effectiveLODs",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMinZoom",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMaxZoom",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMinScale",void 0),e([s({readOnly:!0})],c.prototype,"effectiveMaxScale",void 0),e([s()],c.prototype,"lods",void 0),e([s()],c.prototype,"minZoom",void 0),e([s()],c.prototype,"maxZoom",void 0),e([s()],c.prototype,"minScale",void 0),e([s()],c.prototype,"maxScale",void 0),e([s()],c.prototype,"snapToZoom",void 0),c=a=e([i("esri.views.2d.constraints.ZoomConstraint")],c);const r=c;export{r as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{remove as t}from"../../../core/arrayUtils.js";import i from"../../../core/Evented.js";import{FadeTransition as s}from"./transitions/FadeTransition.js";class e extends i{constructor(){super(...arguments),this._transitionables=null,this._clips=null,this._fadeTransition=null,this._isReady=!1,this._opacity=1,this.parent=null,this._stage=null,this._visible=!0}get computedOpacity(){return this._fadeTransition?.computedOpacity??this.opacity}get clips(){return this._clips}set clips(t){this._clips=t,this.requestRender()}get fadeTransitionEnabled(){return null!==this._fadeTransition}set fadeTransitionEnabled(t){!this._fadeTransition&&t?(this._fadeTransition=new s({opacity:this.opacity,visible:this.visible}),this.addTransitionable(this._fadeTransition)):this._fadeTransition&&!t&&(this.removeTransitionable(this._fadeTransition),this._fadeTransition=null)}get inFadeTransition(){return this._fadeTransition?.transitioning??!1}get isReady(){return this._isReady}get opacity(){return this._opacity}set opacity(t){this._opacity!==t&&(this._opacity=Math.min(1,Math.max(t,0)),this._fadeTransition&&(this._fadeTransition.opacity=this._opacity),this.requestRender())}get stage(){return this._stage}set stage(t){if(this._stage===t)return;const i=this._stage;this._stage=t,t?this._stage?.untrashDisplayObject(this)||(this.onAttach(),this.emit("attach")):i?.trashDisplayObject(this)}get transforms(){return null==this._transforms&&(this._transforms=this._createTransforms()),this._transforms}get transitioning(){return this.isTransitioning()}get visible(){return this._visible}set visible(t){this._visible!==t&&(this._visible=t,this._fadeTransition&&(this._fadeTransition.visible=this._visible),this.requestRender())}get hasLabels(){return!1}get hasHighlight(){return!1}get hasBlending(){return!1}addTransitionable(t){this._transitionables??=[],this._transitionables.push(t),this.requestRender()}removeTransitionable(i){i.endTransition(),this._transitionables&&t(this._transitionables,i),this.requestRender()}fadeIn(){this.fadeTransitionEnabled=!0;const t=this._fadeTransition.fadeIn();return this.opacity=1,this.requestRender(),t}fadeOut(){this.fadeTransitionEnabled=!0;const t=this._fadeTransition.fadeOut();return this.opacity=0,this.requestRender(),t}endTransitions(){if(this._transitionables){for(const t of this._transitionables)t.endTransition();this.requestRender()}}beforeRender(t){this.transitionStep(t.deltaTime,t.state.scale),this.setTransform(t.state)}afterRender(t){this.transitioning&&this.requestRender()}remove(){this.parent?.removeChild(this)}setTransform(t){}processRender(t){this.stage&&(this._fadeTransition?.computedVisible??this.visible)&&this.doRender(t)}requestRender(){this.stage&&this.stage.requestRender()}processDetach(){this.endTransitions(),this.onDetach(),this.emit("detach")}isTransitioning(){return this._transitionables?.some(t=>t.transitioning)??!1}transitionStep(t,i){if(this._transitionables)for(const s of this._transitionables)s.transitionStep(t,i)}onAttach(){}onDetach(){}doRender(t){}ready(){this._isReady||(this._isReady=!0,this.emit("isReady"),this.requestRender())}}export{e as DisplayObject};
5
+ import{remove as t}from"../../../core/arrayUtils.js";import{Evented as i}from"../../../core/Evented.js";import{FadeTransition as s}from"./transitions/FadeTransition.js";class e extends i{constructor(){super(...arguments),this._transitionables=null,this._clips=null,this._fadeTransition=null,this._isReady=!1,this._opacity=1,this.parent=null,this._stage=null,this._visible=!0}get computedOpacity(){return this._fadeTransition?.computedOpacity??this.opacity}get clips(){return this._clips}set clips(t){this._clips=t,this.requestRender()}get fadeTransitionEnabled(){return null!==this._fadeTransition}set fadeTransitionEnabled(t){!this._fadeTransition&&t?(this._fadeTransition=new s({opacity:this.opacity,visible:this.visible}),this.addTransitionable(this._fadeTransition)):this._fadeTransition&&!t&&(this.removeTransitionable(this._fadeTransition),this._fadeTransition=null)}get inFadeTransition(){return this._fadeTransition?.transitioning??!1}get isReady(){return this._isReady}get opacity(){return this._opacity}set opacity(t){this._opacity!==t&&(this._opacity=Math.min(1,Math.max(t,0)),this._fadeTransition&&(this._fadeTransition.opacity=this._opacity),this.requestRender())}get stage(){return this._stage}set stage(t){if(this._stage===t)return;const i=this._stage;this._stage=t,t?this._stage?.untrashDisplayObject(this)||(this.onAttach(),this.emit("attach")):i?.trashDisplayObject(this)}get transforms(){return null==this._transforms&&(this._transforms=this._createTransforms()),this._transforms}get transitioning(){return this.isTransitioning()}get visible(){return this._visible}set visible(t){this._visible!==t&&(this._visible=t,this._fadeTransition&&(this._fadeTransition.visible=this._visible),this.requestRender())}get hasLabels(){return!1}get hasHighlight(){return!1}get hasBlending(){return!1}addTransitionable(t){this._transitionables??=[],this._transitionables.push(t),this.requestRender()}removeTransitionable(i){i.endTransition(),this._transitionables&&t(this._transitionables,i),this.requestRender()}fadeIn(){this.fadeTransitionEnabled=!0;const t=this._fadeTransition.fadeIn();return this.opacity=1,this.requestRender(),t}fadeOut(){this.fadeTransitionEnabled=!0;const t=this._fadeTransition.fadeOut();return this.opacity=0,this.requestRender(),t}endTransitions(){if(this._transitionables){for(const t of this._transitionables)t.endTransition();this.requestRender()}}beforeRender(t){this.transitionStep(t.deltaTime,t.state.scale),this.setTransform(t.state)}afterRender(t){this.transitioning&&this.requestRender()}remove(){this.parent?.removeChild(this)}setTransform(t){}processRender(t){this.stage&&(this._fadeTransition?.computedVisible??this.visible)&&this.doRender(t)}requestRender(){this.stage&&this.stage.requestRender()}processDetach(){this.endTransitions(),this.onDetach(),this.emit("detach")}isTransitioning(){return this._transitionables?.some(t=>t.transitioning)??!1}transitionStep(t,i){if(this._transitionables)for(const s of this._transitionables)s.transitionStep(t,i)}onAttach(){}onDetach(){}doRender(t){}ready(){this._isReady||(this._isReady=!0,this.emit("isReady"),this.requestRender())}}export{e as DisplayObject};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Evented.js";import{on as t}from"../../../core/events.js";import{handlesGroup as a}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{identity as r,scale as n,rotate as i,translate as o}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";class c{constructor(s,r={}){this.events=new e.EventEmitter,this._hasMajorPerformanceCaveat=!1,this._lastRenderFrameCounter=0,null!=s?(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("style","width: 100%; height:100%; display:block; willChange:transform"),s.contains(this._canvas)||s.appendChild(this._canvas)):null!=r.canvas&&(this._canvas=r.canvas);const n={failIfMajorPerformanceCaveat:!0,alpha:!0,antialias:!1,depth:!0,stencil:!0,powerPreference:"high-performance"};let i=this._canvas.getContext("webgl2",n);i||(i=this._canvas.getContext("webgl2",{...n,failIfMajorPerformanceCaveat:!1}),this._hasMajorPerformanceCaveat=!0),this._gl=i,this._handles=a([t(this._canvas,"webglcontextlost",e=>this.events.emit("webgl-context-lost",e))])}destroy(){this._canvas.remove(),this._canvas=null,this._handles.remove(),this._gl=null}get gl(){return this._gl}get canvas(){return this._canvas}render(e,t){if(this._hasMajorPerformanceCaveat||has("esri-force-performance-mode")){if(++this._lastRenderFrameCounter>=has("esri-performance-mode-frames-between-render")&&(t(),this._lastRenderViewState=e.state.clone(),this._lastRenderFrameCounter=0),this._lastRenderViewState){const[t,a,s,r,n,i]=this._computeViewTransform(this._lastRenderViewState,e.state);this._canvas.style.transform=`matrix(${t}, ${a}, ${s}, ${r}, ${n}, ${i})`}}else t()}resize(e){const t=this._canvas,a=t.style,{state:{size:s},pixelRatio:r}=e,n=s[0],i=s[1],o=Math.round(n*r),h=Math.round(i*r);t.width===o&&t.height===h||(t.width=o,t.height=h),a.width=n+"px",a.height=i+"px"}_computeViewTransform(e,t){const[a,c]=e.center,[l,m]=t.center,[f,v]=e.toScreen([0,0],l,m),[_,d]=e.toScreen([0,0],a,c),p=_-f,g=d-v,u=e.scale/t.scale,w=t.rotation-e.rotation,j=h();return r(j),n(j,j,[u,u]),i(j,j,s(w)),o(j,j,[p,g]),j}}export{c as ManagedCanvas};
5
+ import{EventEmitter as e}from"../../../core/Evented.js";import{on as t}from"../../../core/events.js";import{handlesGroup as a}from"../../../core/handleUtils.js";import has from"../../../core/has.js";import{deg2rad as s}from"../../../core/mathUtils.js";import{identity as r,scale as n,rotate as i,translate as o}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as h}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";class c{constructor(s,r={}){this.events=new e,this._hasMajorPerformanceCaveat=!1,this._lastRenderFrameCounter=0,null!=s?(this._canvas=document.createElement("canvas"),this._canvas.setAttribute("style","width: 100%; height:100%; display:block; willChange:transform"),s.contains(this._canvas)||s.appendChild(this._canvas)):null!=r.canvas&&(this._canvas=r.canvas);const n={failIfMajorPerformanceCaveat:!0,alpha:!0,antialias:!1,depth:!0,stencil:!0,powerPreference:"high-performance"};let i=this._canvas.getContext("webgl2",n);i||(i=this._canvas.getContext("webgl2",{...n,failIfMajorPerformanceCaveat:!1}),this._hasMajorPerformanceCaveat=!0),this._gl=i,this._handles=a([t(this._canvas,"webglcontextlost",e=>this.events.emit("webgl-context-lost",e))])}destroy(){this._canvas.remove(),this._canvas=null,this._handles.remove(),this._gl=null}get gl(){return this._gl}get canvas(){return this._canvas}render(e,t){if(this._hasMajorPerformanceCaveat||has("esri-force-performance-mode")){if(++this._lastRenderFrameCounter>=has("esri-performance-mode-frames-between-render")&&(t(),this._lastRenderViewState=e.state.clone(),this._lastRenderFrameCounter=0),this._lastRenderViewState){const[t,a,s,r,n,i]=this._computeViewTransform(this._lastRenderViewState,e.state);this._canvas.style.transform=`matrix(${t}, ${a}, ${s}, ${r}, ${n}, ${i})`}}else t()}resize(e){const t=this._canvas,a=t.style,{state:{size:s},pixelRatio:r}=e,n=s[0],i=s[1],o=Math.round(n*r),h=Math.round(i*r);t.width===o&&t.height===h||(t.width=o,t.height=h),a.width=n+"px",a.height=i+"px"}_computeViewTransform(e,t){const[a,c]=e.center,[l,m]=t.center,[f,_]=e.toScreen([0,0],l,m),[d,v]=e.toScreen([0,0],a,c),p=d-f,g=v-_,u=e.scale/t.scale,w=t.rotation-e.rotation,j=h();return r(j),n(j,j,[u,u]),i(j,j,s(w)),o(j,j,[p,g]),j}}export{c as ManagedCanvas};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{clone as e}from"../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{collisionGridCellSize as t}from"./config.js";import{GridIndex as r}from"./util.js";class s{constructor(s,o,n,i,l,c){this._symbols=s,this._styleRepository=i,this._zoom=l,this._currentLayerCursor=0,this._currentSymbolCursor=0,this._styleProps=new Map,this._allNeededMatrices=new Map,this._gridIndex=new r(o,n,t),this._si=Math.sin(Math.PI*c/180),this._co=Math.cos(Math.PI*c/180),i.cachedStyles&&(this._styleProps=i.cachedStyles);for(const t of s)for(const r of t.symbols)this._allNeededMatrices.has(r.tile)||this._allNeededMatrices.set(r.tile,e(r.tile.transforms.tileUnitsToPixels))}work(e){const t=performance.now();for(;this._currentLayerCursor<this._symbols.length;this._currentLayerCursor++,this._currentSymbolCursor=0){const r=this._symbols[this._currentLayerCursor],s=this._getProperties(r.styleLayerUID),o=this._styleRepository.layerContexts?.get(r.styleLayerUID);for(;this._currentSymbolCursor<r.symbols.length;this._currentSymbolCursor++){if(this._currentSymbolCursor%100==99&&performance.now()-t>e)return!1;const n=r.symbols[this._currentSymbolCursor];if(!n.uniqueSymbol?.show)continue;const i=this._computeCoordinates(n,s,o),l=n.uniqueSymbol;if(!l.show)continue;const{iconAllowOverlap:c,textAllowOverlap:h}=s;for(const e of i){if(!e.enabled)continue;const t=l.parts[e.partIndex];if(!t.show)continue;!(e.partIndex?h:c)&&this._doesCollide(e)&&(e.hard?l.show=!1:t.show=!1)}l.show&&this._insertColliders(l.parts,i,s)}}return!0}_insertColliders(e,t,r){const{iconIgnorePlacement:s,textIgnorePlacement:o}=r;for(const n of t){if(!n.enabled)continue;if(n.partIndex?o:s)continue;if(!e[n.partIndex].show)continue;const t=n.xScreen+n.dxScreen,r=n.yScreen+n.dyScreen,i=t+n.width,l=r+n.height,[c,h,a,d]=this._gridIndex.getCellSpan(t,r,i,l);for(let e=h;e<=d;e++)for(let t=c;t<=a;t++){this._gridIndex.cells[e][t].push(n)}}}_computeCoordinates(e,t,r){const{iconRotationAlignment:s,textRotationAlignment:o,iconTranslate:n,iconTranslateAnchor:i,textTranslate:l,textTranslateAnchor:c}=t,h=this._si,a=this._co,d=this._zoom,y=this._allNeededMatrices.get(e.tile),u=e.uniqueSymbol,x=e.colliders(r);let _=0;for(const f of x){const[e,t]=0===f.partIndex?n:l,r=0===f.partIndex?i:c,u=f.minLod<=d&&d<=f.maxLod;_+=u?0:1,f.enabled=u,f.xScreen=f.xTile*y[0]+f.yTile*y[3]+y[6],f.yScreen=f.xTile*y[1]+f.yTile*y[4]+y[7],0===r?(f.xScreen+=a*e-h*t,f.yScreen+=h*e+a*t):(f.xScreen+=e,f.yScreen+=t),1===(0===f.partIndex?s:o)?(f.dxScreen=f.dxPixels,f.dyScreen=f.dyPixels):(f.dxScreen=a*(f.dxPixels+f.width/2)-h*(f.dyPixels+f.height/2)-f.width/2,f.dyScreen=h*(f.dxPixels+f.width/2)+a*(f.dyPixels+f.height/2)-f.height/2)}return x.length>0&&_===x.length&&u&&(u.show=!1),x}_getProperties(e){const t=this._styleProps.get(e);if(t)return t;const r=this._styleRepository.getLayerStyleProperties?.(e,this._zoom);return this._styleProps.set(e,r),r}_doesCollide(e){const t=e.xScreen+e.dxScreen,r=e.yScreen+e.dyScreen,s=t+e.width,o=r+e.height,[n,i,l,c]=this._gridIndex.getCellSpan(t,r,s,o);for(let h=i;h<=c;h++)for(let e=n;e<=l;e++){const n=this._gridIndex.cells[h][e];for(const e of n){const n=e.xScreen+e.dxScreen,i=e.yScreen+e.dyScreen,l=n+e.width,c=i+e.height;if(!(s<n||t>l||o<i||r>c))return!0}}return!1}}export{s as CollisionJob};
5
+ import{clone as e}from"../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{collisionGridCellSize as t}from"./config.js";import{GridIndex as r}from"./util.js";class s{constructor(s,o,n,i,l,c){this._symbols=s,this._styleRepository=i,this._zoom=l,this._currentLayerCursor=0,this._currentSymbolCursor=0,this._styleProps=new Map,this._allNeededMatrices=new Map,this._gridIndex=new r(o,n,t),this._si=Math.sin(Math.PI*c/180),this._co=Math.cos(Math.PI*c/180),i.cachedStyles&&(this._styleProps=i.cachedStyles);for(const t of s)for(const r of t.symbols)this._allNeededMatrices.has(r.tile)||this._allNeededMatrices.set(r.tile,e(r.tile.transforms.tileUnitsToPixels))}work(e){const t=performance.now();for(;this._currentLayerCursor<this._symbols.length;this._currentLayerCursor++,this._currentSymbolCursor=0){const r=this._symbols[this._currentLayerCursor],s=this._getProperties(r.styleLayerUID),o=this._styleRepository.layerContexts?.get(r.styleLayerUID);for(;this._currentSymbolCursor<r.symbols.length;this._currentSymbolCursor++){if(this._currentSymbolCursor%100==99&&performance.now()-t>e)return!1;const n=r.symbols[this._currentSymbolCursor];if(!n.uniqueSymbol?.show)continue;const i=this._computeCoordinates(n,s,o),l=n.uniqueSymbol;if(!l.show)continue;const{iconAllowOverlap:c,textAllowOverlap:h}=s;for(const e of i){if(!e.enabled)continue;const t=l.parts[e.partIndex];if(!t.show)continue;!(e.partIndex?h:c)&&this._doesCollide(e)&&(e.hard?l.show=!1:t.show=!1)}l.show&&this._insertColliders(l.parts,i,s)}}return!0}_insertColliders(e,t,r){const{iconIgnorePlacement:s,textIgnorePlacement:o}=r;for(const n of t){if(!n.enabled)continue;if(n.partIndex?o:s)continue;if(!e[n.partIndex].show)continue;const t=n.xScreen+n.dxScreen,r=n.yScreen+n.dyScreen,i=t+n.width,l=r+n.height,[c,h,a,d]=this._gridIndex.getCellSpan(t,r,i,l);for(let e=h;e<=d;e++)for(let t=c;t<=a;t++){this._gridIndex.cells[e][t].push(n)}}}_computeCoordinates(e,t,r){const{iconRotationAlignment:s,textRotationAlignment:o,iconTranslate:n,iconTranslateAnchor:i,textTranslate:l,textTranslateAnchor:c}=t,h=this._si,a=this._co,d=this._zoom,y=this._allNeededMatrices.get(e.tile),u=e.uniqueSymbol,x=e.colliders(r);let _=0;for(const f of x){const[e,t]=0===f.partIndex?n:l,r=0===f.partIndex?i:c,u=f.minLod<=d&&d<=f.maxLod;_+=u?0:1,f.enabled=u,f.xScreen=f.xTile*y[0]+f.yTile*y[3]+y[6],f.yScreen=f.xTile*y[1]+f.yTile*y[4]+y[7],0===r?(f.xScreen+=a*e-h*t,f.yScreen+=h*e+a*t):(f.xScreen+=e,f.yScreen+=t),1===(0===f.partIndex?s:o)?(f.dxScreen=f.dxPixels,f.dyScreen=f.dyPixels):(f.dxScreen=a*(f.dxPixels+f.width/2)-h*(f.dyPixels+f.height/2)-f.width/2,f.dyScreen=h*(f.dxPixels+f.width/2)+a*(f.dyPixels+f.height/2)-f.height/2)}return x.length>0&&_===x.length&&u&&(u.show=!1),x}_getProperties(e){const t=this._styleProps.get(e);if(t)return t;const r=this._styleRepository.getLayerStyleProperties?.(e,this._zoom);return this._styleProps.set(e,r),r}_doesCollide(e){const t=e.xScreen+e.dxScreen,r=e.yScreen+e.dyScreen,s=t+e.width,o=r+e.height,[n,i,l,c]=this._gridIndex.getCellSpan(t,r,s,o);for(let h=i;h<=c;h++)for(let i=n;i<=l;i++){const n=this._gridIndex.cells[h][i];for(const i of n){if(null!=i.labelId&&null!=e.labelId&&i.labelId===e.labelId)continue;const n=i.xScreen+i.dxScreen,l=i.yScreen+i.dyScreen,c=n+i.width,h=l+i.height;if(!(s<n||t>c||o<l||r>h))return!0}}return!1}}export{s as CollisionJob};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as r}from"../../../../webgl/enums.js";import{VertexElementDescriptor as e}from"../../../../webgl/VertexElementDescriptor.js";class s extends t{static{this.ATTRIBUTES=[]}static{this.GEOMETRY_LAYOUT=[new e("a_pos",2,r.BYTE,0,2)]}static{this.ATTRIBUTES_INFO={}}constructor(t){super(t)}geometryInfo(){return s.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return s.ATTRIBUTES}attributesInfo(){return s.ATTRIBUTES_INFO}}export{s as VTLBackgroundMaterial};
5
+ import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as s}from"../../../../webgl/enums.js";import{VertexElementDescriptor as e}from"../../../../webgl/VertexElementDescriptor.js";class T extends t{static{this.ATTRIBUTES=[]}static{this.GEOMETRY_LAYOUT=[new e("a_pos",2,s.BYTE,0,2)]}static{this.ATTRIBUTES_INFO={}}constructor(t){super(t),this.baseGeometryLayout=T.GEOMETRY_LAYOUT,this.attributes=T.ATTRIBUTES,this.attributesInfo=T.ATTRIBUTES_INFO}}export{T as VTLBackgroundMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{VTLMaterial as r}from"./VTLMaterial.js";import{DataType as e}from"../../../../webgl/enums.js";import{VertexElementDescriptor as t}from"../../../../webgl/VertexElementDescriptor.js";class c extends r{static{this.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"]}static{this.GEOMETRY_LAYOUT=[new t("a_pos",2,e.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:1},"circle-color":{name:"color",type:10},"circle-opacity":{name:"opacity",type:1,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:1,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:10},"circle-stroke-opacity":{name:"stroke_opacity",type:1,precisionFactor:100},"circle-blur":{name:"blur",type:1,precisionFactor:32}}}constructor(r){super(r)}geometryInfo(){return c.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return c.ATTRIBUTES}attributesInfo(){return c.ATTRIBUTES_INFO}}export{c as VTLCircleMaterial};
5
+ import{VTLMaterial as e}from"./VTLMaterial.js";import{DataType as r}from"../../../../webgl/enums.js";import{VertexElementDescriptor as t}from"../../../../webgl/VertexElementDescriptor.js";class c extends e{static{this.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"]}static{this.GEOMETRY_LAYOUT=[new t("a_pos",2,r.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:1},"circle-color":{name:"color",type:10},"circle-opacity":{name:"opacity",type:1,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:1,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:10},"circle-stroke-opacity":{name:"stroke_opacity",type:1,precisionFactor:100},"circle-blur":{name:"blur",type:1,precisionFactor:32}}}constructor(e){super(e),this.baseGeometryLayout=c.GEOMETRY_LAYOUT,this.attributes=c.ATTRIBUTES,this.attributesInfo=c.ATTRIBUTES_INFO}}export{c as VTLCircleMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as o}from"../../../../webgl/enums.js";import{VertexElementDescriptor as i}from"../../../../webgl/VertexElementDescriptor.js";class e extends t{static{this.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"]}static{this.GEOMETRY_LAYOUT=[new i("a_pos",2,o.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={"fill-color":{name:"color",type:10},"fill-opacity":{name:"opacity",type:1,precisionFactor:100},"fill-pattern":{name:"tlbr",type:12,isOptional:!0}}}constructor(t){super(t)}geometryInfo(){return e.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return e.ATTRIBUTES}attributesInfo(){return e.ATTRIBUTES_INFO}}class l extends t{static{this.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"]}static{this.ATTRIBUTES_FILL=["fill-color","fill-opacity"]}static{this.GEOMETRY_LAYOUT=[new i("a_pos",2,o.SHORT,0,8),new i("a_offset",2,o.BYTE,4,8),new i("a_xnormal",2,o.BYTE,6,8)]}static{this.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:10},"fill-opacity":{name:"opacity",type:1,precisionFactor:100}}}static{this.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:10},"fill-opacity":{name:"opacity",type:1,precisionFactor:100}}}constructor(t,o){super(t),this._usefillColor=o}geometryInfo(){return l.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return this._usefillColor?l.ATTRIBUTES_FILL:l.ATTRIBUTES_OUTLINE}attributesInfo(){return this._usefillColor?l.ATTRIBUTES_INFO_FILL:l.ATTRIBUTES_INFO_OUTLINE}}export{e as VTLFillMaterial,l as VTLOutlineMaterial};
5
+ import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as i}from"../../../../webgl/enums.js";import{VertexElementDescriptor as o}from"../../../../webgl/VertexElementDescriptor.js";class T extends t{static{this.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"]}static{this.GEOMETRY_LAYOUT=[new o("a_pos",2,i.SHORT,0,4)]}static{this.ATTRIBUTES_INFO={"fill-color":{name:"color",type:10},"fill-opacity":{name:"opacity",type:1,precisionFactor:100},"fill-pattern":{name:"tlbr",type:12,isOptional:!0}}}constructor(t){super(t),this.baseGeometryLayout=T.GEOMETRY_LAYOUT,this.attributes=T.ATTRIBUTES,this.attributesInfo=T.ATTRIBUTES_INFO}}class e extends t{static{this.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"]}static{this.ATTRIBUTES_FILL=["fill-color","fill-opacity"]}static{this.GEOMETRY_LAYOUT=[new o("a_pos",2,i.SHORT,0,8),new o("a_offset",2,i.BYTE,4,8),new o("a_xnormal",2,i.BYTE,6,8)]}static{this.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:10},"fill-opacity":{name:"opacity",type:1,precisionFactor:100}}}static{this.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:10},"fill-opacity":{name:"opacity",type:1,precisionFactor:100}}}constructor(t,i){super(t),this.baseGeometryLayout=e.GEOMETRY_LAYOUT,this.attributes=i?e.ATTRIBUTES_FILL:e.ATTRIBUTES_OUTLINE,this.attributesInfo=i?e.ATTRIBUTES_INFO_FILL:e.ATTRIBUTES_INFO_OUTLINE}}export{T as VTLFillMaterial,e as VTLOutlineMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{VTLMaterial as e}from"./VTLMaterial.js";import{DataType as t}from"../../../../webgl/enums.js";import{VertexElementDescriptor as i}from"../../../../webgl/VertexElementDescriptor.js";class r extends e{static{this.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"]}static{this.GEOMETRY_LAYOUT=[new i("a_pos",2,t.SHORT,0,16),new i("a_extrude_offset",4,t.BYTE,4,16),new i("a_dir_normal",4,t.BYTE,8,16),new i("a_accumulatedDistance",2,t.UNSIGNED_SHORT,12,16)]}static{this.ATTRIBUTES_INFO={"line-width":{name:"width",type:1,precisionFactor:2},"line-gap-width":{name:"gap_width",type:1,precisionFactor:2},"line-offset":{name:"offset",type:0,precisionFactor:2},"line-color":{name:"color",type:10},"line-opacity":{name:"opacity",type:1,precisionFactor:100},"line-blur":{name:"blur",type:1,precisionFactor:4},"line-pattern":{name:"tlbr",type:12,isOptional:!0},"line-dasharray":{name:"tlbr",type:11,isOptional:!0}}}constructor(e){super(e)}geometryInfo(){return r.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return r.ATTRIBUTES}attributesInfo(){return r.ATTRIBUTES_INFO}}export{r as VTLLineMaterial};
5
+ import{VTLMaterial as e}from"./VTLMaterial.js";import{DataType as t}from"../../../../webgl/enums.js";import{VertexElementDescriptor as i}from"../../../../webgl/VertexElementDescriptor.js";class a extends e{static{this.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"]}static{this.GEOMETRY_LAYOUT=[new i("a_pos",2,t.SHORT,0,16),new i("a_extrude_offset",4,t.BYTE,4,16),new i("a_dir_normal",4,t.BYTE,8,16),new i("a_accumulatedDistance",2,t.UNSIGNED_SHORT,12,16)]}static{this.ATTRIBUTES_INFO={"line-width":{name:"width",type:1,precisionFactor:2},"line-gap-width":{name:"gap_width",type:1,precisionFactor:2},"line-offset":{name:"offset",type:0,precisionFactor:2},"line-color":{name:"color",type:10},"line-opacity":{name:"opacity",type:1,precisionFactor:100},"line-blur":{name:"blur",type:1,precisionFactor:4},"line-pattern":{name:"tlbr",type:12,isOptional:!0},"line-dasharray":{name:"tlbr",type:11,isOptional:!0}}}constructor(e){super(e),this.baseGeometryLayout=a.GEOMETRY_LAYOUT,this.attributes=a.ATTRIBUTES,this.attributesInfo=a.ATTRIBUTES_INFO}}export{a as VTLLineMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import t from"../MemoryBuffer.js";import{DataType as e}from"../../../../webgl/enums.js";import{VertexElementDescriptor as n}from"../../../../webgl/VertexElementDescriptor.js";class o{constructor(t){this._locations=new Map,this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._layout||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return 0===this._locations.size&&this._buildAttributesInfo(),this._locations}getLayoutInfo(){return this._layout||this._buildAttributesInfo(),this._layout}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,n,o,s){const r=this.getUniforms();for(const i of r){const{name:r,type:a,getValue:c}=i,u=c(n,e,o,s);if(null!==u)switch(a){case"float":t.setUniform1f(r,u);break;case"vec2":t.setUniform2fv(r,u);break;case"vec4":t.setUniform4fv(r,u)}}}encodeAttributes(t,e,n,o){const s=this.attributesInfo(),r=this.getEncodingInfos(),i=[];let a=0,c=0;for(const u of Object.keys(r)){const h=r[u],{type:l,precisionFactor:f,isLayout:d}=s[u],y=d?n.getLayoutProperty(u):n.getPaintProperty(u),_=y.interpolator?.getInterpolationRange(e);let m=0;for(const n of h){const{offset:s,bufferElementsToAdd:r}=n;if(r>0){for(let t=0;t<r;t++)i.push(0);a+=c,c=n.bufferElementsToAdd}const u=o??y.getValue(_?_[m]:e,t);switch(l){case 0:case 1:i[a]|=this._encodeByte(u*(f||1),8*s);break;case 2:case 3:i[a]|=this._encodeShort(u*(f||1),8*s);break;case 4:case 5:i[a]|=this._encodeByte(u*(f||1),8*s),i[a]|=this._encodeByte(u*(f||1),8*s+8);break;case 6:case 7:i[a]|=this._encodeShort(u*(f||1),8*s),i[a]|=this._encodeShort(u*(f||1),8*s+16);break;case 8:case 9:i[a]|=this._encodeByte(u*(f||1),8*s),i[a]|=this._encodeByte(u*(f||1),8*s+8),i[a]|=this._encodeByte(u*(f||1),8*s+16),i[a]|=this._encodeByte(u*(f||1),8*s+24);break;case 10:i[a]=this._encodeColor(u);break;case 11:case 12:this._encodePattern(a,i,u);break;default:throw new Error("Unsupported encoding type")}m++}}return i}getAtributeState(t){let e=0;const n=3+2*t;return e|=this._bit(n),e|=this._bit(n+1)<<1,e}static{this._encodingInfo={0:{dataType:e.BYTE,bytesPerElement:1,count:1,normalized:!1},1:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},2:{dataType:e.SHORT,bytesPerElement:2,count:1,normalized:!1},3:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},4:{dataType:e.BYTE,bytesPerElement:1,count:2,normalized:!1},5:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},6:{dataType:e.SHORT,bytesPerElement:2,count:2,normalized:!1},7:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},8:{dataType:e.BYTE,bytesPerElement:1,count:4,normalized:!1},9:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},10:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},11:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},12:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}}}_buildAttributesInfo(){const t=[],n={},s={};let r=-1;const i=this.attributesInfo(),a=this.attributes();let c=-1;for(const e of a){c++;const a=this.getAtributeState(c);if(0===a||3===a)continue;const u=i[e],h=[];n[e]=h;const l=u.type;for(let e=0;e<a;e++){const{dataType:e,bytesPerElement:n,count:i,normalized:a}=o._encodingInfo[l],c=n*i,u=`${e}-${!0===a}`;let f=s[u],d=0;if(!f||f.count+i>4)r++,f={dataIndex:r,count:0,offset:0},4!==i&&(s[u]=f),t.push({location:-1,name:"a_data_"+r,count:i,type:e,normalized:a}),d=Math.ceil(Math.max(c/4,1));else{const e=t[f.dataIndex];e.count+=i;d=Math.ceil(Math.max(e.count*n/4,1))-Math.ceil(Math.max(f.offset/4,1))}h.push({dataIndex:f.dataIndex,offset:f.offset,bufferElementsToAdd:d}),f.offset+=c,f.count+=i}}for(const o of t)switch(o.type){case e.BYTE:case e.UNSIGNED_BYTE:o.count=4;break;case e.SHORT:case e.UNSIGNED_SHORT:o.count+=o.count%2}this._buildVertexBufferLayout(t);let u=0;const h=this._layout.get("geometry");for(const e of h)this._locations.set(e.name,u++);const l=this._layout.get("opacity");if(l)for(const e of l)this._locations.set(e.name,u++);this._buildShaderInfo(t,n),this._propertyEncodingInfo=n}_buildVertexBufferLayout(t){const e=new Map,o=this.geometryInfo();let r=o[0].stride;if(0===t.length)e.set("geometry",o);else{const i=[];let a=r;for(const e of t)r+=s(e.type)*e.count;for(const t of o)i.push(new n(t.name,t.count,t.type,t.offset,r,t.normalized));for(const e of t)i.push(new n(e.name,e.count,e.type,a,r,e.normalized)),a+=s(e.type)*e.count;e.set("geometry",i)}const i=this.opacityInfo();i&&e.set("opacity",i),this._layout=e,this._stride=r}_buildShaderInfo(t,e){let n="\n",s="\n";const i=[];for(const o of t)n+=`attribute ${this._getType(o.count)} ${o.name};\n`;const a=this.attributes(),c=this.attributesInfo();let u=-1;for(const h of a){u++;const{name:t,type:a,precisionFactor:l,isLayout:f}=c[h],d=l&&1!==l?" * "+1/l:"",{bytesPerElement:y,count:_}=o._encodingInfo[a],m=t=>`a_data_${t.dataIndex}${r(_,t.offset,y)}`;switch(this.getAtributeState(u)){case 0:{const e=this._getType(_),o=`u_${t}`;i.push({name:o,type:e,getValue:(t,e,n,o)=>{const s=f?t.getLayoutValue(h,e):t.getPaintValue(h,e);if(11===a){const n=t.getDashKey(s,t.getLayoutValue("line-cap",e)),r=o.getMosaicItemPosition(n,!1);if(null==r)return null;const{tl:i,br:a}=r;return[i[0],a[1],a[0],i[1]]}if(12===a){const t=o.getMosaicItemPosition(s,!h.includes("line-"));if(null==t)return null;const{tl:e,br:n}=t;return[e[0],n[1],n[0],e[1]]}if(10===a){const t=s[3];return[t*s[0],t*s[1],t*s[2],t]}return s}}),n+=`uniform ${e} ${o};\n`,s+=`${e} ${t} = ${o};\n`}break;case 1:{const n=m(e[h][0]);s+=`${this._getType(_)} ${t} = ${n}${d};\n`}break;case 2:{const o=`u_t_${t}`;i.push({name:o,type:"float",getValue:(t,e,n,o)=>(f?t.getLayoutProperty(h):t.getPaintProperty(h)).interpolator.interpolationUniformValue(n,e)}),n+=`uniform float ${o};\n`;const r=m(e[h][0]),a=m(e[h][1]);s+=`${this._getType(_)} ${t} = mix(${r}${d}, ${a}${d}, ${o});\n`}}}this._shaderHeader=n,this._shaderMain=s,this._uniforms=i}_bit(t){return(this._key&1<<t)>>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(e){const n=255*e[3];return t.i8888to32(e[0]*n,e[1]*n,e[2]*n,n)}_encodePattern(t,e,n){if(!n?.rect)return;const o=2,s=n.rect,r=n.width,i=n.height;e[t]=this._encodeShort(s.x+o,0),e[t]|=this._encodeShort(s.y+o+i,16),e[t+1]=this._encodeShort(s.x+o+r,0),e[t+1]|=this._encodeShort(s.y+o,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}const s=t=>{switch(t){case e.FLOAT:case e.INT:case e.UNSIGNED_INT:return 4;case e.SHORT:case e.UNSIGNED_SHORT:case e.HALF_FLOAT:return 2;case e.BYTE:case e.UNSIGNED_BYTE:return 1}},r=(t,e,n)=>{const o=e/n;if(1===t)switch(o){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2===t)switch(o){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===t)switch(o){case 0:return".xyz";case 1:return".yzw"}return""};export{o as VTLMaterial};
5
+ import t from"../MemoryBuffer.js";import{DataType as e}from"../../../../webgl/enums.js";import{VertexElementDescriptor as n}from"../../../../webgl/VertexElementDescriptor.js";class o{constructor(t){this._locations=new Map,this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._layout||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return 0===this._locations.size&&this._buildAttributesInfo(),this._locations}getLayoutInfo(){return this._layout||this._buildAttributesInfo(),this._layout}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,n,o,s){const r=this.getUniforms();for(const a of r){const{name:r,type:i,getValue:c}=a,u=c(n,e,o,s);if(null!==u)switch(i){case"float":t.setUniform1f(r,u);break;case"vec2":t.setUniform2fv(r,u);break;case"vec4":t.setUniform4fv(r,u)}}}encodeAttributes(t,e,n,o){const s=this.attributesInfo,r=this.getEncodingInfos(),a=[];let i=0,c=0;for(const u of Object.keys(r)){const h=r[u],{type:l,precisionFactor:d,isLayout:f}=s[u],y=f?n.getLayoutProperty(u):n.getPaintProperty(u),_=y.interpolator?.getInterpolationRange(e);let m=0;for(const n of h){const{offset:s,bufferElementsToAdd:r}=n;if(r>0){for(let t=0;t<r;t++)a.push(0);i+=c,c=n.bufferElementsToAdd}const u=o??y.getValue(_?_[m]:e,t);switch(l){case 0:case 1:a[i]|=this._encodeByte(u*(d||1),8*s);break;case 2:case 3:a[i]|=this._encodeShort(u*(d||1),8*s);break;case 4:case 5:a[i]|=this._encodeByte(u*(d||1),8*s),a[i]|=this._encodeByte(u*(d||1),8*s+8);break;case 6:case 7:a[i]|=this._encodeShort(u*(d||1),8*s),a[i]|=this._encodeShort(u*(d||1),8*s+16);break;case 8:case 9:a[i]|=this._encodeByte(u*(d||1),8*s),a[i]|=this._encodeByte(u*(d||1),8*s+8),a[i]|=this._encodeByte(u*(d||1),8*s+16),a[i]|=this._encodeByte(u*(d||1),8*s+24);break;case 10:a[i]=this._encodeColor(u);break;case 11:case 12:this._encodePattern(i,a,u);break;default:throw new Error("Unsupported encoding type")}m++}}return a}getAtributeState(t){let e=0;const n=3+2*t;return e|=this._bit(n),e|=this._bit(n+1)<<1,e}static{this._encodingInfo={0:{dataType:e.BYTE,bytesPerElement:1,count:1,normalized:!1},1:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},2:{dataType:e.SHORT,bytesPerElement:2,count:1,normalized:!1},3:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},4:{dataType:e.BYTE,bytesPerElement:1,count:2,normalized:!1},5:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},6:{dataType:e.SHORT,bytesPerElement:2,count:2,normalized:!1},7:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},8:{dataType:e.BYTE,bytesPerElement:1,count:4,normalized:!1},9:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},10:{dataType:e.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},11:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},12:{dataType:e.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}}}_buildAttributesInfo(){const t=[],n={},{attributesInfo:s,attributes:r}=this,a={};let i=-1,c=-1;for(const e of r){c++;const r=this.getAtributeState(c);if(0===r||3===r)continue;const u=s[e],h=[];n[e]=h;const l=u.type;for(let e=0;e<r;e++){const{dataType:e,bytesPerElement:n,count:s,normalized:r}=o._encodingInfo[l],c=n*s,u=`${e}-${!0===r}`;let d=a[u],f=0;if(!d||d.count+s>4)i++,d={dataIndex:i,count:0,offset:0},4!==s&&(a[u]=d),t.push({location:-1,name:"a_data_"+i,count:s,type:e,normalized:r}),f=Math.ceil(Math.max(c/4,1));else{const e=t[d.dataIndex];e.count+=s;f=Math.ceil(Math.max(e.count*n/4,1))-Math.ceil(Math.max(d.offset/4,1))}h.push({dataIndex:d.dataIndex,offset:d.offset,bufferElementsToAdd:f}),d.offset+=c,d.count+=s}}for(const o of t)switch(o.type){case e.BYTE:case e.UNSIGNED_BYTE:o.count=4;break;case e.SHORT:case e.UNSIGNED_SHORT:o.count+=o.count%2}this._buildVertexBufferLayout(t);let u=0;const h=this._layout.get("geometry");for(const e of h)this._locations.set(e.name,u++);const l=this._layout.get("opacity");if(l)for(const e of l)this._locations.set(e.name,u++);this._buildShaderInfo(t,n),this._propertyEncodingInfo=n}_buildVertexBufferLayout(t){const e=new Map,o=this.baseGeometryLayout;let r=o[0].stride;if(0===t.length)e.set("geometry",o);else{const a=[];let i=r;for(const e of t)r+=s(e.type)*e.count;for(const t of o)a.push(new n(t.name,t.count,t.type,t.offset,r,t.normalized));for(const e of t)a.push(new n(e.name,e.count,e.type,i,r,e.normalized)),i+=s(e.type)*e.count;e.set("geometry",a)}this.opacityLayout&&e.set("opacity",this.opacityLayout),this._layout=e,this._stride=r}_buildShaderInfo(t,e){let n="\n",s="\n";const a=[];for(const o of t)n+=`attribute ${this._getType(o.count)} ${o.name};\n`;const{attributesInfo:i,attributes:c}=this;let u=-1;for(const h of c){u++;const{name:t,type:c,precisionFactor:l,isLayout:d}=i[h],f=l&&1!==l?" * "+1/l:"",{bytesPerElement:y,count:_}=o._encodingInfo[c],m=t=>`a_data_${t.dataIndex}${r(_,t.offset,y)}`;switch(this.getAtributeState(u)){case 0:{const e=this._getType(_),o=`u_${t}`;a.push({name:o,type:e,getValue:(t,e,n,o)=>{const s=d?t.getLayoutValue(h,e):t.getPaintValue(h,e);if(11===c){const n=t.getDashKey(s,t.getLayoutValue("line-cap",e)),r=o.getMosaicItemPosition(n,!1);if(null==r)return null;const{tl:a,br:i}=r;return[a[0],i[1],i[0],a[1]]}if(12===c){const t=o.getMosaicItemPosition(s,!h.includes("line-"));if(null==t)return null;const{tl:e,br:n}=t;return[e[0],n[1],n[0],e[1]]}if(10===c){const t=s[3];return[t*s[0],t*s[1],t*s[2],t]}return s}}),n+=`uniform ${e} ${o};\n`,s+=`${e} ${t} = ${o};\n`}break;case 1:{const n=m(e[h][0]);s+=`${this._getType(_)} ${t} = ${n}${f};\n`}break;case 2:{const o=`u_t_${t}`;a.push({name:o,type:"float",getValue:(t,e,n,o)=>(d?t.getLayoutProperty(h):t.getPaintProperty(h)).interpolator.interpolationUniformValue(n,e)}),n+=`uniform float ${o};\n`;const r=m(e[h][0]),i=m(e[h][1]);s+=`${this._getType(_)} ${t} = mix(${r}${f}, ${i}${f}, ${o});\n`}}}this._shaderHeader=n,this._shaderMain=s,this._uniforms=a}_bit(t){return(this._key&1<<t)>>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(e){const n=255*e[3];return t.i8888to32(e[0]*n,e[1]*n,e[2]*n,n)}_encodePattern(t,e,n){if(!n?.rect)return;const o=2,s=n.rect,r=n.width,a=n.height;e[t]=this._encodeShort(s.x+o,0),e[t]|=this._encodeShort(s.y+o+a,16),e[t+1]=this._encodeShort(s.x+o+r,0),e[t+1]|=this._encodeShort(s.y+o,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}const s=t=>{switch(t){case e.FLOAT:case e.INT:case e.UNSIGNED_INT:return 4;case e.SHORT:case e.UNSIGNED_SHORT:case e.HALF_FLOAT:return 2;case e.BYTE:case e.UNSIGNED_BYTE:return 1}},r=(t,e,n)=>{const o=e/n;if(1===t)switch(o){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2===t)switch(o){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===t)switch(o){case 0:return".xyz";case 1:return".yzw"}return""};export{o as VTLMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as o}from"../../../../webgl/enums.js";import{VertexElementDescriptor as e}from"../../../../webgl/VertexElementDescriptor.js";const r=[new e("a_pos",2,o.SHORT,0,16),new e("a_vertexOffset",2,o.SHORT,4,16),new e("a_texAngleRange",4,o.UNSIGNED_BYTE,8,16),new e("a_levelInfo",4,o.UNSIGNED_BYTE,12,16)],a=[new e("a_opacityInfo",1,o.UNSIGNED_BYTE,0,1)];class i extends t{static{this.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"]}static{this.ATTRIBUTES_INFO={"icon-color":{name:"color",type:10},"icon-opacity":{name:"opacity",type:1,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:10},"icon-halo-width":{name:"halo_width",type:1,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:1,precisionFactor:4},"icon-size":{name:"size",type:1,precisionFactor:32,isLayout:!0}}}constructor(t){super(t)}geometryInfo(){return r}opacityInfo(){return a}attributes(){return i.ATTRIBUTES}attributesInfo(){return i.ATTRIBUTES_INFO}}class n extends t{static{this.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"]}static{this.ATTRIBUTES_INFO={"text-color":{name:"color",type:10},"text-opacity":{name:"opacity",type:1,precisionFactor:100},"text-halo-color":{name:"halo_color",type:10},"text-halo-width":{name:"halo_width",type:1,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:1,precisionFactor:4},"text-size":{name:"size",type:1,isLayout:!0}}}constructor(t){super(t)}geometryInfo(){return r}opacityInfo(){return a}attributes(){return n.ATTRIBUTES}attributesInfo(){return n.ATTRIBUTES_INFO}}export{i as VTLIconMaterial,n as VTLTextMaterial};
5
+ import{VTLMaterial as t}from"./VTLMaterial.js";import{DataType as o}from"../../../../webgl/enums.js";import{VertexElementDescriptor as e}from"../../../../webgl/VertexElementDescriptor.js";const i=[new e("a_pos",2,o.SHORT,0,16),new e("a_vertexOffset",2,o.SHORT,4,16),new e("a_texAngleRange",4,o.UNSIGNED_BYTE,8,16),new e("a_levelInfo",4,o.UNSIGNED_BYTE,12,16)],a=[new e("a_opacityInfo",1,o.UNSIGNED_BYTE,0,1)];class c extends t{static{this.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"]}static{this.ATTRIBUTES_INFO={"icon-color":{name:"color",type:10},"icon-opacity":{name:"opacity",type:1,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:10},"icon-halo-width":{name:"halo_width",type:1,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:1,precisionFactor:4},"icon-size":{name:"size",type:1,precisionFactor:32,isLayout:!0}}}constructor(t){super(t),this.baseGeometryLayout=i,this.opacityLayout=a,this.attributes=c.ATTRIBUTES,this.attributesInfo=c.ATTRIBUTES_INFO}}class r extends t{static{this.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"]}static{this.ATTRIBUTES_INFO={"text-color":{name:"color",type:10},"text-opacity":{name:"opacity",type:1,precisionFactor:100},"text-halo-color":{name:"halo_color",type:10},"text-halo-width":{name:"halo_width",type:1,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:1,precisionFactor:4},"text-size":{name:"size",type:1,isLayout:!0}}}constructor(t){super(t),this.baseGeometryLayout=i,this.opacityLayout=a,this.attributes=r.ATTRIBUTES,this.attributesInfo=r.ATTRIBUTES_INFO}}export{c as VTLIconMaterial,r as VTLTextMaterial};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/CircularArray.js";import t from"../../../../core/Evented.js";import has from"../../../../core/has.js";import{createDisjointTimerQuery as s}from"../../../webgl/capabilities/DisjointTimerQuery.js";const r=!!has("esri-2d-profiler");class n{constructor(n,i){if(this._events=new t.EventEmitter,this._entries=new Map,this._timings=new e(10),this._currentContainer=null,this._currentPass=null,this._currentBrush=null,this._currentSummary=null,!r)return;this._ext=s(n.gl,{}),this._debugOutput=i;const o=n.gl;if(!this.enableCommandLogging)return;let a;for(a in o)if("function"==typeof o[a]){const e=o[a],t=a.includes("draw");o[a]=(...s)=>(this._events.emit("command",{container:this._currentContainer,pass:this._currentPass,brush:this._currentBrush,method:a,args:s,isDrawCommand:t}),this._currentSummary&&(this._currentSummary.commands++,t&&this._currentSummary.drawCommands++),e.apply(o,s))}}get enableCommandLogging(){return!("object"==typeof r&&r.disableCommands)}recordContainerStart(e){r&&(this._currentContainer=e)}recordContainerEnd(){r&&(this._currentContainer=null)}recordPassStart(e){r&&(this._currentPass=e,this._initSummary())}recordPassEnd(){r&&(this._currentPass=null,this._emitSummary())}recordBrushStart(e){r&&(this._currentBrush=e)}recordBrushEnd(){r&&(this._currentBrush=null)}recordStart(e){if(r&&null!=this._ext){if(this._entries.has(e)){const t=this._entries.get(e),s=this._ext.resultAvailable(t.query),r=this._ext.disjoint();if(s&&!r){const s=this._ext.getResult(t.query)/1e6;let r=0;if(null!=this._timings.enqueue(s)){const e=this._timings.entries,t=e.length;let s=0;for(const r of e)s+=r;r=s/t}const n=s.toFixed(2),i=r?r.toFixed(2):"--";this.enableCommandLogging?(console.groupCollapsed(`Frame report for ${e}, ${n} ms (${i} last 10 avg)\n${t.commandsLen} Commands (${t.drawCommands} draw)`),console.log("RenderPass breakdown: "),console.table(t.summaries),console.log("Commands: ",t.commands),console.groupEnd()):console.log(`Frame report for ${e}, ${n} ms (${i} last 10 avg)`),this._debugOutput.innerHTML=`${n} (${i})`}for(const e of t.handles)e.remove();this._ext.deleteQuery(t.query),this._entries.delete(e)}const t={name:e,query:this._ext.createQuery(),commands:[],commandsLen:0,drawCommands:0,summaries:[],handles:[]};this.enableCommandLogging&&(t.handles.push(this._events.on("command",e=>{t.commandsLen++,t.commands.push(e),e.isDrawCommand&&t.drawCommands++})),t.handles.push(this._events.on("summary",e=>{t.summaries.push(e)}))),this._ext.beginTimeElapsed(t.query),this._entries.set(e,t)}}recordEnd(e){r&&null!=this._ext&&this._entries.has(e)&&this._ext.endTimeElapsed()}_initSummary(){this.enableCommandLogging&&(this._currentSummary={container:this._currentContainer,pass:this._currentPass,drawCommands:0,commands:0})}_emitSummary(){this.enableCommandLogging&&this._currentSummary&&this._events.emit("summary",this._currentSummary)}}export{n as Profiler};
5
+ import e from"../../../../core/CircularArray.js";import{EventEmitter as t}from"../../../../core/Evented.js";import has from"../../../../core/has.js";import{createDisjointTimerQuery as s}from"../../../webgl/capabilities/DisjointTimerQuery.js";const r=!!has("esri-2d-profiler");class n{constructor(n,i){if(this._events=new t,this._entries=new Map,this._timings=new e(10),this._currentContainer=null,this._currentPass=null,this._currentBrush=null,this._currentSummary=null,!r)return;this._ext=s(n.gl,{}),this._debugOutput=i;const o=n.gl;if(!this.enableCommandLogging)return;let a;for(a in o)if("function"==typeof o[a]){const e=o[a],t=a.includes("draw");o[a]=(...s)=>(this._events.emit("command",{container:this._currentContainer,pass:this._currentPass,brush:this._currentBrush,method:a,args:s,isDrawCommand:t}),this._currentSummary&&(this._currentSummary.commands++,t&&this._currentSummary.drawCommands++),e.apply(o,s))}}get enableCommandLogging(){return!("object"==typeof r&&r.disableCommands)}recordContainerStart(e){r&&(this._currentContainer=e)}recordContainerEnd(){r&&(this._currentContainer=null)}recordPassStart(e){r&&(this._currentPass=e,this._initSummary())}recordPassEnd(){r&&(this._currentPass=null,this._emitSummary())}recordBrushStart(e){r&&(this._currentBrush=e)}recordBrushEnd(){r&&(this._currentBrush=null)}recordStart(e){if(r&&null!=this._ext){if(this._entries.has(e)){const t=this._entries.get(e),s=this._ext.resultAvailable(t.query),r=this._ext.disjoint();if(s&&!r){const s=this._ext.getResult(t.query)/1e6;let r=0;if(null!=this._timings.enqueue(s)){const e=this._timings.entries,t=e.length;let s=0;for(const r of e)s+=r;r=s/t}const n=s.toFixed(2),i=r?r.toFixed(2):"--";this.enableCommandLogging?(console.groupCollapsed(`Frame report for ${e}, ${n} ms (${i} last 10 avg)\n${t.commandsLen} Commands (${t.drawCommands} draw)`),console.log("RenderPass breakdown: "),console.table(t.summaries),console.log("Commands: ",t.commands),console.groupEnd()):console.log(`Frame report for ${e}, ${n} ms (${i} last 10 avg)`),this._debugOutput.innerHTML=`${n} (${i})`}for(const e of t.handles)e.remove();this._ext.deleteQuery(t.query),this._entries.delete(e)}const t={name:e,query:this._ext.createQuery(),commands:[],commandsLen:0,drawCommands:0,summaries:[],handles:[]};this.enableCommandLogging&&(t.handles.push(this._events.on("command",e=>{t.commandsLen++,t.commands.push(e),e.isDrawCommand&&t.drawCommands++})),t.handles.push(this._events.on("summary",e=>{t.summaries.push(e)}))),this._ext.beginTimeElapsed(t.query),this._entries.set(e,t)}}recordEnd(e){r&&null!=this._ext&&this._entries.has(e)&&this._ext.endTimeElapsed()}_initSummary(){this.enableCommandLogging&&(this._currentSummary={container:this._currentContainer,pass:this._currentPass,drawCommands:0,commands:0})}_emitSummary(){this.enableCommandLogging&&this._currentSummary&&this._events.emit("summary",this._currentSummary)}}export{n as Profiler};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../config.js";import t from"../../../../request.js";import{bidiText as i}from"../../../../core/BidiText.js";import s from"../../../../core/Error.js";import{getFullyQualifiedFontName as r}from"../../../../core/fontUtils.js";import has from"../../../../core/has.js";import a from"../../../../core/Logger.js";import{throwIfAborted as n,isAbortError as o}from"../../../../core/promiseUtils.js";import{QueueProcessor as c}from"../../../../core/QueueProcessor.js";import{pt2px as h}from"../../../../core/screenUtils.js";import{numericHash as l}from"../../../../core/string.js";import u from"../../../../symbols/cim/CIMResourceManager.js";import{CIMSymbolHelper as p}from"../../../../symbols/cim/CIMSymbolHelper.js";import m from"../../../../symbols/cim/Rasterizer.js";import{normalizeDashTemplate as d}from"../../../../symbols/cim/utils.js";import{svgSdfTextureInnerSize as g,textureBindingSpriteAtlas as f,textureBindingGlyphAtlas as y}from"./definitions.js";import M from"./GlyphMosaic.js";import _ from"./GlyphSource.js";import I from"./Rect.js";import w from"./SDFConverter.js";import S from"./SpriteMosaic.js";import{discardUrlIfHasUrlHash as z}from"./urlUtils.js";import{charCodes as C,getCIMMarkerPlacementHash as T,isSVGImage as R}from"./Utils.js";import{AnimatableTextureResource as x}from"./animatedFormats/AnimatableTextureResource.js";import{AnimationStore as P}from"./animations/store/AnimationStore.js";const b="arial-unicode-ms-regular",$=()=>a.getLogger("esri.views.MapView"),j=(e,t,i)=>$().error(new s(e,t,i)),v=(e,t="")=>$().warnOnce(e,t);class k{static fromMosaic(e,t){return new k(e,t.page,t.sdf,t.samplingMode)}constructor(e,t,i,s){this.mosaicType=e,this.page=t,this.sdf=i,this.samplingMode=s}}class F{constructor(i){this._requestRender=i,this._resourceManager=new u,this._invalidFontsMap=new Map,this._sdfConverter=new w(g),this._bindingInfos=new Array,this._hashToBindingIndex=new Map,this._ongoingRasterizations=new Map,this._imageRequestQueue=new c({concurrency:10,process:async(e,i)=>{n(i);try{return await t(e,{responseType:"image",signal:i})}catch(r){if(!o(r))throw new s("mapview-invalid-resource",`Could not fetch requested resource at ${e}`,r);throw r}}}),this.animationStore=new P,this._spriteMosaic=new S(2048,2048,500),this._glyphSource=new _(`${e.fontsUrl}/{fontstack}/{range}.pbf`),this._glyphMosaic=new M(1024,1024,this._glyphSource),this._rasterizer=new m(this.resourceManager)}dispose(){this._spriteMosaic.dispose(),this._glyphMosaic.dispose(),this._rasterizer.dispose(),this._sdfConverter.dispose(),this._spriteMosaic=null,this._glyphMosaic=null,this._sdfConverter=null,this._hashToBindingIndex.clear(),this._hashToBindingIndex=null,this._bindingInfos=null,this._ongoingRasterizations.clear(),this._ongoingRasterizations=null,this._imageRequestQueue.clear(),this._imageRequestQueue=null,this._resourceManager.destroy(),this.animationStore.destroy()}get sprites(){return this._spriteMosaic}get glyphs(){return this._glyphMosaic}get resourceManager(){return this._resourceManager}async rasterizeItem(e,t){if(null==e)return j("mapview-null-resource","Unable to rasterize null resource"),null;if("animation-info"===e.type){const{resource:t}=e,i=this.animationStore.add(t),{location:s}=i;return{rect:new I(s.column,s.row,t.length,1),page:s.page,type:"sprite",width:t.length,height:1,rasterizationScale:1,sdfPaddingRatio:.5,samplingMode:"Linear",sdfDecodeCoeff:1,simplePattern:!1}}if("cim-rasterization-info"!==e.type)return j("mapview-unexpected-resource","Unable to rasterize resource"),null;const{resource:i}=e;if("text"===i.type){const e=await this._rasterizeText(i,t);for(const t of e.glyphs)this._setTextureBinding(1,t);return e}const s=await this._rasterizeSprite(i,t);return s&&this._setTextureBinding(0,s),s}getMosaicInfo(e,t,i=!1){const s=this._getTextureBindingInfo(e,t,i);return s?{size:s.size,texture:{texture:s.texture,unit:"sprite"===s.type?f:y}}:(j("mapview-invalid-resource",`Unable to find resource for ${t}`),{size:[0,0],texture:{texture:null,unit:0}})}_getTextureBindingInfo(e,t,i){const s=this._bindingInfos[t-1],r=s.page,a="Nearest"===s.samplingMode?9728:i?9987:9729;switch(s.mosaicType){case 0:{const t=[this.sprites.getWidth(r),this.sprites.getHeight(r)],i=this._spriteMosaic.getTexture(e,r);return i.setSamplingMode(a),{type:"sprite",texture:i,size:t}}case 1:{const t=[this.glyphs.width,this.glyphs.height],i=this._glyphMosaic.getTexture(e,r);return this._glyphMosaic.bind(e,a,r,y),i.setSamplingMode(a),{type:"glyph",texture:i,size:t}}default:return j("mapview-texture-manager",`Cannot handle unknown type ${s.mosaicType}`),null}}_hashMosaic(e,t){return 1|e<<1|(t.sdf?1:0)<<2|("Nearest"===t.samplingMode?1:0)<<3|t.page<<4}_setTextureBinding(e,t){const i=this._hashMosaic(e,t);if(!this._hashToBindingIndex.has(i)){const s=k.fromMosaic(e,t),r=this._bindingInfos.length+1;this._hashToBindingIndex.set(i,r),this._bindingInfos.push(s)}t.textureBinding=this._hashToBindingIndex.get(i)}async _rasterizeText(e,t){const{font:s,textString:a}=e,n=r(s),o=this._invalidFontsMap.has(n),[c,h]=i(a),l=C(c);try{const e=o?b:n;has("esri-2d-stabilize-glyphs")&&await this._glyphMosaic.preloadASCIIGlyphCache(e);return{type:"glyphs",glyphs:await this._glyphMosaic.getGlyphItems(e,l,t),isRightToLeft:h}}catch(u){v(`Font ${n} is not available on the web, using "Arial Unicode MS Regular"`),this._invalidFontsMap.set(n,!0);return{type:"glyphs",glyphs:await this._glyphMosaic.getGlyphItems(b,l,t),isRightToLeft:h}}}_hashSpriteResource(e){switch(e.type){case"path":return`path:${e.path}.${e.asFill?1:0}`;case"CIMPictureMarker":return`${e.type}:${e.url}:${e.size}:${T(e.markerPlacement)}`;case"CIMPictureFill":return`${e.type}:${e.url}:${e.height}`;case"CIMPictureStroke":return`${e.type}:${e.url}:${e.width}`;case"dash":return`dash:${e.capStyle}.${d(e.dashTemplate).join("")}`;case"sdf":return`sdf:${JSON.stringify(e.geom)}.${e.asFill?1:0}`;case"fill-style":return`fill_style:${e.style}`;case"animated":return JSON.stringify(z(e));case"CIMGradientFill":case"CIMGradientStroke":return`gradient:${JSON.stringify(e.colorRamp)}.${e.gradientType}.${e.interval}`;case"CIMHatchFill":case"CIMVectorMarker":return JSON.stringify(e)}}async _rasterizeSprite(e,t){if(!e)return null;const i=l(this._hashSpriteResource(e));if(this._spriteMosaic.has(i))return this._spriteMosaic.getSpriteItem(i);if("url"in e&&e.url||"CIMPictureFill"===e.type||"CIMPictureStroke"===e.type||"CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type){const t=[];p.fetchResources({type:"CIMPointSymbol",symbolLayers:[e]},this._resourceManager,t),t.length>0&&await Promise.all(t)}switch(e.type){case"CIMPictureMarker":return"CIMMarkerPlacementInsidePolygon"===e.markerPlacement?.type?this._rasterizeJSONResource(i,e):this._handleAsyncResource(i,e,t);case"animated":case"CIMPictureFill":case"CIMPictureStroke":case"path":return this._handleAsyncResource(i,e,t);case"CIMGradientFill":case"CIMGradientStroke":case"CIMHatchFill":case"CIMVectorMarker":case"dash":case"fill-style":case"sdf":return this._rasterizeJSONResource(i,e)}}_rasterizeJSONResource(e,t){const i=this._rasterizer.rasterizeJSONResource(t);if(i){const{size:s,image:r,sdf:a,simplePattern:n,rasterizationScale:o,samplingMode:c,sdfPaddingRatio:h,sdfDecodeCoeff:l}=i;return this._addItemToMosaic(e,s,{type:"static",data:r},A(t),a,n,o,c,h,l)}return null}async _handleAsyncResource(e,t,i){if(this._ongoingRasterizations.has(e))return this._ongoingRasterizations.get(e);let s;return s="path"===t.type?this._handleSVG(t,e,i):this._handleImage(t,e,i),this._ongoingRasterizations.set(e,s),s.finally(()=>this._ongoingRasterizations.delete(e)),s}async _handleSVG(e,t,i){const s=[g,g],{asFill:r}=e,a=await this._sdfConverter.draw(e.path,r,i);return this._addItemToMosaic(t,s,{type:"static",data:new Uint32Array(a.buffer)},!1,!0,!0)}async _handleGIFOrPNG(e,t,i){const s=e.url,r=this.resourceManager.getResource(s);if(null==r)return null;const{width:a,height:n}=r;if(r instanceof HTMLImageElement){if("animated"===e.type)return j("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;const i="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:s,sdf:o,image:c}=this._rasterizer.rasterizeImageResource(a,n,r,i);return this._addItemToMosaic(t,s,{type:"static",data:c},A(e),o,!1)}let o,c,h;"animated"===e.type?(o=!1,c={type:"CIMAnimatedSymbolProperties",playAnimation:e.playAnimation,reverseAnimation:e.reverseAnimation,randomizeStartTime:e.randomizeStartTime,randomizeStartSeed:e.randomizeStartSeed,startTimeOffset:e.startTimeOffset,duration:e.duration,repeatType:e.repeatType,repeatDelay:e.repeatDelay},h=e.startGroup||0):(o=A(e),c={type:"CIMAnimatedSymbolProperties"},h=0);const l=new x(r,this._requestRender,c,h);return this._addItemToMosaic(t,[l.width,l.height],{type:"animated",data:l},o,!1,!1)}async _handleImage(e,t,i){const r=e.url;if(B(r)||N(r))return this._handleGIFOrPNG(e,t,i);if("animated"===e.type)return j("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;try{let s;const a=this.resourceManager.getResource(r);if(null!=a&&a instanceof HTMLImageElement)s=a;else{const{data:e}=await this._imageRequestQueue.push(r,{...i});s=e}if(R(r))if("width"in e&&"height"in e)s.width=h(e.width),s.height=h(e.height);else if("cim"in e){const t=e;s.width=h(t.width??t.scaleX*t.size),s.height=h(t.size)}if(!s.width||!s.height)return null;const n=s.width,o=s.height,c="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:l,sdf:u,image:p}=this._rasterizer.rasterizeImageResource(n,o,s,c);return this._addItemToMosaic(t,l,{type:"static",data:p},A(e),u,!1)}catch(j){if(!o(j))throw new s("mapview-invalid-resource",`Could not fetch requested resource at ${r}. ${j.message}`);throw j}}_addItemToMosaic(e,t,i,s,r,a,n,o,c,h){return this._spriteMosaic.addSpriteItem(e,t,i,s,r,a,n,o,c,h)}}function A(e){switch(e.type){case"CIMVectorMarker":case"CIMPictureMarker":return U(e);default:return!0}}const G=e=>null!=e&&e.startsWith("data:image/gif"),B=e=>e&&(e.includes(".gif")||G(e)),O=e=>null!=e&&e.startsWith("data:image/png"),N=e=>e&&(e.includes(".png")||O(e)),U=e=>e&&"markerPlacement"in e&&e.markerPlacement&&"CIMMarkerPlacementInsidePolygon"===e.markerPlacement.type;export{F as default};
5
+ import e from"../../../../config.js";import t from"../../../../request.js";import{bidiText as i}from"../../../../core/BidiText.js";import s from"../../../../core/Error.js";import{getFullyQualifiedFontName as r}from"../../../../core/fontUtils.js";import has from"../../../../core/has.js";import a from"../../../../core/Logger.js";import{throwIfAborted as n,isAbortError as o}from"../../../../core/promiseUtils.js";import{QueueProcessor as c}from"../../../../core/QueueProcessor.js";import{pt2px as h}from"../../../../core/screenUtils.js";import{numericHash as l}from"../../../../core/string.js";import u from"../../../../symbols/cim/CIMResourceManager.js";import{CIMSymbolHelper as p}from"../../../../symbols/cim/CIMSymbolHelper.js";import m from"../../../../symbols/cim/Rasterizer.js";import{normalizeDashTemplate as d}from"../../../../symbols/cim/utils.js";import{svgSdfTextureInnerSize as g,textureBindingSpriteAtlas as f,textureBindingGlyphAtlas as y}from"./definitions.js";import _ from"./GlyphMosaic.js";import M from"./GlyphSource.js";import I from"./Rect.js";import w from"./SDFConverter.js";import S from"./SpriteMosaic.js";import{discardUrlIfHasUrlHash as z}from"./urlUtils.js";import{charCodes as C,getCIMMarkerPlacementHash as T,isSVGImage as R}from"./Utils.js";import{AnimatableTextureResource as x}from"./animatedFormats/AnimatableTextureResource.js";import{AnimationStore as P}from"./animations/store/AnimationStore.js";const b="arial-unicode-ms-regular",$=()=>a.getLogger("esri.views.MapView"),j=(e,t,i)=>$().error(new s(e,t,i)),v=(e,t="")=>$().warnOnce(e,t);class k{static fromMosaic(e,t){return new k(e,t.page,t.sdf,t.samplingMode)}constructor(e,t,i,s){this.mosaicType=e,this.page=t,this.sdf=i,this.samplingMode=s}}class F{constructor(i){this._requestRender=i,this._resourceManager=new u,this._invalidFonts=new Set,this._sdfConverter=new w(g),this._bindingInfos=new Array,this._hashToBindingIndex=new Map,this._ongoingRasterizations=new Map,this._imageRequestQueue=new c({concurrency:10,process:async(e,i)=>{n(i);try{return await t(e,{responseType:"image",signal:i})}catch(r){if(!o(r))throw new s("mapview-invalid-resource",`Could not fetch requested resource at ${e}`,r);throw r}}}),this.animationStore=new P,this._spriteMosaic=new S(2048,2048,500),this._glyphSource=new M(`${e.fontsUrl}/{fontstack}/{range}.pbf`),this._glyphMosaic=new _(1024,1024,this._glyphSource),this._rasterizer=new m(this.resourceManager)}dispose(){this._spriteMosaic.dispose(),this._glyphMosaic.dispose(),this._rasterizer.dispose(),this._sdfConverter.dispose(),this._spriteMosaic=null,this._glyphMosaic=null,this._sdfConverter=null,this._hashToBindingIndex.clear(),this._hashToBindingIndex=null,this._bindingInfos=null,this._ongoingRasterizations.clear(),this._ongoingRasterizations=null,this._imageRequestQueue.clear(),this._imageRequestQueue=null,this._resourceManager.destroy(),this.animationStore.destroy()}get sprites(){return this._spriteMosaic}get glyphs(){return this._glyphMosaic}get resourceManager(){return this._resourceManager}async rasterizeItem(e,t){if(null==e)return j("mapview-null-resource","Unable to rasterize null resource"),null;if("animation-info"===e.type){const{resource:t}=e,i=this.animationStore.add(t),{location:s}=i;return{rect:new I(s.column,s.row,t.length,1),page:s.page,type:"sprite",width:t.length,height:1,rasterizationScale:1,sdfPaddingRatio:.5,samplingMode:"Linear",sdfDecodeCoeff:1,simplePattern:!1}}if("cim-rasterization-info"!==e.type)return j("mapview-unexpected-resource","Unable to rasterize resource"),null;const{resource:i}=e;if("text"===i.type){const e=await this._rasterizeText(i,t);for(const t of e.glyphs)this._setTextureBinding(1,t);return e}const s=await this._rasterizeSprite(i,t);return s&&this._setTextureBinding(0,s),s}getMosaicInfo(e,t,i=!1){const s=this._getTextureBindingInfo(e,t,i);return s?{size:s.size,texture:{texture:s.texture,unit:"sprite"===s.type?f:y}}:(j("mapview-invalid-resource",`Unable to find resource for ${t}`),{size:[0,0],texture:{texture:null,unit:0}})}_getTextureBindingInfo(e,t,i){const s=this._bindingInfos[t-1],r=s.page,a="Nearest"===s.samplingMode?9728:i?9987:9729;switch(s.mosaicType){case 0:{const t=[this.sprites.getWidth(r),this.sprites.getHeight(r)],i=this._spriteMosaic.getTexture(e,r);return i.setSamplingMode(a),{type:"sprite",texture:i,size:t}}case 1:{const t=[this.glyphs.width,this.glyphs.height],i=this._glyphMosaic.getTexture(e,r);return this._glyphMosaic.bind(e,a,r,y),i.setSamplingMode(a),{type:"glyph",texture:i,size:t}}default:return j("mapview-texture-manager",`Cannot handle unknown type ${s.mosaicType}`),null}}_hashMosaic(e,t){return 1|e<<1|(t.sdf?1:0)<<2|("Nearest"===t.samplingMode?1:0)<<3|t.page<<4}_setTextureBinding(e,t){const i=this._hashMosaic(e,t);if(!this._hashToBindingIndex.has(i)){const s=k.fromMosaic(e,t),r=this._bindingInfos.length+1;this._hashToBindingIndex.set(i,r),this._bindingInfos.push(s)}t.textureBinding=this._hashToBindingIndex.get(i)}async _rasterizeText(e,t){const{font:s,textString:a}=e,n=r(s),o=this._invalidFonts.has(n),[c,h]=i(a),l=C(c);try{const e=o?b:n;has("esri-2d-stabilize-glyphs")&&await this._glyphMosaic.preloadASCIIGlyphCache(e);return{type:"glyphs",glyphs:await this._glyphMosaic.getGlyphItems(e,l,t),isRightToLeft:h}}catch(u){v(`Font ${n} is not available on the web, using "Arial Unicode MS Regular"`),this._invalidFonts.add(n);return{type:"glyphs",glyphs:await this._glyphMosaic.getGlyphItems(b,l,t),isRightToLeft:h}}}_hashSpriteResource(e){switch(e.type){case"path":return`path:${e.path}.${e.asFill?1:0}`;case"CIMPictureMarker":return`${e.type}:${e.url}:${e.size}:${T(e.markerPlacement)}`;case"CIMPictureFill":return`${e.type}:${e.url}:${e.height}`;case"CIMPictureStroke":return`${e.type}:${e.url}:${e.width}`;case"dash":return`dash:${e.capStyle}.${d(e.dashTemplate).join("")}`;case"sdf":return`sdf:${JSON.stringify(e.geom)}.${e.asFill?1:0}`;case"fill-style":return`fill_style:${e.style}`;case"animated":return JSON.stringify(z(e));case"CIMGradientFill":case"CIMGradientStroke":return`gradient:${JSON.stringify(e.colorRamp)}.${e.gradientType}.${e.interval}`;case"CIMHatchFill":case"CIMVectorMarker":return JSON.stringify(e)}}async _rasterizeSprite(e,t){if(!e)return null;const i=l(this._hashSpriteResource(e));if(this._spriteMosaic.has(i))return this._spriteMosaic.getSpriteItem(i);if("url"in e&&e.url||"CIMPictureFill"===e.type||"CIMPictureStroke"===e.type||"CIMPictureMarker"===e.type||"CIMVectorMarker"===e.type){const t=[];p.fetchResources({type:"CIMPointSymbol",symbolLayers:[e]},this._resourceManager,t),t.length>0&&await Promise.all(t)}switch(e.type){case"CIMPictureMarker":return"CIMMarkerPlacementInsidePolygon"===e.markerPlacement?.type?this._rasterizeJSONResource(i,e):this._handleAsyncResource(i,e,t);case"animated":case"CIMPictureFill":case"CIMPictureStroke":case"path":return this._handleAsyncResource(i,e,t);case"CIMGradientFill":case"CIMGradientStroke":case"CIMHatchFill":case"CIMVectorMarker":case"dash":case"fill-style":case"sdf":return this._rasterizeJSONResource(i,e)}}_rasterizeJSONResource(e,t){const i=this._rasterizer.rasterizeJSONResource(t);if(i){const{size:s,image:r,sdf:a,simplePattern:n,rasterizationScale:o,samplingMode:c,sdfPaddingRatio:h,sdfDecodeCoeff:l}=i;return this._addItemToMosaic(e,s,{type:"static",data:r},A(t),a,n,o,c,h,l)}return null}async _handleAsyncResource(e,t,i){if(this._ongoingRasterizations.has(e))return this._ongoingRasterizations.get(e);let s;return s="path"===t.type?this._handleSVG(t,e,i):this._handleImage(t,e,i),this._ongoingRasterizations.set(e,s),s.finally(()=>this._ongoingRasterizations.delete(e)),s}async _handleSVG(e,t,i){const s=[g,g],{asFill:r}=e,a=await this._sdfConverter.draw(e.path,r,i);return this._addItemToMosaic(t,s,{type:"static",data:new Uint32Array(a.buffer)},!1,!0,!0)}async _handleGIFOrPNG(e,t,i){const s=e.url,r=this.resourceManager.getResource(s);if(null==r)return null;const{width:a,height:n}=r;if(r instanceof HTMLImageElement){if("animated"===e.type)return j("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;const i="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:s,sdf:o,image:c}=this._rasterizer.rasterizeImageResource(a,n,r,i);return this._addItemToMosaic(t,s,{type:"static",data:c},A(e),o,!1)}let o,c,h;"animated"===e.type?(o=!1,c={type:"CIMAnimatedSymbolProperties",playAnimation:e.playAnimation,reverseAnimation:e.reverseAnimation,randomizeStartTime:e.randomizeStartTime,randomizeStartSeed:e.randomizeStartSeed,startTimeOffset:e.startTimeOffset,duration:e.duration,repeatType:e.repeatType,repeatDelay:e.repeatDelay},h=e.startGroup||0):(o=A(e),c={type:"CIMAnimatedSymbolProperties"},h=0);const l=new x(r,this._requestRender,c,h);return this._addItemToMosaic(t,[l.width,l.height],{type:"animated",data:l},o,!1,!1)}async _handleImage(e,t,i){const r=e.url;if(B(r)||N(r))return this._handleGIFOrPNG(e,t,i);if("animated"===e.type)return j("mapview-unexpected-resource","Attempt to configure animations for a non-animated image."),null;try{let s;const a=this.resourceManager.getResource(r);if(null!=a&&a instanceof HTMLImageElement)s=a;else{const{data:e}=await this._imageRequestQueue.push(r,{...i});s=e}if(R(r))if("width"in e&&"height"in e)s.width=h(e.width),s.height=h(e.height);else if("cim"in e){const t=e;s.width=h(t.width??t.scaleX*t.size),s.height=h(t.size)}if(!s.width||!s.height)return null;const n=s.width,o=s.height,c="colorSubstitutions"in e?e.colorSubstitutions:void 0,{size:l,sdf:u,image:p}=this._rasterizer.rasterizeImageResource(n,o,s,c);return this._addItemToMosaic(t,l,{type:"static",data:p},A(e),u,!1)}catch(j){if(!o(j))throw new s("mapview-invalid-resource",`Could not fetch requested resource at ${r}. ${j.message}`);throw j}}_addItemToMosaic(e,t,i,s,r,a,n,o,c,h){return this._spriteMosaic.addSpriteItem(e,t,i,s,r,a,n,o,c,h)}}function A(e){switch(e.type){case"CIMVectorMarker":case"CIMPictureMarker":return U(e);default:return!0}}const G=e=>null!=e&&e.startsWith("data:image/gif"),B=e=>e&&(e.includes(".gif")||G(e)),O=e=>null!=e&&e.startsWith("data:image/png"),N=e=>e&&(e.includes(".png")||O(e)),U=e=>e&&"markerPlacement"in e&&e.markerPlacement&&"CIMMarkerPlacementInsidePolygon"===e.markerPlacement.type;export{F as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{labelPlacementOffsetPadding as e}from"../definitions.js";import i from"./BoundingBox.js";import{serializeList as t,deserializeList as s}from"../util/serializationUtils.js";const r=2;class h{constructor(e,i,t,s,r,h,n,a,o,l,d=[],c=0,u=0){this.displayId=e,this.labelClassId=i,this.hash=t,this.anchorX=s,this.anchorY=r,this.directionX=h,this.directionY=n,this.maxScale=a,this.minScale=o,this.referenceBounds=l,this.bounds=d,this.recordStart=c,this.recordCount=u,this.priority=0,this._colliders=null,this.uniqueSymbol=null,this.selectedForRendering=!1}get xTile(){return this.anchorX}get yTile(){return this.anchorY}colliders(i){if(!this._colliders){const t=i.attributeView,s=e;let h=this.referenceBounds?.size??0;const n=i.layerView.labelingCollisionInfos[0].vvEvaluators[0];if(null!=n){const e=n(t.getVisualVariableData(this.displayId,0));h=isNaN(e)||null==e||e===1/0?h:e}const a=this.minScale?i.layerView.view.featuresTilingScheme.scaleToZoom(this.minScale):0,o=this.maxScale?i.layerView.view.featuresTilingScheme.scaleToZoom(this.maxScale):25,l=this.directionX*(s+h/2),d=this.directionY*(s+h/2);this._colliders=this.bounds.map(e=>({xTile:this.anchorX,yTile:this.anchorY,dxPixels:e.x-e.halfWidth+l,dyPixels:e.y-e.halfHeight+d,hard:!0,partIndex:1,width:e.width+r,height:e.height+r,angle:0,xScreen:0,yScreen:0,dxScreen:0,dyScreen:0,enabled:!0,minLod:a,maxLod:o}))}return this._colliders}get id(){return this.displayId}serialize(e){e.push(this.displayId),e.push(this.labelClassId),e.push(this.hash),e.push(this.recordStart),e.push(this.recordCount),e.writeF32(this.anchorX),e.writeF32(this.anchorY),e.writeF32(this.directionX),e.writeF32(this.directionY),e.writeF32(this.maxScale),e.writeF32(this.minScale),this.referenceBounds?(e.writeF32(this.referenceBounds.size),e.writeF32(this.referenceBounds.offsetX),e.writeF32(this.referenceBounds.offsetY)):(e.writeF32(0),e.writeF32(0),e.writeF32(0)),t(e,this.bounds)}static deserialize(e){const t=e.readInt32(),r=e.readInt32(),n=e.readInt32(),a=e.readInt32(),o=e.readInt32(),l=e.readF32(),d=e.readF32(),c=e.readF32(),u=e.readF32(),f=e.readF32(),m=e.readF32(),F=e.readF32(),w=e.readF32(),S=e.readF32(),p=s(e,i)??[];return new h(t,r,n,l,d,c,u,f,m,{size:F,offsetX:w,offsetY:S},p,a,o)}}export{h as LabelMetric};
5
+ import{labelPlacementOffsetPadding as e}from"../definitions.js";import i from"./BoundingBox.js";import{serializeList as t,deserializeList as s}from"../util/serializationUtils.js";const r=2;class h{constructor(e,i,t,s,r,h,a,n,l,o,d,c=[],u=0,f=0){this.displayId=e,this.labelClassId=i,this.labelIdHash=t,this.hash=s,this.anchorX=r,this.anchorY=h,this.directionX=a,this.directionY=n,this.maxScale=l,this.minScale=o,this.referenceBounds=d,this.bounds=c,this.recordStart=u,this.recordCount=f,this.priority=0,this._colliders=null,this.uniqueSymbol=null,this.selectedForRendering=!1}get xTile(){return this.anchorX}get yTile(){return this.anchorY}colliders(i){if(!this._colliders){const t=i.attributeView,s=e;let h=this.referenceBounds?.size??0;const a=i.layerView.labelingCollisionInfos[0].vvEvaluators[0];if(null!=a){const e=a(t.getVisualVariableData(this.displayId,0));h=isNaN(e)||null==e||e===1/0?h:e}const n=this.minScale?i.layerView.view.featuresTilingScheme.scaleToZoom(this.minScale):0,l=this.maxScale?i.layerView.view.featuresTilingScheme.scaleToZoom(this.maxScale):25,o=this.directionX*(s+h/2),d=this.directionY*(s+h/2);this._colliders=this.bounds.map(e=>({labelId:this.labelIdHash,xTile:this.anchorX,yTile:this.anchorY,dxPixels:e.x-e.halfWidth+o,dyPixels:e.y-e.halfHeight+d,hard:!0,partIndex:1,width:e.width+r,height:e.height+r,angle:0,xScreen:0,yScreen:0,dxScreen:0,dyScreen:0,enabled:!0,minLod:n,maxLod:l}))}return this._colliders}get id(){return this.displayId}serialize(e){e.push(this.displayId),e.push(this.labelClassId),e.push(this.labelIdHash),e.push(this.hash),e.push(this.recordStart),e.push(this.recordCount),e.writeF32(this.anchorX),e.writeF32(this.anchorY),e.writeF32(this.directionX),e.writeF32(this.directionY),e.writeF32(this.maxScale),e.writeF32(this.minScale),this.referenceBounds?(e.writeF32(this.referenceBounds.size),e.writeF32(this.referenceBounds.offsetX),e.writeF32(this.referenceBounds.offsetY)):(e.writeF32(0),e.writeF32(0),e.writeF32(0)),t(e,this.bounds)}static deserialize(e){const t=e.readInt32(),r=e.readInt32(),a=e.readInt32(),n=e.readInt32(),l=e.readInt32(),o=e.readInt32(),d=e.readF32(),c=e.readF32(),u=e.readF32(),f=e.readF32(),m=e.readF32(),F=e.readF32(),w=e.readF32(),I=e.readF32(),p=e.readF32(),S=s(e,i)??[];return new h(t,r,a,n,d,c,u,f,m,F,{size:w,offsetX:I,offsetY:p},S,l,o)}}export{h as LabelMetric};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{memoize as e}from"../../../../../../../core/MapUtils.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{numericHash as i}from"../../../../../../../core/string.js";import{fromRotation as r,translate as s}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as o}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as n,set as a,sub as l,normalize as h,add as c,scale as m}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as d}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{create as u}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{GeometryCursor as f}from"../../../../../../../geometry/GeometryCursor.js";import{generalizeOptimizedGeometry as g,convertToGeometry as _}from"../../../../../../../layers/graphics/featureConversionUtils.js";import p from"../../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as b,minMaxZoomPrecisionFactor as x}from"../../../definitions.js";import M from"../../../collisions/BoundingBox.js";import{LabelMetric as v}from"../../../collisions/LabelMetric.js";import{smoothPaths as y,pathDivide as P}from"../../../mesh/templates/segmentUtils.js";import{getMinMaxZoom as w,processColorInput as L}from"../fill/meshWriterUtils.js";import{TextMeshWriter as I,maxLabelZoom as B}from"../text/TextMeshWriter.js";const S=1,z=0,A=128;function D(e,t,r){return i(`${e}${t}${r}`)}function j(e,t,r,s,o){return i(`${e}${o}${t}${r*2**(B-s)}`)}const G=e(e=>{let t=0;if(0===e)return 1/0;for(;!(e%2);)t++,e/=2;return t});class Z extends I{constructor(){super(...arguments),this._zoomLevel=0}_write(e,t,i,r){if(this._zoomLevel=r||0,null!=i)throw new Error("InternalError: EffectGeometry not support for LabelMeshWriter");switch(t.geometryType){case"esriGeometryPoint":{const i=t.readXForDisplay(),r=t.readYForDisplay();this._writePoint(e,i,r,0,t);break}case"esriGeometryEnvelope":case"esriGeometryPolygon":{const i=t.readCentroidForDisplay();if(!i)return;const[r,s]=i.coords;this._writePoint(e,r,s,0,t);break}case"esriGeometryMultipoint":{let i=0;const r=f.fromFeatureSetReader(t);if(r?.nextPath())for(;r.nextPoint();)this._writePoint(e,r.x,r.y,i++,t);break}case"esriGeometryPolyline":this._writeLines(e,t)}}_getMetricDir(){const{horizontalAlignment:e,verticalAlignment:t}=this.evaluatedMeshParams;return["center"===e?0:"right"===e?-1:1,"middle"===t?0:"bottom"===t?-1:1]}_createLineLabelMetric(e,t,i,r,s){const[o,n]=this._getMetricDir(),a=this.evaluatedMeshParams.scaleInfo?.maxScale??0,l=this.evaluatedMeshParams.scaleInfo?.minScale??0,h=this.evaluatedMeshParams.labelClassId;return new v(e,h,t,i,r,o,n,a,l,s)}_writePoint(e,t,i,r,s){if(t<0||t>b||i<0||i>b)return;const o=this._getShaping();if(!o)return;const n=s.getDisplayId(),a=this.evaluatedMeshParams.labelClassId,l=D(s.getObjectId(),a,r),[h,c]=this._getMetricDir(),m=this.evaluatedMeshParams.scaleInfo?.maxScale??0,d=this.evaluatedMeshParams.scaleInfo?.minScale??0,u=this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0};e.metricStart(new v(n,a,l,t,i,h,c,m,d,u)),this._writeGlyphs(e,n,t,i,o,0,u,void 0,!1),e.metricBoxWrite(o.boundsT),e.metricEnd()}_getPointReferenceBounds(){if(!this._references)return null;for(const e of this._references){const t=e.getBoundsInfo();if(t)return t}return null}_writeLines(e,t){const{scaleInfo:i,verticalAlignment:r}=this.evaluatedMeshParams,s=this.evaluatedMeshParams.repeatLabelDistance||128,o=this._getShaping("middle");if(!o)return;const n=(e,t,i,r)=>this._placeSubdivGlyphs(e,t,i,r),a=(o.bounds.width+s)/(1<<S);this._current={out:e,id:t.getDisplayId(),objId:t.getObjectId(),shaping:o,zoomRange:w(i,this.getTileInfo()),referenceBounds:this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0},offsetDirection:null,pathIndex:0},this._verticalPlacement="bottom"===r?"above":"top"===r?"below":null,this._verticalPlacement?this._writeAboveAndBelowAlong(t,n,a):this._writeCenterAlong(t,n,a)}_writeAboveAndBelowAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=s.bounds.halfHeight,n=e.readGeometryForDisplay();if(!n)return;const a=new p;g(a,n,!1,!1,"esriGeometryPolyline",1);const l=k(new p,a,o),h=k(new p,a,-o),c=_(h,"esriGeometryPolyline",!1,!1),m=_(l,"esriGeometryPolyline",!1,!1),d=y(m.paths,s.bounds.width),u=y(c.paths,s.bounds.width);this._current.offsetDirection="above";for(let f=0;f<d.length;f++)this._current.pathIndex=f,P(d[f],i,t,!!r);this._current.offsetDirection="below";for(let f=0;f<u.length;f++)this._current.pathIndex=f,P(u[f],i,t,!!r)}_writeCenterAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=y(e.readLegacyGeometryForDisplay().paths,s.bounds.width);for(let n=0;n<o.length;n++)this._current.pathIndex=n,P(o[n],i,t,!!r)}_placeSubdivGlyphs(e,t,i,r){const{allowOverrun:s,labelPosition:o,repeatLabelDistance:n}=this.evaluatedMeshParams,a=this._current.zoomRange[0],l=G(t),h=this._current.shaping.bounds.width/(1<<S),c=Math.sqrt(n||A)/(1<<S),m=Math.min(i,r-i),d=this._current.shaping.isMultiline?B:Math.log2(m/(c+h/2)),u=0===t?d:Math.min(l,d),f=Math.max(a,this._zoomLevel+S-u),g=this._zoomLevel-f,_=this._current.shaping.bounds.width/2*2**g,p=j(this._current.objId,this._current.pathIndex,t,this._zoomLevel,this.evaluatedMeshParams.labelClassId);this._current.shaping.isMultiline?0===t&&this._placeStraight(e,f,p):s&&g<0?this._placeStraightAlong(e,a,p):"parallel"===o?this._placeStraightAlong(e,f,p):"curved"===o&&this._placeCurved(e,f,_,p)}_placeStraight(e,t,i){const{out:r,id:s,shaping:o,referenceBounds:n}=this._current,{x:a,y:l}=e;r.metricStart(this._createLineLabelMetric(s,i,a,l)),r.metricBoxWrite(o.boundsT);const h=e.angle*(180/Math.PI)%360,c=(e.angle*(180/Math.PI)+180)%360,m={clipAngle:h,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(r,s,a,l,o,0,n,m,!1);const d={clipAngle:c,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(r,s,a,l,o,0,n,d,!1),r.metricEnd()}_placeCurved(e,t,i,r){const{out:s,id:o}=this._current;s.metricStart(this._createLineLabelMetric(o,r,e.x,e.y));const n=e.clone(),a=e.angle*(180/Math.PI)%360,l=(e.angle*(180/Math.PI)+180)%360;this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(n,t,1,a),this._placeBack(e,n,t,i,1,a),this._placeForward(e,n,t,i,1,a)),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(n,t,0,l),this._placeBack(e,n,t,i,0,l),this._placeForward(e,n,t,i,0,l)),s.metricEnd()}_placeStraightAlong(e,i,n){const{out:a,id:l,shaping:h,zoomRange:c,referenceBounds:m}=this._current,{boxBorderLineColor:u,boxBackgroundColor:f}=this.evaluatedMeshParams,g=e.clone(),_=e.angle*(180/Math.PI)%360,p=(e.angle*(180/Math.PI)+180)%360,b=h.glyphs.length>0&&!(!u&&!f);if(a.metricStart(this._createLineLabelMetric(l,n,e.x,e.y)),b){const n=Math.max(i,c[0],0),u=Math.min(B,c[1]),f=r(o(),-e.angle),g={minZoom:n,maxZoom:u,clipAngle:_,mapAligned:!0,isLineLabel:!0},b=t(this.evaluatedMeshParams.offsetX),x=t(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const t=d(b,-1*x),[i,r]=h.shapeBackground(s(o(),f,t));a.recordStart(this.instanceId,this.attributeLayout,h.glyphs[0].textureBinding),this._writeTextBox(a,l,e.x,e.y,r,m,g),a.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const t=d(b,x),[i,r]=h.shapeBackground(s(o(),f,t));g.clipAngle=p,a.recordStart(this.instanceId,this.attributeLayout,h.glyphs[0].textureBinding),this._writeTextBox(a,l,e.x,e.y,r,m,g),a.recordEnd()}}this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(g,i,1,_,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(g,i,0,p,!0),a.metricEnd()}_placeBack(e,t,i,r,s,o){const n=e.clone();let a=e.backwardLength+z;for(;n.prev()&&!(a>=r);)this._placeOnSegment(n,t,a,i,-1,s,o),a+=n.length+z}_placeForward(e,t,i,r,s,o){const n=e.clone();let a=e.remainingLength+z;for(;n.next()&&!(a>=r);)this._placeOnSegment(n,t,a,i,1,s,o),a+=n.length+z}_placeFirst(e,i,s,a,l=!1){const{out:h,id:c,shaping:m,zoomRange:u,referenceBounds:f}=this._current,g=m.glyphs,_=t(this.evaluatedMeshParams.offsetX),p=t(this.evaluatedMeshParams.offsetY),b=d(_,p),x=r(o(),-e.angle);n(b,b,x);for(const t of g){const r=t.x>m.bounds.x?s:1-s,o=r*e.remainingLength+(1-r)*e.backwardLength,n=Math.abs(t.x+t.width/2-m.bounds.x),d=Math.max(0,this._zoomLevel+Math.log2(n/(o+z))),g=Math.max(i,l?0:d);if(t.maxZoom=Math.min(u[1],B),t.angle=e.angle+(1-s)*Math.PI,t.minZoom=Math.max(u[0],g),this._writeLineGlyph(h,c,e.x,e.y,t,a,f,!0),(s||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom)){const e=new M(t.bounds.x+b[0],t.bounds.y+b[1],t.bounds.width,t.bounds.height);h.metricBoxWrite(e)}}}_placeOnSegment(e,i,s,a,l,h,c){const{out:m,id:u,shaping:f,referenceBounds:g}=this._current,_=f.glyphs,p=e.dx/e.length,b=e.dy/e.length,x={x:e.x+s*-l*p,y:e.y+s*-l*b},v=t(this.evaluatedMeshParams.offsetX),y=t(this.evaluatedMeshParams.offsetY),P=d(v,y),w=r(o(),-e.angle);n(P,P,w);for(const t of _){const i=t.x>f.bounds.x?h:1-h;if(!(i&&1===l||!i&&-1===l))continue;const r=Math.abs(t.x+t.width/2-f.bounds.x),o=Math.max(0,this._zoomLevel+Math.log2(r/s)-.1),n=Math.max(a,this._zoomLevel+Math.log2(r/(s+e.length+z)));if(0!==o&&(t.angle=e.angle+(1-h)*Math.PI,t.minZoom=n,t.maxZoom=o,this._writeLineGlyph(m,u,x.x,x.y,t,c,g,!0),(h||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom))){const e=new M(t.bounds.x+P[0],t.bounds.y+P[1],t.bounds.width,t.bounds.height);m.metricBoxWrite(e)}}}_writeLineGlyph(e,t,i,r,s,o,n,a){if(i<0||i>b||r<0||r>b)return;e.recordStart(this.instanceId,this.attributeLayout,s.textureBinding);const{texcoords:l,offsets:h}=s,{fontSize:c,haloSize:m,outlineSize:d}=this._textMeshTransformProps;this._writeQuad(e,t,i,r,{texcoords:l,offsets:h,fontSize:c,haloSize:m,outlineSize:d,color:L(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:n,minZoom:Math.max(this._current.zoomRange[0],s.minZoom),maxZoom:Math.min(this._current.zoomRange[1],s.maxZoom),clipAngle:o,mapAligned:a,isLineLabel:!0}),e.recordEnd()}_packedZoom(e){return Math.floor(e*x)/x}_isVisible(e,t){let i=Math.max(this._current.zoomRange[0],e),r=Math.min(this._current.zoomRange[1],t);i=this._packedZoom(i),r=this._packedZoom(r);const s=this._packedZoom(this._zoomLevel);return i<=s&&s<=r}}function k(e,t,i){const{coords:r,lengths:s}=t,o=u(),n=u(),d=u(),f=u(),g=u(),_=u(),p=2;let b=0;for(let u=0;u<s.length;u++){const t=s[u];for(let s=0;s<t;s++){const u=p*(s+b-1),x=p*(s+b),M=p*(s+b+1);s>0?a(o,r[u],r[u+1]):a(o,0,0),a(n,r[x],r[x+1]),s<t-1?a(d,r[M],r[M+1]):a(d,0,0),0===s?a(f,0,0):(l(f,n,o),h(f,f),a(f,f[1],-f[0])),s===t-1?a(g,0,0):(l(g,d,n),h(g,g),a(g,g[1],-g[0])),c(_,f,g),h(_,_);const v=_[0]*g[0]+_[1]*g[1];0!==v&&m(_,_,v),m(_,_,i),e.coords.push(n[0]+_[0],n[1]+_[1])}e.lengths.push(t),b+=t}return e}export{Z as LabelMeshWriter,D as labelMetricHash,j as lineLabelMetricHash};
5
+ import{memoize as e}from"../../../../../../../core/MapUtils.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{numericHash as i}from"../../../../../../../core/string.js";import{fromRotation as r,translate as s}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as o}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as n,set as a,sub as l,normalize as h,add as c,scale as m}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as u}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{create as d}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{GeometryCursor as f}from"../../../../../../../geometry/GeometryCursor.js";import{generalizeOptimizedGeometry as g,convertToGeometry as _}from"../../../../../../../layers/graphics/featureConversionUtils.js";import p from"../../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as b,minMaxZoomPrecisionFactor as x}from"../../../definitions.js";import M from"../../../collisions/BoundingBox.js";import{LabelMetric as v}from"../../../collisions/LabelMetric.js";import{smoothPaths as y,pathDivide as P}from"../../../mesh/templates/segmentUtils.js";import{getMinMaxZoom as w,processColorInput as L}from"../fill/meshWriterUtils.js";import{TextMeshWriter as I,maxLabelZoom as B}from"../text/TextMeshWriter.js";const S=1,z=0,j=128;function A(e,t){return i(`${e}${t}`)}function D(e,t,r){return i(`${e}${t}${r}`)}function G(e,t,r,s){return i(`${e}${t}${r*2**(B-s)}`)}function Z(e,t,r,s,o){return i(`${e}${o}${t}${r*2**(B-s)}`)}const k=e(e=>{let t=0;if(0===e)return 1/0;for(;!(e%2);)t++,e/=2;return t});class F extends I{constructor(){super(...arguments),this._zoomLevel=0}_write(e,t,i,r){if(this._zoomLevel=r||0,null!=i)throw new Error("InternalError: EffectGeometry not support for LabelMeshWriter");switch(t.geometryType){case"esriGeometryPoint":{const i=t.readXForDisplay(),r=t.readYForDisplay();this._writePoint(e,i,r,0,t);break}case"esriGeometryEnvelope":case"esriGeometryPolygon":{const i=t.readCentroidForDisplay();if(!i)return;const[r,s]=i.coords;this._writePoint(e,r,s,0,t);break}case"esriGeometryMultipoint":{let i=0;const r=f.fromFeatureSetReader(t);if(r?.nextPath())for(;r.nextPoint();)this._writePoint(e,r.x,r.y,i++,t);break}case"esriGeometryPolyline":this._writeLines(e,t)}}_getMetricDir(){const{horizontalAlignment:e,verticalAlignment:t}=this.evaluatedMeshParams;return["center"===e?0:"right"===e?-1:1,"middle"===t?0:"bottom"===t?-1:1]}_createLineLabelMetric(e,t,i,r,s,o){const[n,a]=this._getMetricDir(),l=this.evaluatedMeshParams.scaleInfo?.maxScale??0,h=this.evaluatedMeshParams.scaleInfo?.minScale??0,c=this.evaluatedMeshParams.labelClassId;return new v(e,c,t,i,r,s,n,a,l,h,o)}_writePoint(e,t,i,r,s){if(t<0||t>b||i<0||i>b)return;const o=this._getShaping();if(!o)return;const n=s.getDisplayId(),a=this.evaluatedMeshParams.labelClassId,l=A(s.getObjectId(),r),h=D(s.getObjectId(),a,r),[c,m]=this._getMetricDir(),u=this.evaluatedMeshParams.scaleInfo?.maxScale??0,d=this.evaluatedMeshParams.scaleInfo?.minScale??0,f=this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0};e.metricStart(new v(n,a,l,h,t,i,c,m,u,d,f)),this._writeGlyphs(e,n,t,i,o,0,f,void 0,!1),e.metricBoxWrite(o.boundsT),e.metricEnd()}_getPointReferenceBounds(){if(!this._references)return null;for(const e of this._references){const t=e.getBoundsInfo();if(t)return t}return null}_writeLines(e,t){const{scaleInfo:i,verticalAlignment:r}=this.evaluatedMeshParams,s=this.evaluatedMeshParams.repeatLabelDistance||128,o=this._getShaping("middle");if(!o)return;const n=(e,t,i,r)=>this._placeSubdivGlyphs(e,t,i,r),a=(o.bounds.width+s)/(1<<S);this._current={out:e,id:t.getDisplayId(),objId:t.getObjectId(),shaping:o,zoomRange:w(i,this.getTileInfo()),referenceBounds:this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0},offsetDirection:null,pathIndex:0},this._verticalPlacement="bottom"===r?"above":"top"===r?"below":null,this._verticalPlacement?this._writeAboveAndBelowAlong(t,n,a):this._writeCenterAlong(t,n,a)}_writeAboveAndBelowAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=s.bounds.halfHeight,n=e.readGeometryForDisplay();if(!n)return;const a=new p;g(a,n,!1,!1,"esriGeometryPolyline",1);const l=C(new p,a,o),h=C(new p,a,-o),c=_(h,"esriGeometryPolyline",!1,!1),m=_(l,"esriGeometryPolyline",!1,!1),u=y(m.paths,s.bounds.width),d=y(c.paths,s.bounds.width);this._current.offsetDirection="above";for(let f=0;f<u.length;f++)this._current.pathIndex=f,P(u[f],i,t,!!r);this._current.offsetDirection="below";for(let f=0;f<d.length;f++)this._current.pathIndex=f,P(d[f],i,t,!!r)}_writeCenterAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=y(e.readLegacyGeometryForDisplay().paths,s.bounds.width);for(let n=0;n<o.length;n++)this._current.pathIndex=n,P(o[n],i,t,!!r)}_placeSubdivGlyphs(e,t,i,r){const{allowOverrun:s,labelPosition:o,repeatLabelDistance:n}=this.evaluatedMeshParams,a=this._current.zoomRange[0],l=k(t),h=this._current.shaping.bounds.width/(1<<S),c=Math.sqrt(n||j)/(1<<S),m=Math.min(i,r-i),u=this._current.shaping.isMultiline?B:Math.log2(m/(c+h/2)),d=0===t?u:Math.min(l,u),f=Math.max(a,this._zoomLevel+S-d),g=this._zoomLevel-f,_=this._current.shaping.bounds.width/2*2**g,p=G(this._current.objId,this._current.pathIndex,t,this._zoomLevel),b=Z(this._current.objId,this._current.pathIndex,t,this._zoomLevel,this.evaluatedMeshParams.labelClassId);this._current.shaping.isMultiline?0===t&&this._placeStraight(e,f,p,b):s&&g<0?this._placeStraightAlong(e,a,p,b):"parallel"===o?this._placeStraightAlong(e,f,p,b):"curved"===o&&this._placeCurved(e,f,_,p,b)}_placeStraight(e,t,i,r){const{out:s,id:o,shaping:n,referenceBounds:a}=this._current,{x:l,y:h}=e;s.metricStart(this._createLineLabelMetric(o,i,r,l,h)),s.metricBoxWrite(n.boundsT);const c=e.angle*(180/Math.PI)%360,m=(e.angle*(180/Math.PI)+180)%360,u={clipAngle:c,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(s,o,l,h,n,0,a,u,!1);const d={clipAngle:m,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(s,o,l,h,n,0,a,d,!1),s.metricEnd()}_placeCurved(e,t,i,r,s){const{out:o,id:n}=this._current;o.metricStart(this._createLineLabelMetric(n,r,s,e.x,e.y));const a=e.clone(),l=e.angle*(180/Math.PI)%360,h=(e.angle*(180/Math.PI)+180)%360;this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(a,t,1,l),this._placeBack(e,a,t,i,1,l),this._placeForward(e,a,t,i,1,l)),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(a,t,0,h),this._placeBack(e,a,t,i,0,h),this._placeForward(e,a,t,i,0,h)),o.metricEnd()}_placeStraightAlong(e,i,n,a){const{out:l,id:h,shaping:c,zoomRange:m,referenceBounds:d}=this._current,{boxBorderLineColor:f,boxBackgroundColor:g}=this.evaluatedMeshParams,_=e.clone(),p=e.angle*(180/Math.PI)%360,b=(e.angle*(180/Math.PI)+180)%360,x=c.glyphs.length>0&&!(!f&&!g);if(l.metricStart(this._createLineLabelMetric(h,n,a,e.x,e.y)),x){const n=Math.max(i,m[0],0),a=Math.min(B,m[1]),f=r(o(),-e.angle),g={minZoom:n,maxZoom:a,clipAngle:p,mapAligned:!0,isLineLabel:!0},_=t(this.evaluatedMeshParams.offsetX),x=t(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const t=u(_,-1*x),[i,r]=c.shapeBackground(s(o(),f,t));l.recordStart(this.instanceId,this.attributeLayout,c.glyphs[0].textureBinding),this._writeTextBox(l,h,e.x,e.y,r,d,g),l.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const t=u(_,x),[i,r]=c.shapeBackground(s(o(),f,t));g.clipAngle=b,l.recordStart(this.instanceId,this.attributeLayout,c.glyphs[0].textureBinding),this._writeTextBox(l,h,e.x,e.y,r,d,g),l.recordEnd()}}this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(_,i,1,p,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(_,i,0,b,!0),l.metricEnd()}_placeBack(e,t,i,r,s,o){const n=e.clone();let a=e.backwardLength+z;for(;n.prev()&&!(a>=r);)this._placeOnSegment(n,t,a,i,-1,s,o),a+=n.length+z}_placeForward(e,t,i,r,s,o){const n=e.clone();let a=e.remainingLength+z;for(;n.next()&&!(a>=r);)this._placeOnSegment(n,t,a,i,1,s,o),a+=n.length+z}_placeFirst(e,i,s,a,l=!1){const{out:h,id:c,shaping:m,zoomRange:d,referenceBounds:f}=this._current,g=m.glyphs,_=t(this.evaluatedMeshParams.offsetX),p=t(this.evaluatedMeshParams.offsetY),b=u(_,p),x=r(o(),-e.angle);n(b,b,x);for(const t of g){const r=t.x>m.bounds.x?s:1-s,o=r*e.remainingLength+(1-r)*e.backwardLength,n=Math.abs(t.x+t.width/2-m.bounds.x),u=Math.max(0,this._zoomLevel+Math.log2(n/(o+z))),g=Math.max(i,l?0:u);if(t.maxZoom=Math.min(d[1],B),t.angle=e.angle+(1-s)*Math.PI,t.minZoom=Math.max(d[0],g),this._writeLineGlyph(h,c,e.x,e.y,t,a,f,!0),(s||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom)){const e=new M(t.bounds.x+b[0],t.bounds.y+b[1],t.bounds.width,t.bounds.height);h.metricBoxWrite(e)}}}_placeOnSegment(e,i,s,a,l,h,c){const{out:m,id:d,shaping:f,referenceBounds:g}=this._current,_=f.glyphs,p=e.dx/e.length,b=e.dy/e.length,x={x:e.x+s*-l*p,y:e.y+s*-l*b},v=t(this.evaluatedMeshParams.offsetX),y=t(this.evaluatedMeshParams.offsetY),P=u(v,y),w=r(o(),-e.angle);n(P,P,w);for(const t of _){const i=t.x>f.bounds.x?h:1-h;if(!(i&&1===l||!i&&-1===l))continue;const r=Math.abs(t.x+t.width/2-f.bounds.x),o=Math.max(0,this._zoomLevel+Math.log2(r/s)-.1),n=Math.max(a,this._zoomLevel+Math.log2(r/(s+e.length+z)));if(0!==o&&(t.angle=e.angle+(1-h)*Math.PI,t.minZoom=n,t.maxZoom=o,this._writeLineGlyph(m,d,x.x,x.y,t,c,g,!0),(h||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom))){const e=new M(t.bounds.x+P[0],t.bounds.y+P[1],t.bounds.width,t.bounds.height);m.metricBoxWrite(e)}}}_writeLineGlyph(e,t,i,r,s,o,n,a){if(i<0||i>b||r<0||r>b)return;e.recordStart(this.instanceId,this.attributeLayout,s.textureBinding);const{texcoords:l,offsets:h}=s,{fontSize:c,haloSize:m,outlineSize:u}=this._textMeshTransformProps;this._writeQuad(e,t,i,r,{texcoords:l,offsets:h,fontSize:c,haloSize:m,outlineSize:u,color:L(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:n,minZoom:Math.max(this._current.zoomRange[0],s.minZoom),maxZoom:Math.min(this._current.zoomRange[1],s.maxZoom),clipAngle:o,mapAligned:a,isLineLabel:!0}),e.recordEnd()}_packedZoom(e){return Math.floor(e*x)/x}_isVisible(e,t){let i=Math.max(this._current.zoomRange[0],e),r=Math.min(this._current.zoomRange[1],t);i=this._packedZoom(i),r=this._packedZoom(r);const s=this._packedZoom(this._zoomLevel);return i<=s&&s<=r}}function C(e,t,i){const{coords:r,lengths:s}=t,o=d(),n=d(),u=d(),f=d(),g=d(),_=d(),p=2;let b=0;for(let d=0;d<s.length;d++){const t=s[d];for(let s=0;s<t;s++){const d=p*(s+b-1),x=p*(s+b),M=p*(s+b+1);s>0?a(o,r[d],r[d+1]):a(o,0,0),a(n,r[x],r[x+1]),s<t-1?a(u,r[M],r[M+1]):a(u,0,0),0===s?a(f,0,0):(l(f,n,o),h(f,f),a(f,f[1],-f[0])),s===t-1?a(g,0,0):(l(g,u,n),h(g,g),a(g,g[1],-g[0])),c(_,f,g),h(_,_);const v=_[0]*g[0]+_[1]*g[1];0!==v&&m(_,_,v),m(_,_,i),e.coords.push(n[0]+_[0],n[1]+_[1])}e.lengths.push(t),b+=t}return e}export{F as LabelMeshWriter,A as labelIdHash,D as labelMetricHash,G as lineLabelIdHash,Z as lineLabelMetricHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import e from"../../../../Color.js";import i from"../../../../Graphic.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as r}from"../../../../core/reactiveUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{project as a,initializeProjection as h}from"../../../../geometry/projectionUtils.js";import{isValid as c}from"../../../../geometry/support/spatialReferenceUtils.js";import l from"../../../../layers/GraphicsLayer.js";import p from"../../../../symbols/CIMSymbol.js";import{applyCIMSymbolColor as d}from"../../../../symbols/support/cimSymbolUtils.js";import{DragManipulation as m}from"./manipulations/DragManipulation.js";import{primaryKey as y}from"../../../input/keys.js";import{InteractiveToolBase as _}from"../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as g}from"../../../interactive/editGeometry/EditGeometryOperations.js";const f={up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",toggleOpacity:"t",shift:"Shift",primaryKey:y},u=1,P=10,v=new e("#009af2");let S=class extends _{constructor(t){super(t),this._isOpacityToggled=!1,this._isModifierActive=!1,this._factor=1,this._initialControlPoints=null,this._graphicsLayer=new l({internal:!0,listMode:"hide",visible:!1,effect:"drop-shadow(0px, 0px, 3px)"}),this._undoStack=[],this._redoStack=[],this._sharedUndoStack=[],this._sharedRedoStack=[],this._highlightHandle=null,this.activeHandle=0,this.type="reshape"}initialize(){this._initialize()}destroy(){const{map:t}=this.view;this._controlPointManipulations.forEach(t=>t.destroy()),this._controlPointEditGeometryOperations.forEach(t=>t.destroy()),t.removeMany([this._graphicsLayer]),this._graphicsLayer.removeAll(),this._graphicsLayer=o(this._graphicsLayer),this._georeference=null,this._controlPointGraphics=null,this._controlPointManipulations=null,this._graphicsLayer=null,this._controlPointEditGeometryOperations=null,this._undoStack=null,this._redoStack=null,this._initialControlPoints=null,this._sharedUndoStack=null,this._sharedRedoStack=null}get _hasValidSpatialReference(){return c(this.view.spatialReference)}onActivate(){this.visible=!0}onDeactivate(){this.visible=!1}onShow(){this._graphicsLayer.visible=!0}onHide(){this._graphicsLayer.visible=!1}canUndo(){const t=this._undoStack[this._undoStack.length-1];return null!=t&&this._controlPointEditGeometryOperations[t].canUndo}canRedo(){const t=this._redoStack[this._redoStack.length-1];return null!=t&&this._controlPointEditGeometryOperations[t].canRedo}undo(){if(this._undoStack.length>0){const t=this._undoStack.pop();this._controlPointEditGeometryOperations[t].undo(),this.updateGraphics(),this._redoStack.push(t)}}redo(){if(this._redoStack.length>0){const t=this._redoStack.pop();this._controlPointEditGeometryOperations[t].redo(),this.updateGraphics(),this._undoStack.push(t)}}refresh(){const{mediaElement:t}=this;if(null==t.georeference)return;const e=t.georeference;"control-points"===e.type&&null!=e.coords&&(this._georeference=e,this._georeference.controlPoints.forEach(({mapPoint:t},e)=>{const i=this._controlPointEditGeometryOperations[e],o=i.data.components[0].vertices[0];i.setVertexPosition(o,i.data.coordinateHelper.pointToVector(t))}),this.updateGraphics())}reset(){this._georeference.controlPoints=this._initialControlPoints,this.refresh(),this._sharedUndoStack.length=0,this._sharedRedoStack.length=0}updateGraphics(){const t=this._georeference,e=t.controlPoints,i=e[0].mapPoint.spatialReference,o=this._hasValidSpatialReference;this._georeference.controlPoints=this._controlPointEditGeometryOperations.map((r,s)=>{const n=r.data.geometry;return this._controlPointGraphics[s].geometry=n,{mapPoint:a(n,i),sourcePoint:o?e[s].sourcePoint:t.toSource(n)}})}updateActiveHandle(t){if(this.activeHandle===t)return;const e=this._controlPointGraphics[this.activeHandle].symbol.clone();d(e,this.view.effectiveTheme.accentColor),this._controlPointGraphics[this.activeHandle].symbol=e;const i=this._controlPointGraphics[t].symbol.clone();d(i,v),this._controlPointGraphics[t].symbol=i,this.activeHandle=t,this.view.surface===document.activeElement&&this.highlightActiveHandle()}async highlightActiveHandle(){this.removeHighlightActiveHandle();const t=await this.view.whenLayerView(this._graphicsLayer);this._highlightHandle=t.highlight(this._controlPointGraphics[this.activeHandle])}removeHighlightActiveHandle(){this._highlightHandle&&this._highlightHandle.remove()}setSharedUndoStack(t){this._sharedUndoStack=t}setSharedRedoStack(t){this._sharedRedoStack=t}async _initialize(){const{view:t,mediaElement:e}=this;if(null==e.georeference)return;const o=e.georeference;"control-points"===o.type&&null!=o.coords&&(this._georeference=o,this._initialControlPoints=this._georeference.controlPoints,t.map.addMany([this._graphicsLayer]),t.focus(),this.visible=!1,this.finishToolCreation(),await this._loadProjectionEngine(),this._controlPointEditGeometryOperations=this._georeference.controlPoints.map(({mapPoint:e})=>g.fromGeometry(a(e,t.spatialReference),2)),this._controlPointGraphics=this._controlPointEditGeometryOperations.map((t,e)=>new i({symbol:new p({data:{type:"CIMSymbolReference",symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,colorLocked:!0,anchorPoint:{x:0,y:-15.75},anchorPointUnits:"Absolute",dominantSizeAxis3D:"Y",size:9,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:84.3,ymax:84.3},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[83.2,32.5],[84.3,40.7],[83.8,48.9],[81.7,56.9],[78.1,64.3],[73,70.9],[66.9,76.4],[59.7,80.5],[51.9,83.2],[43.7,84.3],[35.4,83.8],[27.4,81.7],[20,78],[13.4,73],[7.9,66.8],[3.8,59.7],[1.1,51.9],[0,43.7],[.5,35.4],[2.6,27.4],[6.3,20],[11.3,13.4],[17.5,7.9],[24.7,3.8],[32.5,1.1],[39.8,.1],[47.1,.3],[54.3,1.8],[61.1,4.5],[67.4,8.4],[72.9,13.3],[77.4,19.1],[80.9,25.5],[83.2,32.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,clippingPath:{type:"CIMClippingPath",clippingType:"Intersect",path:{rings:[[[0,0],[84.3,0],[84.3,84.3],[0,84.3],[0,0]]]}},rotation:0},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:-11.25},anchorPointUnits:"Absolute",dominantSizeAxis3D:"Y",size:22.5,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:197.7,ymax:294.7},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[98.9,0],[119.4,23.2],[139.4,49.3],[156.8,75.2],[171.2,100.8],[182.4,125.3],[190.6,148.8],[195.7,171.4],[197.7,192.9],[197.7,195.8],[197.7,200.3],[197.6,202.5],[197.5,204.8],[197.3,207.1],[197,209.4],[196.7,211.7],[196.4,214.1],[196,216.4],[195.5,218.7],[195,221.1],[194.4,223.4],[193.7,225.8],[193,228.1],[192.2,230.5],[191.4,232.8],[190.5,235.1],[189.5,237.5],[188.5,239.7],[187.4,242],[186.2,244.3],[185,246.5],[183.7,248.7],[182.4,250.9],[181,253.1],[179.5,255.2],[178,257.3],[176.4,259.4],[174.7,261.4],[173.1,263.3],[171.3,265.3],[169.5,267.2],[167.7,269],[165.8,270.8],[163.9,272.5],[161.9,274.2],[159.9,275.8],[157.8,277.4],[155.7,278.9],[153.6,280.4],[151.4,281.7],[149.2,283.1],[147,284.4],[144.8,285.6],[142.5,286.7],[140.3,287.8],[138,288.8],[135.7,289.8],[133.4,290.7],[131,291.5],[128.7,292.3],[126.4,293],[124,293.6],[121.7,294.2],[119.4,294.7],[117,295.2],[114.7,295.6],[112.4,296],[110.1,296.3],[107.8,296.5],[105.5,296.7],[103.3,296.8],[101.1,296.9],[98.8,296.9],[83.1,295.7],[67.8,292],[53.3,285.9],[39.9,277.5],[28.1,267.2],[18,255.1],[10,241.5],[4.2,226.9],[.9,211.5],[0,195.8],[.1,192.9],[2.1,171.4],[7.2,148.8],[15.4,125.3],[26.6,100.8],[41,75.2],[58.4,49.3],[78.4,23.2],[98.9,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:e===this.activeHandle?v.toArray():this.view.effectiveTheme.accentColor.toArray()}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,clippingPath:{type:"CIMClippingPath",clippingType:"Intersect",path:{rings:[[[0,0],[197.7,0],[197.7,294.7],[0,294.7],[0,0]]]}},rotation:0}],haloSize:1,scaleX:1,angleAlignment:"Display",angle:0}}}),geometry:t.data.geometry})),this._graphicsLayer.graphics.addMany([...this._controlPointGraphics]),this._controlPointManipulations=this._controlPointGraphics.map(e=>new m({tool:this,view:t,graphic:e})),this.addHandles([...this._controlPointManipulations.map((t,e)=>t.createDragPipeline(this._getInfo.bind(this,e),(t,i)=>{"start"===t.action&&(this._undoStack.push(e),this._redoStack=[],this._sharedUndoStack.push({tool:this,operation:i}),this._sharedRedoStack.length=0),this.updateGraphics()})),r(()=>this.view.scale,()=>this.active?this.updateGraphics():null)]),this._controlPointManipulations.forEach((t,e)=>{const i=t=>{this.addHandles([t.events.on(["click","grab-changed"],t=>this.updateActiveHandle(e))])};t.forEachManipulator(i)}),this.addHandles([t.on("key-down",i=>{t.activeTool===this&&(i.key!==f.shift||i.repeat||(this._isModifierActive=!0,i.stopPropagation()),i.key!==f.toggleOpacity||i.repeat||(e.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled,i.stopPropagation()),i.key!==f.primaryKey||i.repeat||(this._factor=P,i.stopPropagation()),this._isModifierActive&&(i.key===f.up&&(this._move(0,this._factor),i.stopPropagation()),i.key===f.down&&(this._move(0,-this._factor),i.stopPropagation()),i.key===f.left&&(this._move(-this._factor,0),i.stopPropagation()),i.key===f.right&&(this._move(this._factor,0),i.stopPropagation())))}),t.on("key-up",e=>{t.activeTool===this&&(e.key===f.shift&&(this._isModifierActive=!1,e.stopPropagation()),e.key===f.primaryKey&&(this._factor=u,e.stopPropagation()))})]))}async _loadProjectionEngine(){const t=this._georeference.controlPoints[0].mapPoint;return h(t.spatialReference,this.view.spatialReference)}_getInfo(t){return{editGeometryOperations:this._controlPointEditGeometryOperations[t],constraints:this._hasValidSpatialReference?null:{xmin:0,ymin:0,xmax:this._georeference.width,ymax:this._georeference.height}}}_move(t,e){const i=this._controlPointEditGeometryOperations[this.activeHandle].move(t*this.view.resolution,e*this.view.resolution,0,0);this._sharedUndoStack.push({tool:this,operation:i}),this._sharedRedoStack.length=0,this.updateGraphics()}};t([s()],S.prototype,"_hasValidSpatialReference",null),t([s()],S.prototype,"activeHandle",void 0),t([s({constructOnly:!0,nonNullable:!0})],S.prototype,"mediaElement",void 0),t([s({readOnly:!0})],S.prototype,"type",void 0),t([s({constructOnly:!0})],S.prototype,"view",void 0),S=t([n("esri.views.2d.interactive.editingTools.ControlPointsTransformTool")],S);export{S as ControlPointsTransformTool,f as keys};
5
+ import{__decorate as t}from"tslib";import e from"../../../../Color.js";import i from"../../../../Graphic.js";import{destroyMaybe as o}from"../../../../core/maybe.js";import{watch as r}from"../../../../core/reactiveUtils.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{project as a,initializeProjection as h}from"../../../../geometry/projectionUtils.js";import{isValid as c}from"../../../../geometry/support/spatialReferenceUtils.js";import l from"../../../../layers/GraphicsLayer.js";import p from"../../../../symbols/CIMSymbol.js";import{applyCIMSymbolColor as d}from"../../../../symbols/support/cimSymbolUtils.js";import{DragManipulation as m}from"./manipulations/DragManipulation.js";import{primaryKey as y}from"../../../input/keys.js";import{InteractiveToolBase as _}from"../../../interactive/InteractiveToolBase.js";import{EditGeometryOperations as g}from"../../../interactive/editGeometry/EditGeometryOperations.js";const f={up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",toggleOpacity:"t",shift:"Shift",primaryKey:y},u=1,P=10,v=new e("#009af2");let S=class extends _{constructor(t){super(t),this._isOpacityToggled=!1,this._isModifierActive=!1,this._factor=1,this._initialControlPoints=null,this._graphicsLayer=new l({internal:!0,listMode:"hide",visible:!1,effect:"drop-shadow(0px, 0px, 3px)",title:"ControlPointsTransformationTool layer"}),this._undoStack=[],this._redoStack=[],this._sharedUndoStack=[],this._sharedRedoStack=[],this._highlightHandle=null,this.activeHandle=0,this.type="reshape"}initialize(){this._initialize()}destroy(){const{map:t}=this.view;this._controlPointManipulations.forEach(t=>t.destroy()),this._controlPointEditGeometryOperations.forEach(t=>t.destroy()),t.removeMany([this._graphicsLayer]),this._graphicsLayer.removeAll(),this._graphicsLayer=o(this._graphicsLayer),this._georeference=null,this._controlPointGraphics=null,this._controlPointManipulations=null,this._graphicsLayer=null,this._controlPointEditGeometryOperations=null,this._undoStack=null,this._redoStack=null,this._initialControlPoints=null,this._sharedUndoStack=null,this._sharedRedoStack=null}get _hasValidSpatialReference(){return c(this.view.spatialReference)}onActivate(){this.visible=!0}onDeactivate(){this.visible=!1}onShow(){this._graphicsLayer.visible=!0}onHide(){this._graphicsLayer.visible=!1}canUndo(){const t=this._undoStack[this._undoStack.length-1];return null!=t&&this._controlPointEditGeometryOperations[t].canUndo}canRedo(){const t=this._redoStack[this._redoStack.length-1];return null!=t&&this._controlPointEditGeometryOperations[t].canRedo}undo(){if(this._undoStack.length>0){const t=this._undoStack.pop();this._controlPointEditGeometryOperations[t].undo(),this.updateGraphics(),this._redoStack.push(t)}}redo(){if(this._redoStack.length>0){const t=this._redoStack.pop();this._controlPointEditGeometryOperations[t].redo(),this.updateGraphics(),this._undoStack.push(t)}}refresh(){const{mediaElement:t}=this;if(null==t.georeference)return;const e=t.georeference;"control-points"===e.type&&null!=e.coords&&(this._georeference=e,this._georeference.controlPoints.forEach(({mapPoint:t},e)=>{const i=this._controlPointEditGeometryOperations[e],o=i.data.components[0].vertices[0];i.setVertexPosition(o,i.data.coordinateHelper.pointToVector(t))}),this.updateGraphics())}reset(){this._georeference.controlPoints=this._initialControlPoints,this.refresh(),this._sharedUndoStack.length=0,this._sharedRedoStack.length=0}updateGraphics(){const t=this._georeference,e=t.controlPoints,i=e[0].mapPoint.spatialReference,o=this._hasValidSpatialReference;this._georeference.controlPoints=this._controlPointEditGeometryOperations.map((r,s)=>{const n=r.data.geometry;return this._controlPointGraphics[s].geometry=n,{mapPoint:a(n,i),sourcePoint:o?e[s].sourcePoint:t.toSource(n)}})}updateActiveHandle(t){if(this.activeHandle===t)return;const e=this._controlPointGraphics[this.activeHandle].symbol.clone();d(e,this.view.effectiveTheme.accentColor),this._controlPointGraphics[this.activeHandle].symbol=e;const i=this._controlPointGraphics[t].symbol.clone();d(i,v),this._controlPointGraphics[t].symbol=i,this.activeHandle=t,this.view.surface===document.activeElement&&this.highlightActiveHandle()}async highlightActiveHandle(){this.removeHighlightActiveHandle();const t=await this.view.whenLayerView(this._graphicsLayer);this._highlightHandle=t.highlight(this._controlPointGraphics[this.activeHandle])}removeHighlightActiveHandle(){this._highlightHandle&&this._highlightHandle.remove()}setSharedUndoStack(t){this._sharedUndoStack=t}setSharedRedoStack(t){this._sharedRedoStack=t}async _initialize(){const{view:t,mediaElement:e}=this;if(null==e.georeference)return;const o=e.georeference;"control-points"===o.type&&null!=o.coords&&(this._georeference=o,this._initialControlPoints=this._georeference.controlPoints,t.map.addMany([this._graphicsLayer]),t.focus(),this.visible=!1,this.finishToolCreation(),await this._loadProjectionEngine(),this._controlPointEditGeometryOperations=this._georeference.controlPoints.map(({mapPoint:e})=>g.fromGeometry(a(e,t.spatialReference),2)),this._controlPointGraphics=this._controlPointEditGeometryOperations.map((t,e)=>new i({symbol:new p({data:{type:"CIMSymbolReference",symbol:{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,colorLocked:!0,anchorPoint:{x:0,y:-15.75},anchorPointUnits:"Absolute",dominantSizeAxis3D:"Y",size:9,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:84.3,ymax:84.3},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[83.2,32.5],[84.3,40.7],[83.8,48.9],[81.7,56.9],[78.1,64.3],[73,70.9],[66.9,76.4],[59.7,80.5],[51.9,83.2],[43.7,84.3],[35.4,83.8],[27.4,81.7],[20,78],[13.4,73],[7.9,66.8],[3.8,59.7],[1.1,51.9],[0,43.7],[.5,35.4],[2.6,27.4],[6.3,20],[11.3,13.4],[17.5,7.9],[24.7,3.8],[32.5,1.1],[39.8,.1],[47.1,.3],[54.3,1.8],[61.1,4.5],[67.4,8.4],[72.9,13.3],[77.4,19.1],[80.9,25.5],[83.2,32.5]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:[255,255,255,255]}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,clippingPath:{type:"CIMClippingPath",clippingType:"Intersect",path:{rings:[[[0,0],[84.3,0],[84.3,84.3],[0,84.3],[0,0]]]}},rotation:0},{type:"CIMVectorMarker",enable:!0,anchorPoint:{x:0,y:-11.25},anchorPointUnits:"Absolute",dominantSizeAxis3D:"Y",size:22.5,billboardMode3D:"FaceNearPlane",frame:{xmin:0,ymin:0,xmax:197.7,ymax:294.7},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[98.9,0],[119.4,23.2],[139.4,49.3],[156.8,75.2],[171.2,100.8],[182.4,125.3],[190.6,148.8],[195.7,171.4],[197.7,192.9],[197.7,195.8],[197.7,200.3],[197.6,202.5],[197.5,204.8],[197.3,207.1],[197,209.4],[196.7,211.7],[196.4,214.1],[196,216.4],[195.5,218.7],[195,221.1],[194.4,223.4],[193.7,225.8],[193,228.1],[192.2,230.5],[191.4,232.8],[190.5,235.1],[189.5,237.5],[188.5,239.7],[187.4,242],[186.2,244.3],[185,246.5],[183.7,248.7],[182.4,250.9],[181,253.1],[179.5,255.2],[178,257.3],[176.4,259.4],[174.7,261.4],[173.1,263.3],[171.3,265.3],[169.5,267.2],[167.7,269],[165.8,270.8],[163.9,272.5],[161.9,274.2],[159.9,275.8],[157.8,277.4],[155.7,278.9],[153.6,280.4],[151.4,281.7],[149.2,283.1],[147,284.4],[144.8,285.6],[142.5,286.7],[140.3,287.8],[138,288.8],[135.7,289.8],[133.4,290.7],[131,291.5],[128.7,292.3],[126.4,293],[124,293.6],[121.7,294.2],[119.4,294.7],[117,295.2],[114.7,295.6],[112.4,296],[110.1,296.3],[107.8,296.5],[105.5,296.7],[103.3,296.8],[101.1,296.9],[98.8,296.9],[83.1,295.7],[67.8,292],[53.3,285.9],[39.9,277.5],[28.1,267.2],[18,255.1],[10,241.5],[4.2,226.9],[.9,211.5],[0,195.8],[.1,192.9],[2.1,171.4],[7.2,148.8],[15.4,125.3],[26.6,100.8],[41,75.2],[58.4,49.3],[78.4,23.2],[98.9,0]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:e===this.activeHandle?v.toArray():this.view.effectiveTheme.accentColor.toArray()}]}}],scaleSymbolsProportionally:!0,respectFrame:!0,clippingPath:{type:"CIMClippingPath",clippingType:"Intersect",path:{rings:[[[0,0],[197.7,0],[197.7,294.7],[0,294.7],[0,0]]]}},rotation:0}],haloSize:1,scaleX:1,angleAlignment:"Display",angle:0}}}),geometry:t.data.geometry})),this._graphicsLayer.graphics.addMany([...this._controlPointGraphics]),this._controlPointManipulations=this._controlPointGraphics.map(e=>new m({tool:this,view:t,graphic:e})),this.addHandles([...this._controlPointManipulations.map((t,e)=>t.createDragPipeline(this._getInfo.bind(this,e),(t,i)=>{"start"===t.action&&(this._undoStack.push(e),this._redoStack=[],this._sharedUndoStack.push({tool:this,operation:i}),this._sharedRedoStack.length=0),this.updateGraphics()})),r(()=>this.view.scale,()=>this.active?this.updateGraphics():null)]),this._controlPointManipulations.forEach((t,e)=>{const i=t=>{this.addHandles([t.events.on(["click","grab-changed"],t=>this.updateActiveHandle(e))])};t.forEachManipulator(i)}),this.addHandles([t.on("key-down",i=>{t.activeTool===this&&(i.key!==f.shift||i.repeat||(this._isModifierActive=!0,i.stopPropagation()),i.key!==f.toggleOpacity||i.repeat||(e.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled,i.stopPropagation()),i.key!==f.primaryKey||i.repeat||(this._factor=P,i.stopPropagation()),this._isModifierActive&&(i.key===f.up&&(this._move(0,this._factor),i.stopPropagation()),i.key===f.down&&(this._move(0,-this._factor),i.stopPropagation()),i.key===f.left&&(this._move(-this._factor,0),i.stopPropagation()),i.key===f.right&&(this._move(this._factor,0),i.stopPropagation())))}),t.on("key-up",e=>{t.activeTool===this&&(e.key===f.shift&&(this._isModifierActive=!1,e.stopPropagation()),e.key===f.primaryKey&&(this._factor=u,e.stopPropagation()))})]))}async _loadProjectionEngine(){const t=this._georeference.controlPoints[0].mapPoint;return h(t.spatialReference,this.view.spatialReference)}_getInfo(t){return{editGeometryOperations:this._controlPointEditGeometryOperations[t],constraints:this._hasValidSpatialReference?null:{xmin:0,ymin:0,xmax:this._georeference.width,ymax:this._georeference.height}}}_move(t,e){const i=this._controlPointEditGeometryOperations[this.activeHandle].move(t*this.view.resolution,e*this.view.resolution,0,0);this._sharedUndoStack.push({tool:this,operation:i}),this._sharedRedoStack.length=0,this.updateGraphics()}};t([s()],S.prototype,"_hasValidSpatialReference",null),t([s()],S.prototype,"activeHandle",void 0),t([s({constructOnly:!0,nonNullable:!0})],S.prototype,"mediaElement",void 0),t([s({readOnly:!0})],S.prototype,"type",void 0),t([s({constructOnly:!0})],S.prototype,"view",void 0),S=t([n("esri.views.2d.interactive.editingTools.ControlPointsTransformTool")],S);export{S as ControlPointsTransformTool,f as keys};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import{getContrast as i}from"../../../../core/colorUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as r}from"../../../../core/unitUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{subtract as h,normalize as c}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as l,UNIT_X as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{g as d,l as _,n as m,f as u,m as g,d as y}from"../../../../chunks/vec32.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import v from"../../../../geometry/Point.js";import G from"../../../../geometry/Polygon.js";import{project as w,initializeProjection as R}from"../../../../geometry/projectionUtils.js";import{a as b,c as C}from"../../../../chunks/boundedPlane.js";import{equals as j}from"../../../../geometry/support/spatialReferenceUtils.js";import k from"../../../../layers/GraphicsLayer.js";import S from"../../../../symbols/SimpleFillSymbol.js";import A from"../../../../symbols/SimpleMarkerSymbol.js";import{DragManipulation as P}from"./manipulations/DragManipulation.js";import{RotateManipulation as T}from"./manipulations/RotateManipulation.js";import{ScaleManipulation as M}from"./manipulations/ScaleManipulation.js";import{PreserveAspectRatio as x,SnapRotation as O}from"./manipulations/utils.js";import{InteractiveToolBase as D}from"../../../interactive/InteractiveToolBase.js";import{KeyBindings as U,mediaKeys as L}from"../../../interactive/keybindings.js";import{EditGeometry as B}from"../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as E}from"../../../interactive/editGeometry/EditGeometryOperations.js";import{calculateOrientedBounds as H}from"../../../interactive/editGeometry/support/editPlaneUtils.js";import{findFirstGraphicHit as I}from"../../../support/hitTestSelectUtils.js";import{createScreenPointFromEvent as z}from"../../../support/screenUtils.js";const V=80,q=10,F=30,N=[[1,1],[1,-1],[-1,-1],[-1,1],[1,0],[0,-1],[-1,0],[0,1]],J=1,K=10;let Q=class extends D{constructor(e){super(e),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._planeCache=b(),this._displayPlaneCache=b(),this._mainAxisCache=l(),this._rotationHandleCache=f(),this._cornerA=f(),this._cornerB=f(),this._cornerC=f(),this._cornerD=f(),this._avgAB=f(),this._avgBC=f(),this._avgCD=f(),this._avgDA=f(),this._preserveAspectRatio=new x,this._snapRotation=new O,this._graphicsLayer=new k({internal:!0,listMode:"hide",visible:!1}),this._sharedUndoStack=[],this._sharedRedoStack=[],this._isOpacityToggled=!1,this._factor=J,this.preserveAspectRatio=null,this.snapRotation=null,this.type="transform"}initialize(){this._initialize()}destroy(){const{map:e}=this.view;this._dragManipulation.destroy(),this._rotateManipulation.destroy(),this._scaleManipulations.forEach(e=>e.destroy()),this._editGeometryOperations.destroy(),e.removeMany([this._graphicsLayer]),this._graphicsLayer.removeAll(),this._graphicsLayer=s(this._graphicsLayer),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._preserveAspectRatio=null,this._snapRotation=null,this._planeCache=null,this._displayPlaneCache=null,this._rotationHandleCache=null,this._mainAxisCache=null,this._cornerA=null,this._cornerB=null,this._cornerC=null,this._cornerD=null,this._avgAB=null,this._avgBC=null,this._avgCD=null,this._avgDA=null,this._sharedUndoStack=null,this._sharedRedoStack=null}get _plane(){const e=this._graphic.geometry;if(null==e)return null;const t=this._editGeometryOperations.data,i=t.components[0].edges[0],s=h(this._mainAxisCache,i.leftVertex.pos,i.rightVertex.pos);c(s,s);let o=V*this.view.resolution;const a=this.view.spatialReference;return j(a,e.spatialReference)&&(o*=r(a)/r(e.spatialReference)),H(s,t,o,this._planeCache)}get _displayPlane(){const e=this._plane;if(!e)return null;const t=this._displayPlaneCache;C(e,t);const i=q*this.view.resolution;return d(t.basis1,t.basis1,1+i/_(t.basis1)),d(t.basis2,t.basis2,1+i/_(t.basis2)),t}get _backgroundGraphicGeometry(){const e=this._displayPlane;if(!e)return null;const t=this.view.spatialReference;return this._updateDisplayPlaneConrers(e),new G({spatialReference:t,rings:[[this._cornerA,this._cornerB,this._cornerC,this._cornerD,this._cornerA]]})}get _rotateGraphicGeometry(){const e=this._plane;if(!e)return null;const t=this._rotationHandleCache;return m(t,e.basis1),d(t,t,F*this.view.resolution),u(t,t,e.origin),u(t,t,e.basis1),new v({x:t[0],y:t[1],spatialReference:this.view.spatialReference})}get _scaleGraphicGeometries(){const e=this._displayPlane;if(!e)return[];const t=this.view.spatialReference;this._updateDisplayPlaneConrers(e);const{_cornerA:i,_cornerB:s,_cornerC:o,_cornerD:r}=this,a=g(this._avgAB,i,s,.5),n=g(this._avgBC,s,o,.5),h=g(this._avgCD,o,r,.5),c=g(this._avgDA,r,i,.5);return[new v({x:i[0],y:i[1],spatialReference:t}),new v({x:s[0],y:s[1],spatialReference:t}),new v({x:o[0],y:o[1],spatialReference:t}),new v({x:r[0],y:r[1],spatialReference:t}),new v({x:a[0],y:a[1],spatialReference:t}),new v({x:n[0],y:n[1],spatialReference:t}),new v({x:h[0],y:h[1],spatialReference:t}),new v({x:c[0],y:c[1],spatialReference:t})]}onActivate(){this.visible=!0}onDeactivate(){this.visible=!1}onShow(){this._graphicsLayer.visible=!0}onHide(){this._graphicsLayer.visible=!1}canUndo(){return this._editGeometryOperations.canUndo}canRedo(){return this._editGeometryOperations.canRedo}undo(){this._editGeometryOperations.undo(),this.updateGraphics()}redo(){this._editGeometryOperations.redo(),this.updateGraphics()}refresh(){const{view:e,target:t}=this,i="georeference"in t?t.georeference.coords:t.geometry,s=this._editGeometryOperations,o=s.data.components[0].vertices,r=B.fromGeometry(w(i,e.spatialReference),2).components[0].vertices;o.forEach((e,t)=>{s.setVertexPosition(e,r[t].pos)}),this.updateGraphics()}reset(){const{target:e}=this;if("georeference"in e){const t=e.georeference;"control-points"===t.type&&(t.controlPoints=this._initialControlPoints)}else e.geometry=this._initialGeometry;this.refresh(),this._sharedUndoStack.length=0,this._sharedRedoStack.length=0}updateGraphics(){const e=this._editGeometryOperations.data.geometry;if("georeference"in this.target){this.target.georeference.coords=e}this._graphic.geometry=e,this._backgroundGraphic.geometry=this._backgroundGraphicGeometry,this._rotateGraphic.geometry=this._rotateGraphicGeometry,this._scaleGraphicGeometries.forEach((e,t)=>{this._scaleGraphics[t].geometry=e})}setSharedUndoStack(e){this._sharedUndoStack=e}setSharedRedoStack(e){this._sharedRedoStack=e}async _initialize(){const{view:e,target:s}=this;if("georeference"in s){const e=s.georeference;this._graphic=new t({geometry:e.coords}),this._initialControlPoints="control-points"===e.type?e.controlPoints:null}else this._graphic=s,this._initialGeometry=s.geometry;e.map.addMany([this._graphicsLayer]),e.focus(),this.visible=!1,this.finishToolCreation(),await this._loadProjectionEngine(),this._editGeometryOperations=E.fromGeometry(w(this._graphic.geometry,e.spatialReference),2),this._backgroundGraphic=new t({symbol:new S({color:"transparent",outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:2}}),geometry:this._backgroundGraphicGeometry}),this._rotateGraphic=new t({symbol:new A({color:i(e.effectiveTheme.accentColor),outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:1}}),geometry:this._rotateGraphicGeometry}),this._scaleGraphics=this._scaleGraphicGeometries.map(s=>new t({symbol:new A({size:6,style:"square",color:i(e.effectiveTheme.accentColor),outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:1}}),geometry:s})),this._graphicsLayer.graphics.addMany([this._backgroundGraphic,this._rotateGraphic,...this._scaleGraphics]),this._dragManipulation=new P({tool:this,view:e,graphic:this._graphic}),this._rotateManipulation=new T({tool:this,view:e,graphic:this._rotateGraphic,snapRotation:this._snapRotation}),this._scaleManipulations=this._scaleGraphics.map((t,i)=>new M({tool:this,view:e,graphic:t,direction:N[i],preserveAspectRatio:this._preserveAspectRatio})),this.addHandles([this._dragManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),this._rotateManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),...this._scaleManipulations.map(e=>e.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this))),o(()=>this.view.scale,()=>this.active?this.updateGraphics():null),e.on("click",async t=>{if(null!=e.activeTool&&e.activeTool!==this)return;const i=z(t),o=[];e.map.allLayers.forEach(e=>{"vector-tile"!==e.type&&"imagery"!==e.type||o.push(e)});const r=await this.view.hitTest(i,{exclude:o}),a=r.results;if(0===a.length)e.activeTool=null;else{const t=I(r.results),i="georeference"in s,o=a.map(e=>"media"===e.type?e.element:null).filter(Boolean),n=new Set([...this._graphicsLayer.graphics,i?null:s].filter(Boolean));i&&o.includes(s)||null!=t&&n.has(t.graphic)?null==e.activeTool&&(e.activeTool=this):e.activeTool=null}})]);const r=e=>{this.addHandles(e.events.on("grab-changed",e=>{"georeference"in s&&("start"===e.action?s.opacity*=.5:"end"===e.action&&(s.opacity*=2))}))};this._dragManipulation.forEachManipulator(r),this._rotateManipulation.forEachManipulator(r),this._scaleManipulations.forEach(e=>e.forEachManipulator(r));const a=new U;a.addToggle(L.preserveAspectRatio,()=>{null==this.preserveAspectRatio&&(this._preserveAspectRatio.enabled=!this._preserveAspectRatio.enabled)}),a.addToggle(L.rotateIncrements,()=>{null==this.snapRotation&&(this._snapRotation.enabled=!this._snapRotation.enabled)}),a.add(L.toggleOpacity,()=>{"georeference"in s&&(s.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled)}),a.addToggle(L.factorModifier,e=>this._factor="key-down"===e.type?K:J),a.add(L.scaleUp,()=>this._scale(this._factor)),a.add(L.scaleDown,()=>this._scale(-this._factor)),a.add(L.moveUp,()=>this._move(0,this._factor)),a.add(L.moveDown,()=>this._move(0,-this._factor)),a.add(L.moveLeft,()=>this._move(-this._factor,0)),a.add(L.moveRight,()=>this._move(this._factor,0)),this.addHandles([e.on("key-down",t=>{e.activeTool===this&&a.dispatch(e.inputManager,t)}),e.on("key-up",t=>{e.activeTool===this&&a.dispatch(e.inputManager,t)})])}async _loadProjectionEngine(){const e=this._graphic.geometry;return R(e.spatialReference,this.view.spatialReference)}_updateDisplayPlaneConrers(e){const{basis1:t,basis2:i,origin:s}=e,o=this._cornerA;u(o,s,t),u(o,o,i);const r=this._cornerB;u(r,s,t),y(r,r,i);const a=this._cornerC;y(a,s,t),y(a,a,i);const n=this._cornerD;y(n,s,t),u(n,n,i)}_getInfo(){return{editGeometryOperations:this._editGeometryOperations,plane:this._plane,displayPlane:this._displayPlane}}_updateGraphics(e,t){"start"===e.action&&(this._sharedUndoStack.push({tool:this,operation:t}),this._sharedRedoStack.length=0),this.updateGraphics()}_scale(e){const t=this._editGeometryOperations,i=t.data.geometry.extent?.width,s=(i+e*this.view.resolution)/i,o=t.scale(this._plane.origin,p,s,s,0,1);this._sharedUndoStack.push({tool:this,operation:o}),this._sharedRedoStack.length=0,this.updateGraphics()}_move(e,t){const i=this._editGeometryOperations.move(e*this.view.resolution,t*this.view.resolution,0,0);this._sharedUndoStack.push({tool:this,operation:i}),this._sharedRedoStack.length=0,this.updateGraphics()}};e([a()],Q.prototype,"_plane",null),e([a()],Q.prototype,"_backgroundGraphicGeometry",null),e([a()],Q.prototype,"_rotateGraphicGeometry",null),e([a()],Q.prototype,"_scaleGraphicGeometries",null),e([a()],Q.prototype,"preserveAspectRatio",void 0),e([a()],Q.prototype,"snapRotation",void 0),e([a({constructOnly:!0,nonNullable:!0})],Q.prototype,"target",void 0),e([a({readOnly:!0})],Q.prototype,"type",void 0),e([a({constructOnly:!0})],Q.prototype,"view",void 0),Q=e([n("esri.views.2d.interactive.editingTools.TransformTool")],Q);export{Q as TransformTool};
5
+ import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import{getContrast as i}from"../../../../core/colorUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as r}from"../../../../core/unitUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{subtract as h,normalize as c}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as l,UNIT_X as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{g as d,l as _,n as m,f as u,m as y,d as g}from"../../../../chunks/vec32.js";import{create as f}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import v from"../../../../geometry/Point.js";import G from"../../../../geometry/Polygon.js";import{project as w,initializeProjection as R}from"../../../../geometry/projectionUtils.js";import{a as b,c as C}from"../../../../chunks/boundedPlane.js";import{equals as j}from"../../../../geometry/support/spatialReferenceUtils.js";import k from"../../../../layers/GraphicsLayer.js";import T from"../../../../symbols/SimpleFillSymbol.js";import S from"../../../../symbols/SimpleMarkerSymbol.js";import{DragManipulation as A}from"./manipulations/DragManipulation.js";import{RotateManipulation as P}from"./manipulations/RotateManipulation.js";import{ScaleManipulation as M}from"./manipulations/ScaleManipulation.js";import{PreserveAspectRatio as x,SnapRotation as O}from"./manipulations/utils.js";import{InteractiveToolBase as D}from"../../../interactive/InteractiveToolBase.js";import{KeyBindings as U,mediaKeys as L}from"../../../interactive/keybindings.js";import{EditGeometry as B}from"../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as E}from"../../../interactive/editGeometry/EditGeometryOperations.js";import{calculateOrientedBounds as H}from"../../../interactive/editGeometry/support/editPlaneUtils.js";import{findFirstGraphicHit as I}from"../../../support/hitTestSelectUtils.js";import{createScreenPointFromEvent as z}from"../../../support/screenUtils.js";const V=80,q=10,F=30,N=[[1,1],[1,-1],[-1,-1],[-1,1],[1,0],[0,-1],[-1,0],[0,1]],J=1,K=10;let Q=class extends D{constructor(e){super(e),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._planeCache=b(),this._displayPlaneCache=b(),this._mainAxisCache=l(),this._rotationHandleCache=f(),this._cornerA=f(),this._cornerB=f(),this._cornerC=f(),this._cornerD=f(),this._avgAB=f(),this._avgBC=f(),this._avgCD=f(),this._avgDA=f(),this._preserveAspectRatio=new x,this._snapRotation=new O,this._graphicsLayer=new k({internal:!0,listMode:"hide",visible:!1,title:"TransformTool layer"}),this._sharedUndoStack=[],this._sharedRedoStack=[],this._isOpacityToggled=!1,this._factor=J,this.preserveAspectRatio=null,this.snapRotation=null,this.type="transform"}initialize(){this._initialize()}destroy(){const{map:e}=this.view;this._dragManipulation.destroy(),this._rotateManipulation.destroy(),this._scaleManipulations.forEach(e=>e.destroy()),this._editGeometryOperations.destroy(),e.removeMany([this._graphicsLayer]),this._graphicsLayer.removeAll(),this._graphicsLayer=s(this._graphicsLayer),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._preserveAspectRatio=null,this._snapRotation=null,this._planeCache=null,this._displayPlaneCache=null,this._rotationHandleCache=null,this._mainAxisCache=null,this._cornerA=null,this._cornerB=null,this._cornerC=null,this._cornerD=null,this._avgAB=null,this._avgBC=null,this._avgCD=null,this._avgDA=null,this._sharedUndoStack=null,this._sharedRedoStack=null}get _plane(){const e=this._graphic.geometry;if(null==e)return null;const t=this._editGeometryOperations.data,i=t.components[0].edges[0],s=h(this._mainAxisCache,i.leftVertex.pos,i.rightVertex.pos);c(s,s);let o=V*this.view.resolution;const a=this.view.spatialReference;return j(a,e.spatialReference)&&(o*=r(a)/r(e.spatialReference)),H(s,t,o,this._planeCache)}get _displayPlane(){const e=this._plane;if(!e)return null;const t=this._displayPlaneCache;C(e,t);const i=q*this.view.resolution;return d(t.basis1,t.basis1,1+i/_(t.basis1)),d(t.basis2,t.basis2,1+i/_(t.basis2)),t}get _backgroundGraphicGeometry(){const e=this._displayPlane;if(!e)return null;const t=this.view.spatialReference;return this._updateDisplayPlaneConrers(e),new G({spatialReference:t,rings:[[this._cornerA,this._cornerB,this._cornerC,this._cornerD,this._cornerA]]})}get _rotateGraphicGeometry(){const e=this._plane;if(!e)return null;const t=this._rotationHandleCache;return m(t,e.basis1),d(t,t,F*this.view.resolution),u(t,t,e.origin),u(t,t,e.basis1),new v({x:t[0],y:t[1],spatialReference:this.view.spatialReference})}get _scaleGraphicGeometries(){const e=this._displayPlane;if(!e)return[];const t=this.view.spatialReference;this._updateDisplayPlaneConrers(e);const{_cornerA:i,_cornerB:s,_cornerC:o,_cornerD:r}=this,a=y(this._avgAB,i,s,.5),n=y(this._avgBC,s,o,.5),h=y(this._avgCD,o,r,.5),c=y(this._avgDA,r,i,.5);return[new v({x:i[0],y:i[1],spatialReference:t}),new v({x:s[0],y:s[1],spatialReference:t}),new v({x:o[0],y:o[1],spatialReference:t}),new v({x:r[0],y:r[1],spatialReference:t}),new v({x:a[0],y:a[1],spatialReference:t}),new v({x:n[0],y:n[1],spatialReference:t}),new v({x:h[0],y:h[1],spatialReference:t}),new v({x:c[0],y:c[1],spatialReference:t})]}onActivate(){this.visible=!0}onDeactivate(){this.visible=!1}onShow(){this._graphicsLayer.visible=!0}onHide(){this._graphicsLayer.visible=!1}canUndo(){return this._editGeometryOperations.canUndo}canRedo(){return this._editGeometryOperations.canRedo}undo(){this._editGeometryOperations.undo(),this.updateGraphics()}redo(){this._editGeometryOperations.redo(),this.updateGraphics()}refresh(){const{view:e,target:t}=this,i="georeference"in t?t.georeference.coords:t.geometry,s=this._editGeometryOperations,o=s.data.components[0].vertices,r=B.fromGeometry(w(i,e.spatialReference),2).components[0].vertices;o.forEach((e,t)=>{s.setVertexPosition(e,r[t].pos)}),this.updateGraphics()}reset(){const{target:e}=this;if("georeference"in e){const t=e.georeference;"control-points"===t.type&&(t.controlPoints=this._initialControlPoints)}else e.geometry=this._initialGeometry;this.refresh(),this._sharedUndoStack.length=0,this._sharedRedoStack.length=0}updateGraphics(){const e=this._editGeometryOperations.data.geometry;if("georeference"in this.target){this.target.georeference.coords=e}this._graphic.geometry=e,this._backgroundGraphic.geometry=this._backgroundGraphicGeometry,this._rotateGraphic.geometry=this._rotateGraphicGeometry,this._scaleGraphicGeometries.forEach((e,t)=>{this._scaleGraphics[t].geometry=e})}setSharedUndoStack(e){this._sharedUndoStack=e}setSharedRedoStack(e){this._sharedRedoStack=e}async _initialize(){const{view:e,target:s}=this;if("georeference"in s){const e=s.georeference;this._graphic=new t({geometry:e.coords}),this._initialControlPoints="control-points"===e.type?e.controlPoints:null}else this._graphic=s,this._initialGeometry=s.geometry;e.map.addMany([this._graphicsLayer]),e.focus(),this.visible=!1,this.finishToolCreation(),await this._loadProjectionEngine(),this._editGeometryOperations=E.fromGeometry(w(this._graphic.geometry,e.spatialReference),2),this._backgroundGraphic=new t({symbol:new T({color:"transparent",outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:2}}),geometry:this._backgroundGraphicGeometry}),this._rotateGraphic=new t({symbol:new S({color:i(e.effectiveTheme.accentColor),outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:1}}),geometry:this._rotateGraphicGeometry}),this._scaleGraphics=this._scaleGraphicGeometries.map(s=>new t({symbol:new S({size:6,style:"square",color:i(e.effectiveTheme.accentColor),outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:1}}),geometry:s})),this._graphicsLayer.graphics.addMany([this._backgroundGraphic,this._rotateGraphic,...this._scaleGraphics]),this._dragManipulation=new A({tool:this,view:e,graphic:this._graphic}),this._rotateManipulation=new P({tool:this,view:e,graphic:this._rotateGraphic,snapRotation:this._snapRotation}),this._scaleManipulations=this._scaleGraphics.map((t,i)=>new M({tool:this,view:e,graphic:t,direction:N[i],preserveAspectRatio:this._preserveAspectRatio})),this.addHandles([this._dragManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),this._rotateManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),...this._scaleManipulations.map(e=>e.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this))),o(()=>this.view.scale,()=>this.active?this.updateGraphics():null),e.on("click",async t=>{if(null!=e.activeTool&&e.activeTool!==this)return;const i=z(t),o=[];e.map.allLayers.forEach(e=>{"vector-tile"!==e.type&&"imagery"!==e.type||o.push(e)});const r=await this.view.hitTest(i,{exclude:o}),a=r.results;if(0===a.length)e.activeTool=null;else{const t=I(r.results),i="georeference"in s,o=a.map(e=>"media"===e.type?e.element:null).filter(Boolean),n=new Set([...this._graphicsLayer.graphics,i?null:s].filter(Boolean));i&&o.includes(s)||null!=t&&n.has(t.graphic)?null==e.activeTool&&(e.activeTool=this):e.activeTool=null}})]);const r=e=>{this.addHandles(e.events.on("grab-changed",e=>{"georeference"in s&&("start"===e.action?s.opacity*=.5:"end"===e.action&&(s.opacity*=2))}))};this._dragManipulation.forEachManipulator(r),this._rotateManipulation.forEachManipulator(r),this._scaleManipulations.forEach(e=>e.forEachManipulator(r));const a=new U;a.addToggle(L.preserveAspectRatio,()=>{null==this.preserveAspectRatio&&(this._preserveAspectRatio.enabled=!this._preserveAspectRatio.enabled)}),a.addToggle(L.rotateIncrements,()=>{null==this.snapRotation&&(this._snapRotation.enabled=!this._snapRotation.enabled)}),a.add(L.toggleOpacity,()=>{"georeference"in s&&(s.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled)}),a.addToggle(L.factorModifier,e=>this._factor="key-down"===e.type?K:J),a.add(L.scaleUp,()=>this._scale(this._factor)),a.add(L.scaleDown,()=>this._scale(-this._factor)),a.add(L.moveUp,()=>this._move(0,this._factor)),a.add(L.moveDown,()=>this._move(0,-this._factor)),a.add(L.moveLeft,()=>this._move(-this._factor,0)),a.add(L.moveRight,()=>this._move(this._factor,0)),this.addHandles([e.on("key-down",t=>{e.activeTool===this&&a.dispatch(e.inputManager,t)}),e.on("key-up",t=>{e.activeTool===this&&a.dispatch(e.inputManager,t)})])}async _loadProjectionEngine(){const e=this._graphic.geometry;return R(e.spatialReference,this.view.spatialReference)}_updateDisplayPlaneConrers(e){const{basis1:t,basis2:i,origin:s}=e,o=this._cornerA;u(o,s,t),u(o,o,i);const r=this._cornerB;u(r,s,t),g(r,r,i);const a=this._cornerC;g(a,s,t),g(a,a,i);const n=this._cornerD;g(n,s,t),u(n,n,i)}_getInfo(){return{editGeometryOperations:this._editGeometryOperations,plane:this._plane,displayPlane:this._displayPlane}}_updateGraphics(e,t){"start"===e.action&&(this._sharedUndoStack.push({tool:this,operation:t}),this._sharedRedoStack.length=0),this.updateGraphics()}_scale(e){const t=this._editGeometryOperations,i=t.data.geometry.extent?.width,s=(i+e*this.view.resolution)/i,o=t.scale(this._plane.origin,p,s,s,0,1);this._sharedUndoStack.push({tool:this,operation:o}),this._sharedRedoStack.length=0,this.updateGraphics()}_move(e,t){const i=this._editGeometryOperations.move(e*this.view.resolution,t*this.view.resolution,0,0);this._sharedUndoStack.push({tool:this,operation:i}),this._sharedRedoStack.length=0,this.updateGraphics()}};e([a()],Q.prototype,"_plane",null),e([a()],Q.prototype,"_backgroundGraphicGeometry",null),e([a()],Q.prototype,"_rotateGraphicGeometry",null),e([a()],Q.prototype,"_scaleGraphicGeometries",null),e([a()],Q.prototype,"preserveAspectRatio",void 0),e([a()],Q.prototype,"snapRotation",void 0),e([a({constructOnly:!0,nonNullable:!0})],Q.prototype,"target",void 0),e([a({readOnly:!0})],Q.prototype,"type",void 0),e([a({constructOnly:!0})],Q.prototype,"view",void 0),Q=e([n("esri.views.2d.interactive.editingTools.TransformTool")],Q);export{Q as TransformTool};