@arcgis/core 5.1.0-next.76 → 5.1.0-next.78

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 (210) hide show
  1. package/analysis/ElevationProfile/ElevationProfileGroup.d.ts +74 -0
  2. package/analysis/ElevationProfile/ElevationProfileGroup.js +2 -0
  3. package/analysis/ElevationProfileAnalysis.d.ts +29 -14
  4. package/analysis/ElevationProfileAnalysis.js +1 -1
  5. package/applications/Components/OrientedImageryViewer/ImageViewer/utils.d.ts +34 -0
  6. package/applications/Components/OrientedImageryViewer/ImageViewer/utils.js +2 -0
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{537fe2522dff1e6ce03b.js → 11ea4be441a26134ce1f.js} +1 -1
  9. package/assets/esri/core/workers/chunks/17acbf40e7c1cb42d9bd.js +1 -0
  10. package/assets/esri/core/workers/chunks/1c7fd0a229a8112b0539.js +596 -0
  11. package/assets/esri/core/workers/chunks/{baeb96aef03d4c566af7.js → 1f53620f82cc7c3daabe.js} +1 -1
  12. package/assets/esri/core/workers/chunks/2387613b855771a3e537.js +1 -0
  13. package/assets/esri/core/workers/chunks/283d39dfb1625b5a74db.js +1 -0
  14. package/assets/esri/core/workers/chunks/{5e1b847b116d21908a54.js → 322c54081b25f1c53661.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{330b47ac0759c3c35cc5.js → 34fe97bcacc0dfc5bce6.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{14eb2cc8e2ad6d8d03fd.js → 3d9fcbe95dd22dbe730e.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{e262c4864dc06c43b380.js → 3df8493b91aa3bce824d.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{bf8f603848bad4a7deb4.js → 4ccb56333de0247dcb6f.js} +1 -1
  19. package/assets/esri/core/workers/chunks/5b6f2bfdcdd207d8ae42.js +1 -0
  20. package/assets/esri/core/workers/chunks/{88b480a1d1fb01778798.js → 5ee4b630ad39c21d11db.js} +21 -26
  21. package/assets/esri/core/workers/chunks/{6b66fc32451433129a88.js → 8508f238d99021e87f71.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{bc75ab48f4c7609ef09d.js → 85d3475667c503ec4fc6.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{9d6491f996eeb0c646ed.js → 85d8c7cc7f8decbe975d.js} +1 -1
  24. package/assets/esri/core/workers/chunks/9b9916864b6575c42c8a.js +1 -0
  25. package/assets/esri/core/workers/chunks/{75d5ea0da181f9e7425f.js → a8ca5d8740cc7e39197b.js} +6 -6
  26. package/assets/esri/core/workers/chunks/{8d75f6f27c1c17c33992.js → b7bb7072dbee978f3ca3.js} +1 -1
  27. package/assets/esri/core/workers/chunks/bf7e019437a3b6036300.js +2 -0
  28. package/assets/esri/core/workers/chunks/{99c161fecae710b53b40.js → d304343a781acfa3ff96.js} +1 -1
  29. package/assets/esri/core/workers/chunks/dbb9bb28696ff9536678.js +2 -0
  30. package/assets/esri/core/workers/chunks/{34ea3ed78041437a8fc8.js → f81c6f6ccc201f584970.js} +1 -1
  31. package/assets/esri/themes/base/_core.scss +2 -0
  32. package/assets/esri/themes/base/widgets/_PluginSettingsControls.scss +29 -0
  33. package/assets/esri/themes/dark/main.css +1 -1
  34. package/assets/esri/themes/light/main.css +1 -1
  35. package/assets/esri/themes/light/view.css +1 -1
  36. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  37. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  38. package/assets/esri/widgets/Sketch/t9n/Sketch.json +1 -1
  39. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  40. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  41. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  42. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  43. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  44. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  45. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  46. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  47. package/assets/esri/widgets/Sketch/t9n/Sketch_en.json +1 -1
  48. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  49. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  50. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  51. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  52. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  53. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  54. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  55. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  56. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  57. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  58. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  59. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  60. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  61. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  62. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  63. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  64. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  65. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  66. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  67. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  68. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  69. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  70. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  71. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  72. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  73. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  74. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  75. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  76. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  77. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  78. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  79. package/config.js +1 -1
  80. package/core/types.d.ts +28 -0
  81. package/form/elements/inputs/MultipleChoiceInput.d.ts +2 -2
  82. package/form/elements/inputs/MultipleChoiceInput.js +1 -1
  83. package/geometry/operators/types.d.ts +2 -2
  84. package/interfaces.d.ts +4 -7
  85. package/kernel.js +1 -1
  86. package/layers/ImageryLayer.d.ts +7 -1
  87. package/layers/ImageryLayer.js +1 -1
  88. package/layers/ImageryTileLayer.d.ts +7 -1
  89. package/layers/ImageryTileLayer.js +1 -1
  90. package/layers/WCSLayer.d.ts +7 -1
  91. package/layers/WCSLayer.js +1 -1
  92. package/layers/save/imageryUtils.js +1 -1
  93. package/layers/video/VideoController.js +1 -1
  94. package/networks/UnitIdentifierManager.d.ts +15 -15
  95. package/networks/UnitIdentifierManager.js +1 -1
  96. package/networks/support/jsonTypes.d.ts +125 -13
  97. package/package.json +3 -3
  98. package/popup/Features.d.ts +0 -1
  99. package/popup/Features.js +1 -1
  100. package/rest/networks/unitIdentifiers/reserve.js +2 -0
  101. package/rest/networks/unitIdentifiers/support/ReserveParameters.js +2 -0
  102. package/rest/networks/unitIdentifiers/support/ResizeParameters.js +1 -1
  103. package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +1 -1
  104. package/support/revision.js +1 -1
  105. package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +1 -1
  106. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +5 -1
  107. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  108. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  109. package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
  110. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  111. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  112. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  113. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  114. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ShaderHittest.js +1 -1
  115. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  116. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  117. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  118. package/views/2d/layers/BaseLayerView2D.d.ts +3 -3
  119. package/views/2d/layers/BaseLayerViewGL2D.d.ts +3 -3
  120. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  121. package/views/2d/layers/TileLayerView2D.js +1 -1
  122. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  123. package/views/2d/layers/features/FeatureContainer.js +1 -1
  124. package/views/2d/support/clippingUtils.js +1 -1
  125. package/views/2d/support/hitTestUtils.js +1 -1
  126. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  127. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +5 -1
  128. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  129. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  130. package/views/3d/layers/IntegratedMeshNormals.js +1 -1
  131. package/views/3d/terrain/ElevationData.js +1 -1
  132. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  133. package/views/3d/webgl-engine/collections/Component/Renderable.js +1 -1
  134. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +1 -5
  135. package/views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js +1 -5
  136. package/views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js +16 -21
  137. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  138. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  139. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  140. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  141. package/views/3d/webgl-engine/shaders/BlackLevelLightSoftCompression.glsl.js +5 -1
  142. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +2 -2
  143. package/views/VideoView.js +1 -1
  144. package/views/View2D.js +1 -1
  145. package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
  146. package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
  147. package/views/analysis/ElevationProfile/ElevationProfileIndicatorPointVisualization.js +1 -1
  148. package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +6 -4
  149. package/views/draw/DrawTool.js +1 -1
  150. package/views/draw/plugins/BezierSegmentPlugin.js +1 -1
  151. package/views/draw/plugins/FreehandSegmentPlugin.js +1 -1
  152. package/views/draw/support/PluginContext.js +1 -1
  153. package/views/draw/support/types.d.ts +21 -0
  154. package/views/draw/support/types.js +1 -1
  155. package/views/types.d.ts +2 -2
  156. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  157. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  158. package/widgets/Daylight/DaylightViewModel.js +1 -1
  159. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  160. package/widgets/Editor/components/Settings.js +1 -1
  161. package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
  162. package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
  163. package/widgets/ElevationProfile/support/ElevationProfileView.js +1 -1
  164. package/widgets/ElevationProfile/support/ElevationProfileView2D.js +1 -1
  165. package/widgets/ElevationProfile/support/ElevationProfileView3D.js +1 -1
  166. package/widgets/ElevationProfile/support/InputRepresentation2D.js +1 -1
  167. package/widgets/ElevationProfile/support/InputRepresentation3D.js +1 -1
  168. package/widgets/ElevationProfile/support/ProfileLine2D.js +1 -1
  169. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  170. package/widgets/FeatureForm/FieldInput.js +1 -1
  171. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
  172. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  173. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.d.ts +5 -5
  174. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
  175. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  176. package/widgets/OrientedImageryViewer/constants.js +1 -1
  177. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  178. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +2 -0
  179. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +2 -0
  180. package/widgets/OrientedImageryViewer/types.d.ts +10 -0
  181. package/widgets/OrientedImageryViewer.d.ts +17 -2
  182. package/widgets/OrientedImageryViewer.js +1 -1
  183. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  184. package/widgets/Sketch/SketchViewModel.js +1 -1
  185. package/widgets/Sketch/support/PluginManager.js +1 -1
  186. package/widgets/Sketch/support/SettingsManager.js +2 -0
  187. package/widgets/Sketch.js +1 -1
  188. package/widgets/Slider/SliderViewModel.d.ts +2 -1
  189. package/widgets/Slider/SliderViewModel.js +1 -1
  190. package/widgets/Slider.js +1 -1
  191. package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.js +1 -1
  192. package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.js +1 -1
  193. package/widgets/smartMapping/SizeSlider/SizeSliderViewModel.js +1 -1
  194. package/widgets/smartMapping/SmartMappingSliderViewModel.js +1 -1
  195. package/widgets/support/PluginSettingsControls.js +2 -0
  196. package/widgets/support/SnappingControls.js +1 -1
  197. package/widgets/support/forms/formUtils.js +1 -1
  198. package/analysis/ElevationProfile/elevationProfileLineTypes.js +0 -2
  199. package/assets/esri/core/workers/chunks/003476e950bd27a2f884.js +0 -596
  200. package/assets/esri/core/workers/chunks/07aca5ecad659d55e795.js +0 -2
  201. package/assets/esri/core/workers/chunks/7540f7df86620f067b5a.js +0 -1
  202. package/assets/esri/core/workers/chunks/76e34f81bb4a7b0e694c.js +0 -1
  203. package/assets/esri/core/workers/chunks/bfe575da727ce7c8d331.js +0 -2
  204. package/assets/esri/core/workers/chunks/cb45e5d4a4ef82cda583.js +0 -1
  205. package/assets/esri/core/workers/chunks/ea59b81299acaf0d85ee.js +0 -1
  206. package/assets/esri/core/workers/chunks/ef0eae13408cbf83a64f.js +0 -1
  207. package/rest/networks/unitIdentifiers/insertGap.js +0 -2
  208. package/rest/networks/unitIdentifiers/support/InsertGapParameters.js +0 -2
  209. /package/assets/esri/core/workers/chunks/{07aca5ecad659d55e795.js.LICENSE.txt → bf7e019437a3b6036300.js.LICENSE.txt} +0 -0
  210. /package/assets/esri/core/workers/chunks/{bfe575da727ce7c8d331.js.LICENSE.txt → dbb9bb28696ff9536678.js.LICENSE.txt} +0 -0
@@ -121,30 +121,30 @@ export default class UnitIdentifierManager extends JSONSupport {
121
121
  * await featureService.applyEdits([serviceEdits]);
122
122
  */
123
123
  generateDivideNetworkElements(networkElement: NetworkElement, numUnits: number[]): ServiceEdits;
124
+ /**
125
+ * Returns unit identifiers for, and existing gaps in, a unit container feature's containment hierarchy in a
126
+ * telecom domain network.
127
+ *
128
+ * @param containers - The unit container features or objects to query.
129
+ * @returns Resolves to an array of objects describing
130
+ * the unit identifiers and gaps for the specified unit containers.
131
+ */
132
+ query(containers: UnitIdentifier[]): Promise<UnitQueryResult[]>;
124
133
  /**
125
134
  * Shifts existing records in the containment hierarchy of a unit container's NextUnitID sequence
126
135
  * to reserve a range of unit IDs in a telecom domain network.
127
136
  *
128
- * When a gap is inserted at the end of the sequence, the `NEXTUNITID` attribute value for the unit container increases.
129
- * If a gap is inserted into the middle of an existing sequence, the system will attempt to shift existing
137
+ * When this range is inserted at the end of the sequence, the `NEXTUNITID` attribute value for the unit container increases.
138
+ * If a range is inserted into the middle of an existing sequence to create a gap, the system will attempt to shift existing
130
139
  * records to accommodate the reserved space. The operation will fail and return an error if the reservation requires
131
140
  * regrouping an object or occurs in the middle of a connectivity assignment.
132
141
  *
133
142
  * @param container - The unit container to insert a gap into.
134
143
  * @param firstUnit - The first unit for the gap to be introduced.
135
- * @param numUnits - The number of units in the gap.
144
+ * @param lastUnit - The last unit for the gap to be introduced.
136
145
  * @returns Resolves when the gap is successfully inserted.
137
146
  */
138
- insertGap(container: UnitIdentifier, firstUnit: number, numUnits: number): Promise<void>;
139
- /**
140
- * Returns unit identifiers for, and existing gaps in, a unit container feature's containment hierarchy in a
141
- * telecom domain network.
142
- *
143
- * @param containers - The unit container features or objects to query.
144
- * @returns Resolves to an array of objects describing
145
- * the unit identifiers and gaps for the specified unit containers.
146
- */
147
- query(containers: UnitIdentifier[]): Promise<UnitQueryResult[]>;
147
+ reserve(container: UnitIdentifier, firstUnit: number, lastUnit: number): Promise<void>;
148
148
  /**
149
149
  * Resets the unit identifiers associated with one or more unit container features in a telecom domain network.
150
150
  * This is done to condense the unit identifier space or overcome unit identifier sequence exhaustion.
@@ -157,8 +157,8 @@ export default class UnitIdentifierManager extends JSONSupport {
157
157
  * Alters the number of units associated with a unit identifier feature in a telecom domain network.
158
158
  *
159
159
  * @param content - The unit identifiable feature or object being resized.
160
- * @param numUnits - The number of units for the feature or object to be resized to.
160
+ * @param lastUnit - The last unit for the feature or object to be resized to.
161
161
  * @returns Resolves when the feature or object is successfully resized.
162
162
  */
163
- resize(content: UnitIdentifier, numUnits: number): Promise<void>;
163
+ resize(content: UnitIdentifier, lastUnit: number): Promise<void>;
164
164
  }
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{unique as t}from"../core/arrayUtils.js";import r from"../core/Error.js";import{JSONSupport as i}from"../core/JSONSupport.js";import{property as s,subclass as n}from"../core/accessorSupport/decorators.js";import{emitApplyEditsEvent as o}from"../layers/mixins/EditBusLayer.js";import d from"./UtilityNetwork.js";import{isVersionInEditSession as a,currentSessionId as l,isSafeToEditVersion as u}from"../versionManagement/support/versionManagementUtils.js";let c=class extends i{constructor(e){super(e),this.utilityNetwork=null}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}async insertGap(e,t,r){const[{insertGap:i},{default:s}]=await Promise.all([import("../rest/networks/unitIdentifiers/insertGap.js"),import("../rest/networks/unitIdentifiers/support/InsertGapParameters.js")]),n=new s({object:e,firstUnit:t,numUnits:r});a(this.featureServiceUrl,this.gdbVersion||null)?(n.sessionId=l,await u(this.featureServiceUrl,this.gdbVersion,!0)):n.sessionId=null,n.gdbVersion=this.gdbVersion;const d=o(this.featureServiceUrl,null,this.gdbVersion,!1),c=await i(this.networkServiceUrl,n);d.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:c.exceededTransferLimit,historicMoment:c.moment,editedFeatures:c.serviceEdits||void 0})}async reset(e){const[{reset:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/reset.js"),import("../rest/networks/unitIdentifiers/support/ResetParameters.js")]),i=new r({objects:e});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=l,await u(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const s=o(this.featureServiceUrl,null,this.gdbVersion,!1),n=await t(this.networkServiceUrl,i);s.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:n.exceededTransferLimit,historicMoment:n.moment,editedFeatures:n.serviceEdits||void 0})}async resize(e,t){const[{resize:r},{default:i}]=await Promise.all([import("../rest/networks/unitIdentifiers/resize.js"),import("../rest/networks/unitIdentifiers/support/ResizeParameters.js")]),s=new i({object:e,numUnits:t});a(this.featureServiceUrl,this.gdbVersion||null)?(s.sessionId=l,await u(this.featureServiceUrl,this.gdbVersion,!0)):s.sessionId=null,s.gdbVersion=this.gdbVersion;const n=o(this.featureServiceUrl,null,this.gdbVersion,!1),d=await r(this.networkServiceUrl,s);n.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:d.exceededTransferLimit,historicMoment:d.moment,editedFeatures:d.serviceEdits||void 0})}async query(e){const[{queryUnitIdentifiers:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/queryUnitIdentifiers.js"),import("../rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js")]),i=new r({objects:e});a(this.featureServiceUrl,this.gdbVersion||null)?i.sessionId=l:i.sessionId=null,i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;return await t(this.networkServiceUrl,i)}generateCombineNetworkElements(e){return{id:this._ensureSingleSourceIdAsValidLayerId(e),combineGroupedObjects:[{globalIds:e.map(e=>e.globalId)}]}}generateDivideNetworkElements(e,t){return{id:this._ensureSingleSourceIdAsValidLayerId([e]),divideGroupedObjects:[{globalId:e.globalId,numUnits:t}]}}_ensureSingleSourceIdAsValidLayerId(e){const i=t(e.map(e=>e.networkSourceId));if(i.length>1)throw new r("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");const s=i[0],n=this.utilityNetwork.getLayerIdBySourceId(s);if(null==n)throw new r("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");return n}};e([s({type:d,constructOnly:!0})],c.prototype,"utilityNetwork",void 0),e([s()],c.prototype,"networkServiceUrl",null),e([s()],c.prototype,"featureServiceUrl",null),e([s()],c.prototype,"gdbVersion",null),e([s()],c.prototype,"historicMoment",null),c=e([n("esri.networks.UnitIdentifierManager")],c);const m=c;export{m as default};
2
+ import{__decorate as e}from"tslib";import{unique as t}from"../core/arrayUtils.js";import r from"../core/Error.js";import{JSONSupport as i}from"../core/JSONSupport.js";import{property as s,subclass as n}from"../core/accessorSupport/decorators.js";import{emitApplyEditsEvent as o}from"../layers/mixins/EditBusLayer.js";import d from"./UtilityNetwork.js";import{isVersionInEditSession as a,currentSessionId as l,isSafeToEditVersion as u}from"../versionManagement/support/versionManagementUtils.js";let c=class extends i{constructor(e){super(e),this.utilityNetwork=null}get networkServiceUrl(){return this.utilityNetwork?.networkServiceUrl??null}get featureServiceUrl(){return this.utilityNetwork?.featureServiceUrl??null}get gdbVersion(){return this.utilityNetwork?.gdbVersion??null}get historicMoment(){return this.utilityNetwork?.historicMoment??null}async reserve(e,t,r){const[{reserve:i},{default:s}]=await Promise.all([import("../rest/networks/unitIdentifiers/reserve.js"),import("../rest/networks/unitIdentifiers/support/ReserveParameters.js")]),n=new s({object:e,firstUnit:t,lastUnit:r});a(this.featureServiceUrl,this.gdbVersion||null)?(n.sessionId=l,await u(this.featureServiceUrl,this.gdbVersion,!0)):n.sessionId=null,n.gdbVersion=this.gdbVersion;const d=o(this.featureServiceUrl,null,this.gdbVersion,!1),c=await i(this.networkServiceUrl,n);d.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:c.exceededTransferLimit,historicMoment:c.moment,editedFeatures:c.serviceEdits||void 0})}async reset(e){const[{reset:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/reset.js"),import("../rest/networks/unitIdentifiers/support/ResetParameters.js")]),i=new r({objects:e});a(this.featureServiceUrl,this.gdbVersion||null)?(i.sessionId=l,await u(this.featureServiceUrl,this.gdbVersion,!0)):i.sessionId=null,i.gdbVersion=this.gdbVersion;const s=o(this.featureServiceUrl,null,this.gdbVersion,!1),n=await t(this.networkServiceUrl,i);s.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:n.exceededTransferLimit,historicMoment:n.moment,editedFeatures:n.serviceEdits||void 0})}async resize(e,t){const[{resize:r},{default:i}]=await Promise.all([import("../rest/networks/unitIdentifiers/resize.js"),import("../rest/networks/unitIdentifiers/support/ResizeParameters.js")]),s=new i({object:e,lastUnit:t});a(this.featureServiceUrl,this.gdbVersion||null)?(s.sessionId=l,await u(this.featureServiceUrl,this.gdbVersion,!0)):s.sessionId=null,s.gdbVersion=this.gdbVersion;const n=o(this.featureServiceUrl,null,this.gdbVersion,!1),d=await r(this.networkServiceUrl,s);n.resolve({edits:null,addedFeatures:[],updatedFeatures:[],deletedFeatures:[],addedAttachments:[],updatedAttachments:[],deletedAttachments:[],exceededTransferLimit:d.exceededTransferLimit,historicMoment:d.moment,editedFeatures:d.serviceEdits||void 0})}async query(e){const[{queryUnitIdentifiers:t},{default:r}]=await Promise.all([import("../rest/networks/unitIdentifiers/queryUnitIdentifiers.js"),import("../rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js")]),i=new r({objects:e});a(this.featureServiceUrl,this.gdbVersion||null)?i.sessionId=l:i.sessionId=null,i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment;return await t(this.networkServiceUrl,i)}generateCombineNetworkElements(e){return{id:this._ensureSingleSourceIdAsValidLayerId(e),combineGroupedObjects:[{globalIds:e.map(e=>e.globalId)}]}}generateDivideNetworkElements(e,t){return{id:this._ensureSingleSourceIdAsValidLayerId([e]),divideGroupedObjects:[{globalId:e.globalId,numUnits:t}]}}_ensureSingleSourceIdAsValidLayerId(e){const i=t(e.map(e=>e.networkSourceId));if(i.length>1)throw new r("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");const s=i[0],n=this.utilityNetwork.getLayerIdBySourceId(s);if(null==n)throw new r("utility-network:invalid-source-id","'networkSourceId' is not valid. Ensure that all network elements have the same 'networkSourceId' and that it corresponds to a valid layer in the utility network.");return n}};e([s({type:d,constructOnly:!0})],c.prototype,"utilityNetwork",void 0),e([s()],c.prototype,"networkServiceUrl",null),e([s()],c.prototype,"featureServiceUrl",null),e([s()],c.prototype,"gdbVersion",null),e([s()],c.prototype,"historicMoment",null),c=e([n("esri.networks.UnitIdentifierManager")],c);const m=c;export{m as default};
@@ -314,6 +314,62 @@ export interface DomainNetworkJSON {
314
314
  * @since 5.0
315
315
  */
316
316
  traceConfiguration?: UNTraceConfiguration | null;
317
+ /**
318
+ * An array of objects representing color sets in a telecom domain network.
319
+ *
320
+ * @since 5.1
321
+ */
322
+ colorSets: ColorSetJSON[];
323
+ /**
324
+ * An array of objects representing wavelength schemes in a telecom domain network.
325
+ *
326
+ * @since 5.1
327
+ */
328
+ wavelengthSchemes: WavelengthSchemeJSON[];
329
+ }
330
+
331
+ /** @since 5.1 */
332
+ export interface WavelengthSchemeJSON {
333
+ /**
334
+ * The unique ID for the wavelength scheme.
335
+ *
336
+ * @since 5.1
337
+ */
338
+ id: number;
339
+ /**
340
+ * The name of the wavelength scheme.
341
+ *
342
+ * @since 5.1
343
+ */
344
+ name: string;
345
+ /**
346
+ * An array of objects representing wavelengths in the wavelength scheme.
347
+ *
348
+ * @since 5.1
349
+ */
350
+ wavelengths: WavelengthJSON[];
351
+ }
352
+
353
+ /** @since 5.1 */
354
+ export interface WavelengthJSON {
355
+ /**
356
+ * The unique ID for the wavelength.
357
+ *
358
+ * @since 5.1
359
+ */
360
+ id: number;
361
+ /**
362
+ * The name of the wavelength.
363
+ *
364
+ * @since 5.1
365
+ */
366
+ name: string;
367
+ /**
368
+ * The numeric value of the wavelength
369
+ *
370
+ * @since 5.1
371
+ */
372
+ length: number;
317
373
  }
318
374
 
319
375
  /** @since 5.0 */
@@ -346,6 +402,12 @@ export interface ColorSchemeJSON {
346
402
  * @since 5.0
347
403
  */
348
404
  id: number;
405
+ /**
406
+ * The ID of the color set associated with the color scheme.
407
+ *
408
+ * @since 5.1
409
+ */
410
+ colorSetId: number;
349
411
  /**
350
412
  * The group delimiter.
351
413
  *
@@ -361,43 +423,93 @@ export interface ColorSchemeJSON {
361
423
  /**
362
424
  * An array of objects representing color groups in the color scheme.
363
425
  *
364
- * @since 5.0
426
+ * @since 5.1
365
427
  */
366
- groups: ColorGroupJSON[];
428
+ groups: ColorSchemeGroupJSON[];
367
429
  }
368
430
 
369
- /** @since 5.0 */
370
- export interface ColorGroupJSON {
431
+ /** @since 5.1 */
432
+ export interface ColorSetJSON {
433
+ /**
434
+ * The unique ID for the color set.
435
+ *
436
+ * @since 5.1
437
+ */
438
+ id: number;
439
+ /**
440
+ * The name of the color set.
441
+ *
442
+ * @since 5.1
443
+ */
444
+ name: string;
445
+ /**
446
+ * An array of objects representing color codes in the color set.
447
+ *
448
+ * @since 5.1
449
+ */
450
+ colorCodes: ColorCodeJSON[];
451
+ }
452
+
453
+ /** @since 5.1 */
454
+ export interface ColorCodeJSON {
455
+ /**
456
+ * The unique ID for the color code.
457
+ *
458
+ * @since 5.1
459
+ */
460
+ id: number;
461
+ /**
462
+ * The name of the color code.
463
+ *
464
+ * @since 5.1
465
+ */
466
+ name: string;
467
+ /**
468
+ * The label for the color code.
469
+ *
470
+ * @since 5.1
471
+ */
472
+ label: string;
473
+ /**
474
+ * An array of hex codes representing the color code.
475
+ *
476
+ * @since 5.1
477
+ */
478
+ hexCodes: string[];
479
+ }
480
+
481
+ /** @since 5.1 */
482
+ export interface ColorSchemeGroupJSON {
371
483
  /**
372
484
  * The name of the color group.
373
485
  *
374
- * @since 5.0
486
+ * @since 5.1
375
487
  */
376
488
  name: string;
377
489
  /**
378
490
  * The level of the color group.
379
491
  *
380
- * @since 5.0
492
+ * @since 5.1
381
493
  */
382
494
  level: number;
383
495
  /**
384
496
  * The delimiter for the color group.
385
497
  *
386
- * @since 5.0
498
+ * @since 5.1
387
499
  */
388
500
  delimiter: string;
389
501
  /**
390
- * The labels for the color group.
502
+ * The capacity for the color group.
391
503
  *
392
- * @since 5.0
504
+ * @since 5.1
393
505
  */
394
- labels: (string | number)[];
506
+ capacity: number[];
395
507
  /**
396
- * The capacity for the color group.
508
+ * An array of color code IDs associated with the color group.
397
509
  *
398
- * @since 5.0
510
+ * @since 5.1
399
511
  */
400
- capacity: number[];
512
+ colorCodeIds?: number[];
401
513
  }
402
514
 
403
515
  /** @since 5.1 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.1.0-next.76",
3
+ "version": "5.1.0-next.78",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -19,13 +19,13 @@
19
19
  "license": "SEE LICENSE IN LICENSE.md",
20
20
  "dependencies": {
21
21
  "@amcharts/amcharts5": "~5.17.2",
22
- "@arcgis/toolkit": "^5.1.0-next.78",
22
+ "@arcgis/toolkit": "^5.1.0-next.81",
23
23
  "@esri/arcgis-html-sanitizer": "~4.1.0",
24
24
  "@esri/calcite-components": "^5.1.0-next.30",
25
25
  "@vaadin/grid": "~25.1.1",
26
26
  "@zip.js/zip.js": "~2.8.26",
27
27
  "luxon": "~3.7.2",
28
- "marked": "~18.0.0",
28
+ "marked": "~18.0.2",
29
29
  "tslib": "^2.8.1"
30
30
  },
31
31
  "type": "module"
@@ -143,7 +143,6 @@ export default class Features extends FeaturesSuperclass {
143
143
  * [cluster](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/). This value becomes
144
144
  * `true` when the user enables feature browsing with the "Browse features" cluster
145
145
  * [action button](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/).
146
- * It becomes `false` when the view scale changes, when the component is closed, or when the user disables
147
146
  * the "Browse features" action. This should only be set programmatically when the
148
147
  * [selectedFeature](https://developers.arcgis.com/javascript/latest/references/core/popup/Features/#selectedFeature) is
149
148
  * an [aggregate graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#isAggregate) and represents a cluster.
package/popup/Features.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isSome as t}from"../core/arrayUtils.js";import i from"../core/Error.js";import{EventedAccessor as r}from"../core/Evented.js";import s from"../core/Logger.js";import{abortMaybe as o}from"../core/maybe.js";import{debounce as a,isAbortError as n}from"../core/promiseUtils.js";import l from"../core/ReactiveSet.js";import{watch as h,when as u,sync as c}from"../core/reactiveUtils.js";import{addMany as p}from"../core/SetUtils.js";import{property as d,subclass as g}from"../core/accessorSupport/decorators.js";import m from"../geometry/Point.js";import{initializeProjection as f,project as y}from"../geometry/projectionUtils.js";import _ from"../geometry/SpatialReference.js";import{geographicToWebMercator as F}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as v}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as w}from"../layers/LayerConstants.js";import{ActionsCollection as C,zoomToAggregatedFeatures as b,browseAggregatedFeatures as I,zoomToFeature as P}from"./actions.js";import{getSelectedTarget as A}from"./actionUtils.js";import L from"./Feature.js";import j from"./support/FeatureAbilities.js";import{getDisplayedSymbol as x}from"../symbols/support/symbolUtils.js";import{system as E}from"../time/constants.js";import{highlightsSupported as R}from"../views/support/layerViewUtils.js";import{GoTo as O}from"../widgets/support/GoTo.js";const U="location-scale-handle",S=()=>[P.clone()],T=()=>[b.clone(),I.clone()];let M=null;function H(e,t){switch(e){case"building-scene":case"map-image":case"tile":case"imagery":return!0;case"imagery-tile":return"2d"===t;default:return!1}}let D=class extends(O(r)){constructor(e){super(e),this._pendingPromises=new l,this._fetchFeaturesController=null,this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._defaultFeatureAbilities=new j,this.actions=new C,this.activeFeature=null,this.browseClusterEnabled=!1,this.aggregatedFeaturesEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureItemAbilities=null,this.featureItems=[],this.heading=null,this.highlightEnabled=!0,this.includeDefaultActions=!0,this.open=!1,this.updateLocationEnabled=!1,this.view=null,this.zoomFactor=4,this._debouncedLocationUpdate=a(async e=>{this._cancelLocationUpdate();const t=new AbortController,{signal:i}=t;this._locationUpdateController=t,await this._locationUpdate(e,{signal:i}).catch(()=>{}).finally(()=>{this._locationUpdateController===t&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([h(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),h(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),h(()=>this.location,e=>this._locationChange(e)),h(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),h(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),h(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),h(()=>this.featureItems,()=>this._featureItemsChange()),h(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),u(()=>!this.waitingForResult,()=>this._waitingForResultChange(),c),h(()=>this.view?.scale,()=>this._viewScaleChange()),u(()=>!this.open,()=>this.aggregatedFeaturesEnabled=!1)])}destroy(){this._cancelLocationUpdate(),this._cancelFetchingFeatures(),this._cancelCenterAtLocation(),this._pendingPromises.clear(),this.aggregatedFeaturesEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get active(){return this.open&&!this.waitingForResult}get allActions(){const e=this._get("allActions")||new C;e.removeAll();const{actions:i,defaultActions:r,defaultPopupTemplateEnabled:s,includeDefaultActions:o,selectedFeature:a}=this,n=o?r.concat(i):i,l=a&&("function"==typeof a.getEffectivePopupTemplate&&a.getEffectivePopupTemplate(s)||a.popupTemplate),h=l?.actions,u=l?.overwriteActions?h:h?.concat(n)??n;return u?.filter(t).forEach(t=>e.add(t)),e}set content(e){this.promises=[],this._set("content",e)}get defaultActions(){const e=this._get("defaultActions")||new C;return e.removeAll(),e.addMany(this.selectedFeature?.isAggregate?T():S()),e}get featureCount(){return this.features.length}set features(e){if(this._get("features")===e)return;const t=e||[];this._set("features",t),this._syncSelectedFeatureIndex(t)}get initialDisplayMode(){return this._get("initialDisplayMode")||"feature"}set initialDisplayMode(e){this._set("initialDisplayMode",e),this._syncSelectedFeatureIndex(this.features)}set location(e){let t=e;const i=this.spatialReference?.isWebMercator,r=e?.spatialReference?.isWGS84;r&&i&&(t=F(e)),this._set("location",t)}get map(){return this.view?.map??null}set map(e){this._override("map",e)}get pendingPromisesCount(){return this._pendingPromises.size}get promiseCount(){return this.promises.length}get promises(){return this._get("promises")||[]}set promises(e){this._get("promises")!==e&&(this._pendingPromises.clear(),this.features=[],Array.isArray(e)&&e.length?(this._set("promises",e),e=e.slice(),p(this._pendingPromises,e),e.reduce((e,t)=>e.finally(()=>t.then(e=>{this._pendingPromises.has(t)&&this._updateFeatures(e)}).finally(()=>this._pendingPromises.delete(t)).catch(()=>{})),Promise.resolve())):this._set("promises",[]))}get selectedFeature(){const{features:e,selectedFeatureIndex:t}=this;if(-1===t)return null;return e[t]||null}get selectedFeatureIndex(){const e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1}set selectedFeatureIndex(e){const{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set("selectedFeatureIndex",e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){const{view:e,map:t}=this;return e?e.ready?"ready":"disabled":t?"ready":"disabled"}get timeZone(){return this.view?.timeZone??E}set timeZone(e){this._overrideIfSome("timeZone",e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return(!!this._fetchFeaturesController||this.pendingPromisesCount>0)&&0===this.featureCount}zoomTo(e){return this.callGoTo(e)}clear(){this.set({promises:[],features:[],content:null,heading:null,location:null,activeFeature:null})}fetchFeatures(e,t){const{view:r}=this;if(!r||!e)throw new i("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screenPoint and view.",{screenPoint:e,view:r});return r.fetchPopupFeatures(e,{pointerType:t?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t?.signal})}next(){return this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount),this}previous(){return this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount),this}async handleViewClick(e){return this._fetchFeaturesAndOpen(e)}_syncSelectedFeatureIndex(e){const{pendingPromisesCount:t,promiseCount:i,selectedFeatureIndex:r}=this,s=i&&e.length;"list"!==this.initialDisplayMode?s&&t&&-1===r?this.selectedFeatureIndex=0:s&&-1!==r||(this.selectedFeatureIndex=e.length?0:-1):(!s||s&&t===i)&&(this.selectedFeatureIndex=-1)}_centerAtLocation(){const{view:e}=this,t=A(this);this._cancelCenterAtLocation();const r=new AbortController,{signal:o}=r;return this._centerAtLocationController=r,t&&e?this.callGoTo({target:{target:t,scale:e.scale},options:{signal:o}}).catch(e=>{n(e)||s.getLogger(this).error(e)}):Promise.reject(new i("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e}))}_getRoundRobinIndex(e,t){return(e+t)%t}_viewScaleChange(){if(this.selectedFeature?.isAggregate)return this.aggregatedFeaturesEnabled=!1,this.open=!1,void this.clear()}_locationChange(e){const{selectedFeature:t,updateLocationEnabled:i,view:r}=this;r&&!this._locationUpdateController&&i&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){"list"!==this.initialDisplayMode&&(this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null)}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){const{features:e,featureCount:t,featurePage:i,featuresPerPage:r,featureItems:s}=this;if(null==i)return;const o=((i-1)*r+t)%t,a=Math.min(o+r,s.length);for(let n=o;n<a;n++){const t=s[n];t&&(t.graphic??=e[n])}}async _selectedFeatureChange(e){const{location:t,updateLocationEnabled:i,view:r}=this;if(this.aggregatedFeaturesEnabled=!1,!e||!r)return;const s=v(e)?.type;if("map-image"!==s&&"imagery"!==s&&"imagery-tile"!==s||(e.symbol=await x(e)),(i||!t)&&e.geometry){if("point"===e.geometry.type)return void(this.location=e.geometry);const t=await import("../geometry/operators/labelPointOperator.js");return void(this.location=t.execute(e.geometry))}if(i&&!e.geometry){await this._centerAtLocation();const e=r.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&this.promises&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",[])}_updateFeatureItems(){const e=this.selectedFeature,t=this.features,i=this.featureItems,r=this.view,s=this.spatialReference,o=this.map,a=this.timeZone,n=this.location,l=this.featureItemAbilities??this._defaultFeatureAbilities;if(!t?.length)return void this._destroyFeatureItems();const h=[],u=new Map,c=new Set;i.forEach(e=>{const t=e?.graphic;e&&t&&u.set(t,e)}),t.forEach((t,p)=>{if(!t)return;const d=i[p];if(d&&!c.has(d)&&(null==d.graphic||d.graphic===t))return d.abilities=l,h[p]=d,void c.add(d);const g=u.get(t);if(g&&!c.has(g))return g.abilities=l,h[p]=g,void c.add(g);const m=new L({abilities:l,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:s,graphic:t===e?t:null,location:n,map:o,view:r,timeZone:a});h[p]=m,c.add(m)}),i.forEach(e=>{!e||c.has(e)||e.destroyed||e.destroy()}),this._set("featureItems",h)}async _getScreenPoint(e,t){const{spatialReference:i,view:r}=this;if(!r)return null;await r.when();const s=e?.spatialReference;return s&&i?(await f(s,i,null,t),r.toScreen(e)):null}_cancelCenterAtLocation(){this._centerAtLocationController=o(this._centerAtLocationController)}_cancelFetchingFeatures(){this._fetchFeaturesController=o(this._fetchFeaturesController)}async _projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,event:i,signal:r}){return this.fetchFeatures(t??await this._getScreenPoint(e??this.location,{signal:r}),{signal:r,event:i})}_fetchFeaturesWithController({mapPoint:e,screenPoint:t,event:i}){this._cancelFetchingFeatures();const r=new AbortController,{signal:s}=r;this._fetchFeaturesController=r;const o=this._projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,signal:s,event:i});return o.catch(()=>{}).finally(()=>{this._fetchFeaturesController===r&&(this._fetchFeaturesController=null)}),o}async _fetchFeaturesAndOpen(e){const{mapPoint:t,screenPoint:i}=e;this.removeHandles(U),this.addHandles([h(()=>this.view?.scale,()=>this._debouncedLocationUpdate(t).catch(e=>{n(e)||s.getLogger(this).error(e)})),u(()=>!this.open,()=>{this.removeHandles(U)},{once:!0})],U);const{pendingFeatures:r}=await this._fetchFeaturesWithController({mapPoint:t,screenPoint:i,event:e});return{location:t??void 0,promises:r}}async _locationUpdate(e,t){const{spatialReference:i}=this,r=this.selectedFeature?.geometry?.type,o=this.location??e;if(r&&"mesh"!==r&&i&&o&&this.selectedFeature){if("point"===r){const e=await import("../geometry/operators/labelPointOperator.js");return void(this.location=e.execute(this.selectedFeature.geometry))}try{const e=this.selectedFeature;let r=e.geometry;const s=this._getHighlightLayer(e),a=e.getObjectId();if(!s||!this.view)return;if(a){const e=this.view?.allLayerViews.find(e=>e.layer.uid===s.uid);if(!e||!("queryFeatures"in e))return;const o=e.createQuery();o.outSpatialReference=i,o.objectIds=[a],o.returnGeometry=!0;const{features:n}=await e.queryFeatures(o,t);r=n[0]?.geometry}if(!r||"mesh"===r.type)return;r=y(r,i),M??=await Promise.all([import("../geometry/operators/intersectsOperator.js"),import("../geometry/operators/proximityOperator.js")]);const[n,l]=M;if(!n.execute(r,o)){const t=l.getNearestCoordinate(r,o).coordinate??o;this.selectedFeature===e&&(this.location=t)}}catch(a){n(a)||s.getLogger(this).error(a)}}}_cancelLocationUpdate(){this._locationUpdateController=o(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){const t=v(e),{layer:i}=e;return t&&"layer"in t&&t.layer?t.layer:"map-notes"===t?.type||"subtype-group"===t?.type?t:i??t}_getHighlightLayerView(e,t){return"subtype-sublayer"===t.type&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,i){if(H(t.type,i))return e;const r=e.getObjectId();if(null!=r)return r;const s="imagery"===t.type?void 0:"objectIdField"in t?t.objectIdField||w:null,o=e.attributes;return o&&s&&o[s]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);const i=this[t];if(!i)return;const{highlightEnabled:r,view:s,open:o}=this;if(!s||!r||!o)return;const a=this._getHighlightLayer(i);if(!a)return;const n=this._getHighlightLayerView(s,a);if(!n)return;this._highlightPromises[e]=n;const l=await n;if(!(l&&R(l)&&this._highlightPromises[e]===n&&this[t]&&this.highlightEnabled))return;const h=l.highlight(this._getHighlightTarget(i,a,s.type));this.addHandles(h,e)}async _highlightActiveFeature(){return this._highlightFeature("highlight-active-feature","activeFeature")}async _highlightSelectedFeature(){return this._highlightFeature("highlight-selected-feature","selectedFeature")}_updateFeatures(e){const{features:t}=this,i=new Set(t),r=e.filter(e=>!i.has(e));r?.length&&(this.features=t.concat(r))}};e([d()],D.prototype,"_fetchFeaturesController",void 0),e([d({type:C})],D.prototype,"actions",void 0),e([d({readOnly:!0})],D.prototype,"active",null),e([d()],D.prototype,"activeFeature",void 0),e([d({readOnly:!0})],D.prototype,"allActions",null),e([d()],D.prototype,"browseClusterEnabled",void 0),e([d()],D.prototype,"aggregatedFeaturesEnabled",void 0),e([d({value:null})],D.prototype,"content",null),e([d({type:C,readOnly:!0})],D.prototype,"defaultActions",null),e([d({type:Boolean})],D.prototype,"defaultPopupTemplateEnabled",void 0),e([d({readOnly:!0})],D.prototype,"featureCount",null),e([d()],D.prototype,"featurePage",void 0),e([d({value:[]})],D.prototype,"features",null),e([d()],D.prototype,"featuresPerPage",void 0),e([d()],D.prototype,"featureMenuOpen",void 0),e([d({type:j})],D.prototype,"featureItemAbilities",void 0),e([d({readOnly:!0})],D.prototype,"featureItems",void 0),e([d()],D.prototype,"heading",void 0),e([d()],D.prototype,"highlightEnabled",void 0),e([d()],D.prototype,"includeDefaultActions",void 0),e([d({value:"feature"})],D.prototype,"initialDisplayMode",null),e([d({type:m})],D.prototype,"location",null),e([d()],D.prototype,"map",null),e([d()],D.prototype,"open",void 0),e([d({readOnly:!0})],D.prototype,"pendingPromisesCount",null),e([d({readOnly:!0})],D.prototype,"promiseCount",null),e([d()],D.prototype,"promises",null),e([d({value:null,readOnly:!0})],D.prototype,"selectedFeature",null),e([d({value:-1})],D.prototype,"selectedFeatureIndex",null),e([d({readOnly:!0})],D.prototype,"selectedFeatureItem",null),e([d({type:_})],D.prototype,"spatialReference",null),e([d({readOnly:!0})],D.prototype,"state",null),e([d()],D.prototype,"timeZone",null),e([d()],D.prototype,"updateLocationEnabled",void 0),e([d()],D.prototype,"view",void 0),e([d({readOnly:!0})],D.prototype,"waitingForContents",null),e([d({readOnly:!0})],D.prototype,"waitingForResult",null),e([d()],D.prototype,"zoomFactor",void 0),D=e([g("esri.popup.Features")],D);const V=D;export{V as default};
2
+ import{__decorate as e}from"tslib";import{isSome as t}from"../core/arrayUtils.js";import i from"../core/Error.js";import{EventedAccessor as r}from"../core/Evented.js";import s from"../core/Logger.js";import{abortMaybe as o}from"../core/maybe.js";import{debounce as n,isAbortError as a}from"../core/promiseUtils.js";import l from"../core/ReactiveSet.js";import{watch as h,when as u,sync as c}from"../core/reactiveUtils.js";import{addMany as p}from"../core/SetUtils.js";import{property as d,subclass as g}from"../core/accessorSupport/decorators.js";import m from"../geometry/Point.js";import{initializeProjection as f,project as y}from"../geometry/projectionUtils.js";import _ from"../geometry/SpatialReference.js";import{geographicToWebMercator as F}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as v}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as w}from"../layers/LayerConstants.js";import{ActionsCollection as b,zoomToAggregatedFeatures as C,browseAggregatedFeatures as I,zoomToFeature as P}from"./actions.js";import{getSelectedTarget as A}from"./actionUtils.js";import L from"./Feature.js";import j from"./support/FeatureAbilities.js";import{getDisplayedSymbol as x}from"../symbols/support/symbolUtils.js";import{system as E}from"../time/constants.js";import{highlightsSupported as R}from"../views/support/layerViewUtils.js";import{GoTo as O}from"../widgets/support/GoTo.js";const U="location-scale-handle",S=()=>[P.clone()],T=()=>[C.clone(),I.clone()];let M=null;function H(e,t){switch(e){case"building-scene":case"map-image":case"tile":case"imagery":return!0;case"imagery-tile":return"2d"===t;default:return!1}}let D=class extends(O(r)){constructor(e){super(e),this._pendingPromises=new l,this._fetchFeaturesController=null,this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._defaultFeatureAbilities=new j,this.actions=new b,this.activeFeature=null,this.browseClusterEnabled=!1,this.aggregatedFeaturesEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureItemAbilities=null,this.featureItems=[],this.heading=null,this.highlightEnabled=!0,this.includeDefaultActions=!0,this.open=!1,this.updateLocationEnabled=!1,this.view=null,this.zoomFactor=4,this._debouncedLocationUpdate=n(async e=>{this._cancelLocationUpdate();const t=new AbortController,{signal:i}=t;this._locationUpdateController=t,await this._locationUpdate(e,{signal:i}).catch(()=>{}).finally(()=>{this._locationUpdateController===t&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([h(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),h(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),h(()=>this.location,e=>this._locationChange(e)),h(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),h(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),h(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),h(()=>this.featureItems,()=>this._featureItemsChange()),h(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),u(()=>!this.waitingForResult,()=>this._waitingForResultChange(),c),u(()=>!this.open,()=>this.aggregatedFeaturesEnabled=!1)])}destroy(){this._cancelLocationUpdate(),this._cancelFetchingFeatures(),this._cancelCenterAtLocation(),this._pendingPromises.clear(),this.aggregatedFeaturesEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get active(){return this.open&&!this.waitingForResult}get allActions(){const e=this._get("allActions")||new b;e.removeAll();const{actions:i,defaultActions:r,defaultPopupTemplateEnabled:s,includeDefaultActions:o,selectedFeature:n}=this,a=o?r.concat(i):i,l=n&&("function"==typeof n.getEffectivePopupTemplate&&n.getEffectivePopupTemplate(s)||n.popupTemplate),h=l?.actions,u=l?.overwriteActions?h:h?.concat(a)??a;return u?.filter(t).forEach(t=>e.add(t)),e}set content(e){this.promises=[],this._set("content",e)}get defaultActions(){const e=this._get("defaultActions")||new b;return e.removeAll(),e.addMany(this.selectedFeature?.isAggregate?T():S()),e}get featureCount(){return this.features.length}set features(e){if(this._get("features")===e)return;const t=e||[];this._set("features",t),this._syncSelectedFeatureIndex(t)}get initialDisplayMode(){return this._get("initialDisplayMode")||"feature"}set initialDisplayMode(e){this._set("initialDisplayMode",e),this._syncSelectedFeatureIndex(this.features)}set location(e){let t=e;const i=this.spatialReference?.isWebMercator,r=e?.spatialReference?.isWGS84;r&&i&&(t=F(e)),this._set("location",t)}get map(){return this.view?.map??null}set map(e){this._override("map",e)}get pendingPromisesCount(){return this._pendingPromises.size}get promiseCount(){return this.promises.length}get promises(){return this._get("promises")||[]}set promises(e){this._get("promises")!==e&&(this._pendingPromises.clear(),this.features=[],Array.isArray(e)&&e.length?(this._set("promises",e),e=e.slice(),p(this._pendingPromises,e),e.reduce((e,t)=>e.finally(()=>t.then(e=>{this._pendingPromises.has(t)&&this._updateFeatures(e)}).finally(()=>this._pendingPromises.delete(t)).catch(()=>{})),Promise.resolve())):this._set("promises",[]))}get selectedFeature(){const{features:e,selectedFeatureIndex:t}=this;if(-1===t)return null;return e[t]||null}get selectedFeatureIndex(){const e=this._get("selectedFeatureIndex");return"number"==typeof e?e:-1}set selectedFeatureIndex(e){const{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set("selectedFeatureIndex",e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override("spatialReference",e)}get state(){const{view:e,map:t}=this;return e?e.ready?"ready":"disabled":t?"ready":"disabled"}get timeZone(){return this.view?.timeZone??E}set timeZone(e){this._overrideIfSome("timeZone",e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return(!!this._fetchFeaturesController||this.pendingPromisesCount>0)&&0===this.featureCount}zoomTo(e){return this.callGoTo(e)}clear(){this.set({promises:[],features:[],content:null,heading:null,location:null,activeFeature:null})}fetchFeatures(e,t){const{view:r}=this;if(!r||!e)throw new i("fetch-features:invalid-screenpoint-or-view","Cannot fetch features without a screenPoint and view.",{screenPoint:e,view:r});return r.fetchPopupFeatures(e,{pointerType:t?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t?.signal})}next(){return this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount),this}previous(){return this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount),this}async handleViewClick(e){return this._fetchFeaturesAndOpen(e)}_syncSelectedFeatureIndex(e){const{pendingPromisesCount:t,promiseCount:i,selectedFeatureIndex:r}=this,s=i&&e.length;"list"!==this.initialDisplayMode?s&&t&&-1===r?this.selectedFeatureIndex=0:s&&-1!==r||(this.selectedFeatureIndex=e.length?0:-1):(!s||s&&t===i)&&(this.selectedFeatureIndex=-1)}_centerAtLocation(){const{view:e}=this,t=A(this);this._cancelCenterAtLocation();const r=new AbortController,{signal:o}=r;return this._centerAtLocationController=r,t&&e?this.callGoTo({target:{target:t,scale:e.scale},options:{signal:o}}).catch(e=>{a(e)||s.getLogger(this).error(e)}):Promise.reject(new i("center-at-location:invalid-target-or-view","Cannot center at a location without a target and view.",{target:t,view:e}))}_getRoundRobinIndex(e,t){return(e+t)%t}_locationChange(e){const{selectedFeature:t,updateLocationEnabled:i,view:r}=this;r&&!this._locationUpdateController&&i&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){"list"!==this.initialDisplayMode&&(this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null)}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){const{features:e,featureCount:t,featurePage:i,featuresPerPage:r,featureItems:s}=this;if(null==i)return;const o=((i-1)*r+t)%t,n=Math.min(o+r,s.length);for(let a=o;a<n;a++){const t=s[a];t&&(t.graphic??=e[a])}}async _selectedFeatureChange(e){const{location:t,updateLocationEnabled:i,view:r}=this;if(this.aggregatedFeaturesEnabled=!1,!e||!r)return;const s=v(e)?.type;if("map-image"!==s&&"imagery"!==s&&"imagery-tile"!==s||(e.symbol=await x(e)),(i||!t)&&e.geometry){if("point"===e.geometry.type)return void(this.location=e.geometry);const t=await import("../geometry/operators/labelPointOperator.js");return void(this.location=t.execute(e.geometry))}if(i&&!e.geometry){await this._centerAtLocation();const e=r.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&this.promises&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set("featureItems",[])}_updateFeatureItems(){const e=this.selectedFeature,t=this.features,i=this.featureItems,r=this.view,s=this.spatialReference,o=this.map,n=this.timeZone,a=this.location,l=this.featureItemAbilities??this._defaultFeatureAbilities;if(!t?.length)return void this._destroyFeatureItems();const h=[],u=new Map,c=new Set;i.forEach(e=>{const t=e?.graphic;e&&t&&u.set(t,e)}),t.forEach((t,p)=>{if(!t)return;const d=i[p];if(d&&!c.has(d)&&(null==d.graphic||d.graphic===t))return d.abilities=l,h[p]=d,void c.add(d);const g=u.get(t);if(g&&!c.has(g))return g.abilities=l,h[p]=g,void c.add(g);const m=new L({abilities:l,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:s,graphic:t===e?t:null,location:a,map:o,view:r,timeZone:n});h[p]=m,c.add(m)}),i.forEach(e=>{!e||c.has(e)||e.destroyed||e.destroy()}),this._set("featureItems",h)}async _getScreenPoint(e,t){const{spatialReference:i,view:r}=this;if(!r)return null;await r.when();const s=e?.spatialReference;return s&&i?(await f(s,i,null,t),r.toScreen(e)):null}_cancelCenterAtLocation(){this._centerAtLocationController=o(this._centerAtLocationController)}_cancelFetchingFeatures(){this._fetchFeaturesController=o(this._fetchFeaturesController)}async _projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,event:i,signal:r}){return this.fetchFeatures(t??await this._getScreenPoint(e??this.location,{signal:r}),{signal:r,event:i})}_fetchFeaturesWithController({mapPoint:e,screenPoint:t,event:i}){this._cancelFetchingFeatures();const r=new AbortController,{signal:s}=r;this._fetchFeaturesController=r;const o=this._projectScreenPointAndFetchFeatures({mapPoint:e,screenPoint:t,signal:s,event:i});return o.catch(()=>{}).finally(()=>{this._fetchFeaturesController===r&&(this._fetchFeaturesController=null)}),o}async _fetchFeaturesAndOpen(e){const{mapPoint:t,screenPoint:i}=e;this.removeHandles(U),this.addHandles([h(()=>this.view?.scale,()=>this._debouncedLocationUpdate(t).catch(e=>{a(e)||s.getLogger(this).error(e)})),u(()=>!this.open,()=>{this.removeHandles(U)},{once:!0})],U);const{pendingFeatures:r}=await this._fetchFeaturesWithController({mapPoint:t,screenPoint:i,event:e});return{location:t??void 0,promises:r}}async _locationUpdate(e,t){const{spatialReference:i}=this,r=this.selectedFeature?.geometry?.type,o=this.location??e;if(r&&"mesh"!==r&&i&&o&&this.selectedFeature){if("point"===r){const e=await import("../geometry/operators/labelPointOperator.js");return void(this.location=e.execute(this.selectedFeature.geometry))}try{const e=this.selectedFeature;let r=e.geometry;const s=this._getHighlightLayer(e),n=e.getObjectId();if(!s||!this.view)return;if(n){const e=this.view?.allLayerViews.find(e=>e.layer.uid===s.uid);if(!e||!("queryFeatures"in e))return;const o=e.createQuery();o.outSpatialReference=i,o.objectIds=[n],o.returnGeometry=!0;const{features:a}=await e.queryFeatures(o,t);r=a[0]?.geometry}if(!r||"mesh"===r.type)return;r=y(r,i),M??=await Promise.all([import("../geometry/operators/intersectsOperator.js"),import("../geometry/operators/proximityOperator.js")]);const[a,l]=M;if(!a.execute(r,o)){const t=l.getNearestCoordinate(r,o).coordinate??o;this.selectedFeature===e&&(this.location=t)}}catch(n){a(n)||s.getLogger(this).error(n)}}}_cancelLocationUpdate(){this._locationUpdateController=o(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){const t=v(e),{layer:i}=e;return t&&"layer"in t&&t.layer?t.layer:"map-notes"===t?.type||"subtype-group"===t?.type?t:i??t}_getHighlightLayerView(e,t){return"subtype-sublayer"===t.type&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,i){if(H(t.type,i))return e;const r=e.getObjectId();if(null!=r)return r;const s="imagery"===t.type?void 0:"objectIdField"in t?t.objectIdField||w:null,o=e.attributes;return o&&s&&o[s]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);const i=this[t];if(!i)return;const{highlightEnabled:r,view:s,open:o}=this;if(!s||!r||!o)return;const n=this._getHighlightLayer(i);if(!n)return;const a=this._getHighlightLayerView(s,n);if(!a)return;this._highlightPromises[e]=a;const l=await a;if(!(l&&R(l)&&this._highlightPromises[e]===a&&this[t]&&this.highlightEnabled))return;const h=l.highlight(this._getHighlightTarget(i,n,s.type));this.addHandles(h,e)}async _highlightActiveFeature(){return this._highlightFeature("highlight-active-feature","activeFeature")}async _highlightSelectedFeature(){return this._highlightFeature("highlight-selected-feature","selectedFeature")}_updateFeatures(e){const{features:t}=this,i=new Set(t),r=e.filter(e=>!i.has(e));r?.length&&(this.features=t.concat(r))}};e([d()],D.prototype,"_fetchFeaturesController",void 0),e([d({type:b})],D.prototype,"actions",void 0),e([d({readOnly:!0})],D.prototype,"active",null),e([d()],D.prototype,"activeFeature",void 0),e([d({readOnly:!0})],D.prototype,"allActions",null),e([d()],D.prototype,"browseClusterEnabled",void 0),e([d()],D.prototype,"aggregatedFeaturesEnabled",void 0),e([d({value:null})],D.prototype,"content",null),e([d({type:b,readOnly:!0})],D.prototype,"defaultActions",null),e([d({type:Boolean})],D.prototype,"defaultPopupTemplateEnabled",void 0),e([d({readOnly:!0})],D.prototype,"featureCount",null),e([d()],D.prototype,"featurePage",void 0),e([d({value:[]})],D.prototype,"features",null),e([d()],D.prototype,"featuresPerPage",void 0),e([d()],D.prototype,"featureMenuOpen",void 0),e([d({type:j})],D.prototype,"featureItemAbilities",void 0),e([d({readOnly:!0})],D.prototype,"featureItems",void 0),e([d()],D.prototype,"heading",void 0),e([d()],D.prototype,"highlightEnabled",void 0),e([d()],D.prototype,"includeDefaultActions",void 0),e([d({value:"feature"})],D.prototype,"initialDisplayMode",null),e([d({type:m})],D.prototype,"location",null),e([d()],D.prototype,"map",null),e([d()],D.prototype,"open",void 0),e([d({readOnly:!0})],D.prototype,"pendingPromisesCount",null),e([d({readOnly:!0})],D.prototype,"promiseCount",null),e([d()],D.prototype,"promises",null),e([d({value:null,readOnly:!0})],D.prototype,"selectedFeature",null),e([d({value:-1})],D.prototype,"selectedFeatureIndex",null),e([d({readOnly:!0})],D.prototype,"selectedFeatureItem",null),e([d({type:_})],D.prototype,"spatialReference",null),e([d({readOnly:!0})],D.prototype,"state",null),e([d()],D.prototype,"timeZone",null),e([d()],D.prototype,"updateLocationEnabled",void 0),e([d()],D.prototype,"view",void 0),e([d({readOnly:!0})],D.prototype,"waitingForContents",null),e([d({readOnly:!0})],D.prototype,"waitingForResult",null),e([d()],D.prototype,"zoomFactor",void 0),D=e([g("esri.popup.Features")],D);const V=D;export{V as default};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import t from"../../../request.js";import{parseUrl as o,encode as r,asValidOptions as e}from"../../utils.js";import s from"./support/EditUnitIdentifiersResult.js";async function i(i,n,p){const m=o(i),u={...n.toJSON(),f:"json"},f=r({...m.query,...u}),a=e(f,{...p,method:"post",authMode:"no-prompt"}),d=`${m.path}/unitIdentifiers/reserve`,{data:j}=await t(d,a);return s.fromJSON(j)}export{i as reserve};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import{JSONSupport as r}from"../../../../core/JSONSupport.js";import{property as o,subclass as e}from"../../../../core/accessorSupport/decorators.js";import{ensureClass as s}from"../../../../core/accessorSupport/ensureType.js";var i;let p=i=class extends r{static from(t){return s(i,t)}constructor(t){super(t),this.object=null,this.firstUnit=null,this.lastUnit=null,this.gdbVersion=null,this.sessionId=null}};t([o({json:{write:!0}})],p.prototype,"object",void 0),t([o({type:Number,json:{write:!0}})],p.prototype,"firstUnit",void 0),t([o({type:Number,json:{write:!0}})],p.prototype,"lastUnit",void 0),t([o({type:String,json:{write:!0}})],p.prototype,"gdbVersion",void 0),t([o({type:String,json:{write:!0}})],p.prototype,"sessionId",void 0),p=i=t([e("esri.rest.networks.unitIdentifiers.support.ReserveParameters")],p);const n=p;export{n as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../../../core/JSONSupport.js";import{property as r,subclass as e}from"../../../../core/accessorSupport/decorators.js";import{ensureClass as s}from"../../../../core/accessorSupport/ensureType.js";var i;let n=i=class extends o{static from(t){return s(i,t)}constructor(t){super(t),this.object=null,this.numUnits=null,this.gdbVersion=null,this.sessionId=null}};t([r({json:{write:!0}})],n.prototype,"object",void 0),t([r({type:Number,json:{write:!0}})],n.prototype,"numUnits",void 0),t([r({type:String,json:{write:!0}})],n.prototype,"gdbVersion",void 0),t([r({type:String,json:{write:!0}})],n.prototype,"sessionId",void 0),n=i=t([e("esri.rest.networks.unitIdentifiers.support.ResizeParameters")],n);const p=n;export{p as default};
2
+ import{__decorate as t}from"tslib";import{JSONSupport as o}from"../../../../core/JSONSupport.js";import{property as r,subclass as e}from"../../../../core/accessorSupport/decorators.js";import{ensureClass as s}from"../../../../core/accessorSupport/ensureType.js";var i;let p=i=class extends o{static from(t){return s(i,t)}constructor(t){super(t),this.object=null,this.lastUnit=null,this.gdbVersion=null,this.sessionId=null}};t([r({json:{write:!0}})],p.prototype,"object",void 0),t([r({type:Number,json:{write:!0}})],p.prototype,"lastUnit",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"gdbVersion",void 0),t([r({type:String,json:{write:!0}})],p.prototype,"sessionId",void 0),p=i=t([e("esri.rest.networks.unitIdentifiers.support.ResizeParameters")],p);const n=p;export{n as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as r}from"tslib";import{JSONSupport as t}from"../../../../core/JSONSupport.js";import{property as e,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{reader as s}from"../../../../core/accessorSupport/decorators/reader.js";let n=class extends t{constructor(r){super(r),this.container=null,this.ranges=null}readContainer(r,t){return{sourceId:t.sourceId,globalId:t.globalId}}readRanges(r,t){return[...t.gaps.map(r=>({firstUnit:r.start,lastUnit:r.end,isGap:!0})),...t.unitIdentifiers.map(r=>({firstUnit:r.firstUnit,lastUnit:r.numUnits,isGap:!1,content:{sourceId:r.sourceId,globalId:r.globalId}}))]}};r([e({type:Object})],n.prototype,"container",void 0),r([s("container",["sourceId","globalId"])],n.prototype,"readContainer",null),r([e({type:[Object]})],n.prototype,"ranges",void 0),r([s("ranges",["gaps","unitIdentifiers"])],n.prototype,"readRanges",null),n=r([o("esri.rest.networks.unitIdentifiers.support.UnitQueryResult")],n);export{n as default};
2
+ import{__decorate as t}from"tslib";import{JSONSupport as r}from"../../../../core/JSONSupport.js";import{property as e,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{reader as s}from"../../../../core/accessorSupport/decorators/reader.js";let n=class extends r{constructor(t){super(t),this.container=null,this.ranges=null}readContainer(t,r){return{sourceId:r.sourceId,globalId:r.globalId}}readRanges(t,r){return[...r.gaps.map(t=>({firstUnit:t.start,lastUnit:t.end,isGap:!0})),...r.unitIdentifiers.map(t=>({firstUnit:t.firstUnit,lastUnit:t.lastUnit,isGap:!1,content:{sourceId:t.sourceId,globalId:t.globalId}}))]}};t([e({type:Object})],n.prototype,"container",void 0),t([s("container",["sourceId","globalId"])],n.prototype,"readContainer",null),t([e({type:[Object]})],n.prototype,"ranges",void 0),t([s("ranges",["gaps","unitIdentifiers"])],n.prototype,"readRanges",null),n=t([o("esri.rest.networks.unitIdentifiers.support.UnitQueryResult")],n);export{n as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- const a="20260419",b="be9298bdf9a242ffa2d20a2ca74f3cb7221968b5";export{a as buildDate,b as commitHash};
2
+ const b="20260421",f="b7b927b263d6f970065758fdb1111796cf311832";export{b as buildDate,f as commitHash};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as i}from"tslib";import s from"../../../../core/Accessor.js";import{mapCollection as t}from"../../../../core/mapCollectionUtils.js";import{property as a,subclass as e}from"../../../../core/accessorSupport/decorators.js";import r from"../../../../layers/GraphicsLayer.js";import{ElevationProfileInputVisualization2D as o}from"./ElevationProfileInputVisualization2D.js";import{ElevationProfileLineVisualization2D as n}from"./ElevationProfileLineVisualization2D.js";let l=class extends s{constructor(i){super(i),this._graphicsLayer=new r({listMode:"hide",internal:!0})}initialize(){const{view:i,analysisViewData:s}=this;i.map.add(this._graphicsLayer),i.map.layers.reorder(this._graphicsLayer,0),this._inputVisualization=new o({view:i,analysisViewData:s}),this._lineVisualizations=t(()=>s.analysis.profiles,t=>new n({view:i,analysisViewData:s,line:t,addGraphic:i=>{i.attributes={index:s.analysis.profiles.indexOf(t)},this._graphicsLayer.add(i),this._graphicsLayer.graphics.sort((i,s)=>{const t=i.attributes?.index??0;return(s.attributes?.index??0)-t})}}))}destroy(){this._inputVisualization.destroy(),this._lineVisualizations.destroy(),this._graphicsLayer.graphics.drain(i=>{i.destroyed||i.destroy()}),this._graphicsLayer.removeFromParent(),this._graphicsLayer.destroy()}get updating(){return this._inputVisualization.updating||this._lineVisualizations.some(i=>i.updating)}};i([a()],l.prototype,"view",void 0),i([a()],l.prototype,"analysisViewData",void 0),i([a()],l.prototype,"updating",null),l=i([e("esri.views.2d.analysis.ElevationProfile.ElevationProfileVisualization2D")],l);export{l as ElevationProfileVisualization2D};
2
+ import{__decorate as i}from"tslib";import t from"../../../../core/Accessor.js";import{mapCollection as s}from"../../../../core/mapCollectionUtils.js";import{property as a,subclass as e}from"../../../../core/accessorSupport/decorators.js";import r from"../../../../layers/GraphicsLayer.js";import{ElevationProfileInputVisualization2D as o}from"./ElevationProfileInputVisualization2D.js";import{ElevationProfileLineVisualization2D as n}from"./ElevationProfileLineVisualization2D.js";let l=class extends t{constructor(i){super(i),this._graphicsLayer=new r({listMode:"hide",internal:!0})}initialize(){const{view:i,analysisViewData:t}=this;i.map.add(this._graphicsLayer),i.map.layers.reorder(this._graphicsLayer,0),this._inputVisualization=new o({view:i,analysisViewData:t}),this._lineVisualizations=s(()=>t.flatProfiles,s=>new n({view:i,analysisViewData:t,line:s,addGraphic:i=>{i.attributes={index:t.flatProfiles.indexOf(s)},this._graphicsLayer.add(i),this._graphicsLayer.graphics.sort((i,t)=>{const s=i.attributes?.index??0;return(t.attributes?.index??0)-s})}}))}destroy(){this._inputVisualization.destroy(),this._lineVisualizations.destroy(),this._graphicsLayer.graphics.drain(i=>{i.destroyed||i.destroy()}),this._graphicsLayer.removeFromParent(),this._graphicsLayer.destroy()}get updating(){return this._inputVisualization.updating||this._lineVisualizations.some(i=>i.updating)}};i([a()],l.prototype,"view",void 0),i([a()],l.prototype,"analysisViewData",void 0),i([a()],l.prototype,"updating",null),l=i([e("esri.views.2d.analysis.ElevationProfile.ElevationProfileVisualization2D")],l);export{l as ElevationProfileVisualization2D};
@@ -53,7 +53,7 @@ export default abstract class ElevationProfileAnalysisView2D extends AnalysisVie
53
53
  /**
54
54
  * Points in the view that are computed from the [indicatorRelativePosition](https://developers.arcgis.com/javascript/latest/references/core/views/2d/analysis/ElevationProfileAnalysisView2D/#indicatorRelativePosition)
55
55
  * property (in the view's spatial reference).
56
- * There is one point for each [profile line](https://developers.arcgis.com/javascript/latest/references/core/analysis/ElevationProfileAnalysis/#profiles).
56
+ * There is one point for each computed profile line.
57
57
  * When a [result](https://developers.arcgis.com/javascript/latest/references/core/views/analysis/ElevationProfile/ElevationProfileResult/) of a profile line is not available or
58
58
  * no [sample](https://developers.arcgis.com/javascript/latest/references/core/views/analysis/ElevationProfile/ElevationProfileResult/#samples) exists for the specified indicator
59
59
  * position, the point is `undefined`.
@@ -94,6 +94,10 @@ export default abstract class ElevationProfileAnalysisView2D extends AnalysisVie
94
94
  * Results of the elevation profile analysis. Result objects are created immediately but they are gradually updated as
95
95
  * the analysis is computed.
96
96
  *
97
+ * Each result references the computed profile line via [ElevationProfileResult.profile](https://developers.arcgis.com/javascript/latest/references/core/views/analysis/ElevationProfile/ElevationProfileResult/#profile).
98
+ * The results array may contain more entries than the top-level [ElevationProfileAnalysis.profiles](https://developers.arcgis.com/javascript/latest/references/core/analysis/ElevationProfileAnalysis/#profiles)
99
+ * collection.
100
+ *
97
101
  * Watch [progress](https://developers.arcgis.com/javascript/latest/references/core/views/2d/analysis/ElevationProfileAnalysisView2D/#progress) to see the state of the calculation.
98
102
  */
99
103
  get results(): ElevationProfileResult[];
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{property as i,subclass as o}from"../../../core/accessorSupport/decorators.js";import r from"./AnalysisView2D.js";import{ElevationProfileVisualization2D as s}from"./ElevationProfile/ElevationProfileVisualization2D.js";import{ElevationProfileController as l}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as n}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let u=class extends r{constructor(t){super(t),this.type="elevation-profile-view-2d",this.analysis=null,this.indicatorRelativePosition=null}initialize(){const{analysis:t,view:i}=this;this._controller=new l({analysis:t,analysisViewData:this,view:i,computationFactory:{create:t=>{switch(t.profile.type){case"ground":return new n(t);case"input":return new a(t);case"query":return new p(t);case"scene":throw new e("elevation-profile-analysis-view-2d:unsupported","The scene profile line type is not supported in 2D views.")}}}}),this._visualization=new s({view:i,analysisViewData:this}),this._sketchTool=new c({view:i,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveDisplayUnits(){return this._controller?.effectiveDisplayUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get indicatorPoints(){return this._controller?.indicatorPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickFeature(t){return this._sketchTool.pickFeature(t)}};t([i({readOnly:!0})],u.prototype,"type",void 0),t([i({constructOnly:!0,nonNullable:!0})],u.prototype,"analysis",void 0),t([i({readOnly:!0})],u.prototype,"effectiveDisplayUnits",null),t([i({readOnly:!0})],u.prototype,"error",null),t([i()],u.prototype,"indicatorRelativePosition",void 0),t([i()],u.prototype,"indicatorPoints",null),t([i({readOnly:!0})],u.prototype,"progress",null),t([i({readOnly:!0})],u.prototype,"results",null),t([i({readOnly:!0})],u.prototype,"statistics",null),t([i({readOnly:!0})],u.prototype,"updating",null),t([i()],u.prototype,"sketchGraphic",null),t([i()],u.prototype,"toolState",null),t([i()],u.prototype,"_controller",void 0),t([i()],u.prototype,"_visualization",void 0),t([i()],u.prototype,"_sketchTool",void 0),u=t([o("esri.views.2d.analysis.ElevationProfileAnalysisView2D")],u);const y=u;export{y as default};
2
+ import{__decorate as t}from"tslib";import e from"../../../core/Collection.js";import i from"../../../core/Error.js";import{property as o,subclass as r}from"../../../core/accessorSupport/decorators.js";import s from"./AnalysisView2D.js";import{ElevationProfileVisualization2D as l}from"./ElevationProfile/ElevationProfileVisualization2D.js";import{ElevationProfileController as n}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as c}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as u}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let y=class extends s{constructor(t){super(t),this.type="elevation-profile-view-2d",this.analysis=null,this.indicatorRelativePosition=null}initialize(){const{analysis:t,view:e}=this;this._controller=new n({analysis:t,analysisViewData:this,view:e,computationFactory:{create:t=>{switch(t.profile.type){case"ground":return new a(t);case"input":return new p(t);case"query":return new c(t);case"scene":throw new i("elevation-profile-analysis-view-2d:unsupported","The scene profile line type is not supported in 2D views.")}}}}),this._visualization=new l({view:e,analysisViewData:this}),this._sketchTool=new u({view:e,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveDisplayUnits(){return this._controller?.effectiveDisplayUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get flatProfiles(){return this._controller?.flatProfiles??h}get indicatorPoints(){return this._controller?.indicatorPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickFeature(t){return this._sketchTool.pickFeature(t)}};t([o({readOnly:!0})],y.prototype,"type",void 0),t([o({constructOnly:!0,nonNullable:!0})],y.prototype,"analysis",void 0),t([o({readOnly:!0})],y.prototype,"effectiveDisplayUnits",null),t([o({readOnly:!0})],y.prototype,"error",null),t([o()],y.prototype,"flatProfiles",null),t([o()],y.prototype,"indicatorRelativePosition",void 0),t([o()],y.prototype,"indicatorPoints",null),t([o({readOnly:!0})],y.prototype,"progress",null),t([o({readOnly:!0})],y.prototype,"results",null),t([o({readOnly:!0})],y.prototype,"statistics",null),t([o({readOnly:!0})],y.prototype,"updating",null),t([o()],y.prototype,"sketchGraphic",null),t([o()],y.prototype,"toolState",null),t([o()],y.prototype,"_controller",void 0),t([o()],y.prototype,"_visualization",void 0),t([o()],y.prototype,"_sketchTool",void 0),y=t([r("esri.views.2d.analysis.ElevationProfileAnalysisView2D")],y);const v=y,h=new e;export{v as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{set as t,multiply as s}from"../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{set as r,multiply as e,identity as o,translate as a,rotate as n,scale as l,invert as m}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{set as h,transformMat3 as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{tileSize as d}from"./definitions.js";import{TiledDisplayObject as u}from"./TiledDisplayObject.js";const x=c(),M=p();class g extends u{constructor(t,s,i,r){super(t,s,i,r,d,d)}destroy(){super.destroy()}setTransform(m){const c=this.resolution/m.resolution,h=this.transforms.tileMat3,[f,p]=m.toScreenNoRotation([0,0],[this.x,this.y]),d=this.width/this.rangeX*c,u=this.height/this.rangeY*c;r(h,d,0,0,0,u,0,f,p,1),e(this.transforms.displayViewScreenMat3,m.displayViewMat3,h);const x=t(i(),d,0,0,u,f,p);s(this.transforms.labelMat2d,m.viewMat2d,x);const M=[0,0];m.toScreen(M,[this.x,this.y]);const g=this.transforms.tileUnitsToPixels;o(g),a(g,g,M),n(g,g,Math.PI*m.rotation/180),l(g,g,[d,u,1])}_createTransforms(){return{labelMat2d:i(),tileMat3:c(),displayViewScreenMat3:c(),tileUnitsToPixels:c()}}containsScreenPoint(t,s,i){const r=e(x,t.viewMat3,this.transforms.tileMat3),o=m(x,r);if(null==o)return!0;h(M,...s,1);const a=f(M,M,o),n=i*(this.resolution/t.resolution);return a[0]>=-n&&a[0]<this.width+n&&a[1]>=-n&&a[1]<this.height+n}}export{g as AFeatureTile};
2
+ import{set as t,multiply as s}from"../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{set as r,multiply as e,identity as o,translate as a,rotate as n,scale as c,invert as h}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{set as m,transformMat3 as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{segmentIntersects as d}from"../../../../geometry/support/intersectsBase.js";import{tileSize as u}from"./definitions.js";import{TiledDisplayObject as g}from"./TiledDisplayObject.js";const M=l(),x=p();class j extends g{constructor(t,s,i,r){super(t,s,i,r,u,u)}destroy(){super.destroy()}setTransform(h){const l=this.resolution/h.resolution,m=this.transforms.tileMat3,[f,p]=h.toScreenNoRotation([0,0],[this.x,this.y]),d=this.width/this.rangeX*l,u=this.height/this.rangeY*l;r(m,d,0,0,0,u,0,f,p,1),e(this.transforms.displayViewScreenMat3,h.displayViewMat3,m);const g=t(i(),d,0,0,u,f,p);s(this.transforms.labelMat2d,h.viewMat2d,g);const M=[0,0];h.toScreen(M,[this.x,this.y]);const x=this.transforms.tileUnitsToPixels;o(x),a(x,x,M),n(x,x,Math.PI*h.rotation/180),c(x,x,[d,u,1])}_createTransforms(){return{labelMat2d:i(),tileMat3:l(),displayViewScreenMat3:l(),tileUnitsToPixels:l()}}containsScreenPoint(t,s,i){const r=e(M,t.viewMat3,this.transforms.tileMat3),o=h(M,r);if(null==o)return!0;m(x,...s,1);const a=f(x,x,o),n=i*(this.resolution/t.resolution);return a[0]>=-n&&a[0]<this.width+n&&a[1]>=-n&&a[1]<this.height+n}containsScreenRect(t,s){const i=s[0],r=s[1],o=s[2],a=s[3],n=[[i,r],[i,a],[o,r],[o,a]];if(n.some(s=>this.containsScreenPoint(t,[s[0],s[1]],0)))return!0;const c=e(l(),t.viewMat3,this.transforms.tileMat3),h=[[0,0],[this.width,0],[this.width,this.height],[0,this.height]],u=[],g=p();for(const[e,l]of h)m(g,e,l,1),f(g,g,c),u.push([g[0],g[1]]);const M=u.length,x=n.length;for(let e=0;e<M;e++){const t=u[e],s=u[(e+1)%M];for(let i=0;i<x;i++){const r=n[i],e=n[(i+1)%x];if(d(t,s,r,e))return!0}}return!1}}export{j as AFeatureTile};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"../../../../../core/has.js";import{hittestSmallSymbolThreshold as t,hittestToleranceMobile as e,hittestToleranceDesktop as s,hittestToleranceSmallSymbol as i}from"../definitions.js";import{Effect as o}from"./Effect.js";import{PixelType as r}from"../../../../webgl/enums.js";class n extends o{constructor(){super(...arguments),this.name=this.constructor.name,this.defines=["hittest"]}dispose(){null!=this._fbo&&this._fbo.dispose()}createOptions({pixelRatio:o},r){if(!r.length)return null;const n=r.shift(),l=n.x,c=n.y;this._outstanding=n;const a=has("esri-mobile");return{type:"hittest",distance:(a?e:s)*o,smallSymbolDistance:(a?e:i)*o,smallSymbolSizeThreshold:t,position:[l,c]}}bind(t){const{context:e,attributeView:s}=t;if(!s.size)return;const i=s.getBlock(2);if(null==i)return;const o=i.getFBO(e);e.setViewport(0,0,s.size,s.size),e.bindFramebuffer(o),e.setColorMask(!0,!0,!0,!0),e.setClearColor(0,0,0,0),e.clear(16640)}unbind(){}draw(t){if(null==this._outstanding)return;const e=this._outstanding;this._outstanding=null,this._resolve(t,e.resolvers)}async _resolve(t,e){const{context:s,attributeView:i}=t,o=i.getBlock(2);if(null==o)return void e.forEach(t=>t.resolve([]));const n=o.getFBO(s),l=new Uint8Array(n.width*n.height*4);try{await n.readPixelsAsync(0,0,n.width,n.height,6408,r.UNSIGNED_BYTE,l)}catch(a){return void e.forEach(t=>t.resolve([]))}const c=[];for(let r=0;r<l.length;r+=4){const t=r/4;l[r]&&c.push(t)}e.forEach(t=>t.resolve(c))}}export{n as HittestEffect};
2
+ import has from"../../../../../core/has.js";import{hittestSmallSymbolThreshold as t,hittestToleranceMobile as e,hittestToleranceDesktop as i,hittestToleranceSmallSymbol as s}from"../definitions.js";import{Effect as o}from"./Effect.js";import{isScreenRect as n,isScreenPoint as r}from"../../../support/hitTestUtils.js";import{PixelType as h}from"../../../../webgl/enums.js";function l(t){const e=n(t),i=r(t);if(e){return{hittestType:"rect",input:t}}if(i){return{hittestType:"point",input:t}}}class c extends o{constructor(){super(...arguments),this.name=this.constructor.name,this.defines=["hittest"]}dispose(){null!=this._fbo&&this._fbo.dispose()}createOptions({pixelRatio:o},n){if(!n.length)return null;const r=n.shift();this._outstanding=r;const h=has("esri-mobile"),l=(h?e:i)*o,c=(h?e:s)*o,a=t,{query:u}=r,f=u.hittestType;let p=[-1,-1,-1,-1],m=[],d=[-1,-1];if("rect"===f){const t=u.input;m=[[t.x,t.y],[t.x,t.y+t.height],[t.x+t.width,t.y+t.height],[t.x+t.width,t.y]];let e=1/0,i=1/0,s=-1/0,o=-1/0;for(const[n,r]of m)e=Math.min(e,n),i=Math.min(i,r),s=Math.max(s,n),o=Math.max(o,r);p=[e,i,s,o]}else if("point"===f){const t=u.input;d=[t.x,t.y]}return{type:"hittest",distance:l,smallSymbolDistance:c,smallSymbolSizeThreshold:a,position:d,tlbr:p,hittestType:f}}bind(t){const{context:e,attributeView:i}=t;if(!i.size)return;const s=i.getBlock(2);if(null==s)return;const o=s.getFBO(e);e.setViewport(0,0,i.size,i.size),e.bindFramebuffer(o),e.setColorMask(!0,!0,!0,!0),e.setClearColor(0,0,0,0),e.clear(16640)}unbind(){}draw(t){if(null==this._outstanding)return;const e=this._outstanding;this._outstanding=null,this._resolve(t,e.resolvers)}async _resolve(t,e){const{context:i,attributeView:s}=t,o=s.getBlock(2);if(null==o)return void e.forEach(t=>t.resolve([]));const n=o.getFBO(i),r=new Uint8Array(n.width*n.height*4);try{await n.readPixelsAsync(0,0,n.width,n.height,6408,h.UNSIGNED_BYTE,r)}catch(c){return void e.forEach(t=>t.resolve([]))}const l=[];for(let h=0;h<r.length;h+=4){const t=h/4;r[h]&&l.push(t)}e.forEach(t=>t.resolve(l))}}export{c as HittestEffect,l as createHittestQuery};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{getMetersPerUnitForSR as t}from"../../../../../../core/units.js";import{maxRepresentableInt as e,tileSize as i}from"../../definitions.js";const o={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},n={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:!1},s={...o,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function r({pixelRatio:e,state:i,displayLevel:o,requiredLevel:n},s){const r=1/2**(o-s.key.level),l=1/2**(n-s.key.level);return{displayMat3:i.displayMat3,displayViewMat3:i.displayViewMat3,displayViewScreenMat3:s.transforms.displayViewScreenMat3,viewMat3:i.viewMat3,tileMat3:s.transforms.tileMat3,displayZoomFactor:r,requiredZoomFactor:l,tileOffset:[s.x,s.y],currentScale:i.scale,currentZoom:o,metersPerSRUnit:t(i.spatialReference),rotation:i.rotation,pixelRatio:e}}function l(t){return"highlight"===t.passOptions?.type}function a(t){return"hittest"===t.passOptions?.type}function c(t){if(!a(t))return null;const{position:e,distance:i,smallSymbolDistance:o,smallSymbolSizeThreshold:n}=t.passOptions;return{position:e,distance:i,smallSymbolDistance:o,smallSymbolSizeThreshold:n}}function p(t){if(!l(t))return null;const{activeReasons:e,highlightAll:i}=t.passOptions;return{activeReasons:e,highlightAll:i?1:0}}function u(t,e,i){const o={};for(const n in i)"function"!=typeof i[n]?o[n]=i[n]:o[n]=i[n](t,e);return o}function f(t,e){const{attributeView:i,context:o}=t;return{storage:i.getUniforms(o),view:r(t,e),hittestRequest:c(t),highlight:p(t)}}function d(t){return{inside:2===t.selection,outside:3===t.selection}}function m(t){return a(t)?n:l(t)&&"clear"===t.passOptions.stepType?s:o}function h(t){const{row:o,col:n}=t.key,s=n*i,r=o*i;return{tileOffsetFromLocalOrigin:[s%e,r%e],maxIntsToLocalOrigin:[Math.floor(s/e),Math.floor(r/e)]}}export{m as getFeaturePipelineState,f as getFeatureUniforms,h as getLocalTileOffset,d as getSelectionDefines,r as getViewUniforms,l as isHighlight,a as isHittest,u as resolveDynamicUniforms};
2
+ import{getMetersPerUnitForSR as t}from"../../../../../../core/units.js";import{maxRepresentableInt as e,tileSize as i}from"../../definitions.js";const o={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},n={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:!1},s={...o,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function r({pixelRatio:e,state:i,displayLevel:o,requiredLevel:n},s){const r=1/2**(o-s.key.level),l=1/2**(n-s.key.level);return{displayMat3:i.displayMat3,displayViewMat3:i.displayViewMat3,displayViewScreenMat3:s.transforms.displayViewScreenMat3,viewMat3:i.viewMat3,tileMat3:s.transforms.tileMat3,displayZoomFactor:r,requiredZoomFactor:l,tileOffset:[s.x,s.y],currentScale:i.scale,currentZoom:o,metersPerSRUnit:t(i.spatialReference),rotation:i.rotation,pixelRatio:e}}function l(t){return"highlight"===t.passOptions?.type}function a(t){return"hittest"===t.passOptions?.type}function c(t){if(!a(t))return null;const{position:e,distance:i,smallSymbolDistance:o,smallSymbolSizeThreshold:n,tlbr:s}=t.passOptions;return{position:e,distance:i,smallSymbolDistance:o,smallSymbolSizeThreshold:n,tlbr:s}}function p(t){if(!l(t))return null;const{activeReasons:e,highlightAll:i}=t.passOptions;return{activeReasons:e,highlightAll:i?1:0}}function u(t,e,i){const o={};for(const n in i)"function"!=typeof i[n]?o[n]=i[n]:o[n]=i[n](t,e);return o}function f(t,e){const{attributeView:i,context:o}=t;return{storage:i.getUniforms(o),view:r(t,e),hittestRequest:c(t),highlight:p(t)}}function d(t){return{inside:2===t.selection,outside:3===t.selection}}function m(t){return a(t)?n:l(t)&&"clear"===t.passOptions.stepType?s:o}function h(t){const{row:o,col:n}=t.key,s=n*i,r=o*i;return{tileOffsetFromLocalOrigin:[s%e,r%e],maxIntsToLocalOrigin:[Math.floor(s/e),Math.floor(r/e)]}}export{m as getFeaturePipelineState,f as getFeatureUniforms,h as getLocalTileOffset,d as getSelectionDefines,r as getViewUniforms,l as isHighlight,a as isHittest,u as resolveDynamicUniforms};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,input as l,ComputeVertexInput as r}from"../../GraphShaderModule.js";import{Vec3 as a,min as p,max as n,Float as u,Mat3 as d,Vec4 as m,ifElse as y,lessThan as h,equal as c,texture2D as x,clamp as v,abs as f,mix as V,distance as w,greaterThan as S,Vec2 as b,negate as g,step as C}from"../../graph/glsl.js";import{MarkerConstants as M}from"./markerConstants.js";import{AFeatureShader as z,FeatureVertexInput as _,FeatureFragmentInput as R}from"../shaders/AFeatureShader.js";import{c256ToRad as j,softEdgeRatio as U}from"../shaders/constants.js";import{distPointTriangle as N,xyToBarycentric as D,inTriangle as F,failHittest as I}from"../shaders/hittestUtils.js";import{MosaicInfo as O}from"../shaders/MosaicInfo.js";import{getBit as k,getBitBool as q,rgba2float as A}from"../shaders/utils.js";import{VisualVariableColor as P}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as T}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as G}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as H}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as L}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as B}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as E}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as J,getVisualVariableColor as K,getVisualVariableSize as Q,getVisualVariableRotation as W}from"../shaders/vvUtils.js";class X extends _{}t([i(3,m)],X.prototype,"color",void 0),t([i(4,m)],X.prototype,"outlineColor",void 0),t([i(5,b)],X.prototype,"offset",void 0),t([i(6,b)],X.prototype,"textureUV",void 0),t([i(7,m)],X.prototype,"sizing",void 0),t([i(8,u)],X.prototype,"placementAngle",void 0),t([i(9,u)],X.prototype,"sdfDecodeCoeff",void 0),t([i(10,b)],X.prototype,"zoomRange",void 0);class Y extends r{}t([i(11,b)],Y.prototype,"offsetNextVertex1",void 0),t([i(12,b)],Y.prototype,"offsetNextVertex2",void 0),t([i(13,b)],Y.prototype,"textureUVNextVertex1",void 0),t([i(14,b)],Y.prototype,"textureUVNextVertex2",void 0);class Z extends R{}function $(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function tt(t){return t.multiply(t).divide(128)}class et extends z{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=tt(t.sizing.x),o=tt(t.sizing.y),s=tt(t.sizing.z),l=t.placementAngle,r=k(t.bitset,M.bitset.isSDF),y=k(t.bitset,M.bitset.isMapAligned),h=k(t.bitset,M.bitset.scaleSymbolsProportionally),c=q(t.bitset,M.bitset.colorLocked),x=J(this,t.id),v=K(this,t.id,t.color,c).multiply(x),f=this.view.displayViewScreenMat3.multiply(new a(t.pos.xy,1)),V=Q(this,t.id,s).divide(s),w=i.multiply(V),S=t.offset.xy.multiply(V);let b=o.multiply(h.multiply(V.subtract(1)).add(1));b=p(b,n(w.subtract(.99),new u(0)));const g=n(b,new u(1)),C=p(b,new u(1)),z=d.fromRotation(l.multiply(j)),_=W(this,t.id),R=this._getViewRotationMatrix(y).multiply(_).multiply(z).multiply(new a(S.xy,0)),U=this.clip(t.id,t.zoomRange),N=new m(f.xy.add(R.xy),U,1),D=t.textureUV.divide(this.mosaicInfo.size),F=t.outlineColor.multiply(C),I=k(t.bitset,M.bitset.overrideOutlineColor),O=t.sdfDecodeCoeff.multiply(w);return{glPosition:N,color:v,textureUV:D,outlineColor:F,outlineSize:g,distanceToPx:O,isSDF:r,overrideOutlineColor:I,...this.maybeRunHittest(t,e,{pos:t.pos,size:w,sizeCorrection:V,isMapAligned:y,vvRotationMat3:_,placementMat3:z,outlineSize:g,distanceToPx:O,isSDF:r})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){return y(h(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i))}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getViewScreenMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getColor(t,e){return y(c(e.isSDF,new u(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return x(this.mosaicInfo.texture,t).multiply(e.color)}_getSDFColor(t,e){const i=x(this.mosaicInfo.texture,t),o=new u(.5).subtract(A(i)).multiply(e.distanceToPx).multiply(U),s=v(new u(.5).subtract(o),new u(0),new u(1)),l=e.color.multiply(s);let r=e.outlineSize;this.highlight&&(r=n(r,e.overrideOutlineColor.multiply(4)));const a=r.multiply(.5),p=f(o).subtract(a),d=v(new u(.5).subtract(p),new u(0),new u(1)),m=V(e.outlineColor,e.color,e.overrideOutlineColor).multiply(d);return new u(1).subtract(m.a).multiply(l).add(m)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:l}=this.hittestRequest,r=s.subtract(l),{viewMat3:p,tileMat3:n}=this.view,u=p.multiply(n).multiply(new a(i.pos,1)).xy,d=i.size.multiply(.5);return w(u,o).subtract(d).add(r)}_hittestMarker(t,e,i){const{pos:o,sizeCorrection:s,isMapAligned:l}=i,r=new a(t.offset.multiply(s),0),p=new a(e.offsetNextVertex1.multiply(s),0),n=new a(e.offsetNextVertex2.multiply(s),0),{viewMat3:u,tileMat3:d}=this.view,m=u.multiply(d).multiply(new a(o,1)),h=this._getViewScreenMatrix(l).multiply(i.vvRotationMat3).multiply(i.placementMat3),c=m.add(h.multiply(r)).xy,x=m.add(h.multiply(p)).xy,v=m.add(h.multiply(n)).xy,f=this.hittestRequest.position,V=this.hittestRequest.distance,w=N(f,c,x,v);return y(S(w,V),w,this._hittestSamples(c,x,v,t,e,i))}_hittestSamples(t,e,i,o,s,l){const{outlineSize:r,isSDF:a,distanceToPx:p}=l,n=this.hittestRequest.position,d=this.hittestRequest.distance,y=D(n.add(new b(g(d),g(d))),t,e,i),h=D(n.add(new b(0,g(d))),t,e,i),c=D(n.add(new b(d,g(d))),t,e,i),x=D(n.add(new b(g(d),0)),t,e,i),v=D(n,t,e,i),f=D(n.add(new b(d,0)),t,e,i),V=D(n.add(new b(g(d),d)),t,e,i),w=D(n.add(new b(0,d)),t,e,i),S=D(n.add(new b(d,d)),t,e,i),M=o.textureUV.divide(this.mosaicInfo.size),z=s.textureUVNextVertex1.divide(this.mosaicInfo.size),_=s.textureUVNextVertex2.divide(this.mosaicInfo.size),R={color:new m(1),outlineColor:new m(1),overrideOutlineColor:new u(1),outlineSize:r,distanceToPx:p,isSDF:a};let j=new u(0);return j=j.add(F(y).multiply(this._getColor($(y,M,z,_),R).a)),j=j.add(F(h).multiply(this._getColor($(h,M,z,_),R).a)),j=j.add(F(c).multiply(this._getColor($(c,M,z,_),R).a)),j=j.add(F(x).multiply(this._getColor($(x,M,z,_),R).a)),j=j.add(F(v).multiply(this._getColor($(v,M,z,_),R).a)),j=j.add(F(f).multiply(this._getColor($(f,M,z,_),R).a)),j=j.add(F(V).multiply(this._getColor($(V,M,z,_),R).a)),j=j.add(F(w).multiply(this._getColor($(w,M,z,_),R).a)),j=j.add(F(S).multiply(this._getColor($(S,M,z,_),R).a)),C(j,new u(.05)).multiply(I(this.hittestRequest))}}t([o(P)],et.prototype,"visualVariableColor",void 0),t([o(T)],et.prototype,"visualVariableOpacity",void 0),t([o(G)],et.prototype,"visualVariableRotation",void 0),t([o(H)],et.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(L)],et.prototype,"visualVariableSizeScaleStops",void 0),t([o(B)],et.prototype,"visualVariableSizeStops",void 0),t([o(E)],et.prototype,"visualVariableSizeUnitValue",void 0),t([s(O)],et.prototype,"mosaicInfo",void 0),t([e(0,l(X)),e(1,l(Y))],et.prototype,"vertex",null),t([e(0,l(Z))],et.prototype,"fragment",null);export{Z as MarkerFragmentInput,et as MarkerShader,X as MarkerVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,input as l,ComputeVertexInput as r}from"../../GraphShaderModule.js";import{Vec3 as a,min as p,max as n,Float as u,Mat3 as d,Vec4 as m,ifElse as y,lessThan as h,equal as c,texture2D as x,clamp as v,abs as f,mix as V,distance as w,greaterThan as S,Vec2 as b,negate as g,step as C}from"../../graph/glsl.js";import{MarkerConstants as M}from"./markerConstants.js";import{AFeatureShader as z,FeatureVertexInput as _,FeatureFragmentInput as R}from"../shaders/AFeatureShader.js";import{c256ToRad as j,softEdgeRatio as U}from"../shaders/constants.js";import{distPointTriangle as N,xyToBarycentric as D,inTriangle as F,failHittest as I}from"../shaders/hittestUtils.js";import{MosaicInfo as O}from"../shaders/MosaicInfo.js";import{getBit as T,getBitBool as k,rgba2float as q}from"../shaders/utils.js";import{VisualVariableColor as A}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as P}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as H}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as G}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as L}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as B}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as E}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as J,getVisualVariableColor as K,getVisualVariableSize as Q,getVisualVariableRotation as W}from"../shaders/vvUtils.js";class X extends _{}t([i(3,m)],X.prototype,"color",void 0),t([i(4,m)],X.prototype,"outlineColor",void 0),t([i(5,b)],X.prototype,"offset",void 0),t([i(6,b)],X.prototype,"textureUV",void 0),t([i(7,m)],X.prototype,"sizing",void 0),t([i(8,u)],X.prototype,"placementAngle",void 0),t([i(9,u)],X.prototype,"sdfDecodeCoeff",void 0),t([i(10,b)],X.prototype,"zoomRange",void 0);class Y extends r{}t([i(11,b)],Y.prototype,"offsetNextVertex1",void 0),t([i(12,b)],Y.prototype,"offsetNextVertex2",void 0),t([i(13,b)],Y.prototype,"textureUVNextVertex1",void 0),t([i(14,b)],Y.prototype,"textureUVNextVertex2",void 0);class Z extends R{}function $(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function tt(t){return t.multiply(t).divide(128)}class et extends z{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=tt(t.sizing.x),o=tt(t.sizing.y),s=tt(t.sizing.z),l=t.placementAngle,r=T(t.bitset,M.bitset.isSDF),y=T(t.bitset,M.bitset.isMapAligned),h=T(t.bitset,M.bitset.scaleSymbolsProportionally),c=k(t.bitset,M.bitset.colorLocked),x=J(this,t.id),v=K(this,t.id,t.color,c).multiply(x),f=this.view.displayViewScreenMat3.multiply(new a(t.pos.xy,1)),V=Q(this,t.id,s).divide(s),w=i.multiply(V),S=t.offset.xy.multiply(V);let b=o.multiply(h.multiply(V.subtract(1)).add(1));b=p(b,n(w.subtract(.99),new u(0)));const g=n(b,new u(1)),C=p(b,new u(1)),z=d.fromRotation(l.multiply(j)),_=W(this,t.id),R=this._getViewRotationMatrix(y).multiply(_).multiply(z).multiply(new a(S.xy,0)),U=this.clip(t.id,t.zoomRange),N=new m(f.xy.add(R.xy),U,1),D=t.textureUV.divide(this.mosaicInfo.size),F=t.outlineColor.multiply(C),I=T(t.bitset,M.bitset.overrideOutlineColor),O=t.sdfDecodeCoeff.multiply(w);return{glPosition:N,color:v,textureUV:D,outlineColor:F,outlineSize:g,distanceToPx:O,isSDF:r,overrideOutlineColor:I,...this.maybeRunHittest(t,e,{pos:t.pos,size:w,sizeCorrection:V,isMapAligned:y,vvRotationMat3:_,placementMat3:z,outlineSize:g,distanceToPx:O,isSDF:r})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){return y(h(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i))}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getViewScreenMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getColor(t,e){return y(c(e.isSDF,new u(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return x(this.mosaicInfo.texture,t).multiply(e.color)}_getSDFColor(t,e){const i=x(this.mosaicInfo.texture,t),o=new u(.5).subtract(q(i)).multiply(e.distanceToPx).multiply(U),s=v(new u(.5).subtract(o),new u(0),new u(1)),l=e.color.multiply(s);let r=e.outlineSize;this.highlight&&(r=n(r,e.overrideOutlineColor.multiply(4)));const a=r.multiply(.5),p=f(o).subtract(a),d=v(new u(.5).subtract(p),new u(0),new u(1)),m=V(e.outlineColor,e.color,e.overrideOutlineColor).multiply(d);return new u(1).subtract(m.a).multiply(l).add(m)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:l}=this.hittestRequest,r=s.subtract(l),{viewMat3:p,tileMat3:n}=this.view,u=p.multiply(n).multiply(new a(i.pos,1)).xy,d=i.size.multiply(.5);return w(u,o).subtract(d).add(r)}_hittestMarker(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,i),r=this.hittestRequest.position,a=this.hittestRequest.distance,p=N(r,o,s,l);return y(S(p,a),p,this._hittestSamples(o,s,l,t,e,i))}computeHittestTriangle(t,e,i){const{pos:o,sizeCorrection:s,isMapAligned:l}=i,r=new a(t.offset.multiply(s),0),p=new a(e.offsetNextVertex1.multiply(s),0),n=new a(e.offsetNextVertex2.multiply(s),0),{viewMat3:u,tileMat3:d}=this.view,m=u.multiply(d).multiply(new a(o,1)),y=this._getViewScreenMatrix(l).multiply(i.vvRotationMat3).multiply(i.placementMat3);return{pos0:m.add(y.multiply(r)).xy,pos1:m.add(y.multiply(p)).xy,pos2:m.add(y.multiply(n)).xy}}_hittestSamples(t,e,i,o,s,l){const{outlineSize:r,isSDF:a,distanceToPx:p}=l,n=this.hittestRequest.position,d=this.hittestRequest.distance,y=D(n.add(new b(g(d),g(d))),t,e,i),h=D(n.add(new b(0,g(d))),t,e,i),c=D(n.add(new b(d,g(d))),t,e,i),x=D(n.add(new b(g(d),0)),t,e,i),v=D(n,t,e,i),f=D(n.add(new b(d,0)),t,e,i),V=D(n.add(new b(g(d),d)),t,e,i),w=D(n.add(new b(0,d)),t,e,i),S=D(n.add(new b(d,d)),t,e,i),M=o.textureUV.divide(this.mosaicInfo.size),z=s.textureUVNextVertex1.divide(this.mosaicInfo.size),_=s.textureUVNextVertex2.divide(this.mosaicInfo.size),R={color:new m(1),outlineColor:new m(1),overrideOutlineColor:new u(1),outlineSize:r,distanceToPx:p,isSDF:a};let j=new u(0);return j=j.add(F(y).multiply(this._getColor($(y,M,z,_),R).a)),j=j.add(F(h).multiply(this._getColor($(h,M,z,_),R).a)),j=j.add(F(c).multiply(this._getColor($(c,M,z,_),R).a)),j=j.add(F(x).multiply(this._getColor($(x,M,z,_),R).a)),j=j.add(F(v).multiply(this._getColor($(v,M,z,_),R).a)),j=j.add(F(f).multiply(this._getColor($(f,M,z,_),R).a)),j=j.add(F(V).multiply(this._getColor($(V,M,z,_),R).a)),j=j.add(F(w).multiply(this._getColor($(w,M,z,_),R).a)),j=j.add(F(S).multiply(this._getColor($(S,M,z,_),R).a)),C(j,new u(.05)).multiply(I(this.hittestRequest))}}t([o(A)],et.prototype,"visualVariableColor",void 0),t([o(P)],et.prototype,"visualVariableOpacity",void 0),t([o(H)],et.prototype,"visualVariableRotation",void 0),t([o(G)],et.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(L)],et.prototype,"visualVariableSizeScaleStops",void 0),t([o(B)],et.prototype,"visualVariableSizeStops",void 0),t([o(E)],et.prototype,"visualVariableSizeUnitValue",void 0),t([s(O)],et.prototype,"mosaicInfo",void 0),t([e(0,l(X)),e(1,l(Y))],et.prototype,"vertex",null),t([e(0,l(Z))],et.prototype,"fragment",null);export{Z as MarkerFragmentInput,et as MarkerShader,X as MarkerVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{maxHighlightReasons as i}from"../../../definitions.js";import{GraphShaderModule as e,FragmentOutput as o,location as s,define as r,option as h,uniform as l,VertexInput as n,ComputeVertexInput as d,FragmentInput as g}from"../../GraphShaderModule.js";import{Float as p,float as a,step as u,Vec4 as m,ifElse as c,greaterThan as y,Vec3 as w,Vec2 as f}from"../../graph/glsl.js";import{EntityStorage as v}from"./EntityStorage.js";import{ShaderHighlight as b}from"./ShaderHighlight.js";import{ShaderHittest as H}from"./ShaderHittest.js";import{getFilterBit as _,getHighlightBit as j,getBit as x,uvToClip as R}from"./utils.js";import{ViewInfo as k}from"./ViewInfo.js";class S extends n{}t([s(0,w)],S.prototype,"id",void 0),t([s(1,p)],S.prototype,"bitset",void 0),t([s(2,f)],S.prototype,"pos",void 0);class q extends d{}t([s(14,f)],q.prototype,"nextPos1",void 0),t([s(15,f)],q.prototype,"nextPos2",void 0);class P extends g{}class B extends e{clip(t,i){let e=new p(0);const o=this.storage.getFilterFlags(t);if(e=e.add(a(2).multiply(a(1).subtract(_(o,0)))),this.inside?e=e.add(a(2).multiply(a(1).subtract(_(o,1)))):this.outside?e=e.add(a(2).multiply(_(o,1))):this.highlight&&(e=e.add(a(2).multiply(a(1).subtract(this._checkHighlight(o))))),null!=i){const t=new p(1).subtract(u(i.x,this.view.currentZoom)),o=u(i.y,this.view.currentZoom);e=e.add(new p(2).multiply(t.add(o)))}return e}getFragmentOutput(t,i,e=new p(1/255)){const s=new o;return s.fragColor=this._maybeWriteHittest(i)??this._maybeHighlight(t,e)??t,s}_maybeHighlight(t,i){return this.highlight?new m(t.rgb,u(i,t.a)):null}_checkHighlight(t){let e=this._checkHighlightBit(t,0);for(let o=1;o<i;o++)e=e.add(this._checkHighlightBit(t,o));return u(new p(.1),e.add(this.highlight.highlightAll))}_checkHighlightBit(t,i){return j(t,i).multiply(x(this.highlight.activeReasons,i))}maybeRunHittest(t,i,e){if(null==this.hittestRequest)return null;const o=this.hittest(t,i,e);let s=c(y(o,this.hittestRequest.distance),new p(2),new p(0));const r=this.storage.getAttributeDataCoords(t.id),h=R(r);s=s.add(this.clip(t.id,t.zoomRange));const l=new m(new p(1/255),0,0,0);return{glPointSize:new p(1),glPosition:new m(h,s,1),color:l}}_maybeWriteHittest(t){return null!=this.hittestRequest?t.color:null}}t([r],B.prototype,"inside",void 0),t([r],B.prototype,"outside",void 0),t([h(b)],B.prototype,"highlight",void 0),t([l(v)],B.prototype,"storage",void 0),t([l(k)],B.prototype,"view",void 0),t([h(H)],B.prototype,"hittestRequest",void 0);export{B as AFeatureShader,q as BaseHittestVertexInput,P as FeatureFragmentInput,S as FeatureVertexInput};
2
+ import{__decorate as t}from"tslib";import{maxHighlightReasons as i}from"../../../definitions.js";import{GraphShaderModule as e,FragmentOutput as s,location as o,define as r,option as h,uniform as l,VertexInput as n,ComputeVertexInput as p,FragmentInput as u}from"../../GraphShaderModule.js";import{Float as d,float as g,step as a,Vec4 as m,Vec3 as c,ifElse as y,greaterThan as w,equal as v,Vec2 as f}from"../../graph/glsl.js";import{EntityStorage as b}from"./EntityStorage.js";import{isRectHittest as H,hittestScreenRect as x}from"./hittestUtils.js";import{ShaderHighlight as j}from"./ShaderHighlight.js";import{ShaderHittest as R}from"./ShaderHittest.js";import{getFilterBit as _,getHighlightBit as q,getBit as P,uvToClip as k}from"./utils.js";import{ViewInfo as S}from"./ViewInfo.js";class B extends n{}t([o(0,c)],B.prototype,"id",void 0),t([o(1,d)],B.prototype,"bitset",void 0),t([o(2,f)],B.prototype,"pos",void 0);class F extends p{}t([o(14,f)],F.prototype,"nextPos1",void 0),t([o(15,f)],F.prototype,"nextPos2",void 0);class M extends u{}class z extends e{clip(t,i){let e=new d(0);const s=this.storage.getFilterFlags(t);if(e=e.add(g(2).multiply(g(1).subtract(_(s,0)))),this.inside?e=e.add(g(2).multiply(g(1).subtract(_(s,1)))):this.outside?e=e.add(g(2).multiply(_(s,1))):this.highlight&&(e=e.add(g(2).multiply(g(1).subtract(this._checkHighlight(s))))),null!=i){const t=new d(1).subtract(a(i.x,this.view.currentZoom)),s=a(i.y,this.view.currentZoom);e=e.add(new d(2).multiply(t.add(s)))}return e}getFragmentOutput(t,i,e=new d(1/255)){const o=new s;return o.fragColor=this._maybeWriteHittest(i)??this._maybeHighlight(t,e)??t,o}_maybeHighlight(t,i){return this.highlight?new m(t.rgb,a(i,t.a)):null}_checkHighlight(t){let e=this._checkHighlightBit(t,0);for(let s=1;s<i;s++)e=e.add(this._checkHighlightBit(t,s));return a(new d(.1),e.add(this.highlight.highlightAll))}_checkHighlightBit(t,i){return q(t,i).multiply(P(this.highlight.activeReasons,i))}computeHittestTriangle(t,i,e){const{viewMat3:s,tileMat3:o}=this.view,r=s.multiply(o),{nextPos1:h,nextPos2:l}=i;return{pos0:r.multiply(new c(t.pos,1)).xy,pos1:r.multiply(new c(h,1)).xy,pos2:r.multiply(new c(l,1)).xy}}maybeRunHittest(t,i,e){if(null==this.hittestRequest)return null;const s=H(this.hittestRequest),o=y(s,()=>{const{pos0:s,pos1:o,pos2:r}=this.computeHittestTriangle(t,i,e),{tlbr:h}=this.hittestRequest;return x(s,o,r,h)},()=>{const s=this.hittest(t,i,e);return y(w(s,this.hittestRequest.distance),new d(0),new d(1))});let r=y(v(o,new d(1)),new d(0),new d(2));const h=this.storage.getAttributeDataCoords(t.id),l=k(h);r=r.add(this.clip(t.id,t.zoomRange));const n=new m(new d(1/255),0,0,0);return{glPointSize:new d(1),glPosition:new m(l,r,1),color:n}}_maybeWriteHittest(t){return null!=this.hittestRequest?t.color:null}}t([r],z.prototype,"inside",void 0),t([r],z.prototype,"outside",void 0),t([h(j)],z.prototype,"highlight",void 0),t([l(b)],z.prototype,"storage",void 0),t([l(S)],z.prototype,"view",void 0),t([h(R)],z.prototype,"hittestRequest",void 0);export{z as AFeatureShader,F as BaseHittestVertexInput,M as FeatureFragmentInput,B as FeatureVertexInput};