@arcgis/core 4.33.0-next.20250509 → 4.33.0-next.20250511

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 (67) hide show
  1. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/06eb4832b6c86744e52e.js +1 -0
  4. package/assets/esri/core/workers/chunks/170c346cf5a18adb25b0.js +1 -0
  5. package/assets/esri/core/workers/chunks/253bcc3cc7bc4c2dc6ea.js +1 -0
  6. package/assets/esri/core/workers/chunks/{d874d24568b1acedebc4.js → 297d2c0a9d3f1e978318.js} +1 -1
  7. package/assets/esri/core/workers/chunks/4bd5cbf6e0be2fc7e84d.js +1 -0
  8. package/assets/esri/core/workers/chunks/{b1035bf4a016b1199236.js → 83d6a1b3db7d364d156b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{7ed9a9c33a08ebba5570.js → 92cbe9af8a6c061bfb57.js} +1 -1
  10. package/assets/esri/core/workers/chunks/a1d697e2be1e892a666a.js +1 -0
  11. package/assets/esri/core/workers/chunks/{61c74a733718d667b071.js → d551f70560a2b1ef5696.js} +1 -1
  12. package/assets/esri/core/workers/chunks/f6a1fec33b0d81acce61.js +1 -0
  13. package/core/has.js +1 -1
  14. package/core/sql/StandardizedFunctions.js +1 -1
  15. package/core/sql/WhereGrammar.js +1 -1
  16. package/geometry/support/meshUtils/External.js +1 -1
  17. package/geometry/support/meshUtils/loadExternal.js +1 -1
  18. package/interfaces.d.ts +340 -14
  19. package/layers/SceneLayer.js +1 -1
  20. package/layers/VideoLayer.js +1 -1
  21. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  22. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  23. package/layers/video/VideoController.js +1 -1
  24. package/package.json +1 -1
  25. package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
  26. package/rest/support/meshFeatureSet.js +1 -1
  27. package/smartMapping/renderers/size.js +1 -1
  28. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  29. package/support/revision.js +1 -1
  30. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  31. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  32. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  33. package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
  34. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  35. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  36. package/views/3d/layers/I3SMeshView3D.js +1 -1
  37. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  38. package/views/3d/layers/SceneLayerView3D.js +1 -1
  39. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  40. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  41. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  42. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  43. package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
  44. package/views/3d/layers/i3s/I3SQueryResultGeometry.js +5 -0
  45. package/views/3d/webgl/ManagedFBOResource.js +1 -1
  46. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  47. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  48. package/views/interactive/keybindings.js +1 -1
  49. package/webdoc/IPSInfo.js +1 -1
  50. package/webdoc/ips/AppleIPSProperties.d.ts +4 -0
  51. package/webdoc/ips/AppleIPSProperties.js +5 -0
  52. package/webdoc/ips/Configuration.d.ts +4 -0
  53. package/webdoc/ips/Configuration.js +5 -0
  54. package/webdoc/ips/GNSSProperties.d.ts +4 -0
  55. package/webdoc/ips/GNSSProperties.js +5 -0
  56. package/webdoc/ips/PathSnappingProperties.d.ts +4 -0
  57. package/webdoc/ips/PathSnappingProperties.js +5 -0
  58. package/webdoc/ips/SmoothingProperties.d.ts +4 -0
  59. package/webdoc/ips/SmoothingProperties.js +5 -0
  60. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  61. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  62. package/assets/esri/core/workers/chunks/46104db7f77952bb6c12.js +0 -1
  63. package/assets/esri/core/workers/chunks/47bbfc10c2a3b9e4bdd6.js +0 -1
  64. package/assets/esri/core/workers/chunks/49f0e53b3c9ba8451442.js +0 -1
  65. package/assets/esri/core/workers/chunks/5371df31553626528c69.js +0 -1
  66. package/assets/esri/core/workers/chunks/ad9bcd9dae45cdf90cbb.js +0 -1
  67. package/assets/esri/core/workers/chunks/c28d4717ed588c0d8bf1.js +0 -1
package/interfaces.d.ts CHANGED
@@ -14443,7 +14443,7 @@ declare namespace __esri {
14443
14443
  }
14444
14444
 
14445
14445
  /**
14446
- * Utility for retrieving the current version of the API.
14446
+ * Utility for retrieving the current or next version of the SDK.
14447
14447
  *
14448
14448
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-kernel.html Read more...}
14449
14449
  */
@@ -62464,7 +62464,7 @@ declare namespace __esri {
62464
62464
  *
62465
62465
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphApplyEditsResult.html#error Read more...}
62466
62466
  */
62467
- error: GraphApplyEditsResultError | nullish;
62467
+ error: Error | nullish;
62468
62468
  /**
62469
62469
  * If `true` there was an error processing {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraphService.html#executeApplyEdits executeApplyEdits()}.
62470
62470
  *
@@ -62496,7 +62496,7 @@ declare namespace __esri {
62496
62496
  *
62497
62497
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphApplyEditsResult.html#error Read more...}
62498
62498
  */
62499
- error?: GraphApplyEditsResultError | nullish;
62499
+ error?: Error | nullish;
62500
62500
  /**
62501
62501
  * If `true` there was an error processing {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraphService.html#executeApplyEdits executeApplyEdits()}.
62502
62502
  *
@@ -62519,11 +62519,6 @@ declare namespace __esri {
62519
62519
  deletes: NamedObjectEditResults[];
62520
62520
  }
62521
62521
 
62522
- export interface GraphApplyEditsResultError {
62523
- errorCode: any;
62524
- errorMessage: string;
62525
- }
62526
-
62527
62522
  /**
62528
62523
  * NamedObjectEditResults contains the `id` of the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-GraphNamedObject.html GraphNamedObject}
62529
62524
  * ({@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Entity.html Entity} or {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-Relationship.html Relationship}) that
@@ -62533,12 +62528,7 @@ declare namespace __esri {
62533
62528
  */
62534
62529
  export interface NamedObjectEditResults {
62535
62530
  id: string;
62536
- error?: NamedObjectEditResultsError | undefined;
62537
- }
62538
-
62539
- export interface NamedObjectEditResultsError {
62540
- errorCode: any;
62541
- errorMessage: string;
62531
+ error?: Error;
62542
62532
  }
62543
62533
 
62544
62534
  export class GraphNamedObject extends GraphObject {
@@ -103902,6 +103892,276 @@ declare namespace __esri {
103902
103892
  requestedActions?: string[] | nullish;
103903
103893
  }
103904
103894
 
103895
+ export interface AppleIPSProperties extends Accessor, JSONSupport, Clonable {
103896
+ }
103897
+
103898
+ export class AppleIPSProperties {
103899
+ /**
103900
+ * Property indicating whether Apple indoor Positioning is enabled or not.
103901
+ *
103902
+ * @default true
103903
+ *
103904
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-AppleIPSProperties.html#enabled Read more...}
103905
+ */
103906
+ enabled: boolean;
103907
+ /**
103908
+ * Defines the AppleIPS properties of Indoor Positioning Configuration.
103909
+ *
103910
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-AppleIPSProperties.html Read more...}
103911
+ */
103912
+ constructor(properties?: AppleIPSPropertiesProperties);
103913
+ /**
103914
+ * Creates a deep clone of this object.
103915
+ *
103916
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-AppleIPSProperties.html#clone Read more...}
103917
+ */
103918
+ clone(): this;
103919
+ /**
103920
+ * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
103921
+ *
103922
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-AppleIPSProperties.html#toJSON Read more...}
103923
+ */
103924
+ toJSON(): any;
103925
+ /**
103926
+ * Creates a new instance of this class and initializes it with values from a JSON object
103927
+ * generated from an ArcGIS product.
103928
+ *
103929
+ * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects.
103930
+ *
103931
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-AppleIPSProperties.html#fromJSON Read more...}
103932
+ */
103933
+ static fromJSON(json: any): any | nullish;
103934
+ static fromJSON(json: any): AppleIPSProperties;
103935
+ }
103936
+
103937
+ interface AppleIPSPropertiesProperties {
103938
+ /**
103939
+ * Property indicating whether Apple indoor Positioning is enabled or not.
103940
+ *
103941
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-AppleIPSProperties.html#enabled Read more...}
103942
+ */
103943
+ enabled?: boolean;
103944
+ }
103945
+
103946
+ export interface Configuration extends Accessor, Clonable, JSONSupport {
103947
+ }
103948
+
103949
+ export class Configuration {
103950
+ /**
103951
+ * Defines the IPS Configuration settings for IPS-Aware Maps.
103952
+ *
103953
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html Read more...}
103954
+ */
103955
+ constructor(properties?: ConfigurationProperties);
103956
+ /**
103957
+ * Property indicating whether appleIPS is enabled or not.
103958
+ *
103959
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#appleIPS Read more...}
103960
+ */
103961
+ get appleIPS(): AppleIPSProperties | nullish;
103962
+ set appleIPS(value: AppleIPSPropertiesProperties | nullish);
103963
+ /**
103964
+ * Property indicating whether GNSS is enabled or not.
103965
+ *
103966
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#gnss Read more...}
103967
+ */
103968
+ get gnss(): GNSSProperties | nullish;
103969
+ set gnss(value: GNSSPropertiesProperties | nullish);
103970
+ /**
103971
+ * Property indicating whether path snapping is enabled or not.
103972
+ *
103973
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#pathSnapping Read more...}
103974
+ */
103975
+ get pathSnapping(): PathSnappingProperties | nullish;
103976
+ set pathSnapping(value: PathSnappingPropertiesProperties | nullish);
103977
+ /**
103978
+ * Property indicating whether smoothing is enabled or not.
103979
+ *
103980
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#smoothing Read more...}
103981
+ */
103982
+ get smoothing(): SmoothingProperties | nullish;
103983
+ set smoothing(value: SmoothingPropertiesProperties | nullish);
103984
+ /**
103985
+ * Creates a deep clone of this object.
103986
+ *
103987
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#clone Read more...}
103988
+ */
103989
+ clone(): this;
103990
+ /**
103991
+ * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
103992
+ *
103993
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#toJSON Read more...}
103994
+ */
103995
+ toJSON(): any;
103996
+ /**
103997
+ * Creates a new instance of this class and initializes it with values from a JSON object
103998
+ * generated from an ArcGIS product.
103999
+ *
104000
+ * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects.
104001
+ *
104002
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#fromJSON Read more...}
104003
+ */
104004
+ static fromJSON(json: any): any | nullish;
104005
+ static fromJSON(json: any): Configuration;
104006
+ }
104007
+
104008
+ interface ConfigurationProperties {
104009
+ /**
104010
+ * Property indicating whether appleIPS is enabled or not.
104011
+ *
104012
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#appleIPS Read more...}
104013
+ */
104014
+ appleIPS?: AppleIPSPropertiesProperties | nullish;
104015
+ /**
104016
+ * Property indicating whether GNSS is enabled or not.
104017
+ *
104018
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#gnss Read more...}
104019
+ */
104020
+ gnss?: GNSSPropertiesProperties | nullish;
104021
+ /**
104022
+ * Property indicating whether path snapping is enabled or not.
104023
+ *
104024
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#pathSnapping Read more...}
104025
+ */
104026
+ pathSnapping?: PathSnappingPropertiesProperties | nullish;
104027
+ /**
104028
+ * Property indicating whether smoothing is enabled or not.
104029
+ *
104030
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-Configuration.html#smoothing Read more...}
104031
+ */
104032
+ smoothing?: SmoothingPropertiesProperties | nullish;
104033
+ }
104034
+
104035
+ export interface GNSSProperties extends Accessor, JSONSupport, Clonable {
104036
+ }
104037
+
104038
+ export class GNSSProperties {
104039
+ /**
104040
+ * Property indicating whether GNSS is enabled or not.
104041
+ *
104042
+ * @default true
104043
+ *
104044
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-GNSSProperties.html#enabled Read more...}
104045
+ */
104046
+ enabled: boolean;
104047
+ /**
104048
+ * Defines the GNSS properties of Indoor Positioning Configuration.
104049
+ *
104050
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-GNSSProperties.html Read more...}
104051
+ */
104052
+ constructor(properties?: GNSSPropertiesProperties);
104053
+ /**
104054
+ * Creates a deep clone of this object.
104055
+ *
104056
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-GNSSProperties.html#clone Read more...}
104057
+ */
104058
+ clone(): this;
104059
+ /**
104060
+ * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
104061
+ *
104062
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-GNSSProperties.html#toJSON Read more...}
104063
+ */
104064
+ toJSON(): any;
104065
+ /**
104066
+ * Creates a new instance of this class and initializes it with values from a JSON object
104067
+ * generated from an ArcGIS product.
104068
+ *
104069
+ * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects.
104070
+ *
104071
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-GNSSProperties.html#fromJSON Read more...}
104072
+ */
104073
+ static fromJSON(json: any): any | nullish;
104074
+ static fromJSON(json: any): GNSSProperties;
104075
+ }
104076
+
104077
+ interface GNSSPropertiesProperties {
104078
+ /**
104079
+ * Property indicating whether GNSS is enabled or not.
104080
+ *
104081
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-GNSSProperties.html#enabled Read more...}
104082
+ */
104083
+ enabled?: boolean;
104084
+ }
104085
+
104086
+ export interface PathSnappingProperties extends Accessor, JSONSupport, Clonable {
104087
+ }
104088
+
104089
+ export class PathSnappingProperties {
104090
+ /**
104091
+ * Property indicating the distance set for path snapping.
104092
+ *
104093
+ * @default 5
104094
+ *
104095
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-PathSnappingProperties.html#distance Read more...}
104096
+ */
104097
+ distance: number;
104098
+ /**
104099
+ * Property indicating whether path snapping is enabled or not.
104100
+ *
104101
+ * @default true
104102
+ *
104103
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-PathSnappingProperties.html#enabled Read more...}
104104
+ */
104105
+ enabled: boolean;
104106
+ /**
104107
+ * Property indicating the unit set for path snapping distance.
104108
+ *
104109
+ * @default "meter"
104110
+ *
104111
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-PathSnappingProperties.html#units Read more...}
104112
+ */
104113
+ units: "feet" | "meter";
104114
+ /**
104115
+ * Defines the Path Snapping properties of Indoor Positioning Configuration.
104116
+ *
104117
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-PathSnappingProperties.html Read more...}
104118
+ */
104119
+ constructor(properties?: PathSnappingPropertiesProperties);
104120
+ /**
104121
+ * Creates a deep clone of this object.
104122
+ *
104123
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-PathSnappingProperties.html#clone Read more...}
104124
+ */
104125
+ clone(): this;
104126
+ /**
104127
+ * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
104128
+ *
104129
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-PathSnappingProperties.html#toJSON Read more...}
104130
+ */
104131
+ toJSON(): any;
104132
+ /**
104133
+ * Creates a new instance of this class and initializes it with values from a JSON object
104134
+ * generated from an ArcGIS product.
104135
+ *
104136
+ * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects.
104137
+ *
104138
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-PathSnappingProperties.html#fromJSON Read more...}
104139
+ */
104140
+ static fromJSON(json: any): any | nullish;
104141
+ static fromJSON(json: any): PathSnappingProperties;
104142
+ }
104143
+
104144
+ interface PathSnappingPropertiesProperties {
104145
+ /**
104146
+ * Property indicating the distance set for path snapping.
104147
+ *
104148
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-PathSnappingProperties.html#distance Read more...}
104149
+ */
104150
+ distance?: number;
104151
+ /**
104152
+ * Property indicating whether path snapping is enabled or not.
104153
+ *
104154
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-PathSnappingProperties.html#enabled Read more...}
104155
+ */
104156
+ enabled?: boolean;
104157
+ /**
104158
+ * Property indicating the unit set for path snapping distance.
104159
+ *
104160
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-PathSnappingProperties.html#units Read more...}
104161
+ */
104162
+ units?: "feet" | "meter";
104163
+ }
104164
+
103905
104165
  export interface PositioningService extends Accessor, JSONSupport, Clonable {
103906
104166
  }
103907
104167
 
@@ -103952,6 +104212,57 @@ declare namespace __esri {
103952
104212
  portalItem?: PortalItemProperties | nullish;
103953
104213
  }
103954
104214
 
104215
+ export interface SmoothingProperties extends Accessor, JSONSupport, Clonable {
104216
+ }
104217
+
104218
+ export class SmoothingProperties {
104219
+ /**
104220
+ * Indicates whether smoothing is enabled for the IPS data.
104221
+ *
104222
+ * @default true
104223
+ *
104224
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-SmoothingProperties.html#enabled Read more...}
104225
+ */
104226
+ enabled: boolean;
104227
+ /**
104228
+ * Defines the Smoothing properties of Indoor Positioning Configuration.
104229
+ *
104230
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-SmoothingProperties.html Read more...}
104231
+ */
104232
+ constructor(properties?: SmoothingPropertiesProperties);
104233
+ /**
104234
+ * Creates a deep clone of this object.
104235
+ *
104236
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-SmoothingProperties.html#clone Read more...}
104237
+ */
104238
+ clone(): this;
104239
+ /**
104240
+ * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
104241
+ *
104242
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-SmoothingProperties.html#toJSON Read more...}
104243
+ */
104244
+ toJSON(): any;
104245
+ /**
104246
+ * Creates a new instance of this class and initializes it with values from a JSON object
104247
+ * generated from an ArcGIS product.
104248
+ *
104249
+ * @param json A JSON representation of the instance in the ArcGIS format. See the [ArcGIS REST API documentation](https://developers.arcgis.com/documentation/common-data-types/overview-of-common-data-types.htm) for examples of the structure of various input JSON objects.
104250
+ *
104251
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-SmoothingProperties.html#fromJSON Read more...}
104252
+ */
104253
+ static fromJSON(json: any): any | nullish;
104254
+ static fromJSON(json: any): SmoothingProperties;
104255
+ }
104256
+
104257
+ interface SmoothingPropertiesProperties {
104258
+ /**
104259
+ * Indicates whether smoothing is enabled for the IPS data.
104260
+ *
104261
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-ips-SmoothingProperties.html#enabled Read more...}
104262
+ */
104263
+ enabled?: boolean;
104264
+ }
104265
+
103955
104266
  export interface IPSInfo extends Accessor, JSONSupport, Clonable {
103956
104267
  }
103957
104268
 
@@ -103962,6 +104273,15 @@ declare namespace __esri {
103962
104273
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-IPSInfo.html Read more...}
103963
104274
  */
103964
104275
  constructor(properties?: IPSInfoProperties);
104276
+ /**
104277
+ * Defines the configuration properties for Indoor Positioning Data Service.
104278
+ *
104279
+ * @default null
104280
+ *
104281
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-IPSInfo.html#configuration Read more...}
104282
+ */
104283
+ get configuration(): Configuration | nullish;
104284
+ set configuration(value: ConfigurationProperties | nullish);
103965
104285
  /**
103966
104286
  * Defines the portal item for the positioning data service.
103967
104287
  *
@@ -103996,6 +104316,12 @@ declare namespace __esri {
103996
104316
  }
103997
104317
 
103998
104318
  interface IPSInfoProperties {
104319
+ /**
104320
+ * Defines the configuration properties for Indoor Positioning Data Service.
104321
+ *
104322
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-webdoc-IPSInfo.html#configuration Read more...}
104323
+ */
104324
+ configuration?: ConfigurationProperties | nullish;
103999
104325
  /**
104000
104326
  * Defines the portal item for the positioning data service.
104001
104327
  *
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import i from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y,throwIfNotAbortError as u}from"../core/promiseUtils.js";import{whenOnce as c}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as v}from"../core/accessorSupport/PropertyOrigin.js";import b from"../geometry/Point.js";import w from"./Layer.js";import{NoModelError as I,MultipleModelsError as L}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as j}from"./mixins/APIKeyMixin.js";import{ArcGISService as F}from"./mixins/ArcGISService.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as _}from"./mixins/EditBusLayer.js";import{OperationalLayer as A}from"./mixins/OperationalLayer.js";import{PortalLayer as O}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SceneService as E,SaveOperationType as T}from"./mixins/SceneService.js";import{useViewTimeProperty as x}from"./mixins/TemporalLayer.js";import{TemporalSceneLayer as D}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as R}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as C,labelsVisible as G,legendEnabled as N,popupEnabled as Q,attributeTableTemplate as V,screenSizePerspectiveEnabled as M}from"./support/commonProperties.js";import{getFieldDomain as k,computeEffectiveEditingEnabled as K,getGlobalIdToObjectIdMap as $}from"./support/featureLayerUtils.js";import{FeatureReduction as H}from"./support/FeatureReduction.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as W}from"./support/fieldProperties.js";import Z from"./support/FieldsIndex.js";import{fixRendererFields as B,unpackFieldNames as J}from"./support/fieldUtils.js";import{I3SNodePageDefinition as X,I3SMaterialDefinition as Y,I3STextureSetDefinition as ee,I3SGeometryDefinition as te}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as re,isFileSupported as ie}from"./support/infoFor3D.js";import se from"./support/LabelClass.js";import{reader as oe}from"./support/labelingInfo.js";import ae from"./support/LayerFloorInfo.js";import{layerLookupMap as ne}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as le}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as pe}from"./support/RangeInfo.js";import de from"./support/SceneFilter.js";import{cacheIsOutOfSync as ye}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{loadStyleRenderer as ce}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as me,elevationModeUnsupportedMessage as ge,featureExpressionUnsupportedMessage as ve}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as we}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as Ie}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Le,getFetchPopupTemplate as je}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Fe}from"../webdoc/support/opacityUtils.js";const Se=new Set(["3DObject","Point"]),_e=W();let Ae=class extends(D(_(E(F(A(O(P(p(S(j(i.ClonableMixin(w)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,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=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?k(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 Z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:X.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&&K(this.associatedLayer)}get geometryType(){return Pe[this.profile]||"mesh"}set renderer(e){B(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:q;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&&Oe[r]?Oe[r]:(n.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(d),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 ce(this,{origin:"service"},t),B(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){n.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 fe;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;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("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 o("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=J(this.fieldsIndex,await Le(this,je(this)));return Ie(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 o("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}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:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(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 o("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 o("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(T.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(T.SAVE,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 o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await $(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce(((e,t)=>re(this.infoFor3D,t)?e+1:e),0);0===s&&r(new I),s>1&&r(new L);const a=this.spatialReference,l=t.location??new b({x:0,y:0,z:0,spatialReference:a}),p=l.spatialReference.isGeographic?"local":"georeferenced",{default:d}=await import("../geometry/Mesh.js"),y=d.createWithExternalSource(l,i,{vertexSpace:p,transform:le(l.spatialReference),unitConversionDisabled:!0}),[u]=await this.uploadAssets([y],{...t,useAssetOrigin:!t.location});return u}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await we(e)).filter((e=>ie(t,e)))}validateLayer(e){if(e.layerType&&!Se.has(e.layerType))throw new o("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 o("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 o("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 o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("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 o("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=f(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(o===v.SERVICE||o===v.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!ye(this))return;f(this).setAtOrigin("fullExtent",e.clone(),v.SERVICE)}_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 R(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ne.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await c((()=>this.popupEnabled&&null!=this.popupTemplate),e.signal)}catch(r){return void u(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.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&&me(n.getLogger(this),ge("Mesh scene layers","relative-to-scene",e)),me(n.getLogger(this),ve("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([h({types:{key:"type",base:H,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Ae.prototype,"featureReduction",void 0),e([h({type:[pe],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Ae.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Ae.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Ae.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Ae.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Ae.prototype,"type",void 0),e([h({..._e.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"fields",void 0),e([h()],Ae.prototype,"types",null),e([h()],Ae.prototype,"typeIdField",null),e([h()],Ae.prototype,"templates",null),e([h()],Ae.prototype,"formTemplate",null),e([h({readOnly:!0,clonable:!1})],Ae.prototype,"fieldsIndex",null),e([h({type:ae,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Ae.prototype,"floorInfo",void 0),e([h(_e.outFields)],Ae.prototype,"outFields",void 0),e([h({type:X,readOnly:!0,json:{read:!1}})],Ae.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],Ae.prototype,"readNodePages",null),e([h({type:[Y],readOnly:!0})],Ae.prototype,"materialDefinitions",void 0),e([h({type:[ee],readOnly:!0})],Ae.prototype,"textureSetDefinitions",void 0),e([h({type:[te],readOnly:!0})],Ae.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Ae.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Ae.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Ae.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Ae.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Ae.prototype,"definitionExpression",void 0),e([h({type:de,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Ae.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ae.prototype,"path",void 0),e([h(C)],Ae.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Ae.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Ae.prototype,"geometryType",null),e([h(G)],Ae.prototype,"labelsVisible",void 0),e([h({type:[se],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:oe},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:oe},write:!0}})],Ae.prototype,"labelingInfo",void 0),e([h(N)],Ae.prototype,"legendEnabled",void 0),e([h({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?Fe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Ae.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"semantic",void 0),e([h({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Ae.prototype,"renderer",null),e([h({json:{read:!1}})],Ae.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],Ae.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Ae.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"relationships",null),e([h(Q)],Ae.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Ae.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"defaultPopupTemplate",null),e([h(V)],Ae.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Ae.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],Ae.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],Ae.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Ae.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],Ae.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Ae.prototype,"normalReferenceFrame",void 0),e([h(M)],Ae.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"serviceItemId",void 0),e([h(x)],Ae.prototype,"useViewTime",null),Ae=e([g("esri.layers.SceneLayer")],Ae);const Oe={"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"},Pe={"mesh-pyramids":"mesh",points:"point"},Ee=Ae;export{Ee as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import i from"../core/Clonable.js";import s from"../core/Collection.js";import o from"../core/Error.js";import{abortHandle as a}from"../core/handleUtils.js";import n from"../core/Logger.js";import{destroyMaybe as l}from"../core/maybe.js";import{MultiOriginJSONMixin as p}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y,throwIfNotAbortError as u}from"../core/promiseUtils.js";import{whenOnce as c}from"../core/reactiveUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{getProperties as f}from"../core/accessorSupport/utils.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as v}from"../core/accessorSupport/PropertyOrigin.js";import b from"../geometry/Point.js";import w from"./Layer.js";import{NoModelError as I,MultipleModelsError as L}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as j}from"./mixins/APIKeyMixin.js";import{ArcGISService as F}from"./mixins/ArcGISService.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as _}from"./mixins/EditBusLayer.js";import{OperationalLayer as A}from"./mixins/OperationalLayer.js";import{PortalLayer as O}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as P}from"./mixins/ScaleRangeLayer.js";import{SceneService as E,SaveOperationType as T}from"./mixins/SceneService.js";import{useViewTimeProperty as x}from"./mixins/TemporalLayer.js";import{TemporalSceneLayer as D}from"./mixins/TemporalSceneLayer.js";import{isHostedAgolService as U}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as R}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as q}from"./support/capabilities.js";import{elevationInfo as C,labelsVisible as G,legendEnabled as N,popupEnabled as Q,attributeTableTemplate as V,screenSizePerspectiveEnabled as M}from"./support/commonProperties.js";import{getFieldDomain as k,computeEffectiveEditingEnabled as K,getGlobalIdToObjectIdMap as $}from"./support/featureLayerUtils.js";import{FeatureReduction as H}from"./support/FeatureReduction.js";import z from"./support/FeatureReductionSelection.js";import{defineFieldProperties as W}from"./support/fieldProperties.js";import Z from"./support/FieldsIndex.js";import{fixRendererFields as B,unpackFieldNames as J}from"./support/fieldUtils.js";import{I3SNodePageDefinition as X,I3SMaterialDefinition as Y,I3STextureSetDefinition as ee,I3SGeometryDefinition as te}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as re,isFileSupported as ie}from"./support/infoFor3D.js";import se from"./support/LabelClass.js";import{reader as oe}from"./support/labelingInfo.js";import ae from"./support/LayerFloorInfo.js";import{layerLookupMap as ne}from"./support/lazyLayerLoader.js";import{getMeshTransformForMetersToSpatialReference as le}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as pe}from"./support/RangeInfo.js";import de from"./support/SceneFilter.js";import{cacheIsOutOfSync as ye}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ue}from"./support/sceneLayerStatistics.js";import{loadStyleRenderer as ce}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as he}from"../renderers/support/typeUtils.js";import fe from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as me,elevationModeUnsupportedMessage as ge,featureExpressionUnsupportedMessage as ve}from"../support/elevationInfoUtils.js";import{createPopupTemplate as be}from"../support/popupUtils.js";import{extractZipFiles as we}from"../support/zipUtils.js";import{queryAttributesFromCachedAttributesId as Ie}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as Le,getFetchPopupTemplate as je}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Fe}from"../webdoc/support/opacityUtils.js";const Se=new Set(["3DObject","Point"]),_e=W();let Ae=class extends(D(_(E(F(A(O(P(p(S(j(i.ClonableMixin(w)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,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=l(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getField(e)?.domain??null;return this.associatedLayer?k(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 Z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:X.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&&K(this.associatedLayer)}get geometryType(){return Pe[this.profile]||"mesh"}set renderer(e){B(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:q;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&&Oe[r]?Oe[r]:(n.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(d),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 ce(this,{origin:"service"},t),B(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){n.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 fe;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;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new o("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 o("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=J(this.fieldsIndex,await Le(this,je(this)));return Ie(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 o("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}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:(n.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return be(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 o("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 o("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(T.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(T.SAVE,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 o(`${this.type}-layer:not-editable`,"Service is not editable");await s.load();const{globalIdField:a}=s,n=!!s.infoFor3D,l=i?.globalIdUsed??!0;if(n&&null==a)throw new o(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(n&&!l)throw new o(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return U(s.url)&&n&&null!=e.deleteFeatures&&null!=a&&(i={...i,globalIdToObjectId:await $(s,e.deleteFeatures,a)}),r(this,s.source,e,i)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new o(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){t??={};const r=e=>{throw n.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new o("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce(((e,t)=>re(this.infoFor3D,t)?e+1:e),0);0===s&&r(new I),s>1&&r(new L);const a=this.spatialReference,l=t.location??new b({x:0,y:0,z:0,spatialReference:a}),p=l.spatialReference.isGeographic?"local":"georeferenced",{default:d}=await import("../geometry/Mesh.js"),y=d.createWithExternalSource(l,{type:"client",files:i},{vertexSpace:p,transform:le(l.spatialReference),unitConversionDisabled:!0}),[u]=await this.uploadAssets([y],{...t,useAssetOrigin:!t.location});return u}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;if(!t)return e;return(await we(e)).filter((e=>ie(t,e)))}validateLayer(e){if(e.layerType&&!Se.has(e.layerType))throw new o("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 o("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 o("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 o("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new o("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 o("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=f(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(o===v.SERVICE||o===v.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.getAtOrigin("fullExtent","service");if(null==this.associatedLayer?.infoFor3D||!e||!U(this.associatedLayer?.url)||!ye(this))return;f(this).setAtOrigin("fullExtent",e.clone(),v.SERVICE)}_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 R(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await ne.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(t){y(t)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){const e=new AbortController;this.addHandles(a(e));try{await c((()=>this.popupEnabled&&null!=this.popupTemplate),e.signal)}catch(r){return void u(r)}const t=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?n.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):n.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&&me(n.getLogger(this),ge("Mesh scene layers","relative-to-scene",e)),me(n.getLogger(this),ve("Scene layers",e))}async fetchStatistics(e,t){return await ue({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:"scenelayer",fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??"",customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}};e([h({types:{key:"type",base:H,typeMap:{selection:z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Ae.prototype,"featureReduction",void 0),e([h({type:[pe],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Ae.prototype,"rangeInfos",void 0),e([h({json:{read:!1}})],Ae.prototype,"associatedLayer",void 0),e([h({type:["show","hide"]})],Ae.prototype,"listMode",void 0),e([h({type:["ArcGISSceneServiceLayer"]})],Ae.prototype,"operationalLayerType",void 0),e([h({json:{read:!1},readOnly:!0})],Ae.prototype,"type",void 0),e([h({..._e.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"fields",void 0),e([h()],Ae.prototype,"types",null),e([h()],Ae.prototype,"typeIdField",null),e([h()],Ae.prototype,"templates",null),e([h()],Ae.prototype,"formTemplate",null),e([h({readOnly:!0,clonable:!1})],Ae.prototype,"fieldsIndex",null),e([h({type:ae,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Ae.prototype,"floorInfo",void 0),e([h(_e.outFields)],Ae.prototype,"outFields",void 0),e([h({type:X,readOnly:!0,json:{read:!1}})],Ae.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],Ae.prototype,"readNodePages",null),e([h({type:[Y],readOnly:!0})],Ae.prototype,"materialDefinitions",void 0),e([h({type:[ee],readOnly:!0})],Ae.prototype,"textureSetDefinitions",void 0),e([h({type:[te],readOnly:!0})],Ae.prototype,"geometryDefinitions",void 0),e([h({readOnly:!0})],Ae.prototype,"serviceUpdateTimeStamp",void 0),e([h({readOnly:!0})],Ae.prototype,"attributeStorageInfo",void 0),e([h({readOnly:!0})],Ae.prototype,"statisticsInfo",void 0),e([h({type:s.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Ae.prototype,"excludeObjectIds",void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Ae.prototype,"definitionExpression",void 0),e([h({type:de,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Ae.prototype,"filter",void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ae.prototype,"path",void 0),e([h(C)],Ae.prototype,"elevationInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"effectiveCapabilities",null),e([h({readOnly:!0})],Ae.prototype,"effectiveEditingEnabled",null),e([h({type:String})],Ae.prototype,"geometryType",null),e([h(G)],Ae.prototype,"labelsVisible",void 0),e([h({type:[se],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:oe},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:oe},write:!0}})],Ae.prototype,"labelingInfo",void 0),e([h(N)],Ae.prototype,"legendEnabled",void 0),e([h({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?Fe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Ae.prototype,"opacity",void 0),e([h({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"priority",void 0),e([h({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"semantic",void 0),e([h({types:he,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Ae.prototype,"renderer",null),e([h({json:{read:!1}})],Ae.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],Ae.prototype,"readCachedDrawingInfo",null),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"capabilities",null),e([h({type:Boolean,json:{read:!1}})],Ae.prototype,"editingEnabled",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"infoFor3D",null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Ae.prototype,"relationships",null),e([h(Q)],Ae.prototype,"popupEnabled",void 0),e([h({type:r,json:{name:"popupInfo",write:!0}})],Ae.prototype,"popupTemplate",void 0),e([h({readOnly:!0,json:{read:!1}})],Ae.prototype,"defaultPopupTemplate",null),e([h(V)],Ae.prototype,"attributeTableTemplate",void 0),e([h({type:String,json:{read:!1}})],Ae.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],Ae.prototype,"readObjectIdField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],Ae.prototype,"readGlobalIdField",null),e([h({readOnly:!0,type:String,json:{read:!1}})],Ae.prototype,"displayField",null),e([h({type:String,json:{read:!1}})],Ae.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],Ae.prototype,"readProfile",null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Ae.prototype,"normalReferenceFrame",void 0),e([h(M)],Ae.prototype,"screenSizePerspectiveEnabled",void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Ae.prototype,"serviceItemId",void 0),e([h(x)],Ae.prototype,"useViewTime",null),Ae=e([g("esri.layers.SceneLayer")],Ae);const Oe={"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"},Pe={"mesh-pyramids":"mesh",points:"point"},Ee=Ae;export{Ee 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.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Color.js";import r from"../request.js";import{deprecatedProperty as o}from"../core/deprecate.js";import i from"../core/Error.js";import l from"../core/Logger.js";import{clamp as s}from"../core/mathUtils.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{watch as a,initial as p,whenOnce as u}from"../core/reactiveUtils.js";import{property as y}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as d}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import m from"../geometry/Extent.js";import h from"../geometry/Polyline.js";import f from"../geometry/SpatialReference.js";import v from"./Layer.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as O}from"./mixins/CustomParametersMixin.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{parse as S}from"./support/arcgisLayerUrl.js";import{url as T}from"./support/commonProperties.js";import b from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as C}from"./support/serviceCapabilitiesUtils.js";import x from"./support/TelemetryData.js";import I from"./support/TelemetryDisplay.js";import U from"./support/VideoFrame.js";import E from"./support/VideoTimeExtent.js";import w from"./video/VideoController.js";import{getFrameHorizonPoints as N,getGroundControlPoints as L,getTelemetryData as P,getServiceLayersInfo as J,getSensorTrailPoints as M,readVideoTimeExtent as R}from"./video/videoUtils.js";import k from"../symbols/SimpleMarkerSymbol.js";let V=[];const H=new t([255,127,0]),q=new k({angle:0,color:H,outline:{color:[255,255,255],width:1.33},size:10,style:"circle"});let z=class extends(g(j(n(O(v))))){constructor(e){super(e),this.capabilities=null,this.codecs=null,this.connectionInfo=null,this.controller=new w,this.copyright=null,this.created=null,this.description=null,this.elevationSource=null,this.frame=null,this.frameCount=null,this.frameEffect=null,this.frameOpacity=1,this.fullExtent=null,this.initialExtent=null,this.layerId=null,this.playbackInfo=null,this.posterUrl=null,this.qualities=null,this.sensorSymbol=q,this.serviceItemId=null,this.sourceJSON=null,this.sourceQuality=null,this.sourceType=null,this.spatialReference=f.WGS84,this.start=0,this.telemetryDisplay=null,this.telemetryColor=H,this.title=null,this.type="video",this.url=null,this.version=null,this.videoLayersInfo=null}initialize(){this.telemetryDisplay=new I({frame:!1,frameCenter:!1,frameOutline:!0,lineOfSight:!0,sensorLocation:!0,sensorTrail:!0}),this.addHandles([a((()=>this.metadata),(()=>{this.notifyChange("telemetry"),this.notifyChange("groundControlPoints"),this.notifyChange("frameHorizonPoints")})),a((()=>this.telemetry?.sensorLocation),(e=>this._setSensorTrail(e)),p)]),u((()=>"can-play"===this.state&&this.duration>0)).then((()=>{this.start>=0&&this.start<=this.duration&&this.setCurrentTime(this.start)}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}get autoplay(){return this.controller?.autoplay??!1}set autoplay(e){this.controller.autoplay=e}get buffered(){return this.controller.buffered}readCapabilitiesFromService(e,t){return C(t)}readConnectionInfo(e,t){const r=Object.values(t.connectionUrl);return r?.length&&(this.controller.playerUrl=r[0]),t.connectionUrl}get currentTime(){return this.controller.currentTime}get duration(){return this.controller.duration}get ended(){return this.controller.ended}get frameHorizonPoints(){return N(this.metadata)}get groundControlPoints(){return L(this.metadata)}get loop(){return this.controller.loop}set loop(e){this.controller.loop=e}get metadata(){return this.controller?.currentMetadata}get mimeType(){return this.controller?.mimeType}get muted(){return this.controller.muted}set muted(e){this.controller.muted=e}get playbackRate(){return this.controller.rate}set playbackRate(e){this.controller.rate=e}get playerUrl(){return this.controller.playerUrl}get playing(){return this.controller.playing}get state(){return this.controller.state}get telemetry(){return P(this.metadata)}get videoElement(){return this.controller?.element}get videoHeight(){return this.controller?.videoHeight}readLayerInfosFromService(e,t){return J(t)}get videoTimeExtent(){return o(l.getLogger(this),"videoTimeExtent",{replacement:"fullTimeExtent",version:"4.33",warnOnce:!0}),this.fullTimeExtent}get videoWidth(){return this.controller?.videoWidth}get waiting(){return this.controller.waiting}play(){this.controller.play()}pause(){this.controller.pause()}reset(){this.controller.reset()}setCurrentTime(e){if(this.duration<0)return;const t=s(e,0,this.duration);this.controller.setCurrentTime(t)}toGround(e,t){return this.controller?.sensorModel?.metadataSupportsTransforms?this.controller.sensorModel.transformImageToGeo(e,t):null}toVideo(e){if(!this.controller?.sensorModel?.metadataSupportsTransforms)return null;const t=this.controller.sensorModel.transformGeoToImage(e.x,e.y,e.z);return{x:t[0],y:t[1]}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const t=S(this.parsedUrl?.path);if(null==t)throw new i("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");let o=null;const{data:l,ssl:s}=await r(t.url.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:e}),n=l;if(this.url=t.url.path,s&&(this.url=this.url.replace(/^http:/i,"https:")),!n?.currentVersion)return n.currentVersion="11.2",this.sourceJSON=n,void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});let a=t?.sublayer;if(null==a&&n.layers?.length&&(a=n.layers[0].id),null==a)throw new i("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");this.url=`${t.url.path}/${a}`,o=await r(this.url,{query:{f:"json",...this.customParameters},signal:e});const p={...n,...o.data};this.sourceJSON=p,this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl})}_setSensorTrail(e){if(!e)return;const t=M(e,V);V=[...t];const r=V.map((e=>e.toArray())),o=new h({hasZ:e.hasZ,paths:[r]});this.telemetry.sensorTrail=o.clone()}};e([y()],z.prototype,"autoplay",null),e([y({readOnly:!0})],z.prototype,"buffered",null),e([y({readOnly:!0,json:{read:!1}})],z.prototype,"capabilities",void 0),e([d("service","capabilities",["supportsAppend","supportsCoverageQuery","supportsExportClip","supportsExportFrameset","supportsMensuration","supportsPreviews","supportsUpdate"])],z.prototype,"readCapabilitiesFromService",null),e([y({readOnly:!0})],z.prototype,"codecs",void 0),e([y({readOnly:!0})],z.prototype,"connectionInfo",void 0),e([d("connectionInfo",["connectionUrl"])],z.prototype,"readConnectionInfo",null),e([y()],z.prototype,"controller",void 0),e([y({type:String})],z.prototype,"copyright",void 0),e([y({readOnly:!0,type:Date})],z.prototype,"created",void 0),e([y({type:Number})],z.prototype,"currentTime",null),e([y({type:String})],z.prototype,"description",void 0),e([y({type:Number})],z.prototype,"duration",null),e([y({readOnly:!0})],z.prototype,"elevationSource",void 0),e([y({type:Boolean})],z.prototype,"ended",null),e([y({type:U})],z.prototype,"frame",void 0),e([y({readOnly:!0,type:Number})],z.prototype,"frameCount",void 0),e([y()],z.prototype,"frameEffect",void 0),e([y()],z.prototype,"frameOpacity",void 0),e([y({type:m})],z.prototype,"fullExtent",void 0),e([y({readOnly:!0})],z.prototype,"frameHorizonPoints",null),e([y({readOnly:!0,nonNullable:!1,json:{read:{reader:R,source:"time"}},type:E})],z.prototype,"fullTimeExtent",void 0),e([y({readOnly:!0})],z.prototype,"groundControlPoints",null),e([y({type:m})],z.prototype,"initialExtent",void 0),e([y({readOnly:!0,json:{read:{source:"id"}}})],z.prototype,"layerId",void 0),e([y({type:Boolean})],z.prototype,"loop",null),e([y({readOnly:!0})],z.prototype,"metadata",null),e([y({readOnly:!0})],z.prototype,"mimeType",null),e([y({type:Boolean})],z.prototype,"muted",null),e([y({type:b})],z.prototype,"playbackInfo",void 0),e([y({type:Number})],z.prototype,"playbackRate",null),e([y({type:String})],z.prototype,"playerUrl",null),e([y({readOnly:!0})],z.prototype,"playing",null),e([y({readOnly:!0,json:{read:{source:"poster"}}})],z.prototype,"posterUrl",void 0),e([y({readOnly:!0})],z.prototype,"qualities",void 0),e([y()],z.prototype,"sensorSymbol",void 0),e([y({readOnly:!0})],z.prototype,"serviceItemId",void 0),e([y()],z.prototype,"sourceJSON",void 0),e([y({readOnly:!0})],z.prototype,"sourceQuality",void 0),e([y({readOnly:!0,json:{name:"serviceType"}})],z.prototype,"sourceType",void 0),e([y()],z.prototype,"spatialReference",void 0),e([y()],z.prototype,"start",void 0),e([y({readOnly:!0,type:String})],z.prototype,"state",null),e([y({readOnly:!0,type:x})],z.prototype,"telemetry",null),e([y({type:I})],z.prototype,"telemetryDisplay",void 0),e([y({type:t})],z.prototype,"telemetryColor",void 0),e([y({readOnly:!1,json:{read:{source:"name"}}})],z.prototype,"title",void 0),e([y({readOnly:!0})],z.prototype,"type",void 0),e([y(T)],z.prototype,"url",void 0),e([y({readOnly:!0,type:Number,json:{read:{source:"currentVersion"}}})],z.prototype,"version",void 0),e([y({readOnly:!0})],z.prototype,"videoElement",null),e([y({readOnly:!0})],z.prototype,"videoHeight",null),e([y({readOnly:!0,json:{read:!1}})],z.prototype,"videoLayersInfo",void 0),e([d("service","videoLayersInfo",["id","name","poster","serviceType","type"])],z.prototype,"readLayerInfosFromService",null),e([y({type:E,nonNullable:!1,readOnly:!0})],z.prototype,"videoTimeExtent",null),e([y({readOnly:!0})],z.prototype,"videoWidth",null),e([y({readOnly:!0})],z.prototype,"waiting",null),z=e([c("esri.layers.VideoLayer")],z);const D=z;export{D as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Color.js";import r from"../request.js";import{deprecatedProperty as o}from"../core/deprecate.js";import i from"../core/Error.js";import l from"../core/Logger.js";import{clamp as s}from"../core/mathUtils.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{watch as a,initial as p,whenOnce as u}from"../core/reactiveUtils.js";import{property as y}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as d}from"../core/accessorSupport/decorators/reader.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import m from"../geometry/Extent.js";import h from"../geometry/Polyline.js";import f from"../geometry/SpatialReference.js";import v from"./Layer.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as O}from"./mixins/CustomParametersMixin.js";import{ScaleRangeLayer as j}from"./mixins/ScaleRangeLayer.js";import{parse as S}from"./support/arcgisLayerUrl.js";import{url as T}from"./support/commonProperties.js";import b from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as C}from"./support/serviceCapabilitiesUtils.js";import x from"./support/TelemetryData.js";import I from"./support/TelemetryDisplay.js";import U from"./support/VideoFrame.js";import E from"./support/VideoTimeExtent.js";import w from"./video/VideoController.js";import{getFrameHorizonPoints as N,getGroundControlPoints as L,getTelemetryData as P,getServiceLayersInfo as J,getSensorTrailPoints as M,readVideoTimeExtent as R}from"./video/videoUtils.js";import k from"../symbols/SimpleMarkerSymbol.js";let V=[];const H=new t([255,127,0]),q=new k({angle:0,color:H,outline:{color:[255,255,255],width:1.33},size:10,style:"circle"});let z=class extends(g(j(n(O(v))))){constructor(e){super(e),this.capabilities=null,this.codecs=null,this.connectionInfo=null,this.controller=new w,this.copyright=null,this.created=null,this.description=null,this.elevationSource=null,this.frame=null,this.frameCount=null,this.frameEffect=null,this.frameOpacity=1,this.fullExtent=null,this.initialExtent=null,this.layerId=null,this.playbackInfo=null,this.posterUrl=null,this.qualities=null,this.sensorSymbol=q,this.serviceItemId=null,this.sourceJSON=null,this.sourceQuality=null,this.sourceType=null,this.spatialReference=f.WGS84,this.start=0,this.telemetryDisplay=null,this.telemetryColor=H,this.title=null,this.type="video",this.url=null,this.version=null,this.videoLayersInfo=null}initialize(){this.telemetryDisplay=new I({frame:!1,frameCenter:!1,frameOutline:!0,lineOfSight:!0,sensorLocation:!0,sensorTrail:!0}),this.addHandles([a((()=>this.metadata),(()=>{this.notifyChange("telemetry"),this.notifyChange("groundControlPoints"),this.notifyChange("frameHorizonPoints")})),a((()=>this.telemetry?.sensorLocation),(e=>this._setSensorTrail(e)),p)]),u((()=>this.loaded&&"can-play"===this.state&&this.duration>0)).then((()=>{this.start>=0&&this.start<=this.duration&&this.setCurrentTime(this.start)}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}get autoplay(){return this.controller?.autoplay??!1}set autoplay(e){this.controller.autoplay=e}get buffered(){return this.controller.buffered}readCapabilitiesFromService(e,t){return C(t)}readConnectionInfo(e,t){const r=Object.values(t.connectionUrl);return r?.length&&(this.controller.playerUrl=r[0]),t.connectionUrl}get currentTime(){return this.controller.currentTime}get duration(){return this.controller.duration}get ended(){return this.controller.ended}get frameHorizonPoints(){return N(this.metadata)}get groundControlPoints(){return L(this.metadata)}get loop(){return this.controller.loop}set loop(e){this.controller.loop=e}get metadata(){return this.controller?.currentMetadata}get mimeType(){return this.controller?.mimeType}get muted(){return this.controller.muted}set muted(e){this.controller.muted=e}get playbackRate(){return this.controller.rate}set playbackRate(e){this.controller.rate=e}get playerUrl(){return this.controller.playerUrl}get playing(){return this.controller.playing}get state(){return this.controller.state}get telemetry(){return P(this.metadata)}get videoElement(){return this.controller?.element}get videoHeight(){return this.controller?.videoHeight}readLayerInfosFromService(e,t){return J(t)}get videoTimeExtent(){return o(l.getLogger(this),"videoTimeExtent",{replacement:"fullTimeExtent",version:"4.33",warnOnce:!0}),this.fullTimeExtent}get videoWidth(){return this.controller?.videoWidth}get waiting(){return this.controller.waiting}play(){this.controller.play()}pause(){this.controller.pause()}reset(){this.controller.reset()}setCurrentTime(e){if(this.duration<0)return;const t=s(e,0,this.duration);this.controller.setCurrentTime(t)}toGround(e,t){return this.controller?.sensorModel?.metadataSupportsTransforms?this.controller.sensorModel.transformImageToGeo(e,t):null}toVideo(e){if(!this.controller?.sensorModel?.metadataSupportsTransforms)return null;const t=this.controller.sensorModel.transformGeoToImage(e.x,e.y,e.z);return{x:t[0],y:t[1]}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const t=S(this.parsedUrl?.path);if(null==t)throw new i("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");let o=null;const{data:l,ssl:s}=await r(t.url.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:e}),n=l;if(this.url=t.url.path,s&&(this.url=this.url.replace(/^http:/i,"https:")),!n?.currentVersion)return n.currentVersion="11.2",this.sourceJSON=n,void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});let a=t?.sublayer;if(null==a&&n.layers?.length&&(a=n.layers[0].id),null==a)throw new i("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");this.url=`${t.url.path}/${a}`,o=await r(this.url,{query:{f:"json",...this.customParameters},signal:e});const p={...n,...o.data};this.sourceJSON=p,this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl})}_setSensorTrail(e){if(!e)return;const t=M(e,V);V=[...t];const r=V.map((e=>e.toArray())),o=new h({hasZ:e.hasZ,paths:[r]});this.telemetry.sensorTrail=o.clone()}};e([y()],z.prototype,"autoplay",null),e([y({readOnly:!0})],z.prototype,"buffered",null),e([y({readOnly:!0,json:{read:!1}})],z.prototype,"capabilities",void 0),e([d("service","capabilities",["supportsAppend","supportsCoverageQuery","supportsExportClip","supportsExportFrameset","supportsMensuration","supportsPreviews","supportsUpdate"])],z.prototype,"readCapabilitiesFromService",null),e([y({readOnly:!0})],z.prototype,"codecs",void 0),e([y({readOnly:!0})],z.prototype,"connectionInfo",void 0),e([d("connectionInfo",["connectionUrl"])],z.prototype,"readConnectionInfo",null),e([y()],z.prototype,"controller",void 0),e([y({type:String})],z.prototype,"copyright",void 0),e([y({readOnly:!0,type:Date})],z.prototype,"created",void 0),e([y({type:Number})],z.prototype,"currentTime",null),e([y({type:String})],z.prototype,"description",void 0),e([y({type:Number})],z.prototype,"duration",null),e([y({readOnly:!0})],z.prototype,"elevationSource",void 0),e([y({type:Boolean})],z.prototype,"ended",null),e([y({type:U})],z.prototype,"frame",void 0),e([y({readOnly:!0,type:Number})],z.prototype,"frameCount",void 0),e([y()],z.prototype,"frameEffect",void 0),e([y()],z.prototype,"frameOpacity",void 0),e([y({type:m})],z.prototype,"fullExtent",void 0),e([y({readOnly:!0})],z.prototype,"frameHorizonPoints",null),e([y({readOnly:!0,nonNullable:!1,json:{read:{reader:R,source:"time"}},type:E})],z.prototype,"fullTimeExtent",void 0),e([y({readOnly:!0})],z.prototype,"groundControlPoints",null),e([y({type:m})],z.prototype,"initialExtent",void 0),e([y({readOnly:!0,json:{read:{source:"id"}}})],z.prototype,"layerId",void 0),e([y({type:Boolean})],z.prototype,"loop",null),e([y({readOnly:!0})],z.prototype,"metadata",null),e([y({readOnly:!0})],z.prototype,"mimeType",null),e([y({type:Boolean})],z.prototype,"muted",null),e([y({type:b})],z.prototype,"playbackInfo",void 0),e([y({type:Number})],z.prototype,"playbackRate",null),e([y({type:String})],z.prototype,"playerUrl",null),e([y({readOnly:!0})],z.prototype,"playing",null),e([y({readOnly:!0,json:{read:{source:"poster"}}})],z.prototype,"posterUrl",void 0),e([y({readOnly:!0})],z.prototype,"qualities",void 0),e([y()],z.prototype,"sensorSymbol",void 0),e([y({readOnly:!0})],z.prototype,"serviceItemId",void 0),e([y()],z.prototype,"sourceJSON",void 0),e([y({readOnly:!0})],z.prototype,"sourceQuality",void 0),e([y({readOnly:!0,json:{name:"serviceType"}})],z.prototype,"sourceType",void 0),e([y()],z.prototype,"spatialReference",void 0),e([y()],z.prototype,"start",void 0),e([y({readOnly:!0,type:String})],z.prototype,"state",null),e([y({readOnly:!0,type:x})],z.prototype,"telemetry",null),e([y({type:I})],z.prototype,"telemetryDisplay",void 0),e([y({type:t})],z.prototype,"telemetryColor",void 0),e([y({readOnly:!1,json:{read:{source:"name"}}})],z.prototype,"title",void 0),e([y({readOnly:!0})],z.prototype,"type",void 0),e([y(T)],z.prototype,"url",void 0),e([y({readOnly:!0,type:Number,json:{read:{source:"currentVersion"}}})],z.prototype,"version",void 0),e([y({readOnly:!0})],z.prototype,"videoElement",null),e([y({readOnly:!0})],z.prototype,"videoHeight",null),e([y({readOnly:!0,json:{read:!1}})],z.prototype,"videoLayersInfo",void 0),e([d("service","videoLayersInfo",["id","name","poster","serviceType","type"])],z.prototype,"readLayerInfosFromService",null),e([y({type:E,nonNullable:!1,readOnly:!0})],z.prototype,"videoTimeExtent",null),e([y({readOnly:!0})],z.prototype,"videoWidth",null),e([y({readOnly:!0})],z.prototype,"waiting",null),z=e([c("esri.layers.VideoLayer")],z);const D=z;export{D as default};