@arcgis/core 4.34.0-next.117 → 4.34.0-next.119

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 (56) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{f7c99e9c8d19352af38d.js → 1847e8ac559085949f6d.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{9c571ff94911f7c4459a.js → 21f1e12d4e703b59c31c.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{7748356f4d848254fc66.js → 292403693cba4562a02d.js} +1 -1
  5. package/assets/esri/core/workers/chunks/4a38b1402cd48ced5d0f.js +1 -0
  6. package/assets/esri/core/workers/chunks/6d5f36fdd6ff081f30e8.js +1 -0
  7. package/assets/esri/core/workers/chunks/{061ffb84aeb5bacebbc8.js → 98ccd88bdb9cb96a7610.js} +1 -1
  8. package/assets/esri/core/workers/chunks/b113d4f6a014863aaf66.js +1 -0
  9. package/assets/esri/core/workers/chunks/{c8d58ceb142f2be9106f.js → f18fdfcb3d5d7851e6fc.js} +1 -1
  10. package/assets/esri/core/workers/chunks/f619ab4a3ff3036641a9.js +1 -0
  11. package/chunks/GlowComposition.glsl.js +46 -46
  12. package/chunks/ShadedColorMaterial.glsl.js +10 -10
  13. package/config.js +1 -1
  14. package/editing/templateUtils.js +1 -1
  15. package/interfaces.d.ts +147 -32
  16. package/kernel.js +1 -1
  17. package/layers/PointCloudLayer.js +1 -1
  18. package/layers/SceneLayer.js +1 -1
  19. package/layers/VideoLayer.js +1 -1
  20. package/layers/mixins/SceneService.js +1 -1
  21. package/libs/parquet/parquet.js +1 -1
  22. package/package.json +1 -1
  23. package/renderers/support/RasterSymbolizer.js +1 -1
  24. package/support/revision.js +1 -1
  25. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  26. package/symbols/cim/cimAnalyzer.js +1 -1
  27. package/undoredo/support/ServiceVersionInfo.js +1 -1
  28. package/undoredo/support/Services.js +1 -1
  29. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
  30. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  31. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  32. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  33. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  34. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  35. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  36. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  37. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  38. package/widgets/Editor/VisibleElements.js +1 -1
  39. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  40. package/widgets/Editor/workflowUtils.js +1 -1
  41. package/widgets/Editor.js +1 -1
  42. package/widgets/FeatureTable/FieldColumn.js +1 -1
  43. package/widgets/FeatureTable/Grid/Column.js +1 -1
  44. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  45. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  46. package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
  47. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  48. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  49. package/widgets/OrientedImageryViewer.js +1 -1
  50. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  51. package/widgets/support/SelectionList/VisibleElements.js +1 -1
  52. package/widgets/support/SelectionList.js +1 -1
  53. package/assets/esri/core/workers/chunks/08eb477a375ef882eb2d.js +0 -1
  54. package/assets/esri/core/workers/chunks/0c23d180de581ad47290.js +0 -1
  55. package/assets/esri/core/workers/chunks/4a73622445536b8c55f1.js +0 -1
  56. package/assets/esri/core/workers/chunks/deb2854bb7d082a26f52.js +0 -1
package/interfaces.d.ts CHANGED
@@ -823,7 +823,7 @@ declare namespace __esri {
823
823
  */
824
824
  lineVisible: boolean;
825
825
  /**
826
- * Provides configuration options for visualizing an elevation profile line within a chart, such as its visibility.
826
+ * Provides configuration options, such as its visibility, for visualizing a specific elevation profile line within a chart.
827
827
  *
828
828
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfile-ElevationProfileLineChartOptions.html Read more...}
829
829
  */
@@ -996,7 +996,7 @@ declare namespace __esri {
996
996
  */
997
997
  lineVisible: boolean;
998
998
  /**
999
- * Provides configuration options for visualizing an elevation profile line within a view, such as its visibility.
999
+ * Provides configuration options, such as its visibility, for visualizing a specific elevation profile line within a view.
1000
1000
  *
1001
1001
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfile-ElevationProfileLineViewOptions.html Read more...}
1002
1002
  */
@@ -1037,7 +1037,8 @@ declare namespace __esri {
1037
1037
  */
1038
1038
  geometryVisualizationVisible: boolean;
1039
1039
  /**
1040
- * Provides configuration options for visualizing an elevation profile within a view.
1040
+ * Provides general configuration options for visualizing an elevation profile within a view,
1041
+ * independent of the profile line type.
1041
1042
  *
1042
1043
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfile-ElevationProfileViewOptions.html Read more...}
1043
1044
  */
@@ -1087,7 +1088,7 @@ declare namespace __esri {
1087
1088
  get displayUnits(): ElevationProfileDisplayUnits;
1088
1089
  set displayUnits(value: ElevationProfileDisplayUnitsProperties);
1089
1090
  /**
1090
- * Specifies how the geometry Z values are interpreted, for example to compute elevations for an
1091
+ * Specifies how the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#geometry geometry's} Z values are interpreted, for example to compute elevations for an
1091
1092
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfile-ElevationProfileLineInput.html input} profile line.
1092
1093
  *
1093
1094
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#elevationInfo Read more...}
@@ -1132,7 +1133,7 @@ declare namespace __esri {
1132
1133
  */
1133
1134
  displayUnits?: ElevationProfileDisplayUnitsProperties;
1134
1135
  /**
1135
- * Specifies how the geometry Z values are interpreted, for example to compute elevations for an
1136
+ * Specifies how the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#geometry geometry's} Z values are interpreted, for example to compute elevations for an
1136
1137
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfile-ElevationProfileLineInput.html input} profile line.
1137
1138
  *
1138
1139
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#elevationInfo Read more...}
@@ -45918,6 +45919,13 @@ declare namespace __esri {
45918
45919
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#buffered Read more...}
45919
45920
  */
45920
45921
  readonly buffered: number;
45922
+ /**
45923
+ * Represents available information about the sensor that captured the
45924
+ * stream data.
45925
+ *
45926
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#cameraInfo Read more...}
45927
+ */
45928
+ readonly cameraInfo: VideoLayerCameraInfo | nullish;
45921
45929
  /**
45922
45930
  * The capabilities of the video layer.
45923
45931
  *
@@ -45930,6 +45938,12 @@ declare namespace __esri {
45930
45938
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#codecs Read more...}
45931
45939
  */
45932
45940
  readonly codecs: Codecs | nullish;
45941
+ /**
45942
+ * The connection information for the video layer.
45943
+ *
45944
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#connectionInfo Read more...}
45945
+ */
45946
+ readonly connectionInfo: any | nullish;
45933
45947
  /**
45934
45948
  * The copyright information for the video layer.
45935
45949
  *
@@ -46026,6 +46040,12 @@ declare namespace __esri {
46026
46040
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#layerId Read more...}
46027
46041
  */
46028
46042
  readonly layerId: number | nullish;
46043
+ /**
46044
+ * Provides status details about an ongoing livestream playback.
46045
+ *
46046
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#livestreamStatus Read more...}
46047
+ */
46048
+ readonly livestreamStatus: LivestreamStatus | nullish;
46029
46049
  /**
46030
46050
  * Indicates if the video layer should loop.
46031
46051
  *
@@ -46078,6 +46098,12 @@ declare namespace __esri {
46078
46098
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#playbackRate Read more...}
46079
46099
  */
46080
46100
  playbackRate: number;
46101
+ /**
46102
+ * The URL for use with the video player.
46103
+ *
46104
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#playerUrl Read more...}
46105
+ */
46106
+ readonly playerUrl: string | nullish;
46081
46107
  /**
46082
46108
  * Indicates if the video layer is playing.
46083
46109
  *
@@ -46096,6 +46122,15 @@ declare namespace __esri {
46096
46122
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#qualities Read more...}
46097
46123
  */
46098
46124
  readonly qualities: ("sd" | "hd" | "fhd" | "qhd" | "uhd")[] | nullish;
46125
+ /**
46126
+ * Property is used to define orientation information to compute the
46127
+ * display angle of the sensor location symbol.
46128
+ *
46129
+ * @default { source: "platformHeading", symbolOffset: 0 }
46130
+ *
46131
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#sensorSymbolOrientation Read more...}
46132
+ */
46133
+ sensorSymbolOrientation: SensorSymbolOrientation;
46099
46134
  /**
46100
46135
  * The ArcGIS Enterprise Portal item id of the video service.
46101
46136
  *
@@ -46429,6 +46464,13 @@ declare namespace __esri {
46429
46464
  sensorSymbol?: | (SimpleMarkerSymbolProperties & { type: "simple-marker" })
46430
46465
  | (PictureMarkerSymbolProperties & { type: "picture-marker" })
46431
46466
  | (CIMSymbolProperties & { type: "cim" });
46467
+ /**
46468
+ * Property is used to define orientation information to compute the
46469
+ * display angle of the sensor location symbol.
46470
+ *
46471
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#sensorSymbolOrientation Read more...}
46472
+ */
46473
+ sensorSymbolOrientation?: SensorSymbolOrientation;
46432
46474
  /**
46433
46475
  * A {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleLineSymbol.html SimpleLineSymbol} used for representing the trailing line of travel of a moving video collection sensor.
46434
46476
  *
@@ -46468,6 +46510,21 @@ declare namespace __esri {
46468
46510
  volume?: number;
46469
46511
  }
46470
46512
 
46513
+ /**
46514
+ * The **CameraInfo** is an object that represents the camera information of the video layer.
46515
+ *
46516
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#CameraInfo Read more...}
46517
+ */
46518
+ export interface VideoLayerCameraInfo {
46519
+ farDistance: number;
46520
+ fov: number;
46521
+ heading: number;
46522
+ height: number;
46523
+ nearDistance: number;
46524
+ position: CameraInfoPosition;
46525
+ tilt: number;
46526
+ }
46527
+
46471
46528
  /**
46472
46529
  * The **Codecs** is an object that represents the codecs used by the video layer.
46473
46530
  *
@@ -46479,6 +46536,31 @@ declare namespace __esri {
46479
46536
  video: string;
46480
46537
  }
46481
46538
 
46539
+ /**
46540
+ * The **LivestreamStatus** is an object that represents the livestream status of a video layer.
46541
+ *
46542
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#LivestreamStatus Read more...}
46543
+ */
46544
+ export interface LivestreamStatus {
46545
+ atLiveEdge: boolean | nullish;
46546
+ behindLiveEdge: boolean | nullish;
46547
+ liveCurrentTime: number | nullish;
46548
+ liveWindow: number | nullish;
46549
+ pastSeekEnd: number | nullish;
46550
+ seekableEnd: number | nullish;
46551
+ seekableStart: number | nullish;
46552
+ }
46553
+
46554
+ /**
46555
+ * The **SensorSymbolOrientation** type defines the orientation source and symbol offset for the sensor symbol.
46556
+ *
46557
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-VideoLayer.html#SensorSymbolOrientation Read more...}
46558
+ */
46559
+ export interface SensorSymbolOrientation {
46560
+ source: "platformHeading" | "cameraAzimuth";
46561
+ symbolOffset: number;
46562
+ }
46563
+
46482
46564
  export interface VideoLayerCapabilities {
46483
46565
  operations: VideoLayerCapabilitiesOperations;
46484
46566
  }
@@ -46535,6 +46617,14 @@ declare namespace __esri {
46535
46617
  type: "Video Layer";
46536
46618
  }
46537
46619
 
46620
+ export interface CameraInfoPosition {
46621
+ x: number;
46622
+ y: number;
46623
+ z?: number;
46624
+ m?: number;
46625
+ spatialReference?: SpatialReference | any;
46626
+ }
46627
+
46538
46628
  export interface ViewshedLayer extends Layer, OperationalLayer {
46539
46629
  }
46540
46630
 
@@ -96843,7 +96933,7 @@ declare namespace __esri {
96843
96933
  */
96844
96934
  readonly analysis: ElevationProfileAnalysis;
96845
96935
  /**
96846
- * Units used for all the results and statistics of the elevation profile analysis.
96936
+ * Units used for all the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#results results} and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#statistics statistics} of the elevation profile analysis.
96847
96937
  *
96848
96938
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#effectiveDisplayUnits Read more...}
96849
96939
  */
@@ -96855,13 +96945,13 @@ declare namespace __esri {
96855
96945
  */
96856
96946
  readonly error: ElevationProfileError | nullish;
96857
96947
  /**
96858
- * Points being hovered in the chart, in the view's spatial reference, computed from the `hoveredPosition` property.
96948
+ * Points being hovered in the chart, in the view's spatial reference, computed from the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#hoveredPosition hoveredPosition} property.
96859
96949
  *
96860
96950
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#hoveredPoints Read more...}
96861
96951
  */
96862
96952
  readonly hoveredPoints: (Point | nullish)[];
96863
96953
  /**
96864
- * The position, in [0, 1], being hovered in the elevation profile chart.
96954
+ * Property to track the position, in [0, 1], that is being hovered in the elevation profile chart.
96865
96955
  *
96866
96956
  * @default null
96867
96957
  *
@@ -96883,7 +96973,7 @@ declare namespace __esri {
96883
96973
  */
96884
96974
  readonly progress: number;
96885
96975
  /**
96886
- * Result of the elevation profile analysis.
96976
+ * Results of the elevation profile analysis.
96887
96977
  *
96888
96978
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-analysis-ElevationProfileAnalysisView2D.html#results Read more...}
96889
96979
  */
@@ -96922,7 +97012,7 @@ declare namespace __esri {
96922
97012
  */
96923
97013
  pickFeature(options?: ElevationProfileAnalysisView2DPickFeatureOptions | nullish): Promise<ElevationProfilePickResult>;
96924
97014
  /**
96925
- * Starts the interactive placement of a new input path for the elevation profile analysis.
97015
+ * Starts the interactive placement of a new input line for the elevation profile analysis.
96926
97016
  *
96927
97017
  * @param options An object specifying additional options.
96928
97018
  *
@@ -97622,7 +97712,7 @@ declare namespace __esri {
97622
97712
  */
97623
97713
  readonly analysis: ElevationProfileAnalysis;
97624
97714
  /**
97625
- * Units used for all the results and statistics of the elevation profile analysis.
97715
+ * Units used for all the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#results results} and {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#statistics statistics} of the elevation profile analysis.
97626
97716
  *
97627
97717
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#effectiveDisplayUnits Read more...}
97628
97718
  */
@@ -97634,13 +97724,13 @@ declare namespace __esri {
97634
97724
  */
97635
97725
  readonly error: ElevationProfileError | nullish;
97636
97726
  /**
97637
- * Points being hovered in the chart, in the view's spatial reference, computed from the `hoveredPosition` property.
97727
+ * Points being hovered in the chart, in the view's spatial reference, computed from the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#hoveredPosition hoveredPosition} property.
97638
97728
  *
97639
97729
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#hoveredPoints Read more...}
97640
97730
  */
97641
97731
  readonly hoveredPoints: (Point | nullish)[];
97642
97732
  /**
97643
- * The position, in [0, 1], being hovered in the elevation profile chart.
97733
+ * Property to track the position, in [0, 1], that is being hovered in the elevation profile chart.
97644
97734
  *
97645
97735
  * @default null
97646
97736
  *
@@ -97662,7 +97752,7 @@ declare namespace __esri {
97662
97752
  */
97663
97753
  readonly progress: number;
97664
97754
  /**
97665
- * Result of the elevation profile analysis.
97755
+ * Results of the elevation profile analysis.
97666
97756
  *
97667
97757
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-ElevationProfileAnalysisView3D.html#results Read more...}
97668
97758
  */
@@ -97693,7 +97783,7 @@ declare namespace __esri {
97693
97783
  visible: boolean;
97694
97784
  constructor(properties?: any);
97695
97785
  /**
97696
- * Starts an interactive operation to pick a feature in the view to use as the input for the elevation profile analysis.
97786
+ * Starts an interactive operation to pick a line feature in the view to use as the input for the elevation profile analysis.
97697
97787
  *
97698
97788
  * @param options An object specifying additional options.
97699
97789
  *
@@ -97701,7 +97791,7 @@ declare namespace __esri {
97701
97791
  */
97702
97792
  pickFeature(options?: ElevationProfileAnalysisView3DPickFeatureOptions | nullish): Promise<ElevationProfilePickResult>;
97703
97793
  /**
97704
- * Starts the interactive placement of a new input path for the elevation profile analysis.
97794
+ * Starts the interactive placement of a new input line for the elevation profile analysis.
97705
97795
  *
97706
97796
  * @param options An object specifying additional options.
97707
97797
  *
@@ -98787,7 +98877,7 @@ declare namespace __esri {
98787
98877
  */
98788
98878
  readonly available: boolean;
98789
98879
  /**
98790
- * The profile line whose elevation is represented by this result.
98880
+ * The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-ElevationProfileAnalysis.html#profiles profile line} whose elevation is represented by this result.
98791
98881
  *
98792
98882
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-analysis-ElevationProfile-ElevationProfileResult.html#profile Read more...}
98793
98883
  */
@@ -115929,7 +116019,7 @@ declare namespace __esri {
115929
116019
  */
115930
116020
  yearPlaying: boolean;
115931
116021
  /**
115932
- * Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html Daylight} widget and {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-daylight/ component}.
116022
+ * Provides the logic for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight.html Daylight} widget.
115933
116023
  *
115934
116024
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Daylight-DaylightViewModel.html Read more...}
115935
116025
  */
@@ -117959,25 +118049,44 @@ declare namespace __esri {
117959
118049
  interface EditsProperties {
117960
118050
  }
117961
118051
 
117962
- /**
117963
- * A read-only class containing the logic used when merging features using the
117964
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html Editor} widget.
117965
- *
117966
- * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-MergeFeaturesWorkflow.html Read more...}
117967
- */
117968
- interface MergeFeaturesWorkflow {
118052
+ export class MergeFeaturesWorkflow extends Workflow {
118053
+ /**
118054
+ * The instance of
118055
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureForm-FeatureFormViewModel.html FeatureFormViewModel} used by the
118056
+ * workflow to manage the attributes of the resulting features.
118057
+ *
118058
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-MergeFeaturesWorkflow.html#formViewModel Read more...}
118059
+ */
117969
118060
  readonly formViewModel: FeatureFormViewModel;
118061
+ /**
118062
+ * The layer to which the features being merged belong.
118063
+ *
118064
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-MergeFeaturesWorkflow.html#layer Read more...}
118065
+ */
117970
118066
  readonly layer: | GeoJSONLayer
117971
- | FeatureLayer
117972
- | OrientedImageryLayer
117973
- | SceneLayer
117974
- | SubtypeSublayer
117975
- | KnowledgeGraphSublayer
117976
- | nullish;
118067
+ | FeatureLayer
118068
+ | OrientedImageryLayer
118069
+ | SceneLayer
118070
+ | SubtypeSublayer
118071
+ | KnowledgeGraphSublayer
118072
+ | nullish;
118073
+ /**
118074
+ * The type of the workflow.
118075
+ *
118076
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-MergeFeaturesWorkflow.html#type Read more...}
118077
+ */
117977
118078
  readonly type: "merge-features";
118079
+ /**
118080
+ * A read-only class containing the logic used when merging features using the
118081
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor.html Editor} widget.
118082
+ *
118083
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-MergeFeaturesWorkflow.html Read more...}
118084
+ */
118085
+ constructor(properties?: MergeFeaturesWorkflowProperties);
117978
118086
  }
117979
118087
 
117980
- export const MergeFeaturesWorkflow: MergeFeaturesWorkflow;
118088
+ interface MergeFeaturesWorkflowProperties extends WorkflowProperties {
118089
+ }
117981
118090
 
117982
118091
  /**
117983
118092
  * This object contains data for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Editor-MergeFeaturesWorkflow.html MergeFeaturesWorkflow}.
@@ -118620,6 +118729,9 @@ declare namespace __esri {
118620
118729
  flow?: boolean;
118621
118730
  sketch?: boolean;
118622
118731
  undoRedoButtons?: boolean;
118732
+ zoomToButton?: boolean;
118733
+ splitButton?: boolean;
118734
+ mergeButton?: boolean;
118623
118735
  snappingControls?: boolean;
118624
118736
  snappingControlsElements?: VisibleElementsSnappingControlsElementsProperties;
118625
118737
  }
@@ -118640,6 +118752,9 @@ declare namespace __esri {
118640
118752
  flow: boolean;
118641
118753
  sketch: boolean;
118642
118754
  undoRedoButtons: boolean;
118755
+ zoomToButton: boolean;
118756
+ splitButton: boolean;
118757
+ mergeButton: boolean;
118643
118758
  snappingControls: boolean;
118644
118759
  }
118645
118760
 
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.117",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.119",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 r from"../PopupTemplate.js";import t from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import i from"../core/Error.js";import{clone as s}from"../core/lang.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as p}from"../core/object.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{join as d}from"../core/urlUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{writer as y}from"../core/accessorSupport/decorators/writer.js";import f from"../graphic/PointCloudGraphicOrigin.js";import h from"./Layer.js";import{APIKeyMixin as g}from"./mixins/APIKeyMixin.js";import{ArcGISService as v}from"./mixins/ArcGISService.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as w}from"./mixins/OperationalLayer.js";import{PortalLayer as I}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as b}from"./mixins/ScaleRangeLayer.js";import{SceneService as S}from"./mixins/SceneService.js";import{types as x}from"./pointCloudFilters/typeUtils.js";import{popupEnabled as T,elevationInfo as P,legendEnabled as F}from"./support/commonProperties.js";import L from"./support/Field.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import O from"../popup/ExpressionInfo.js";import{types as _}from"../renderers/support/pointCloud/typeUtils.js";import{logInvalidElevationInfoWarning as N,elevationModeRequiredMessage as E,featureExpressionUnsupportedMessage as R}from"../support/elevationInfoUtils.js";import{createPopupTemplate as A}from"../support/popupUtils.js";const U=C();let V=class extends(S(v(w(I(b(a(j(g(o(h)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud",this.graphicOrigin=new f(this)}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const r=this.fieldsIndex.get(e);return r?.domain?r.domain:null}readServiceFields(e,r,t){return Array.isArray(e)?e.map(e=>{const r=new L;return"FieldTypeInteger"===e.type&&((e=s(e)).type="esriFieldTypeInteger"),r.read(e,t),r}):Array.isArray(r.attributeStorageInfo)?r.attributeStorageInfo.map(e=>new L({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,r,t,o){p("layerDefinition.drawingInfo.renderer",e.write({},o),r)}load(e){const r=null!=e?e.signal:null,t=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l).then(()=>this._fetchService(r));return this.addResolvingPromise(t),Promise.resolve(this)}createPopupTemplate(e){const r=A(this,e);return r&&(this._formatPopupTemplateReturnsField(r),this._formatPopupTemplateRGBField(r)),r}_formatPopupTemplateReturnsField(e){const r=this.fieldsIndex.get("RETURNS");if(!r)return;const t=e.fieldInfos?.find(e=>e.fieldName===r.name);if(!t)return;const o=new O({name:"pcl-returns-decoded",title:r.alias||r.name,expression:`\n var returnValue = $feature.${r.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],o],t.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const r=this.fieldsIndex.get("RGB");if(!r)return;const t=e.fieldInfos?.find(e=>e.fieldName===r.name);if(!t)return;const o=new O({name:"pcl-rgb-decoded",title:r.alias||r.name,expression:`\n var rgb = $feature.${r.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],o],t.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,r){if(await this.load(r),!this.attributeStorageInfo)throw new i("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const o=this.fieldsIndex.get(e);if(!o)throw new i("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.attributeStorageInfo)if(i.name===o.name){const e=d(this.parsedUrl?.path??"",`./statistics/${i.key}`);return t(e,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:r?r.signal:null}).then(e=>e.data)}throw new i("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,r){return this._debouncedSaveOperations(1,{...r,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new i("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new i("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new i("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(r=>r.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){N(n.getLogger(this),E("Point cloud layers","absolute-height",e)),N(n.getLogger(this),R("Point cloud layers",e))}};e([u({type:["PointCloudLayer"]})],V.prototype,"operationalLayerType",void 0),e([u(T)],V.prototype,"popupEnabled",void 0),e([u({type:r,json:{name:"popupInfo",write:!0}})],V.prototype,"popupTemplate",void 0),e([u({readOnly:!0,json:{read:!1}})],V.prototype,"defaultPopupTemplate",null),e([u({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],V.prototype,"opacity",void 0),e([u({type:["show","hide"]})],V.prototype,"listMode",void 0),e([u({types:[x],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],V.prototype,"filters",void 0),e([u({type:[L]})],V.prototype,"fields",void 0),e([u(U.fieldsIndex)],V.prototype,"fieldsIndex",void 0),e([m("service","fields",["fields","attributeStorageInfo"])],V.prototype,"readServiceFields",null),e([u(U.outFields)],V.prototype,"outFields",void 0),e([u({readOnly:!0})],V.prototype,"attributeStorageInfo",void 0),e([u(P)],V.prototype,"elevationInfo",null),e([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],V.prototype,"path",void 0),e([u(F)],V.prototype,"legendEnabled",void 0),e([u({types:_,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:_},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],V.prototype,"renderer",void 0),e([y("renderer")],V.prototype,"writeRenderer",null),e([u({json:{read:!1},readOnly:!0})],V.prototype,"type",void 0),e([u({readOnly:!0})],V.prototype,"graphicOrigin",void 0),V=e([c("esri.layers.PointCloudLayer")],V);const K=V;export{K as default};
5
+ import{__decorate as e}from"tslib";import r from"../PopupTemplate.js";import t from"../request.js";import{ClonableMixin as o}from"../core/Clonable.js";import i from"../core/Error.js";import{clone as s}from"../core/lang.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as a}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as p}from"../core/object.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{join as d}from"../core/urlUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import{writer as y}from"../core/accessorSupport/decorators/writer.js";import f from"../graphic/PointCloudGraphicOrigin.js";import h from"./Layer.js";import{APIKeyMixin as g}from"./mixins/APIKeyMixin.js";import{ArcGISService as v}from"./mixins/ArcGISService.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as j}from"./mixins/OperationalLayer.js";import{PortalLayer as I}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as b}from"./mixins/ScaleRangeLayer.js";import{SceneService as P,updateExtentFromPageObb as x}from"./mixins/SceneService.js";import{types as S}from"./pointCloudFilters/typeUtils.js";import{popupEnabled as T,elevationInfo as F,legendEnabled as _}from"./support/commonProperties.js";import L from"./support/Field.js";import{defineFieldProperties as C}from"./support/fieldProperties.js";import R from"../popup/ExpressionInfo.js";import{types as E}from"../renderers/support/pointCloud/typeUtils.js";import{logInvalidElevationInfoWarning as O,elevationModeRequiredMessage as N,featureExpressionUnsupportedMessage as A}from"../support/elevationInfoUtils.js";import{createPopupTemplate as U}from"../support/popupUtils.js";const K=C();let V=class extends(P(v(j(I(b(a(w(g(o(h)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud",this.graphicOrigin=new f(this),this.rootPagePromise=null}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const r=this.fieldsIndex.get(e);return r?.domain?r.domain:null}readServiceFields(e,r,t){return Array.isArray(e)?e.map(e=>{const r=new L;return"FieldTypeInteger"===e.type&&((e=s(e)).type="esriFieldTypeInteger"),r.read(e,t),r}):Array.isArray(r.attributeStorageInfo)?r.attributeStorageInfo.map(e=>new L({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,r,t,o){p("layerDefinition.drawingInfo.renderer",e.write({},o),r)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l),await this._fetchService(e?.signal),await this._fetchRootPageAndUpdateExtent(e?.signal)}async _fetchRootPageAndUpdateExtent(e){this.rootPagePromise=this._fetchRootPage(e);const{fullExtent:r}=this;if(null!=r&&!r.hasZ){const e=await this.rootPagePromise;x(r,e?.nodes?.[0]?.obb)}}async _fetchRootPage(e){const r=`${this.parsedUrl?.path??""}/nodepages/0`;try{return(await t(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data}catch(o){throw new i("pointcloudlayer:root-page-missing","Root page missing.",{error:o,url:r})}}createPopupTemplate(e){const r=U(this,e);return r&&(this._formatPopupTemplateReturnsField(r),this._formatPopupTemplateRGBField(r)),r}_formatPopupTemplateReturnsField(e){const r=this.fieldsIndex.get("RETURNS");if(!r)return;const t=e.fieldInfos?.find(e=>e.fieldName===r.name);if(!t)return;const o=new R({name:"pcl-returns-decoded",title:r.alias||r.name,expression:`\n var returnValue = $feature.${r.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],o],t.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const r=this.fieldsIndex.get("RGB");if(!r)return;const t=e.fieldInfos?.find(e=>e.fieldName===r.name);if(!t)return;const o=new R({name:"pcl-rgb-decoded",title:r.alias||r.name,expression:`\n var rgb = $feature.${r.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],o],t.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,r){if(await this.load(r),!this.attributeStorageInfo)throw new i("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const o=this.fieldsIndex.get(e);if(!o)throw new i("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.attributeStorageInfo)if(i.name===o.name){const e=d(this.parsedUrl?.path??"",`./statistics/${i.key}`);return t(e,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:r?r.signal:null}).then(e=>e.data)}throw new i("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,r){return this._debouncedSaveOperations(1,{...r,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new i("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new i("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new i("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(r=>r.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){O(n.getLogger(this),N("Point cloud layers","absolute-height",e)),O(n.getLogger(this),A("Point cloud layers",e))}};e([u({type:["PointCloudLayer"]})],V.prototype,"operationalLayerType",void 0),e([u(T)],V.prototype,"popupEnabled",void 0),e([u({type:r,json:{name:"popupInfo",write:!0}})],V.prototype,"popupTemplate",void 0),e([u({readOnly:!0,json:{read:!1}})],V.prototype,"defaultPopupTemplate",null),e([u({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],V.prototype,"opacity",void 0),e([u({type:["show","hide"]})],V.prototype,"listMode",void 0),e([u({types:[S],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],V.prototype,"filters",void 0),e([u({type:[L]})],V.prototype,"fields",void 0),e([u(K.fieldsIndex)],V.prototype,"fieldsIndex",void 0),e([m("service","fields",["fields","attributeStorageInfo"])],V.prototype,"readServiceFields",null),e([u(K.outFields)],V.prototype,"outFields",void 0),e([u({readOnly:!0})],V.prototype,"attributeStorageInfo",void 0),e([u(F)],V.prototype,"elevationInfo",null),e([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],V.prototype,"path",void 0),e([u(_)],V.prototype,"legendEnabled",void 0),e([u({types:E,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:E},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],V.prototype,"renderer",void 0),e([y("renderer")],V.prototype,"writeRenderer",null),e([u({json:{read:!1},readOnly:!0})],V.prototype,"type",void 0),e([u({readOnly:!0})],V.prototype,"graphicOrigin",void 0),V=e([c("esri.layers.PointCloudLayer")],V);const $=V;export{$ as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import{deprecated as o}from"../core/deprecate.js";import a from"../core/Error.js";import{abortHandle as n}from"../core/handleUtils.js";import l from"../core/Logger.js";import{destroyMaybe as p}from"../core/maybe.js";import{MultiOriginJSONMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as y,throwIfAborted as u,isAbortError as c,throwIfNotAbortError as h}from"../core/promiseUtils.js";import{whenOnce as f}from"../core/reactiveUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import{reader as v}from"../core/accessorSupport/decorators/reader.js";import{subclass as b}from"../core/accessorSupport/decorators/subclass.js";import w from"../geometry/Point.js";import{projectWithZConversion as L}from"../geometry/projectionUtils.js";import I from"../graphic/SceneGraphicOrigin.js";import j from"./Layer.js";import{NoModelError as F,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as O}from"./mixins/APIKeyMixin.js";import{ArcGISService as _}from"./mixins/ArcGISService.js";import{CustomParametersMixin as P}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as T}from"./mixins/EditBusLayer.js";import{OperationalLayer as A}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as E}from"./mixins/ScaleRangeLayer.js";import{SceneService as D}from"./mixins/SceneService.js";import{useViewTimeProperty as U}from"./mixins/TemporalLayer.js";import{TemporalSceneLayer as R}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as q}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as C}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as G}from"./support/capabilities.js";import{elevationInfo as N,labelsVisible as Q,legendEnabled as V,popupEnabled as M,attributeTableTemplate as k,screenSizePerspectiveEnabled as K}from"./support/commonProperties.js";import{getFieldDomain as $,computeEffectiveEditingEnabled as H,getGlobalIdToObjectIdMap as z}from"./support/featureLayerUtils.js";import{FeatureReduction as W}from"./support/FeatureReduction.js";import Z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as B}from"./support/fieldProperties.js";import J from"./support/FieldsIndex.js";import{fixRendererFields as X,unpackFieldNames as Y}from"./support/fieldUtils.js";import{I3SNodePageDefinition as ee,I3SMaterialDefinition as te,I3STextureSetDefinition as re,I3SGeometryDefinition as ie}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as se,isFileSupported as oe}from"./support/infoFor3D.js";import ae from"./support/LabelClass.js";import{reader as ne}from"./support/labelingInfo.js";import le from"./support/LayerFloorInfo.js";import{layerLookupMap as pe}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as de}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as ye}from"./support/RangeInfo.js";import ue from"./support/SceneFilter.js";import{cacheIsOutOfSync as ce}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as he}from"./support/sceneLayerStatistics.js";import{loadStyleRenderer as fe}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as me}from"../renderers/support/typeUtils.js";import ge from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as ve,elevationModeUnsupportedMessage as be,featureExpressionUnsupportedMessage as we}from"../support/elevationInfoUtils.js";import{createPopupTemplate as Le}from"../support/popupUtils.js";import{extractZipFiles as Ie}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as je}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Fe,getFetchPopupTemplate as Se}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Oe}from"../webdoc/support/opacityUtils.js";const _e=new Set(["3DObject","Point"]),Pe=B();let Te=class extends(R(T(D(_(A(x(E(d(P(O(i(j)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new I(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=p(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?$(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new J(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:ee.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&H(this.associatedLayer)}get geometryType(){return xe[this.profile]||"mesh"}set renderer(e){X(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:G;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:w&&c&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ae[r]?Ae[r]:(l.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await fe(this,{origin:"service"},t),X(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){l.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ge;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=Y(this.fieldsIndex,await Fe(this,Se(this)));return je(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new a("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(l.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return Le(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:o}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==o)throw new a(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new a(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return q(s.url)&&n&&null!=e.deleteFeatures&&null!=o&&(i={...i,globalIdToObjectId:await z(s,e.deleteFeatures,o)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={},null!=t.location&&o(l.getLogger(this),"The 'location' option of convertMesh() has been deprecated in favour of 'origin'.",{version:"4.34",replacement:"origin",warnOnce:!0});const r=e=>{throw l.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new a("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);u(t);const s=i.reduce((e,t)=>se(this.infoFor3D,t)?e+1:e,0);0===s&&r(new F),s>1&&r(new S);const n=this.spatialReference,p=t.origin??t.location,d=await L(p??t.defaultOrigin??new w({x:0,y:0,z:0,spatialReference:n}),n,t),y=d.spatialReference.isGeographic?"local":"georeferenced",{default:c}=await import("../geometry/Mesh.js");u(t);const h=c.createWithExternalSource(d,{type:"client",files:i},{vertexSpace:y,transform:de(d.spatialReference),unitConversionDisabled:!0}),[f]=await this.uploadAssets([h],{...t,useAssetOrigin:!p});return f}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await Ie(e)).filter(e=>oe(t,e))}validateLayer(e){if(e.layerType&&!_e.has(e.layerType))throw new a("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new a("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new a("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new a("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new a("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!q(this.associatedLayer?.url)||!ce(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await C(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await pe.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){c(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(n(e));try{await f(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void h(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?l.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):l.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&ve(l.getLogger(this),be("Mesh scene layers","relative-to-scene",e)),ve(l.getLogger(this),we("Scene layers",e))}async fetchStatistics(e,t){return await he({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([m({types:{key:"type",base:W,typeMap:{selection:Z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Te.prototype,"featureReduction",void 0),e([m({type:[ye],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Te.prototype,"rangeInfos",void 0),e([m({json:{read:!1}})],Te.prototype,"associatedLayer",void 0),e([m({type:["show","hide"]})],Te.prototype,"listMode",void 0),e([m({type:["ArcGISSceneServiceLayer"]})],Te.prototype,"operationalLayerType",void 0),e([m({json:{read:!1},readOnly:!0})],Te.prototype,"type",void 0),e([m({...Pe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"fields",void 0),e([m()],Te.prototype,"types",null),e([m()],Te.prototype,"typeIdField",null),e([m()],Te.prototype,"templates",null),e([m()],Te.prototype,"formTemplate",null),e([m({readOnly:!0})],Te.prototype,"graphicOrigin",void 0),e([m({readOnly:!0,clonable:!1})],Te.prototype,"fieldsIndex",null),e([m({type:le,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Te.prototype,"floorInfo",void 0),e([m(Pe.outFields)],Te.prototype,"outFields",void 0),e([m({type:ee,readOnly:!0,json:{read:!1},clonable:!1})],Te.prototype,"nodePages",void 0),e([v("service","nodePages",["nodePages","pointNodePages"])],Te.prototype,"readNodePages",null),e([m({type:[te],readOnly:!0,clonable:!1})],Te.prototype,"materialDefinitions",void 0),e([m({type:[re],readOnly:!0,clonable:!1})],Te.prototype,"textureSetDefinitions",void 0),e([m({type:[ie],readOnly:!0,clonable:!1})],Te.prototype,"geometryDefinitions",void 0),e([m({readOnly:!0})],Te.prototype,"serviceUpdateTimeStamp",void 0),e([m({readOnly:!0})],Te.prototype,"attributeStorageInfo",void 0),e([m({readOnly:!0})],Te.prototype,"statisticsInfo",void 0),e([m({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Te.prototype,"excludeObjectIds",void 0),e([m({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Te.prototype,"definitionExpression",void 0),e([m({type:ue,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Te.prototype,"filter",void 0),e([m({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Te.prototype,"path",void 0),e([m(N)],Te.prototype,"elevationInfo",null),e([m({readOnly:!0,json:{read:!1}})],Te.prototype,"effectiveCapabilities",null),e([m({readOnly:!0})],Te.prototype,"effectiveEditingEnabled",null),e([m({type:String})],Te.prototype,"geometryType",null),e([m(Q)],Te.prototype,"labelsVisible",void 0),e([m({type:[ae],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:ne},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:ne},write:!0}})],Te.prototype,"labelingInfo",void 0),e([m(V)],Te.prototype,"legendEnabled",void 0),e([m({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Te.prototype,"opacity",void 0),e([m({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"priority",void 0),e([m({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"semantic",void 0),e([m({types:me,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Te.prototype,"renderer",null),e([m({json:{read:!1}})],Te.prototype,"cachedDrawingInfo",void 0),e([v("service","cachedDrawingInfo")],Te.prototype,"readCachedDrawingInfo",null),e([m({readOnly:!0,json:{read:!1}})],Te.prototype,"capabilities",null),e([m({type:Boolean,json:{read:!1}})],Te.prototype,"editingEnabled",null),e([m({readOnly:!0,json:{write:!1,read:!1}})],Te.prototype,"infoFor3D",null),e([m({readOnly:!0,json:{write:!1,read:!1}})],Te.prototype,"relationships",null),e([m(M)],Te.prototype,"popupEnabled",void 0),e([m({type:r,json:{name:"popupInfo",write:!0}})],Te.prototype,"popupTemplate",void 0),e([m({readOnly:!0,json:{read:!1}})],Te.prototype,"defaultPopupTemplate",null),e([m(k)],Te.prototype,"attributeTableTemplate",void 0),e([m({type:String,json:{read:!1}})],Te.prototype,"objectIdField",void 0),e([v("service","objectIdField",["objectIdField","fields"])],Te.prototype,"readObjectIdField",null),e([m({type:String,json:{read:!1}})],Te.prototype,"globalIdField",void 0),e([v("service","globalIdField",["globalIdField","fields"])],Te.prototype,"readGlobalIdField",null),e([m({readOnly:!0,type:String,json:{read:!1}})],Te.prototype,"displayField",null),e([m({type:String,json:{read:!1}})],Te.prototype,"profile",void 0),e([v("service","profile",["store.profile"])],Te.prototype,"readProfile",null),e([m({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Te.prototype,"normalReferenceFrame",void 0),e([m(K)],Te.prototype,"screenSizePerspectiveEnabled",void 0),e([m({json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"serviceItemId",void 0),e([m(U)],Te.prototype,"useViewTime",null),Te=e([b("esri.layers.SceneLayer")],Te);const Ae={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},xe={"mesh-pyramids":"mesh",points:"point"},Ee=Te;export{Ee as default};
5
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../PopupTemplate.js";import{ClonableMixin as i}from"../core/Clonable.js";import s from"../core/Collection.js";import{deprecated as o}from"../core/deprecate.js";import a from"../core/Error.js";import{abortHandle as n}from"../core/handleUtils.js";import l from"../core/Logger.js";import{destroyMaybe as p}from"../core/maybe.js";import{MultiOriginJSONMixin as d}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as y,throwIfAborted as c,isAbortError as u,throwIfNotAbortError as h}from"../core/promiseUtils.js";import{whenOnce as f}from"../core/reactiveUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{getProperties as g}from"../core/accessorSupport/utils.js";import{reader as v}from"../core/accessorSupport/decorators/reader.js";import{subclass as b}from"../core/accessorSupport/decorators/subclass.js";import w from"../geometry/Point.js";import{projectWithZConversion as L}from"../geometry/projectionUtils.js";import I from"../graphic/SceneGraphicOrigin.js";import j from"./Layer.js";import{NoModelError as F,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as O}from"./mixins/APIKeyMixin.js";import{ArcGISService as _}from"./mixins/ArcGISService.js";import{CustomParametersMixin as P}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as T}from"./mixins/EditBusLayer.js";import{OperationalLayer as A}from"./mixins/OperationalLayer.js";import{PortalLayer as x}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as E}from"./mixins/ScaleRangeLayer.js";import{SceneService as D}from"./mixins/SceneService.js";import{useViewTimeProperty as U}from"./mixins/TemporalLayer.js";import{TemporalSceneLayer as R}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as q}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as C}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as G}from"./support/capabilities.js";import{elevationInfo as N,labelsVisible as Q,legendEnabled as V,popupEnabled as M,attributeTableTemplate as k,screenSizePerspectiveEnabled as K}from"./support/commonProperties.js";import{getFieldDomain as $,computeEffectiveEditingEnabled as H,getGlobalIdToObjectIdMap as z}from"./support/featureLayerUtils.js";import{FeatureReduction as W}from"./support/FeatureReduction.js";import Z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as B}from"./support/fieldProperties.js";import J from"./support/FieldsIndex.js";import{fixRendererFields as X,unpackFieldNames as Y}from"./support/fieldUtils.js";import{I3SNodePageDefinition as ee,I3SMaterialDefinition as te,I3STextureSetDefinition as re,I3SGeometryDefinition as ie}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as se,isFileSupported as oe}from"./support/infoFor3D.js";import ae from"./support/LabelClass.js";import{reader as ne}from"./support/labelingInfo.js";import le from"./support/LayerFloorInfo.js";import{layerLookupMap as pe}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as de}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as ye}from"./support/RangeInfo.js";import ce from"./support/SceneFilter.js";import{cacheIsOutOfSync as ue}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as he}from"./support/sceneLayerStatistics.js";import{loadStyleRenderer as fe}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as me}from"../renderers/support/typeUtils.js";import ge from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as ve,elevationModeUnsupportedMessage as be,featureExpressionUnsupportedMessage as we}from"../support/elevationInfoUtils.js";import{createPopupTemplate as Le}from"../support/popupUtils.js";import{extractZipFiles as Ie}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as je}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Fe,getFetchPopupTemplate as Se}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Oe}from"../webdoc/support/opacityUtils.js";const _e=new Set(["3DObject","Point"]),Pe=B();let Te=class extends(R(T(D(_(A(x(E(d(P(O(i(j)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.graphicOrigin=new I(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new s,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null),this.associatedLayer=p(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?$(this.associatedLayer,e,t,r):r}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new J(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:ee.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&H(this.associatedLayer)}get geometryType(){return xe[this.profile]||"mesh"}set renderer(e){X(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:G;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:o,supportsGeometryUpdate:a,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:l,supportsM:p,isVersioned:d,supportsAttachment:y},operations:{supportsEditing:c,supportsAdd:u,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:v}}=e,b=e.operations.supportsChangeTracking,w=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:s,supportsGeometryUpdate:w&&a,supportsUploadWithItemId:o},data:{supportsAttachment:y,supportsZ:l,supportsM:p,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:c&&b,supportsAdd:w&&u&&b,supportsDelete:w&&f&&b,supportsUpdate:h&&b,supportsAsyncConvert3D:v}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&Ae[r]?Ae[r]:(l.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override("useViewTime",e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=e?.signal;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await fe(this,{origin:"service"},t),X(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){l.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ge;return"mesh"===this.geometryType?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=Y(this.fieldsIndex,await Fe(this,Se(this)));return je(this.parsedUrl?.path??"",this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new a("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const s=new t;return s.attributes=i[0],s.layer=this,s.sourceLayer=this,s.origin=this.graphicOrigin,s}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryAttachments(e,t))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(l.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return Le(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(0,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");let i=t;await this.load();const s=this.associatedLayer;if(!s)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:o}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==o)throw new a(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new a(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return q(s.url)&&n&&null!=e.deleteFeatures&&null!=o&&(i={...i,globalIdToObjectId:await z(s,e.deleteFeatures,o)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new a(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={},null!=t.location&&o(l.getLogger(this),"The 'location' option of convertMesh() has been deprecated in favour of 'origin'.",{version:"4.34",replacement:"origin",warnOnce:!0});const r=e=>{throw l.getLogger(this).error(".convertMesh()",e.message),e};await this.load(t),this.infoFor3D||r(new a("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e);c(t);const s=i.reduce((e,t)=>se(this.infoFor3D,t)?e+1:e,0);0===s&&r(new F),s>1&&r(new S);const n=this.spatialReference,p=t.origin??t.location,d=await L(p??t.defaultOrigin??new w({x:0,y:0,z:0,spatialReference:n}),n,t),y=d.spatialReference.isGeographic?"local":"georeferenced",{default:u}=await import("../geometry/Mesh.js");c(t);const h=u.createWithExternalSource(d,{type:"client",files:i},{vertexSpace:y,transform:de(d.spatialReference),unitConversionDisabled:!0}),[f]=await this.uploadAssets([h],{...t,useAssetOrigin:!p});return f}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await Ie(e)).filter(e=>oe(t,e))}validateLayer(e){if(e.layerType&&!_e.has(e.layerType))throw new a("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new a("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new a("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new a("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new a("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),r=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled","attributeTableTemplate"],t=g(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(2===o||3===o)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!q(this.associatedLayer?.url)||!ue(this))return;g(this).setAtOrigin("fullExtent",e.clone(),2)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await C(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await pe.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){u(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(n(e));try{await f(()=>this.popupEnabled&&null!=this.popupTemplate,e.signal)}catch(r){return void h(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?l.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):l.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&ve(l.getLogger(this),be("Mesh scene layers","relative-to-scene",e)),ve(l.getLogger(this),we("Scene layers",e))}async fetchStatistics(e,t){return await he({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([m({types:{key:"type",base:W,typeMap:{selection:Z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:{allowNull:!0}},"portal-item":{name:"layerDefinition.featureReduction",write:{allowNull:!0}}}}})],Te.prototype,"featureReduction",void 0),e([m({type:[ye],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}},clonable:!1})],Te.prototype,"rangeInfos",void 0),e([m({json:{read:!1}})],Te.prototype,"associatedLayer",void 0),e([m({type:["show","hide"]})],Te.prototype,"listMode",void 0),e([m({type:["ArcGISSceneServiceLayer"]})],Te.prototype,"operationalLayerType",void 0),e([m({json:{read:!1},readOnly:!0})],Te.prototype,"type",void 0),e([m({...Pe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"fields",void 0),e([m()],Te.prototype,"types",null),e([m()],Te.prototype,"typeIdField",null),e([m()],Te.prototype,"templates",null),e([m()],Te.prototype,"formTemplate",null),e([m({readOnly:!0})],Te.prototype,"graphicOrigin",void 0),e([m({readOnly:!0,clonable:!1})],Te.prototype,"fieldsIndex",null),e([m({type:le,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Te.prototype,"floorInfo",void 0),e([m(Pe.outFields)],Te.prototype,"outFields",void 0),e([m({type:ee,readOnly:!0,json:{read:!1},clonable:!1})],Te.prototype,"nodePages",void 0),e([v("service","nodePages",["nodePages","pointNodePages"])],Te.prototype,"readNodePages",null),e([m({type:[te],readOnly:!0,clonable:!1})],Te.prototype,"materialDefinitions",void 0),e([m({type:[re],readOnly:!0,clonable:!1})],Te.prototype,"textureSetDefinitions",void 0),e([m({type:[ie],readOnly:!0,clonable:!1})],Te.prototype,"geometryDefinitions",void 0),e([m({readOnly:!0})],Te.prototype,"serviceUpdateTimeStamp",void 0),e([m({readOnly:!0})],Te.prototype,"attributeStorageInfo",void 0),e([m({readOnly:!0})],Te.prototype,"statisticsInfo",void 0),e([m({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Te.prototype,"excludeObjectIds",void 0),e([m({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Te.prototype,"definitionExpression",void 0),e([m({type:ce,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Te.prototype,"filter",void 0),e([m({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Te.prototype,"path",void 0),e([m(N)],Te.prototype,"elevationInfo",null),e([m({readOnly:!0,json:{read:!1}})],Te.prototype,"effectiveCapabilities",null),e([m({readOnly:!0})],Te.prototype,"effectiveEditingEnabled",null),e([m({type:String})],Te.prototype,"geometryType",null),e([m(Q)],Te.prototype,"labelsVisible",void 0),e([m({type:[ae],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:ne},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:ne},write:!0}})],Te.prototype,"labelingInfo",void 0),e([m(V)],Te.prototype,"legendEnabled",void 0),e([m({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?Oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Te.prototype,"opacity",void 0),e([m({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"priority",void 0),e([m({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"semantic",void 0),e([m({types:me,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Te.prototype,"renderer",null),e([m({json:{read:!1}})],Te.prototype,"cachedDrawingInfo",void 0),e([v("service","cachedDrawingInfo")],Te.prototype,"readCachedDrawingInfo",null),e([m({readOnly:!0,json:{read:!1}})],Te.prototype,"capabilities",null),e([m({type:Boolean,json:{read:!1}})],Te.prototype,"editingEnabled",null),e([m({readOnly:!0,json:{write:!1,read:!1}})],Te.prototype,"infoFor3D",null),e([m({readOnly:!0,json:{write:!1,read:!1}})],Te.prototype,"relationships",null),e([m(M)],Te.prototype,"popupEnabled",void 0),e([m({type:r,json:{name:"popupInfo",write:!0}})],Te.prototype,"popupTemplate",void 0),e([m({readOnly:!0,json:{read:!1}})],Te.prototype,"defaultPopupTemplate",null),e([m(k)],Te.prototype,"attributeTableTemplate",void 0),e([m({type:String,json:{read:!1}})],Te.prototype,"objectIdField",void 0),e([v("service","objectIdField",["objectIdField","fields"])],Te.prototype,"readObjectIdField",null),e([m({type:String,json:{read:!1}})],Te.prototype,"globalIdField",void 0),e([v("service","globalIdField",["globalIdField","fields"])],Te.prototype,"readGlobalIdField",null),e([m({readOnly:!0,type:String,json:{read:!1}})],Te.prototype,"displayField",null),e([m({type:String,json:{read:!1}})],Te.prototype,"profile",void 0),e([v("service","profile",["store.profile"])],Te.prototype,"readProfile",null),e([m({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Te.prototype,"normalReferenceFrame",void 0),e([m(K)],Te.prototype,"screenSizePerspectiveEnabled",void 0),e([m({json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"serviceItemId",void 0),e([m(U)],Te.prototype,"useViewTime",null),Te=e([b("esri.layers.SceneLayer")],Te);const Ae={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},xe={"mesh-pyramids":"mesh",points:"point"},Ee=Te;export{Ee as default};