@arcgis/core 4.28.0-next.20230921 → 4.28.0-next.20230923

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 (415) hide show
  1. package/Graphic.js +1 -1
  2. package/PopupTemplate.js +1 -1
  3. package/TimeExtent.js +1 -1
  4. package/arcade/ArcadeDate.js +1 -1
  5. package/arcade/Feature.js +1 -1
  6. package/arcade/featureSetUtils.js +1 -1
  7. package/arcade/featureset/actions/Adapted.js +1 -1
  8. package/arcade/featureset/actions/GroupBy.js +1 -1
  9. package/arcade/featureset/support/FeatureSet.js +1 -1
  10. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  11. package/arcade/featureset/support/StatsField.js +1 -1
  12. package/arcade/featureset/support/sqlUtils.js +1 -1
  13. package/arcade/functions/convertdirection.js +1 -1
  14. package/arcade/functions/date.js +1 -1
  15. package/arcade/functions/featuresetbase.js +1 -1
  16. package/arcade/functions/featuresetstats.js +1 -1
  17. package/arcade/treeAnalysis.js +1 -1
  18. package/arcade.js +1 -1
  19. package/assets/esri/core/workers/RemoteClient.js +1 -1
  20. package/assets/esri/core/workers/chunks/02156fd04279f4d0fd3f.js +1 -0
  21. package/assets/esri/core/workers/chunks/07f6175b52366b2c28bd.js +1 -0
  22. package/assets/esri/core/workers/chunks/098073c3b2849f56dad8.js +1 -0
  23. package/assets/esri/core/workers/chunks/1186ba1947bd0c32f148.js +1 -0
  24. package/assets/esri/core/workers/chunks/186445b9fbedd261f684.js +1 -0
  25. package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 250bb6ae6f1992b5b4f9.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
  29. package/assets/esri/core/workers/chunks/2a0b3b52ecd787a613bc.js +1 -0
  30. package/assets/esri/core/workers/chunks/2bc9b55e655968229ef4.js +1 -0
  31. package/assets/esri/core/workers/chunks/2f0924e7aa89e689da4a.js +1 -0
  32. package/assets/esri/core/workers/chunks/3f218d65ec451b2a1027.js +1 -0
  33. package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
  34. package/assets/esri/core/workers/chunks/45d6b942cdccca2ce44a.js +1 -0
  35. package/assets/esri/core/workers/chunks/4bf1a7e82a68ccee0ee1.js +1 -0
  36. package/assets/esri/core/workers/chunks/4c110c7f4f940ec58010.js +1 -0
  37. package/assets/esri/core/workers/chunks/{bde89b2684b6185992ef.js → 4ed77097e69fa3096ce4.js} +1 -1
  38. package/assets/esri/core/workers/chunks/4fe5bac782a742d5b1c0.js +1 -0
  39. package/assets/esri/core/workers/chunks/{1cbaba30f55f00f7498b.js → 51324d042f469f3b8914.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{3f4e9b1663ec521bfe00.js → 542ce10e1872399790b4.js} +1 -1
  41. package/assets/esri/core/workers/chunks/54d2b7e2ac4ba883bee8.js +1 -0
  42. package/assets/esri/core/workers/chunks/54ecb6cae310818d1aa2.js +1 -0
  43. package/assets/esri/core/workers/chunks/57c932e289d89d97da4b.js +1 -0
  44. package/assets/esri/core/workers/chunks/{6403de6fc067cf8f7436.js → 592c1fb531f2be928e8a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/59a807220d6f0dd18776.js +1 -0
  46. package/assets/esri/core/workers/chunks/59dff10d7ad2b1bf469e.js +1 -0
  47. package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
  48. package/assets/esri/core/workers/chunks/612c485c5aad1548d708.js +1 -0
  49. package/assets/esri/core/workers/chunks/{2bb69d76a13564e8e455.js → 645ba2d5c10184632d23.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{332689bf60d246485993.js → 65186e168dd112ac6221.js} +1 -1
  51. package/assets/esri/core/workers/chunks/6b9248fb2d6aadbce7bb.js +1 -0
  52. package/assets/esri/core/workers/chunks/709465832d306e02df52.js +1 -0
  53. package/assets/esri/core/workers/chunks/72c5bd6f7b8541b8d69e.js +1 -0
  54. package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{94188fe381239d48a975.js → 76483c9a8848f3106126.js} +1 -1
  56. package/assets/esri/core/workers/chunks/7aa58c96798447ce5907.js +1 -0
  57. package/assets/esri/core/workers/chunks/7d078b8b9997b5300c0a.js +1 -0
  58. package/assets/esri/core/workers/chunks/7fe641cf1467496e670a.js +1 -0
  59. package/assets/esri/core/workers/chunks/{df8f62beb36fb9d2ac81.js → 810c8d6ff19976fd1366.js} +1 -1
  60. package/assets/esri/core/workers/chunks/8458ed96f3e72814cef2.js +1 -0
  61. package/assets/esri/core/workers/chunks/{243a4eed107d363dfad8.js → 887652bbdb3b71d0a089.js} +1 -1
  62. package/assets/esri/core/workers/chunks/896bfda379cf620b63ec.js +1 -0
  63. package/assets/esri/core/workers/chunks/91c9f0d59eaed7a735ce.js +1 -0
  64. package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
  65. package/assets/esri/core/workers/chunks/97658ac749664a07c92d.js +1 -0
  66. package/assets/esri/core/workers/chunks/{1da74a306aa5b4eacaae.js → 9866bbaeaf885c2dcca9.js} +1 -1
  67. package/assets/esri/core/workers/chunks/a39ae87298ac674f129d.js +1 -0
  68. package/assets/esri/core/workers/chunks/a7b3048c19348540e004.js +1 -0
  69. package/assets/esri/core/workers/chunks/a8ca4b116909e47722f9.js +1 -0
  70. package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
  71. package/assets/esri/core/workers/chunks/ab145d13932d87dd7bf9.js +1 -0
  72. package/assets/esri/core/workers/chunks/{77c15b1c2729c780f75a.js → aeeeb386134b341d7ad2.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → af54b233f6d6ad70b4a3.js} +2 -2
  74. package/assets/esri/core/workers/chunks/b9146daae8457224fd08.js +1 -0
  75. package/assets/esri/core/workers/chunks/bcdd2e8841abcb4df6da.js +1 -0
  76. package/assets/esri/core/workers/chunks/be05cc0cdabd5e051045.js +1 -0
  77. package/assets/esri/core/workers/chunks/c5f5f37bef11c6fbdc40.js +1 -0
  78. package/assets/esri/core/workers/chunks/d414dba3179bcf75bc6b.js +1 -0
  79. package/assets/esri/core/workers/chunks/{b449d6bd5851187d419f.js → d6e5408f9fa6b4bcd118.js} +1 -1
  80. package/assets/esri/core/workers/chunks/d9fb500cbd0f04d219a3.js +1 -0
  81. package/assets/esri/core/workers/chunks/e0dd6789fb797e9b7206.js +1 -0
  82. package/assets/esri/core/workers/chunks/{6f271249e042086d5a16.js → e4e49deae8da74f629db.js} +1 -1
  83. package/assets/esri/core/workers/chunks/e5dcff7a4fa84ba09670.js +1 -0
  84. package/assets/esri/core/workers/chunks/{f508ccfde6425dabe9ac.js → ee0bf611d191103a7046.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{ed1fbc1bc8d50453e2f5.js → f793cd41fcd022baeea2.js} +1 -1
  86. package/assets/esri/core/workers/chunks/fad6a7bb82a0a2df726f.js +1 -0
  87. package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -84
  88. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -0
  89. package/assets/esri/themes/dark/main.css +1 -1
  90. package/assets/esri/themes/light/main.css +1 -1
  91. package/assets/esri/themes/light/view.css +1 -1
  92. package/chunks/arcade.js +1 -1
  93. package/config.js +1 -1
  94. package/core/Accessor.js +1 -1
  95. package/core/accessorSupport/diffUtils.js +1 -1
  96. package/core/has.js +1 -1
  97. package/core/number.js +1 -1
  98. package/core/reactiveUtils.js +1 -1
  99. package/core/sql/DateOnly.js +1 -1
  100. package/core/sql/WhereClause.js +1 -1
  101. package/core/sql.js +1 -1
  102. package/core/timeUtils.js +1 -1
  103. package/identity/IdentityForm.js +1 -1
  104. package/identity/IdentityModal.js +1 -1
  105. package/interfaces.d.ts +48 -203
  106. package/layers/LinkChartLayer.js +1 -1
  107. package/layers/OrientedImageryLayer.js +1 -1
  108. package/layers/SceneLayer.js +1 -1
  109. package/layers/graphics/applyEditsUtils.js +5 -0
  110. package/layers/graphics/editingSupport.js +1 -1
  111. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  112. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  113. package/layers/mixins/ArcGISImageService.js +1 -1
  114. package/layers/mixins/EditBusLayer.js +1 -1
  115. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  116. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +5 -0
  117. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  118. package/layers/orientedImagery/core/cameraOrientationFactory.js +1 -1
  119. package/layers/orientedImagery/core/utils.js +5 -0
  120. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  121. package/layers/support/fieldProperties.js +1 -1
  122. package/layers/support/fieldUtils.js +1 -1
  123. package/layers/support/imageryRendererUtils.js +1 -1
  124. package/layers/support/kmlUtils.js +1 -1
  125. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  126. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
  127. package/networks/Network.js +1 -1
  128. package/package.json +1 -1
  129. package/request.js +1 -1
  130. package/rest/featureService/FeatureService.js +1 -1
  131. package/rest/support/DirectionsFeatureSet.js +1 -1
  132. package/smartMapping/renderers/pieChart.js +1 -1
  133. package/smartMapping/renderers/relationship.js +1 -1
  134. package/smartMapping/renderers/support/utils.js +1 -1
  135. package/smartMapping/statistics/support/ageUtils.js +1 -1
  136. package/smartMapping/support/adapters/support/utils.js +1 -1
  137. package/smartMapping/support/utils.js +1 -1
  138. package/support/apiKeyUtils.js +1 -1
  139. package/support/arcadeUtils.js +1 -1
  140. package/support/revision.js +1 -1
  141. package/symbols/cim/cimAnalyzer.js +1 -1
  142. package/symbols/support/svgUtils.js +1 -1
  143. package/time/TimeReference.js +1 -1
  144. package/time/timeReferenceUtils.js +1 -1
  145. package/versionManagement/VersionManagementService.js +1 -1
  146. package/versionManagement/support/EditMomentStack.js +5 -0
  147. package/versionManagement/support/versionManagementUtils.js +1 -1
  148. package/views/2d/engine/Container.js +1 -1
  149. package/views/2d/engine/DisplayObject.js +1 -1
  150. package/views/2d/engine/ManagedCanvas.js +5 -0
  151. package/views/2d/engine/Stage.js +1 -1
  152. package/views/2d/engine/webgl/GroupContainer.js +1 -1
  153. package/views/2d/engine/webgl/Painter.js +1 -1
  154. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  155. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  156. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  157. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  158. package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
  159. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  160. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  161. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  162. package/views/2d/layers/MediaLayerView2D.js +1 -1
  163. package/views/2d/layers/TileLayerView2D.js +1 -1
  164. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  165. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  166. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  167. package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
  168. package/views/2d/layers/graphics/GraphicContainer.js +1 -1
  169. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  170. package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
  171. package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
  172. package/views/2d/layers/support/DisplayGL.js +1 -1
  173. package/views/2d/webglDeps.js +1 -1
  174. package/views/3d/glTF/loader.js +1 -1
  175. package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
  176. package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.js +1 -1
  177. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  178. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  179. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  180. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  181. package/views/3d/layers/SceneLayerView3D.js +1 -1
  182. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  183. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  184. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  185. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  186. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  187. package/views/3d/layers/graphics/Labeler.js +1 -1
  188. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  189. package/views/3d/layers/i3s/featureEditing.js +1 -1
  190. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  191. package/views/3d/state/ViewStateManager.js +1 -1
  192. package/views/3d/support/buffer/glUtil.js +1 -1
  193. package/views/3d/support/engineContent/line.js +1 -1
  194. package/views/3d/support/viewpointUtils.js +1 -1
  195. package/views/3d/webgl-engine/Stage.js +1 -1
  196. package/views/3d/webgl-engine/effects/RenderPluginInput.js +1 -1
  197. package/views/3d/webgl-engine/effects/blit/Blit.js +5 -0
  198. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  199. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  200. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  201. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  202. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  203. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  204. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  205. package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
  206. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  207. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  208. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  209. package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
  210. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  211. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  212. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  213. package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
  214. package/views/View.js +1 -1
  215. package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
  216. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  217. package/views/interactive/tooltip/constraintUtils.js +1 -1
  218. package/views/interactive/tooltip/content/Fields.js +1 -1
  219. package/views/interactive/tooltip/content/TooltipContentDrawCircle.js +1 -1
  220. package/views/interactive/tooltip/content/TooltipContentDrawMesh.js +1 -1
  221. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  222. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  223. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  224. package/views/interactive/tooltip/content/TooltipContentDrawRectangle.js +1 -1
  225. package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
  226. package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
  227. package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
  228. package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
  229. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  230. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  231. package/views/interactive/tooltip/content/TooltipContentTranslateGraphic.js +1 -1
  232. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicXY.js +1 -1
  233. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicZ.js +1 -1
  234. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  235. package/views/interactive/tooltip/content/TooltipContentTranslateVertexXY.js +1 -1
  236. package/views/interactive/tooltip/content/TooltipContentTranslateVertexZ.js +1 -1
  237. package/views/support/angularMeasurementUtils.js +1 -1
  238. package/views/ui/UI.js +1 -1
  239. package/views/webgl/ShaderTranspiler.js +1 -1
  240. package/views/webgl/Texture.js +1 -1
  241. package/views/webgl/contextUtils.js +1 -1
  242. package/webmap/InitialViewProperties.js +1 -1
  243. package/widgets/AreaMeasurement2D.js +1 -1
  244. package/widgets/AreaMeasurement3D.js +1 -1
  245. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  246. package/widgets/Attachments.js +1 -1
  247. package/widgets/Attribution.js +1 -1
  248. package/widgets/BasemapGallery.js +1 -1
  249. package/widgets/BasemapLayerList.js +1 -1
  250. package/widgets/BasemapToggle.js +1 -1
  251. package/widgets/Bookmarks.js +1 -1
  252. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  253. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  254. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  255. package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
  256. package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
  257. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  258. package/widgets/BuildingExplorer.js +1 -1
  259. package/widgets/Compass.js +1 -1
  260. package/widgets/CoordinateConversion.js +1 -1
  261. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  262. package/widgets/Daylight.js +1 -1
  263. package/widgets/DirectLineMeasurement3D.js +1 -1
  264. package/widgets/DirectionalPad.js +1 -1
  265. package/widgets/Directions/components/SaveLayer.js +1 -1
  266. package/widgets/Directions.js +1 -1
  267. package/widgets/DistanceMeasurement2D.js +1 -1
  268. package/widgets/Editor/components/FooterActions.js +1 -1
  269. package/widgets/Editor/components/Notices.js +1 -1
  270. package/widgets/Editor/components/PanelContent.js +1 -1
  271. package/widgets/Editor/components/PanelToolbar.js +1 -1
  272. package/widgets/Editor/components/Prompt.js +1 -1
  273. package/widgets/Editor/components/Settings.js +1 -1
  274. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  275. package/widgets/Editor/components/UploadDetails.js +1 -1
  276. package/widgets/Editor.js +1 -1
  277. package/widgets/ElevationProfile/components/LegendItem.js +1 -1
  278. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  279. package/widgets/ElevationProfile/components/Statistics.js +1 -1
  280. package/widgets/ElevationProfile.js +1 -1
  281. package/widgets/Expand.js +1 -1
  282. package/widgets/Feature/FeatureContent.js +1 -1
  283. package/widgets/Feature/FeatureExpression.js +1 -1
  284. package/widgets/Feature/FeatureFields.js +1 -1
  285. package/widgets/Feature/FeatureMedia.js +1 -1
  286. package/widgets/Feature/FeatureRelationship.js +1 -1
  287. package/widgets/Feature/FeatureViewModel.js +1 -1
  288. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  289. package/widgets/Feature/support/FeatureElementInfo.js +1 -1
  290. package/widgets/Feature.js +1 -1
  291. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  292. package/widgets/FeatureForm/GroupInput.js +1 -1
  293. package/widgets/FeatureForm/css.js +1 -1
  294. package/widgets/FeatureForm.js +1 -1
  295. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  296. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  297. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  298. package/widgets/FeatureTable.js +1 -1
  299. package/widgets/FeatureTemplates/ItemList.js +1 -1
  300. package/widgets/FeatureTemplates.js +1 -1
  301. package/widgets/Features/FeaturesRelatedRecords.js +1 -1
  302. package/widgets/Features.js +1 -1
  303. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  304. package/widgets/FloorFilter.js +1 -1
  305. package/widgets/Fullscreen.js +1 -1
  306. package/widgets/Histogram.js +1 -1
  307. package/widgets/HistogramRangeSlider.js +1 -1
  308. package/widgets/Home.js +1 -1
  309. package/widgets/LayerList/ListItemPanel.js +1 -1
  310. package/widgets/LayerList.js +1 -1
  311. package/widgets/Legend/LegendViewModel.js +1 -1
  312. package/widgets/Legend/styles/Card.js +1 -1
  313. package/widgets/Legend/styles/Classic.js +1 -1
  314. package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
  315. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  316. package/widgets/LineOfSight.js +1 -1
  317. package/widgets/Locate.js +1 -1
  318. package/widgets/NavigationToggle.js +1 -1
  319. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  320. package/widgets/OrientedImageryViewer.js +1 -1
  321. package/widgets/Popup.js +1 -1
  322. package/widgets/Print.js +1 -1
  323. package/widgets/ScaleRangeSlider/scalePreviewUtils.js +1 -1
  324. package/widgets/ScaleRangeSlider.js +1 -1
  325. package/widgets/Search/SearchResultRenderer.js +1 -1
  326. package/widgets/Search.js +1 -1
  327. package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
  328. package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
  329. package/widgets/ShadowCast/components/ShadowTooltipContent.js +1 -1
  330. package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
  331. package/widgets/ShadowCast.js +1 -1
  332. package/widgets/Sketch.js +1 -1
  333. package/widgets/Slice.js +1 -1
  334. package/widgets/Slider.js +1 -1
  335. package/widgets/Swipe.js +1 -1
  336. package/widgets/TableList.js +1 -1
  337. package/widgets/TimeSlider.js +1 -1
  338. package/widgets/Track.js +1 -1
  339. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
  340. package/widgets/UtilityNetworkAssociations.js +1 -1
  341. package/widgets/UtilityNetworkTrace.js +1 -1
  342. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  343. package/widgets/ValuePicker.js +1 -1
  344. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  345. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  346. package/widgets/VideoPlayer.js +1 -1
  347. package/widgets/Weather/LabeledSlider.js +1 -1
  348. package/widgets/Weather.js +1 -1
  349. package/widgets/Zoom/IconButton.js +1 -1
  350. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  351. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  352. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  353. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  354. package/widgets/smartMapping/ColorSlider.js +1 -1
  355. package/widgets/smartMapping/HeatmapSlider.js +1 -1
  356. package/widgets/smartMapping/OpacitySlider.js +1 -1
  357. package/widgets/smartMapping/SizeSlider.js +1 -1
  358. package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
  359. package/widgets/support/ColorPicker.js +1 -1
  360. package/widgets/support/DatePicker.js +1 -1
  361. package/widgets/support/Heading.js +1 -1
  362. package/widgets/support/LabeledSwitch.js +1 -1
  363. package/widgets/support/MeasurementWidgetContent.js +1 -1
  364. package/widgets/support/Popover.js +1 -1
  365. package/widgets/support/SelectionToolbar.js +1 -1
  366. package/widgets/support/SketchTooltipControls.js +1 -1
  367. package/widgets/support/SnappingControls.js +1 -1
  368. package/widgets/support/TimePicker.js +1 -1
  369. package/widgets/support/TimezonePicker.js +1 -1
  370. package/widgets/support/UnitSelect.js +1 -1
  371. package/widgets/support/dateUtils.js +1 -1
  372. package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +0 -1
  373. package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
  374. package/assets/esri/core/workers/chunks/114269dda1d296893908.js +0 -1
  375. package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +0 -1
  376. package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
  377. package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +0 -1
  378. package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
  379. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +0 -1
  380. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
  381. package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +0 -1
  382. package/assets/esri/core/workers/chunks/2cb36f9686693234991a.js +0 -1
  383. package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +0 -1
  384. package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +0 -1
  385. package/assets/esri/core/workers/chunks/3619e04cbb6691549014.js +0 -1
  386. package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +0 -1
  387. package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.js +0 -1
  388. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +0 -1
  389. package/assets/esri/core/workers/chunks/4f4a424d1747d04501df.js +0 -1
  390. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +0 -1
  391. package/assets/esri/core/workers/chunks/5a5720caa64a46daadf9.js +0 -1
  392. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +0 -1
  393. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +0 -1
  394. package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +0 -1
  395. package/assets/esri/core/workers/chunks/7a358b1fd0c0cce59e9b.js +0 -1
  396. package/assets/esri/core/workers/chunks/83d1a1b3d371c991cc4c.js +0 -1
  397. package/assets/esri/core/workers/chunks/846b7a81b870c8b238a1.js +0 -1
  398. package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +0 -1
  399. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +0 -1
  400. package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.js +0 -1
  401. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +0 -1
  402. package/assets/esri/core/workers/chunks/c60cf62f374e71e562fc.js +0 -1
  403. package/assets/esri/core/workers/chunks/c6ea5aac232d1eca04dd.js +0 -1
  404. package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.js +0 -1
  405. package/assets/esri/core/workers/chunks/c8f239c25fe864f0e47a.js +0 -1
  406. package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +0 -1
  407. package/assets/esri/core/workers/chunks/d824f4b405a72cd2fa74.js +0 -1
  408. package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.js +0 -1
  409. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +0 -1
  410. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +0 -1
  411. package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +0 -1
  412. package/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +0 -1
  413. package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +0 -1
  414. package/core/watchUtils.d.ts +0 -4
  415. package/core/watchUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import t from"../../../../Graphic.js";import"../../../../symbols.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/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as h,e as c}from"../../../../chunks/vec2.js";import{a as p,U as l}from"../../../../chunks/vec2f64.js";import{i as _,l as m,n as d,g as y,p as u,f as g}from"../../../../chunks/vec3.js";import{c as f}from"../../../../chunks/vec3f64.js";import{project as v,initializeProjection as G}from"../../../../geometry/projection.js";import{a as w,c as R}from"../../../../chunks/boundedPlane.js";import{equals as b}from"../../../../geometry/support/spatialReferenceUtils.js";import k from"../../../../layers/GraphicsLayer.js";import{ViewingMode as j}from"../../../ViewingMode.js";import{DragManipulation as P}from"./manipulations/DragManipulation.js";import{RotateManipulation as A}from"./manipulations/RotateManipulation.js";import{ScaleManipulation as C}from"./manipulations/ScaleManipulation.js";import{PreserveAspectRatio as S,SnapRotation as M}from"./manipulations/utils.js";import{primaryKey as T}from"../../../input/keys.js";import{InteractiveToolBase as O}from"../../../interactive/InteractiveToolBase.js";import{EditGeometry as U}from"../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as D}from"../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as x}from"../../../interactive/editGeometry/interfaces.js";import{AccumulationType as E}from"../../../interactive/editGeometry/operations/UpdateVertices.js";import{calculateOrientedBounds as L}from"../../../interactive/editGeometry/support/editPlaneUtils.js";import{findFirstGraphicHit as B}from"../../../support/hitTestSelectUtils.js";import{createScreenPointFromEvent as H}from"../../../support/screenUtils.js";import V from"../../../../geometry/Polygon.js";import I from"../../../../geometry/Point.js";import z from"../../../../symbols/SimpleFillSymbol.js";import K from"../../../../symbols/SimpleMarkerSymbol.js";const N={up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",plus:"+",minus:"-",toggleOpacity:"t",shift:"Shift",primaryKey:T},W=80,q=10,F=30,J=[[1,1],[1,-1],[-1,-1],[-1,1],[1,0],[0,-1],[-1,0],[0,1]],Q=1,X=10;let Y=class extends O{constructor(e){super(e),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._planeCache=w(),this._displayPlaneCache=w(),this._mainAxisCache=p(),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 S,this._snapRotation=new M,this._graphicsLayer=new k({internal:!0,listMode:"hide",visible:!1}),this._sharedUndoStack=[],this._sharedRedoStack=[],this._isOpacityToggled=!1,this._isModifierActive=!1,this._factor=1,this.preserveAspectRatio=null,this.snapRotation=null}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=W*this.view.resolution;const a=this.view.spatialReference;return b(a,e.spatialReference)&&(o*=r(a)/r(e.spatialReference)),L(s,t,o,this._planeCache)}get _displayPlane(){const e=this._plane;if(!e)return null;const t=this._displayPlaneCache;R(e,t);const i=q*this.view.resolution;return _(t.basis1,t.basis1,1+i/m(t.basis1)),_(t.basis2,t.basis2,1+i/m(t.basis2)),t}get _backgroundGraphicGeometry(){const e=this._displayPlane;if(!e)return null;const t=this.view.spatialReference;return this._updateDisplayPlaneConrers(e),new V({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 d(t,e.basis1),_(t,t,F*this.view.resolution),y(t,t,e.origin),y(t,t,e.basis1),new I({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=u(this._avgAB,i,s,.5),n=u(this._avgBC,s,o,.5),h=u(this._avgCD,o,r,.5),c=u(this._avgDA,r,i,.5);return[new I({x:i[0],y:i[1],spatialReference:t}),new I({x:s[0],y:s[1],spatialReference:t}),new I({x:o[0],y:o[1],spatialReference:t}),new I({x:r[0],y:r[1],spatialReference:t}),new I({x:a[0],y:a[1],spatialReference:t}),new I({x:n[0],y:n[1],spatialReference:t}),new I({x:h[0],y:h[1],spatialReference:t}),new I({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=U.fromGeometry(v(i,e.spatialReference),j.Local).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=D.fromGeometry(v(this._graphic.geometry,e.spatialReference),j.Local),this._backgroundGraphic=new t({symbol:new z({color:"transparent",outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:2}}),geometry:this._backgroundGraphicGeometry}),this._rotateGraphic=new t({symbol:new K({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 K({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 A({tool:this,view:e,graphic:this._rotateGraphic,snapRotation:this._snapRotation}),this._scaleManipulations=this._scaleGraphics.map(((t,i)=>new C({tool:this,view:e,graphic:t,direction:J[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=H(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=B(r.results),i="georeference"in s,o=a.map((e=>"media"===e.type?e.element:null)).filter(Boolean),n=[...this._graphicsLayer.graphics,i?null:s].filter(Boolean);i&&o.includes(s)||null!=t&&n.includes(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))),this.addHandles([e.on("key-down",(t=>{e.activeTool===this&&(t.key!==N.shift||t.repeat||(null==this.preserveAspectRatio&&(this._preserveAspectRatio.enabled=!this._preserveAspectRatio.enabled),null==this.snapRotation&&(this._snapRotation.enabled=!this._snapRotation.enabled),this._isModifierActive=!0,t.stopPropagation()),t.key!==N.toggleOpacity||t.repeat||("georeference"in s&&(s.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled),t.stopPropagation()),t.key!==N.primaryKey||t.repeat||(this._factor=X,t.stopPropagation()),this._isModifierActive&&(t.key===N.plus&&(this._scale(this._factor),t.stopPropagation()),t.key===N.minus&&(this._scale(-this._factor),t.stopPropagation()),t.key===N.up&&(this._move(0,this._factor),t.stopPropagation()),t.key===N.down&&(this._move(0,-this._factor),t.stopPropagation()),t.key===N.left&&(this._move(-this._factor,0),t.stopPropagation()),t.key===N.right&&(this._move(this._factor,0),t.stopPropagation())))})),e.on("key-up",(t=>{e.activeTool===this&&(t.key===N.shift&&(null==this.preserveAspectRatio&&(this._preserveAspectRatio.enabled=!this._preserveAspectRatio.enabled),null==this.snapRotation&&(this._snapRotation.enabled=!this._snapRotation.enabled),this._isModifierActive=!1,t.stopPropagation()),t.key===N.primaryKey&&(this._factor=Q,t.stopPropagation()))}))])}async _loadProjectionEngine(){const e=this._graphic.geometry;return G(e.spatialReference,this.view.spatialReference)}_updateDisplayPlaneConrers(e){const{basis1:t,basis2:i,origin:s}=e,o=this._cornerA;y(o,s,t),y(o,o,i);const r=this._cornerB;y(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),y(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=[];for(const a of t.data.components)i.push(...a.vertices);const s=t.data.geometry.extent?.width,o=(s+e*this.view.resolution)/s,r=t.scaleVertices(i,this._plane.origin,l,o,o,x.NEW_STEP,E.REPLACE);this._sharedUndoStack.push({tool:this,operation:r}),this._sharedRedoStack.length=0,this.updateGraphics()}_move(e,t){const i=this._editGeometryOperations,s=[];for(const r of i.data.components)s.push(...r.vertices);const o=i.moveVertices(s,e*this.view.resolution,t*this.view.resolution,0,x.NEW_STEP);this._sharedUndoStack.push({tool:this,operation:o}),this._sharedRedoStack.length=0,this.updateGraphics()}};e([a()],Y.prototype,"_plane",null),e([a()],Y.prototype,"_backgroundGraphicGeometry",null),e([a()],Y.prototype,"_rotateGraphicGeometry",null),e([a()],Y.prototype,"_scaleGraphicGeometries",null),e([a()],Y.prototype,"preserveAspectRatio",void 0),e([a()],Y.prototype,"snapRotation",void 0),e([a({constructOnly:!0,nonNullable:!0})],Y.prototype,"target",void 0),e([a({constructOnly:!0})],Y.prototype,"view",void 0),Y=e([n("esri.views.2d.interactive.editingTools.TransformTool")],Y);export{Y as TransformTool,N as keys};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import t from"../../../../Graphic.js";import"../../../../symbols.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/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as h,e as c}from"../../../../chunks/vec2.js";import{a as p,U as l}from"../../../../chunks/vec2f64.js";import{i as _,l as m,n as d,g as y,p as u,f as g}from"../../../../chunks/vec3.js";import{c as f}from"../../../../chunks/vec3f64.js";import{project as v,initializeProjection as G}from"../../../../geometry/projection.js";import{a as w,c as R}from"../../../../chunks/boundedPlane.js";import{equals as b}from"../../../../geometry/support/spatialReferenceUtils.js";import k from"../../../../layers/GraphicsLayer.js";import{ViewingMode as j}from"../../../ViewingMode.js";import{DragManipulation as P}from"./manipulations/DragManipulation.js";import{RotateManipulation as A}from"./manipulations/RotateManipulation.js";import{ScaleManipulation as C}from"./manipulations/ScaleManipulation.js";import{PreserveAspectRatio as S,SnapRotation as M}from"./manipulations/utils.js";import{primaryKey as T}from"../../../input/keys.js";import{InteractiveToolBase as O}from"../../../interactive/InteractiveToolBase.js";import{EditGeometry as U}from"../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as D}from"../../../interactive/editGeometry/EditGeometryOperations.js";import{AccumulationBehaviour as x}from"../../../interactive/editGeometry/interfaces.js";import{AccumulationType as E}from"../../../interactive/editGeometry/operations/UpdateVertices.js";import{calculateOrientedBounds as L}from"../../../interactive/editGeometry/support/editPlaneUtils.js";import{findFirstGraphicHit as B}from"../../../support/hitTestSelectUtils.js";import{createScreenPointFromEvent as H}from"../../../support/screenUtils.js";import V from"../../../../geometry/Polygon.js";import I from"../../../../geometry/Point.js";import z from"../../../../symbols/SimpleFillSymbol.js";import K from"../../../../symbols/SimpleMarkerSymbol.js";const N={up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",plus:"+",minus:"-",toggleOpacity:"t",shift:"Shift",primaryKey:T},W=80,q=10,F=30,J=[[1,1],[1,-1],[-1,-1],[-1,1],[1,0],[0,-1],[-1,0],[0,1]],Q=1,X=10;let Y=class extends O{constructor(e){super(e),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._planeCache=w(),this._displayPlaneCache=w(),this._mainAxisCache=p(),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 S,this._snapRotation=new M,this._graphicsLayer=new k({internal:!0,listMode:"hide",visible:!1}),this._sharedUndoStack=[],this._sharedRedoStack=[],this._isOpacityToggled=!1,this._isModifierActive=!1,this._factor=1,this.preserveAspectRatio=null,this.snapRotation=null}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=W*this.view.resolution;const a=this.view.spatialReference;return b(a,e.spatialReference)&&(o*=r(a)/r(e.spatialReference)),L(s,t,o,this._planeCache)}get _displayPlane(){const e=this._plane;if(!e)return null;const t=this._displayPlaneCache;R(e,t);const i=q*this.view.resolution;return _(t.basis1,t.basis1,1+i/m(t.basis1)),_(t.basis2,t.basis2,1+i/m(t.basis2)),t}get _backgroundGraphicGeometry(){const e=this._displayPlane;if(!e)return null;const t=this.view.spatialReference;return this._updateDisplayPlaneConrers(e),new V({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 d(t,e.basis1),_(t,t,F*this.view.resolution),y(t,t,e.origin),y(t,t,e.basis1),new I({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=u(this._avgAB,i,s,.5),n=u(this._avgBC,s,o,.5),h=u(this._avgCD,o,r,.5),c=u(this._avgDA,r,i,.5);return[new I({x:i[0],y:i[1],spatialReference:t}),new I({x:s[0],y:s[1],spatialReference:t}),new I({x:o[0],y:o[1],spatialReference:t}),new I({x:r[0],y:r[1],spatialReference:t}),new I({x:a[0],y:a[1],spatialReference:t}),new I({x:n[0],y:n[1],spatialReference:t}),new I({x:h[0],y:h[1],spatialReference:t}),new I({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=U.fromGeometry(v(i,e.spatialReference),j.Local).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=D.fromGeometry(v(this._graphic.geometry,e.spatialReference),j.Local),this._backgroundGraphic=new t({symbol:new z({color:"transparent",outline:{type:"simple-line",color:e.effectiveTheme.accentColor,width:2}}),geometry:this._backgroundGraphicGeometry}),this._rotateGraphic=new t({symbol:new K({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 K({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 A({tool:this,view:e,graphic:this._rotateGraphic,snapRotation:this._snapRotation}),this._scaleManipulations=this._scaleGraphics.map(((t,i)=>new C({tool:this,view:e,graphic:t,direction:J[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=H(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=B(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))),this.addHandles([e.on("key-down",(t=>{e.activeTool===this&&(t.key!==N.shift||t.repeat||(null==this.preserveAspectRatio&&(this._preserveAspectRatio.enabled=!this._preserveAspectRatio.enabled),null==this.snapRotation&&(this._snapRotation.enabled=!this._snapRotation.enabled),this._isModifierActive=!0,t.stopPropagation()),t.key!==N.toggleOpacity||t.repeat||("georeference"in s&&(s.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled),t.stopPropagation()),t.key!==N.primaryKey||t.repeat||(this._factor=X,t.stopPropagation()),this._isModifierActive&&(t.key===N.plus&&(this._scale(this._factor),t.stopPropagation()),t.key===N.minus&&(this._scale(-this._factor),t.stopPropagation()),t.key===N.up&&(this._move(0,this._factor),t.stopPropagation()),t.key===N.down&&(this._move(0,-this._factor),t.stopPropagation()),t.key===N.left&&(this._move(-this._factor,0),t.stopPropagation()),t.key===N.right&&(this._move(this._factor,0),t.stopPropagation())))})),e.on("key-up",(t=>{e.activeTool===this&&(t.key===N.shift&&(null==this.preserveAspectRatio&&(this._preserveAspectRatio.enabled=!this._preserveAspectRatio.enabled),null==this.snapRotation&&(this._snapRotation.enabled=!this._snapRotation.enabled),this._isModifierActive=!1,t.stopPropagation()),t.key===N.primaryKey&&(this._factor=Q,t.stopPropagation()))}))])}async _loadProjectionEngine(){const e=this._graphic.geometry;return G(e.spatialReference,this.view.spatialReference)}_updateDisplayPlaneConrers(e){const{basis1:t,basis2:i,origin:s}=e,o=this._cornerA;y(o,s,t),y(o,o,i);const r=this._cornerB;y(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),y(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=[];for(const a of t.data.components)i.push(...a.vertices);const s=t.data.geometry.extent?.width,o=(s+e*this.view.resolution)/s,r=t.scaleVertices(i,this._plane.origin,l,o,o,x.NEW_STEP,E.REPLACE);this._sharedUndoStack.push({tool:this,operation:r}),this._sharedRedoStack.length=0,this.updateGraphics()}_move(e,t){const i=this._editGeometryOperations,s=[];for(const r of i.data.components)s.push(...r.vertices);const o=i.moveVertices(s,e*this.view.resolution,t*this.view.resolution,0,x.NEW_STEP);this._sharedUndoStack.push({tool:this,operation:o}),this._sharedRedoStack.length=0,this.updateGraphics()}};e([a()],Y.prototype,"_plane",null),e([a()],Y.prototype,"_backgroundGraphicGeometry",null),e([a()],Y.prototype,"_rotateGraphicGeometry",null),e([a()],Y.prototype,"_scaleGraphicGeometries",null),e([a()],Y.prototype,"preserveAspectRatio",void 0),e([a()],Y.prototype,"snapRotation",void 0),e([a({constructOnly:!0,nonNullable:!0})],Y.prototype,"target",void 0),e([a({constructOnly:!0})],Y.prototype,"view",void 0),Y=e([n("esri.views.2d.interactive.editingTools.TransformTool")],Y);export{Y as TransformTool,N 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.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../PopupTemplate.js";import s from"../../../core/Collection.js";import{watch as i,initial as t}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/Error.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import p from"../../../renderers/SimpleRenderer.js";import{fromJSON as a}from"../../../renderers/support/jsonUtils.js";import l from"../../../rest/support/FeatureSet.js";import{LayerView2DMixin as n}from"./LayerView2D.js";import h from"./graphics/GraphicContainer.js";import c from"./graphics/GraphicsView2D.js";import m from"../../layers/LayerView.js";let y=class extends(n(m)){constructor(){super(...arguments),this._graphicsViewMap={},this._popupTemplates=new Map,this.graphicsViews=[]}async hitTest(e,r){if(!this.graphicsViews.length)return null;const s=this.layer;return this.graphicsViews.reverse().map((r=>{const i=this._popupTemplates.get(r),t=r.hitTest(e);for(const e of t)e.layer=s,e.sourceLayer=s,e.popupTemplate=i;return t})).flat().map((r=>({type:"graphic",graphic:r,layer:s,mapPoint:e})))}update(e){if(this.graphicsViews)for(const r of this.graphicsViews)r.processUpdate(e)}attach(){this.addAttachHandles([i((()=>this.layer?.featureCollections),(e=>{this._clear();for(const{popupInfo:i,featureSet:t,layerDefinition:o}of e){const e=l.fromJSON(t),p=new s(e.features),n=o.drawingInfo,m=i?r.fromJSON(i):null,y=a(n.renderer),g=new c({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:p,renderer:y,container:new h(this.view.featuresTilingScheme)});this._graphicsViewMap[e.geometryType]=g,this._popupTemplates.set(g,m),"polygon"!==e.geometryType||this.layer.polygonSymbol?"polyline"!==e.geometryType||this.layer.lineSymbol?"point"!==e.geometryType||this.layer.pointSymbol||(this.layer.pointSymbol=y.symbol):this.layer.lineSymbol=y.symbol:this.layer.polygonSymbol=y.symbol,this.graphicsViews.push(g),this.container.addChild(g.container)}}),t),i((()=>this.layer?.polygonSymbol),(e=>{this._graphicsViewMap.polygon.renderer=new p({symbol:e})}),t),i((()=>this.layer?.lineSymbol),(e=>{this._graphicsViewMap.polyline.renderer=new p({symbol:e})}),t),i((()=>this.layer?.pointSymbol),(e=>{this._graphicsViewMap.point.renderer=new p({symbol:e})}),t)])}detach(){this._clear()}moveStart(){}moveEnd(){}viewChange(){for(const e of this.graphicsViews)e.viewChange()}_clear(){this.container.removeAllChildren();for(const e of this.graphicsViews)e.destroy();this._graphicsViewMap={},this._popupTemplates.clear(),this.graphicsViews.length=0}};y=e([o("esri.views.2d.layers.GeoRSSLayerView2D")],y);const g=y;export{g as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../PopupTemplate.js";import s from"../../../core/Collection.js";import{watch as i,initial as t}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/Error.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import p from"../../../renderers/SimpleRenderer.js";import{fromJSON as a}from"../../../renderers/support/jsonUtils.js";import l from"../../../rest/support/FeatureSet.js";import{LayerView2DMixin as n}from"./LayerView2D.js";import h from"./graphics/GraphicContainer.js";import c from"./graphics/GraphicsView2D.js";import m from"../../layers/LayerView.js";let y=class extends(n(m)){constructor(){super(...arguments),this._graphicsViewMap={},this._popupTemplates=new Map,this.graphicsViews=[]}async hitTest(e,r){if(!this.graphicsViews.length)return null;const s=this.layer;return this.graphicsViews.reverse().flatMap((r=>{const i=this._popupTemplates.get(r),t=r.hitTest(e);for(const e of t)e.layer=s,e.sourceLayer=s,e.popupTemplate=i;return t})).map((r=>({type:"graphic",graphic:r,layer:s,mapPoint:e})))}update(e){if(this.graphicsViews)for(const r of this.graphicsViews)r.processUpdate(e)}attach(){this.addAttachHandles([i((()=>this.layer?.featureCollections),(e=>{this._clear();for(const{popupInfo:i,featureSet:t,layerDefinition:o}of e){const e=l.fromJSON(t),p=new s(e.features),n=o.drawingInfo,m=i?r.fromJSON(i):null,y=a(n.renderer),g=new c({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:p,renderer:y,container:new h(this.view.featuresTilingScheme)});this._graphicsViewMap[e.geometryType]=g,this._popupTemplates.set(g,m),"polygon"!==e.geometryType||this.layer.polygonSymbol?"polyline"!==e.geometryType||this.layer.lineSymbol?"point"!==e.geometryType||this.layer.pointSymbol||(this.layer.pointSymbol=y.symbol):this.layer.lineSymbol=y.symbol:this.layer.polygonSymbol=y.symbol,this.graphicsViews.push(g),this.container.addChild(g.container)}}),t),i((()=>this.layer?.polygonSymbol),(e=>{this._graphicsViewMap.polygon.renderer=new p({symbol:e})}),t),i((()=>this.layer?.lineSymbol),(e=>{this._graphicsViewMap.polyline.renderer=new p({symbol:e})}),t),i((()=>this.layer?.pointSymbol),(e=>{this._graphicsViewMap.point.renderer=new p({symbol:e})}),t)])}detach(){this._clear()}moveStart(){}moveEnd(){}viewChange(){for(const e of this.graphicsViews)e.viewChange()}_clear(){this.container.removeAllChildren();for(const e of this.graphicsViews)e.destroy();this._graphicsViewMap={},this._popupTemplates.clear(),this.graphicsViews.length=0}};y=e([o("esri.views.2d.layers.GeoRSSLayerView2D")],y);const g=y;export{g 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.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import"../../../Graphic.js";import"../../../renderers/ClassBreaksRenderer.js";import"../../../renderers/DictionaryRenderer.js";import"../../../renderers/DotDensityRenderer.js";import"../../../renderers/HeatmapRenderer.js";import"../../../renderers/PieChartRenderer.js";import"../../../renderers/Renderer.js";import"../../../renderers/SimpleRenderer.js";import"../../../renderers/UniqueValueRenderer.js";import"../../../renderers/support/jsonUtils.js";import r from"../../../core/Logger.js";import"../../../symbols.js";import t from"../../../core/Collection.js";import"../../../core/has.js";import{getOrCreateMapValue as s}from"../../../core/MapUtils.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{on as n}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{create as a}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as m}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as p}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as c}from"../../../layers/support/MediaElementView.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../config.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../layers/effects/EffectView.js";import"../engine/DisplayObject.js";import"../engine/webgl/effects/highlight/HighlightGradient.js";import"../engine/webgl/BufferPool.js";import"../engine/webgl/enums.js";import"../engine/webgl/brushes/BrushBitmap.js";import"../../../chunks/vec4f32.js";import"../engine/webgl/Utils.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/checkWebGLError.js";import"../../webgl/contextUtils.js";import"../../../chunks/builtins.js";import"../engine/webgl/definitions.js";import"../../../core/RandomLCG.js";import"../engine/webgl/materialKey/MaterialKey.js";import"../engine/webgl/techniques/Technique.js";import"../engine/webgl/techniques/dotDensity/TechniqueDotDensity.js";import"../engine/webgl/techniques/heatmap/TechniqueHeatmap.js";import"../engine/webgl/techniques/pieChart/TechniquePieChart.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/GLObjectType.js";import"../../webgl/Texture.js";import"../../webgl/VertexArrayObject.js";import"../engine/webgl/brushes/WGLBrushHeatmap.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../engine/webgl/brushes/WGLGeometryBrushMarker.js";import"../../../core/mathUtils.js";import"../engine/webgl/number.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../../../chunks/vec2f32.js";import"../engine/vectorTiles/enums.js";import"../engine/vectorTiles/shaders/sources/resolver.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../engine/webgl/shaders/sources/resolver.js";import"../engine/webgl/TextureManager.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/effects/BlendEffect.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../engine/webgl/Profiler.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/interfaces.js";import"../../../core/floatRGBA.js";import"../../3d/webgl-engine/lib/OrderIndependentTransparency.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../engine/webgl/AttributeStoreView.js";import"../../../chunks/earcut.js";import"../../../layers/graphics/featureConversionUtils.js";import"../../../core/unitUtils.js";import"../../../renderers/support/lengthUtils.js";import"../../../chunks/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../engine/webgl/shaders/MagnifierPrograms.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import h from"../tiling/TileQueue.js";import u from"../tiling/TileStrategy.js";import g from"../engine/webgl/Overlay.js";import d from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as f}from"./LayerView2D.js";import j from"../../layers/LayerView.js";import y from"../../../geometry/Extent.js";let w=class extends(f(j)){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this.layer=null,this.elements=new t}attach(){this.addAttachHandles([n((()=>this.layer.effectiveSource),"refresh",(()=>{this._tileStrategy.refresh((e=>this._updateTile(e))),this.requestUpdate()})),n((()=>this.layer.effectiveSource),"change",(({element:e})=>this._elementUpdateHandler(e)))]),this._overlayContainer=new d,this.container.addChild(this._overlayContainer),this._fetchQueue=new h({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,r)=>this._queryElements(e,r)}),this._tileStrategy=new u({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,r){const t=[],s=e.normalize(),i=[s.x,s.y];for(const{projectedElement:{normalizedCoords:n,element:o}}of this._elementReferences.values())null!=n&&m(n.rings,i)&&t.push({type:"media",element:o,layer:this.layer,mapPoint:e,sourcePoint:o.toSource(e)});return t.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updateTile(e)))}_acquireTile(e){const r=new T(e.clone());return this._updateTile(r),r}_updateTile(e){this._updatingHandles.addPromise(this._fetchQueue.push(e.key).then((r=>{const[t,s]=e.setElements(r);this._referenceElements(e,t),this._dereferenceElements(e,s),this.requestUpdate()}),(e=>{i(e)||r.getLogger(this).error(e)})))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,r){const t=this.layer.effectiveSource;if(null==t)return[];this.view.featuresTilingScheme.getTileBounds(b,e,!0);const s=new y({xmin:b[0],ymin:b[1],xmax:b[2],ymax:b[3],spatialReference:this.view.spatialReference});return t.queryElements(s,r)}_referenceElements(e,r){if(null!=this.layer.source)for(const t of r)this._referenceElement(e,t)}_referenceElement(e,r){s(this._elementReferences,r.uid,(()=>{const e=new c({element:r,spatialReference:this.view.spatialReference}),t=new g(e);this._overlayContainer.addChild(t),this.elements.add(r);let s=null;return{tiles:new Set,projectedElement:e,overlay:t,debugGraphic:s}})).tiles.add(e)}_dereferenceElements(e,r){for(const t of r)this._dereferenceElement(e,t)}_dereferenceElement(e,r){const t=this._elementReferences.get(r.uid);t.tiles.delete(e),t.tiles.size||(this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.projectedElement.destroy(),this._elementReferences.delete(r.uid),this.elements.remove(r),this._debugGraphicsView?.graphics.remove(t.debugGraphic))}_elementUpdateHandler(e){let r=this._elementReferences.get(e.uid);if(r){const t=r.projectedElement.normalizedCoords;if(null==t)return this._overlayContainer.removeChild(r.overlay),r.overlay.destroy(),r.projectedElement.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(r.debugGraphic);const s=[],i=[];for(const e of this._tileStrategy.tiles){const n=v(this.view.featuresTilingScheme,e,t);r.tiles.has(e)?n||i.push(e):n&&s.push(e)}for(const r of s)this._referenceElement(r,e);for(const r of i)this._dereferenceElement(r,e);return r=this._elementReferences.get(e.uid),void(r?.debugGraphic&&(r.debugGraphic.geometry=r.projectedElement.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:r.debugGraphic,property:"geometry"})))}const t=new c({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=t)for(const s of this._tileStrategy.tiles){v(this.view.featuresTilingScheme,s,t)&&this._referenceElement(s,e)}}};e([o()],w.prototype,"layer",void 0),e([o({readOnly:!0})],w.prototype,"elements",void 0),w=e([l("esri.views.2d.layers.MediaLayerView2D")],w);const b=a(),_={xmin:0,ymin:0,xmax:0,ymax:0};function v(e,r,t){return e.getTileBounds(b,r.key,!0),_.xmin=b[0],_.ymin=b[1],_.xmax=b[2],_.ymax=b[3],p(_,t)}class T{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const r=[],t=new Set(this.elements);this.elements=e;for(const s of e)t.has(s)?t.delete(s):r.push(s);return this.isReady=!0,[r,Array.from(t)]}destroy(){}}const R=w;export{R as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import"../../../Graphic.js";import"../../../renderers/ClassBreaksRenderer.js";import"../../../renderers/DictionaryRenderer.js";import"../../../renderers/DotDensityRenderer.js";import"../../../renderers/HeatmapRenderer.js";import"../../../renderers/PieChartRenderer.js";import"../../../renderers/Renderer.js";import"../../../renderers/SimpleRenderer.js";import"../../../renderers/UniqueValueRenderer.js";import"../../../renderers/support/jsonUtils.js";import r from"../../../core/Logger.js";import"../../../symbols.js";import t from"../../../core/Collection.js";import"../../../core/has.js";import{getOrCreateMapValue as s}from"../../../core/MapUtils.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{on as n}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{create as a}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as m}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as p}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as c}from"../../../layers/support/MediaElementView.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../config.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../layers/effects/EffectView.js";import"../engine/DisplayObject.js";import"../engine/webgl/effects/highlight/HighlightGradient.js";import"../../../core/Evented.js";import"../../../core/mathUtils.js";import"../../webgl/contextUtils.js";import"../engine/webgl/BufferPool.js";import"../engine/webgl/enums.js";import"../engine/webgl/brushes/BrushBitmap.js";import"../../../chunks/vec4f32.js";import"../engine/webgl/Utils.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/checkWebGLError.js";import"../../../chunks/builtins.js";import"../engine/webgl/definitions.js";import"../../../core/RandomLCG.js";import"../engine/webgl/materialKey/MaterialKey.js";import"../engine/webgl/techniques/Technique.js";import"../engine/webgl/techniques/dotDensity/TechniqueDotDensity.js";import"../engine/webgl/techniques/heatmap/TechniqueHeatmap.js";import"../engine/webgl/techniques/pieChart/TechniquePieChart.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/GLObjectType.js";import"../../webgl/Texture.js";import"../../webgl/VertexArrayObject.js";import"../engine/webgl/brushes/WGLBrushHeatmap.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../engine/webgl/brushes/WGLGeometryBrushMarker.js";import"../engine/webgl/number.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../../../chunks/vec2f32.js";import"../engine/vectorTiles/enums.js";import"../engine/vectorTiles/shaders/sources/resolver.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../engine/webgl/shaders/sources/resolver.js";import"../engine/webgl/TextureManager.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/effects/BlendEffect.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../engine/webgl/Profiler.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/interfaces.js";import"../../../core/floatRGBA.js";import"../../3d/webgl-engine/lib/OrderIndependentTransparency.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../engine/webgl/AttributeStoreView.js";import"../../../chunks/earcut.js";import"../../../layers/graphics/featureConversionUtils.js";import"../../../core/unitUtils.js";import"../../../renderers/support/lengthUtils.js";import"../../../chunks/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../engine/webgl/shaders/MagnifierPrograms.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import h from"../tiling/TileQueue.js";import u from"../tiling/TileStrategy.js";import g from"../engine/webgl/Overlay.js";import d from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as f}from"./LayerView2D.js";import j from"../../layers/LayerView.js";import y from"../../../geometry/Extent.js";let w=class extends(f(j)){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this.layer=null,this.elements=new t}attach(){this.addAttachHandles([n((()=>this.layer.effectiveSource),"refresh",(()=>{this._tileStrategy.refresh((e=>this._updateTile(e))),this.requestUpdate()})),n((()=>this.layer.effectiveSource),"change",(({element:e})=>this._elementUpdateHandler(e)))]),this._overlayContainer=new d,this.container.addChild(this._overlayContainer),this._fetchQueue=new h({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,r)=>this._queryElements(e,r)}),this._tileStrategy=new u({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,r){const t=[],s=e.normalize(),i=[s.x,s.y];for(const{projectedElement:{normalizedCoords:n,element:o}}of this._elementReferences.values())null!=n&&m(n.rings,i)&&t.push({type:"media",element:o,layer:this.layer,mapPoint:e,sourcePoint:o.toSource(e)});return t.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updateTile(e)))}_acquireTile(e){const r=new T(e.clone());return this._updateTile(r),r}_updateTile(e){this._updatingHandles.addPromise(this._fetchQueue.push(e.key).then((r=>{const[t,s]=e.setElements(r);this._referenceElements(e,t),this._dereferenceElements(e,s),this.requestUpdate()}),(e=>{i(e)||r.getLogger(this).error(e)})))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,r){const t=this.layer.effectiveSource;if(null==t)return[];this.view.featuresTilingScheme.getTileBounds(b,e,!0);const s=new y({xmin:b[0],ymin:b[1],xmax:b[2],ymax:b[3],spatialReference:this.view.spatialReference});return t.queryElements(s,r)}_referenceElements(e,r){if(null!=this.layer.source)for(const t of r)this._referenceElement(e,t)}_referenceElement(e,r){s(this._elementReferences,r.uid,(()=>{const e=new c({element:r,spatialReference:this.view.spatialReference}),t=new g(e);this._overlayContainer.addChild(t),this.elements.add(r);let s=null;return{tiles:new Set,projectedElement:e,overlay:t,debugGraphic:s}})).tiles.add(e)}_dereferenceElements(e,r){for(const t of r)this._dereferenceElement(e,t)}_dereferenceElement(e,r){const t=this._elementReferences.get(r.uid);t.tiles.delete(e),t.tiles.size||(this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.projectedElement.destroy(),this._elementReferences.delete(r.uid),this.elements.remove(r),this._debugGraphicsView?.graphics.remove(t.debugGraphic))}_elementUpdateHandler(e){let r=this._elementReferences.get(e.uid);if(r){const t=r.projectedElement.normalizedCoords;if(null==t)return this._overlayContainer.removeChild(r.overlay),r.overlay.destroy(),r.projectedElement.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(r.debugGraphic);const s=[],i=[];for(const e of this._tileStrategy.tiles){const n=v(this.view.featuresTilingScheme,e,t);r.tiles.has(e)?n||i.push(e):n&&s.push(e)}for(const r of s)this._referenceElement(r,e);for(const r of i)this._dereferenceElement(r,e);return r=this._elementReferences.get(e.uid),void(r?.debugGraphic&&(r.debugGraphic.geometry=r.projectedElement.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:r.debugGraphic,property:"geometry"})))}const t=new c({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=t)for(const s of this._tileStrategy.tiles){v(this.view.featuresTilingScheme,s,t)&&this._referenceElement(s,e)}}};e([o()],w.prototype,"layer",void 0),e([o({readOnly:!0})],w.prototype,"elements",void 0),w=e([l("esri.views.2d.layers.MediaLayerView2D")],w);const b=a(),_={xmin:0,ymin:0,xmax:0,ymax:0};function v(e,r,t){return e.getTileBounds(b,r.key,!0),_.xmin=b[0],_.ymin=b[1],_.xmax=b[2],_.ymax=b[3],p(_,t)}class T{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const r=[],t=new Set(this.elements);this.elements=e;for(const s of e)t.has(s)?t.delete(s):r.push(s);return this.isReady=!0,[r,Array.from(t)]}destroy(){}}const R=w;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.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as l}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as h}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../config.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../layers/effects/EffectView.js";import"../engine/DisplayObject.js";import"../engine/webgl/effects/highlight/HighlightGradient.js";import"../engine/webgl/BufferPool.js";import"../engine/webgl/enums.js";import"../engine/webgl/brushes/BrushBitmap.js";import"../../../chunks/vec4f32.js";import"../engine/webgl/Utils.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/checkWebGLError.js";import"../../webgl/contextUtils.js";import"../../../chunks/builtins.js";import"../engine/webgl/definitions.js";import"../../../core/RandomLCG.js";import"../engine/webgl/materialKey/MaterialKey.js";import"../engine/webgl/techniques/Technique.js";import"../engine/webgl/techniques/dotDensity/TechniqueDotDensity.js";import"../engine/webgl/techniques/heatmap/TechniqueHeatmap.js";import"../engine/webgl/techniques/pieChart/TechniquePieChart.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/GLObjectType.js";import"../../webgl/Texture.js";import"../../webgl/VertexArrayObject.js";import"../engine/webgl/brushes/WGLBrushHeatmap.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../engine/webgl/brushes/WGLGeometryBrushMarker.js";import"../../../core/mathUtils.js";import"../engine/webgl/number.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../../../chunks/vec2f32.js";import"../engine/vectorTiles/enums.js";import"../engine/vectorTiles/shaders/sources/resolver.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../engine/webgl/shaders/sources/resolver.js";import"../engine/webgl/TextureManager.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/effects/BlendEffect.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../engine/webgl/Profiler.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/interfaces.js";import"../../../core/floatRGBA.js";import"../../3d/webgl-engine/lib/OrderIndependentTransparency.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import a from"./graphics/GraphicsView2D.js";import"../engine/webgl/AttributeStoreView.js";import"../../../core/asyncUtils.js";import"../../../core/Collection.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../layers/graphics/featureConversionUtils.js";import"../../../core/unitUtils.js";import"../../../renderers/support/lengthUtils.js";import"../../../chunks/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"../navigation/MapViewNavigation.js";import"../engine/webgl/shaders/MagnifierPrograms.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import g from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as c,resampleImage as m}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import f from"../tiling/TileKey.js";import w from"../tiling/TileQueue.js";import d from"../tiling/TileStrategy.js";import j from"../../layers/LayerView.js";import y from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as b,MapServiceLayerViewHelper as _}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as T}from"../../support/drapedUtils.js";const V=[0,0];let v=class extends(y(n(p(j)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new h,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new w({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i)}),this._tileStrategy=new d({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),b(this,this.layer)){const e=this._highlightView=new a({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new _({createFetchPopupFeaturesQueryGeometry:(e,i)=>T(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:(i,t)=>{e.graphicUpdateHandler({graphic:i,property:t})},layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeatures(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeatures(e,i):[]}highlight(e){return this._popupHighlightHelper?this._popupHighlightHelper.highlight(e):i()}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return l(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(V,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){const t=this.tilemapCache,{signal:s,resamplingLevel:o=0}=i;if(!t)try{return await this._fetchImage(e,s)}catch(a){if(!r(a)&&!this.resampling)return c(this._tileInfoView.tileInfo.size);if(o<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const r=new f(t),s=await this.fetchTile(r,{...i,resamplingLevel:o+1});return m(this._tileInfoView,s,r,e)}}throw a}const l=new f(0,0,0,0);let h;try{if(await t.fetchAvailabilityUpsample(e.level,e.row,e.col,l,{signal:s}),l.level!==e.level&&!this.resampling)return c(this._tileInfoView.tileInfo.size);h=await this._fetchImage(l,s)}catch(a){if(r(a))throw a;h=await this._fetchImage(e,s)}return this.resampling?m(this._tileInfoView,h,l,e):h}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(i){r(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([s()],v.prototype,"resampling",null),e([s()],v.prototype,"tilemapCache",null),v=e([o("esri.views.2d.layers.TileLayerView2D")],v);const I=v;export{I as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as l}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as h}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../core/accessorSupport/tracking/Flags.js";import"../../../config.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../layers/effects/EffectView.js";import"../engine/DisplayObject.js";import"../engine/webgl/effects/highlight/HighlightGradient.js";import"../../../core/Evented.js";import"../../../core/mathUtils.js";import"../../webgl/contextUtils.js";import"../engine/webgl/BufferPool.js";import"../engine/webgl/enums.js";import"../engine/webgl/brushes/BrushBitmap.js";import"../../../chunks/vec4f32.js";import"../engine/webgl/Utils.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/enums.js";import"../../webgl/checkWebGLError.js";import"../../../chunks/builtins.js";import"../engine/webgl/definitions.js";import"../../../core/RandomLCG.js";import"../engine/webgl/materialKey/MaterialKey.js";import"../engine/webgl/techniques/Technique.js";import"../engine/webgl/techniques/dotDensity/TechniqueDotDensity.js";import"../engine/webgl/techniques/heatmap/TechniqueHeatmap.js";import"../engine/webgl/techniques/pieChart/TechniquePieChart.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/GLObjectType.js";import"../../webgl/Texture.js";import"../../webgl/VertexArrayObject.js";import"../engine/webgl/brushes/WGLBrushHeatmap.js";import"../engine/webgl/DefaultVertexAttributeLayouts.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../engine/webgl/brushes/WGLGeometryBrushMarker.js";import"../engine/webgl/number.js";import"../engine/vectorTiles/style/StyleDefinition.js";import"../../../chunks/vec2f32.js";import"../engine/vectorTiles/enums.js";import"../engine/vectorTiles/shaders/sources/resolver.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../engine/webgl/shaders/sources/resolver.js";import"../engine/webgl/TextureManager.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/effects/BlendEffect.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../engine/webgl/Profiler.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/interfaces.js";import"../../../core/floatRGBA.js";import"../../3d/webgl-engine/lib/OrderIndependentTransparency.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../LabelManager.js";import a from"./graphics/GraphicsView2D.js";import"../engine/webgl/AttributeStoreView.js";import"../../../core/asyncUtils.js";import"../../../core/Collection.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../layers/graphics/featureConversionUtils.js";import"../../../core/unitUtils.js";import"../../../renderers/support/lengthUtils.js";import"../../../chunks/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"../navigation/MapViewNavigation.js";import"../engine/webgl/shaders/MagnifierPrograms.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import g from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as c,resampleImage as m}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import f from"../tiling/TileKey.js";import d from"../tiling/TileQueue.js";import w from"../tiling/TileStrategy.js";import j from"../../layers/LayerView.js";import y from"../../layers/RefreshableLayerView.js";import{isMapServiceLayerView as b,MapServiceLayerViewHelper as _}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as T}from"../../support/drapedUtils.js";const V=[0,0];let v=class extends(y(n(p(j)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new h,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new d({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i)}),this._tileStrategy=new w({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),b(this,this.layer)){const e=this._highlightView=new a({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new g(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new _({createFetchPopupFeaturesQueryGeometry:(e,i)=>T(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:(i,t)=>{e.graphicUpdateHandler({graphic:i,property:t})},layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeatures(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeatures(e,i):[]}highlight(e){return this._popupHighlightHelper?this._popupHighlightHelper.highlight(e):i()}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return l(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(V,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,i={}){const t=this.tilemapCache,{signal:s,resamplingLevel:o=0}=i;if(!t)try{return await this._fetchImage(e,s)}catch(a){if(!r(a)&&!this.resampling)return c(this._tileInfoView.tileInfo.size);if(o<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const r=new f(t),s=await this.fetchTile(r,{...i,resamplingLevel:o+1});return m(this._tileInfoView,s,r,e)}}throw a}const l=new f(0,0,0,0);let h;try{if(await t.fetchAvailabilityUpsample(e.level,e.row,e.col,l,{signal:s}),l.level!==e.level&&!this.resampling)return c(this._tileInfoView.tileInfo.size);h=await this._fetchImage(l,s)}catch(a){if(r(a))throw a;h=await this._fetchImage(e,s)}return this.resampling?m(this._tileInfoView,h,l,e):h}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(i){r(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([s()],v.prototype,"resampling",null),e([s()],v.prototype,"tilemapCache",null),v=e([o("esri.views.2d.layers.TileLayerView2D")],v);const I=v;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.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as a}from"../../../geometry/support/spatialReferenceUtils.js";import{BitmapTileLayerView2D as l}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as o}from"./LayerView2D.js";import{resampleImage as h}from"./support/imageUtils.js";import n from"../tiling/TileInfoView.js";import c from"../tiling/TileKey.js";import u from"../tiling/TileQueue.js";import p from"../tiling/TileStrategy.js";import f from"../../layers/LayerView.js";import d from"../../layers/RefreshableLayerView.js";const m=[102113,102100,3857,3785,900913],y=[0,0];let _=class extends(d(l(o(f)))){constructor(){super(...arguments),this._tileStrategy=null,this._fetchQueue=null,this.layer=null}get tileMatrixSet(){const e=this._getTileMatrixSetBySpatialReference(this.layer.activeLayer);return e?(e.id!==this.layer.activeLayer.tileMatrixSetId&&(this.layer.activeLayer.tileMatrixSetId=e.id),e):null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume()}attach(){const e=this.tileMatrixSet?.tileInfo;e&&(this._tileInfoView=new n(e),this._fetchQueue=new u({tileInfoView:this._tileInfoView,concurrency:16,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new p({cachePolicy:"keep",resampling:!0,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),this.addAttachHandles(this._updatingHandles.add((()=>[this.layer?.activeLayer?.styleId,this.tileMatrixSet]),(()=>this.doRefresh()))),super.attach())}detach(){super.detach(),this._tileStrategy?.destroy(),this._fetchQueue?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return this.layer.activeLayer.tileMatrixSets?.some((t=>a(t.tileInfo?.spatialReference,e)))??!1}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(y,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(t)),this._bitmapView.addChild(t),this.requestUpdate(),t}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,t={}){const s="tilemapCache"in this.layer?this.layer.tilemapCache:null,{signal:r,resamplingLevel:a=0}=t;if(!s)return this._fetchImage(e,r);const l=new c(0,0,0,0);let o;try{await s.fetchAvailabilityUpsample(e.level,e.row,e.col,l,{signal:r}),o=await this._fetchImage(l,r)}catch(n){if(i(n))throw n;if(a<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const s=new c(i),r=await this.fetchTile(s,{...t,resamplingLevel:a+1});return h(this._tileInfoView,r,s,e)}}throw n}return h(this._tileInfoView,o,l,e)}canResume(){const e=super.canResume();return e?null!==this.tileMatrixSet:e}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(s){i(s)||t.getLogger(this).error(s)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:t})}_getTileMatrixSetBySpatialReference(e){const t=this.view.spatialReference;if(!e.tileMatrixSets)return null;let i=e.tileMatrixSets.find((e=>a(e.tileInfo?.spatialReference,t)));return!i&&t.isWebMercator&&(i=e.tileMatrixSets.find((e=>m.includes(e.tileInfo?.spatialReference.wkid??-1)))),i}};e([s({readOnly:!0})],_.prototype,"tileMatrixSet",null),_=e([r("esri.views.2d.layers.WMTSLayerView2D")],_);const w=_;export{w as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as a}from"../../../geometry/support/spatialReferenceUtils.js";import{BitmapTileLayerView2D as l}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as o}from"./LayerView2D.js";import{resampleImage as h}from"./support/imageUtils.js";import n from"../tiling/TileInfoView.js";import c from"../tiling/TileKey.js";import u from"../tiling/TileQueue.js";import p from"../tiling/TileStrategy.js";import f from"../../layers/LayerView.js";import m from"../../layers/RefreshableLayerView.js";const d=new Set([102113,102100,3857,3785,900913]),y=[0,0];let _=class extends(m(l(o(f)))){constructor(){super(...arguments),this._tileStrategy=null,this._fetchQueue=null,this.layer=null}get tileMatrixSet(){const e=this._getTileMatrixSetBySpatialReference(this.layer.activeLayer);return e?(e.id!==this.layer.activeLayer.tileMatrixSetId&&(this.layer.activeLayer.tileMatrixSetId=e.id),e):null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume()}attach(){const e=this.tileMatrixSet?.tileInfo;e&&(this._tileInfoView=new n(e),this._fetchQueue=new u({tileInfoView:this._tileInfoView,concurrency:16,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new p({cachePolicy:"keep",resampling:!0,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),this.addAttachHandles(this._updatingHandles.add((()=>[this.layer?.activeLayer?.styleId,this.tileMatrixSet]),(()=>this.doRefresh()))),super.attach())}detach(){super.detach(),this._tileStrategy?.destroy(),this._fetchQueue?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return this.layer.activeLayer.tileMatrixSets?.some((t=>a(t.tileInfo?.spatialReference,e)))??!1}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh((e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e))))}}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(y,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(t)),this._bitmapView.addChild(t),this.requestUpdate(),t}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,t={}){const s="tilemapCache"in this.layer?this.layer.tilemapCache:null,{signal:r,resamplingLevel:a=0}=t;if(!s)return this._fetchImage(e,r);const l=new c(0,0,0,0);let o;try{await s.fetchAvailabilityUpsample(e.level,e.row,e.col,l,{signal:r}),o=await this._fetchImage(l,r)}catch(n){if(i(n))throw n;if(a<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const s=new c(i),r=await this.fetchTile(s,{...t,resamplingLevel:a+1});return h(this._tileInfoView,r,s,e)}}throw n}return h(this._tileInfoView,o,l,e)}canResume(){const e=super.canResume();return e?null!==this.tileMatrixSet:e}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(s){i(s)||t.getLogger(this).error(s)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:t})}_getTileMatrixSetBySpatialReference(e){const t=this.view.spatialReference;if(!e.tileMatrixSets)return null;let i=e.tileMatrixSets.find((e=>a(e.tileInfo?.spatialReference,t)));return!i&&t.isWebMercator&&(i=e.tileMatrixSets.find((e=>d.has(e.tileInfo?.spatialReference.wkid??-1)))),i}};e([s({readOnly:!0})],_.prototype,"tileMatrixSet",null),_=e([r("esri.views.2d.layers.WMTSLayerView2D")],_);const w=_;export{w 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.28/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../../geometry.js";import{ArcadeDate as e}from"../../../../../arcade/ArcadeDate.js";import{DateTimeReferenceFieldIndex as t}from"../../../../../arcade/arcadeTimeUtils.js";import has from"../../../../../core/has.js";import{assertIsSome as r}from"../../../../../core/maybe.js";import{DateOnly as s}from"../../../../../core/sql/DateOnly.js";import{TimeOnly as i}from"../../../../../core/sql/TimeOnly.js";import{GeometryCursor as a}from"../../../../../geometry/GeometryCursor.js";import{getLabelPoint as n}from"../../../../../geometry/support/labelPoint.js";import{convertToGeometry as o}from"../../../../../layers/graphics/featureConversionUtils.js";import d from"../../../../../layers/graphics/OptimizedGeometry.js";import{StaticBitSet as u}from"./StaticBitSet.js";import{fromJSON as l}from"../../../../../geometry/support/jsonUtils.js";let m=0;const c=has("featurelayer-simplify-thresholds")??[.5,.5,.5,.5],h=c[0],f=c[1],y=c[2],p=c[3],g=has("featurelayer-simplify-payload-size-factors")??[1,2,4],_=g[0],A=g[1],x=g[2],T=has("featurelayer-simplify-mobile-factor")??2,I=has("esri-mobile");class b{constructor(e,t){this.type="FeatureSetReader",this.arcadeDeclaredClass="esri.arcade.Feature",this.seen=!1,this.instance=0,this._tx=0,this._ty=0,this._sx=1,this._sy=1,this._deleted=null,this._joined=[],this._objectIdToIndex=null,this._level=0,this._datetimeMetadata=null,this.contextTimeReference=null,this.instance=e,this._layerSchema=t}static createInstance(){return m++,m=m>65535?0:m,m}get isEmpty(){return null!=this._deleted&&this._deleted.countSet()===this.getSize()}set level(e){this._level=e}getAreaSimplificationThreshold(e,t){let r=1;const s=I?T:1;t>4e6?r=x*s:t>1e6?r=A*s:t>5e5?r=_*s:t>1e5&&(r=s);let i=0;e>4e3?i=p*r:e>2e3?i=y*r:e>100?i=f:e>15&&(i=h);let a=8;return this._level<4?a=1:this._level<5?a=2:this._level<6&&(a=4),i*a}createQuantizedExtrudedQuad(e,t){return new d([5],[e-1,t,1,-1,1,1,-1,1,-1,-1])}parseTimestampOffset(e){return e}setArcadeSpatialReference(e){this._arcadeSpatialReference=e}attachStorage(e){this._storage=e}getQuantizationTransform(){throw new Error("Unable to find transform for featureSet")}getStorage(){return this._storage}getComputedNumeric(e){return this.getComputedNumericAtIndex(0)}setComputedNumeric(e,t){return this.setComputedNumericAtIndex(t,0)}getComputedString(e){return this.getComputedStringAtIndex(0)}setComputedString(e,t){return this.setComputedStringAtIndex(0,t)}getComputedNumericAtIndex(e){return this._storage.getComputedNumericAtIndex(this.getDisplayId(),e)}setComputedNumericAtIndex(e,t){this._storage.setComputedNumericAtIndex(this.getDisplayId(),e,t)}getComputedStringAtIndex(e){return this._storage.getComputedStringAtIndex(this.getDisplayId(),e)}setComputedStringAtIndex(e,t){return this._storage.setComputedStringAtIndex(this.getDisplayId(),e,t)}transform(e,t,r,s){const i=this.copy();return i._tx+=e,i._ty+=t,i._sx*=r,i._sy*=s,i}readAttributeAsTimestamp(e){const t=this.readAttribute(e);return"number"==typeof t?t:new Date(t).getTime()}readAttribute(e,t=!1){const r=this._readAttribute(e,t);if(void 0!==r)return r;for(const s of this._joined){s.setIndex(this.getIndex());const r=s._readAttribute(e,t);if(void 0!==r)return r}}readAttributes(){const e=this._readAttributes();for(const t of this._joined){t.setIndex(this.getIndex());const r=t._readAttributes();for(const t of Object.keys(r))e[t]=r[t]}return e}joinAttributes(e){this._joined.push(e)}readArcadeFeature(){return this}hasField(e){return this.fields.has(e)}geometry(){const e=this.readHydratedGeometry(),t=o(e,this.geometryType,this.hasZ,this.hasM),r=l(t);return r&&(r.spatialReference=this._arcadeSpatialReference),r}get dateTimeReferenceFieldIndex(){return this._datetimeMetadata||(this._datetimeMetadata=t.create(this._layerSchema.fields,this._layerSchema)),this._datetimeMetadata}autocastArcadeDate(t,r){return r&&r instanceof Date?this.isUnknownDateTimeField(t)?e.unknownDateJSToArcadeDate(r):e.dateJSAndZoneToArcadeDate(r,this.contextTimeReference?.timeZone??"system"):r}isUnknownDateTimeField(e){return"unknown"===this.dateTimeReferenceFieldIndex?.fieldTimeZone(e)}fieldSourceTimeZone(e){return this.dateTimeReferenceFieldIndex?.fieldTimeZone(e)??""}get layerPreferredTimeZone(){return this.dateTimeReferenceFieldIndex?.layerPreferredTimeZone??""}field(t){let r=this.fields.get(t);if(r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.fromReader(this.readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return i.fromReader(this.readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(this.readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,this.readAttribute(t,!0));default:return this.readAttribute(t,!1)}for(const a of this._joined)if(a.setIndex(this.getIndex()),r=a.fields.get(t),r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.fromReader(a._readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return i.fromReader(a._readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(a._readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,a._readAttribute(t,!0));default:return this.readAttribute(t,!1)}throw new Error(`Field ${t} does not exist`)}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.fields.fields.map((e=>e.name))}castToText(e=!1){if(!e)return JSON.stringify(this.readLegacyFeature());const t=this.readLegacyFeature();if(!t)return JSON.stringify(null);const r={geometry:t.geometry,attributes:{...t.attributes??{}}};for(const s in r.attributes){const e=r.attributes[s];e instanceof Date&&(r.attributes[s]=e.getTime())}return JSON.stringify(r)}gdbVersion(){return null}fullSchema(){return this._layerSchema}castAsJson(e=null){return{attributes:this._readAttributes(),geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}removeIds(e){if(null==this._objectIdToIndex){const e=new Map,t=this.getCursor();for(;t.next();){const s=t.getObjectId();r(s),e.set(s,t.getIndex())}this._objectIdToIndex=e}const t=this._objectIdToIndex;for(const r of e)t.has(r)&&this.removeAtIndex(t.get(r))}removeAtIndex(e){null==this._deleted&&(this._deleted=u.create(this.getSize())),this._deleted.set(e)}readGeometryForDisplay(){return this.readUnquantizedGeometry(!0)}readLegacyGeometryForDisplay(){return this.readLegacyGeometry(!0)}*features(){const e=this.getCursor();for(;e.next();)yield e.readOptimizedFeature()}_getExists(){return null==this._deleted||!this._deleted.has(this.getIndex())}_computeCentroid(){if("esriGeometryPolygon"!==this.geometryType)return null;const e=this.readUnquantizedGeometry();if(!e||e.hasIndeterminateRingOrder)return null;const t=a.fromOptimized(e,this.geometryType);t.yFactor*=-1;const r=n(t);return r?(r[1]*=-1,new d([],r)):null}copyInto(e){e.seen=this.seen,e._storage=this._storage,e._arcadeSpatialReference=this._arcadeSpatialReference,e._joined=this._joined,e._tx=this._tx,e._ty=this._ty,e._sx=this._sx,e._sy=this._sy,e._deleted=this._deleted,e._objectIdToIndex=this._objectIdToIndex}}export{b as FeatureSetReader};
5
+ import"../../../../../geometry.js";import{ArcadeDate as e}from"../../../../../arcade/ArcadeDate.js";import{DateTimeReferenceFieldIndex as t}from"../../../../../arcade/arcadeTimeUtils.js";import has from"../../../../../core/has.js";import{assertIsSome as r}from"../../../../../core/maybe.js";import{DateOnly as i}from"../../../../../core/sql/DateOnly.js";import{TimeOnly as s}from"../../../../../core/sql/TimeOnly.js";import{GeometryCursor as a}from"../../../../../geometry/GeometryCursor.js";import{getLabelPoint as n}from"../../../../../geometry/support/labelPoint.js";import{convertToGeometry as o}from"../../../../../layers/graphics/featureConversionUtils.js";import d from"../../../../../layers/graphics/OptimizedGeometry.js";import{system as u,unknown as m}from"../../../../../time/timeZoneUtils.js";import{StaticBitSet as l}from"./StaticBitSet.js";import{fromJSON as c}from"../../../../../geometry/support/jsonUtils.js";let h=0;const f=has("featurelayer-simplify-thresholds")??[.5,.5,.5,.5],y=f[0],p=f[1],g=f[2],_=f[3],A=has("featurelayer-simplify-payload-size-factors")??[1,2,4],x=A[0],T=A[1],I=A[2],b=has("featurelayer-simplify-mobile-factor")??2,S=has("esri-mobile");class j{constructor(e,t){this.type="FeatureSetReader",this.arcadeDeclaredClass="esri.arcade.Feature",this.seen=!1,this.instance=0,this._tx=0,this._ty=0,this._sx=1,this._sy=1,this._deleted=null,this._joined=[],this._objectIdToIndex=null,this._level=0,this._datetimeMetadata=null,this.contextTimeReference=null,this.instance=e,this._layerSchema=t}static createInstance(){return h++,h=h>65535?0:h,h}get isEmpty(){return null!=this._deleted&&this._deleted.countSet()===this.getSize()}set level(e){this._level=e}getAreaSimplificationThreshold(e,t){let r=1;const i=S?b:1;t>4e6?r=I*i:t>1e6?r=T*i:t>5e5?r=x*i:t>1e5&&(r=i);let s=0;e>4e3?s=_*r:e>2e3?s=g*r:e>100?s=p:e>15&&(s=y);let a=8;return this._level<4?a=1:this._level<5?a=2:this._level<6&&(a=4),s*a}createQuantizedExtrudedQuad(e,t){return new d([5],[e-1,t,1,-1,1,1,-1,1,-1,-1])}parseTimestampOffset(e){return e}setArcadeSpatialReference(e){this._arcadeSpatialReference=e}attachStorage(e){this._storage=e}getQuantizationTransform(){throw new Error("Unable to find transform for featureSet")}getStorage(){return this._storage}getComputedNumeric(e){return this.getComputedNumericAtIndex(0)}setComputedNumeric(e,t){return this.setComputedNumericAtIndex(t,0)}getComputedString(e){return this.getComputedStringAtIndex(0)}setComputedString(e,t){return this.setComputedStringAtIndex(0,t)}getComputedNumericAtIndex(e){return this._storage.getComputedNumericAtIndex(this.getDisplayId(),e)}setComputedNumericAtIndex(e,t){this._storage.setComputedNumericAtIndex(this.getDisplayId(),e,t)}getComputedStringAtIndex(e){return this._storage.getComputedStringAtIndex(this.getDisplayId(),e)}setComputedStringAtIndex(e,t){return this._storage.setComputedStringAtIndex(this.getDisplayId(),e,t)}transform(e,t,r,i){const s=this.copy();return s._tx+=e,s._ty+=t,s._sx*=r,s._sy*=i,s}readAttributeAsTimestamp(e){const t=this.readAttribute(e);return"number"==typeof t?t:new Date(t).getTime()}readAttribute(e,t=!1){const r=this._readAttribute(e,t);if(void 0!==r)return r;for(const i of this._joined){i.setIndex(this.getIndex());const r=i._readAttribute(e,t);if(void 0!==r)return r}}readAttributes(){const e=this._readAttributes();for(const t of this._joined){t.setIndex(this.getIndex());const r=t._readAttributes();for(const t of Object.keys(r))e[t]=r[t]}return e}joinAttributes(e){this._joined.push(e)}readArcadeFeature(){return this}hasField(e){return this.fields.has(e)}geometry(){const e=this.readHydratedGeometry(),t=o(e,this.geometryType,this.hasZ,this.hasM),r=c(t);return r&&(r.spatialReference=this._arcadeSpatialReference),r}get dateTimeReferenceFieldIndex(){return this._datetimeMetadata||(this._datetimeMetadata=t.create(this._layerSchema.fields,this._layerSchema)),this._datetimeMetadata}autocastArcadeDate(t,r){return r&&r instanceof Date?this.isUnknownDateTimeField(t)?e.unknownDateJSToArcadeDate(r):e.dateJSAndZoneToArcadeDate(r,this.contextTimeReference?.timeZone??u):r}isUnknownDateTimeField(e){return this.dateTimeReferenceFieldIndex?.fieldTimeZone(e)===m}fieldSourceTimeZone(e){return this.dateTimeReferenceFieldIndex?.fieldTimeZone(e)??""}get layerPreferredTimeZone(){return this.dateTimeReferenceFieldIndex?.layerPreferredTimeZone??""}field(t){let r=this.fields.get(t);if(r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return i.fromReader(this.readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return s.fromReader(this.readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(this.readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,this.readAttribute(t,!0));default:return this.readAttribute(t,!1)}for(const a of this._joined)if(a.setIndex(this.getIndex()),r=a.fields.get(t),r)switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return i.fromReader(a._readAttribute(t,!1));case"time-only":case"esriFieldTypeTimeOnly":return s.fromReader(a._readAttribute(t,!1));case"esriFieldTypeTimestampOffset":case"timestamp-offset":return e.fromReaderAsTimeStampOffset(a._readAttribute(t,!1));case"date":case"esriFieldTypeDate":return this.autocastArcadeDate(t,a._readAttribute(t,!0));default:return this.readAttribute(t,!1)}throw new Error(`Field ${t} does not exist`)}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this.fields.fields.map((e=>e.name))}castToText(e=!1){if(!e)return JSON.stringify(this.readLegacyFeature());const t=this.readLegacyFeature();if(!t)return JSON.stringify(null);const r={geometry:t.geometry,attributes:{...t.attributes??{}}};for(const i in r.attributes){const e=r.attributes[i];e instanceof Date&&(r.attributes[i]=e.getTime())}return JSON.stringify(r)}gdbVersion(){return null}fullSchema(){return this._layerSchema}castAsJson(e=null){return{attributes:this._readAttributes(),geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}removeIds(e){if(null==this._objectIdToIndex){const e=new Map,t=this.getCursor();for(;t.next();){const i=t.getObjectId();r(i),e.set(i,t.getIndex())}this._objectIdToIndex=e}const t=this._objectIdToIndex;for(const r of e)t.has(r)&&this.removeAtIndex(t.get(r))}removeAtIndex(e){null==this._deleted&&(this._deleted=l.create(this.getSize())),this._deleted.set(e)}readGeometryForDisplay(){return this.readUnquantizedGeometry(!0)}readLegacyGeometryForDisplay(){return this.readLegacyGeometry(!0)}*features(){const e=this.getCursor();for(;e.next();)yield e.readOptimizedFeature()}_getExists(){return null==this._deleted||!this._deleted.has(this.getIndex())}_computeCentroid(){if("esriGeometryPolygon"!==this.geometryType)return null;const e=this.readUnquantizedGeometry();if(!e||e.hasIndeterminateRingOrder)return null;const t=a.fromOptimized(e,this.geometryType);t.yFactor*=-1;const r=n(t);return r?(r[1]*=-1,new d([],r)):null}copyInto(e){e.seen=this.seen,e._storage=this._storage,e._arcadeSpatialReference=this._arcadeSpatialReference,e._joined=this._joined,e._tx=this._tx,e._ty=this._ty,e._sx=this._sx,e._sy=this._sy,e._deleted=this._deleted,e._objectIdToIndex=this._objectIdToIndex}}export{j as FeatureSetReader};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../../../core/has.js";import{createResolver as e}from"../../../../../../core/promiseUtils.js";import{brushes as t}from"../../../../engine/brushes.js";import{FeatureContainer as s}from"../../../../engine/FeatureContainer.js";import{WGLDrawPhase as i}from"../../../../engine/webgl/enums.js";const r=has("featurelayer-order-by-server-enabled");class a extends s{constructor(e,t,s,i){super(e),this._hitTestsRequests=[],this._layer=s,this._layerView=t,this._onUpdate=i}renderChildren(e){if(this.attributeView.update(),this.hasAnimation){e.painter.effects.integrate.draw(e,e.attributeView)}super.renderChildren(e)}hasEmptyAttributeView(){return this.attributeView.isEmpty()}isUpdating(){return this.attributeView.isUpdating()}hitTest(t){let s=this._hitTestsRequests.find((({x:e,y:s})=>e===t.x&&s===t.y));const i=e();return s?s.resolvers.push(i):(s={x:t.x,y:t.y,resolvers:[i]},this._hitTestsRequests.push(s)),this.requestRender(),i.promise}onTileData(e,t){const s=r&&"orderBy"in this._layer&&this._layer.orderBy,i=s&&s?.length&&!s[0].valueExpression&&s[0].field,a=!!s&&this._layerView.orderByFields===i;e.patch(t,a),this.contains(e)||this.addChild(e),this.requestRender()}onTileError(e){this.contains(e)||this.addChild(e)}updateTransitionProperties(e,t){super.updateTransitionProperties(e,t),this._layerView.featureEffectView.transitionStep(e,t),this._layerView.featureEffectView.transitioning&&this.requestRender()}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,i=e.state.scale;i<=(t||1/0)&&i>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}onAttributeStoreUpdate(){this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this._onUpdate()}get hasAnimation(){return this.hasLabels}setStencilReference(e){const{rendererSchema:t}=e.rendererInfo;if("dot-density"===t?.type&&t?.dotSize>1||"heatmap"===t?.type){const e=1;for(const t of this.children)t.stencilRef=t.key.level+e}else super.setStencilReference(e)}get hasLabels(){if("sublayers"in this._layer)return this._layer.sublayers.some((e=>!!e.labelingInfo?.length&&e.labelsVisible));const e=this._layer.featureReduction,t=e&&"labelingInfo"in e&&e.labelsVisible&&e.labelingInfo&&e.labelingInfo.length;return this._layer.labelingInfo&&this._layer.labelingInfo.length&&this._layer.labelsVisible||!!t}prepareRenderPasses(e){const s=super.prepareRenderPasses(e),r=e.registerRenderPass({name:"label",brushes:[t.label],target:()=>this.hasLabels?this.children:null,drawPhase:i.LABEL|i.LABEL_ALPHA});if(has("featurelayer-force-marker-text-draw-order")){const i=e.registerRenderPass({name:"geometry",brushes:[t.fill,t.dotDensity,t.line,t.heatmap,t.pieChart],target:()=>this.children,forceDrawByDisplayOrder:!0,enableDefaultDraw:()=>!this._layerView.featureEffectView.hasEffects,effects:[{apply:e.effects.outsideEffect,enable:()=>this._layerView.featureEffectView.hasEffects,args:()=>this._layerView.featureEffectView.excludedEffects},{apply:e.effects.insideEffect,enable:()=>this._layerView.featureEffectView.hasEffects,args:()=>this._layerView.featureEffectView.includedEffects},{apply:e.effects.hittest,enable:()=>!!this._hitTestsRequests.length,args:()=>this._hitTestsRequests}]});s.push(i)}else{const i=e.registerRenderPass({name:"geometry",brushes:[t.fill,t.dotDensity,t.line,t.marker,t.heatmap,t.pieChart,t.text],target:()=>this.children,enableDefaultDraw:()=>!this._layerView.featureEffectView.hasEffects,effects:[{apply:e.effects.outsideEffect,enable:()=>this._layerView.featureEffectView.hasEffects,args:()=>this._layerView.featureEffectView.excludedEffects},{apply:e.effects.insideEffect,enable:()=>this._layerView.featureEffectView.hasEffects,args:()=>this._layerView.featureEffectView.includedEffects},{apply:e.effects.hittest,enable:()=>!!this._hitTestsRequests.length,args:()=>this._hitTestsRequests}]});s.push(i)}const a=e.registerRenderPass({name:"highlight",brushes:[t.fill,t.dotDensity,t.line,t.marker,t.pieChart,t.text],target:()=>this.children,drawPhase:i.HIGHLIGHT,enableDefaultDraw:()=>!1,effects:[{apply:e.effects.highlight,enable:()=>!!this._layerView.hasHighlight()}]});return s.push(a),s.push(r),s}}export{a as WGLFeatureView};
5
+ import has from"../../../../../../core/has.js";import{createResolver as e}from"../../../../../../core/promiseUtils.js";import{brushes as t}from"../../../../engine/brushes.js";import{FeatureContainer as s}from"../../../../engine/FeatureContainer.js";import{WGLDrawPhase as i}from"../../../../engine/webgl/enums.js";const r=has("featurelayer-order-by-server-enabled");class a extends s{constructor(e,t,s,i){super(e),this._hitTestsRequests=[],this._layer=s,this._layerView=t,this._onUpdate=i}renderChildren(e){if(this.attributeView.update(),this.hasAnimation){e.painter.effects.integrate.draw(e,e.attributeView)}super.renderChildren(e)}hasEmptyAttributeView(){return this.attributeView.isEmpty()}isUpdating(){return this.attributeView.isUpdating()}hitTest(t){let s=this._hitTestsRequests.find((({x:e,y:s})=>e===t.x&&s===t.y));const i=e();return s?s.resolvers.push(i):(s={x:t.x,y:t.y,resolvers:[i]},this._hitTestsRequests.push(s)),this.requestRender(),i.promise}onTileData(e,t){const s=r&&"orderBy"in this._layer&&this._layer.orderBy,i=s&&s?.length&&!s[0].valueExpression&&s[0].field,a=!!s&&this._layerView.orderByFields===i;e.patch(t,a),this.contains(e)||this.addChild(e),this.requestRender()}onTileError(e){this.contains(e)||this.addChild(e)}updateTransitionProperties(e,t){super.updateTransitionProperties(e,t),this._layerView.featureEffectView.transitionStep(e,t),this._layerView.featureEffectView.transitioning&&this.requestRender()}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,i=e.state.scale;i<=(t||1/0)&&i>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}onAttributeStoreUpdate(){this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this._onUpdate()}get hasAnimation(){return this.hasLabels}setStencilReference(e){const{rendererSchema:t}=e.rendererInfo;if("dot-density"===t?.type&&t?.dotSize>1||"heatmap"===t?.type){const e=1;for(const t of this.children)t.stencilRef=t.key.level+e}else super.setStencilReference(e)}get hasHighlight(){return this._layerView.hasHighlight()}get hasLabels(){if("sublayers"in this._layer)return this._layer.sublayers.some((e=>!!e.labelingInfo?.length&&e.labelsVisible));const e=this._layer.featureReduction,t=e&&"labelingInfo"in e&&e.labelsVisible&&e.labelingInfo&&e.labelingInfo.length;return this._layer.labelingInfo&&this._layer.labelingInfo.length&&this._layer.labelsVisible||!!t}prepareRenderPasses(e){const s=super.prepareRenderPasses(e),r=e.registerRenderPass({name:"label",brushes:[t.label],target:()=>this.hasLabels?this.children:null,drawPhase:i.LABEL|i.LABEL_ALPHA});if(has("featurelayer-force-marker-text-draw-order")){const i=e.registerRenderPass({name:"geometry",brushes:[t.fill,t.dotDensity,t.line,t.heatmap,t.pieChart],target:()=>this.children,forceDrawByDisplayOrder:!0,enableDefaultDraw:()=>!this._layerView.featureEffectView.hasEffects,effects:[{apply:e.effects.outsideEffect,enable:()=>this._layerView.featureEffectView.hasEffects,args:()=>this._layerView.featureEffectView.excludedEffects},{apply:e.effects.insideEffect,enable:()=>this._layerView.featureEffectView.hasEffects,args:()=>this._layerView.featureEffectView.includedEffects},{apply:e.effects.hittest,enable:()=>!!this._hitTestsRequests.length,args:()=>this._hitTestsRequests}]});s.push(i)}else{const i=e.registerRenderPass({name:"geometry",brushes:[t.fill,t.dotDensity,t.line,t.marker,t.heatmap,t.pieChart,t.text],target:()=>this.children,enableDefaultDraw:()=>!this._layerView.featureEffectView.hasEffects,effects:[{apply:e.effects.outsideEffect,enable:()=>this._layerView.featureEffectView.hasEffects,args:()=>this._layerView.featureEffectView.excludedEffects},{apply:e.effects.insideEffect,enable:()=>this._layerView.featureEffectView.hasEffects,args:()=>this._layerView.featureEffectView.includedEffects},{apply:e.effects.hittest,enable:()=>!!this._hitTestsRequests.length,args:()=>this._hitTestsRequests}]});s.push(i)}const a=e.registerRenderPass({name:"highlight",brushes:[t.fill,t.dotDensity,t.line,t.marker,t.pieChart,t.text],target:()=>this.children,drawPhase:i.HIGHLIGHT,enableDefaultDraw:()=>!1,effects:[{apply:e.effects.highlight,enable:()=>!!this._layerView.hasHighlight()}]});return s.push(a),s.push(r),s}}export{a as WGLFeatureView};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{destroyMaybe as e}from"../../../../core/maybe.js";import{FeatureContainer as t}from"../../engine/FeatureContainer.js";import r from"./GraphicBoundsRenderer.js";import{CompareFunction as s}from"../../../webgl/enums.js";let n=class extends t{constructor(e){super(e),this.hasHighlight=()=>!0}destroy(){super.destroy(),this._boundsRenderer=e(this._boundsRenderer)}enableRenderingBounds(e){this._boundsRenderer=new r(e),this.requestRender()}get hasLabels(){return!1}onTileData(e,t){e.patch(t),this.contains(e)||this.addChild(e),this.requestRender()}onTileError(e){e.clear(),this.contains(e)||this.addChild(e)}_renderChildren(e,t){for(const r of this.children)r.isReady&&r.hasData&&(r.commit(e),e.context.setStencilFunction(s.EQUAL,r.stencilRef,255),r.getDisplayList().replay(e,r,t))}};export{n as default};
5
+ import{destroyMaybe as e}from"../../../../core/maybe.js";import{FeatureContainer as t}from"../../engine/FeatureContainer.js";import r from"./GraphicBoundsRenderer.js";import{CompareFunction as s}from"../../../webgl/enums.js";let i=class extends t{constructor(e){super(e),this.checkHighlight=()=>!0}destroy(){super.destroy(),this._boundsRenderer=e(this._boundsRenderer)}enableRenderingBounds(e){this._boundsRenderer=new r(e),this.requestRender()}get hasHighlight(){return this.checkHighlight()}onTileData(e,t){e.patch(t),this.contains(e)||this.addChild(e),this.requestRender()}onTileError(e){e.clear(),this.contains(e)||this.addChild(e)}_renderChildren(e,t){for(const r of this.children)r.isReady&&r.hasData&&(r.commit(e),e.context.setStencilFunction(s.EQUAL,r.stencilRef,255),r.getDisplayList().replay(e,r,t))}};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.28/esri/copyright.txt for details.
4
4
  */
5
- import{WGLDrawPhase as e}from"../../engine/webgl/enums.js";import r from"./BaseGraphicContainer.js";class i extends r{renderChildren(r){this.attributeView.update(),this.children.some((e=>e.hasData))&&(this.attributeView.bindTextures(r.context,!1),super.renderChildren(r),r.drawPhase===e.MAP&&this._renderChildren(r),this.hasHighlight()&&r.drawPhase===e.HIGHLIGHT&&this._renderHighlight(r),this._boundsRenderer&&this._boundsRenderer.doRender(r))}_renderHighlight(e){const{painter:r}=e,i=r.effects.highlight;i.bind(e),this._renderChildren(e,i.defines),i.draw(e),i.unbind()}}export{i as default};
5
+ import{WGLDrawPhase as e}from"../../engine/webgl/enums.js";import r from"./BaseGraphicContainer.js";class i extends r{renderChildren(r){this.attributeView.update(),this.children.some((e=>e.hasData))&&(this.attributeView.bindTextures(r.context,!1),super.renderChildren(r),r.drawPhase===e.MAP&&this._renderChildren(r),this.hasHighlight&&r.drawPhase===e.HIGHLIGHT&&this._renderHighlight(r),this._boundsRenderer&&this._boundsRenderer.doRender(r))}_renderHighlight(e){const{painter:r}=e,i=r.effects.highlight;i.bind(e),this._renderChildren(e,i.defines),i.draw(e),i.unbind()}}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.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import{bidiText as s}from"../../../../core/BidiText.js";import has from"../../../../core/has.js";import{IdentifiableMixin as r}from"../../../../core/Identifiable.js";import{assertIsSome as o}from"../../../../core/maybe.js";import{throwIfAborted as a,isAbortError as n,throwIfAbortError as h}from"../../../../core/promiseUtils.js";import{watch as l}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../../core/accessorSupport/decorators/subclass.js";import c from"../../../../geometry/SpatialReference.js";import{width as g,height as u,create as m}from"../../../../geometry/support/aaBoundingRect.js";import{closeRingsAndFixWinding as _}from"../../../../geometry/support/coordsUtils.js";import{getJsonType as f,isPolygon as y,isPolyline as b,isExtent as S,isPoint as w,isMultipoint as v}from"../../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridianForDisplay as T}from"../../../../geometry/support/normalizeUtilsSync.js";import{getInfo as I}from"../../../../geometry/support/spatialReferenceUtils.js";import{checkProjectionSupport as U,project as G}from"../../../../layers/graphics/data/projectionSupport.js";import{symbolToCIM as M}from"../../../../symbols/cim/CIMSymbolHelper.js";import{errorPolylineSymbol2D as j,errorPolygonSymbol2D as C,errorPointSymbol2D as P}from"../../../../symbols/support/defaults.js";import{filterFlag0 as x}from"../../engine/webgl/definitions.js";import{WGLSymbologyType as R}from"../../engine/webgl/enums.js";import{GraphicTile as A}from"../../engine/webgl/GraphicTile.js";import{TileData as z}from"../../engine/webgl/TileData.js";import q from"../../engine/webgl/WGLDisplayObject.js";import{MeshData as D}from"../../engine/webgl/mesh/MeshData.js";import{WGLMeshFactory as F}from"../../engine/webgl/mesh/factories/WGLMeshFactory.js";import{WGLTemplateStore as H}from"../../engine/webgl/mesh/templates/WGLTemplateStore.js";import{createMatcher as E}from"../../engine/webgl/util/Matcher.js";import{createSymbolSchemaOptions as O,createMatcherSchema as k}from"../features/schemaUtils.js";import N from"../features/support/AttributeStore.js";import{ComputedAttributeStorage as B}from"../features/support/ComputedAttributeStorage.js";import{GraphicsReader as L}from"../features/support/GraphicsReader.js";import W from"./GraphicStore.js";import{intersectingInternationalDateline as V,isMarkerSymbol as J,isTextSymbol as Z,polygonFromExtent as K,tileSize as Q,pixelBuffer as X}from"./graphicsUtils.js";import{expandSymbol as Y}from"../support/cimSymbolUtils.js";import{getWebGLCapabilities as $}from"../../../webgl/capabilities.js";import{createSymbolSchema as ee}from"../features/createSymbolSchema.js";const te=has("esri-2d-graphic-debug");function ie(e,t,i){let s=i.get(e);return s||(s={tile:t,addedOrModified:[],removed:[]},i.set(e,s)),s}let se=class extends(r(t)){constructor(e){super(e),this._storage=new B,this._displayIds=new Map,this._controller=new AbortController,this._tiles=new Map,this._graphicStoreUpdate=!1,this._graphicsSet=new Set,this._matcher=Promise.resolve(null),this._tileUpdateSet=new Set,this._tilesToUpdate=new Map,this._graphicIdToAbortController=new Map,this._attached=!1,this._updatingGraphicsTimer=null,this._hashToExpandedSymbol=new Map,this._hashToExpandedSymbolPromise=new Map,this._hashToCIMSymbolPromise=new Map,this._hashToCIM=new Map,this._processing=!1,this._needsProcessing=!1,this._pendingUpdate={added:new Set,updated:new Set,removed:new Set},this.lastUpdateId=-1,this.renderer=null,this.updateRequested=!1,this.defaultPointSymbolEnabled=!0,this.graphicUpdateHandler=this.graphicUpdateHandler.bind(this)}destroy(){this._updatingGraphicsTimer&&(clearTimeout(this._updatingGraphicsTimer),this._updatingGraphicsTimer=null,this.notifyChange("updating")),this._controller.abort(),this.container.destroy(),this._set("graphics",null),this._graphicStore.clear(),this._attributeStore=null,this._hashToExpandedSymbol.clear(),this.view=null,this.renderer=null,this._hashToCIM.clear(),this._hashToCIMSymbolPromise.clear(),this._hashToExpandedSymbolPromise.clear()}_createMatcher(e,t,i){if(e){const s=O(e),r=k({indexCount:0,fields:{}},"feature",e,s);this._matcher=E(r,t,null,i)}}_createDisplayId(e){let t=this._displayIds.get(e);return t||(t=this._storage.createDisplayId(),this._displayIds.set(e,t)),t}initialize(){this._attributeStore=new N({type:"local",initialize:e=>Promise.resolve(this.container.attributeView.initialize(e)),update:e=>this.container.attributeView.requestUpdate(e),render:()=>this.container.requestRender()},$("2d")),this.container.hasHighlight=()=>this._attributeStore.hasHighlight;const e=e=>{this._createDisplayId(e.uid),this._setFilterState(e.uid,e.visible)},t=e=>{const t=this._displayIds.get(e.uid);this._displayIds.delete(e.uid),this._storage.releaseDisplayId(t)},i=new H(this.container.getMaterialItems.bind(this.container),this.view.featuresTilingScheme.tileInfo);this._graphicStore=new W(this.view.featuresTilingScheme,this.view.state.scale,this.uid,this.graphics,e,t,this._hashToCIM),this._meshFactory=new F(null,this.uid,i),this._templateStore=i,this.addHandles([l((()=>this._effectiveRenderer),(e=>{this._createMatcher(e,i,this.container.stage.resourceManager);for(const t of this.graphics)this._pendingUpdate.updated.add(t);this.requestUpdate()})),this.view.graphicsTileStore.on("update",this._onTileUpdate.bind(this)),this.container.on("attach",(()=>{te&&this.container.enableRenderingBounds((()=>this._graphicStore.getAllBounds())),this.graphics.items.length>0&&this._graphicsChangeHandler({target:this.graphics,added:this.graphics.items,removed:[],moved:[]}),this.addHandles(this.graphics.on("change",(e=>this._graphicsChangeHandler(e))),"graphics");const e=this.container.stage.resourceManager;this._createMatcher(this._effectiveRenderer,i,e),this._graphicStore.setResourceManager(e),this._attached=!0,this.notifyChange("updating")}))]);const s=this.view.graphicsTileStore.tiles;this._onTileUpdate({added:s,removed:[]})}get _effectiveRenderer(){return"function"==typeof this.renderer?this.renderer():this.renderer}get updating(){return!this._attached||null!==this._updatingGraphicsTimer||this._pendingUpdate.added.size>0||this._pendingUpdate.removed.size>0||this._pendingUpdate.updated.size>0||this._tileUpdateSet.size>0||this._tilesToUpdate.size>0||this._attributeStore?.updatingHandles.updating||this._processing}hitTest(e){if(!this.view||this.view.suspended)return[];const{resolution:t,rotation:i}=this.view.state;return this._graphicStore.hitTest(e.x,e.y,2,t,i)}update(e){a(this._controller.signal);const t=e.state,{resolution:i}=t;if(this._graphicStore.updateLevel(i),this._graphicStoreUpdate=!0,this.updateRequested=!1,this._pendingUpdate.updated.size>0){if(!this._processing)return void this._updateGraphics();this._needsProcessing=!0}}viewChange(){this.requestUpdate()}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.requestUpdateCallback())}processUpdate(e){this.updateRequested&&(this.updateRequested=!1,this.update(e))}graphicUpdateHandler(e){const{graphic:t,property:i}=e;switch(i){case"attributes":case"geometry":case"symbol":this._pendingUpdate.updated.add(t),this.requestUpdate();break;case"visible":this._setFilterState(t.uid,t.visible),this._attributeStore.sendUpdates()}}setHighlight(e){const t=e.map((e=>this._displayIds.get(e))).filter(i);this._attributeStore.setHighlight(e,t)}_getIntersectingTiles(e){const t=this._graphicStore.getBounds(e);if(!t||0===g(t)||0===u(t))return[];const i=V(t,this.view.spatialReference);return null!=i?[...new Set([...this.view.graphicsTileStore.boundsIntersections(i[0]),...this.view.graphicsTileStore.boundsIntersections(i[1])])]:this.view.graphicsTileStore.boundsIntersections(t)}async _updateTile(e){a(this._controller.signal);const t=e.tile,i=this._getGraphicsData(this._templateStore,t,e.addedOrModified),s=await this._processGraphics(t,i);return a(this._controller.signal),this._patchTile(t.key,{type:"update",addOrUpdate:s,remove:e.removed,end:!0,clear:!1,sort:!1}),s}_patchTile(e,t){const i=this._tiles.get(e);i&&(this.container.onTileData(i,t),this.container.requestRender())}_graphicsChangeHandler(e){const t=this._pendingUpdate;for(const i of e.added)t.added.add(i);for(const i of e.moved)t.updated.add(i);for(const i of e.removed)this._pendingUpdate.added.has(i)?t.added.delete(i):t.removed.add(i);this._processing?this._needsProcessing=!0:this._updateGraphics()}_getGraphicsToUpdate(){const e={added:[],removed:[],updated:[]};if(!this.graphics)return e;const t=this._pendingUpdate;for(const i of this.graphics.items)t.added.has(i)?e.added.push(i):t.updated.has(i)&&e.updated.push(i);for(const i of t.removed)this._graphicStore.has(i)&&e.removed.push(i);return t.added.clear(),t.removed.clear(),t.updated.clear(),e}async _updateGraphics(){this._processing=!0;const{added:e,removed:t,updated:i}=this._getGraphicsToUpdate(),s=this._tilesToUpdate;let r;try{if(!this._graphicStoreUpdate){const e=this.view.state,{resolution:t}=e;this._graphicStore.updateLevel(t)}const o=[],a=new Array(e.length+t.length);for(let e=0;e<i.length;e++){const t=i[e],n=this._getIntersectingTiles(t);for(const e of n){r=e.id;ie(r,e,s).removed.push(this._displayIds.get(t.uid))}o.push(this._updateGraphic(t,null)),a[e]=t}const n=i.length;for(let t=0;t<e.length;t++){const i=e[t];a[n+t]=i,this._graphicsSet.add(i),o.push(this._addGraphic(i))}for(const e of t){this._abortProcessingGraphic(e.uid);const t=this._getIntersectingTiles(e);for(const i of t){r=i.id;ie(r,i,s).removed.push(this._displayIds.get(e.uid))}this._graphicsSet.delete(e),this._graphicStore.remove(e)}let h;this._flipUpdatingGraphics(),await Promise.all(o);for(let e=0;e<a.length;e++){h=a[e];const t=this._getIntersectingTiles(h);for(const e of t){r=e.id;ie(r,e,s).addedOrModified.push(h)}}this._graphicStore.updateZ();const l=[];for(const[e,t]of s)l.push(this._updateTile(t));await Promise.all(l)}catch(o){n(o),0}for(const a of t)try{const e=await this._getSymbolForGraphic(a,null);if(e){const t=e.hash();this._hashToExpandedSymbol.delete(t)}}catch(o){n(o),0}s.clear(),this.notifyChange("updating"),this._processing=!1,this._needsProcessing&&(this._needsProcessing=!1,this._updateGraphics())}_getArcadeInfo(e){const t=(e.attributes?Object.keys(e.attributes):[]).map((t=>({name:t,alias:t,type:"string"==typeof e.attributes[t]?"esriFieldTypeString":"esriFieldTypeDouble"})));return null==e.geometry?null:{geometryType:f(e.geometry),spatialReference:c.fromJSON(e.geometry.spatialReference),fields:t}}_getSymbolForGraphic(e,t){return a(this._controller.signal),null!=e.symbol?Promise.resolve(e.symbol):null!=this._effectiveRenderer?this._effectiveRenderer.getSymbolAsync(e,{scale:this.view.state.scale,signal:null!=t?t.signal:null}):Promise.resolve(this._getNullSymbol(e))}_getCIMSymbol(e,t,i){let s=this._hashToCIM.get(t);if(s)return Promise.resolve(s);const r=M(e);if(null!=r){if("CIMSymbolReference"===r.type)return s=r,this._hashToCIM.set(t,s),Promise.resolve(s);let e=this._hashToCIMSymbolPromise.get(t);return e||(e=r.fetchCIMSymbol(i).then((e=>(this._hashToCIM.set(t,e.data),this._hashToCIMSymbolPromise.delete(t),e))).catch((e=>(this._hashToCIMSymbolPromise.delete(t),h(e),null))),this._hashToCIMSymbolPromise.set(t,e),e)}return Promise.resolve(null)}_expandCIMSymbol(e,t,i,s){const r=this._hashToExpandedSymbol.get(i);if(r)return Promise.resolve(r);let o=this._hashToExpandedSymbolPromise.get(i);if(o)return o;const a=this.container.stage,n=this._getArcadeInfo(t),h=O(null),l=ee(e,h);return o=Y(l,n,a.resourceManager,s),this._hashToExpandedSymbolPromise.set(i,o),o.then((e=>(this._hashToExpandedSymbol.set(i,e),this._hashToExpandedSymbolPromise.delete(i),e))),o}async _getSymbolResources(e,t){a(this._controller.signal);return this.container.stage?this._getSymbolForGraphic(e,t).then((i=>{if(!i)return null;const r=i.hash();return this._getCIMSymbol(i,r,t).then((a=>null==a?null:this._expandCIMSymbol(a,e,r,t).then((e=>{const t=e.layers.filter((e=>"text"===e.type&&"string"==typeof e.text));if(t&&t.length>0){const a=new Array(t.length);for(let e=0;e<t.length;e++){const r=t[e],o=[],[n]=s(r.text);r.text=n,"text"===i.type&&(r.lineWidth=i.lineWidth);for(let e=0;e<n.length;e++)o.push(n.charCodeAt(e));a[e]={symbol:r,id:e,glyphIds:o}}const n=new Map;return this.container.getMaterialItems(a).then((i=>{o(i);for(let e=0;e<t.length;e++){const s=t[e];n.set(s.cim,{text:s.text,mosaicItem:i[e].mosaicItem})}return{symbol:e,textInfo:n,hash:r}}))}return{symbol:e,hash:r}}))))})).catch((e=>(h(e),null))):null}async _projectAndNormalizeGeometry(e,t){if(a(this._controller.signal),null==e.geometry||"mesh"===e.geometry.type)return null;let i=e.geometry;if(y(i)){const e=i.rings;i.rings=e}else if(b(i)){const e=i.paths;i.paths=e}else if(S(i)){const s=await this._getSymbolForGraphic(e,t);if(a(this._controller.signal),s&&(J(s.type)||Z(s.type))){i=i.center}else i=K(i)}await U(i.spatialReference,this.view.spatialReference);const s=T(i),r=G(s,i.spatialReference,this.view.spatialReference);return r&&_(r),r}_onTileUpdate(e){const t=I(this.view.spatialReference);if(e.added&&e.added.length>0)for(const i of e.added)this._addNewTile(i,t);if(e.removed&&e.removed.length>0)for(const i of e.removed)this._removeTile(i.key)}async _addGraphic(e){this._abortProcessingGraphic(e.uid),a(this._controller.signal);const t=new AbortController;this._graphicIdToAbortController.set(e.uid,t);const i={signal:t.signal};try{await this._addOrUpdateGraphic(e,i),a(this._controller.signal),this._graphicIdToAbortController.delete(e.uid)}catch(s){if(this._graphicIdToAbortController.delete(e.uid),!n(s))throw s}}_updateGraphic(e,t){a(this._controller.signal);const i=this._projectAndNormalizeGeometry(e,t),s=this._getSymbolResources(e,t);return Promise.all([i,s]).then((([t,i])=>{a(this._controller.signal),this._graphicStore.addOrModify(e,i,t)}))}_addOrUpdateGraphic(e,t){a(this._controller.signal);const i=this._projectAndNormalizeGeometry(e,t),s=this._getSymbolResources(e,t);return Promise.all([i,s]).then((([t,i])=>{a(this._controller.signal),this._graphicsSet.has(e)&&this._graphicStore.addOrModify(e,i,t)}))}_addTile(e){const t=this.view.featuresTilingScheme.getTileBounds(m(),e),i=this.view.featuresTilingScheme.getTileResolution(e.level),s=new A(e,i,t[0],t[3]);return this._tiles.set(e,s),this.container.addChild(s),s}async _addNewTile(e,t){const i=this._addTile(e.key),s=this._graphicStore.queryTileData(this._templateStore,e);if(0===s.length)return;if(t){const i=Math.round((t.valid[1]-t.valid[0])/e.resolution);for(const e of s)e.geometry&&(w(e.geometry)||v(e.geometry))&&this._wrapPoints(e,i)}const r=e.key;this._tileUpdateSet.add(e.key),this.notifyChange("updating");try{const t={type:"update",clear:!1,addOrUpdate:await this._processGraphics(e,s),remove:[],end:!0,sort:!1};i.patch(t),this._tileUpdateSet.delete(r),this.notifyChange("updating")}catch(o){if(this._tileUpdateSet.delete(r),this.notifyChange("updating"),!n(o))throw o}}_removeTile(e){if(!this._tiles.has(e))return;const t=this._tiles.get(e);this.container.removeChild(t),t.destroy(),this._tiles.delete(e)}_setFilterState(e,t){const i=this._displayIds.get(e),s=this._attributeStore.getHighlightFlag(e);this._attributeStore.setData(i,0,0,s|(t?x:0))}_getGraphicsData(e,t,i){const s=this.view,r=I(s.spatialReference),o=this._graphicStore.getGraphicsData(e,t,i);if(r){const e=Math.round((r.valid[1]-r.valid[0])/t.resolution);for(const t of o)t.geometry&&(w(t.geometry)||v(t.geometry))&&this._wrapPoints(t,e)}return o}_wrapPoints(e,t){const i=e.geometry;v(i)?this._wrapMultipoint(i,t):this._wrapPoint(e,t)}_wrapMultipoint(e,t){const i=e.points,s=[];let r=0,o=0;for(const[a,n]of i){if(s.push([a+r,n]),r=0,t===Q){const e=5*X;a+o<e?(s.push([t,0]),r=-t):a+o>Q-e&&(s.push([-t,0]),r=t)}else a+o<-X?(s.push([t,0]),r=-t):a+o>Q+X&&(s.push([-t,0]),r=t);o+=a}e.points=s}_wrapPoint(e,t){const i=e.geometry;if(t===Q){const s=5*X;i.x<s?e.geometry={points:[[i.x,i.y],[t,0]]}:i.x>Q-s&&(e.geometry={points:[[i.x,i.y],[-t,0]]})}else i.x<-X?e.geometry={points:[[i.x,i.y],[t,0]]}:i.x>Q+X&&(e.geometry={points:[[i.x,i.y],[-t,0]]})}_processGraphics(e,t,i){if(!(t&&t.length)||!this._meshFactory)return Promise.resolve(null);const s=L.from(t,this.uid,e.transform),r=this._meshFactory;return this._matcher.then((t=>r.analyzeGraphics(s,this.container.stage.resourceManager,t,null,null,i).then((()=>(this._attributeStore.sendUpdates(),this._processAnalyzedGraphics(e,s))))))}_processAnalyzedGraphics(e,t){const i=this._meshFactory,s=t.getSize(),r=t.getCursor(),o={features:s,records:s,metrics:0},a=new D(e.key.id,o,R.DEFAULT,!1,!1),n=[];for(;r.next();){const t=r.readGraphic();t.insertAfter=-1===t.insertAfter?-1:this._displayIds.get(t.insertAfter),t.displayId=this._displayIds.get(t.attributes[this.uid]);const s=new q(t.displayId);s.insertAfter=t.insertAfter,n.push(s),i.writeGraphic(a,r,e.level,this.container.stage.resourceManager)}const h=e.tileInfoView.tileInfo.isWrappable,l=a.serialize(h);if(1!==l.length)return new z;const d=l[0].message;return z.fromVertexData(d,n)}_abortProcessingGraphic(e){this._graphicIdToAbortController.get(e)?.abort()}_getNullSymbol(e){const t=e.geometry;return b(t)?j:y(t)||S(t)?C:this.defaultPointSymbolEnabled?P:null}_flipUpdatingGraphics(){this._updatingGraphicsTimer&&clearTimeout(this._updatingGraphicsTimer),this._updatingGraphicsTimer=setTimeout((()=>{this._updatingGraphicsTimer=null,this.notifyChange("updating")}),160),this.notifyChange("updating")}};e([d()],se.prototype,"_effectiveRenderer",null),e([d({constructOnly:!0})],se.prototype,"requestUpdateCallback",void 0),e([d()],se.prototype,"container",void 0),e([d({constructOnly:!0})],se.prototype,"graphics",void 0),e([d()],se.prototype,"renderer",void 0),e([d()],se.prototype,"updating",null),e([d()],se.prototype,"view",void 0),e([d()],se.prototype,"updateRequested",void 0),e([d()],se.prototype,"defaultPointSymbolEnabled",void 0),se=e([p("esri.views.2d.layers.support.GraphicsView2D")],se);const re=se;export{re as default};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import{bidiText as s}from"../../../../core/BidiText.js";import has from"../../../../core/has.js";import{IdentifiableMixin as r}from"../../../../core/Identifiable.js";import{assertIsSome as o}from"../../../../core/maybe.js";import{throwIfAborted as a,isAbortError as n,throwIfAbortError as h}from"../../../../core/promiseUtils.js";import{watch as l}from"../../../../core/reactiveUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../../core/accessorSupport/decorators/subclass.js";import c from"../../../../geometry/SpatialReference.js";import{width as g,height as u,create as m}from"../../../../geometry/support/aaBoundingRect.js";import{closeRingsAndFixWinding as _}from"../../../../geometry/support/coordsUtils.js";import{getJsonType as f,isPolygon as y,isPolyline as b,isExtent as S,isPoint as w,isMultipoint as v}from"../../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridianForDisplay as T}from"../../../../geometry/support/normalizeUtilsSync.js";import{getInfo as I}from"../../../../geometry/support/spatialReferenceUtils.js";import{checkProjectionSupport as U,project as G}from"../../../../layers/graphics/data/projectionSupport.js";import{symbolToCIM as M}from"../../../../symbols/cim/CIMSymbolHelper.js";import{errorPolylineSymbol2D as j,errorPolygonSymbol2D as C,errorPointSymbol2D as P}from"../../../../symbols/support/defaults.js";import{filterFlag0 as x}from"../../engine/webgl/definitions.js";import{WGLSymbologyType as R}from"../../engine/webgl/enums.js";import{GraphicTile as A}from"../../engine/webgl/GraphicTile.js";import{TileData as z}from"../../engine/webgl/TileData.js";import q from"../../engine/webgl/WGLDisplayObject.js";import{MeshData as D}from"../../engine/webgl/mesh/MeshData.js";import{WGLMeshFactory as F}from"../../engine/webgl/mesh/factories/WGLMeshFactory.js";import{WGLTemplateStore as H}from"../../engine/webgl/mesh/templates/WGLTemplateStore.js";import{createMatcher as E}from"../../engine/webgl/util/Matcher.js";import{createSymbolSchemaOptions as O,createMatcherSchema as k}from"../features/schemaUtils.js";import N from"../features/support/AttributeStore.js";import{ComputedAttributeStorage as B}from"../features/support/ComputedAttributeStorage.js";import{GraphicsReader as L}from"../features/support/GraphicsReader.js";import W from"./GraphicStore.js";import{intersectingInternationalDateline as V,isMarkerSymbol as J,isTextSymbol as Z,polygonFromExtent as K,tileSize as Q,pixelBuffer as X}from"./graphicsUtils.js";import{expandSymbol as Y}from"../support/cimSymbolUtils.js";import{getWebGLCapabilities as $}from"../../../webgl/capabilities.js";import{createSymbolSchema as ee}from"../features/createSymbolSchema.js";const te=has("esri-2d-graphic-debug");function ie(e,t,i){let s=i.get(e);return s||(s={tile:t,addedOrModified:[],removed:[]},i.set(e,s)),s}let se=class extends(r(t)){constructor(e){super(e),this._storage=new B,this._displayIds=new Map,this._controller=new AbortController,this._tiles=new Map,this._graphicStoreUpdate=!1,this._graphicsSet=new Set,this._matcher=Promise.resolve(null),this._tileUpdateSet=new Set,this._tilesToUpdate=new Map,this._graphicIdToAbortController=new Map,this._attached=!1,this._updatingGraphicsTimer=null,this._hashToExpandedSymbol=new Map,this._hashToExpandedSymbolPromise=new Map,this._hashToCIMSymbolPromise=new Map,this._hashToCIM=new Map,this._processing=!1,this._needsProcessing=!1,this._pendingUpdate={added:new Set,updated:new Set,removed:new Set},this.lastUpdateId=-1,this.renderer=null,this.updateRequested=!1,this.defaultPointSymbolEnabled=!0,this.graphicUpdateHandler=this.graphicUpdateHandler.bind(this)}destroy(){this._updatingGraphicsTimer&&(clearTimeout(this._updatingGraphicsTimer),this._updatingGraphicsTimer=null,this.notifyChange("updating")),this._controller.abort(),this.container.destroy(),this._set("graphics",null),this._graphicStore.clear(),this._attributeStore=null,this._hashToExpandedSymbol.clear(),this.view=null,this.renderer=null,this._hashToCIM.clear(),this._hashToCIMSymbolPromise.clear(),this._hashToExpandedSymbolPromise.clear()}_createMatcher(e,t,i){if(e){const s=O(e),r=k({indexCount:0,fields:{}},"feature",e,s);this._matcher=E(r,t,null,i)}}_createDisplayId(e){let t=this._displayIds.get(e);return t||(t=this._storage.createDisplayId(),this._displayIds.set(e,t)),t}initialize(){this._attributeStore=new N({type:"local",initialize:e=>Promise.resolve(this.container.attributeView.initialize(e)),update:e=>this.container.attributeView.requestUpdate(e),render:()=>this.container.requestRender()},$("2d")),this.container.checkHighlight=()=>this._attributeStore.hasHighlight;const e=e=>{this._createDisplayId(e.uid),this._setFilterState(e.uid,e.visible)},t=e=>{const t=this._displayIds.get(e.uid);this._displayIds.delete(e.uid),this._storage.releaseDisplayId(t)},i=new H(this.container.getMaterialItems.bind(this.container),this.view.featuresTilingScheme.tileInfo);this._graphicStore=new W(this.view.featuresTilingScheme,this.view.state.scale,this.uid,this.graphics,e,t,this._hashToCIM),this._meshFactory=new F(null,this.uid,i),this._templateStore=i,this.addHandles([l((()=>this._effectiveRenderer),(e=>{this._createMatcher(e,i,this.container.stage.resourceManager);for(const t of this.graphics)this._pendingUpdate.updated.add(t);this.requestUpdate()})),this.view.graphicsTileStore.on("update",this._onTileUpdate.bind(this)),this.container.on("attach",(()=>{te&&this.container.enableRenderingBounds((()=>this._graphicStore.getAllBounds())),this.graphics.items.length>0&&this._graphicsChangeHandler({target:this.graphics,added:this.graphics.items,removed:[],moved:[]}),this.addHandles(this.graphics.on("change",(e=>this._graphicsChangeHandler(e))),"graphics");const e=this.container.stage.resourceManager;this._createMatcher(this._effectiveRenderer,i,e),this._graphicStore.setResourceManager(e),this._attached=!0,this.notifyChange("updating")}))]);const s=this.view.graphicsTileStore.tiles;this._onTileUpdate({added:s,removed:[]})}get _effectiveRenderer(){return"function"==typeof this.renderer?this.renderer():this.renderer}get updating(){return!this._attached||null!==this._updatingGraphicsTimer||this._pendingUpdate.added.size>0||this._pendingUpdate.removed.size>0||this._pendingUpdate.updated.size>0||this._tileUpdateSet.size>0||this._tilesToUpdate.size>0||this._attributeStore?.updatingHandles.updating||this._processing}hitTest(e){if(!this.view||this.view.suspended)return[];const{resolution:t,rotation:i}=this.view.state;return this._graphicStore.hitTest(e.x,e.y,2,t,i)}update(e){a(this._controller.signal);const t=e.state,{resolution:i}=t;if(this._graphicStore.updateLevel(i),this._graphicStoreUpdate=!0,this.updateRequested=!1,this._pendingUpdate.updated.size>0){if(!this._processing)return void this._updateGraphics();this._needsProcessing=!0}}viewChange(){this.requestUpdate()}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.requestUpdateCallback())}processUpdate(e){this.updateRequested&&(this.updateRequested=!1,this.update(e))}graphicUpdateHandler(e){const{graphic:t,property:i}=e;switch(i){case"attributes":case"geometry":case"symbol":this._pendingUpdate.updated.add(t),this.requestUpdate();break;case"visible":this._setFilterState(t.uid,t.visible),this._attributeStore.sendUpdates()}}setHighlight(e){const t=e.map((e=>this._displayIds.get(e))).filter(i);this._attributeStore.setHighlight(e,t)}_getIntersectingTiles(e){const t=this._graphicStore.getBounds(e);if(!t||0===g(t)||0===u(t))return[];const i=V(t,this.view.spatialReference);return null!=i?[...new Set([...this.view.graphicsTileStore.boundsIntersections(i[0]),...this.view.graphicsTileStore.boundsIntersections(i[1])])]:this.view.graphicsTileStore.boundsIntersections(t)}async _updateTile(e){a(this._controller.signal);const t=e.tile,i=this._getGraphicsData(this._templateStore,t,e.addedOrModified),s=await this._processGraphics(t,i);return a(this._controller.signal),this._patchTile(t.key,{type:"update",addOrUpdate:s,remove:e.removed,end:!0,clear:!1,sort:!1}),s}_patchTile(e,t){const i=this._tiles.get(e);i&&(this.container.onTileData(i,t),this.container.requestRender())}_graphicsChangeHandler(e){const t=this._pendingUpdate;for(const i of e.added)t.added.add(i);for(const i of e.moved)t.updated.add(i);for(const i of e.removed)this._pendingUpdate.added.has(i)?t.added.delete(i):t.removed.add(i);this._processing?this._needsProcessing=!0:this._updateGraphics()}_getGraphicsToUpdate(){const e={added:[],removed:[],updated:[]};if(!this.graphics)return e;const t=this._pendingUpdate;for(const i of this.graphics.items)t.added.has(i)?e.added.push(i):t.updated.has(i)&&e.updated.push(i);for(const i of t.removed)this._graphicStore.has(i)&&e.removed.push(i);return t.added.clear(),t.removed.clear(),t.updated.clear(),e}async _updateGraphics(){this._processing=!0;const{added:e,removed:t,updated:i}=this._getGraphicsToUpdate(),s=this._tilesToUpdate;let r;try{if(!this._graphicStoreUpdate){const e=this.view.state,{resolution:t}=e;this._graphicStore.updateLevel(t)}const o=[],a=new Array(e.length+t.length);for(let e=0;e<i.length;e++){const t=i[e],n=this._getIntersectingTiles(t);for(const e of n){r=e.id;ie(r,e,s).removed.push(this._displayIds.get(t.uid))}o.push(this._updateGraphic(t,null)),a[e]=t}const n=i.length;for(let t=0;t<e.length;t++){const i=e[t];a[n+t]=i,this._graphicsSet.add(i),o.push(this._addGraphic(i))}for(const e of t){this._abortProcessingGraphic(e.uid);const t=this._getIntersectingTiles(e);for(const i of t){r=i.id;ie(r,i,s).removed.push(this._displayIds.get(e.uid))}this._graphicsSet.delete(e),this._graphicStore.remove(e)}let h;this._flipUpdatingGraphics(),await Promise.all(o);for(let e=0;e<a.length;e++){h=a[e];const t=this._getIntersectingTiles(h);for(const e of t){r=e.id;ie(r,e,s).addedOrModified.push(h)}}this._graphicStore.updateZ();const l=[];for(const[e,t]of s)l.push(this._updateTile(t));await Promise.all(l)}catch(o){n(o),0}for(const a of t)try{const e=await this._getSymbolForGraphic(a,null);if(e){const t=e.hash();this._hashToExpandedSymbol.delete(t)}}catch(o){n(o),0}s.clear(),this.notifyChange("updating"),this._processing=!1,this._needsProcessing&&(this._needsProcessing=!1,this._updateGraphics())}_getArcadeInfo(e){const t=(e.attributes?Object.keys(e.attributes):[]).map((t=>({name:t,alias:t,type:"string"==typeof e.attributes[t]?"esriFieldTypeString":"esriFieldTypeDouble"})));return null==e.geometry?null:{geometryType:f(e.geometry),spatialReference:c.fromJSON(e.geometry.spatialReference),fields:t}}_getSymbolForGraphic(e,t){return a(this._controller.signal),null!=e.symbol?Promise.resolve(e.symbol):null!=this._effectiveRenderer?this._effectiveRenderer.getSymbolAsync(e,{scale:this.view.state.scale,signal:null!=t?t.signal:null}):Promise.resolve(this._getNullSymbol(e))}_getCIMSymbol(e,t,i){let s=this._hashToCIM.get(t);if(s)return Promise.resolve(s);const r=M(e);if(null!=r){if("CIMSymbolReference"===r.type)return s=r,this._hashToCIM.set(t,s),Promise.resolve(s);let e=this._hashToCIMSymbolPromise.get(t);return e||(e=r.fetchCIMSymbol(i).then((e=>(this._hashToCIM.set(t,e.data),this._hashToCIMSymbolPromise.delete(t),e))).catch((e=>(this._hashToCIMSymbolPromise.delete(t),h(e),null))),this._hashToCIMSymbolPromise.set(t,e),e)}return Promise.resolve(null)}_expandCIMSymbol(e,t,i,s){const r=this._hashToExpandedSymbol.get(i);if(r)return Promise.resolve(r);let o=this._hashToExpandedSymbolPromise.get(i);if(o)return o;const a=this.container.stage,n=this._getArcadeInfo(t),h=O(null),l=ee(e,h);return o=Y(l,n,a.resourceManager,s),this._hashToExpandedSymbolPromise.set(i,o),o.then((e=>(this._hashToExpandedSymbol.set(i,e),this._hashToExpandedSymbolPromise.delete(i),e))),o}async _getSymbolResources(e,t){a(this._controller.signal);return this.container.stage?this._getSymbolForGraphic(e,t).then((i=>{if(!i)return null;const r=i.hash();return this._getCIMSymbol(i,r,t).then((a=>null==a?null:this._expandCIMSymbol(a,e,r,t).then((e=>{const t=e.layers.filter((e=>"text"===e.type&&"string"==typeof e.text));if(t&&t.length>0){const a=new Array(t.length);for(let e=0;e<t.length;e++){const r=t[e],o=[],[n]=s(r.text);r.text=n,"text"===i.type&&(r.lineWidth=i.lineWidth);for(let e=0;e<n.length;e++)o.push(n.charCodeAt(e));a[e]={symbol:r,id:e,glyphIds:o}}const n=new Map;return this.container.getMaterialItems(a).then((i=>{o(i);for(let e=0;e<t.length;e++){const s=t[e];n.set(s.cim,{text:s.text,mosaicItem:i[e].mosaicItem})}return{symbol:e,textInfo:n,hash:r}}))}return{symbol:e,hash:r}}))))})).catch((e=>(h(e),null))):null}async _projectAndNormalizeGeometry(e,t){if(a(this._controller.signal),null==e.geometry||"mesh"===e.geometry.type)return null;let i=e.geometry;if(y(i)){const e=i.rings;i.rings=e}else if(b(i)){const e=i.paths;i.paths=e}else if(S(i)){const s=await this._getSymbolForGraphic(e,t);if(a(this._controller.signal),s&&(J(s.type)||Z(s.type))){i=i.center}else i=K(i)}await U(i.spatialReference,this.view.spatialReference);const s=T(i),r=G(s,i.spatialReference,this.view.spatialReference);return r&&_(r),r}_onTileUpdate(e){const t=I(this.view.spatialReference);if(e.added&&e.added.length>0)for(const i of e.added)this._addNewTile(i,t);if(e.removed&&e.removed.length>0)for(const i of e.removed)this._removeTile(i.key)}async _addGraphic(e){this._abortProcessingGraphic(e.uid),a(this._controller.signal);const t=new AbortController;this._graphicIdToAbortController.set(e.uid,t);const i={signal:t.signal};try{await this._addOrUpdateGraphic(e,i),a(this._controller.signal),this._graphicIdToAbortController.delete(e.uid)}catch(s){if(this._graphicIdToAbortController.delete(e.uid),!n(s))throw s}}_updateGraphic(e,t){a(this._controller.signal);const i=this._projectAndNormalizeGeometry(e,t),s=this._getSymbolResources(e,t);return Promise.all([i,s]).then((([t,i])=>{a(this._controller.signal),this._graphicStore.addOrModify(e,i,t)}))}_addOrUpdateGraphic(e,t){a(this._controller.signal);const i=this._projectAndNormalizeGeometry(e,t),s=this._getSymbolResources(e,t);return Promise.all([i,s]).then((([t,i])=>{a(this._controller.signal),this._graphicsSet.has(e)&&this._graphicStore.addOrModify(e,i,t)}))}_addTile(e){const t=this.view.featuresTilingScheme.getTileBounds(m(),e),i=this.view.featuresTilingScheme.getTileResolution(e.level),s=new A(e,i,t[0],t[3]);return this._tiles.set(e,s),this.container.addChild(s),s}async _addNewTile(e,t){const i=this._addTile(e.key),s=this._graphicStore.queryTileData(this._templateStore,e);if(0===s.length)return;if(t){const i=Math.round((t.valid[1]-t.valid[0])/e.resolution);for(const e of s)e.geometry&&(w(e.geometry)||v(e.geometry))&&this._wrapPoints(e,i)}const r=e.key;this._tileUpdateSet.add(e.key),this.notifyChange("updating");try{const t={type:"update",clear:!1,addOrUpdate:await this._processGraphics(e,s),remove:[],end:!0,sort:!1};i.patch(t),this._tileUpdateSet.delete(r),this.notifyChange("updating")}catch(o){if(this._tileUpdateSet.delete(r),this.notifyChange("updating"),!n(o))throw o}}_removeTile(e){if(!this._tiles.has(e))return;const t=this._tiles.get(e);this.container.removeChild(t),t.destroy(),this._tiles.delete(e)}_setFilterState(e,t){const i=this._displayIds.get(e),s=this._attributeStore.getHighlightFlag(e);this._attributeStore.setData(i,0,0,s|(t?x:0))}_getGraphicsData(e,t,i){const s=this.view,r=I(s.spatialReference),o=this._graphicStore.getGraphicsData(e,t,i);if(r){const e=Math.round((r.valid[1]-r.valid[0])/t.resolution);for(const t of o)t.geometry&&(w(t.geometry)||v(t.geometry))&&this._wrapPoints(t,e)}return o}_wrapPoints(e,t){const i=e.geometry;v(i)?this._wrapMultipoint(i,t):this._wrapPoint(e,t)}_wrapMultipoint(e,t){const i=e.points,s=[];let r=0,o=0;for(const[a,n]of i){if(s.push([a+r,n]),r=0,t===Q){const e=5*X;a+o<e?(s.push([t,0]),r=-t):a+o>Q-e&&(s.push([-t,0]),r=t)}else a+o<-X?(s.push([t,0]),r=-t):a+o>Q+X&&(s.push([-t,0]),r=t);o+=a}e.points=s}_wrapPoint(e,t){const i=e.geometry;if(t===Q){const s=5*X;i.x<s?e.geometry={points:[[i.x,i.y],[t,0]]}:i.x>Q-s&&(e.geometry={points:[[i.x,i.y],[-t,0]]})}else i.x<-X?e.geometry={points:[[i.x,i.y],[t,0]]}:i.x>Q+X&&(e.geometry={points:[[i.x,i.y],[-t,0]]})}_processGraphics(e,t,i){if(!(t&&t.length)||!this._meshFactory)return Promise.resolve(null);const s=L.from(t,this.uid,e.transform),r=this._meshFactory;return this._matcher.then((t=>r.analyzeGraphics(s,this.container.stage.resourceManager,t,null,null,i).then((()=>(this._attributeStore.sendUpdates(),this._processAnalyzedGraphics(e,s))))))}_processAnalyzedGraphics(e,t){const i=this._meshFactory,s=t.getSize(),r=t.getCursor(),o={features:s,records:s,metrics:0},a=new D(e.key.id,o,R.DEFAULT,!1,!1),n=[];for(;r.next();){const t=r.readGraphic();t.insertAfter=-1===t.insertAfter?-1:this._displayIds.get(t.insertAfter),t.displayId=this._displayIds.get(t.attributes[this.uid]);const s=new q(t.displayId);s.insertAfter=t.insertAfter,n.push(s),i.writeGraphic(a,r,e.level,this.container.stage.resourceManager)}const h=e.tileInfoView.tileInfo.isWrappable,l=a.serialize(h);if(1!==l.length)return new z;const d=l[0].message;return z.fromVertexData(d,n)}_abortProcessingGraphic(e){this._graphicIdToAbortController.get(e)?.abort()}_getNullSymbol(e){const t=e.geometry;return b(t)?j:y(t)||S(t)?C:this.defaultPointSymbolEnabled?P:null}_flipUpdatingGraphics(){this._updatingGraphicsTimer&&clearTimeout(this._updatingGraphicsTimer),this._updatingGraphicsTimer=setTimeout((()=>{this._updatingGraphicsTimer=null,this.notifyChange("updating")}),160),this.notifyChange("updating")}};e([d()],se.prototype,"_effectiveRenderer",null),e([d({constructOnly:!0})],se.prototype,"requestUpdateCallback",void 0),e([d()],se.prototype,"container",void 0),e([d({constructOnly:!0})],se.prototype,"graphics",void 0),e([d()],se.prototype,"renderer",void 0),e([d()],se.prototype,"updating",null),e([d()],se.prototype,"view",void 0),e([d()],se.prototype,"updateRequested",void 0),e([d()],se.prototype,"defaultPointSymbolEnabled",void 0),se=e([p("esri.views.2d.layers.support.GraphicsView2D")],se);const re=se;export{re 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.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{WGLDrawPhase as s}from"../../engine/webgl/enums.js";import t from"./BaseGraphicContainer.js";import{ClearBufferBit as o}from"../../../webgl/enums.js";let i=class extends t{doRender(e){e.drawPhase===s.HIGHLIGHT&&super.doRender(e)}renderChildren(e){if(this.attributeView.update(),!this.children.some((e=>e.hasData)))return;this.attributeView.bindTextures(e.context),super.renderChildren(e);const{painter:r}=e,s=r.effects.highlight;s.bind(e),e.context.setColorMask(!0,!0,!0,!0),e.context.clear(o.COLOR_BUFFER_BIT),this._renderChildren(e,s.defines.concat(["highlightAll"])),s.draw(e),s.unbind()}};i=e([r("esri.views.2d.layers.support.HighlightGraphicContainer")],i);const n=i;export{n as default};
5
+ import{_ as r}from"../../../../chunks/tslib.es6.js";import"../../../../core/Logger.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/Error.js";import{subclass as e}from"../../../../core/accessorSupport/decorators/subclass.js";import{WGLDrawPhase as t}from"../../engine/webgl/enums.js";import s from"./BaseGraphicContainer.js";import{ClearBufferBit as i}from"../../../webgl/enums.js";let o=class extends s{get hasHighlight(){return this.children.some((r=>r.hasData))}renderChildren(r){if(r.drawPhase!==t.HIGHLIGHT)return;if(this.attributeView.update(),!this.children.some((r=>r.hasData)))return;this.attributeView.bindTextures(r.context),super.renderChildren(r);const{painter:e}=r,s=e.effects.highlight;s.bind(r),r.context.setColorMask(!0,!0,!0,!0),r.context.clear(i.COLOR_BUFFER_BIT),this._renderChildren(r,s.defines.concat(["highlightAll"])),s.draw(r),s.unbind()}};o=r([e("esri.views.2d.layers.support.HighlightGraphicContainer")],o);const a=o;export{a as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../Graphic.js";import r from"../../../../request.js";import i from"../../../../core/Accessor.js";import{watch as s,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as n}from"../../../../core/accessorSupport/decorators/subclass.js";import l from"../../../../geometry/Extent.js";import{srToRESTValue as c}from"../../../../geometry/support/spatialReferenceUtils.js";import{projectExtent as m}from"../../../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{snapImageToSymbolTile as p,convertVectorFieldData as h}from"../../../../layers/support/rasterFunctions/vectorFieldUtils.js";import{RasterVFContainer as y}from"../../engine/imagery/RasterVFContainer.js";import u from"./ImageryVFStrategy.js";let x=class extends i{constructor(){super(...arguments),this.attached=!1,this.container=new y,this.type="imageryVF",this._dataParameters={exportParametersVersion:0,bbox:"",symbolTileSize:0,time:""},this._fetchpixels=async(t,e,r,i)=>{const s=await this._projectFullExtentPromise,{symbolTileSize:a}=this.layer.renderer,{extent:o,width:n,height:l}=p(t,e,r,a,s);if(null!=s&&!s.intersects(t))return{extent:o,pixelBlock:null};const c={bbox:`${o.xmin}, ${o.ymin}, ${o.xmax}, ${o.ymax}`,exportParametersVersion:this.layer.exportImageServiceParameters.version,symbolTileSize:a,time:JSON.stringify(this.timeExtent||"")};if(this._canReuseVectorFieldData(c)){const t=this.getPixelData();if(null!=t){if(`${t.extent.xmin}, ${t.extent.ymin}, ${t.extent.xmax}, ${t.extent.ymax}`===c.bbox)return t}}const{pixelData:m}=await this.layer.fetchImage(o,n,l,{timeExtent:this.timeExtent,requestAsImageElement:!1,signal:i});this._dataParameters=c;const y=m?.pixelBlock;if(null==y)return{extent:o,pixelBlock:null};return{extent:o,pixelBlock:"vector-uv"===this.layer.rasterInfo.dataType?h(y,"vector-uv"):y}}}get updating(){return!this.attached||this._strategy.updating}attach(){this._projectFullExtentPromise=this._getProjectedFullExtent(this.view.spatialReference),this._strategy=new u({container:this.container,fetchPixels:this._fetchpixels}),this.addHandles(s((()=>this.layer.renderer),(t=>this._updateSymbolizerParams(t)),a),"attach")}detach(){this._strategy.destroy(),this.container.children.forEach((t=>t.destroy())),this.container.removeAllChildren(),this.removeHandles("attach"),this._strategy=this.container=this._projectFullExtentPromise=null}getPixelData(){const t=this.container.children[0]?.rawPixelData;if(this.updating||!t)return null;const{extent:e,pixelBlock:r}=t;return{extent:e,pixelBlock:r}}hitTest(t){return new e({attributes:{},geometry:t.clone(),layer:this.layer})}update(t){this._strategy.update(t,this._symbolizerParams)}redraw(){const{renderer:t}=this.layer;t&&(this._updateSymbolizerParams(t),this._strategy.redraw(this._symbolizerParams))}_canReuseVectorFieldData(t){const e=this._dataParameters.exportParametersVersion===t.exportParametersVersion,r=this._dataParameters.time===t.time,i=this._dataParameters.symbolTileSize===t.symbolTileSize,s=this._dataParameters.bbox===t.bbox;return e&&r&&i&&s}async _getProjectedFullExtent(t){try{return await m(this.layer.fullExtent,t)}catch(e){try{const e=(await r(this.layer.url,{query:{option:"footprints",outSR:c(t),f:"json"}})).data.featureCollection.layers[0].layerDefinition.extent;return e?l.fromJSON(e):null}catch{return null}}}_updateSymbolizerParams(t){"vector-field"===t.type&&(this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null}))}};t([o()],x.prototype,"attached",void 0),t([o()],x.prototype,"container",void 0),t([o()],x.prototype,"layer",void 0),t([o()],x.prototype,"timeExtent",void 0),t([o()],x.prototype,"type",void 0),t([o()],x.prototype,"view",void 0),t([o()],x.prototype,"updating",null),x=t([n("esri.views.2d.layers.imagery.VectorFieldView2D")],x);const d=x;export{d as default};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../Graphic.js";import r from"../../../../request.js";import i from"../../../../core/Accessor.js";import s from"../../../../core/Logger.js";import{isAbortError as a}from"../../../../core/promiseUtils.js";import{watch as o,syncAndInitial as n}from"../../../../core/reactiveUtils.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/accessorSupport/ensureType.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import m from"../../../../geometry/Extent.js";import{srToRESTValue as p}from"../../../../geometry/support/spatialReferenceUtils.js";import{projectExtent as h}from"../../../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{snapImageToSymbolTile as y,convertVectorFieldData as u}from"../../../../layers/support/rasterFunctions/vectorFieldUtils.js";import{RasterVFContainer as x}from"../../engine/imagery/RasterVFContainer.js";import d from"./ImageryVFStrategy.js";let f=class extends i{constructor(){super(...arguments),this.attached=!1,this.container=new x,this.type="imageryVF",this._dataParameters={exportParametersVersion:0,bbox:"",symbolTileSize:0,time:""},this._fetchpixels=async(t,e,r,i)=>{const s=await this._projectFullExtentPromise,{symbolTileSize:a}=this.layer.renderer,{extent:o,width:n,height:l}=y(t,e,r,a,s);if(null!=s&&!s.intersects(t))return{extent:o,pixelBlock:null};const c={bbox:`${o.xmin}, ${o.ymin}, ${o.xmax}, ${o.ymax}`,exportParametersVersion:this.layer.exportImageServiceParameters.version,symbolTileSize:a,time:JSON.stringify(this.timeExtent||"")};if(this._canReuseVectorFieldData(c)){const t=this.getPixelData();if(null!=t){if(`${t.extent.xmin}, ${t.extent.ymin}, ${t.extent.xmax}, ${t.extent.ymax}`===c.bbox)return t}}const{pixelData:m}=await this.layer.fetchImage(o,n,l,{timeExtent:this.timeExtent,requestAsImageElement:!1,signal:i});this._dataParameters=c;const p=m?.pixelBlock;if(null==p)return{extent:o,pixelBlock:null};return{extent:o,pixelBlock:"vector-uv"===this.layer.rasterInfo.dataType?u(p,"vector-uv"):p}}}get updating(){return!this.attached||this._strategy.updating}attach(){this._projectFullExtentPromise=this._getProjectedFullExtent(this.view.spatialReference),this._strategy=new d({container:this.container,fetchPixels:this._fetchpixels}),this.addHandles(o((()=>this.layer.renderer),(t=>this._updateSymbolizerParams(t)),n),"attach")}detach(){this._strategy.destroy(),this.container.children.forEach((t=>t.destroy())),this.container.removeAllChildren(),this.removeHandles("attach"),this._strategy=this.container=this._projectFullExtentPromise=null}getPixelData(){const t=this.container.children[0]?.rawPixelData;if(this.updating||!t)return null;const{extent:e,pixelBlock:r}=t;return{extent:e,pixelBlock:r}}hitTest(t){return new e({attributes:{},geometry:t.clone(),layer:this.layer})}update(t){this._strategy.update(t,this._symbolizerParams).catch((t=>{a(t)||s.getLogger(this).error(t)}))}redraw(){const{renderer:t}=this.layer;t&&(this._updateSymbolizerParams(t),this._strategy.redraw(this._symbolizerParams))}_canReuseVectorFieldData(t){const e=this._dataParameters.exportParametersVersion===t.exportParametersVersion,r=this._dataParameters.time===t.time,i=this._dataParameters.symbolTileSize===t.symbolTileSize,s=this._dataParameters.bbox===t.bbox;return e&&r&&i&&s}async _getProjectedFullExtent(t){try{return await h(this.layer.fullExtent,t)}catch(e){try{const e=(await r(this.layer.url,{query:{option:"footprints",outSR:p(t),f:"json"}})).data.featureCollection.layers[0].layerDefinition.extent;return e?m.fromJSON(e):null}catch{return null}}}_updateSymbolizerParams(t){"vector-field"===t.type&&(this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null}))}};t([l()],f.prototype,"attached",void 0),t([l()],f.prototype,"container",void 0),t([l()],f.prototype,"layer",void 0),t([l()],f.prototype,"timeExtent",void 0),t([l()],f.prototype,"type",void 0),t([l()],f.prototype,"view",void 0),t([l()],f.prototype,"updating",null),f=t([c("esri.views.2d.layers.imagery.VectorFieldView2D")],f);const g=f;export{g 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.28/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../ViewState.js";import{Container as t}from"../../engine/Container.js";import{WGLDrawPhase as r}from"../../engine/webgl/enums.js";class i extends t{constructor(t){super(),this.layerView=t,this._childrenRenderParameters={context:null,pixelRatio:1,state:new e,stationary:!0,painter:null},this._name=this.constructor.name,this.requestRender=this.requestRender.bind(this)}doRender(e){if(e.drawPhase!==r.MAP)return;const t=window.devicePixelRatio,{stationary:i,context:a,painter:n,profiler:s}=e,o=this._childrenRenderParameters;o.context=a.gl,o.state.copy(e.state),o.state.pixelRatio=t,o.stationary=i,o.painter=n;const d=this.createRenderParams(e);n.beforeRenderLayer(d,this.clips?255:0,d.globalOpacity),s.recordContainerStart(this._name);const l=a.getBoundFramebufferObject(),c=a.getViewport();a.resetState(),a.bindFramebuffer(l),a.setViewport(c.x,c.y,c.width,c.height),this.layerView._renderTarget.framebuffer=l.glName,this.layerView._renderTarget.viewport[0]=c.x,this.layerView._renderTarget.viewport[1]=c.y,this.layerView._renderTarget.viewport[2]=c.width,this.layerView._renderTarget.viewport[3]=c.height,this.layerView.render(o),a.enforceState(),n.compositeLayer(d,d.globalOpacity),s.recordContainerEnd()}createRenderParams(e){return{...e,blendMode:this.blendMode,effects:this.computedEffects,globalOpacity:e.globalOpacity*this.opacity,inFadeTransition:this.inFadeTransition}}}export{i as default};
5
+ import e from"../../ViewState.js";import{Container as t}from"../../engine/Container.js";import{WGLDrawPhase as r}from"../../engine/webgl/enums.js";class i extends t{constructor(t){super(),this.layerView=t,this._childrenRenderParameters={context:null,pixelRatio:1,state:new e,stationary:!0,painter:null},this._name=this.constructor.name,this.requestRender=this.requestRender.bind(this)}doRender(e){if(e.drawPhase!==r.MAP)return;const t=window.devicePixelRatio,{stationary:i,context:a,painter:n,profiler:s}=e,o=this._childrenRenderParameters;o.context=a.gl,o.state.copy(e.state),o.state.pixelRatio=t,o.stationary=i,o.painter=n;const d=this.createRenderParams(e);n.beforeRenderLayer(d,this.clips?255:0,d.globalOpacity),s.recordContainerStart(this._name);const l=a.getBoundFramebufferObject(),c=a.getViewport();a.resetState(),a.bindFramebuffer(l),a.setViewport(c.x,c.y,c.width,c.height),this.layerView._renderTarget.framebuffer=l.glName,this.layerView._renderTarget.viewport[0]=c.x,this.layerView._renderTarget.viewport[1]=c.y,this.layerView._renderTarget.viewport[2]=c.width,this.layerView._renderTarget.viewport[3]=c.height,this.layerView.render(o),a.enforceState(),n.afterRenderLayer(d,d.globalOpacity),s.recordContainerEnd()}createRenderParams(e){return{...e,blendMode:this.blendMode,effects:this.computedEffects,globalOpacity:e.globalOpacity*this.opacity,inFadeTransition:this.inFadeTransition}}}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.28/esri/copyright.txt for details.
4
4
  */
5
- export{BufferObject}from"../webgl/BufferObject.js";export{FramebufferObject}from"../webgl/FramebufferObject.js";export{Program}from"../webgl/Program.js";export{ProgramCache}from"../webgl/ProgramCache.js";export{Renderbuffer}from"../webgl/Renderbuffer.js";export{ShaderCompiler}from"../webgl/ShaderCompiler.js";export{Texture}from"../webgl/Texture.js";export{VertexArrayObject}from"../webgl/VertexArrayObject.js";export{glslifyDefineMap}from"../webgl/programUtils.js";export{createProgram}from"../webgl/ProgramTemplate.js";export{createContextForView}from"../webgl/contextUtils.js";
5
+ export{BufferObject}from"../webgl/BufferObject.js";export{FramebufferObject}from"../webgl/FramebufferObject.js";export{Program}from"../webgl/Program.js";export{ProgramCache}from"../webgl/ProgramCache.js";export{Renderbuffer}from"../webgl/Renderbuffer.js";export{ShaderCompiler}from"../webgl/ShaderCompiler.js";export{Texture}from"../webgl/Texture.js";export{VertexArrayObject}from"../webgl/VertexArrayObject.js";export{glslifyDefineMap}from"../webgl/programUtils.js";export{createProgram}from"../webgl/ProgramTemplate.js";export{createContext}from"../webgl/contextUtils.js";
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Logger.js";import{b as o}from"../../../chunks/mat4f64.js";import{makeMaterialParameters as t,makeTextureSource as r}from"./LoaderResult.js";import{GLTFResource as s}from"./internal/Resource.js";import{TextureSamplingMode as a,PrimitiveType as n}from"../../webgl/enums.js";let i=0;async function l(t,r,a={},l=!0){const m=await s.load(t,r,a),p="gltf_"+i++,T={lods:[],materials:new Map,textures:new Map,meta:u(m)},f=!(!m.json.asset.extras||"symbolResource"!==m.json.asset.extras.ESRI_type),x=new Map;await c(m,(async(t,r,s,i)=>{const u=x.get(s)??0;x.set(s,u+1);const c=void 0!==t.mode?t.mode:n.TRIANGLES,f=c===n.TRIANGLES||c===n.TRIANGLE_STRIP||c===n.TRIANGLE_FAN?c:null;if(null==f)return void e.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+n[c]+"). Skipping primitive.");if(!m.hasPositions(t))return void e.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const g=m.getPositionData(t,a),h=m.getMaterial(t,a,l),v=m.hasNormals(t)?m.getNormalData(t,a):null,w=m.hasTangents(t)?m.getTangentData(t,a):null,R=m.hasTextureCoordinates(t)?m.getTextureCoordinates(t,a):null,S=m.hasVertexColors(t)?m.getVertexColors(t,a):null,_=m.getIndexData(t,a),E={name:i,transform:o(r),attributes:{position:await g,normal:v?await v:null,texCoord0:R?await R:null,color:S?await S:null,tangent:w?await w:null},indices:await _,primitiveType:f,material:d(T,await h,p)};let I=null;null!=T.meta&&null!=T.meta.ESRI_lod&&"screenSpaceRadius"===T.meta.ESRI_lod.metric&&(I=T.meta.ESRI_lod.thresholds[s]),T.lods[s]=T.lods[s]||{parts:[],name:i,lodThreshold:I},T.lods[s].parts[u]=E}));for(const e of T.lods)e.parts=e.parts.filter((e=>!!e));const g=await m.getLoadedBuffersSize();return{model:T,meta:{isEsriSymbolResource:f,uri:m.uri},customMeta:{},size:g}}function u(e){const o=e.json;let t=null;return o.nodes.forEach((e=>{const o=e.extras;null!=o&&(o.ESRI_proxyEllipsoid||o.ESRI_lod)&&(t=o)})),t}async function c(o,t){const r=o.json,s=r.scenes[r.scene||0].nodes,a=s.length>1,n=[];for(const e of s){const o=r.nodes[e];if(n.push(i(e,0)),m(o)&&!a){o.extensions.MSFT_lod.ids.forEach(((e,o)=>i(e,o+1)))}}async function i(s,a){const l=r.nodes[s],u=o.getNodeTransform(s);if(null!=l.weights&&e.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=l.mesh){const e=r.meshes[l.mesh];for(const o of e.primitives)n.push(t(o,u,a,e.name))}for(const e of l.children||[])n.push(i(e,a))}await Promise.all(n)}function m(e){return e.extensions&&e.extensions.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function d(e,o,s){const a=o=>{const t=`${s}_tex_${o&&o.id}${o&&o.name?"_"+o.name:""}`;if(o&&!e.textures.has(t)){const s=r(o.data,{wrap:{s:o.wrapS,t:o.wrapT},mipmap:p.includes(o.minFilter),noUnpackFlip:!0});e.textures.set(t,s)}return t},n=`${s}_mat_${o.id}_${o.name}`;if(!e.materials.has(n)){const r=t({color:[o.color[0],o.color[1],o.color[2]],opacity:o.color[3],alphaMode:o.alphaMode,alphaCutoff:o.alphaCutoff,doubleSided:o.doubleSided,colorMixMode:o.ESRI_externalColorMixMode,textureColor:o.colorTexture?a(o.colorTexture):void 0,textureNormal:o.normalTexture?a(o.normalTexture):void 0,textureOcclusion:o.occlusionTexture?a(o.occlusionTexture):void 0,textureEmissive:o.emissiveTexture?a(o.emissiveTexture):void 0,textureMetallicRoughness:o.metallicRoughnessTexture?a(o.metallicRoughnessTexture):void 0,emissiveFactor:[o.emissiveFactor[0],o.emissiveFactor[1],o.emissiveFactor[2]],colorTextureTransform:o.colorTextureTransform,normalTextureTransform:o.normalTextureTransform,occlusionTextureTransform:o.occlusionTextureTransform,emissiveTextureTransform:o.emissiveTextureTransform,metallicRoughnessTextureTransform:o.metallicRoughnessTextureTransform,metallicFactor:o.metallicFactor,roughnessFactor:o.roughnessFactor});e.materials.set(n,r)}return n}const p=[a.LINEAR_MIPMAP_LINEAR,a.LINEAR_MIPMAP_NEAREST];export{l as loadGLTF};
5
+ import e from"../../../core/Logger.js";import{b as t}from"../../../chunks/mat4f64.js";import{makeMaterialParameters as o,makeTextureSource as r}from"./LoaderResult.js";import{GLTFResource as s}from"./internal/Resource.js";import{TextureSamplingMode as a,PrimitiveType as n}from"../../webgl/enums.js";let i=0;async function l(o,r,a={},l=!0){const c=await s.load(o,r,a),p="gltf_"+i++,T={lods:[],materials:new Map,textures:new Map,meta:u(c)},f=!(!c.json.asset.extras||"symbolResource"!==c.json.asset.extras.ESRI_type),x=new Map;await m(c,(async(o,r,s,i)=>{const u=x.get(s)??0;x.set(s,u+1);const m=void 0!==o.mode?o.mode:n.TRIANGLES,f=m===n.TRIANGLES||m===n.TRIANGLE_STRIP||m===n.TRIANGLE_FAN?m:null;if(null==f)return void e.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+n[m]+"). Skipping primitive.");if(!c.hasPositions(o))return void e.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const g=c.getPositionData(o,a),h=c.getMaterial(o,a,l),w=c.hasNormals(o)?c.getNormalData(o,a):null,v=c.hasTangents(o)?c.getTangentData(o,a):null,R=c.hasTextureCoordinates(o)?c.getTextureCoordinates(o,a):null,S=c.hasVertexColors(o)?c.getVertexColors(o,a):null,_=c.getIndexData(o,a),E={name:i,transform:t(r),attributes:{position:await g,normal:w?await w:null,texCoord0:R?await R:null,color:S?await S:null,tangent:v?await v:null},indices:await _,primitiveType:f,material:d(T,await h,p)};let I=null;null!=T.meta&&null!=T.meta.ESRI_lod&&"screenSpaceRadius"===T.meta.ESRI_lod.metric&&(I=T.meta.ESRI_lod.thresholds[s]),T.lods[s]=T.lods[s]||{parts:[],name:i,lodThreshold:I},T.lods[s].parts[u]=E}));for(const e of T.lods)e.parts=e.parts.filter((e=>!!e));const g=await c.getLoadedBuffersSize();return{model:T,meta:{isEsriSymbolResource:f,uri:c.uri},customMeta:{},size:g}}function u(e){const t=e.json;let o=null;return t.nodes.forEach((e=>{const t=e.extras;null!=t&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(o=t)})),o}async function m(t,o){const r=t.json,s=r.scenes[r.scene||0].nodes,a=s.length>1,n=[];for(const e of s){const t=r.nodes[e];if(n.push(i(e,0)),c(t)&&!a){t.extensions.MSFT_lod.ids.forEach(((e,t)=>i(e,t+1)))}}async function i(s,a){const l=r.nodes[s],u=t.getNodeTransform(s);if(null!=l.weights&&e.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=l.mesh){const e=r.meshes[l.mesh];for(const t of e.primitives)n.push(o(t,u,a,e.name))}for(const e of l.children||[])n.push(i(e,a))}await Promise.all(n)}function c(e){return e.extensions&&e.extensions.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function d(e,t,s){const a=t=>{const o=`${s}_tex_${t&&t.id}${t&&t.name?"_"+t.name:""}`;if(t&&!e.textures.has(o)){const s=r(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:p.has(t.minFilter),noUnpackFlip:!0});e.textures.set(o,s)}return o},n=`${s}_mat_${t.id}_${t.name}`;if(!e.materials.has(n)){const r=o({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,textureColor:t.colorTexture?a(t.colorTexture):void 0,textureNormal:t.normalTexture?a(t.normalTexture):void 0,textureOcclusion:t.occlusionTexture?a(t.occlusionTexture):void 0,textureEmissive:t.emissiveTexture?a(t.emissiveTexture):void 0,textureMetallicRoughness:t.metallicRoughnessTexture?a(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor});e.materials.set(n,r)}return n}const p=new Set([a.LINEAR_MIPMAP_LINEAR,a.LINEAR_MIPMAP_NEAREST]);export{l as loadGLTF};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import i from"../../../../../core/Handles.js";import{handlesGroup as a}from"../../../../../core/handleUtils.js";import has from"../../../../../core/has.js";import{when as t}from"../../../../../core/reactiveUtils.js";import{ManipulatorType as n}from"../ManipulatorType.js";import{discRadiusSmall as e,discRadius as s}from"./config.js";import{Manipulation as o}from"./Manipulation.js";import{MoveXYAxisManipulation as r}from"./MoveXYAxisManipulation.js";import{MoveXYDiscManipulation as l}from"./MoveXYDiscManipulation.js";import{MoveZManipulation as p}from"./MoveZManipulation.js";class u extends o{constructor(a){super(),this._handles=new i,this._interactive=!0;const{tool:t,view:n,snapToScene:e,radius:s}=a;this._view=n,this.xyManipulation=new l({tool:t,view:n,snapToScene:e,radius:s}),this.xyAxisManipulation=new r({tool:t,view:n,radius:s}),this.zManipulation=new p({tool:t,view:n,radius:s}),this.xyManipulation.available=a.xyAvailable,this.xyAxisManipulation.available=a.xyAxisAvailable,this.zManipulation.available=a.zAvailable,this._autoHideXYAxis(),this.forEachManipulator((i=>this._handles.add(i.events.on("grab-changed",(()=>this._updateManipulatorInteractivity())))))}destroy(){this._handles.destroy(),this.xyManipulation.destroy(),this.xyAxisManipulation.destroy(),this.zManipulation.destroy()}createGraphicDragPipeline(i,t,n){return a([this.xyManipulation.createGraphicDragPipeline(((a,t,n,e,s)=>i(c.XY,a,t,n,e,s)),t,n),this.xyAxisManipulation.createGraphicDragPipeline(((a,t,n,e,s)=>i(c.XY_AXIS,a,t,n,e,s)),t,n),this.zManipulation.createGraphicDragPipeline(((a,t,n,e,s)=>i(c.Z,a,t,n,e,s)),t,n)])}createDragPipeline(i,t,n,e){return a([this.xyManipulation.createDragPipeline(((a,t,n,e,s)=>i(c.XY,a,t,n,e,s)),t,n,e),this.xyAxisManipulation.createDragPipeline(((a,t,n,e,s)=>i(c.XY_AXIS,a,t,n,e,s)),t,n,e),this.zManipulation.createDragPipeline(((a,t,n,e,s)=>i(c.Z,a,t,n,e,s)),n)])}set snapToScene(i){this.xyManipulation.snapToScene=i}set angle(i){this.xyAxisManipulation.angle=i}set interactive(i){this._interactive!==i&&(this._interactive=i,this._updateManipulatorInteractivity())}set radius(i){this.xyAxisManipulation.radius=i,this.xyManipulation.radius=i,this.zManipulation.radius=i}set displayScale(i){this.xyManipulation.displayScale=i,this.xyAxisManipulation.displayScale=i}forEachManipulator(i){this.xyManipulation.forEachManipulator((a=>i(a,n.TRANSLATE_XY))),this.xyAxisManipulation.forEachManipulator((a=>i(a,n.TRANSLATE_XY))),this.zManipulation.forEachManipulator((a=>i(a,n.TRANSLATE_Z)))}get _xyAxisVisible(){const i=this.xyManipulation.someManipulator((i=>i.focused))||this.xyAxisManipulation.someManipulator((i=>i.focused));return this._view.inputManager&&"touch"===this._view.inputManager.latestPointerType||i}_autoHideXYAxis(){const i=this.xyAxisManipulation,a=this.xyManipulation;if(has("esri-mobile"))return;const n=[];a.forEachManipulator((i=>n.push(i))),i.forEachManipulator((i=>n.push(i)));const e=()=>{const a=[];this._xyAxisVisible||i.forEachManipulator((i=>a.push(i.disableDisplay()))),this._handles.remove(h),this._handles.add(a,h)};for(const t of n)this._handles.add(t.events.on("focus-changed",e));this._view.inputManager&&this._handles.add(t((()=>this._view.inputManager?.latestPointerType),e)),e()}_updateManipulatorInteractivity(){const i=this.grabbing;this.forEachManipulator((a=>{a.interactive=!i&&this._interactive||a.grabbing}))}static radiusForSymbol(i){const a=null!=i&&"point-3d"===i.type&&i.symbolLayers;return!!a&&a.length>0&&a.some((i=>"icon"===i.type))?e:s}}const h="disable-xy-axis-display";var c;!function(i){i[i.XY=0]="XY",i[i.XY_AXIS=1]="XY_AXIS",i[i.Z=2]="Z"}(c||(c={}));export{c as ManipulationType,u as MoveManipulation};
5
+ import i from"../../../../../core/Handles.js";import{handlesGroup as a}from"../../../../../core/handleUtils.js";import has from"../../../../../core/has.js";import{when as t}from"../../../../../core/reactiveUtils.js";import{ManipulatorType as n}from"../ManipulatorType.js";import{discRadiusSmall as s,discRadius as e}from"./config.js";import{Manipulation as o}from"./Manipulation.js";import{MoveXYAxisManipulation as r}from"./MoveXYAxisManipulation.js";import{MoveXYDiscManipulation as l}from"./MoveXYDiscManipulation.js";import{MoveZManipulation as p}from"./MoveZManipulation.js";class u extends o{constructor(a){super(),this._handles=new i,this._interactive=!0;const{tool:t,view:n,snapToScene:s,radius:e}=a;this._view=n,this.xyManipulation=new l({tool:t,view:n,snapToScene:s,radius:e}),this.xyAxisManipulation=new r({tool:t,view:n,radius:e}),this.zManipulation=new p({tool:t,view:n,radius:e}),this.xyManipulation.available=a.xyAvailable,this.xyAxisManipulation.available=a.xyAxisAvailable,this.zManipulation.available=a.zAvailable,this._autoHideXYAxis(),this.forEachManipulator((i=>this._handles.add(i.events.on("grab-changed",(()=>this._updateManipulatorInteractivity())))))}destroy(){this._handles.destroy(),this.xyManipulation.destroy(),this.xyAxisManipulation.destroy(),this.zManipulation.destroy()}createGraphicDragPipeline(i,t,n){return a([this.xyManipulation.createGraphicDragPipeline(((a,t,n,s,e)=>i(c.XY,a,t,n,s,e)),t,n),this.xyAxisManipulation.createGraphicDragPipeline(((a,t,n,s,e)=>i(c.XY_AXIS,a,t,n,s,e)),t,n),this.zManipulation.createGraphicDragPipeline(((a,t,n,s,e)=>i(c.Z,a,t,n,s,e)),t,n)])}createDragPipeline(i,t,n,s){return a([this.xyManipulation.createDragPipeline(((a,t,n,s,e)=>i(c.XY,a,t,n,s,e)),t,n,s),this.xyAxisManipulation.createDragPipeline(((a,t,n,s,e)=>i(c.XY_AXIS,a,t,n,s,e)),t,n,s),this.zManipulation.createDragPipeline(((a,t,n,s,e)=>i(c.Z,a,t,n,s,e)),n)])}set snapToScene(i){this.xyManipulation.snapToScene=i}set angle(i){this.xyAxisManipulation.angle=i}set interactive(i){this._interactive!==i&&(this._interactive=i,this._updateManipulatorInteractivity())}set radius(i){this.xyAxisManipulation.radius=i,this.xyManipulation.radius=i,this.zManipulation.radius=i}set displayScale(i){this.xyManipulation.displayScale=i,this.xyAxisManipulation.displayScale=i}forEachManipulator(i){this.xyManipulation.forEachManipulator((a=>i(a,n.TRANSLATE_XY))),this.xyAxisManipulation.forEachManipulator((a=>i(a,n.TRANSLATE_XY))),this.zManipulation.forEachManipulator((a=>i(a,n.TRANSLATE_Z)))}get _xyAxisVisible(){const i=this.xyManipulation.someManipulator((i=>i.focused))||this.xyAxisManipulation.someManipulator((i=>i.focused));return this._view.inputManager&&"touch"===this._view.inputManager.latestPointerType||i}_autoHideXYAxis(){const i=this.xyAxisManipulation,a=this.xyManipulation;if(has("esri-mobile"))return;const n=[];a.forEachManipulator((i=>n.push(i))),i.forEachManipulator((i=>n.push(i)));const s=()=>{const a=[];this._xyAxisVisible||i.forEachManipulator((i=>a.push(i.disableDisplay()))),this._handles.remove(h),this._handles.add(a,h)};for(const t of n)this._handles.add(t.events.on("focus-changed",s));this._view.inputManager&&this._handles.add(t((()=>this._view.inputManager?.latestPointerType),s)),s()}_updateManipulatorInteractivity(){const i=this.grabbing;this.forEachManipulator((a=>{a.interactive=!i&&this._interactive||a.grabbing}))}static radiusForSymbol(i){const a=null!=i&&"point-3d"===i.type&&i.symbolLayers;return!!a&&a.some((i=>"icon"===i.type))?s:e}}const h="disable-xy-axis-display";var c;!function(i){i[i.XY=0]="XY",i[i.XY_AXIS=1]="XY_AXIS",i[i.Z=2]="Z"}(c||(c={}));export{c as ManipulationType,u as MoveManipulation};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.28/esri/copyright.txt for details.
4
4
  */
5
- import"../../../../../core/has.js";import{getGraphicEffectiveElevationMode as e,hasGraphicFeatureExpressionInfo as t}from"../../../../../support/elevationInfoUtils.js";import{SupportedGraphicResult as o}from"../isSupportedGraphicUtils.js";function r(r){if("graphics"!==r.layer?.type)return o.GRAPHICS_LAYER_MISSING;if(null==r.geometry)return o.GEOMETRY_MISSING;switch(r.geometry.type){case"point":break;case"polygon":case"polyline":case"multipoint":case"extent":case"mesh":return o.SUPPORTED;default:return o.GEOMETRY_TYPE_UNSUPPORTED}const s=null!=r.symbol&&"point-3d"===r.symbol.type&&r.symbol.symbolLayers;if(!(s&&s.length>0&&s.some((e=>"object"===e.type))))return o.SYMBOL_TYPE_UNSUPPORTED;return"on-the-ground"!==e(r)&&t(r)?o.ELEVATION_MODE_UNSUPPORTED:o.SUPPORTED}export{r as isSupportedGraphic};
5
+ import"../../../../../core/has.js";import{getGraphicEffectiveElevationMode as e,hasGraphicFeatureExpressionInfo as t}from"../../../../../support/elevationInfoUtils.js";import{SupportedGraphicResult as o}from"../isSupportedGraphicUtils.js";function r(r){if("graphics"!==r.layer?.type)return o.GRAPHICS_LAYER_MISSING;if(null==r.geometry)return o.GEOMETRY_MISSING;switch(r.geometry.type){case"point":break;case"polygon":case"polyline":case"multipoint":case"extent":case"mesh":return o.SUPPORTED;default:return o.GEOMETRY_TYPE_UNSUPPORTED}const s=null!=r.symbol&&"point-3d"===r.symbol.type&&r.symbol.symbolLayers;if(!s||!s.some((e=>"object"===e.type)))return o.SYMBOL_TYPE_UNSUPPORTED;return"on-the-ground"!==e(r)&&t(r)?o.ELEVATION_MODE_UNSUPPORTED:o.SUPPORTED}export{r as isSupportedGraphic};