@arcgis/core 4.34.0-next.58 → 4.34.0-next.59

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 (229) hide show
  1. package/Basemap.js +1 -1
  2. package/LICENSE.md +19 -0
  3. package/README.md +2 -18
  4. package/applications/KnowledgeStudio/reshape.d.ts +5 -0
  5. package/applications/KnowledgeStudio/reshape.js +5 -0
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{26975e5b3fb7f2ed45a4.js → 03fe4164abd12abc7921.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{893e5eb5c028c4704317.js → 0427f66b56ec6601deb0.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0cb2f7172190babb4139.js +1 -0
  10. package/assets/esri/core/workers/chunks/0e28cb5d8d89ae29cdd0.js +1 -0
  11. package/assets/esri/core/workers/chunks/{1776ef96c9f4636f8838.js → 138c11b5eca621e51396.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{57c438bb0da6410df525.js → 1bf17c6548ac4cd5a166.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{043bb97e38e3a54aa2ab.js → 1ed7a8f4a0058d3b69ef.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{827bebb4bcdde23adc91.js → 251b7f2e295ce191eb62.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{02a31483e09652a1a1a2.js → 2b7f9a57a2cfbc108673.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{7c86af4f60cea383ed96.js → 39a1f361bb69073af765.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{327b0da744426ce40e60.js → 3a7ac10a6614fe5745f7.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{8c79945909069733558f.js → 4094cebc4b92c52f4e27.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{82de1b50ae286f1e6c44.js → 451761c7bd2da530e1d0.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{cc748d4f4adb9c584aa4.js → 45aeff2f751f124f8e53.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{d20af70b23f175fb5442.js → 48b9ba825856a0c843ff.js} +1 -1
  22. package/assets/esri/core/workers/chunks/4dee2f05508e90410f13.js +1 -0
  23. package/assets/esri/core/workers/chunks/{d630fc3acd2552c98dc0.js → 547af4ffbeeccba9d187.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{ff14b632f147cb68ed59.js → 58422c616a824ab49218.js} +1 -1
  25. package/assets/esri/core/workers/chunks/589a0e244ef5f1b84ab6.js +1 -0
  26. package/assets/esri/core/workers/chunks/{2c7e7895c4dda176220e.js → 5d4b24c864ebb68ae61e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{a1ff4c252012d5026133.js → 65eb183b5d001dfc42c8.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{f1b6d6ee03635d985c3e.js → 6688efc71d9d8f4d2559.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{d5faf3ddf9a39de826be.js → 672c04d48aa51f16e9b7.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{17e203e4680c07bd02f1.js → 7aa7aff6d42be7c2d1d2.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{549e073fe276363a9896.js → 7db105f6b688b6da8106.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{945c5a477940ebd23a4c.js → 7f0c78bcba0aed3c4eff.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{3eb792863a789b97ec58.js → 831a69e5a87e92830fbe.js} +1 -1
  34. package/assets/esri/core/workers/chunks/83dfaa6e3bd58d544f35.js +1 -0
  35. package/assets/esri/core/workers/chunks/8bbae8ac586e5c0819d2.js +1 -0
  36. package/assets/esri/core/workers/chunks/{9275313e0f1f521b2658.js → 9325000c87295c473291.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{944d1608f935516951c4.js → 94b9948ec628187c19fc.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{757717416d909059df2f.js → 981275b6f008431c983a.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{c71dac67f95d694bf67e.js → 9f4e23bae621ff3ecea3.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{989251f5e0d6a08b1afa.js → a17ed7ce97e69466d730.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{319fe6a02ec630a827ea.js → a7ea2e3895046e566bc6.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{5cfec58c7c31e6d8c6ea.js → abe60d92e0219ee97036.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{4193691ca076948f4f90.js → b53008c1461dd6bacc63.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{1d234c057a6671acc59f.js → b605dfdfed8ff8eda4f3.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{0fb2dcbd54175e75d94d.js → b68b54be3d67595a9446.js} +4 -6
  46. package/assets/esri/core/workers/chunks/{7eda1c400658b6a99be8.js → ba0c7339fa19cc7cbde7.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{724de82d101eb59c2834.js → bd451668c4ce9f7d7128.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{91ede8c62a7b1e8b8023.js → be06c8a58c217a17451b.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{08c0c016787caa169492.js → c24214666d10cb648428.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{a3a23a56df4e5ee86bb2.js → c5fe356fc5b8b7be0d31.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{64fab4e1e28c06c83403.js → c779c8b98e07fa881c1d.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{4a0257c449f31bdadf26.js → cef9ff811221a7c3812c.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{b1982490762972ae023d.js → d0296368ae143de4d5ce.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{3d5954478864a975e65e.js → d07d3b0e06f12aee4a8b.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{e1472dbf0795d737d6f8.js → d2371f5034b2a32e2523.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{2f65081bfedeab44d6cb.js → d35cadfb78ac9803069b.js} +1 -1
  57. package/assets/esri/core/workers/chunks/d7ce68667bb355ef8e5d.js +1 -0
  58. package/assets/esri/core/workers/chunks/{8c2fcfcfbb6b70f7bada.js → d823277612f971a9c2f0.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{c4ff5c78fc8668af9c05.js → d91b80aa4f847c2e2a33.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{c4ceb267d4004d8da8cc.js → e0bbfbe1ed39c82f1bd4.js} +1 -1
  61. package/assets/esri/core/workers/chunks/e58c5c8639aa837c84d1.js +1 -0
  62. package/assets/esri/core/workers/chunks/{a24762e976c1459b12de.js → e689a4849f5af3f2f641.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{5787101b2b814c5d2439.js → eacc7fccdc3fb670ac8f.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{0df1f56df6d47dfbb6ea.js → eada3483116a5ea8baed.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{47682247910271077333.js → ee78a38a0cacb19b2fd4.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{f4061587ff5789fa4e1f.js → f594df2f5ce6ca41a254.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{d7b3e81cc313fd0a33b0.js → f5c821ca2911a5103c9a.js} +1 -1
  68. package/assets/esri/core/workers/chunks/f711aeba1a2c184ddb43.js +1 -0
  69. package/assets/esri/core/workers/chunks/fdae43a97537093e4b97.js +1 -0
  70. package/chunks/BloomComposition.glsl.js +36 -18
  71. package/chunks/ComponentShader.glsl.js +1 -1
  72. package/chunks/CompositeGeographicTransformation.js +1 -1
  73. package/chunks/DefaultMaterial.glsl.js +1 -1
  74. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  75. package/chunks/GeographicTransformation.js +1 -1
  76. package/chunks/MultiPathImpl.js +1 -1
  77. package/chunks/OperatorGeodesicBuffer.js +1 -1
  78. package/chunks/OperatorGeodeticArea.js +1 -1
  79. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  80. package/chunks/OperatorGeodeticLength.js +1 -1
  81. package/chunks/OperatorProximityGeodesic.js +1 -1
  82. package/chunks/OperatorShapePreservingLength.js +1 -1
  83. package/chunks/OperatorShapePreservingProject.js +1 -1
  84. package/chunks/Path.glsl.js +1 -1
  85. package/chunks/Point2D.js +1 -1
  86. package/chunks/ProjectionTransformation.js +1 -1
  87. package/chunks/RealisticTree.glsl.js +1 -1
  88. package/chunks/SpatialReference.js +1 -1
  89. package/chunks/UnitFactory.js +1 -1
  90. package/chunks/sphere.js +1 -1
  91. package/chunks/vec42.js +1 -1
  92. package/config.js +1 -1
  93. package/copyright.txt +2 -20
  94. package/core/accessorSupport/layerContainerType.js +1 -1
  95. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  96. package/core/libs/gl-matrix-2/math/vec4.js +1 -1
  97. package/core/quantityFormatUtils.js +1 -1
  98. package/core/unitFormatUtils.js +1 -1
  99. package/editing/geometry/coordUtils.js +5 -0
  100. package/editing/geometry/lineUtils.js +5 -0
  101. package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
  102. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  103. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  104. package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
  105. package/editing/sharedTemplates/executor/builders/support/shapeUtils.js +1 -1
  106. package/geometry/coordinateFormatter.js +1 -1
  107. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  108. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  109. package/geometry/operators/gx/operatorOffset.js +1 -1
  110. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  111. package/geometry/operators/support/apiConverter.js +1 -1
  112. package/geometry/operators/support/initNoPeFactory.js +1 -1
  113. package/geometry/operators/support/jsonConverter.js +1 -1
  114. package/geometry/support/sphere.js +1 -1
  115. package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
  116. package/graphic/LinkChartGraphicOrigin.js +5 -0
  117. package/graphic/isLinkChartGraphicOrigin.js +5 -0
  118. package/interfaces.d.ts +129 -10
  119. package/kernel.js +1 -1
  120. package/layers/FeatureLayer.js +1 -1
  121. package/layers/GroundLayer.js +1 -1
  122. package/layers/ParquetLayer.js +1 -1
  123. package/layers/catalog/catalogUtils.js +1 -1
  124. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  125. package/layers/knowledgeGraph/nodeMovementUtils.js +5 -0
  126. package/layers/mixins/ImageryTileMixin.js +1 -1
  127. package/layers/mixins/operationalLayers.js +1 -1
  128. package/layers/support/RasterStorageInfo.js +1 -1
  129. package/layers/support/Sublayer.js +1 -1
  130. package/layers/support/layersCreator.js +1 -1
  131. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  132. package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
  133. package/layers/support/rasterFunctions/BaseRasterFunction.js +1 -1
  134. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  135. package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
  136. package/package.json +1 -1
  137. package/portal/schemas/definitions.js +1 -1
  138. package/renderers/support/RasterSymbolizer.js +1 -1
  139. package/support/basemapUtils.js +1 -1
  140. package/support/revision.js +1 -1
  141. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  142. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  143. package/views/3d/camera/constraintUtils/distance.js +1 -1
  144. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  145. package/views/3d/layers/I3SMeshView3D.js +1 -1
  146. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  147. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  148. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  149. package/views/3d/layers/graphics/ElevationContext.js +1 -1
  150. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  151. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  152. package/views/3d/layers/graphics/pointUtils.js +1 -1
  153. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  154. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  155. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  156. package/views/3d/layers/support/FlowTileTree3DDebugger.js +1 -1
  157. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  158. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  159. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  160. package/views/3d/state/utils/navigationUtils.js +1 -1
  161. package/views/3d/support/CombinedElevationProvider.js +1 -1
  162. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  163. package/views/3d/terrain/OverlayManager.js +1 -1
  164. package/views/3d/terrain/SphericalPatch.js +1 -1
  165. package/views/3d/terrain/TerrainSurface.js +1 -1
  166. package/views/3d/terrain/Tile.js +1 -1
  167. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  168. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +2 -4
  169. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  170. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  171. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  172. package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +5 -0
  173. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  174. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  175. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  176. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  177. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  178. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  179. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  180. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  181. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  182. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  183. package/views/3d/webgl-engine/lib/octreeUtils.js +1 -1
  184. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  185. package/views/LinkChartView.js +1 -1
  186. package/views/draw/DrawOperation.js +1 -1
  187. package/views/draw/support/GraphicMover.js +1 -1
  188. package/views/draw/support/HighlightHelper.js +1 -1
  189. package/views/draw/support/Reshape.js +1 -1
  190. package/views/draw/support/drawUtils.js +1 -1
  191. package/views/interactive/Tooltip.js +1 -1
  192. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  193. package/views/interactive/sketch/SketchLabelOptions.js +1 -1
  194. package/views/interactive/sketch/SketchOptions.js +1 -1
  195. package/views/interactive/sketch/SketchTooltipOptions.js +1 -1
  196. package/views/interactive/sketch/SketchTooltipVisibleElements.js +1 -1
  197. package/views/interactive/sketch/SketchValueOptions.js +1 -1
  198. package/views/interactive/sketch/Units.js +1 -1
  199. package/views/interactive/sketch/constraints.js +1 -1
  200. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  201. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  202. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  203. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  204. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  205. package/views/interactive/tooltip/fields/fields.js +1 -1
  206. package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
  207. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  208. package/views/support/angularMeasurementUtils.js +1 -1
  209. package/webdoc/support/writeUtils.js +1 -1
  210. package/webscene/spec-certification/api.js +1 -1
  211. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  212. package/widgets/Editor/support/splitFeatureUtils.js +5 -0
  213. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  214. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  215. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  216. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  217. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  218. package/widgets/OrientedImageryViewer.js +1 -1
  219. package/EULA.pdf +0 -0
  220. package/assets/esri/core/workers/chunks/00ee6f84119bc55a222f.js +0 -1
  221. package/assets/esri/core/workers/chunks/0569698a3e4eaf2bac8e.js +0 -1
  222. package/assets/esri/core/workers/chunks/0e4976f92b66793137c4.js +0 -1
  223. package/assets/esri/core/workers/chunks/171ce8c64f322cd5d6d1.js +0 -1
  224. package/assets/esri/core/workers/chunks/1ae15163af8875148fb8.js +0 -1
  225. package/assets/esri/core/workers/chunks/373c9e17e2834dfc1839.js +0 -1
  226. package/assets/esri/core/workers/chunks/55bb794bcdd9cc788322.js +0 -1
  227. package/assets/esri/core/workers/chunks/6acffacbb4a03af52e3b.js +0 -1
  228. package/assets/esri/core/workers/chunks/b457b7dd907f06278bee.js +0 -1
  229. package/assets/esri/core/workers/chunks/e7ccf067bea8f4766424.js +0 -1
package/interfaces.d.ts CHANGED
@@ -2859,6 +2859,134 @@ declare namespace __esri {
2859
2859
 
2860
2860
  export const layerInternalAccessUtils: layerInternalAccessUtils;
2861
2861
 
2862
+ /**
2863
+ * Note: reserved for internal use only, this is not part of the stable public API.
2864
+ *
2865
+ * A utility method for getting a Reshape instance with support for connected reshaping.
2866
+ */
2867
+ interface reshape {
2868
+ /**
2869
+ * Note: reserved for internal use only, this is not part of the stable public API.
2870
+ *
2871
+ * Returns a reshape operation.
2872
+ *
2873
+ * @param properties The constructor properties.
2874
+ */
2875
+ getReshape(properties: ConstructProperties): Promise<Reshape>;
2876
+ /**
2877
+ * Note: reserved for internal use only, this is not part of the stable public API.
2878
+ *
2879
+ * Registers a callback to be called when the node movement reshape operation stops.
2880
+ *
2881
+ * @param targetView The LinkChartView in which the node movement reshape operation is taking place.
2882
+ * @param movementStopCallback The callback function to be called when the node movement stops.
2883
+ */
2884
+ onNodeMovementStop(targetView: LinkChartView, movementStopCallback: MovementStopCallback): IHandle;
2885
+ /**
2886
+ * Note: reserved for internal use only, this is not part of the stable public API.
2887
+ *
2888
+ * Starts a node movement reshape operation in the LinkChartView.
2889
+ *
2890
+ * @param targetEntityId The ID of the entity to be moved.
2891
+ * @param targetEntityType The type of the entity to be moved.
2892
+ * @param targetView The LinkChartView in which the node movement reshape operation will take place.
2893
+ * @param options Optional parameters.
2894
+ */
2895
+ studioStartNodeMovement(targetEntityId: string, targetEntityType: string, targetView: LinkChartView, options?: any): Promise<StudioNodeMovementReturnType>;
2896
+ }
2897
+
2898
+ export const reshape: reshape;
2899
+ export type CancelNodeMovement = () => void;
2900
+ export type CommitNodeMovement = () => Promise<Point>;
2901
+
2902
+ /**
2903
+ * Note: reserved for internal use only, this is not part of the stable public API.
2904
+ *
2905
+ * An object that provides "connected reshaping" functionality for a feature or vertex being reshaped.
2906
+ */
2907
+ export interface ConnectedReshapeProvider {
2908
+ updating: boolean;
2909
+ translate: Translate;
2910
+ }
2911
+
2912
+ export interface ConnectedReshapeProviderFactory {
2913
+ getFeatureReshapeProvider: GetFeatureReshapeProvider;
2914
+ getVertexReshapeProvider: GetVertexReshapeProvider;
2915
+ }
2916
+
2917
+ export interface ConstructProperties {
2918
+ connectedReshapeProviders: ConnectedReshapeProviderFactory[] | nullish;
2919
+ graphic: Graphic;
2920
+ layer: GraphicsLayer;
2921
+ view: MapView;
2922
+ }
2923
+
2924
+ export type Destroy = () => void;
2925
+ export type GetFeatureReshapeProvider = (features: ReshapeFeature[]) => ConnectedReshapeProvider | nullish;
2926
+ export type GetVertexReshapeProvider = (
2927
+ feature: ReshapeFeature,
2928
+ vertices: VertexInfo[],
2929
+ ) => ConnectedReshapeProvider | nullish;
2930
+
2931
+ /**
2932
+ * Note: reserved for internal use only, this is not part of the stable public API.
2933
+ *
2934
+ * Represents a feature that has been modified by a ConnectedReshapeProvider due to being connected (or otherwise spatially related to) the feature(s) or vertex(es) being reshaped.
2935
+ */
2936
+ export interface ModifiedFeature {
2937
+ graphic: Graphic;
2938
+ layer: | GeoJSONLayer
2939
+ | FeatureLayer
2940
+ | OrientedImageryLayer
2941
+ | SceneLayer
2942
+ | SubtypeSublayer
2943
+ | GraphicsLayer
2944
+ | KnowledgeGraphSublayer;
2945
+ originalGraphic: Graphic;
2946
+ uniqueId: string | number;
2947
+ }
2948
+
2949
+ export type MovementStopCallback = (event: MovementStopCallbackEvent) => void;
2950
+
2951
+ export interface Reshape {
2952
+ connectedReshapeProviders: ConnectedReshapeProviderFactory[] | nullish;
2953
+ graphic: Graphic;
2954
+ layer: GraphicsLayer;
2955
+ view: MapView;
2956
+ destroy: Destroy;
2957
+ }
2958
+
2959
+ export interface ReshapeFeature {
2960
+ graphic: Graphic;
2961
+ layer: | GeoJSONLayer
2962
+ | FeatureLayer
2963
+ | OrientedImageryLayer
2964
+ | SceneLayer
2965
+ | SubtypeSublayer
2966
+ | GraphicsLayer
2967
+ | KnowledgeGraphSublayer
2968
+ | nullish;
2969
+ }
2970
+
2971
+ export interface StudioNodeMovementReturnType {
2972
+ commitNodeMovement: CommitNodeMovement;
2973
+ cancelNodeMovement: CancelNodeMovement;
2974
+ }
2975
+
2976
+ export type StudioStartNodeMovementOptions = () => void;
2977
+ export type Translate = (deltaX: number, deltaY: number, deltaZ: number | nullish) => ModifiedFeature[];
2978
+
2979
+ export interface VertexInfo {
2980
+ pathIndex: number;
2981
+ vertexIndex: number;
2982
+ }
2983
+
2984
+ export interface MovementStopCallbackEvent {
2985
+ mover: Graphic;
2986
+ dx: number;
2987
+ dy: number;
2988
+ }
2989
+
2862
2990
  interface resourceSerializationUtils {
2863
2991
  fetchAndConvertSerializedKnowledgeIdMap(idCollectionsUrl: string, generateAllSublayers?: boolean): Promise<InclusionModeDefinitionOptimizedGeometry>;
2864
2992
  fetchAndConvertSerializedLinkChart(serializedResourceURLs: SerializedResourceURLs): Promise<InclusionModeDefinitionOptimizedGeometry>;
@@ -14743,7 +14871,7 @@ declare namespace __esri {
14743
14871
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-graphic-KnowledgeGraphGraphicOrigin.html#type Read more...}
14744
14872
  */
14745
14873
  readonly type: "knowledge-graph";
14746
- constructor(sublayer: KnowledgeGraphSublayer);
14874
+ constructor(layer: KnowledgeGraphLayer, sublayer: KnowledgeGraphSublayer);
14747
14875
  }
14748
14876
 
14749
14877
  export class MapImageGraphicOrigin extends GraphicOrigin {
@@ -101015,15 +101143,6 @@ declare namespace __esri {
101015
101143
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#goTo Read more...}
101016
101144
  */
101017
101145
  goTo(target: GoToTarget3D, options?: GoToOptions3D): Promise<any>;
101018
- /**
101019
- * Indicates whether there is an event listener on the instance that matches
101020
- * the provided event name.
101021
- *
101022
- * @param type The name of the event.
101023
- *
101024
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#hasEventListener Read more...}
101025
- */
101026
- hasEventListener(type: string): boolean;
101027
101146
  /**
101028
101147
  * Returns {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#HitTestResult hit test results} from each layer that intersects the specified screen coordinates.
101029
101148
  *
package/kernel.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.58",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
5
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.59",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import r from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import o from"../core/Collection.js";import s from"../core/Error.js";import{clone as a}from"../core/lang.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as u}from"../core/object.js";import{debounce as d,throwIfAbortError as y,whenOrAbort as c}from"../core/promiseUtils.js";import{sqlAnd as m}from"../core/sql.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as f}from"../core/accessorSupport/decorators/cast.js";import{reader as b}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{writer as w}from"../core/accessorSupport/decorators/writer.js";import{excludeTables as v}from"../core/accessorSupport/layerContainerType.js";import T from"../form/FormTemplate.js";import j from"../geometry/SpatialReference.js";import F from"../graphic/FeatureGraphicOrigin.js";import S from"./Layer.js";import{MemorySource as I}from"./graphics/sources/MemorySource.js";import{APIKeyMixin as E}from"./mixins/APIKeyMixin.js";import{ArcGISService as L}from"./mixins/ArcGISService.js";import{BlendLayer as D}from"./mixins/BlendLayer.js";import{CustomParametersMixin as _}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as x}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as C}from"./mixins/EditBusLayer.js";import{FeatureEffectLayer as P}from"./mixins/FeatureEffectLayer.js";import{FeatureLayerBase as O}from"./mixins/FeatureLayerBase.js";import{FeatureReductionLayer as q}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as M}from"./mixins/OperationalLayer.js";import{OrderedLayer as A}from"./mixins/OrderedLayer.js";import{PortalLayer as R}from"./mixins/PortalLayer.js";import{PublishableLayer as Q}from"./mixins/PublishableLayer.js";import{RefreshableLayer as V}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as U}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as B}from"./mixins/TemporalLayer.js";import{TrackableLayer as G}from"./mixins/TrackableLayer.js";import{titleFromUrlAndName as N,parse as $,cleanTitle as J}from"./support/arcgisLayerUrl.js";import{attributeTableTemplate as W,id as Z,labelsVisible as H,opacityDrawingInfo as z,legendEnabled as k,listMode as K,popupEnabled as X,screenSizePerspectiveEnabled as Y}from"./support/commonProperties.js";import{ensureLayerCredential as ee,computeEffectiveEditingEnabled as te,readGlobalIdField as re,readObjectIdField as ie,createDefaultRenderer as oe,addAttachment as se,updateAttachment as ae,applyEdits as ne,uploadAssets as le,createQuery as pe,deleteAttachments as ue,fetchRecomputedExtents as de,getFeatureType as ye,getFieldDomain as ce,queryAttachments as me,queryObjectIds as he,queryFeatureCount as fe,queryExtent as be,queryRelatedFeatures as ge,queryRelatedFeaturesCount as we,validateBinsQuery as ve,hasDataChanged as Te,geometryTypeKebabDict as je}from"./support/featureLayerUtils.js";import Fe from"./support/FeatureTemplate.js";import Se from"./support/FeatureType.js";import{defineFieldProperties as Ie}from"./support/fieldProperties.js";import{fixRendererFields as Ee,fixTimeInfoFields as Le}from"./support/fieldUtils.js";import De from"./support/LabelClass.js";import{reader as _e}from"./support/labelingInfo.js";import{getFeatureLayerCapabilities as xe}from"./support/serviceCapabilitiesUtils.js";import Ce from"./support/TimeInfo.js";import Pe from"./support/TitleCreator.js";import{serviceSupportsSpatialReference as Oe}from"./support/versionUtils.js";import{DataLayerSource as qe}from"./support/source/DataLayerSource.js";import{read as Me}from"../renderers/support/jsonUtils.js";import{loadStyleRenderer as Ae}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Re,rendererTypes as Qe}from"../renderers/support/typeUtils.js";import Ve from"../rest/support/FeatureSet.js";import Ue from"../rest/support/Query.js";import{isNumber as Be}from"../support/guards.js";import{createPopupTemplate as Ge}from"../support/popupUtils.js";import{symbolTypes as Ne}from"../symbols/support/typeUtils.js";import{opacityToTransparency as $e}from"../webdoc/support/opacityUtils.js";const Je="FeatureLayer";function We(e,t){return new s("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Ze(e){return e&&e instanceof o}const He=Ie();function ze(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let ke=class extends(O(q(P(Q(C(x(D(A(B(G(U(V(L(M(R(p(_(E(i(S)))))))))))))))))))){constructor(...e){super(...e),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new F(this),this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="ArcGISFeatureLayer",this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=j.WGS84,this.subtypeCode=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=d(async(e,t,r)=>{const{save:i,saveAs:o}=await import("./save/featureLayerUtils.js");switch(e){case 0:return i(this,t);case 1:return o(this,r,t)}})}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then(e=>this.initLayerProperties(e))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(y).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new s("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>ee(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return l(e),new Pe({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,fields:this.fields,displayField:this.displayField,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}readCapabilities(e,t){return t=t.layerDefinition||t,xe(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return te(this)}get featureTitleFields(){return[...this._titleCreator.requiredFields]}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&u(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return re(t.layerDefinition||t)}readObjectIdField(e,t){return ie(t.layerDefinition||t)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){Ee(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=Me(i,t,r)??void 0;return e||n.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return oe(t,r)}set source(e){const t=this._get("source");t!==e&&(Ze(t)&&this._resetMemorySource(t),Ze(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof o?new I({layer:this,items:e}):e:null}readSource(e,t){const r=Ve.fromJSON(t.featureSet);return new I({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e=e?.map(e=>Fe.fromJSON(e)),this._fixTemplates(e,i),this._fixTemplates(e,o),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition?.title;if(r){const e=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?N(this.url,r):r;let t=r;if(!t&&this.url){const e=$(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),J(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e?.map(e=>(e=Se.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,o),e))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const r=await se(this,e,t,Je);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const i=await ae(this,e,t,r,Je);return this.lastEditsEventDate=new Date,i}async applyEdits(e,t){return ne(this,e,t)}async uploadAssets(e,t){return le(this,e,t)}createPopupTemplate(e){return Ge(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await c(import("./graphics/sources/FeatureLayerSource.js"),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=pe(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=m(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){const r=await ue(this,e,t,Je);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return de(this,e,Je)}async getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}async getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getFeatureType(e){return ye(this.types,this.typeIdField,e)}getFieldDomain(e,t){return ce(this,e,t,this.getField(e)?.domain??null)}async queryAttachments(e,t){return me(this,e,t,Je)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Ue.from(e)??r.createQuery(),t);if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=r,o.origin=this.graphicOrigin;return i}async queryObjectIds(e,t){return await he(this,e,t,Je)}async queryFeatureCount(e,t){return fe(this,e,t,Je)}async queryExtent(e,t){return be(this,e,t,Je)}async queryRelatedFeatures(e,t){return ge(this,e,t,Je)}async queryRelatedFeaturesCount(e,t){return we(this,e,t,Je)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new s(Je,"Layer source does not support queryTopFeatures capability");const o=await import("../rest/support/TopFeaturesQuery.js"),a=await r.queryTopFeatures(o.default.from(e),t);if(a?.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryAttributeBins(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryAttributeBins)throw new s(Je,"Layer source does not support queryAttributeBins capability");ve(e,i,Je);const o=await import("../rest/support/AttributeBinsQuery.js"),a=await r.queryAttributeBins(o.default.from(e),t);if(a.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new s(Je,"Layer source does not support queryTopObjectIds capability");const o=await import("../rest/support/TopFeaturesQuery.js");return(await r.queryTopObjectIds(o.default.from(e),t)).filter(Be)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new s(Je,"Layer source does not support queryTopExtents capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopExtents(o.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new s(Je,"Layer source does not support queryFeatureCount capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopCount(o.default.from(e),t)}read(e,t){const r=e.featureCollection;if((r||"Feature Collection"===e.type)&&(this.resourceInfo=e),r){const{layers:e,showLegend:i}=r;1===e?.length&&(super.read(e[0],t),null!=i&&super.read({showLegend:i},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:o}=t;if(this.dynamicDataSource)return o?.push(We(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if(("web-map"===r||"web-scene"===r)&&"tables"!==i)return o?.push(We(this,`a table source can only be written to tables, not ${i}`)),null;if(this._hasMemorySource())return o?.push(We(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&("web-map"===r||"web-scene"===r)&&"tables"===i)return o?.push(We(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new s(Je,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||Oe(this,e))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map(e=>e.trim()).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";u("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_fetchFirstValidLayerId(e){return r(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(t)return this.applyPreferredHost(t),this.findFirstValidLayerId(t)})}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),Ee(this.renderer,this.fieldsIndex),Le(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),Ae(this,{origin:"service"})}async hasDataChanged(){return Te(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach(e=>{const r=e.prototype?.attributes;r&&t&&delete r[t]})}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new s("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new s("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach(e=>{e.layer=this,e.sourceLayer=this}),this.addHandles([e.on("after-add",e=>{e.item.layer=this,e.item.sourceLayer=this}),e.on("after-remove",e=>{e.item.layer=null,e.item.sourceLayer=null})],"fl-source")}_resetMemorySource(e){e.forEach(e=>{e.layer=null,e.sourceLayer=null}),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){return Array.isArray(e.layers)&&e.layers.length>0?e.layers[0].id:Array.isArray(e.tables)&&e.tables.length>0?e.tables[0].id:void 0}};e([h({clonable:!1,readOnly:!0})],ke.prototype,"_titleCreator",null),e([h(W)],ke.prototype,"attributeTableTemplate",void 0),e([b("service","capabilities")],ke.prototype,"readCapabilities",null),e([h({json:{origins:{"web-scene":{write:!1}},write:!0}})],ke.prototype,"charts",void 0),e([h({readOnly:!0})],ke.prototype,"createQueryVersion",null),e([h({json:{read:{source:"layerDefinition.copyrightText"}}})],ke.prototype,"copyright",void 0),e([h({json:{read:{source:"layerDefinition.displayField"}}})],ke.prototype,"displayField",void 0),e([h({types:Ne,readOnly:!0})],ke.prototype,"defaultSymbol",void 0),e([h({type:qe})],ke.prototype,"dynamicDataSource",void 0),e([h({type:Boolean})],ke.prototype,"editingEnabled",null),e([b(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],ke.prototype,"readEditingEnabled",null),e([b("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],ke.prototype,"readEditingEnabledFromWebMap",null),e([w(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],ke.prototype,"writeEditingEnabled",null),e([w("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],ke.prototype,"writeEditingEnabledToWebMap",null),e([h({readOnly:!0})],ke.prototype,"effectiveEditingEnabled",null),e([h({clonable:!1,readOnly:!0})],ke.prototype,"featureTitleFields",null),e([h({...He.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:ze}}}}})],ke.prototype,"fields",void 0),e([h(He.fieldsIndex)],ke.prototype,"fieldsIndex",void 0),e([h({type:T,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],ke.prototype,"formTemplate",void 0),e([h({json:{read:{source:"layerDefinition.extent"}}})],ke.prototype,"fullExtent",void 0),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:ze,writer(e,t,r){const i=e?je.toJSON(e):null;i&&u(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:je.read}}})],ke.prototype,"geometryType",void 0),e([h({readOnly:!0,clonable:!1})],ke.prototype,"graphicOrigin",void 0),e([h({json:{read:{source:"layerDefinition.hasM"}}})],ke.prototype,"hasM",void 0),e([h({json:{read:{source:"layerDefinition.hasZ"}}})],ke.prototype,"hasZ",void 0),e([h(Z)],ke.prototype,"id",void 0),e([h({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ke.prototype,"infoFor3D",void 0),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],ke.prototype,"isTable",void 0),e([b("service","isTable",["type","geometryType"]),b("isTable",["layerDefinition.type","layerDefinition.geometryType"])],ke.prototype,"readIsTable",null),e([w("web-map","isTable")],ke.prototype,"writeIsTable",null),e([h(H)],ke.prototype,"labelsVisible",void 0),e([h({type:[De],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:_e,write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:_e,write:{layerContainerTypes:v}}})],ke.prototype,"labelingInfo",void 0),e([h((()=>{const e=a(z);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){u(r,$e(e),t)}}},e})())],ke.prototype,"opacity",void 0),e([h(k)],ke.prototype,"legendEnabled",void 0),e([h({type:["show","hide"],json:(()=>{const e=a(K.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],ke.prototype,"listMode",void 0),e([b("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ke.prototype,"readGlobalIdField",null),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:ze}}}}})],ke.prototype,"objectIdField",void 0),e([b("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ke.prototype,"readObjectIdField",null),e([h({type:["ArcGISFeatureLayer"],json:{write:{target:"layerType",ignoreOrigin:!0,layerContainerTypes:v}}})],ke.prototype,"operationalLayerType",void 0),e([h(He.outFields)],ke.prototype,"outFields",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ke.prototype,"path",void 0),e([h(X)],ke.prototype,"popupEnabled",void 0),e([h({type:t,json:{name:"popupInfo",write:!0}})],ke.prototype,"popupTemplate",void 0),e([h({readOnly:!0})],ke.prototype,"defaultPopupTemplate",null),e([h({types:Qe,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:Re,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:v,overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema,layerContainerTypes:v})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema,layerContainerTypes:v})}}})],ke.prototype,"renderer",null),e([b("service","renderer",["drawingInfo.renderer","defaultSymbol"]),b("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],ke.prototype,"readRenderer",null),e([h()],ke.prototype,"resourceInfo",void 0),e([h((()=>{const e=a(Y);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],ke.prototype,"screenSizePerspectiveEnabled",void 0),e([h({clonable:!1})],ke.prototype,"source",null),e([f("source")],ke.prototype,"castSource",null),e([b("portal-item","source",["featureSet"]),b("web-map","source",["featureSet"])],ke.prototype,"readSource",null),e([h({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],ke.prototype,"spatialReference",void 0),e([h({type:Number})],ke.prototype,"subtypeCode",void 0),e([h({type:[Fe]})],ke.prototype,"templates",void 0),e([b("templates",["editFieldsInfo","creatorField","editorField","templates"])],ke.prototype,"readTemplates",null),e([h({type:Ce})],ke.prototype,"timeInfo",void 0),e([h()],ke.prototype,"title",void 0),e([b("service","title",["name"]),b("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],ke.prototype,"readTitle",null),e([b("web-map","title",["layerDefinition.name","title"])],ke.prototype,"readTitleFromWebMap",null),e([h({type:String})],ke.prototype,"sublayerTitleMode",void 0),e([h({json:{read:!1}})],ke.prototype,"type",void 0),e([h({type:String})],ke.prototype,"typeIdField",void 0),e([b("service","typeIdField"),b("typeIdField",["layerDefinition.typeIdField"])],ke.prototype,"readTypeIdField",null),e([h({type:[Se]})],ke.prototype,"types",void 0),e([b("service","types",["types"]),b("types",["layerDefinition.types"])],ke.prototype,"readTypes",null),e([h({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility",layerContainerTypes:v}}}}})],ke.prototype,"visible",void 0),e([b("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],ke.prototype,"readVisible",null),ke=e([g("esri.layers.FeatureLayer")],ke);export{ke as default};
5
+ import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import r from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import o from"../core/Collection.js";import s from"../core/Error.js";import{clone as a}from"../core/lang.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as u}from"../core/object.js";import{debounce as d,throwIfAbortError as y,whenOrAbort as c}from"../core/promiseUtils.js";import{sqlAnd as m}from"../core/sql.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as f}from"../core/accessorSupport/decorators/cast.js";import{reader as b}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{writer as w}from"../core/accessorSupport/decorators/writer.js";import{excludeTables as v}from"../core/accessorSupport/layerContainerType.js";import T from"../form/FormTemplate.js";import j from"../geometry/SpatialReference.js";import F from"../graphic/FeatureGraphicOrigin.js";import S from"./Layer.js";import{MemorySource as I}from"./graphics/sources/MemorySource.js";import{APIKeyMixin as E}from"./mixins/APIKeyMixin.js";import{ArcGISService as L}from"./mixins/ArcGISService.js";import{BlendLayer as D}from"./mixins/BlendLayer.js";import{CustomParametersMixin as _}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as x}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as C}from"./mixins/EditBusLayer.js";import{FeatureEffectLayer as P}from"./mixins/FeatureEffectLayer.js";import{FeatureLayerBase as O}from"./mixins/FeatureLayerBase.js";import{FeatureReductionLayer as q}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as M}from"./mixins/OperationalLayer.js";import{OrderedLayer as A}from"./mixins/OrderedLayer.js";import{PortalLayer as R}from"./mixins/PortalLayer.js";import{PublishableLayer as Q}from"./mixins/PublishableLayer.js";import{RefreshableLayer as V}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as U}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as B}from"./mixins/TemporalLayer.js";import{TrackableLayer as G}from"./mixins/TrackableLayer.js";import{titleFromUrlAndName as N,parse as $,cleanTitle as J}from"./support/arcgisLayerUrl.js";import{attributeTableTemplate as W,id as Z,labelsVisible as H,opacityDrawingInfo as z,legendEnabled as k,listMode as K,popupEnabled as X,screenSizePerspectiveEnabled as Y}from"./support/commonProperties.js";import{ensureLayerCredential as ee,computeEffectiveEditingEnabled as te,readGlobalIdField as re,readObjectIdField as ie,createDefaultRenderer as oe,addAttachment as se,updateAttachment as ae,applyEdits as ne,uploadAssets as le,createQuery as pe,deleteAttachments as ue,fetchRecomputedExtents as de,getFeatureType as ye,getFieldDomain as ce,queryAttachments as me,queryObjectIds as he,queryFeatureCount as fe,queryExtent as be,queryRelatedFeatures as ge,queryRelatedFeaturesCount as we,validateBinsQuery as ve,hasDataChanged as Te,geometryTypeKebabDict as je}from"./support/featureLayerUtils.js";import Fe from"./support/FeatureTemplate.js";import Se from"./support/FeatureType.js";import{defineFieldProperties as Ie}from"./support/fieldProperties.js";import{fixRendererFields as Ee,fixTimeInfoFields as Le}from"./support/fieldUtils.js";import De from"./support/LabelClass.js";import{reader as _e}from"./support/labelingInfo.js";import{getFeatureLayerCapabilities as xe}from"./support/serviceCapabilitiesUtils.js";import Ce from"./support/TimeInfo.js";import Pe from"./support/TitleCreator.js";import{serviceSupportsSpatialReference as Oe}from"./support/versionUtils.js";import{DataLayerSource as qe}from"./support/source/DataLayerSource.js";import{read as Me}from"../renderers/support/jsonUtils.js";import{loadStyleRenderer as Ae}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Re,rendererTypes as Qe}from"../renderers/support/typeUtils.js";import Ve from"../rest/support/FeatureSet.js";import Ue from"../rest/support/Query.js";import{isNumber as Be}from"../support/guards.js";import{createPopupTemplate as Ge}from"../support/popupUtils.js";import{symbolTypes as Ne}from"../symbols/support/typeUtils.js";import{opacityToTransparency as $e}from"../webdoc/support/opacityUtils.js";const Je="FeatureLayer";function We(e,t){return new s("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Ze(e){return e&&e instanceof o}const He=Ie();function ze(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let ke=class extends(O(q(P(Q(C(x(D(A(B(G(U(V(L(M(R(p(_(E(i(S)))))))))))))))))))){constructor(...e){super(...e),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new F(this),this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="ArcGISFeatureLayer",this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=j.WGS84,this.subtypeCode=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=d(async(e,t,r)=>{const{save:i,saveAs:o}=await import("./save/featureLayerUtils.js");switch(e){case 0:return i(this,t);case 1:return o(this,r,t)}})}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then(e=>this.initLayerProperties(e))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(y).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new s("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>ee(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return l(e),new Pe({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,fields:this.fields,displayField:this.displayField,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}readCapabilities(e,t){return t=t.layerDefinition||t,xe(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return te(this)}get featureTitleFields(){return[...this._titleCreator.requiredFields]}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&u(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return re(t.layerDefinition||t)}readObjectIdField(e,t){return ie(t.layerDefinition||t)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){Ee(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=Me(i,t,r)??void 0;return e||n.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return oe(t,r)}set source(e){const t=this._get("source");t!==e&&(Ze(t)&&this._resetMemorySource(t),Ze(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof o?new I({layer:this,items:e}):e:null}readSource(e,t){const r=Ve.fromJSON(t.featureSet);return new I({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e=e?.map(e=>Fe.fromJSON(e)),this._fixTemplates(e,i),this._fixTemplates(e,o),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition?.title;if(r){const e=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?N(this.url,r):r;let t=r;if(!t&&this.url){const e=$(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),J(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e?.map(e=>(e=Se.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,o),e))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const r=await se(this,e,t,Je);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const i=await ae(this,e,t,r,Je);return this.lastEditsEventDate=new Date,i}async applyEdits(e,t){return ne(this,e,t)}async uploadAssets(e,t){return le(this,e,t)}createPopupTemplate(e){return Ge(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await c(import("./graphics/sources/FeatureLayerSource.js"),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=pe(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=m(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){const r=await ue(this,e,t,Je);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return de(this,e,Je)}async getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}async getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getFeatureType(e){return ye(this.types,this.typeIdField,e)}getFieldDomain(e,t){return ce(this,e,t,this.getField(e)?.domain??null)}async queryAttachments(e,t){return me(this,e,t,Je)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Ue.from(e)??r.createQuery(),t),o=this.graphicOrigin;if(i?.features)for(const s of i.features)s.layer=s.sourceLayer=r,s.origin=o;return i}async queryObjectIds(e,t){return await he(this,e,t,Je)}async queryFeatureCount(e,t){return fe(this,e,t,Je)}async queryExtent(e,t){return be(this,e,t,Je)}async queryRelatedFeatures(e,t){return ge(this,e,t,Je)}async queryRelatedFeaturesCount(e,t){return we(this,e,t,Je)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new s(Je,"Layer source does not support queryTopFeatures capability");const o=await import("../rest/support/TopFeaturesQuery.js"),a=await r.queryTopFeatures(o.default.from(e),t);if(a?.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryAttributeBins(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryAttributeBins)throw new s(Je,"Layer source does not support queryAttributeBins capability");ve(e,i,Je);const o=await import("../rest/support/AttributeBinsQuery.js"),a=await r.queryAttributeBins(o.default.from(e),t);if(a.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new s(Je,"Layer source does not support queryTopObjectIds capability");const o=await import("../rest/support/TopFeaturesQuery.js");return(await r.queryTopObjectIds(o.default.from(e),t)).filter(Be)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new s(Je,"Layer source does not support queryTopExtents capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopExtents(o.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new s(Je,"Layer source does not support queryFeatureCount capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopCount(o.default.from(e),t)}read(e,t){const r=e.featureCollection;if((r||"Feature Collection"===e.type)&&(this.resourceInfo=e),r){const{layers:e,showLegend:i}=r;1===e?.length&&(super.read(e[0],t),null!=i&&super.read({showLegend:i},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:o}=t;if(this.dynamicDataSource)return o?.push(We(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if(("web-map"===r||"web-scene"===r)&&"tables"!==i)return o?.push(We(this,`a table source can only be written to tables, not ${i}`)),null;if(this._hasMemorySource())return o?.push(We(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&("web-map"===r||"web-scene"===r)&&"tables"===i)return o?.push(We(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new s(Je,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||Oe(this,e))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map(e=>e.trim()).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";u("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_fetchFirstValidLayerId(e){return r(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(t)return this.applyPreferredHost(t),this.findFirstValidLayerId(t)})}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),Ee(this.renderer,this.fieldsIndex),Le(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),Ae(this,{origin:"service"})}async hasDataChanged(){return Te(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach(e=>{const r=e.prototype?.attributes;r&&t&&delete r[t]})}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new s("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new s("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach(e=>{e.layer=this,e.sourceLayer=this}),this.addHandles([e.on("after-add",e=>{e.item.layer=this,e.item.sourceLayer=this}),e.on("after-remove",e=>{e.item.layer=null,e.item.sourceLayer=null})],"fl-source")}_resetMemorySource(e){e.forEach(e=>{e.layer=null,e.sourceLayer=null}),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){return Array.isArray(e.layers)&&e.layers.length>0?e.layers[0].id:Array.isArray(e.tables)&&e.tables.length>0?e.tables[0].id:void 0}};e([h({clonable:!1,readOnly:!0})],ke.prototype,"_titleCreator",null),e([h(W)],ke.prototype,"attributeTableTemplate",void 0),e([b("service","capabilities")],ke.prototype,"readCapabilities",null),e([h({json:{origins:{"web-scene":{write:!1}},write:!0}})],ke.prototype,"charts",void 0),e([h({readOnly:!0})],ke.prototype,"createQueryVersion",null),e([h({json:{read:{source:"layerDefinition.copyrightText"}}})],ke.prototype,"copyright",void 0),e([h({json:{read:{source:"layerDefinition.displayField"}}})],ke.prototype,"displayField",void 0),e([h({types:Ne,readOnly:!0})],ke.prototype,"defaultSymbol",void 0),e([h({type:qe})],ke.prototype,"dynamicDataSource",void 0),e([h({type:Boolean})],ke.prototype,"editingEnabled",null),e([b(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],ke.prototype,"readEditingEnabled",null),e([b("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],ke.prototype,"readEditingEnabledFromWebMap",null),e([w(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],ke.prototype,"writeEditingEnabled",null),e([w("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],ke.prototype,"writeEditingEnabledToWebMap",null),e([h({readOnly:!0})],ke.prototype,"effectiveEditingEnabled",null),e([h({clonable:!1,readOnly:!0})],ke.prototype,"featureTitleFields",null),e([h({...He.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:ze}}}}})],ke.prototype,"fields",void 0),e([h(He.fieldsIndex)],ke.prototype,"fieldsIndex",void 0),e([h({type:T,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],ke.prototype,"formTemplate",void 0),e([h({json:{read:{source:"layerDefinition.extent"}}})],ke.prototype,"fullExtent",void 0),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:ze,writer(e,t,r){const i=e?je.toJSON(e):null;i&&u(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:je.read}}})],ke.prototype,"geometryType",void 0),e([h({readOnly:!0,clonable:!1})],ke.prototype,"graphicOrigin",void 0),e([h({json:{read:{source:"layerDefinition.hasM"}}})],ke.prototype,"hasM",void 0),e([h({json:{read:{source:"layerDefinition.hasZ"}}})],ke.prototype,"hasZ",void 0),e([h(Z)],ke.prototype,"id",void 0),e([h({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ke.prototype,"infoFor3D",void 0),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],ke.prototype,"isTable",void 0),e([b("service","isTable",["type","geometryType"]),b("isTable",["layerDefinition.type","layerDefinition.geometryType"])],ke.prototype,"readIsTable",null),e([w("web-map","isTable")],ke.prototype,"writeIsTable",null),e([h(H)],ke.prototype,"labelsVisible",void 0),e([h({type:[De],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:_e,write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:_e,write:{layerContainerTypes:v}}})],ke.prototype,"labelingInfo",void 0),e([h((()=>{const e=a(z);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){u(r,$e(e),t)}}},e})())],ke.prototype,"opacity",void 0),e([h(k)],ke.prototype,"legendEnabled",void 0),e([h({type:["show","hide"],json:(()=>{const e=a(K.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],ke.prototype,"listMode",void 0),e([b("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ke.prototype,"readGlobalIdField",null),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:ze}}}}})],ke.prototype,"objectIdField",void 0),e([b("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ke.prototype,"readObjectIdField",null),e([h({type:["ArcGISFeatureLayer"],json:{write:{target:"layerType",ignoreOrigin:!0,layerContainerTypes:v}}})],ke.prototype,"operationalLayerType",void 0),e([h(He.outFields)],ke.prototype,"outFields",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ke.prototype,"path",void 0),e([h(X)],ke.prototype,"popupEnabled",void 0),e([h({type:t,json:{name:"popupInfo",write:!0}})],ke.prototype,"popupTemplate",void 0),e([h({readOnly:!0})],ke.prototype,"defaultPopupTemplate",null),e([h({types:Qe,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:Re,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:v,overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema,layerContainerTypes:v})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema,layerContainerTypes:v})}}})],ke.prototype,"renderer",null),e([b("service","renderer",["drawingInfo.renderer","defaultSymbol"]),b("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],ke.prototype,"readRenderer",null),e([h()],ke.prototype,"resourceInfo",void 0),e([h((()=>{const e=a(Y);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],ke.prototype,"screenSizePerspectiveEnabled",void 0),e([h({clonable:!1})],ke.prototype,"source",null),e([f("source")],ke.prototype,"castSource",null),e([b("portal-item","source",["featureSet"]),b("web-map","source",["featureSet"])],ke.prototype,"readSource",null),e([h({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],ke.prototype,"spatialReference",void 0),e([h({type:Number})],ke.prototype,"subtypeCode",void 0),e([h({type:[Fe]})],ke.prototype,"templates",void 0),e([b("templates",["editFieldsInfo","creatorField","editorField","templates"])],ke.prototype,"readTemplates",null),e([h({type:Ce})],ke.prototype,"timeInfo",void 0),e([h()],ke.prototype,"title",void 0),e([b("service","title",["name"]),b("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],ke.prototype,"readTitle",null),e([b("web-map","title",["layerDefinition.name","title"])],ke.prototype,"readTitleFromWebMap",null),e([h({type:String})],ke.prototype,"sublayerTitleMode",void 0),e([h({json:{read:!1}})],ke.prototype,"type",void 0),e([h({type:String})],ke.prototype,"typeIdField",void 0),e([b("service","typeIdField"),b("typeIdField",["layerDefinition.typeIdField"])],ke.prototype,"readTypeIdField",null),e([h({type:[Se]})],ke.prototype,"types",void 0),e([b("service","types",["types"]),b("types",["layerDefinition.types"])],ke.prototype,"readTypes",null),e([h({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility",layerContainerTypes:v}}}}})],ke.prototype,"visible",void 0),e([b("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],ke.prototype,"readVisible",null),ke=e([g("esri.layers.FeatureLayer")],ke);export{ke as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- function e(e){return"isGroundReplacement"in e&&e.isGroundReplacement}export{e as isLayerGroundReplacement};
5
+ function e(e){return!!e.parent&&"type"in e.parent&&"Basemap"===e.parent.type&&"isGroundReplacement"in e&&e.isGroundReplacement}export{e as isLayerGroundReplacement};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{watch as a}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import l from"../geometry/SpatialReference.js";import d from"../graphic/ParquetGraphicOrigin.js";import m from"./Layer.js";import{ParquetSource as c}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as f}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as h}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as g}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as j}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{OrderedLayer as x}from"./mixins/OrderedLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as b}from"./mixins/TemporalLayer.js";import{labelsVisible as I}from"./support/commonProperties.js";import O from"./support/FeatureTemplate.js";import R from"./support/Field.js";import{defineFieldProperties as q}from"./support/fieldProperties.js";import{fixRendererFields as P,fixTimeInfoFields as T}from"./support/fieldUtils.js";import w from"./support/LabelClass.js";import{reader as C}from"./support/labelingInfo.js";import{ParquetEncodingBase as Q}from"./support/ParquetEncodingBase.js";import D from"./support/ParquetEncodingLocation.js";import z from"./support/ParquetEncodingWkb.js";import{completeParquetLayerInfo as B,parquetGeometryTypeKebabDict as E}from"./support/parquetUtils.js";import{rendererTypes as A}from"../renderers/support/typeUtils.js";import L from"../rest/support/Query.js";import{createPopupTemplate as G}from"../support/popupUtils.js";const U=q(),M="__OBJECTID",W={types:{key:"type",base:Q,typeMap:{wkb:z,location:D}}};let _=class extends(h(j(g(y(x(b(S(v(F(p(f(r(m))))))))))))){constructor(e){super(e),this.capabilities=k(),this.copyright=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.encoding=null,this.geometryType=null,this.graphicOrigin=new d(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=M,this.outFields=null,this.popupTemplate=null,this.source=null,this.spatialReference=l.WGS84,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new s}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([a(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return null==this.geometryType}set renderer(e){P(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return G(this,e)}createQuery(){const e=new L;return e.returnGeometry=!0,e.outFields=["*"],e}async createSource(e){const t=await B({urls:this.urls,fields:this.fields,encoding:this.encoding,geometryType:this.geometryType,spatialReference:this.spatialReference,file:this.file},{customParameters:this.customParameters});let{fields:r,geometryType:s,encoding:p,spatialReference:a,urls:n,file:u,displayOptimization:d}=t;if(null==r)throw new o("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",t);if(a){if(!a.isGeographic&&!a.isWebMercator)throw new o("parquet-layer:unsupported","Unable to create parquet source: currently only geographic and Web Mercator supported",t);a.isGeographic&&!a.isWGS84&&(i.getLogger("parquet-layer").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:t.spatialReference}),a=l.WGS84)}r.push(new R({name:M,type:"oid",alias:M}));const m=new c({urls:n.items,fields:r,objectIdField:M,spatialReference:a,encoding:p,geometryType:s,file:u,customParameters:this.customParameters??void 0,displayOptimization:d});return await m.load(e),m}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t);if(r?.features)for(const s of r.features)s.layer=s.sourceLayer=this;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return L.from(e)??this.createQuery()}async _load(e){const t=await this.createSource(e);this._set("source",t),this.fields=t.fields,this.objectIdField=t.objectIdField,this.encoding=t.encoding,this.file=t.file,this.geometryType=t.geometryType,t.spatialReference&&(this.spatialReference=t.spatialReference),this.displayOptimization=t.displayOptimization,t.fullExtent&&(this.fullExtent=t.fullExtent),P(this.renderer,this.fieldsIndex),T(this.timeInfo,this.fieldsIndex)}};e([n({readOnly:!0,json:{read:!1,write:!1}})],_.prototype,"capabilities",void 0),e([n({type:String})],_.prototype,"copyright",void 0),e([n({readOnly:!0})],_.prototype,"defaultPopupTemplate",null),e([n()],_.prototype,"displayOptimization",void 0),e([n({type:[R],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],_.prototype,"fields",void 0),e([n(U.fieldsIndex)],_.prototype,"fieldsIndex",void 0),e([n(W)],_.prototype,"encoding",void 0),e([n({json:{read:{reader:E.read}}})],_.prototype,"geometryType",void 0),e([n({readOnly:!0,clonable:!1})],_.prototype,"graphicOrigin",void 0),e([n(I)],_.prototype,"labelsVisible",void 0),e([n({type:[w],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:C},write:!0}})],_.prototype,"labelingInfo",void 0),e([n()],_.prototype,"file",void 0),e([n({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],_.prototype,"objectIdField",void 0),e([n(U.outFields)],_.prototype,"outFields",void 0),e([n({type:t,json:{name:"popupInfo",write:!0}})],_.prototype,"popupTemplate",void 0),e([n({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"}}}})],_.prototype,"renderer",null),e([n({json:{read:!1},cast:null,type:c,readOnly:!0})],_.prototype,"source",void 0),e([n({type:l})],_.prototype,"spatialReference",void 0),e([n({type:[O]})],_.prototype,"templates",void 0),e([n()],_.prototype,"title",void 0),e([n({json:{read:!1},readOnly:!0})],_.prototype,"type",void 0),e([n({type:s.ofType(String)})],_.prototype,"urls",void 0),_=e([u("esri.layers.ParquetLayer")],_);const H=_;function k(){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}export{H as default};
5
+ import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import i from"../core/Logger.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{watch as a}from"../core/reactiveUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import{subclass as u}from"../core/accessorSupport/decorators/subclass.js";import l from"../geometry/SpatialReference.js";import d from"../graphic/ParquetGraphicOrigin.js";import m from"./Layer.js";import{ParquetSource as c}from"./graphics/sources/ParquetSource.js";import{BlendLayer as y}from"./mixins/BlendLayer.js";import{CustomParametersMixin as f}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as h}from"./mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as g}from"./mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as j}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{OrderedLayer as x}from"./mixins/OrderedLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as b}from"./mixins/TemporalLayer.js";import{labelsVisible as I}from"./support/commonProperties.js";import O from"./support/FeatureTemplate.js";import R from"./support/Field.js";import{defineFieldProperties as q}from"./support/fieldProperties.js";import{fixRendererFields as P,fixTimeInfoFields as T}from"./support/fieldUtils.js";import w from"./support/LabelClass.js";import{reader as C}from"./support/labelingInfo.js";import{ParquetEncodingBase as Q}from"./support/ParquetEncodingBase.js";import D from"./support/ParquetEncodingLocation.js";import z from"./support/ParquetEncodingWkb.js";import{completeParquetLayerInfo as B,parquetGeometryTypeKebabDict as E}from"./support/parquetUtils.js";import{rendererTypes as A}from"../renderers/support/typeUtils.js";import L from"../rest/support/Query.js";import{createPopupTemplate as G}from"../support/popupUtils.js";const U=q(),M="__OBJECTID",W={types:{key:"type",base:Q,typeMap:{wkb:z,location:D}}};let _=class extends(h(j(g(y(x(b(S(v(F(p(f(r(m))))))))))))){constructor(e){super(e),this.capabilities=k(),this.copyright=null,this.displayOptimization=null,this.fields=null,this.fieldsIndex=null,this.encoding=null,this.geometryType=null,this.graphicOrigin=new d(this),this.labelsVisible=!0,this.labelingInfo=null,this.objectIdField=M,this.outFields=null,this.popupTemplate=null,this.source=null,this.spatialReference=l.WGS84,this.templates=null,this.title="Parquet",this.type="parquet",this.urls=new s}async load(e){return this.addResolvingPromise(this._load(e)),this.addHandles([a(()=>this.customParameters,e=>this.source?.setCustomParameters(e))]),this}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return null==this.geometryType}set renderer(e){P(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return G(this,e)}createQuery(){const e=new L;return e.returnGeometry=!0,e.outFields=["*"],e}async createSource(e){const t=await B({urls:this.urls,fields:this.fields,encoding:this.encoding,geometryType:this.geometryType,spatialReference:this.spatialReference,file:this.file},{customParameters:this.customParameters});let{fields:r,geometryType:s,encoding:p,spatialReference:a,urls:n,file:u,displayOptimization:d}=t;if(null==r)throw new o("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",t);if(a){if(!a.isGeographic&&!a.isWebMercator)throw new o("parquet-layer:unsupported","Unable to create parquet source: currently only geographic and Web Mercator supported",t);a.isGeographic&&!a.isWGS84&&(i.getLogger("parquet-layer").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:t.spatialReference}),a=l.WGS84)}r.push(new R({name:M,type:"oid",alias:M}));const m=new c({urls:n.items,fields:r,objectIdField:M,spatialReference:a,encoding:p,geometryType:s,file:u,customParameters:this.customParameters??void 0,displayOptimization:d});return await m.load(e),m}getFieldDomain(e,t){return null}getField(e){return this.fieldsIndex.get(e)}async queryFeatures(e,t){await this.load();const r=await this.source.queryFeatures(this._normalizeQuery(e),t),s=this.graphicOrigin;if(r?.features)for(const o of r.features)o.layer=o.sourceLayer=this,o.origin=s;return r}async queryObjectIds(e,t){return await this.load(),this.source.queryObjectIds(this._normalizeQuery(e),t)}async queryFeatureCount(e,t){return await this.load(),this.source.queryFeatureCount(this._normalizeQuery(e),t)}async queryExtent(e,t){return await this.load(),this.source.queryExtent(this._normalizeQuery(e),t)}_normalizeQuery(e){return L.from(e)??this.createQuery()}async _load(e){const t=await this.createSource(e);this._set("source",t),this.fields=t.fields,this.objectIdField=t.objectIdField,this.encoding=t.encoding,this.file=t.file,this.geometryType=t.geometryType,t.spatialReference&&(this.spatialReference=t.spatialReference),this.displayOptimization=t.displayOptimization,t.fullExtent&&(this.fullExtent=t.fullExtent),P(this.renderer,this.fieldsIndex),T(this.timeInfo,this.fieldsIndex)}};e([n({readOnly:!0,json:{read:!1,write:!1}})],_.prototype,"capabilities",void 0),e([n({type:String})],_.prototype,"copyright",void 0),e([n({readOnly:!0})],_.prototype,"defaultPopupTemplate",null),e([n()],_.prototype,"displayOptimization",void 0),e([n({type:[R],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],_.prototype,"fields",void 0),e([n(U.fieldsIndex)],_.prototype,"fieldsIndex",void 0),e([n(W)],_.prototype,"encoding",void 0),e([n({json:{read:{reader:E.read}}})],_.prototype,"geometryType",void 0),e([n({readOnly:!0,clonable:!1})],_.prototype,"graphicOrigin",void 0),e([n(I)],_.prototype,"labelsVisible",void 0),e([n({type:[w],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:C},write:!0}})],_.prototype,"labelingInfo",void 0),e([n()],_.prototype,"file",void 0),e([n({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],_.prototype,"objectIdField",void 0),e([n(U.outFields)],_.prototype,"outFields",void 0),e([n({type:t,json:{name:"popupInfo",write:!0}})],_.prototype,"popupTemplate",void 0),e([n({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"}}}})],_.prototype,"renderer",null),e([n({json:{read:!1},cast:null,type:c,readOnly:!0})],_.prototype,"source",void 0),e([n({type:l})],_.prototype,"spatialReference",void 0),e([n({type:[O]})],_.prototype,"templates",void 0),e([n()],_.prototype,"title",void 0),e([n({json:{read:!1},readOnly:!0})],_.prototype,"type",void 0),e([n({type:s.ofType(String)})],_.prototype,"urls",void 0),_=e([u("esri.layers.ParquetLayer")],_);const H=_;function k(){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}export{H as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{makeHandle as e}from"../../core/handleUtils.js";import{watch as t,syncAndInitial as r}from"../../core/reactiveUtils.js";const n=new WeakMap;function a(o){return!o.destroyed&&(n.has(o)||o.addHandles([t(()=>{const e=o.parent;return!(!e||!("type"in e))&&("catalog-dynamic-group"===e.type||a(e))},e=>n.set(o,e),r),e(()=>n.delete(o))]),n.get(o))}function o(e){return e.parent&&"type"in e.parent&&"catalog-dynamic-group"===e.parent.type?e.parent.parent:null}function i(e,t){const r=e.parent,n=e.layer;if("map-image"!==n?.type||!n.sourceJSON||!r)return!1;const a=n.sourceJSON.layers;if(!a)return!1;const o=a.find(t=>e.id===t.id),i="footprints"===t?"Feature Layer":"Catalog Dynamic Group Layer";return o?.type===i&&"Catalog Layer"===a.find(e=>e.id===r.id)?.type}export{o as getCatalogLayerForLayer,i as isCatalogSublayer,a as isLayerFromCatalog};
5
+ import{makeHandle as e}from"../../core/handleUtils.js";import{watch as t,syncAndInitial as r}from"../../core/reactiveUtils.js";const n=new WeakMap;function a(o){return!o.destroyed&&(n.has(o)||o.addHandles([t(()=>{const e=o.parent;return!(!e||!("type"in e)||"Basemap"===e.type)&&("catalog-dynamic-group"===e.type||a(e))},e=>n.set(o,e),r),e(()=>n.delete(o))]),n.get(o))}function o(e){return e.parent&&"type"in e.parent&&"catalog-dynamic-group"===e.parent.type?e.parent.parent:null}function p(e,t){const r=e.parent,n=e.layer;if("map-image"!==n?.type||!n.sourceJSON||!r)return!1;const a=n.sourceJSON.layers;if(!a)return!1;const o=a.find(t=>e.id===t.id),p="footprints"===t?"Feature Layer":"Catalog Dynamic Group Layer";return o?.type===p&&"Catalog Layer"===a.find(e=>e.id===r.id)?.type}export{o as getCatalogLayerForLayer,p as isCatalogSublayer,a as isLayerFromCatalog};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../PopupTemplate.js";import{clone as r}from"../../core/lang.js";import i from"../../core/Logger.js";import{MultiOriginJSONMixin as o}from"../../core/MultiOriginJSONSupport.js";import"../../core/workers/workers.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/Extent.js";import l from"../../geometry/Point.js";import y from"../../geometry/Polygon.js";import u from"../../geometry/Polyline.js";import{initializeProjection as m,project as d}from"../../geometry/projectionUtils.js";import h from"../../geometry/SpatialReference.js";import{wgs84 as c}from"../../geometry/support/spatialReferenceUtils.js";import{featureGeometryTypeKebabDictionary as g}from"../../geometry/support/typeUtils.js";import f from"../../graphic/KnowledgeGraphGraphicOrigin.js";import j from"../Layer.js";import b from"../graphics/data/FeatureStore.js";import{QueryEngine as w}from"../graphics/data/QueryEngine.js";import{createCapabilities as T,createDrawingInfo as I}from"../graphics/sources/support/clientSideDefaults.js";import{systemOidFieldName as v,systemAggregationCountFieldName as O,systemIsSpatialFieldName as S,systemLayoutGeometryFieldName as E,systemOriginIdFieldName as x,systemDestinationIdFieldName as N}from"./constants.js";import{KnowledgeGraphSublayerBase as L}from"./KnowledgeGraphSublayerBase.js";import{getDisplayLabelProperty as F,getLinkChartDefaultLabelingInfo as _,getMapDefaultLabelingInfo as R,getKGSublayerSymbolColor as Q,getDefaultLCRelationshipSublayerSymbol as C}from"./layerUtils.js";import{BlendLayer as M,blendModeProperty as J,effectProperty as k}from"../mixins/BlendLayer.js";import{DisplayFilteredLayer as P,displayFilterEnabledProperty as D,displayFilterInfoProperty as G}from"../mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as q,featureEffectProperty as U}from"../mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as Z}from"../mixins/FeatureReductionLayer.js";import{OrderedLayer as A,orderByProperty as B}from"../mixins/OrderedLayer.js";import{RefreshableLayer as V}from"../mixins/RefreshableLayer.js";import{ScaleRangeLayer as K}from"../mixins/ScaleRangeLayer.js";import{TemporalLayer as H,useViewTimeProperty as W}from"../mixins/TemporalLayer.js";import{legendEnabled as Y,maxScale as z,minScale as X,opacity as $,popupEnabled as ee}from"../support/commonProperties.js";import{featureReductionProperty as te}from"../support/featureReductionUtils.js";import re from"../support/Field.js";import{fixRendererFields as ie,fixTimeInfoFields as oe}from"../support/fieldUtils.js";import se from"../support/LabelClass.js";import{reader as ne}from"../support/labelingInfo.js";import ae from"../support/TimeInfo.js";import pe from"../../renderers/SimpleRenderer.js";import{fromJSON as le}from"../../renderers/support/jsonUtils.js";import{rendererTypes as ye}from"../../renderers/support/typeUtils.js";import ue from"../../rest/support/FeatureSet.js";import me from"../../rest/support/Query.js";import{createPopupTemplate as de}from"../../support/popupUtils.js";import{applyColorToSymbol as he}from"../../symbols/support/utils.js";import ce from"../../core/workers/RemoteClient.js";function ge(e){if(!e.json)return e;e.json.write=fe(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=fe(e.write))}return e}function fe(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=je(e)),e):!0===e?be():e}function je(e){const{target:t,writer:r,overridePolicy:i,...o}=e;return function(e,t){const r=we.call(this,e,t);return r.enabled?{...o,...r}:r}}function be(){return{overridePolicy:we}}function we(e,t){const r=!!this.geometryType;let i={enabled:r};return r&&(i={...i,...Te.call(this,e,t)}),i}function Te(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let Ie=class extends(L(P(Z(q(M(A(H(K(V(o(j))))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=T(!1,!0),this.charts=null,this.definitionExpression=null,this.displayField="",this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphicOrigin=new f(this),this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=v,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new ce(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=me.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach(t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(re.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))}),e.push(re.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),re.fromJSON({name:O,type:"esriFieldTypeInteger",alias:O,editable:!1}),re.fromJSON({name:S,type:"esriFieldTypeInteger",alias:S,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return E;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?F(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?_(this.graphType,this.graphTypeName,e):R(this.graphTypeName,this.geometryType,e)}set renderer(e){ie(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),r=Q(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new pe({type:"simple",symbol:C(r)});const e=le(I(g.toJSON("point")).renderer);return he(e.symbol,r),e}const i=le(I(g.toJSON(this.geometryType)).renderer);return he(i.symbol,r),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??h.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return de(this,e)}createQuery(){return new me({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e),o=ue.fromJSON(await i.executeQuery(r.toJSON(),t?.signal));return o.features.forEach(e=>{e.sourceLayer=this}),o}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const r={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:o}=await this._setupQueryObjects(r),s=await o.executeQueryForExtent(i.toJSON(),t?.signal);let n;return n=null!=s.extent?.xmin&&null!=s.extent?.xmax&&null!=s.extent?.ymin&&null!=s.extent?.ymax?new p(s.extent):new p,{count:s.count,extent:n}}async queryObjectIds(e,t){await this.load();const r=me.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new b({geometryType:g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new w({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new me({where:"1=1",outFields:[v]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>oe(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const r=me.from(e),i=r.geometry;if(i&&!i.spatialReference?.isWGS84&&(await m(i.spatialReference,c),r.geometry=d(i instanceof y||i instanceof u||i instanceof l?i:i.extent,c)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:r,queryEngine:this._cachedQueryEngine};const o=await this.parentCompositeLayer.dataManager.getData(r,this,t);return{resolvedQuery:r,queryEngine:this.loadQueryEngine(o)}}};function ve(e,t,r){const o=[["ESRI__AGGREGATION_COUNT",O],["ESRI__ORIGIN_ID",x],["ESRI__DESTINATION_ID",N],["ESRI__LAYOUT_GEOMETRY",E]];try{for(const t of e)for(const[e,r]of o)t.labelExpression=t.labelExpression?.replaceAll(e,r),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,r))}catch(s){i.getLogger(this).warn("Error updating labelingInfo",s)}return ne(e,t,r)}e([s(ge(r(J)))],Ie.prototype,"blendMode",void 0),e([s()],Ie.prototype,"capabilities",void 0),e([s({readOnly:!0})],Ie.prototype,"userHasUpdateItemPrivileges",null),e([s({json:{origins:{"web-scene":{write:!1}},write:be()}})],Ie.prototype,"charts",void 0),e([s({readOnly:!0})],Ie.prototype,"defaultPopupTemplate",null),e([s({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],Ie.prototype,"definitionExpression",void 0),e([s()],Ie.prototype,"displayField",void 0),e([s(ge(r(D)))],Ie.prototype,"displayFilterEnabled",void 0),e([s(ge(r(G)))],Ie.prototype,"displayFilterInfo",void 0),e([s(ge(r(k)))],Ie.prototype,"effect",void 0),e([s()],Ie.prototype,"elevationInfo",void 0),e([s(ge(r(U)))],Ie.prototype,"featureEffect",void 0),e([s(ge(r(te)))],Ie.prototype,"featureReduction",null),e([s()],Ie.prototype,"fields",null),e([s()],Ie.prototype,"geometryType",null),e([s()],Ie.prototype,"geometryFieldName",null),e([s({readOnly:!0,clonable:!1})],Ie.prototype,"graphicOrigin",void 0),e([s({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],Ie.prototype,"graphType",void 0),e([s({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],Ie.prototype,"graphTypeName",null),e([s()],Ie.prototype,"hasM",null),e([s()],Ie.prototype,"hasZ",null),e([s({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],Ie.prototype,"id",void 0),e([s({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],Ie.prototype,"labelsVisible",void 0),e([s({type:[se],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:ve,write:be()}})],Ie.prototype,"labelingInfo",null),e([s({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],Ie.prototype,"layerType",void 0),e([s(ge(r(Y)))],Ie.prototype,"legendEnabled",void 0),e([s(ge(r(z)))],Ie.prototype,"maxScale",void 0),e([s(ge(r(X)))],Ie.prototype,"minScale",void 0),e([s()],Ie.prototype,"objectIdField",void 0),e([s()],Ie.prototype,"objectType",void 0),e([s(ge(r($)))],Ie.prototype,"opacity",void 0),e([s(ge(r(B)))],Ie.prototype,"orderBy",void 0),e([s({clonable:!1})],Ie.prototype,"parent",void 0),e([s()],Ie.prototype,"parentCompositeLayer",void 0),e([s(ge(r(ee)))],Ie.prototype,"popupEnabled",void 0),e([s({type:t,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],Ie.prototype,"popupTemplate",void 0),e([s({type:Number,json:{write:{overridePolicy:Te}}})],Ie.prototype,"refreshInterval",void 0),e([s({types:ye,json:{name:"layerDefinition.drawingInfo.renderer",write:be()}})],Ie.prototype,"renderer",null),e([s()],Ie.prototype,"source",void 0),e([s()],Ie.prototype,"spatialReference",null),e([s({type:ae,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],Ie.prototype,"timeInfo",null),e([s({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],Ie.prototype,"title",null),e([a("title")],Ie.prototype,"writeTitle",null),e([s({json:{read:!1}})],Ie.prototype,"type",void 0),e([s(ge(r(W)))],Ie.prototype,"useViewTime",void 0),e([s({type:Boolean,json:{name:"visibility",write:be()}})],Ie.prototype,"visible",void 0),Ie=e([n("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],Ie);export{Ie as default};
5
+ import{__decorate as e}from"tslib";import t from"../../PopupTemplate.js";import{clone as r}from"../../core/lang.js";import i from"../../core/Logger.js";import{MultiOriginJSONMixin as o}from"../../core/MultiOriginJSONSupport.js";import"../../core/workers/workers.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";import p from"../../geometry/Extent.js";import l from"../../geometry/Point.js";import y from"../../geometry/Polygon.js";import u from"../../geometry/Polyline.js";import{initializeProjection as m,project as h}from"../../geometry/projectionUtils.js";import d from"../../geometry/SpatialReference.js";import{wgs84 as c}from"../../geometry/support/spatialReferenceUtils.js";import{featureGeometryTypeKebabDictionary as g}from"../../geometry/support/typeUtils.js";import f from"../../graphic/KnowledgeGraphGraphicOrigin.js";import j from"../../graphic/LinkChartGraphicOrigin.js";import b from"../Layer.js";import w from"../graphics/data/FeatureStore.js";import{QueryEngine as T}from"../graphics/data/QueryEngine.js";import{createCapabilities as I,createDrawingInfo as O}from"../graphics/sources/support/clientSideDefaults.js";import{systemOidFieldName as v,systemAggregationCountFieldName as S,systemIsSpatialFieldName as E,systemLayoutGeometryFieldName as x,systemOriginIdFieldName as N,systemDestinationIdFieldName as L}from"./constants.js";import{KnowledgeGraphSublayerBase as F}from"./KnowledgeGraphSublayerBase.js";import{getDisplayLabelProperty as _,getLinkChartDefaultLabelingInfo as R,getMapDefaultLabelingInfo as Q,getKGSublayerSymbolColor as C,getDefaultLCRelationshipSublayerSymbol as k}from"./layerUtils.js";import{BlendLayer as M,blendModeProperty as J,effectProperty as P}from"../mixins/BlendLayer.js";import{DisplayFilteredLayer as G,displayFilterEnabledProperty as D,displayFilterInfoProperty as q}from"../mixins/DisplayFilteredLayer.js";import{FeatureEffectLayer as U,featureEffectProperty as Z}from"../mixins/FeatureEffectLayer.js";import{FeatureReductionLayer as A}from"../mixins/FeatureReductionLayer.js";import{OrderedLayer as B,orderByProperty as V}from"../mixins/OrderedLayer.js";import{RefreshableLayer as K}from"../mixins/RefreshableLayer.js";import{ScaleRangeLayer as H}from"../mixins/ScaleRangeLayer.js";import{TemporalLayer as W,useViewTimeProperty as Y}from"../mixins/TemporalLayer.js";import{legendEnabled as z,maxScale as X,minScale as $,opacity as ee,popupEnabled as te}from"../support/commonProperties.js";import{featureReductionProperty as re}from"../support/featureReductionUtils.js";import ie from"../support/Field.js";import{fixRendererFields as oe,fixTimeInfoFields as ne}from"../support/fieldUtils.js";import se from"../support/LabelClass.js";import{reader as ae}from"../support/labelingInfo.js";import pe from"../support/TimeInfo.js";import le from"../../renderers/SimpleRenderer.js";import{fromJSON as ye}from"../../renderers/support/jsonUtils.js";import{rendererTypes as ue}from"../../renderers/support/typeUtils.js";import me from"../../rest/support/FeatureSet.js";import he from"../../rest/support/Query.js";import{createPopupTemplate as de}from"../../support/popupUtils.js";import{applyColorToSymbol as ce}from"../../symbols/support/utils.js";import ge from"../../core/workers/RemoteClient.js";function fe(e){if(!e.json)return e;e.json.write=je(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=je(e.write))}return e}function je(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=be(e)),e):!0===e?we():e}function be(e){const{target:t,writer:r,overridePolicy:i,...o}=e;return function(e,t){const r=Te.call(this,e,t);return r.enabled?{...o,...r}:r}}function we(){return{overridePolicy:Te}}function Te(e,t){const r=!!this.geometryType;let i={enabled:r};return r&&(i={...i,...Ie.call(this,e,t)}),i}function Ie(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let Oe=class extends(F(G(A(U(M(B(W(H(K(o(b))))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=I(!1,!0),this.charts=null,this.definitionExpression=null,this.displayField="",this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=v,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new ge(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=he.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach(t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(ie.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))}),e.push(ie.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),ie.fromJSON({name:S,type:"esriFieldTypeInteger",alias:S,editable:!1}),ie.fromJSON({name:E,type:"esriFieldTypeInteger",alias:E,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return x;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new f(this.parent,this);case"link-chart":return new j(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?_(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?R(this.graphType,this.graphTypeName,e):Q(this.graphTypeName,this.geometryType,e)}set renderer(e){oe(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),r=C(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new le({type:"simple",symbol:k(r)});const e=ye(O(g.toJSON("point")).renderer);return ce(e.symbol,r),e}const i=ye(O(g.toJSON(this.geometryType)).renderer);return ce(i.symbol,r),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??d.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return de(this,e)}createQuery(){return new he({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e),o=this.graphicOrigin,n=me.fromJSON(await i.executeQuery(r.toJSON(),t?.signal));return n.features.forEach(e=>{e.sourceLayer=this,e.origin=o}),n}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:r,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const r={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:o}=await this._setupQueryObjects(r),n=await o.executeQueryForExtent(i.toJSON(),t?.signal);let s;return s=null!=n.extent?.xmin&&null!=n.extent?.xmax&&null!=n.extent?.ymin&&null!=n.extent?.ymax?new p(n.extent):new p,{count:n.count,extent:s}}async queryObjectIds(e,t){await this.load();const r=he.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new w({geometryType:g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new T({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new he({where:"1=1",outFields:[v]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>ne(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const r=he.from(e),i=r.geometry;if(i&&!i.spatialReference?.isWGS84&&(await m(i.spatialReference,c),r.geometry=h(i instanceof y||i instanceof u||i instanceof l?i:i.extent,c)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:r,queryEngine:this._cachedQueryEngine};const o=await this.parentCompositeLayer.dataManager.getData(r,this,t);return{resolvedQuery:r,queryEngine:this.loadQueryEngine(o)}}};function ve(e,t,r){const o=[["ESRI__AGGREGATION_COUNT",S],["ESRI__ORIGIN_ID",N],["ESRI__DESTINATION_ID",L],["ESRI__LAYOUT_GEOMETRY",x]];try{for(const t of e)for(const[e,r]of o)t.labelExpression=t.labelExpression?.replaceAll(e,r),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,r))}catch(n){i.getLogger(this).warn("Error updating labelingInfo",n)}return ae(e,t,r)}e([n(fe(r(J)))],Oe.prototype,"blendMode",void 0),e([n()],Oe.prototype,"capabilities",void 0),e([n({readOnly:!0})],Oe.prototype,"userHasUpdateItemPrivileges",null),e([n({json:{origins:{"web-scene":{write:!1}},write:we()}})],Oe.prototype,"charts",void 0),e([n({readOnly:!0})],Oe.prototype,"defaultPopupTemplate",null),e([n({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],Oe.prototype,"definitionExpression",void 0),e([n()],Oe.prototype,"displayField",void 0),e([n(fe(r(D)))],Oe.prototype,"displayFilterEnabled",void 0),e([n(fe(r(q)))],Oe.prototype,"displayFilterInfo",void 0),e([n(fe(r(P)))],Oe.prototype,"effect",void 0),e([n()],Oe.prototype,"elevationInfo",void 0),e([n(fe(r(Z)))],Oe.prototype,"featureEffect",void 0),e([n(fe(r(re)))],Oe.prototype,"featureReduction",null),e([n()],Oe.prototype,"fields",null),e([n()],Oe.prototype,"geometryType",null),e([n()],Oe.prototype,"geometryFieldName",null),e([n({readOnly:!0})],Oe.prototype,"graphicOrigin",null),e([n({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],Oe.prototype,"graphType",void 0),e([n({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],Oe.prototype,"graphTypeName",null),e([n()],Oe.prototype,"hasM",null),e([n()],Oe.prototype,"hasZ",null),e([n({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],Oe.prototype,"id",void 0),e([n({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],Oe.prototype,"labelsVisible",void 0),e([n({type:[se],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:ve,write:we()}})],Oe.prototype,"labelingInfo",null),e([n({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],Oe.prototype,"layerType",void 0),e([n(fe(r(z)))],Oe.prototype,"legendEnabled",void 0),e([n(fe(r(X)))],Oe.prototype,"maxScale",void 0),e([n(fe(r($)))],Oe.prototype,"minScale",void 0),e([n()],Oe.prototype,"objectIdField",void 0),e([n()],Oe.prototype,"objectType",void 0),e([n(fe(r(ee)))],Oe.prototype,"opacity",void 0),e([n(fe(r(V)))],Oe.prototype,"orderBy",void 0),e([n({clonable:!1})],Oe.prototype,"parent",void 0),e([n()],Oe.prototype,"parentCompositeLayer",void 0),e([n(fe(r(te)))],Oe.prototype,"popupEnabled",void 0),e([n({type:t,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],Oe.prototype,"popupTemplate",void 0),e([n({type:Number,json:{write:{overridePolicy:Ie}}})],Oe.prototype,"refreshInterval",void 0),e([n({types:ue,json:{name:"layerDefinition.drawingInfo.renderer",write:we()}})],Oe.prototype,"renderer",null),e([n()],Oe.prototype,"source",void 0),e([n()],Oe.prototype,"spatialReference",null),e([n({type:pe,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],Oe.prototype,"timeInfo",null),e([n({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],Oe.prototype,"title",null),e([a("title")],Oe.prototype,"writeTitle",null),e([n({json:{read:!1}})],Oe.prototype,"type",void 0),e([n(fe(r(Y)))],Oe.prototype,"useViewTime",void 0),e([n({type:Boolean,json:{name:"visibility",write:we()}})],Oe.prototype,"visible",void 0),Oe=e([s("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],Oe);export{Oe as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
+ */
5
+ import e from"../../core/Error.js";import{makeHandle as t}from"../../core/handleUtils.js";import{getOrCreateMapValue as r}from"../../core/MapUtils.js";import{floatEqualRelative as a}from"../../core/mathUtils.js";import o from"../../geometry/Point.js";import i from"../../geometry/Polyline.js";import{initializeProjection as s,project as n}from"../../geometry/projectionUtils.js";import c from"../GraphicsLayer.js";import{convertToGeometry as p}from"../graphics/featureConversionUtils.js";import{kgRestServices as h}from"../../rest/knowledgeGraphService.js";import d from"../../rest/knowledgeGraph/GraphQueryStreaming.js";import u from"../../rest/knowledgeGraph/KnowledgeGraph.js";import l from"../../views/draw/support/Reshape.js";import{loadAutomaticAreaMeasurementUtils as m}from"../../views/support/automaticAreaMeasurementUtils.js";import{loadAutomaticLengthMeasurementUtils as g}from"../../views/support/automaticLengthMeasurementUtils.js";const y={newReshapeWrapper:async({getFeatureReshapeProvider:e,targetGraphic:t,reshapeGraphicsLayer:r,view:a,snappingManager:o})=>new l({automaticAreaMeasurementUtils:await m(),automaticLengthMeasurementUtils:await g(),connectedReshapeProviders:[{getFeatureReshapeProvider:e,getVertexReshapeProvider(){throw new Error("Link Charts do not support vertex (polyline) reshape at this time")}}],enableMidpoints:!1,graphic:t,layer:r,view:a,snappingManager:o})},f=async({targetEntityId:r,targetEntityType:i,view:h,snappingManager:d})=>{await s({wkid:4326},h.spatialReference);const u=h.map?.activeLinkChartLayer?.layers.find(e=>e.objectType.name===i);if(!u)throw new e("LinkChartView:target-layer-not-found",`No layer found for target entity type ${i}`);const l=u.createQuery();l.objectIds=[r];const m=await u.queryFeatures(l);if(0===m.features.length)throw new e("LinkChartView:no-matching-feature-found",`No feature found with ID ${r} in layer ${u.title}`);const g=m.features[0].clone(),f=g.attributes.ESRI__ID;if(!g.sourceLayer)throw new e("LinkChartView:no-source-layer",`The target graphic does not have a source layer: ${f}`);const L=new c({listMode:"hide",internal:!0});g.geometry=n(new o(p(g.attributes.ESRI__LayoutGeometry,"esriGeometryPoint",!1,!1)),h.spatialReference),h.map.add(L),L.add(g);const v=g.sourceLayer,j=v.parent,M=new Map([[f,[]]]),C=new Map,b=new Map,R=await w(r,u,h),_=new Map;for(const e of j.layers)_.set(e.objectType.name,e);const x=new Map;for(const[e,t]of j.sublayerIdsCache)j.dataManager.relationshipTypeNames.has(e)&&x.set(e,Array.from(t));const D=await I(f,v.objectType.name,j.knowledgeGraph,x),E=j.entityLinkChartDiagramLookup.get(f);for(const e of D){let t=C.get(e.id);if(t||(t=j.relationshipLinkChartDiagramLookup.get(e.id),C.set(e.id,t??null)),t){const r=_.get(e.typeName);r&&a(t.coords[0],E.coords[0])&&a(t.coords[1],E.coords[1])?M.get(f)?.push({objectId:e.id,pathIndex:0,vertexIndex:0,associatedSublayer:r}):r&&a(t.coords.at(-2),E.coords[0])&&a(t.coords.at(-1),E.coords[1])&&M.get(f)?.push({objectId:e.id,pathIndex:0,vertexIndex:t.coords.length/2-1,associatedSublayer:r})}}const F=e=>new k(e,b,M,h),G=await y.newReshapeWrapper({getFeatureReshapeProvider:F,targetGraphic:g,reshapeGraphicsLayer:L,view:h,snappingManager:d});G.on("move-stop",e=>{h.emit("node-movement-stop",e)});const T=t(()=>{R.remove(),L.removeAll(),h.map.remove(L),L.destroy(),b.clear(),C.clear(),G.destroy()});return{currentReshapeGraphic:G.graphic,localEdits:b,originalRelationshipGeometries:C,teardownHandle:T}},w=async(e,t,r)=>{const a=await r.whenLayerView(t);return a.setVisibility(e,!1),{remove:()=>a.setVisibility(e,!0)}},I=async(e,t,r,a,o)=>{const i={sourceId:e},s=[],n=[];for(const[h,d]of a){const e=`${h}_ids`;i[e]=d,n.push(`Match (n:${t}) WHERE id(n) = $sourceId WITH n MATCH (n)-[r:${h}]-() WHERE ID(r) IN $${e} RETURN {id: ID(r), typeName: type(r)} as result`)}const c=n.join(" UNION "),p=(await h.executeQueryStreaming(new u(JSON.parse(JSON.stringify(r))),new d({openCypherQuery:c,bindParameters:i}),o)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;t.forEach(e=>{s.push(e[0].properties)})}return s};class L{constructor(e,t){this.modifiedFeatures=new Map,this.updating=!1,this._totalDx=0,this._totalDy=0,this._localEditsCache=e,this._view=t}async initializeModifiedFeatures(e){const t=new Map;for(const r of this._view.map?.activeLinkChartLayer?.layers??[]){const e=r;t.set(e.objectType.name,e)}const a=new Map;for(const o of e){const t=this._localEditsCache.get(o.objectId);if(t)this.initializeModifiedFeature(t,e);else{r(a,o.associatedSublayer.objectType.name,()=>[]).push(o.objectId)}}for(const[r,o]of a){const a=t.get(r),i=a.createQuery();i.outFields=["ESRI__ID"],i.objectIds=o,a.queryFeatures(i).then(t=>{for(const r of t.features)this.initializeModifiedFeature(this.makeModifiedFeature(r,a),e)})}}makeModifiedFeature(e,t){const r=e.attributes.ESRI__ID,a={graphic:e,layer:t,originalGraphic:e.clone(),uniqueId:r};return this._localEditsCache.set(r,a),a}initializeModifiedFeature(e,t){const r=t.filter(({objectId:t})=>t===e.uniqueId);this.modifiedFeatures.set(e,r);let a=e.graphic.geometry;const o=e.graphic.sourceLayer,s=o.parent;if(!a&&"relationship"===o.graphType){const t=s.relationshipLinkChartDiagramLookup.get(e.uniqueId);a=new i(p(t,"esriGeometryPolyline",!1,!1))}let n=a.clone();for(const{pathIndex:i,vertexIndex:c}of r)n=this.getTranslatedGeometry(a,i,c,this._totalDx,this._totalDy);e.graphic.geometry=n,s.relationshipLinkChartDiagramLookup.get(e.uniqueId)&&(s.relationshipLinkChartDiagramLookup.set(e.uniqueId,null),o.refreshCachedQueryEngine().then(()=>{o.emit("refresh",{dataChanged:!0})}))}translate(e,t){this._totalDx+=e,this._totalDy+=t;const r=new Set;for(const[a,o]of this.modifiedFeatures){let s=a.graphic.geometry;const n=a.graphic.sourceLayer,c=n.parent;if(n&&!a.graphic.geometry&&"relationship"===n.graphType){const e=c.relationshipLinkChartDiagramLookup.get(a.uniqueId);s=new i(p(e,"esriGeometryPolyline",!1,!1))}for(const i of o){if(!s)continue;const o=this.getTranslatedGeometry(s,i.pathIndex,i.vertexIndex,e,t);a.graphic.geometry=o,c.relationshipLinkChartDiagramLookup.get(a.uniqueId)&&(c.relationshipLinkChartDiagramLookup.set(a.uniqueId,null),r.add(n))}}for(const a of r)a.refreshCachedQueryEngine().then(()=>{a.emit("refresh",{dataChanged:!0})});return Array.from(this.modifiedFeatures.keys())}getTranslatedGeometry(e,t,r,a,i){const s=new o({x:a,y:i,spatialReference:this._view.spatialReference}),c=n(s,{wkid:4326}),p=e.clone(),h=e.paths.slice();return null==h.at(t)?.at(r)||(h[t][r][0]+=c?.x??0,h[t][r][1]+=c?.y??0,p.paths=h),p}}class k extends L{constructor(e,t,r,a){super(t,a),this._connectedVerticesLookup=r;const o=[];for(const i of e){const e=this.getConnectedVerticesForFeature(i);for(const t of e)o.push(t)}this.initializeModifiedFeatures(o)}getConnectedVerticesForFeature(e){return this._connectedVerticesLookup.get(e.graphic.attributes.ESRI__ID)??[]}}export{k as ConnectedFeatureReshapeProvider,f as startNodeMovement,y as wrapperObject};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../request.js";import i from"../../core/Error.js";import r from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{Integer as n,ensureClass as o}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as a}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import u from"../../geometry/Point.js";import c from"../../geometry/SpatialReference.js";import{getInfo as p}from"../../geometry/support/spatialReferenceUtils.js";import{sanitizeUrl as d}from"../support/arcgisLayerUrl.js";import{url as h}from"../support/commonProperties.js";import f from"../support/DimensionalDefinition.js";import y from"../support/MultidimensionalSubset.js";import{interpolationKebab as g}from"../support/rasterEnums.js";import b from"../support/RasterFunction.js";import R from"../support/TileInfo.js";import{isFunctionRaster as I}from"../support/rasterDatasets/datasetUtils.js";import x from"../support/rasterDatasets/FunctionRaster.js";import{getEffectiveMultidimensionalDefinition as S,getDefaultVariableInfo as v,isMultiSliceOrRangeDefinition as w,convertOleDateTimeToEpoch as F,getSubsetVariablesFromMdInfo as _,getDefaultMultidimensionalDefinition as j}from"../support/rasterDatasets/multidimensionalUtils.js";import{snapToRaster as D,clip as J}from"../support/rasterFunctions/clipUtils.js";import{create as N}from"../support/rasterFunctions/rasterFunctionHelper.js";import{load as T,projectExtent as O,projectPolygon as z}from"../support/rasterFunctions/rasterProjectionHelper.js";import{computeStatisticsHistograms as H}from"../support/rasterFunctions/stretchUtils.js";import{getVariableRasterInfo as P,getDefaultInterpolation as E,matchPresetRenderer as C,getDefaultBandCombination as M,getFunctionColorRamp as U,createDefaultRenderer as q,normalizeRendererJSON as L}from"../../renderers/support/rasterRendererHelper.js";import B from"../../renderers/support/RasterSymbolizer.js";import{websceneRasterRendererTypes as k,rasterRendererTypes as A,read as V}from"../../renderers/support/rasterTypeUtils.js";import $ from"../../rest/support/ImageHistogramParameters.js";import G from"../../rest/support/ImageSample.js";import W from"../../rest/support/ImageSampleParameters.js";import K from"../../rest/support/ImageSampleResult.js";const Q=1e3,X=X=>{const Y=X;let Z=class extends Y{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=I(e[0]?.raster)}destroy(){this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",d(e,r.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer;return V(r,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=o($,e).clone();const{serviceRasterInfo:r}=this;if(null==r)throw new i("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:a}=r;if(!s.spatialReference.equals(a)){await T();const e="extent"===s.type?O(s,a):z(s,a);if(null==e)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}const l=e.pixelSize??new u({x:r.pixelSize.x,y:r.pixelSize.y,spatialReference:a}),{extent:m,width:c,height:p}=D(r,n,l),d=await this.fetchPixels(m,c,p,{...t,interpolation:"nearest"});if(null==d.pixelBlock)throw new i("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const h=await J(d.pixelBlock,m,n),f=this._rasterJobHandler;return f?f.computeStatisticsHistograms({pixelBlock:h},t):H(h)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=S({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:r}=this.raster,s=v(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),n=s?.name,o=P(r,n);return this._updateSymbolizer(t,i,n,o)}async applyRenderer(e,t,i){const r=e?.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;await this.updateRenderer();const s=this.bandIds??[],{pixelBlock:n}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:s,symbolizer:this.symbolizer},i);return n}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const r=p(e);return R.create({size:256,spatialReference:e,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,i,r,s={}){if(ee(this),s.requestAsImageElement){const n=this.getTileUrl(e,i,r);return t(n,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then(e=>e.data)}const{serviceRasterInfo:n}=this;if(null!=n.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const t=s.tileInfo||n.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,i,r,t),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,i,r,s)}async fetchPixels(e,t,i,r={}){return null!=this.serviceRasterInfo.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition?{extent:e,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i),this.raster.fetchPixels(e,t,i,r))}async getSamples(e,t){if(await this.load(),(e=o(W,e).clone()).interpolation&&"nearest"!==e.interpolation)throw new i("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const r=e.mosaicRule?.multidimensionalDefinition,s={...t,multidimensionalDefinition:r},n=(await this._getSampleLocations(e)).map(e=>this.identify(e,s).then(t=>(t.location=e,t))),a=(await Promise.all(n)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new K({samples:a})}async identify(e,t={}){await this.load();const{raster:r,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo){if(!(s.hasMultidimensionalTranspose&&!(!w(t.multidimensionalDefinition)&&!t.transposedVariableName))&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:e,value:null}}const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new i("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");const o=this.serviceRasterInfo?.storageInfo.isBsqTile&&this.bandIds?.length?this.bandIds:void 0;return r.identify(e,{...t,bandIds:o})}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date(F(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return _(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=j(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&I(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;ee(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,I(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:i,type:r}=t;if("multipoint"===r)return t.points.map(e=>new u({x:e[0],y:e[1],spatialReference:i}));if("polyline"===r){let r=t;if(e.sampleCount||e.sampleDistance){const i=await import("../../geometry/operators/densifyOperator.js"),s=(await import("../../geometry/operators/lengthOperator.js")).execute(t,{unit:"meters"}),n=Math.min(e.sampleCount||100,Q);let o=e.sampleDistance;if(!o){o=s/(n+(2===r.paths[0].length?1:0))}r=i.execute(t,o,{unit:"meters"})}return r.paths.flatMap(e=>e.map(e=>new u({x:e[0],y:e[1],spatialReference:i})))}const s=Math.min(e.sampleCount||100,Q),n="extent"===t.type,o=n?t:t.extent,a=Math.sqrt(o.width*o.height/s),l=o.height/a,m=o.width/a,{xmin:c,ymax:p}=o,d=[];for(let h=0;h<l;h++)for(let e=0;e<m;e++){const r=new u({x:c+(e+.5)*a,y:p-(h+.5)*a,spatialReference:i});(n||t.contains(r))&&d.push(r)}return d}_configDefaultInterpolation(){if(null==this.interpolation){ee(this);const{raster:e}=this,t=E(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){ee(this);const{rasterInfo:t}=this.raster,i=v(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=C({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??M(t)),!this.renderer||"override"===e){const e=U(this.raster),i=n?.renderer??q(t,{bandIds:this.bandIds,variableName:s,rasterFunctionColorRamp:e}),r=t.statistics,o=r&&r.length>0?r[0]:null,a=o?.max??0,l=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(a>1e24||l<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const o=L({...this.renderer.toJSON(),variableName:s}),a=P(t,s);this.symbolizer?(this.symbolizer.rendererJSON=o,this.symbolizer.rasterInfo=a):this.symbolizer=new B({rendererJSON:o,rasterInfo:a});const l=this.symbolizer.bind();if(l.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=q(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else r.getLogger(this).warn("imagery-tile-mixin",l.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&I(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",b.fromJSON(e)))}let e,t=this.raster,i=!1;I(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:r}=this;if(r){const i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);const s=N(r.functionDefinition?.toJSON()??r.toJSON(),i),n=new x({rasterFunction:s});n.rasterJobHandler=this._rasterJobHandler,await n.open(),this.raster=n}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!r)return;const{bandIds:s}=this,{bandCount:n}=this.raster.rasterInfo,o=s?.length?s.some(e=>e>=n):n>=3;s&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,r=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),s=(i.pixelSize.x+i.pixelSize.y)/2*r;if(!e.dataSeries?.length)return[new G({location:e.location,pixelValue:e.value,locationId:t,resolution:s})];const n=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:r},o)=>{const a={Variables:r[0].variableName,Dimensions:r.flatMap(({dimensionName:e})=>e).join(",")};for(const{dimensionName:e,values:t}of r){a[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];a[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const l=new G({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:s,attributes:a});n.push(l)}),n}};function ee(e){if(!e.raster||!e.serviceRasterInfo)throw new i("imagery-tile","no raster")}return e([s({clonable:!1})],Z.prototype,"_cachedRasterFunctionJson",void 0),e([s({clonable:!1})],Z.prototype,"_compatibleFullExtent",void 0),e([s({clonable:!1})],Z.prototype,"_isConstructedFromFunctionRaster",void 0),e([s({clonable:!1})],Z.prototype,"_rasterFunctionUpdatePromise",void 0),e([s({type:[n],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],Z.prototype,"bandIds",void 0),e([s({json:{origins:{service:{read:{source:"copyrightText"}}}}})],Z.prototype,"copyright",void 0),e([s({json:{read:!1}})],Z.prototype,"fullExtent",null),e([s({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),a(g)],Z.prototype,"interpolation",void 0),e([s()],Z.prototype,"ioConfig",void 0),e([s({type:[f],json:{write:!0}})],Z.prototype,"multidimensionalDefinition",null),e([s({type:y,json:{write:!0}})],Z.prototype,"multidimensionalSubset",void 0),e([s()],Z.prototype,"raster",void 0),e([s({type:b})],Z.prototype,"rasterFunction",null),e([s()],Z.prototype,"serviceRasterInfo",void 0),e([s()],Z.prototype,"sourceJSON",void 0),e([s({readOnly:!0,type:c,json:{read:!1}})],Z.prototype,"spatialReference",void 0),e([s({type:R})],Z.prototype,"tileInfo",void 0),e([s(h)],Z.prototype,"url",null),e([s()],Z.prototype,"renderer",null),e([s({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:k,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],Z.prototype,"internalRenderer",null),e([l("internalRenderer")],Z.prototype,"readRenderer",null),e([s({clonable:!1})],Z.prototype,"symbolizer",void 0),Z=e([m("esri.layers.mixins.ImageryTileMixin")],Z),Z};export{X as ImageryTileMixin};
5
+ import{__decorate as e}from"tslib";import t from"../../request.js";import i from"../../core/Error.js";import r from"../../core/Logger.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import{Integer as n,ensureClass as o}from"../../core/accessorSupport/ensureType.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{enumeration as a}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as u}from"../../core/accessorSupport/decorators/subclass.js";import m from"../../geometry/Point.js";import p from"../../geometry/SpatialReference.js";import{getInfo as c}from"../../geometry/support/spatialReferenceUtils.js";import{sanitizeUrl as d}from"../support/arcgisLayerUrl.js";import{url as h}from"../support/commonProperties.js";import f from"../support/DimensionalDefinition.js";import y from"../support/MultidimensionalSubset.js";import{interpolationKebab as g}from"../support/rasterEnums.js";import b from"../support/RasterFunction.js";import R from"../support/TileInfo.js";import{isFunctionRaster as I}from"../support/rasterDatasets/datasetUtils.js";import x from"../support/rasterDatasets/FunctionRaster.js";import{getEffectiveMultidimensionalDefinition as S,getDefaultVariableInfo as w,isMultiSliceOrRangeDefinition as v,convertOleDateTimeToEpoch as F,getSubsetVariablesFromMdInfo as _,getDefaultMultidimensionalDefinition as j}from"../support/rasterDatasets/multidimensionalUtils.js";import{snapToRaster as D,clip as J}from"../support/rasterFunctions/clipUtils.js";import{create as N}from"../support/rasterFunctions/rasterFunctionHelper.js";import{load as T,projectExtent as O,projectPolygon as z}from"../support/rasterFunctions/rasterProjectionHelper.js";import{computeStatisticsHistograms as H}from"../support/rasterFunctions/stretchUtils.js";import{getVariableRasterInfo as P,getDefaultInterpolation as C,matchPresetRenderer as E,getDefaultBandCombination as M,getFunctionColorRamp as U,createDefaultRenderer as B,normalizeRendererJSON as q}from"../../renderers/support/rasterRendererHelper.js";import L from"../../renderers/support/RasterSymbolizer.js";import{websceneRasterRendererTypes as k,rasterRendererTypes as A,read as V}from"../../renderers/support/rasterTypeUtils.js";import $ from"../../rest/support/ImageHistogramParameters.js";import G from"../../rest/support/ImageSample.js";import W from"../../rest/support/ImageSampleParameters.js";import K from"../../rest/support/ImageSampleResult.js";const Q=1e3,X=X=>{const Y=X;let Z=class extends Y{constructor(...e){super(...e),this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=I(e[0]?.raster)}destroy(){this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",d(e,r.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer;return V(r,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=o($,e).clone();const{serviceRasterInfo:r}=this;if(null==r)throw new i("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:s}=e;if(null==s)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=s;const{spatialReference:a}=r;if(!s.spatialReference.equals(a)){await T();const e="extent"===s.type?O(s,a):z(s,a);if(null==e)throw new i("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}const l=e.pixelSize??new m({x:r.pixelSize.x,y:r.pixelSize.y,spatialReference:a}),{extent:u,width:p,height:c}=D(r,n,l),d=await this.fetchPixels(u,p,c,{...t,interpolation:"nearest"});if(null==d.pixelBlock)throw new i("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const h=await J(d.pixelBlock,u,n),f=this._rasterJobHandler;return f?f.computeStatisticsHistograms({pixelBlock:h},t):H(h)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=S({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:r}=this.raster,s=w(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),n=s?.name,o=P(r,n);return this._updateSymbolizer(t,i,n,o)}async applyRenderer(e,t,i){const r=e?.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;await this.updateRenderer();const s=this.bandIds??[],{pixelBlock:n}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:s,symbolizer:this.symbolizer},i);return n}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&I(t)){const i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const r=c(e);return R.create({size:256,spatialReference:e,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,i,r,s={}){if(ee(this),s.requestAsImageElement){const n=this.getTileUrl(e,i,r);return t(n,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then(e=>e.data)}const{serviceRasterInfo:n}=this;if(null!=n.multidimensionalInfo&&null==(s=this.normalizeRasterFetchOptions(s)).multidimensionalDefinition){const t=s.tileInfo||n.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,i,r,t),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,i,r,s)}async fetchPixels(e,t,i,r={}){return null!=this.serviceRasterInfo.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition?{extent:e,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i),this.raster.fetchPixels(e,t,i,r))}async getSamples(e,t){if(await this.load(),(e=o(W,e).clone()).interpolation&&"nearest"!==e.interpolation)throw new i("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const r=e.mosaicRule?.multidimensionalDefinition,s={...t,multidimensionalDefinition:r},n=(await this._getSampleLocations(e)).map(e=>this.identify(e,s).then(t=>(t.location=e,t))),a=(await Promise.all(n)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new K({samples:a})}async identify(e,t={}){await this.load();const{raster:r,serviceRasterInfo:s}=this;if(null!=s?.multidimensionalInfo){if(!(s.hasMultidimensionalTranspose&&!(!v(t.multidimensionalDefinition)&&!t.transposedVariableName))&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:e,value:null}}const n=this.multidimensionalSubset?.areaOfInterest;if(n&&!n.contains(e))throw new i("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");let o;if(this.serviceRasterInfo?.storageInfo.isBsqTile){const e=I(r)?this.getRawDisplayBandIds():this.bandIds;o=e?.length?e:void 0}return r.identify(e,{...t,bandIds:o})}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date(F(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return _(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=j(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&I(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;ee(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,I(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:i,type:r}=t;if("multipoint"===r)return t.points.map(e=>new m({x:e[0],y:e[1],spatialReference:i}));if("polyline"===r){let r=t;if(e.sampleCount||e.sampleDistance){const i=await import("../../geometry/operators/densifyOperator.js"),s=(await import("../../geometry/operators/lengthOperator.js")).execute(t,{unit:"meters"}),n=Math.min(e.sampleCount||100,Q);let o=e.sampleDistance;if(!o){o=s/(n+(2===r.paths[0].length?1:0))}r=i.execute(t,o,{unit:"meters"})}return r.paths.flatMap(e=>e.map(e=>new m({x:e[0],y:e[1],spatialReference:i})))}const s=Math.min(e.sampleCount||100,Q),n="extent"===t.type,o=n?t:t.extent,a=Math.sqrt(o.width*o.height/s),l=o.height/a,u=o.width/a,{xmin:p,ymax:c}=o,d=[];for(let h=0;h<l;h++)for(let e=0;e<u;e++){const r=new m({x:p+(e+.5)*a,y:c-(h+.5)*a,spatialReference:i});(n||t.contains(r))&&d.push(r)}return d}_configDefaultInterpolation(){if(null==this.interpolation){ee(this);const{raster:e}=this,t=C(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){ee(this);const{rasterInfo:t}=this.raster,i=w(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=i?.name,n=E({variableName:s,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=n?.bandIds??M(t)),!this.renderer||"override"===e){const e=U(this.raster),i=n?.renderer??B(t,{bandIds:this.bandIds,variableName:s,rasterFunctionColorRamp:e}),r=t.statistics,o=r&&r.length>0?r[0]:null,a=o?.max??0,l=o?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(a>1e24||l<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const o=q({...this.renderer.toJSON(),variableName:s}),a=P(t,s);this.symbolizer?(this.symbolizer.rendererJSON=o,this.symbolizer.rasterInfo=a):this.symbolizer=new L({rendererJSON:o,rasterInfo:a});const l=this.symbolizer.bind();if(l.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=B(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else r.getLogger(this).warn("imagery-tile-mixin",l.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&I(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",b.fromJSON(e)))}let e,t=this.raster,i=!1;I(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:r}=this;if(r){const i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);const s=N(r.functionDefinition?.toJSON()??r.toJSON(),i),n=new x({rasterFunction:s});n.rasterJobHandler=this._rasterJobHandler,await n.open(),this.raster=n}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!r)return;const{bandIds:s}=this,{bandCount:n}=this.raster.rasterInfo,o=s?.length?s.some(e=>e>=n):n>=3;s&&(o||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,r=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),s=(i.pixelSize.x+i.pixelSize.y)/2*r;if(!e.dataSeries?.length)return[new G({location:e.location,pixelValue:e.value,locationId:t,resolution:s})];const n=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:r},o)=>{const a={Variables:r[0].variableName,Dimensions:r.flatMap(({dimensionName:e})=>e).join(",")};for(const{dimensionName:e,values:t}of r){a[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];a[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const l=new G({location:e.location,pixelValue:i,rasterId:o,locationId:t,resolution:s,attributes:a});n.push(l)}),n}};function ee(e){if(!e.raster||!e.serviceRasterInfo)throw new i("imagery-tile","no raster")}return e([s({clonable:!1})],Z.prototype,"_cachedRasterFunctionJson",void 0),e([s({clonable:!1})],Z.prototype,"_compatibleFullExtent",void 0),e([s({clonable:!1})],Z.prototype,"_isConstructedFromFunctionRaster",void 0),e([s({clonable:!1})],Z.prototype,"_rasterFunctionUpdatePromise",void 0),e([s({type:[n],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],Z.prototype,"bandIds",void 0),e([s({json:{origins:{service:{read:{source:"copyrightText"}}}}})],Z.prototype,"copyright",void 0),e([s({json:{read:!1}})],Z.prototype,"fullExtent",null),e([s({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),a(g)],Z.prototype,"interpolation",void 0),e([s()],Z.prototype,"ioConfig",void 0),e([s({type:[f],json:{write:!0}})],Z.prototype,"multidimensionalDefinition",null),e([s({type:y,json:{write:!0}})],Z.prototype,"multidimensionalSubset",void 0),e([s()],Z.prototype,"raster",void 0),e([s({type:b})],Z.prototype,"rasterFunction",null),e([s()],Z.prototype,"serviceRasterInfo",void 0),e([s()],Z.prototype,"sourceJSON",void 0),e([s({readOnly:!0,type:p,json:{read:!1}})],Z.prototype,"spatialReference",void 0),e([s({type:R})],Z.prototype,"tileInfo",void 0),e([s(h)],Z.prototype,"url",null),e([s()],Z.prototype,"renderer",null),e([s({types:A,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:k,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],Z.prototype,"internalRenderer",null),e([l("internalRenderer")],Z.prototype,"readRenderer",null),e([s({clonable:!1})],Z.prototype,"symbolizer",void 0),Z=e([u("esri.layers.mixins.ImageryTileMixin")],Z),Z};export{X as ImageryTileMixin};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const e={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,ArcGISVideoLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},r={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},a={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},S={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,Object3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":e,"web-map/basemap":r,"web-map/tables":a,"link-chart/operational-layers":{...e,LinkChartLayer:!0},"link-chart/basemap":r,"link-chart/tables":a,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0,WCS:!0},"portal-item/tables":{ArcGISFeatureLayer:!0,SubtypeGroupTable:!0}};export{S as supportedTypes};
5
+ const e={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,ArcGISVideoLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},r={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},a={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},S={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,Object3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap-base-layers":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap-ground-layers":{IntegratedMesh3DTilesLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":e,"web-map/basemap-base-layers":r,"web-map/tables":a,"link-chart/operational-layers":{...e,LinkChartLayer:!0},"link-chart/basemap-base-layers":r,"link-chart/tables":a,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0,WCS:!0},"portal-item/tables":{ArcGISFeatureLayer:!0,SubtypeGroupTable:!0}};export{S as supportedTypes};