@arcgis/core 4.34.0-next.15 → 4.34.0-next.17

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 (216) hide show
  1. package/analysis/Analysis.js +1 -1
  2. package/analysis/AreaMeasurementAnalysis.js +1 -1
  3. package/analysis/DimensionAnalysis.js +1 -1
  4. package/analysis/DimensionSimpleStyle.js +1 -1
  5. package/analysis/DirectLineMeasurementAnalysis.js +1 -1
  6. package/analysis/LengthDimension.js +1 -1
  7. package/analysis/LineOfSightAnalysis.js +1 -1
  8. package/analysis/SliceAnalysis.js +1 -1
  9. package/analysis/SlicePlane.js +1 -1
  10. package/analysis/ViewshedAnalysis.js +1 -1
  11. package/applications/Components/sanitizerUtils.d.ts +3 -0
  12. package/applications/Components/sanitizerUtils.js +5 -0
  13. package/applications/MapViewer/layerUtils.d.ts +3 -0
  14. package/applications/MapViewer/layerUtils.js +5 -0
  15. package/applications/SceneViewer/layerUtils.d.ts +2 -2
  16. package/arcade.js +1 -1
  17. package/assets/esri/core/workers/RemoteClient.js +1 -1
  18. package/assets/esri/core/workers/chunks/{a08ce98672ab94d19613.js → 04e558a970c6a77f243e.js} +1 -1
  19. package/assets/esri/core/workers/chunks/0d99579d8cdeddc0fc9c.js +1 -0
  20. package/assets/esri/core/workers/chunks/1443520c9fb23381f8d5.js +1 -0
  21. package/assets/esri/core/workers/chunks/1a7570bd2b79194ff94b.js +42 -0
  22. package/assets/esri/core/workers/chunks/{0ed4ec00ef16aa58a33d.js → 254c4f7e277ae9915dce.js} +1 -1
  23. package/assets/esri/core/workers/chunks/2d51d0a24cdc89bafa1c.js +1 -0
  24. package/assets/esri/core/workers/chunks/2d89e354eeadadca4f7f.js +1 -0
  25. package/assets/esri/core/workers/chunks/3f8cc157b65a9d570921.js +1 -0
  26. package/assets/esri/core/workers/chunks/{2254989ca3ff3960f2fe.js → 400a4c9fa62964f8fa1d.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{58f403f956b7b3467344.js → 42da01bd3f401a017c0f.js} +1 -1
  28. package/assets/esri/core/workers/chunks/445ddf57d2f503a0b98b.js +1 -0
  29. package/assets/esri/core/workers/chunks/513dc2467e9b8b8c6df4.js +1 -0
  30. package/assets/esri/core/workers/chunks/52239e958a82ebcd2e7a.js +1 -0
  31. package/assets/esri/core/workers/chunks/{e980a81c4d1e05f07141.js → 53e43798d08ad2075c1f.js} +1 -1
  32. package/assets/esri/core/workers/chunks/55ce214a10fb6fc2e901.js +1 -0
  33. package/assets/esri/core/workers/chunks/{a6bcae413e62cd879b46.js → 5859e425c9bca96b6c80.js} +1 -1
  34. package/assets/esri/core/workers/chunks/5bfccd5dffda74740aa4.js +1 -0
  35. package/assets/esri/core/workers/chunks/66c8816e91e3f9e214d4.js +346 -0
  36. package/assets/esri/core/workers/chunks/{948c5454881e661c3bdc.js → 78a57f5aeb277b84b3da.js} +1 -1
  37. package/assets/esri/core/workers/chunks/7c56740cac444419e5b4.js +1 -0
  38. package/assets/esri/core/workers/chunks/{7f14d6cb754c7e94748c.js → 827919fe23e06e40a330.js} +139 -115
  39. package/assets/esri/core/workers/chunks/8599df135928d73da4a3.js +1 -0
  40. package/assets/esri/core/workers/chunks/87986f31061c426e761b.js +1 -0
  41. package/assets/esri/core/workers/chunks/{7ae88c141a5d85e5bb88.js → 87a743df7d8556d5e253.js} +1 -1
  42. package/assets/esri/core/workers/chunks/8855f1a6224ffbd0bb66.js +1 -0
  43. package/assets/esri/core/workers/chunks/885e8e90dfe5dbd5053d.js +1 -0
  44. package/assets/esri/core/workers/chunks/93e66d9c49eaeb503bff.js +1 -0
  45. package/assets/esri/core/workers/chunks/974c6b0e3a1f1dd523fa.js +1 -0
  46. package/assets/esri/core/workers/chunks/aeabe203da7bcdd580cf.js +1 -0
  47. package/assets/esri/core/workers/chunks/beb01d400f1aa089d2dc.js +1 -0
  48. package/assets/esri/core/workers/chunks/c1a72e1dbd1ba7b41965.js +1 -0
  49. package/assets/esri/core/workers/chunks/c4065934637b820cad5b.js +1 -0
  50. package/assets/esri/core/workers/chunks/cc1328cacc4ac07eb548.js +1 -0
  51. package/assets/esri/core/workers/chunks/{05f2133f05f86266d8c7.js → d2139307f62ea8bf999a.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{3f58da371633967a61ca.js → ddb66fe6fcd0764daa7a.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{70e5848aa372475fc8fa.js → eac7af86166c09c6a9be.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{243eb8a317333ec2715b.js → f3e179b48bca50c94538.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{7317346ed8d7c5bb859d.js → f537a02dc2fc9e6435a2.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{7e1906d35a764f7f10b0.js → fe1129f03476825a7344.js} +1 -1
  57. package/chunks/DefaultMaterial.glsl.js +30 -28
  58. package/chunks/RealisticTree.glsl.js +25 -22
  59. package/chunks/aiServices.js +1 -1
  60. package/config.js +1 -1
  61. package/core/LRUCache.js +1 -1
  62. package/core/MemCache.js +1 -1
  63. package/core/arrayUtils.js +1 -1
  64. package/core/urlUtils.js +1 -1
  65. package/core/workers/RemoteClient.js +1 -1
  66. package/core/workers/WorkerHandle.js +1 -1
  67. package/interfaces.d.ts +69 -25
  68. package/kernel.js +1 -1
  69. package/layers/VideoLayer.js +1 -1
  70. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  71. package/layers/mixins/FeatureLayerBase.js +1 -1
  72. package/layers/support/arcgisLayers.js +1 -1
  73. package/layers/support/fetchService.js +1 -1
  74. package/layers/support/layerUtils.js +1 -1
  75. package/package.json +1 -1
  76. package/portal/support/layersLoader.js +1 -1
  77. package/portal/support/loadUtils.js +1 -1
  78. package/portal/support/portalLayers.js +1 -1
  79. package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
  80. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
  81. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
  82. package/rest/support/TranslateParameters.js +1 -1
  83. package/support/revision.js +1 -1
  84. package/symbols/WaterSymbol3DLayer.js +1 -1
  85. package/symbols/support/jsonUtils.js +1 -1
  86. package/symbols/support/symbolUtils.js +1 -1
  87. package/symbols/support/utils.js +1 -1
  88. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  89. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  90. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  91. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  92. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  93. package/views/3d/FocusAreasView.js +1 -1
  94. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  95. package/views/3d/analysis/Slice/SliceController.js +1 -1
  96. package/views/3d/layers/I3SMeshView3D.js +1 -1
  97. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  98. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  99. package/views/3d/layers/RouteLayerView3D.js +1 -1
  100. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  101. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  102. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  103. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  104. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  105. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  106. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  107. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  108. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  109. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  110. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  111. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  112. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  113. package/views/3d/layers/i3s/I3SLodHandling.js +1 -1
  114. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  115. package/views/3d/layers/support/makeScheduleFunction.js +1 -1
  116. package/views/3d/layers/support/symbolColorUtils.js +1 -1
  117. package/views/3d/state/controllers/FovController.js +1 -1
  118. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  119. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  120. package/views/3d/state/controllers/RotateController.js +1 -1
  121. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  122. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  123. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  124. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  125. package/views/3d/state/utils/navigationUtils.js +1 -1
  126. package/views/3d/support/StreamDataLoader.js +1 -1
  127. package/views/3d/terrain/OverlayRenderer.js +1 -1
  128. package/views/3d/terrain/TerrainRenderer.js +1 -1
  129. package/views/3d/terrain/TerrainSurface.js +1 -1
  130. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  131. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  132. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  133. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstanceColor.glsl.js +11 -0
  134. package/views/3d/webgl-engine/core/shaderLibrary/attributes/MaskedColor.glsl.js +18 -0
  135. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +40 -26
  136. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +35 -24
  137. package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +12 -8
  138. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +3 -1
  139. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +26 -8
  140. package/views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js +1 -1
  141. package/views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js +1 -1
  142. package/views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js +1 -1
  143. package/views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js +1 -1
  144. package/views/3d/webgl-engine/core/shaderModules/Float3DrawUniform.js +1 -1
  145. package/views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js +1 -1
  146. package/views/3d/webgl-engine/core/shaderModules/Float4BindUniform.js +1 -1
  147. package/views/3d/webgl-engine/core/shaderModules/Float4DrawUniform.js +1 -1
  148. package/views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js +1 -1
  149. package/views/3d/webgl-engine/core/shaderModules/Float4sPassUniform.js +1 -1
  150. package/views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js +1 -1
  151. package/views/3d/webgl-engine/core/shaderModules/FloatDrawUniform.js +1 -1
  152. package/views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js +1 -1
  153. package/views/3d/webgl-engine/core/shaderModules/FloatsPassUniform.js +1 -1
  154. package/views/3d/webgl-engine/core/shaderModules/Matrix3DrawUniform.js +1 -1
  155. package/views/3d/webgl-engine/core/shaderModules/Matrix3PassUniform.js +1 -1
  156. package/views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js +1 -1
  157. package/views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js +1 -1
  158. package/views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js +1 -1
  159. package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
  160. package/views/3d/webgl-engine/core/shaderModules/Matrix4sPassUniform.js +1 -1
  161. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  162. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  163. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  164. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  165. package/views/3d/webgl-engine/lib/Program.js +1 -1
  166. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  167. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  168. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  169. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  170. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  171. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  172. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  173. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  174. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  175. package/views/analysis/analysisViewUtils.js +1 -1
  176. package/views/webgl/Program.js +1 -1
  177. package/views/webgl/ShaderBuilder.js +1 -1
  178. package/webscene/Slide.js +1 -1
  179. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  180. package/widgets/BatchAttributeForm.js +1 -1
  181. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  182. package/widgets/FeatureTemplates.js +1 -1
  183. package/widgets/LineOfSight/LineOfSightTarget.js +1 -1
  184. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  185. package/widgets/Search/SearchViewModel.js +1 -1
  186. package/widgets/Search/support/layerSearchUtils.js +1 -1
  187. package/widgets/support/ItemList.js +1 -1
  188. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  189. package/widgets/support/SelectionList/LayerItem.js +1 -1
  190. package/widgets/support/SelectionList.js +1 -1
  191. package/widgets/support/dateUtils.js +1 -1
  192. package/widgets/support/symbolPreviewUtils.js +1 -1
  193. package/assets/esri/core/workers/chunks/0dbb350ce651bc236ec8.js +0 -1
  194. package/assets/esri/core/workers/chunks/0ff6f15d46d7ddf6fe4d.js +0 -1
  195. package/assets/esri/core/workers/chunks/1f559f1e7f0bc0f4bf20.js +0 -346
  196. package/assets/esri/core/workers/chunks/462cc6966d060be59c7c.js +0 -1
  197. package/assets/esri/core/workers/chunks/4a805e7a57d25c4b595f.js +0 -66
  198. package/assets/esri/core/workers/chunks/58f92100b1b2343111c6.js +0 -1
  199. package/assets/esri/core/workers/chunks/5dcc8fa321f0a7c49f36.js +0 -1
  200. package/assets/esri/core/workers/chunks/5e539ce4751bcfa57145.js +0 -1
  201. package/assets/esri/core/workers/chunks/6194636638b0439fccd8.js +0 -1
  202. package/assets/esri/core/workers/chunks/622c0552ca3cd674d46c.js +0 -1
  203. package/assets/esri/core/workers/chunks/632d1a1287dde980479e.js +0 -1
  204. package/assets/esri/core/workers/chunks/64f5f27e7c5649d79cbc.js +0 -1
  205. package/assets/esri/core/workers/chunks/658e82c9b722852e02d0.js +0 -1
  206. package/assets/esri/core/workers/chunks/679d7baea233faf3fdbc.js +0 -1
  207. package/assets/esri/core/workers/chunks/7aef81778155be373d3e.js +0 -1
  208. package/assets/esri/core/workers/chunks/8b93cd4132934b0d7d39.js +0 -1
  209. package/assets/esri/core/workers/chunks/95507ff0a243e451b99e.js +0 -1
  210. package/assets/esri/core/workers/chunks/97b69fec3e87f11210ba.js +0 -1
  211. package/assets/esri/core/workers/chunks/a250a5c6e055e33bd25c.js +0 -1
  212. package/assets/esri/core/workers/chunks/b4273381dc069f4e1fa2.js +0 -1
  213. package/assets/esri/core/workers/chunks/b72137c63b7f2a525d9e.js +0 -1
  214. package/assets/esri/core/workers/chunks/c2264451d12f1fbaad22.js +0 -1
  215. package/assets/esri/core/workers/chunks/c6c86cbe65a58c3093ae.js +0 -1
  216. package/assets/esri/core/workers/chunks/fe3703ec198cbfebec30.js +0 -1
package/interfaces.d.ts CHANGED
@@ -1039,7 +1039,7 @@ declare namespace __esri {
1039
1039
  */
1040
1040
  width: number;
1041
1041
  /**
1042
- * Provides the shape definition of a slice plane for a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Slice.html Slice} widget
1042
+ * Provides the shape definition of a slice plane for a {@link https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-slice/ Slice component}
1043
1043
  * or {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-SliceAnalysis.html SliceAnalysis}.
1044
1044
  *
1045
1045
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-SlicePlane.html Read more...}
@@ -1566,6 +1566,17 @@ declare namespace __esri {
1566
1566
  */
1567
1567
  export type UnitFormat = "singular" | "plural" | "abbr";
1568
1568
 
1569
+ /**
1570
+ * Note: reserved for internal use only, this is not part of the stable public API.
1571
+ *
1572
+ * Sanitiziing utils for Components.
1573
+ */
1574
+ interface sanitizerUtils {
1575
+ renderingSanitizer: any;
1576
+ }
1577
+
1578
+ export const sanitizerUtils: sanitizerUtils;
1579
+
1569
1580
  /**
1570
1581
  * Note: reserved for internal use only, this is not part of the stable public API.
1571
1582
  *
@@ -2026,6 +2037,25 @@ declare namespace __esri {
2026
2037
  relationshipsUrl?: string;
2027
2038
  }
2028
2039
 
2040
+ /**
2041
+ * Note: reserved for internal use only, this is not part of the stable public API.
2042
+ *
2043
+ * General layer utilities for the map viewer application.
2044
+ */
2045
+ interface layerUtils {
2046
+ /**
2047
+ * Note: reserved for internal use only, this is not part of the stable public API.
2048
+ *
2049
+ * Returns `true` if the layer url has been modified from its initial value to use the preferred host
2050
+ * advertised in its metadata via `preferredHost` property.
2051
+ *
2052
+ * @param layer The layer to check.
2053
+ */
2054
+ isUrlHostModified(layer: any): boolean;
2055
+ }
2056
+
2057
+ export const layerUtils: layerUtils;
2058
+
2029
2059
  /**
2030
2060
  * Note: reserved for internal use only, this is not part of the stable public API.
2031
2061
  *
@@ -2199,7 +2229,7 @@ declare namespace __esri {
2199
2229
  *
2200
2230
  * Various layer utilities for the Scene Viewer application.
2201
2231
  */
2202
- interface layerUtils {
2232
+ interface SceneViewerLayerUtils {
2203
2233
  /**
2204
2234
  * Note: reserved for internal use only, this is not part of the stable public API.
2205
2235
  *
@@ -2222,7 +2252,7 @@ declare namespace __esri {
2222
2252
  revertLayerProperty(layer: OperationalLayer, property: string, origin: "service" | "portal-item" | "web-scene" | "web-map" | "link-chart"): void;
2223
2253
  }
2224
2254
 
2225
- export const layerUtils: layerUtils;
2255
+ export const SceneViewerLayerUtils: SceneViewerLayerUtils;
2226
2256
 
2227
2257
  /**
2228
2258
  * Note: reserved for internal use only, this is not part of the stable public API.
@@ -2565,6 +2595,7 @@ declare namespace __esri {
2565
2595
  executeAsyncBatch: ExecuteFunctionAsyncBatch;
2566
2596
  fieldsUsed: string[];
2567
2597
  geometryUsed: boolean;
2598
+ variablesUsed: string[];
2568
2599
  isAsync: boolean;
2569
2600
  }
2570
2601
 
@@ -4937,7 +4968,7 @@ declare namespace __esri {
4937
4968
 
4938
4969
  export class FocusAreas {
4939
4970
  /**
4940
- * The rendering style of the map outside of all enabled focus areas.
4971
+ * The rendering style of the map, applied outside of all enabled focus areas.
4941
4972
  *
4942
4973
  * @default "bright"
4943
4974
  *
@@ -4989,7 +5020,7 @@ declare namespace __esri {
4989
5020
  */
4990
5021
  areas?: CollectionProperties<FocusAreaProperties>;
4991
5022
  /**
4992
- * The rendering style of the map outside of all enabled focus areas.
5023
+ * The rendering style of the map, applied outside of all enabled focus areas.
4993
5024
  *
4994
5025
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-effects-FocusAreas.html#style Read more...}
4995
5026
  */
@@ -21773,7 +21804,7 @@ declare namespace __esri {
21773
21804
  * @param width The width of the image in pixels.
21774
21805
  * @param height The height of the image in pixels.
21775
21806
  * @param options The parameter options is an object with the following properties.
21776
- * @deprecated since version 4.33. Use {@link module:esri/layers/ImageryLayer#fetchPixels} instead.
21807
+ * @deprecated since version 4.33. Use {@link module:esri/layers/ImageryLayer#fetchPixels ImageryLayer.fetchPixels} instead.
21777
21808
  *
21778
21809
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#fetchImage Read more...}
21779
21810
  */
@@ -25757,7 +25788,7 @@ declare namespace __esri {
25757
25788
  * @param width The width of the image in pixels.
25758
25789
  * @param height The height of the image in pixels.
25759
25790
  * @param options The parameter options is an object with the following properties.
25760
- * @deprecated since version 4.33. Use {@link module:esri/layers/ImageryLayer#fetchPixels} instead.
25791
+ * @deprecated since version 4.33. Use {@link module:esri/layers/ImageryLayer#fetchPixels ImageryLayer.fetchPixels} instead.
25761
25792
  *
25762
25793
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-mixins-ArcGISImageService.html#fetchImage Read more...}
25763
25794
  */
@@ -40170,7 +40201,7 @@ declare namespace __esri {
40170
40201
  */
40171
40202
  constructor(properties?: SublayerProperties);
40172
40203
  /**
40173
- * The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-tables-AttributeTableTemplate.html template} used to configure an associated layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html FeatureTable}.
40204
+ * This property is used to configure the associated layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html FeatureTable}.
40174
40205
  *
40175
40206
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#attributeTableTemplate Read more...}
40176
40207
  */
@@ -40382,7 +40413,7 @@ declare namespace __esri {
40382
40413
 
40383
40414
  interface SublayerProperties extends LoadableProperties, IdentifiableProperties {
40384
40415
  /**
40385
- * The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-tables-AttributeTableTemplate.html template} used to configure an associated layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html FeatureTable}.
40416
+ * This property is used to configure the associated layer's {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html FeatureTable}.
40386
40417
  *
40387
40418
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#attributeTableTemplate Read more...}
40388
40419
  */
@@ -48629,7 +48660,7 @@ declare namespace __esri {
48629
48660
  *
48630
48661
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-Network.html#dataElement Read more...}
48631
48662
  */
48632
- dataElement: any | nullish;
48663
+ dataElement: NetworkDataElementJSON | nullish;
48633
48664
  /**
48634
48665
  * The physical dataset name of the network as defined in the backend database.
48635
48666
  *
@@ -48884,7 +48915,7 @@ declare namespace __esri {
48884
48915
  *
48885
48916
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-Network.html#dataElement Read more...}
48886
48917
  */
48887
- dataElement?: any | nullish;
48918
+ dataElement?: NetworkDataElementJSON | nullish;
48888
48919
  /**
48889
48920
  * The full extent of the network, defined from the service territory used to create the network.
48890
48921
  *
@@ -48941,6 +48972,13 @@ declare namespace __esri {
48941
48972
  outFields?: string[];
48942
48973
  }
48943
48974
 
48975
+ /**
48976
+ * Contains the full network definition.
48977
+ *
48978
+ * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-networks-Network.html#NetworkDataElementJSON Read more...}
48979
+ */
48980
+ export type NetworkDataElementJSON = any | nullish;
48981
+
48944
48982
  export interface NetworkFromPortalItemParams {
48945
48983
  portalItem: PortalItem;
48946
48984
  }
@@ -63289,11 +63327,15 @@ declare namespace __esri {
63289
63327
  */
63290
63328
  readonly searchProperties: globalThis.Map<string, SearchIndexSearchProperties>;
63291
63329
  /**
63292
- * Specifies if the index supports searching entities, relationships or both.
63330
+ * Specifies if the index supports searching provenance, entities, relationships or both.
63293
63331
  *
63294
63332
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-SearchIndex.html#supportedCategory Read more...}
63295
63333
  */
63296
- readonly supportedCategory: "esriTypeUNSPECIFIED" | "esriTypeEntity" | "esriTypeRelationship" | "esriTypeBoth";
63334
+ readonly supportedCategory: | "esriTypeUNSPECIFIED"
63335
+ | "esriTypeEntity"
63336
+ | "esriTypeRelationship"
63337
+ | "esriTypeBoth"
63338
+ | "esriTypeMetaEntityProvenance";
63297
63339
  /**
63298
63340
  * Defines a search index for a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-knowledgeGraph-KnowledgeGraph.html KnowledgeGraph}.
63299
63341
  *
@@ -66655,7 +66697,7 @@ declare namespace __esri {
66655
66697
  */
66656
66698
  valueType: "integer" | "string" | nullish;
66657
66699
  /**
66658
- * AttributeBinsGrouping is a class that defines the `stackBy` or `splitBy` parameter in the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttributeBinsQuery.html#binParameters AttributeBinsQuery}.
66700
+ * AttributeBinsGrouping is a class that defines the `stackBy` or `splitBy` parameter in the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttributeBinsQuery.html#binParameters binParameters}.
66659
66701
  *
66660
66702
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-AttributeBinsGrouping.html Read more...}
66661
66703
  */
@@ -76187,7 +76229,7 @@ declare namespace __esri {
76187
76229
  */
76188
76230
  transformForward: boolean | nullish;
76189
76231
  /**
76190
- * Defines the projection parameters used when calling the
76232
+ * Defines the projection parameters used when calling
76191
76233
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-geometryService.html#project geometryService.project()}.
76192
76234
  *
76193
76235
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ProjectParameters.html Read more...}
@@ -90235,8 +90277,8 @@ declare namespace __esri {
90235
90277
  *
90236
90278
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WaterSymbol3DLayer.html#color Read more...}
90237
90279
  */
90238
- get color(): Color | nullish;
90239
- set color(value: ColorProperties | nullish);
90280
+ get color(): Color;
90281
+ set color(value: ColorProperties);
90240
90282
  /**
90241
90283
  * Creates a deep clone of the symbol layer.
90242
90284
  *
@@ -90252,7 +90294,7 @@ declare namespace __esri {
90252
90294
  *
90253
90295
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-WaterSymbol3DLayer.html#color Read more...}
90254
90296
  */
90255
- color?: ColorProperties | nullish;
90297
+ color?: ColorProperties;
90256
90298
  /**
90257
90299
  * Indicates the size of the waterbody which is represented by the
90258
90300
  * symbol layer.
@@ -92561,7 +92603,7 @@ declare namespace __esri {
92561
92603
  */
92562
92604
  context: WebGL2RenderingContext;
92563
92605
  /**
92564
- * The array of module:esri/views/2d/layers/BaseLayerViewGL2D#Tile objects computed to cover the MapView's visible area.
92606
+ * The array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile Tile} objects computed to cover the MapView's visible area.
92565
92607
  *
92566
92608
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tiles Read more...}
92567
92609
  */
@@ -92655,7 +92697,7 @@ declare namespace __esri {
92655
92697
  /**
92656
92698
  * Tessellate a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html Polygon} into triangles.
92657
92699
  *
92658
- * @param polygon The input geometry. *The geometry must be simple*; if the input geometry is not simple, you must first create a simplified version of it using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#simplify geometryEngine}, and pass the simplified geometry to `tessellatePolygon`.
92700
+ * @param polygon The input geometry. *The geometry must be simple*; if the input geometry is not simple, you must first create a simplified version of it using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#simplify geometryEngine.simplify}, and pass the simplified geometry to `tessellatePolygon`.
92659
92701
  *
92660
92702
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tessellatePolygon Read more...}
92661
92703
  */
@@ -92663,7 +92705,7 @@ declare namespace __esri {
92663
92705
  /**
92664
92706
  * Tessellate a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polyline.html Polyline} into triangles.
92665
92707
  *
92666
- * @param polyline The input geometry. *The geometry must be simple*; if the input geometry is not simple, you must first create a simplified version of it using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#simplify geometryEngine}, and pass the simplified geometry to `tessellatePolyline`.
92708
+ * @param polyline The input geometry. *The geometry must be simple*; if the input geometry is not simple, you must first create a simplified version of it using {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html#simplify geometryEngine.simplify}, and pass the simplified geometry to `tessellatePolyline`.
92667
92709
  * @param width The width of the line; this will be used to scale xOffset and yOffset.
92668
92710
  *
92669
92711
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tessellatePolyline Read more...}
@@ -92688,7 +92730,7 @@ declare namespace __esri {
92688
92730
  */
92689
92731
  context?: WebGL2RenderingContext;
92690
92732
  /**
92691
- * The array of module:esri/views/2d/layers/BaseLayerViewGL2D#Tile objects computed to cover the MapView's visible area.
92733
+ * The array of {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#Tile Tile} objects computed to cover the MapView's visible area.
92692
92734
  *
92693
92735
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-2d-layers-BaseLayerViewGL2D.html#tiles Read more...}
92694
92736
  */
@@ -93120,7 +93162,7 @@ declare namespace __esri {
93120
93162
  readonly intersectedLocation: Point | nullish;
93121
93163
  /**
93122
93164
  * Represents a target in a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html LineOfSightAnalysis} which is used to calculate the visibility
93123
- * from the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html#observer LineOfSightAnalysis}.
93165
+ * from the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-analysis-LineOfSightAnalysis.html#observer observer}.
93124
93166
  *
93125
93167
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-3d-analysis-LineOfSightAnalysisResult.html#target Read more...}
93126
93168
  */
@@ -116345,7 +116387,8 @@ declare namespace __esri {
116345
116387
  */
116346
116388
  readonly supportsDeleteAttachments: boolean;
116347
116389
  /**
116348
- * Indicates whether the table and associated layer support resizing attachments with the current configuration.
116390
+ * Defines whether or not the feature supports resizing
116391
+ * attachments.
116349
116392
  *
116350
116393
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable.html#supportsResizeAttachments Read more...}
116351
116394
  */
@@ -117527,7 +117570,8 @@ declare namespace __esri {
117527
117570
  */
117528
117571
  readonly supportsDeleteAttachments: boolean;
117529
117572
  /**
117530
- * Indicates whether the table and associated layer support resizing attachments with the current configuration.
117573
+ * Defines whether or not the feature supports resizing
117574
+ * attachments.
117531
117575
  *
117532
117576
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-FeatureTable-FeatureTableViewModel.html#supportsResizeAttachments Read more...}
117533
117577
  */
package/kernel.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.15",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
5
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="4.34";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="4.34.0-next.17",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ 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 s from"../core/Logger.js";import{clamp as l}from"../core/mathUtils.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as p}from"../core/promiseUtils.js";import{watch as a,initial as y,whenOnce as m}from"../core/reactiveUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import{Integer as d}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as c}from"../core/accessorSupport/decorators/reader.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as f}from"../core/accessorSupport/PropertyOrigin.js";import v from"../geometry/Extent.js";import g from"../geometry/Polyline.js";import S from"../geometry/SpatialReference.js";import j from"./Layer.js";import{ArcGISService as b}from"./mixins/ArcGISService.js";import{BlendLayer as O,effectProperty as T}from"./mixins/BlendLayer.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as I}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as C}from"./mixins/ScaleRangeLayer.js";import{titleFromUrlAndName as x}from"./support/arcgisLayerUrl.js";import{opacity as U,id as P}from"./support/commonProperties.js";import{normalizeParsedUrlObject as E,urlProperty as N}from"./support/multiLayerServiceUtils.js";import M from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as k}from"./support/serviceCapabilitiesUtils.js";import V from"./support/TelemetryData.js";import F from"./support/TelemetryDisplay.js";import R from"./support/VideoFrame.js";import G from"./support/VideoTimeExtent.js";import J from"./video/VideoController.js";import{getFrameHorizonPoints as A,getGroundControlPoints as H,getTelemetryData as z,getServiceLayersInfo as q,getStyledTelemetrySymbol as D,getSensorTrailPoints as _,readVideoTimeExtent as B}from"./video/videoUtils.js";import W from"../symbols/CIMSymbol.js";import Q from"../symbols/PictureMarkerSymbol.js";import $ from"../symbols/SimpleFillSymbol.js";import Z from"../symbols/SimpleLineSymbol.js";import K from"../symbols/SimpleMarkerSymbol.js";import X from"../symbols/Symbol.js";import{write as Y}from"../symbols/support/jsonUtils.js";function ee(e,t){return{ignoreOrigin:this.originIdOf(t)<f.PORTAL_ITEM}}let te=[];const re=new t([255,127,0]),oe=new t([0,0,0,.05]),ie=new K({angle:0,color:re,size:10,style:"cross"}),se=new $({color:oe,outline:new Z({color:re,width:2})}),le=new Z({color:re,width:1}),ne=new K({angle:0,color:re,outline:{color:[255,255,255],width:1.33},size:10,style:"circle"}),pe=new Z({color:re,width:1}),ae={types:{base:X,key:"type",typeMap:{"simple-marker":K,"picture-marker":Q,cim:W}},json:{write:{writer:Y,overridePolicy:ee}}};function ye(e){return{type:e,json:{write:{overridePolicy:ee}}}}let me=class extends(O(C(b(I(L(n(w(j)))))))){constructor(e){super(e),this.capabilities=null,this.codecs=null,this.connectionInfo=null,this.controller=new J,this.copyright=null,this.created=null,this.customParameters=null,this.description=null,this.elevationSource=null,this.frame=null,this.frameCenterSymbol=ie.clone(),this.frameCount=null,this.frameEffect=null,this.frameOpacity=1,this.frameOutlineSymbol=se.clone(),this.fullExtent=null,this.initialExtent=null,this.layerId=null,this.operationalLayerType="ArcGISVideoLayer",this.playbackInfo=null,this.posterUrl=null,this.qualities=null,this.sensorSymbol=ne.clone(),this.sensorSightLineSymbol=le.clone(),this.sensorTrailSymbol=pe.clone(),this.serviceItemId=null,this.sourceJSON=null,this.sourceQuality=null,this.sourceType=null,this.spatialReference=S.WGS84,this.start=0,this.telemetryDisplay=new F,this.type="video",this.url=null,this.version=null,this.videoLayersInfo=null}initialize(){this.addHandles([a((()=>this.metadata),(()=>{this.notifyChange("telemetry"),this.notifyChange("groundControlPoints"),this.notifyChange("frameHorizonPoints")})),a((()=>this.telemetry?.sensorLocation),(e=>this._setSensorTrail(e)),y)]),m((()=>this.loaded&&"can-play"===this.state&&this.duration>0)).then((()=>{this.start>=0&&this.start<=this.duration&&this.setCurrentTime(this.start)}))}destroy(){this.removeAllHandles(),this.controller&&this.controller.destroy()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Video Service"],supportsData:!1},e).catch(p).then((()=>this._fetchService(t)));return this.addResolvingPromise(r),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 k(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 A(this.metadata)}get groundControlPoints(){return H(this.metadata)}get isLive(){return this.controller?.isLive??!1}get livestreamStatus(){return this.controller?.livestreamStatus}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 parsedUrl(){return E(this)}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 started(){return this.controller?.started??!1}get state(){return this.controller.state}get telemetry(){return z(this.metadata)}readTitleFromService(e,{name:t}){return this.url?x(this.url,t):t}get videoElement(){return this.controller?.element}get videoHeight(){return this.controller?.videoHeight}readLayerInfosFromService(e,t){return q(t)}get videoTimeExtent(){return o(s.getLogger(this),"videoTimeExtent",{replacement:"fullTimeExtent",version:"4.33",warnOnce:!0}),this.fullTimeExtent}get videoWidth(){return this.controller?.videoWidth}get volume(){return this.controller?.volume??0}set volume(e){this.controller.volume=e}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=l(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]}}updateTelemetryColor(e){this.frameCenterSymbol=D(this.frameCenterSymbol,e)??ie,this.frameOutlineSymbol=D(this.frameOutlineSymbol,e,oe)??se,this.sensorSightLineSymbol=D(this.sensorSightLineSymbol,e)??le,this.sensorTrailSymbol=D(this.sensorTrailSymbol,e)??pe,this.sensorSymbol=D(this.sensorSymbol,e)??ne}write(e,t){return null==this.layerId?(t?.messages?.push(new i("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' cannot be saved to a web map, web scene, or portal item. The ArcGIS server version must be greater than 11.2.`)),null):super.write(e,t)}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:o}=await r(this.url,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:e});if(o&&(this.url=this.url.replace(/^http:/i,"https:")),!t?.currentVersion)return t.currentVersion="11.2",this.sourceJSON=t,void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});if(this.layerId??=t.layers?.[0]?.id??null,null==this.layerId)throw new i("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");const{data:s}=await r(this.parsedUrl.path,{query:{f:"json",...this.customParameters},signal:e});this.sourceJSON={...t,...s},this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl})}_setSensorTrail(e){if(!e)return;const t=_(e,te);te=[...t];const r=te.map((e=>e.toArray())),o=new g({hasZ:e.hasZ,paths:[r]});this.telemetry.sensorTrail=o.clone()}};e([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],me.prototype,"autoplay",null),e([u({readOnly:!0})],me.prototype,"buffered",null),e([u({readOnly:!0})],me.prototype,"cameraInfo",void 0),e([u({readOnly:!0,json:{read:!1}})],me.prototype,"capabilities",void 0),e([c("service","capabilities",["supportsAppend","supportsCoverageQuery","supportsExportClip","supportsExportFrameset","supportsMensuration","supportsPreviews","supportsUpdate"])],me.prototype,"readCapabilitiesFromService",null),e([u({readOnly:!0})],me.prototype,"codecs",void 0),e([u({readOnly:!0})],me.prototype,"connectionInfo",void 0),e([c("connectionInfo",["connectionUrl"])],me.prototype,"readConnectionInfo",null),e([u()],me.prototype,"controller",void 0),e([u({type:String})],me.prototype,"copyright",void 0),e([u({readOnly:!0,type:Date})],me.prototype,"created",void 0),e([u({type:Number})],me.prototype,"currentTime",null),e([u({json:{write:!1}})],me.prototype,"customParameters",void 0),e([u({type:String})],me.prototype,"description",void 0),e([u({type:Number})],me.prototype,"duration",null),e([u({readOnly:!0})],me.prototype,"elevationSource",void 0),e([u({type:Boolean})],me.prototype,"ended",null),e([u({type:R})],me.prototype,"frame",void 0),e([u(ye(K))],me.prototype,"frameCenterSymbol",void 0),e([u({readOnly:!0,type:d})],me.prototype,"frameCount",void 0),e([u(T)],me.prototype,"frameEffect",void 0),e([u(U)],me.prototype,"frameOpacity",void 0),e([u(ye($))],me.prototype,"frameOutlineSymbol",void 0),e([u({type:v})],me.prototype,"fullExtent",void 0),e([u({readOnly:!0})],me.prototype,"frameHorizonPoints",null),e([u({readOnly:!0,json:{read:{reader:B,source:"time"}},type:G})],me.prototype,"fullTimeExtent",void 0),e([u({readOnly:!0})],me.prototype,"groundControlPoints",null),e([u(P)],me.prototype,"id",void 0),e([u({type:v})],me.prototype,"initialExtent",void 0),e([u({readOnly:!0})],me.prototype,"isLive",null),e([u({type:d,json:{read:!1,origins:{service:{read:{source:"id"}}}}})],me.prototype,"layerId",void 0),e([u({readOnly:!0})],me.prototype,"livestreamStatus",null),e([u({type:Boolean})],me.prototype,"loop",null),e([u({readOnly:!0})],me.prototype,"metadata",null),e([u({readOnly:!0})],me.prototype,"mimeType",null),e([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],me.prototype,"muted",null),e([u({type:["ArcGISVideoLayer"]})],me.prototype,"operationalLayerType",void 0),e([u({readOnly:!0})],me.prototype,"parsedUrl",null),e([u({type:M})],me.prototype,"playbackInfo",void 0),e([u({type:Number})],me.prototype,"playbackRate",null),e([u({readOnly:!0,type:String})],me.prototype,"playerUrl",null),e([u({readOnly:!0})],me.prototype,"playing",null),e([u({readOnly:!0,json:{read:{source:"poster"}}})],me.prototype,"posterUrl",void 0),e([u({readOnly:!0})],me.prototype,"qualities",void 0),e([u(ae)],me.prototype,"sensorSymbol",void 0),e([u(ye(Z))],me.prototype,"sensorSightLineSymbol",void 0),e([u(ye(Z))],me.prototype,"sensorTrailSymbol",void 0),e([u({readOnly:!0})],me.prototype,"serviceItemId",void 0),e([u()],me.prototype,"sourceJSON",void 0),e([u({readOnly:!0})],me.prototype,"sourceQuality",void 0),e([u({readOnly:!0,json:{name:"serviceType"}})],me.prototype,"sourceType",void 0),e([u()],me.prototype,"spatialReference",void 0),e([u({json:{write:!0}})],me.prototype,"start",void 0),e([u({readOnly:!0})],me.prototype,"started",null),e([u({readOnly:!0,type:String})],me.prototype,"state",null),e([u({readOnly:!0,type:V})],me.prototype,"telemetry",null),e([u({type:F,nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],me.prototype,"telemetryDisplay",void 0),e([c("service","title",["name"])],me.prototype,"readTitleFromService",null),e([u({readOnly:!0})],me.prototype,"type",void 0),e([u(N())],me.prototype,"url",void 0),e([u({readOnly:!0,type:Number,json:{read:{source:"currentVersion"}}})],me.prototype,"version",void 0),e([u({readOnly:!0})],me.prototype,"videoElement",null),e([u({readOnly:!0})],me.prototype,"videoHeight",null),e([u({readOnly:!0,json:{read:!1}})],me.prototype,"videoLayersInfo",void 0),e([c("service","videoLayersInfo",["id","name","poster","serviceType","type"])],me.prototype,"readLayerInfosFromService",null),e([u({type:G,readOnly:!0})],me.prototype,"videoTimeExtent",null),e([u({readOnly:!0})],me.prototype,"videoWidth",null),e([u()],me.prototype,"volume",null),e([u({readOnly:!0})],me.prototype,"waiting",null),me=e([h("esri.layers.VideoLayer")],me);const ue=me;export{ue 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 s from"../core/Logger.js";import{clamp as l}from"../core/mathUtils.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{watch as p,initial as y,whenOnce as m}from"../core/reactiveUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import{Integer as d}from"../core/accessorSupport/ensureType.js";import"../core/has.js";import"../core/RandomLCG.js";import{reader as c}from"../core/accessorSupport/decorators/reader.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as f}from"../core/accessorSupport/PropertyOrigin.js";import v from"../geometry/Extent.js";import g from"../geometry/Polyline.js";import S from"../geometry/SpatialReference.js";import b from"./Layer.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{BlendLayer as O,effectProperty as T}from"./mixins/BlendLayer.js";import{CustomParametersMixin as w}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as I}from"./mixins/OperationalLayer.js";import{PortalLayer as L}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as C}from"./mixins/ScaleRangeLayer.js";import{titleFromUrlAndName as x}from"./support/arcgisLayerUrl.js";import{opacity as U,id as P}from"./support/commonProperties.js";import{normalizeParsedUrlObject as E,urlProperty as N}from"./support/multiLayerServiceUtils.js";import M from"./support/PlaybackInfo.js";import{getVideoLayerCapabilities as k}from"./support/serviceCapabilitiesUtils.js";import V from"./support/TelemetryData.js";import F from"./support/TelemetryDisplay.js";import R from"./support/VideoFrame.js";import G from"./support/VideoTimeExtent.js";import J from"./video/VideoController.js";import{getFrameHorizonPoints as A,getGroundControlPoints as H,getTelemetryData as z,getServiceLayersInfo as q,getStyledTelemetrySymbol as D,getSensorTrailPoints as _,readVideoTimeExtent as B}from"./video/videoUtils.js";import W from"../symbols/CIMSymbol.js";import Q from"../symbols/PictureMarkerSymbol.js";import $ from"../symbols/SimpleFillSymbol.js";import Z from"../symbols/SimpleLineSymbol.js";import K from"../symbols/SimpleMarkerSymbol.js";import X from"../symbols/Symbol.js";import{write as Y}from"../symbols/support/jsonUtils.js";function ee(e,t){return{ignoreOrigin:this.originIdOf(t)<f.PORTAL_ITEM}}let te=[];const re=new t([255,127,0]),oe=new t([0,0,0,.05]),ie=new K({angle:0,color:re,size:10,style:"cross"}),se=new $({color:oe,outline:new Z({color:re,width:2})}),le=new Z({color:re,width:1}),ne=new K({angle:0,color:re,outline:{color:[255,255,255],width:1.33},size:10,style:"circle"}),ae=new Z({color:re,width:1}),pe={types:{base:X,key:"type",typeMap:{"simple-marker":K,"picture-marker":Q,cim:W}},json:{name:"drawingInfo.sensorSymbol",write:{writer:Y,overridePolicy:ee}}};function ye(e,t){return{type:t,json:{name:e,write:{overridePolicy:ee}}}}let me=class extends(O(C(j(I(L(n(w(b)))))))){constructor(e){super(e),this.capabilities=null,this.codecs=null,this.connectionInfo=null,this.controller=new J,this.copyright=null,this.created=null,this.customParameters=null,this.description=null,this.elevationSource=null,this.frame=null,this.frameCenterSymbol=ie.clone(),this.frameCount=null,this.frameEffect=null,this.frameOpacity=1,this.frameOutlineSymbol=se.clone(),this.fullExtent=null,this.initialExtent=null,this.layerId=null,this.operationalLayerType="ArcGISVideoLayer",this.playbackInfo=null,this.posterUrl=null,this.qualities=null,this.sensorSymbol=ne.clone(),this.sensorSightLineSymbol=le.clone(),this.sensorTrailSymbol=ae.clone(),this.serviceItemId=null,this.sourceJSON=null,this.sourceQuality=null,this.sourceType=null,this.spatialReference=S.WGS84,this.start=0,this.telemetryDisplay=new F,this.type="video",this.url=null,this.version=null,this.videoLayersInfo=null}initialize(){this.addHandles([p((()=>this.metadata),(()=>{this.notifyChange("telemetry"),this.notifyChange("groundControlPoints"),this.notifyChange("frameHorizonPoints")})),p((()=>this.telemetry?.sensorLocation),(e=>this._setSensorTrail(e)),y)]),m((()=>this.loaded&&"can-play"===this.state&&this.duration>0)).then((()=>{this.start>=0&&this.start<=this.duration&&this.setCurrentTime(this.start)}))}destroy(){this.removeAllHandles(),this.controller&&this.controller.destroy()}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Video Service"],supportsData:!1},e).catch(a).then((()=>this._fetchService(t)));return this.addResolvingPromise(r),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 k(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 A(this.metadata)}get groundControlPoints(){return H(this.metadata)}get isLive(){return this.controller?.isLive??!1}get livestreamStatus(){return this.controller?.livestreamStatus}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 parsedUrl(){return E(this)}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 started(){return this.controller?.started??!1}get state(){return this.controller.state}get telemetry(){return z(this.metadata)}readTitleFromService(e,{name:t}){return this.url?x(this.url,t):t}get videoElement(){return this.controller?.element}get videoHeight(){return this.controller?.videoHeight}readLayerInfosFromService(e,t){return q(t)}get videoTimeExtent(){return o(s.getLogger(this),"videoTimeExtent",{replacement:"fullTimeExtent",version:"4.33",warnOnce:!0}),this.fullTimeExtent}get videoWidth(){return this.controller?.videoWidth}get volume(){return this.controller?.volume??0}set volume(e){this.controller.volume=e}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=l(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]}}updateTelemetryColor(e){this.frameCenterSymbol=D(this.frameCenterSymbol,e)??ie,this.frameOutlineSymbol=D(this.frameOutlineSymbol,e,oe)??se,this.sensorSightLineSymbol=D(this.sensorSightLineSymbol,e)??le,this.sensorTrailSymbol=D(this.sensorTrailSymbol,e)??ae,this.sensorSymbol=D(this.sensorSymbol,e)??ne}write(e,t){return null==this.layerId?(t?.messages?.push(new i("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' cannot be saved to a web map, web scene, or portal item. The ArcGIS server version must be greater than 11.2.`)),null):super.write(e,t)}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:o}=await r(this.url,{query:{f:"json",...this.parsedUrl.query,...this.customParameters},signal:e});if(o&&(this.url=this.url.replace(/^http:/i,"https:")),!t?.currentVersion)return t.currentVersion="11.2",this.sourceJSON=t,void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});if(this.layerId??=t.layers?.[0]?.id??null,null==this.layerId)throw new i("arcgis-layers:url-mismatch","The url is not a valid arcgis resource");const{data:s}=await r(this.parsedUrl.path,{query:{f:"json",...this.customParameters},signal:e});this.sourceJSON={...t,...s},this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl})}_setSensorTrail(e){if(!e)return;const t=_(e,te);te=[...t];const r=te.map((e=>e.toArray())),o=new g({hasZ:e.hasZ,paths:[r]});this.telemetry.sensorTrail=o.clone()}};e([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],me.prototype,"autoplay",null),e([u({readOnly:!0})],me.prototype,"buffered",null),e([u({readOnly:!0})],me.prototype,"cameraInfo",void 0),e([u({readOnly:!0,json:{read:!1}})],me.prototype,"capabilities",void 0),e([c("service","capabilities",["supportsAppend","supportsCoverageQuery","supportsExportClip","supportsExportFrameset","supportsMensuration","supportsPreviews","supportsUpdate"])],me.prototype,"readCapabilitiesFromService",null),e([u({readOnly:!0})],me.prototype,"codecs",void 0),e([u({readOnly:!0})],me.prototype,"connectionInfo",void 0),e([c("connectionInfo",["connectionUrl"])],me.prototype,"readConnectionInfo",null),e([u()],me.prototype,"controller",void 0),e([u({type:String})],me.prototype,"copyright",void 0),e([u({readOnly:!0,type:Date})],me.prototype,"created",void 0),e([u({type:Number})],me.prototype,"currentTime",null),e([u({json:{write:!1}})],me.prototype,"customParameters",void 0),e([u({type:String})],me.prototype,"description",void 0),e([u({type:Number})],me.prototype,"duration",null),e([u({readOnly:!0})],me.prototype,"elevationSource",void 0),e([u({type:Boolean})],me.prototype,"ended",null),e([u({type:R})],me.prototype,"frame",void 0),e([u(ye("drawingInfo.frameCenterSymbol",K))],me.prototype,"frameCenterSymbol",void 0),e([u({readOnly:!0,type:d})],me.prototype,"frameCount",void 0),e([u(T)],me.prototype,"frameEffect",void 0),e([u(U)],me.prototype,"frameOpacity",void 0),e([u(ye("drawingInfo.frameOutlineSymbol",$))],me.prototype,"frameOutlineSymbol",void 0),e([u({type:v})],me.prototype,"fullExtent",void 0),e([u({readOnly:!0})],me.prototype,"frameHorizonPoints",null),e([u({readOnly:!0,json:{read:{reader:B,source:"time"}},type:G})],me.prototype,"fullTimeExtent",void 0),e([u({readOnly:!0})],me.prototype,"groundControlPoints",null),e([u(P)],me.prototype,"id",void 0),e([u({type:v})],me.prototype,"initialExtent",void 0),e([u({readOnly:!0})],me.prototype,"isLive",null),e([u({type:d,json:{read:!1,origins:{service:{read:{source:"id"}}}}})],me.prototype,"layerId",void 0),e([u({readOnly:!0})],me.prototype,"livestreamStatus",null),e([u({type:Boolean})],me.prototype,"loop",null),e([u({readOnly:!0})],me.prototype,"metadata",null),e([u({readOnly:!0})],me.prototype,"mimeType",null),e([u({type:Boolean,json:{write:{ignoreOrigin:!0}}})],me.prototype,"muted",null),e([u({type:["ArcGISVideoLayer"]})],me.prototype,"operationalLayerType",void 0),e([u({readOnly:!0})],me.prototype,"parsedUrl",null),e([u({type:M})],me.prototype,"playbackInfo",void 0),e([u({type:Number})],me.prototype,"playbackRate",null),e([u({readOnly:!0,type:String})],me.prototype,"playerUrl",null),e([u({readOnly:!0})],me.prototype,"playing",null),e([u({readOnly:!0,json:{read:{source:"poster"}}})],me.prototype,"posterUrl",void 0),e([u({readOnly:!0})],me.prototype,"qualities",void 0),e([u(pe)],me.prototype,"sensorSymbol",void 0),e([u(ye("drawingInfo.sensorSightLineSymbol",Z))],me.prototype,"sensorSightLineSymbol",void 0),e([u(ye("drawingInfo.sensorTrailSymbol",Z))],me.prototype,"sensorTrailSymbol",void 0),e([u({readOnly:!0})],me.prototype,"serviceItemId",void 0),e([u()],me.prototype,"sourceJSON",void 0),e([u({readOnly:!0})],me.prototype,"sourceQuality",void 0),e([u({readOnly:!0,json:{name:"serviceType"}})],me.prototype,"sourceType",void 0),e([u()],me.prototype,"spatialReference",void 0),e([u({json:{write:!0}})],me.prototype,"start",void 0),e([u({readOnly:!0})],me.prototype,"started",null),e([u({readOnly:!0,type:String})],me.prototype,"state",null),e([u({readOnly:!0,type:V})],me.prototype,"telemetry",null),e([u({type:F,nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],me.prototype,"telemetryDisplay",void 0),e([c("service","title",["name"])],me.prototype,"readTitleFromService",null),e([u({readOnly:!0})],me.prototype,"type",void 0),e([u(N())],me.prototype,"url",void 0),e([u({readOnly:!0,type:Number,json:{read:{source:"currentVersion"}}})],me.prototype,"version",void 0),e([u({readOnly:!0})],me.prototype,"videoElement",null),e([u({readOnly:!0})],me.prototype,"videoHeight",null),e([u({readOnly:!0,json:{read:!1}})],me.prototype,"videoLayersInfo",void 0),e([c("service","videoLayersInfo",["id","name","poster","serviceType","type"])],me.prototype,"readLayerInfosFromService",null),e([u({type:G,readOnly:!0})],me.prototype,"videoTimeExtent",null),e([u({readOnly:!0})],me.prototype,"videoWidth",null),e([u()],me.prototype,"volume",null),e([u({readOnly:!0})],me.prototype,"waiting",null),me=e([h("esri.layers.VideoLayer")],me);const ue=me;export{ue as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import i from"../../../core/Logger.js";import s from"../../../core/PooledArray.js";import r from"../../../core/Promise.js";import{isAbortError as a}from"../../../core/promiseUtils.js";import{watch as d,initial as o,sync as n}from"../../../core/reactiveUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{projectBoundingRect as u}from"../../../geometry/projection/projectBoundingRect.js";import{create as _}from"../../../geometry/support/aaBoundingRect.js";import{PromiseQueue as c}from"../../support/PromiseQueue.js";import{viewingModeFromString as p}from"../../../views/ViewingMode.js";import{I3SClientNodeLoader as g}from"../../../views/3d/layers/i3s/I3SClientNodeLoader.js";import{addCallback as m}from"../../../views/3d/layers/i3s/I3SFrameTask.js";import{I3SIndex as y}from"../../../views/3d/layers/i3s/I3SIndex.js";import f from"../../../views/3d/layers/i3s/I3SLodHandling.js";import{NodeState as x,CacheState as N}from"../../../views/3d/layers/i3s/I3SNode.js";import b from"../../../views/3d/layers/i3s/I3SNodeLoader.js";import{I3SStreamDataController as w}from"../../../views/3d/layers/i3s/I3SStreamDataController.js";import{getVertexCrs as v,getIndexCrs as C,findIntersectingNodes as L}from"../../../views/3d/layers/i3s/I3SUtil.js";import D from"../../../views/3d/layers/i3s/I3SViewportQueries.js";import{FadeDirection as V}from"../../../views/3d/layers/support/I3SLayerView.js";import{toBoundingRect as I}from"../../../views/3d/support/extentUtils.js";import{ClientType as A,maxDownloadSlots as S}from"../../../views/3d/support/index.js";import{minQuality as M}from"../../../views/3d/support/MemoryController.js";import{noBudget as F}from"../../../views/support/Scheduler.js";const O=100,P=2,U=1e4,q=1e-4,G=1.2,Q=500,j=1.5;let T=class extends(r.EsriPromiseMixin(t)){get isMeshPyramid(){return"mesh-pyramids"===this.layer.profile||"MeshPyramid"===this.layer.store?.lodType}get isGraphics3D(){return"points"===this.layer.profile}get useMaximumNumberOfFeatures(){return!this.isMeshPyramid&&(null==this.layer.priority||"High"===this.layer.priority)}get indexStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(A.I3S_INDEX);return new w(e,this.layer.customParameters,this.layer.apiKey)}get dataStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(A.I3S_DATA);return new w(e,this.layer.customParameters,this.layer.apiKey)}get crsVertex(){return v(this.layer)}get crsIndex(){return C(this.layer)}get layer(){return this.layerView.i3slayer}get running(){return this.updating}get rootNodeVisible(){if(this._index){const e=this._index.rootNode;if(e)return this._updateViewData(),this._index.isNodeVisible(e.index)}return!0}get index(){return this._index}get requiredAttributes(){return this._requiredAttributes}constructor(e){super(e),this.featureTarget=5e4,this.fixedFeatureTarget=!1,this.updating=!0,this.updatingProgress=1,this.leavesReached=!1,this.worker=null,this._featureLOD=1,this._stableFeatureLOD=!1,this._isIdle=!1,this._cameraDirty=!0,this._invisibleDirty=!1,this._idleStateCallbacks=null,this._newLoadingNodes=new s({deallocator:null}),this._modificationsNodeFilteringArray=new s,this._downloadingCount=0,this._loadingNodes=new Map,this._updatingNodes=new Map,this._progressMaxNumNodes=1,this._requiredAttributes=new Array,this._requiredAttributesDirty=!0,this._updatesDisabled=!1,this.disableIDBCache=!1,this._disableMemCache=!1,this._restartNodeLoading=!1,this._fields=null,this._attributeStorageInfo=null,this._idleQueue=new c,this._elevationUpdateNodes=new s({deallocator:null}),this._errorCount=0}initialize(){const{layerView:e,layer:t}=this;this._disableMemCache=!e.loadCachedGPUData||!e.addCachedGPUData,this._lodHandling=new f(e),this._defaultGeometrySchema=t.store.defaultGeometrySchema,this.disableIDBCache=!!has("disable-feature:idb-cache"),"fields"in t&&(this._fields=t.fields,this._attributeStorageInfo=t.attributeStorageInfo),this.addResolvingPromise(Promise.all([t.indexInfo,t.when(),e.when()]).then((([s])=>{if(this.destroyed||!e||e.destroyed||!s)return;const{view:r,clientGeometry:a}=e,{resourceController:l}=r;if(this._setClippingArea(r.clippingArea),this.addHandles([d((()=>r?.pointsOfInterest?.focus?.renderLocation),(e=>this._pointOfInterestChanged(e)),o),d((()=>r.quality),(()=>this._setCameraDirty()),n),d((()=>e.contentVisible),(e=>{const t=e?()=>this._updateIdleState(!0):()=>this._updateViewData(),i=e?()=>this._updateIdleState(!1):()=>{};e&&null!=this._index&&this._index.invalidateAllElevationRanges(),this._idleStateCallbacks?(e||this.cancelNodeLoading(),this.restartNodeLoading(),this._idleStateCallbacks.idleBegin=t,this._idleStateCallbacks.idleEnd=i):this._idleStateCallbacks=l.scheduler.registerIdleStateCallbacks(t,i)}),o),m(e.view.resourceController.scheduler,this),d((()=>[this.featureTarget,this.fixedFeatureTarget]),(()=>{this._setCameraDirty(),this._stableFeatureLOD=!1})),d((()=>r.state?.contentCamera),(()=>this._setCameraDirty())),d((()=>t.elevationInfo),(e=>this._elevationInfoChanged(e))),d((()=>e.lodFactor),(()=>this._setCameraDirty())),d((()=>e.availableFields),(()=>this._requiredFieldsChange())),d((()=>e.holeFilling),(e=>null!=this._index&&(this._index.holeFilling=e)))]),this._viewportQueries=new D(this.crsIndex,r.renderCoordsHelper,r.state.contentCamera,!r.state.fixedContentCamera||this.isGraphics3D,this._clippingArea,this.isMeshPyramid?r.basemapTerrain:r.elevationProvider,p(r.viewingMode),this.layer.elevationInfo,{progressiveLoadFactor:this._getProgressiveLoadFactor(),screenspaceErrorBias:this._lod,angleDependentLoD:this._lod<.5}),this._clientNodeLoader=new g(this.layer.uid,{indexSR:this.crsIndex,vertexSR:this.crsVertex,renderSR:r.renderCoordsHelper.spatialReference},r.resourceController.memoryController,this.worker),this._index=new y(p(r.viewingMode),t,s,this.indexStreamController,this._clientNodeLoader,this._viewportQueries,i.getLogger(this),e.holeFilling,(t=>e.isNodeLoaded(t)),(t=>e.isNodeReloading(t)),(e=>this._shouldLoadNode(e)),(e=>this._enableFromGPUCache(e,x.Leaf)),(e=>this._needsUpdate(e)),(()=>!this.indexStreamController.busy),(t=>e.computeVisibilityObb?.(t)??null),e?.computeNodeFiltering?t=>e.computeNodeFiltering(t):void 0),this._index.updateElevationInfo(this.layer.elevationInfo,this.isMeshPyramid||this.isGraphics3D),this._index.imModificationsChanged(!!e.hasModifications),this._index.layerFilterChanged(!!e.hasGeometryFilter),null!=a){for(const e of a)this._addMesh(e.mesh,e.oid);this.addHandles(a.on("change",(e=>{for(const t of e.removed)this._removeMesh(t.oid);for(const t of e.added)this._addMesh(t.mesh,t.oid)})))}this._startNodeLoading()})))}updateNodeModificationStatus(e){const t=this._index,i=this.layerView;null!=t&&i?.updateNodeModificationStatus&&(this._modificationsNodeFilteringArray.clear(),e.forAll((e=>{const i=t.getNode(e);null!=i&&this._modificationsNodeFilteringArray.push(i)})),i.updateNodeModificationStatus(this._modificationsNodeFilteringArray),this._invisibleDirty=!0)}destroy(){this.cancelNodeLoading(),this._idleStateCallbacks&&(this._isIdle=!1,this._idleStateCallbacks.remove(),this._idleStateCallbacks=null),this._nodeLoader=null,k.prune()}get viewportQueries(){return this._viewportQueries}_getRequiredAttributes(){if(null==this._attributeStorageInfo||!this._fields||!this.layerView.availableFields)return[];const e=this._attributeStorageInfo,t=this._fields,i=this.layer.objectIdField;return this.layerView.availableFields.map((i=>{const s=R(e,i),r=R(t,i);return s>=0&&r>=0?{index:s,name:t[r].name,field:t[r],attributeStorageInfo:e[s]}:null})).filter((e=>null!=e&&e.name!==i))}_requiredFieldsChange(){const e=this._getRequiredAttributes();E(this._requiredAttributes,e)||(this._requiredAttributes=e,this._requiredAttributesDirty=!1,this.restartNodeLoading())}requestUpdate(){this._requiredAttributesDirty=!0,this.restartNodeLoading()}_setClippingArea(e){const t=_();I(e,t,this.layerView.view.renderSpatialReference)?this._clippingArea=t:this._clippingArea=null}_pointOfInterestChanged(e){null!=this._viewportQueries&&(this._viewportQueries.setPointOfInterest(e),null!=this._index&&(this._index.progressiveLoadPenalty=H.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate()))}updateClippingArea(e){this._setClippingArea(e),null!=this._viewportQueries&&null!=this._index&&(this._viewportQueries.updateClippingArea(this._clippingArea),this._index.invalidateVisibilityCache()),this._setCameraDirty()}_setCameraDirty(){this._cameraDirty=!0,this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}_addMesh(e,t){if(null==this._index)return;const i=this._clientNodeLoader.createMeshNodeInfo(e,t),s=this._index.addClientNodeToIndex(i.id,i.mbs);this._clientNodeLoader.addMeshNode(s,i),this._evaluateUpdating(),this.notifyChange("rootNodeVisible")}_removeMesh(e){const t=this._clientNodeLoader.getMeshNodeIndex(e);if(null!=t){if(null==this._index)throw new Error("delayed removal of client side i3s node geometry not supported yet.");{const e=(e,t)=>{this.layerView.removeNode(t),this._clientNodeLoader.removeNode(e),this.layerView.deleteCachedNodeData&&null!=e&&this.layerView.deleteCachedNodeData(e),this.layerView.deleteCachedGPUData?.(this.layerView.loadCachedGPUData?.(t))},i=(e,t,i)=>{this._clientNodeLoader.updateNodeIndex(e,t,i),this.layerView.updateNodeIndex&&this.layerView.updateNodeIndex(t,i)};this._index.removeClientNodeFromIndex(t,e,i),this.notifyChange("rootNodeVisible")}}}updateElevationChanged(e,t){const i=this._index;if(null==i?.rootNode||null==t)return null;this.crsIndex.equals(t)||(u(e,t,B,this.crsIndex),e=B);const s=this._elevationUpdateNodes;return s.clear(),L(e,i.rootNode,i,(e=>s.push(e.index))),s.length&&(s.forAll((e=>i.updateElevationChanged(e))),this._setCameraDirty()),s}removeAllGeometryObbs(){null!=this._index&&this._index.removeAllGeometryObbs()}getRenderMbs(e){return null!=this._viewportQueries?this._viewportQueries.getServiceMbsInRenderSR(e):null}_elevationInfoChanged(e){null!=this._index&&(this._index.updateElevationInfo(e,this.isMeshPyramid||this.isGraphics3D),this._setCameraDirty())}restartNodeLoading(){this._restartNodeLoading=!0,this.cancelNodeLoading(),this._evaluateUpdating()}schedule(e,t){return this._idleQueue.push(e,t)}reschedule(e,t){return this._idleQueue.unshift(e,t)}get _isIntegratedMesh(){return"integrated-mesh"===this.layer.type}get unloadedMemoryEstimate(){return null!=this._index&&this.layerView.contentVisible?this._index.unloadedMemoryEstimate*this._lodDropFactor:0}async _loadNodeData(e,t){return e.index<0?this._clientNodeLoader.loadNodeData(e.id,t):this._nodeLoader.loadNodeData(e,t)}async _loadAttributes(e,t,i){return(e.index<0?this._clientNodeLoader:this._nodeLoader).loadAttributes(e,t,i)}get indexDepth(){return null!=this._index?this._index.maxLevel:0}set disableMemCache(e){this.layerView.loadCachedGPUData&&this.layerView.addCachedGPUData?this._disableMemCache=e:this._disableMemCache=!0}runTask(e,t){return this.layerView.contentVisible?this.layerView.visible&&null!=this._index?(this._processWithErrorLogging(e,t),this._index.maxPriority):-1/0:(this._updateViewData(),this._evaluateUpdating(),-1/0)}_processWithErrorLogging(e,t){try{this._process(e,t)}catch(s){this._errorCount<50?i.getLogger(this).error(`Error during processing: ${s} at ${s.stack}`):50===this._errorCount&&i.getLogger(this).error("Too many errors for this layer. Further errors will not be displayed."),this._errorCount++}}_process(e,t){this._restartNodeLoading&&this._startNodeLoading(),null!=this._nodeLoader&&null!=this._index&&(this._updateViewData(),this._invisibleDirty&&this._removeInvisibleNodes(e)&&(this._invisibleDirty=!1),this._isIntegratedMesh&&(e.enabled=!1),e.run((()=>this._processIndex(e))),this._updateFeatureLOD(),e.run((()=>this._processCache(e))),this._isIntegratedMesh&&(e.enabled=!0),e.run((()=>this._processNodes(e,t))),this._idleQueue.runTask(e),e.run((()=>this._prefetchIndex())),t.numIndexLoading+=this._index.indexLoading,t.numNodesLoading+=this._downloadingCount,e.run((()=>this._lodHandling.lodGlobalHandling(e))),this._evaluateUpdating())}_processIndex(e){if(null==this._index)return!1;if(this._index.dirty){this._newLoadingNodes.clear(),this._index.update(Array.from(this._loadingNodes.keys()),e,(e=>this.updateNodeModificationStatus(e))),this._disableMemCache||(this._newLoadingNodes.pushArray(this._index.updates.add.data,this._index.updates.add.length),this._newLoadingNodes.pushArray(this._index.updates.missing.data,this._index.updates.missing.length));const t=this._index.featureEstimate.leavesReached;this._index.isLoading||t===this._get("leavesReached")||this._set("leavesReached",t)}return this._index.load()}_prefetchIndex(){return!(null==this._index||this._loadingNodes.size>0||this._index.updates.add.length>0)&&this._index.prefetch()}_updateFeatureLOD(){if(!this.useMaximumNumberOfFeatures||null==this._index||null==this._viewportQueries)return;const e=!this._index.isLoading,t=this.featureTarget*this._baseLOD,i=this._index.featureEstimate;if(i.estimate=i.estimate||t/2,this._index.indexMissing>Q){if(this._featureLOD<=q)return;this._featureLOD/=j,this._stableFeatureLOD=!1}else if(e&&i.estimate<t){if(i.leavesReached||this._featureLOD>=U||this._stableFeatureLOD)return;const e=Math.min(10,Math.max(t/i.estimate,1.001));this._featureLOD*=e;const s=this._lod,r=this._index.checkFeatureTarget(t,s);r!==s&&(this._featureLOD=r/this._baseLOD,this._stableFeatureLOD=!0)}else{if(!(i.estimate>t*G||e&&i.estimate>t))return;if(this._featureLOD<=q)return;this._featureLOD/=1+.25*(i.estimate/t-1),this._stableFeatureLOD=!1}this._featureLOD=Math.min(U,Math.max(q,this._featureLOD)),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.requestUpdate()}_processCache(e){const t=this._index;if(null==t)return!1;for(;this._newLoadingNodes.length>0&&!e.done;){const i=this._newLoadingNodes.pop();for(let s=t.getParent(i);null!=s&&!this.layerView.isNodeLoaded(s.index);s=t.getParent(s.index))if(this._enableFromGPUCache(s,x.Hole)){e.madeProgress();break}}return e.hasProgressed}_processNodes(e,t){if(null==this._index)return!1;let i=(this._isIdle?O:P)-this._loadingNodes.size;const s=this._index.updates;for(s.cancel.forEach(this._cancelNode,this),s.cancel=[];s.remove.length>0&&!e.done;)this.layerView.removeNode(s.remove.pop()),e.madeProgress();for(;s.update.length>0&&!e.done;){const t=this._index.getNode(s.update.pop());null!=t&&(this._updateLoadedNode(t),e.madeProgress())}for(;s.add.length>0&&!e.done&&i>0;){--i;const r=this._index.getNode(s.add.back());if(null==r||r.cacheState!==N.Cached&&!this._hasNodeLoadToken(t))break;s.add.pop(),this._loadNode(r),e.madeProgress()}return e.hasProgressed}_cancelAllNodes(){this._loadingNodes.forEach((e=>e.abort())),this._loadingNodes.clear(),this._updatingNodes.forEach((e=>e.abort())),this._updatingNodes.clear()}_cancelNode(e){const t=this._loadingNodes.get(e);t&&(t.abort(),this._loadingNodes.delete(e))}_hasNodeLoadToken(e){return!(!this._isIdle&&e.numNodesLoading+this._loadingNodes.size>=P)&&(this._downloadingCount<S&&!this.dataStreamController.busy)}_evaluateUpdating(){let e=!1,t=0;if(this.layerView){if(this.layerView.contentVisible){const i=(this._index?.indexMissing??0)+3*(this._index?.updates.add.length??0)+2*this._loadingNodes.size;e=!!(i>0||this._updatingNodes.size>0||this._restartNodeLoading||this._cameraDirty||this._idleQueue.updating||this._lodHandling&&this._lodHandling.requiresLODGlobalHandling||null!=this._index&&this._index.isPrefetching),0===i&&(this._progressMaxNumNodes=1),this._progressMaxNumNodes=Math.max(i,this._progressMaxNumNodes),t=1-i/this._progressMaxNumNodes}else e=this._cameraDirty,t=e?0:1;this.updating=e,this.updatingProgress=t}}_updateViewData(){if(!this._cameraDirty||null==this._index||null==this._viewportQueries)return;const e=this.layerView.view,{contentCamera:t,fixedContentCamera:i}=e.state;this._viewportQueries.updateCamera(t,!i||this.isGraphics3D),this._viewportQueries.setPointOfInterest(e.pointsOfInterest.focus.renderLocation),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.invalidateVisibilityCache(),this._index.progressiveLoadPenalty=H.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate(),this._stableFeatureLOD=!1,this._invisibleDirty=!0,this._cameraDirty=!1,this.notifyChange("rootNodeVisible")}_getProgressiveLoadFactor(){return this.layerView.view.quality<1?1:this.layerView.progressiveLoadFactor}get _lod(){return this._featureLOD*this._baseLOD}get _baseLOD(){const e=this.layerView.lodFactor;return this.fixedFeatureTarget?1:(e>0?e:1)*this.layerView.view.quality}get _lodDropFactor(){if(this.fixedFeatureTarget)return 1;return(Math.min(this.layerView.view.quality,.5)-M)/(.5-M)}isGeometryVisible(e){return!!this._index?.isGeometryVisible(e.index)}updateVisibility(e){this._index?.invalidateNodeVisibilityCache(e)}invalidateGeometryVisibility(e){this._index?.invalidateGeometryVisibility(e)}invalidateVisibilityObbs(){this._index?.invalidateVisibilityObbs()}modificationsChanged(){this._index?.imModificationsChanged(!!this.layerView.hasModifications),this._invisibleDirty=!0}_shouldLoadNode(e){return!(!this._lodHandling.shouldLoadNode(e)||this._shouldDropNode(e))&&!(null==this._index||!this._index.isGeometryVisible(e.index))}_shouldDropNode(e){if(null==this._viewportQueries)return!1;const t=this._lodDropFactor;if(t>=1||!this._lodHandling.hasNoVisibleChildren(e))return!1;return Math.abs(this._viewportQueries.calcCameraDistanceToCenter(e))-this._viewportQueries.minDistance>(this._viewportQueries.maxDistance-this._viewportQueries.minDistance)*t}_startNodeLoading(){this._restartNodeLoading=!1;const e=this._index;if(this._updatesDisabled||null==e||null==this._viewportQueries)return;this._updateViewData(),this._requiredAttributesDirty&&(this._requiredAttributes=this._getRequiredAttributes(),this._requiredAttributesDirty=!1);const t={textureEncodings:this.layerView.supportedTextureEncodings,textureUsageMask:this.layerView.rendererTextureUsage,loadFeatureData:this.useMaximumNumberOfFeatures};this._nodeLoader=new b(this.layer,this.dataStreamController,i.getLogger(this),this._defaultGeometrySchema,this._requiredAttributes,t),e.requestUpdate(),this._lodHandling.startNodeLoading(((e,t)=>this._removeNodes(e,t,z.fadeout)),e,{maxLodLevel:this._viewportQueries.maxLodLevel}),this._evaluateUpdating()}isNodeLoading(){return null!=this._nodeLoader&&null!=this._index}cancelNodeLoading(){this.isNodeLoading()&&(this.indexStreamController.cancelAll(),this.dataStreamController.cancelAll(),this._idleQueue.cancelAll(),this._cancelAllNodes(),this._nodeLoader=null,this._evaluateUpdating())}_removeInvisibleNodes(e){const t=this._index;if(null==t||null==this._viewportQueries)return!1;k.clear(),this.layerView.getLoadedNodeIndices(k);const i=0===this._viewportQueries.maxDistance,s=i?()=>!1:e=>this._shouldDropNode(e);return k.filterInPlace((e=>{const i=t.getNode(e);return null==i||!t.isGeometryVisible(e)||s(i)})),k.length>0&&this._lodHandling.setLodGlobalDirty(),this._removeNodes(k,e,z.pop),!(i&&this._lodDropFactor<1)&&(0===k.length||(k.clear(),!1))}markNodeToRemove(e){k.push(e)}removeMarkedNodes(){this._removeNodes(k,F,z.pop)}_removeNodes(e,t,i){if(0!==e.length&&!t.done)for(null!=this._index&&this._index.requestUpdate();e.length>0&&!t.done;){const s=e.pop(),r=this._index;i===z.fadeout&&this.layerView.nodeFadeoutEnabled&&null!=r&&r.isGeometryVisible(s)?this.layerView.fadeNode(s,V.FadeOut,!0):this.layerView.removeNode(s),t.madeProgress()}}_needsUpdate(e){if(e.resources.isEmpty||this._updatingNodes.has(e.index))return!1;const t=this.layerView.getLoadedAttributes(e.index);return null!=t&&t!==this._requiredAttributes}async _updateLoadedNode(e){const t=new AbortController;this._updatingNodes.set(e.index,t),this._evaluateUpdating();try{const i=this.layerView.getLoadedAttributes(e.index),s=E(i,this._requiredAttributes)?this.layerView.getAttributeData(e.index):await this._loadAttributes(e,this._requiredAttributes,t.signal);await this.schedule((()=>this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:s},t.signal)),t.signal)}catch(i){if(!a(i))return this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:{}},t.signal)}this._updatingNodes.delete(e.index),this._evaluateUpdating()}_loadNode(e){if(this._loadingNodes.has(e.index))return void i.getLogger(this).error("already loading node "+e.index);const t=new AbortController;this._loadingNodes.set(e.index,t),this._evaluateUpdating(),this._loadAndAddNode(e,t.signal).then((i=>{i&&null!=this._index&&this._loadingNodes.get(e.index)===t&&(this._loadingNodes.delete(e.index),this._index.requestUpdate())})).catch((e=>{if(!a(e))throw e})).finally((()=>{this._loadingNodes.get(e.index)===t&&this._loadingNodes.delete(e.index),this._evaluateUpdating()}))}_loadAndAddNode(e,t){return e.cacheState===N.Uncached?this._loadUncached(e,t).then((()=>!1)):this._loadCached(e,t).then((t=>!t&&(e.cacheState=N.Uncached,!0))).catch((t=>!a(t)&&(e.cacheState=N.Uncached,!0)))}_enableFromGPUCache(e,t){if(this._disableMemCache||null==this._index)return!1;if(t===x.Hole&&!this._index.useNodeAsHole(e.index))return!0;const i=this._loadCachedGPUData(e);return!!i&&(this.layerView.addCachedGPUData(e,i,t),this._nodeAdded(),!0)}_loadCachedGPUData(e){const t=this.layerView.loadCachedGPUData(e.index);return null!=t?.attributeInfo&&E(t.attributeInfo.loadedAttributes,this._requiredAttributes)?t:(this.layerView.deleteCachedGPUData(t),null)}_nodeAdded(){null!=this._index&&this._index.requestUpdate(),this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}updateLoadStatus(e,t){const i=this._index;null!=i&&i.updateChildrenLoaded(e,t?1:-1)}async _loadCached(e,t){if(this._enableFromGPUCache(e,x.Leaf))return!0;const i=this.layerView;if(this.disableIDBCache||!i.loadCachedNodeData||!i.addCachedNodeData)return!1;const s=(t,i)=>this._nodeLoader.loadTextures(e,t,i),r=(t,i)=>this._clientNodeLoader.loadTextures(e,t,i),a=e.index>=0?s:r,d=await this.schedule((()=>i.loadCachedNodeData(e,t,a)),t);if(null==d)return!1;const o=this._requiredAttributes,n=await this.reschedule((()=>this._loadAttributes(e,o,t)),t);return await this.reschedule((()=>i.addCachedNodeData(e,d,{loadedAttributes:o,attributeData:n},t)),t),this._nodeAdded(),!0}_loadUncached(e,t){return this._downloadingCount++,this._loadNodeData(e,t).catch((e=>{throw this._downloadingCount--,e})).then((i=>(this._downloadingCount--,this.schedule((()=>this.layerView.addNode(e,i,t)),t)))).then((()=>{this._nodeAdded(),e.cacheState=N.Cached})).catch((t=>{if(!a(t))throw i.getLogger(this).error("#loadNodeData()",this.layer,`Failed to load node '${e.id}'`,t),e.failed=!0,null!=this._index&&this._index.requestUpdate(),t}))}_updateIdleState(e){e!==this._isIdle&&(this._isIdle=e,this._evaluateUpdating(),e&&this._index&&null!=this._index&&this._index.resetFailedNodes())}get test(){}notifyLODUpdate(){this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating(),null!=this._index&&this._index.requestUpdate()}geometryFilterChanged(e){const t=this._index;null!=t&&t.layerFilterChanged(e),this._setCameraDirty()}};e([l({readOnly:!0})],T.prototype,"isMeshPyramid",null),e([l({readOnly:!0})],T.prototype,"isGraphics3D",null),e([l({readOnly:!0})],T.prototype,"useMaximumNumberOfFeatures",null),e([l({readOnly:!0})],T.prototype,"indexStreamController",null),e([l({readOnly:!0})],T.prototype,"dataStreamController",null),e([l({readOnly:!0})],T.prototype,"crsVertex",null),e([l({readOnly:!0})],T.prototype,"crsIndex",null),e([l()],T.prototype,"featureTarget",void 0),e([l()],T.prototype,"fixedFeatureTarget",void 0),e([l()],T.prototype,"layerView",void 0),e([l()],T.prototype,"layer",null),e([l()],T.prototype,"updating",void 0),e([l({readOnly:!0})],T.prototype,"running",null),e([l()],T.prototype,"updatingProgress",void 0),e([l({readOnly:!0})],T.prototype,"leavesReached",void 0),e([l({constructOnly:!0})],T.prototype,"worker",void 0),e([l({readOnly:!0,dependsOn:[]})],T.prototype,"rootNodeVisible",null),T=e([h("esri.layers.graphics.controllers.I3SOnDemandController")],T);const k=new s({deallocator:null});function E(e,t){return null!=e&&e.length===t.length&&e.every((e=>R(t,e.name)>=0))}function R(e,t){const i=t.toLowerCase();for(let s=0;s<e.length;s++)if(e[s].name.toLowerCase()===i)return s;return-1}const H={distancePenalty:10},B=_();var z;!function(e){e[e.pop=0]="pop",e[e.fadeout=1]="fadeout"}(z||(z={}));export{T as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import r from"../../../core/PooledArray.js";import a from"../../../core/Promise.js";import{isAbortError as d}from"../../../core/promiseUtils.js";import{watch as o,initial as n,sync as l}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import{projectBoundingRect as _}from"../../../geometry/projection/projectBoundingRect.js";import{create as c}from"../../../geometry/support/aaBoundingRect.js";import{PromiseQueue as p}from"../../support/PromiseQueue.js";import{viewingModeFromString as g}from"../../../views/ViewingMode.js";import{I3SClientNodeLoader as m}from"../../../views/3d/layers/i3s/I3SClientNodeLoader.js";import{addCallback as y}from"../../../views/3d/layers/i3s/I3SFrameTask.js";import{I3SIndex as f}from"../../../views/3d/layers/i3s/I3SIndex.js";import x from"../../../views/3d/layers/i3s/I3SLodHandling.js";import{NodeState as N,CacheState as b}from"../../../views/3d/layers/i3s/I3SNode.js";import w from"../../../views/3d/layers/i3s/I3SNodeLoader.js";import{I3SStreamDataController as v}from"../../../views/3d/layers/i3s/I3SStreamDataController.js";import{getVertexCrs as C,getIndexCrs as L,findIntersectingNodes as D}from"../../../views/3d/layers/i3s/I3SUtil.js";import V from"../../../views/3d/layers/i3s/I3SViewportQueries.js";import{FadeDirection as I}from"../../../views/3d/layers/support/I3SLayerView.js";import{toBoundingRect as A}from"../../../views/3d/support/extentUtils.js";import{ClientType as S,maxDownloadSlots as M}from"../../../views/3d/support/index.js";import{minQuality as F}from"../../../views/3d/support/MemoryController.js";import{noBudget as O}from"../../../views/support/Scheduler.js";const P=100,U=2,q=1e4,G=1e-4,Q=1.2,j=500,k=1.5;let T=class extends(a.EsriPromiseMixin(t)){get isMeshPyramid(){return"mesh-pyramids"===this.layer.profile||"MeshPyramid"===this.layer.store?.lodType}get isGraphics3D(){return"points"===this.layer.profile}get useMaximumNumberOfFeatures(){return!this.isMeshPyramid&&(null==this.layer.priority||"High"===this.layer.priority)}get indexStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(S.I3S_INDEX);return new v(e,this.layer.customParameters,this.layer.apiKey)}get dataStreamController(){const e=this.layerView.view.resourceController.createStreamDataRequester(S.I3S_DATA);return new v(e,this.layer.customParameters,this.layer.apiKey)}get crsVertex(){return C(this.layer)}get crsIndex(){return L(this.layer)}get layer(){return this.layerView.i3slayer}get running(){return this.updating}get rootNodeVisible(){if(this._index){const e=this._index.rootNode;if(e)return this._updateViewData(),this._index.isNodeVisible(e.index)}return!0}get index(){return this._index}get requiredAttributes(){return this._requiredAttributes}constructor(e){super(e),this.featureTarget=5e4,this.fixedFeatureTarget=!1,this.updating=!0,this.updatingProgress=1,this.leavesReached=!1,this.worker=null,this._featureLOD=1,this._stableFeatureLOD=!1,this._isIdle=!1,this._cameraDirty=!0,this._invisibleDirty=!1,this._idleStateCallbacks=null,this._newLoadingNodes=new r({deallocator:null}),this._modificationsNodeFilteringArray=new r,this._downloadingCount=0,this._loadingNodes=new Map,this._updatingNodes=new Map,this._progressMaxNumNodes=1,this._requiredAttributes=new Array,this._requiredAttributesDirty=!0,this._updatesDisabled=!1,this.disableIDBCache=!1,this._disableMemCache=!1,this._restartNodeLoading=!1,this._fields=null,this._attributeStorageInfo=null,this._idleQueue=new p,this._elevationUpdateNodes=new r({deallocator:null}),this._errorCount=0}initialize(){const{layerView:e,layer:t}=this;this._disableMemCache=!e.loadCachedGPUData||!e.addCachedGPUData,this._lodHandling=new x(e),this._defaultGeometrySchema=t.store.defaultGeometrySchema,this.disableIDBCache=!!has("disable-feature:idb-cache"),"fields"in t&&(this._fields=t.fields,this._attributeStorageInfo=t.attributeStorageInfo),this.addResolvingPromise(Promise.all([t.indexInfo,t.when(),e.when()]).then((([s])=>{if(this.destroyed||!e||e.destroyed||!s)return;const{view:r,clientGeometry:a}=e,{resourceController:d}=r;if(this._setClippingArea(r.clippingArea),this.addHandles([o((()=>r?.pointsOfInterest?.focus?.renderLocation),(e=>this._pointOfInterestChanged(e)),n),o((()=>r.quality),(()=>this._setCameraDirty()),l),o((()=>e.contentVisible),(e=>{const t=e?()=>this._updateIdleState(!0):()=>this._updateViewData(),i=e?()=>this._updateIdleState(!1):()=>{};e&&null!=this._index&&this._index.invalidateAllElevationRanges(),this._idleStateCallbacks?(e||this.cancelNodeLoading(),this.restartNodeLoading(),this._idleStateCallbacks.idleBegin=t,this._idleStateCallbacks.idleEnd=i):this._idleStateCallbacks=d.scheduler.registerIdleStateCallbacks(t,i)}),n),y(e.view.resourceController.scheduler,this),o((()=>[this.featureTarget,this.fixedFeatureTarget]),(()=>{this._setCameraDirty(),this._stableFeatureLOD=!1})),o((()=>r.state?.contentCamera),(()=>this._setCameraDirty())),o((()=>t.elevationInfo),(e=>this._elevationInfoChanged(e))),o((()=>e.lodFactor),(()=>this._setCameraDirty())),o((()=>e.availableFields),(()=>this._requiredFieldsChange())),o((()=>e.holeFilling),(e=>null!=this._index&&(this._index.holeFilling=e)))]),this._viewportQueries=new V(this.crsIndex,r.renderCoordsHelper,r.state.contentCamera,!r.state.fixedContentCamera||this.isGraphics3D,this._clippingArea,this.isMeshPyramid?r.basemapTerrain:r.elevationProvider,g(r.viewingMode),this.layer.elevationInfo,{progressiveLoadFactor:this._getProgressiveLoadFactor(),screenspaceErrorBias:this._lod,angleDependentLoD:this._lod<.5}),this._clientNodeLoader=new m(this.layer.uid,{indexSR:this.crsIndex,vertexSR:this.crsVertex,renderSR:r.renderCoordsHelper.spatialReference},r.resourceController.memoryController,this.worker),this._index=new f(g(r.viewingMode),t,s,this.indexStreamController,this._clientNodeLoader,this._viewportQueries,i.getLogger(this),e.holeFilling,(t=>e.isNodeLoaded(t)),(t=>e.isNodeReloading(t)),(e=>this._shouldLoadNode(e)),(e=>this._enableFromGPUCache(e,N.Leaf)),(e=>this._needsUpdate(e)),(()=>!this.indexStreamController.busy),(t=>e.computeVisibilityObb?.(t)??null),e?.computeNodeFiltering?t=>e.computeNodeFiltering(t):void 0),this._index.updateElevationInfo(this.layer.elevationInfo,this.isMeshPyramid||this.isGraphics3D),this._index.imModificationsChanged(!!e.hasModifications),this._index.layerFilterChanged(!!e.hasGeometryFilter),null!=a){for(const e of a)this._addMesh(e.mesh,e.oid);this.addHandles(a.on("change",(e=>{for(const t of e.removed)this._removeMesh(t.oid);for(const t of e.added)this._addMesh(t.mesh,t.oid)})))}this._startNodeLoading()})))}updateNodeModificationStatus(e){const t=this._index,i=this.layerView;null!=t&&i?.updateNodeModificationStatus&&(this._modificationsNodeFilteringArray.clear(),e.forAll((e=>{const i=t.getNode(e);null!=i&&this._modificationsNodeFilteringArray.push(i)})),i.updateNodeModificationStatus(this._modificationsNodeFilteringArray),this._invisibleDirty=!0)}destroy(){this.cancelNodeLoading(),this._idleStateCallbacks&&(this._isIdle=!1,this._idleStateCallbacks.remove(),this._idleStateCallbacks=null),this._nodeLoader=null,E.prune(),this._index=null,this._lodHandling=s(this._lodHandling),this._nodeLoader=null,this._clientNodeLoader=null,this._viewportQueries=null,this._set("worker",null)}get viewportQueries(){return this._viewportQueries}_getRequiredAttributes(){if(null==this._attributeStorageInfo||!this._fields||!this.layerView.availableFields)return[];const e=this._attributeStorageInfo,t=this._fields,i=this.layer.objectIdField;return this.layerView.availableFields.map((i=>{const s=H(e,i),r=H(t,i);return s>=0&&r>=0?{index:s,name:t[r].name,field:t[r],attributeStorageInfo:e[s]}:null})).filter((e=>null!=e&&e.name!==i))}_requiredFieldsChange(){const e=this._getRequiredAttributes();R(this._requiredAttributes,e)||(this._requiredAttributes=e,this._requiredAttributesDirty=!1,this.restartNodeLoading())}requestUpdate(){this._requiredAttributesDirty=!0,this.restartNodeLoading()}_setClippingArea(e){const t=c();A(e,t,this.layerView.view.renderSpatialReference)?this._clippingArea=t:this._clippingArea=null}_pointOfInterestChanged(e){null!=this._viewportQueries&&(this._viewportQueries.setPointOfInterest(e),null!=this._index&&(this._index.progressiveLoadPenalty=B.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate()))}updateClippingArea(e){this._setClippingArea(e),null!=this._viewportQueries&&null!=this._index&&(this._viewportQueries.updateClippingArea(this._clippingArea),this._index.invalidateVisibilityCache()),this._setCameraDirty()}_setCameraDirty(){this._cameraDirty=!0,this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}_addMesh(e,t){if(null==this._index)return;const i=this._clientNodeLoader.createMeshNodeInfo(e,t),s=this._index.addClientNodeToIndex(i.id,i.mbs);this._clientNodeLoader.addMeshNode(s,i),this._evaluateUpdating(),this.notifyChange("rootNodeVisible")}_removeMesh(e){const t=this._clientNodeLoader.getMeshNodeIndex(e);if(null!=t){if(null==this._index)throw new Error("delayed removal of client side i3s node geometry not supported yet.");{const e=(e,t)=>{this.layerView.removeNode(t),this._clientNodeLoader.removeNode(e),this.layerView.deleteCachedNodeData&&null!=e&&this.layerView.deleteCachedNodeData(e),this.layerView.deleteCachedGPUData?.(this.layerView.loadCachedGPUData?.(t))},i=(e,t,i)=>{this._clientNodeLoader.updateNodeIndex(e,t,i),this.layerView.updateNodeIndex&&this.layerView.updateNodeIndex(t,i)};this._index.removeClientNodeFromIndex(t,e,i),this.notifyChange("rootNodeVisible")}}}updateElevationChanged(e,t){const i=this._index;if(null==i?.rootNode||null==t)return null;this.crsIndex.equals(t)||(_(e,t,z,this.crsIndex),e=z);const s=this._elevationUpdateNodes;return s.clear(),D(e,i.rootNode,i,(e=>s.push(e.index))),s.length&&(s.forAll((e=>i.updateElevationChanged(e))),this._setCameraDirty()),s}removeAllGeometryObbs(){null!=this._index&&this._index.removeAllGeometryObbs()}getRenderMbs(e){return null!=this._viewportQueries?this._viewportQueries.getServiceMbsInRenderSR(e):null}_elevationInfoChanged(e){null!=this._index&&(this._index.updateElevationInfo(e,this.isMeshPyramid||this.isGraphics3D),this._setCameraDirty())}restartNodeLoading(){this._restartNodeLoading=!0,this.cancelNodeLoading(),this._evaluateUpdating()}schedule(e,t){return this._idleQueue.push(e,t)}reschedule(e,t){return this._idleQueue.unshift(e,t)}get _isIntegratedMesh(){return"integrated-mesh"===this.layer.type}get unloadedMemoryEstimate(){return null!=this._index&&this.layerView.contentVisible?this._index.unloadedMemoryEstimate*this._lodDropFactor:0}async _loadNodeData(e,t){return e.index<0?this._clientNodeLoader.loadNodeData(e.id,t):this._nodeLoader.loadNodeData(e,t)}async _loadAttributes(e,t,i){return(e.index<0?this._clientNodeLoader:this._nodeLoader).loadAttributes(e,t,i)}get indexDepth(){return null!=this._index?this._index.maxLevel:0}set disableMemCache(e){this.layerView.loadCachedGPUData&&this.layerView.addCachedGPUData?this._disableMemCache=e:this._disableMemCache=!0}runTask(e,t){return this.layerView.contentVisible?this.layerView.visible&&null!=this._index?(this._processWithErrorLogging(e,t),this._index.maxPriority):-1/0:(this._updateViewData(),this._evaluateUpdating(),-1/0)}_processWithErrorLogging(e,t){try{this._process(e,t)}catch(s){this._errorCount<50?i.getLogger(this).error(`Error during processing: ${s} at ${s.stack}`):50===this._errorCount&&i.getLogger(this).error("Too many errors for this layer. Further errors will not be displayed."),this._errorCount++}}_process(e,t){this._restartNodeLoading&&this._startNodeLoading(),null!=this._nodeLoader&&null!=this._index&&(this._updateViewData(),this._invisibleDirty&&this._removeInvisibleNodes(e)&&(this._invisibleDirty=!1),this._isIntegratedMesh&&(e.enabled=!1),e.run((()=>this._processIndex(e))),this._updateFeatureLOD(),e.run((()=>this._processCache(e))),this._isIntegratedMesh&&(e.enabled=!0),e.run((()=>this._processNodes(e,t))),this._idleQueue.runTask(e),e.run((()=>this._prefetchIndex())),t.numIndexLoading+=this._index.indexLoading,t.numNodesLoading+=this._downloadingCount,e.run((()=>this._lodHandling.lodGlobalHandling(e))),this._evaluateUpdating())}_processIndex(e){if(null==this._index)return!1;if(this._index.dirty){this._newLoadingNodes.clear(),this._index.update(Array.from(this._loadingNodes.keys()),e,(e=>this.updateNodeModificationStatus(e))),this._disableMemCache||(this._newLoadingNodes.pushArray(this._index.updates.add.data,this._index.updates.add.length),this._newLoadingNodes.pushArray(this._index.updates.missing.data,this._index.updates.missing.length));const t=this._index.featureEstimate.leavesReached;this._index.isLoading||t===this._get("leavesReached")||this._set("leavesReached",t)}return this._index.load()}_prefetchIndex(){return!(null==this._index||this._loadingNodes.size>0||this._index.updates.add.length>0)&&this._index.prefetch()}_updateFeatureLOD(){if(!this.useMaximumNumberOfFeatures||null==this._index||null==this._viewportQueries)return;const e=!this._index.isLoading,t=this.featureTarget*this._baseLOD,i=this._index.featureEstimate;if(i.estimate=i.estimate||t/2,this._index.indexMissing>j){if(this._featureLOD<=G)return;this._featureLOD/=k,this._stableFeatureLOD=!1}else if(e&&i.estimate<t){if(i.leavesReached||this._featureLOD>=q||this._stableFeatureLOD)return;const e=Math.min(10,Math.max(t/i.estimate,1.001));this._featureLOD*=e;const s=this._lod,r=this._index.checkFeatureTarget(t,s);r!==s&&(this._featureLOD=r/this._baseLOD,this._stableFeatureLOD=!0)}else{if(!(i.estimate>t*Q||e&&i.estimate>t))return;if(this._featureLOD<=G)return;this._featureLOD/=1+.25*(i.estimate/t-1),this._stableFeatureLOD=!1}this._featureLOD=Math.min(q,Math.max(G,this._featureLOD)),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.requestUpdate()}_processCache(e){const t=this._index;if(null==t)return!1;for(;this._newLoadingNodes.length>0&&!e.done;){const i=this._newLoadingNodes.pop();for(let s=t.getParent(i);null!=s&&!this.layerView.isNodeLoaded(s.index);s=t.getParent(s.index))if(this._enableFromGPUCache(s,N.Hole)){e.madeProgress();break}}return e.hasProgressed}_processNodes(e,t){if(null==this._index)return!1;let i=(this._isIdle?P:U)-this._loadingNodes.size;const s=this._index.updates;for(s.cancel.forEach(this._cancelNode,this),s.cancel=[];s.remove.length>0&&!e.done;)this.layerView.removeNode(s.remove.pop()),e.madeProgress();for(;s.update.length>0&&!e.done;){const t=this._index.getNode(s.update.pop());null!=t&&(this._updateLoadedNode(t),e.madeProgress())}for(;s.add.length>0&&!e.done&&i>0;){--i;const r=this._index.getNode(s.add.back());if(null==r||r.cacheState!==b.Cached&&!this._hasNodeLoadToken(t))break;s.add.pop(),this._loadNode(r),e.madeProgress()}return e.hasProgressed}_cancelAllNodes(){this._loadingNodes.forEach((e=>e.abort())),this._loadingNodes.clear(),this._updatingNodes.forEach((e=>e.abort())),this._updatingNodes.clear()}_cancelNode(e){const t=this._loadingNodes.get(e);t&&(t.abort(),this._loadingNodes.delete(e))}_hasNodeLoadToken(e){return!(!this._isIdle&&e.numNodesLoading+this._loadingNodes.size>=U)&&(this._downloadingCount<M&&!this.dataStreamController.busy)}_evaluateUpdating(){let e=!1,t=0;if(this.layerView){if(this.layerView.contentVisible){const i=(this._index?.indexMissing??0)+3*(this._index?.updates.add.length??0)+2*this._loadingNodes.size;e=!!(i>0||this._updatingNodes.size>0||this._restartNodeLoading||this._cameraDirty||this._idleQueue.updating||this._lodHandling&&this._lodHandling.requiresLODGlobalHandling||null!=this._index&&this._index.isPrefetching),0===i&&(this._progressMaxNumNodes=1),this._progressMaxNumNodes=Math.max(i,this._progressMaxNumNodes),t=1-i/this._progressMaxNumNodes}else e=this._cameraDirty,t=e?0:1;this.updating=e,this.updatingProgress=t}}_updateViewData(){if(!this._cameraDirty||null==this._index||null==this._viewportQueries)return;const e=this.layerView.view,{contentCamera:t,fixedContentCamera:i}=e.state;this._viewportQueries.updateCamera(t,!i||this.isGraphics3D),this._viewportQueries.setPointOfInterest(e.pointsOfInterest.focus.renderLocation),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.invalidateVisibilityCache(),this._index.progressiveLoadPenalty=B.distancePenalty*this._viewportQueries.distCameraToPOI(),this._index.requestUpdate(),this._stableFeatureLOD=!1,this._invisibleDirty=!0,this._cameraDirty=!1,this.notifyChange("rootNodeVisible")}_getProgressiveLoadFactor(){return this.layerView.view.quality<1?1:this.layerView.progressiveLoadFactor}get _lod(){return this._featureLOD*this._baseLOD}get _baseLOD(){const e=this.layerView.lodFactor;return this.fixedFeatureTarget?1:(e>0?e:1)*this.layerView.view.quality}get _lodDropFactor(){if(this.fixedFeatureTarget)return 1;return(Math.min(this.layerView.view.quality,.5)-F)/(.5-F)}isGeometryVisible(e){return!!this._index?.isGeometryVisible(e.index)}updateVisibility(e){this._index?.invalidateNodeVisibilityCache(e)}invalidateGeometryVisibility(e){this._index?.invalidateGeometryVisibility(e)}invalidateVisibilityObbs(){this._index?.invalidateVisibilityObbs()}modificationsChanged(){this._index?.imModificationsChanged(!!this.layerView.hasModifications),this._invisibleDirty=!0}_shouldLoadNode(e){return!(!this._lodHandling.shouldLoadNode(e)||this._shouldDropNode(e))&&!(null==this._index||!this._index.isGeometryVisible(e.index))}_shouldDropNode(e){if(null==this._viewportQueries)return!1;const t=this._lodDropFactor;if(t>=1||!this._lodHandling.hasNoVisibleChildren(e))return!1;return Math.abs(this._viewportQueries.calcCameraDistanceToCenter(e))-this._viewportQueries.minDistance>(this._viewportQueries.maxDistance-this._viewportQueries.minDistance)*t}_startNodeLoading(){this._restartNodeLoading=!1;const e=this._index;if(this._updatesDisabled||null==e||null==this._viewportQueries)return;this._updateViewData(),this._requiredAttributesDirty&&(this._requiredAttributes=this._getRequiredAttributes(),this._requiredAttributesDirty=!1);const t={textureEncodings:this.layerView.supportedTextureEncodings,textureUsageMask:this.layerView.rendererTextureUsage,loadFeatureData:this.useMaximumNumberOfFeatures};this._nodeLoader=new w(this.layer,this.dataStreamController,i.getLogger(this),this._defaultGeometrySchema,this._requiredAttributes,t),e.requestUpdate(),this._lodHandling.startNodeLoading(((e,t)=>this._removeNodes(e,t,$.fadeout)),e,{maxLodLevel:this._viewportQueries.maxLodLevel}),this._evaluateUpdating()}isNodeLoading(){return null!=this._nodeLoader&&null!=this._index}cancelNodeLoading(){this.isNodeLoading()&&(this.indexStreamController.cancelAll(),this.dataStreamController.cancelAll(),this._idleQueue.cancelAll(),this._cancelAllNodes(),this._nodeLoader=null,this._evaluateUpdating())}_removeInvisibleNodes(e){const t=this._index;if(null==t||null==this._viewportQueries)return!1;E.clear(),this.layerView.getLoadedNodeIndices(E);const i=0===this._viewportQueries.maxDistance,s=i?()=>!1:e=>this._shouldDropNode(e);return E.filterInPlace((e=>{const i=t.getNode(e);return null==i||!t.isGeometryVisible(e)||s(i)})),E.length>0&&this._lodHandling.setLodGlobalDirty(),this._removeNodes(E,e,$.pop),!(i&&this._lodDropFactor<1)&&(0===E.length||(E.clear(),!1))}markNodeToRemove(e){E.push(e)}removeMarkedNodes(){this._removeNodes(E,O,$.pop)}_removeNodes(e,t,i){if(0!==e.length&&!t.done)for(null!=this._index&&this._index.requestUpdate();e.length>0&&!t.done;){const s=e.pop(),r=this._index;i===$.fadeout&&this.layerView.nodeFadeoutEnabled&&null!=r&&r.isGeometryVisible(s)?this.layerView.fadeNode(s,I.FadeOut,!0):this.layerView.removeNode(s),t.madeProgress()}}_needsUpdate(e){if(e.resources.isEmpty||this._updatingNodes.has(e.index))return!1;const t=this.layerView.getLoadedAttributes(e.index);return null!=t&&t!==this._requiredAttributes}async _updateLoadedNode(e){const t=new AbortController;this._updatingNodes.set(e.index,t),this._evaluateUpdating();try{const i=this.layerView.getLoadedAttributes(e.index),s=R(i,this._requiredAttributes)?this.layerView.getAttributeData(e.index):await this._loadAttributes(e,this._requiredAttributes,t.signal);await this.schedule((()=>this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:s},t.signal)),t.signal)}catch(i){if(!d(i))return this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:{}},t.signal)}this._updatingNodes.delete(e.index),this._evaluateUpdating()}_loadNode(e){if(this._loadingNodes.has(e.index))return void i.getLogger(this).error("already loading node "+e.index);const t=new AbortController;this._loadingNodes.set(e.index,t),this._evaluateUpdating(),this._loadAndAddNode(e,t.signal).then((i=>{i&&null!=this._index&&this._loadingNodes.get(e.index)===t&&(this._loadingNodes.delete(e.index),this._index.requestUpdate())})).catch((e=>{if(!d(e))throw e})).finally((()=>{this._loadingNodes.get(e.index)===t&&this._loadingNodes.delete(e.index),this._evaluateUpdating()}))}_loadAndAddNode(e,t){return e.cacheState===b.Uncached?this._loadUncached(e,t).then((()=>!1)):this._loadCached(e,t).then((t=>!t&&(e.cacheState=b.Uncached,!0))).catch((t=>!d(t)&&(e.cacheState=b.Uncached,!0)))}_enableFromGPUCache(e,t){if(this._disableMemCache||null==this._index)return!1;if(t===N.Hole&&!this._index.useNodeAsHole(e.index))return!0;const i=this._loadCachedGPUData(e);return!!i&&(this.layerView.addCachedGPUData(e,i,t),this._nodeAdded(),!0)}_loadCachedGPUData(e){const t=this.layerView.loadCachedGPUData(e.index);return null!=t?.attributeInfo&&R(t.attributeInfo.loadedAttributes,this._requiredAttributes)?t:(this.layerView.deleteCachedGPUData(t),null)}_nodeAdded(){null!=this._index&&this._index.requestUpdate(),this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating()}updateLoadStatus(e,t){const i=this._index;null!=i&&i.updateChildrenLoaded(e,t?1:-1)}async _loadCached(e,t){if(this._enableFromGPUCache(e,N.Leaf))return!0;const i=this.layerView;if(this.disableIDBCache||!i.loadCachedNodeData||!i.addCachedNodeData)return!1;const s=(t,i)=>this._nodeLoader.loadTextures(e,t,i),r=(t,i)=>this._clientNodeLoader.loadTextures(e,t,i),a=e.index>=0?s:r,d=await this.schedule((()=>i.loadCachedNodeData(e,t,a)),t);if(null==d)return!1;const o=this._requiredAttributes,n=await this.reschedule((()=>this._loadAttributes(e,o,t)),t);return await this.reschedule((()=>i.addCachedNodeData(e,d,{loadedAttributes:o,attributeData:n},t)),t),this._nodeAdded(),!0}_loadUncached(e,t){return this._downloadingCount++,this._loadNodeData(e,t).catch((e=>{throw this._downloadingCount--,e})).then((i=>(this._downloadingCount--,this.schedule((()=>this.layerView.addNode(e,i,t)),t)))).then((()=>{this._nodeAdded(),e.cacheState=b.Cached})).catch((t=>{if(!d(t))throw i.getLogger(this).error("#loadNodeData()",this.layer,`Failed to load node '${e.id}'`,t),e.failed=!0,null!=this._index&&this._index.requestUpdate(),t}))}_updateIdleState(e){e!==this._isIdle&&(this._isIdle=e,this._evaluateUpdating(),e&&this._index&&null!=this._index&&this._index.resetFailedNodes())}get test(){}notifyLODUpdate(){this._lodHandling.setLodGlobalDirty(),this._evaluateUpdating(),null!=this._index&&this._index.requestUpdate()}geometryFilterChanged(e){const t=this._index;null!=t&&t.layerFilterChanged(e),this._setCameraDirty()}};e([h({readOnly:!0})],T.prototype,"isMeshPyramid",null),e([h({readOnly:!0})],T.prototype,"isGraphics3D",null),e([h({readOnly:!0})],T.prototype,"useMaximumNumberOfFeatures",null),e([h({readOnly:!0})],T.prototype,"indexStreamController",null),e([h({readOnly:!0})],T.prototype,"dataStreamController",null),e([h({readOnly:!0})],T.prototype,"crsVertex",null),e([h({readOnly:!0})],T.prototype,"crsIndex",null),e([h()],T.prototype,"featureTarget",void 0),e([h()],T.prototype,"fixedFeatureTarget",void 0),e([h()],T.prototype,"layerView",void 0),e([h()],T.prototype,"layer",null),e([h()],T.prototype,"updating",void 0),e([h({readOnly:!0})],T.prototype,"running",null),e([h()],T.prototype,"updatingProgress",void 0),e([h({readOnly:!0})],T.prototype,"leavesReached",void 0),e([h({constructOnly:!0})],T.prototype,"worker",void 0),e([h({readOnly:!0,dependsOn:[]})],T.prototype,"rootNodeVisible",null),T=e([u("esri.layers.graphics.controllers.I3SOnDemandController")],T);const E=new r({deallocator:null});function R(e,t){return null!=e&&e.length===t.length&&e.every((e=>H(t,e.name)>=0))}function H(e,t){const i=t.toLowerCase();for(let s=0;s<e.length;s++)if(e[s].name.toLowerCase()===i)return s;return-1}const B={distancePenalty:10},z=c();var $;!function(e){e[e.pop=0]="pop",e[e.fadeout=1]="fadeout"}($||($={}));export{T as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Collection.js";import{clone as i}from"../../core/lang.js";import r from"../../core/Logger.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as n}from"../../core/accessorSupport/decorators/subclass.js";import{writer as p}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import d from"../../geometry/Extent.js";import a from"../../geometry/HeightModelInfo.js";import u from"../../geometry/SpatialReference.js";import{sanitizeUrlWithLayerId as y,writeUrlWithLayerId as c}from"../support/arcgisLayerUrl.js";import{elevationInfo as m,maxScale as f,minScale as h,url as v}from"../support/commonProperties.js";import g from"../support/EditFieldsInfo.js";import{FeatureIndex as I}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as F,hasCurrentUser as j,isLayerCacheStale as S,supportsQueryOnly as b,readGlobalIdField as E,readObjectIdField as x,readVersion as U}from"../support/featureLayerUtils.js";import O from"../support/GeometryFieldsInfo.js";import D from"../support/LayerFloorInfo.js";import{isPreferredUrlApplicable as T,getPreferredUrl as w}from"../support/layerUtils.js";import M from"../support/Relationship.js";import{getFeatureLayerCapabilities as B}from"../support/serviceCapabilitiesUtils.js";import C from"../support/Subtype.js";import{timeZoneProperty as R}from"../../time/timeZoneUtils.js";const A=A=>{let Q=class extends A{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(I)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=u.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.uniqueIdFields=null,this.version=void 0}getFieldDomain(){throw new Error("Not implemented")}getField(e){return this.fieldsIndex.get(e)}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:i,editing:r}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(i.supportsEditing&&!(r.supportsUpdateByOthers&&r.supportsUpdateByAnonymous&&r.supportsDeleteByOthers&&r.supportsDeleteByAnonymous))return"load"}if(j(this.serviceDefinitionExpression)||j(this.definitionExpression))return"load";if(this.userHasUpdateItemPrivileges){if(S(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return B(t,this.url)}readEditingInfo(e,t){const{editingInfo:i}=t;return i?{lastEditDate:null!=i.lastEditDate?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=i(e),{operations:r,editing:o}=t;return b(this)?(this.userHasUpdateItemPrivileges&&(r.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(r.supportsAdd=r.supportsDelete=r.supportsEditing=r.supportsQuery=r.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&r.supportsEditing&&(r.supportsAdd=r.supportsDelete=r.supportsUpdate=o.supportsGeometryUpdate=!0),t)}get effectiveEditingEnabled(){return!1}readGlobalIdFieldFromService(e,t){return E(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||b(this))return!1;const{operations:t,editing:i}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:i}=e;return b(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return x(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readUniqueIdFields(e,t){return t.uniqueIdInfo?.OIDFieldContainsHashValue?t.uniqueIdInfo.fields:null}set url(e){if(null==e)return void this._set("url",e);const t=y({layer:this,url:e,nonStandardUrlAllowed:!0,logger:r.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,i,r){c(this,e,null,t,r)}readVersion(e,t){return U(t)}applyPreferredHost(e){const{url:t,portalItem:i}=this;if(!t||!T(i))return;const r=w(t,e);r&&this._set("url",r)}};return e([o({readOnly:!0})],Q.prototype,"authenticationTriggerEvent",null),e([o({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],Q.prototype,"copyright",void 0),e([o({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","isDataBranchVersioned","isDataVersioned","maxRecordCount","maxRecordCountFactor","maxUniqueIDCount","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],Q.prototype,"capabilities",void 0),e([s("service","capabilities")],Q.prototype,"readCapabilitiesFromService",null),e([o(R("dateFieldsTimeReference"))],Q.prototype,"dateFieldsTimeZone",void 0),e([o({type:Boolean})],Q.prototype,"datesInUnknownTimezone",void 0),e([o({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Q.prototype,"definitionExpression",void 0),e([o({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],Q.prototype,"displayField",void 0),e([o({readOnly:!0,type:g})],Q.prototype,"editFieldsInfo",void 0),e([o({readOnly:!0})],Q.prototype,"editingInfo",void 0),e([s("editingInfo")],Q.prototype,"readEditingInfo",null),e([o({readOnly:!0})],Q.prototype,"effectiveCapabilities",null),e([o()],Q.prototype,"effectiveEditingEnabled",null),e([o((()=>{const e=i(m),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],Q.prototype,"elevationInfo",void 0),e([o()],Q.prototype,"fieldsIndex",void 0),e([o({type:D,json:{name:"layerDefinition.floorInfo",write:{layerContainerTypes:l}}})],Q.prototype,"floorInfo",void 0),e([o({type:d,json:{origins:{service:{read:{source:"extent"}}}}})],Q.prototype,"fullExtent",void 0),e([o()],Q.prototype,"gdbVersion",void 0),e([o({readOnly:!0,type:O,json:{read:{source:"geometryProperties"}}})],Q.prototype,"geometryFieldsInfo",void 0),e([o({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:F.read}}}})],Q.prototype,"geometryType",void 0),e([o({type:String})],Q.prototype,"globalIdField",void 0),e([s("service","globalIdField",["globalIdField","fields"])],Q.prototype,"readGlobalIdFieldFromService",null),e([o({readOnly:!0})],Q.prototype,"hasFullEditingRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],Q.prototype,"hasM",void 0),e([o({readOnly:!0})],Q.prototype,"hasUpdateItemRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],Q.prototype,"hasZ",void 0),e([o({readOnly:!0,type:a})],Q.prototype,"heightModelInfo",void 0),e([o({type:Date})],Q.prototype,"historicMoment",void 0),e([o({type:t.ofType(I),readOnly:!0})],Q.prototype,"indexes",void 0),e([o({readOnly:!0})],Q.prototype,"isTable",void 0),e([s("service","isTable",["type"])],Q.prototype,"readIsTableFromService",null),e([o({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],Q.prototype,"layerId",void 0),e([o(f)],Q.prototype,"maxScale",void 0),e([s("service","maxScale",["maxScale","effectiveMaxScale"])],Q.prototype,"readMaxScale",null),e([o(h)],Q.prototype,"minScale",void 0),e([s("service","minScale",["minScale","effectiveMinScale"])],Q.prototype,"readMinScale",null),e([o({type:String})],Q.prototype,"objectIdField",void 0),e([s("service","objectIdField",["objectIdField","fields"])],Q.prototype,"readObjectIdFieldFromService",null),e([o(R("preferredTimeReference"))],Q.prototype,"preferredTimeZone",void 0),e([o({type:[M],readOnly:!0})],Q.prototype,"relationships",void 0),e([o({type:Boolean})],Q.prototype,"returnM",void 0),e([o({type:Boolean})],Q.prototype,"returnZ",void 0),e([o({readOnly:!0,json:{write:!1}})],Q.prototype,"serverGens",void 0),e([o({readOnly:!0})],Q.prototype,"serviceDefinitionExpression",void 0),e([s("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],Q.prototype,"readServiceDefinitionExpression",null),e([o({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,"serviceItemId",void 0),e([o()],Q.prototype,"sourceJSON",void 0),e([o({type:u,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],Q.prototype,"spatialReference",void 0),e([o({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],Q.prototype,"subtypeField",void 0),e([o({type:[C],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,"subtypes",void 0),e([o({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],Q.prototype,"trackIdField",void 0),e([o({type:[String],readOnly:!0})],Q.prototype,"uniqueIdFields",void 0),e([s("service","uniqueIdFields",["uniqueIdInfo.OIDFieldContainsHashValue","uniqueIdInfo.fields"])],Q.prototype,"readUniqueIdFields",null),e([o(v)],Q.prototype,"url",null),e([p("url")],Q.prototype,"writeUrl",null),e([o({json:{origins:{service:{read:!0}},read:!1}})],Q.prototype,"version",void 0),e([s("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],Q.prototype,"readVersion",null),Q=e([n("esri.layers.mixins.FeatureLayerBase")],Q),Q};export{A as FeatureLayerBase};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Collection.js";import{clone as r}from"../../core/lang.js";import i from"../../core/Logger.js";import{hasSameOrigin as o,getHost as s,changeHost as n}from"../../core/urlUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{reader as l}from"../../core/accessorSupport/decorators/reader.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as u}from"../../core/accessorSupport/layerContainerType.js";import{OriginId as c,idToName as y}from"../../core/accessorSupport/PropertyOrigin.js";import f from"../../geometry/Extent.js";import m from"../../geometry/HeightModelInfo.js";import h from"../../geometry/SpatialReference.js";import{sanitizeUrlWithLayerId as v,writeUrlWithLayerId as g}from"../support/arcgisLayerUrl.js";import{elevationInfo as I,maxScale as F,minScale as S,url as j}from"../support/commonProperties.js";import b from"../support/EditFieldsInfo.js";import{FeatureIndex as E}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as U,hasCurrentUser as x,isLayerCacheStale as O,supportsQueryOnly as D,readGlobalIdField as M,readObjectIdField as T,readVersion as w}from"../support/featureLayerUtils.js";import R from"../support/GeometryFieldsInfo.js";import C from"../support/LayerFloorInfo.js";import{isPreferredUrlApplicable as B,getPreferredUrl as H,applyPreferredHostToPortalItem as A,getPreferredHost as Q}from"../support/layerUtils.js";import P from"../support/Relationship.js";import{getFeatureLayerCapabilities as q}from"../support/serviceCapabilitiesUtils.js";import V from"../support/Subtype.js";import{hasTypeKeyword as _,typeKeyword as G}from"../../portal/support/portalItemUtils.js";import{timeZoneProperty as Z}from"../../time/timeZoneUtils.js";const k=k=>{let L=class extends k{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(E)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=h.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.uniqueIdFields=null,this.version=void 0,this._isUrlHostModified=!1}getFieldDomain(){throw new Error("Not implemented")}getField(e){return this.fieldsIndex.get(e)}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:r,editing:i}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(r.supportsEditing&&!(i.supportsUpdateByOthers&&i.supportsUpdateByAnonymous&&i.supportsDeleteByOthers&&i.supportsDeleteByAnonymous))return"load"}if(x(this.serviceDefinitionExpression)||x(this.definitionExpression))return"load";if(this.userHasUpdateItemPrivileges){if(O(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return q(t,this.url)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=r(e),{operations:i,editing:o}=t;return D(this)?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=o.supportsGeometryUpdate=!0),t)}get effectiveEditingEnabled(){return!1}readGlobalIdFieldFromService(e,t){return M(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||D(this))return!1;const{operations:t,editing:r}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&r.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:r}=e;return D(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&r.supportsDeleteByOthers&&r.supportsGeometryUpdate&&r.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return T(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readUniqueIdFields(e,t){return t.uniqueIdInfo?.OIDFieldContainsHashValue?t.uniqueIdInfo.fields:null}set url(e){if(null==e)return void this._set("url",e);const t=v({layer:this,url:e,nonStandardUrlAllowed:!0,logger:i.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){g(this,e,null,t,i)}readVersion(e,t){return w(t)}get isUrlHostModified(){const{loaded:e,url:t,_isUrlHostModified:r}=this;if(r)return!0;if(!e||!t)return!1;if(this.originIdOf("url")<c.USER)return!1;const i=this.sourceJSON?.preferredHost;if(!i)return!1;if(!o(t,`https://${i}`,!0))return!1;for(let s=c.USER-1;s>=c.PORTAL_ITEM;s--){const e=this.getAtOrigin("url",y(s));if(e)return!o(t,e,!0)}return!1}applyPreferredHost(e){const{url:t,portalItem:r}=this;if(!t||!B(r))return;const i=H(t,e);i&&(this._set("url",i),this._isUrlHostModified=!0,r&&A(r,Q(e)))}applyHostFromPortalItem(){const{url:e,portalItem:t}=this;if(!e||this.originIdOf("url")===c.USER||!t?.url||!B(t)||!_(t,G.HOSTED_SERVICE)||o(e,t.url,!0))return;const r=s(t.url);this._set("url",n(e,r)),this._isUrlHostModified=!0}};return e([p({readOnly:!0})],L.prototype,"authenticationTriggerEvent",null),e([p({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],L.prototype,"copyright",void 0),e([p({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","isDataBranchVersioned","isDataVersioned","maxRecordCount","maxRecordCountFactor","maxUniqueIDCount","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],L.prototype,"capabilities",void 0),e([l("service","capabilities")],L.prototype,"readCapabilitiesFromService",null),e([p(Z("dateFieldsTimeReference"))],L.prototype,"dateFieldsTimeZone",void 0),e([p({type:Boolean})],L.prototype,"datesInUnknownTimezone",void 0),e([p({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],L.prototype,"definitionExpression",void 0),e([p({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],L.prototype,"displayField",void 0),e([p({readOnly:!0,type:b})],L.prototype,"editFieldsInfo",void 0),e([p({readOnly:!0})],L.prototype,"editingInfo",void 0),e([l("editingInfo")],L.prototype,"readEditingInfo",null),e([p({readOnly:!0})],L.prototype,"effectiveCapabilities",null),e([p()],L.prototype,"effectiveEditingEnabled",null),e([p((()=>{const e=r(I),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],L.prototype,"elevationInfo",void 0),e([p()],L.prototype,"fieldsIndex",void 0),e([p({type:C,json:{name:"layerDefinition.floorInfo",write:{layerContainerTypes:u}}})],L.prototype,"floorInfo",void 0),e([p({type:f,json:{origins:{service:{read:{source:"extent"}}}}})],L.prototype,"fullExtent",void 0),e([p()],L.prototype,"gdbVersion",void 0),e([p({readOnly:!0,type:R,json:{read:{source:"geometryProperties"}}})],L.prototype,"geometryFieldsInfo",void 0),e([p({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:U.read}}}})],L.prototype,"geometryType",void 0),e([p({type:String})],L.prototype,"globalIdField",void 0),e([l("service","globalIdField",["globalIdField","fields"])],L.prototype,"readGlobalIdFieldFromService",null),e([p({readOnly:!0})],L.prototype,"hasFullEditingRestrictions",null),e([p({type:Boolean,json:{origins:{service:{read:!0}}}})],L.prototype,"hasM",void 0),e([p({readOnly:!0})],L.prototype,"hasUpdateItemRestrictions",null),e([p({type:Boolean,json:{origins:{service:{read:!0}}}})],L.prototype,"hasZ",void 0),e([p({readOnly:!0,type:m})],L.prototype,"heightModelInfo",void 0),e([p({type:Date})],L.prototype,"historicMoment",void 0),e([p({type:t.ofType(E),readOnly:!0})],L.prototype,"indexes",void 0),e([p({readOnly:!0})],L.prototype,"isTable",void 0),e([l("service","isTable",["type"])],L.prototype,"readIsTableFromService",null),e([p({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],L.prototype,"layerId",void 0),e([p(F)],L.prototype,"maxScale",void 0),e([l("service","maxScale",["maxScale","effectiveMaxScale"])],L.prototype,"readMaxScale",null),e([p(S)],L.prototype,"minScale",void 0),e([l("service","minScale",["minScale","effectiveMinScale"])],L.prototype,"readMinScale",null),e([p({type:String})],L.prototype,"objectIdField",void 0),e([l("service","objectIdField",["objectIdField","fields"])],L.prototype,"readObjectIdFieldFromService",null),e([p(Z("preferredTimeReference"))],L.prototype,"preferredTimeZone",void 0),e([p({type:[P],readOnly:!0})],L.prototype,"relationships",void 0),e([p({type:Boolean})],L.prototype,"returnM",void 0),e([p({type:Boolean})],L.prototype,"returnZ",void 0),e([p({readOnly:!0,json:{write:!1}})],L.prototype,"serverGens",void 0),e([p({readOnly:!0})],L.prototype,"serviceDefinitionExpression",void 0),e([l("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],L.prototype,"readServiceDefinitionExpression",null),e([p({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],L.prototype,"serviceItemId",void 0),e([p()],L.prototype,"sourceJSON",void 0),e([p({type:h,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],L.prototype,"spatialReference",void 0),e([p({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],L.prototype,"subtypeField",void 0),e([p({type:[V],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],L.prototype,"subtypes",void 0),e([p({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],L.prototype,"trackIdField",void 0),e([p({type:[String],readOnly:!0})],L.prototype,"uniqueIdFields",void 0),e([l("service","uniqueIdFields",["uniqueIdInfo.OIDFieldContainsHashValue","uniqueIdInfo.fields"])],L.prototype,"readUniqueIdFields",null),e([p(j)],L.prototype,"url",null),e([a("url")],L.prototype,"writeUrl",null),e([p({json:{origins:{service:{read:!0}},read:!1}})],L.prototype,"version",void 0),e([l("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],L.prototype,"readVersion",null),e([p({readOnly:!0})],L.prototype,"isUrlHostModified",null),L=e([d("esri.layers.mixins.FeatureLayerBase")],L),L};export{k as FeatureLayerBase};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{urlToObject as r,getFilename as a}from"../../core/urlUtils.js";import{parse as t,parseNonStandardSublayerUrl as s}from"./arcgisLayerUrl.js";import{findAssociatedFeatureService as l}from"./associatedFeatureServiceUtils.js";import{getLayerModuleType as o,fetchFeatureService as n}from"./fetchService.js";import{getPreferredUrl as c,sceneServiceLayerTypeToClassName as i}from"./layerUtils.js";import{layerLookupMap as u}from"./lazyLayerLoader.js";import{fetchArcGISServiceJSON as y}from"../../support/requestPresets.js";const f={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function p(e){const{properties:r,url:a}=e,t={...r,url:a},s=await v(a,r?.customParameters),{Constructor:l,layerId:o,sourceJSON:n,parsedUrl:c,preferredUrl:i,layers:u,tables:y}=s;if(i&&(t.url=i),u.length+y.length===0)return null!=o&&(t.layerId=o),null!=n&&(t.sourceJSON=n),new l(t);const f=new(0,(await import("../GroupLayer.js")).default)({title:c.title});return await w(f,s,t),f}function m(e,r){return e?e.find((({id:e})=>e===r)):null}function d(e,r,a,t,s){const l={...s,layerId:r};return null!=e&&(l.url=e),null!=a&&(l.sourceJSON=a),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}async function w(e,r,a){const t=r.sublayerConstructorProvider;for(const{id:s,serverUrl:l}of r.layers){const o=m(r.sublayerInfos,s),n=d(l,s,o,(o&&t?.(o))??r.Constructor,a);e.add(n)}if(r.tables.length){const t=await L("FeatureLayer");r.tables.forEach((({id:s,serverUrl:l})=>{const o=d(l,s,m(r.tableInfos,s),t,a);e.tables.add(o)}))}}async function v(r,a){let s=t(r);if(null==s&&(s=await S(r,a)),null==s)throw new e("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:r});const{serverType:l,sublayer:n}=s;let u;const p={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},m="FeatureServer"===l,d="SceneServer"===l,w={parsedUrl:s,Constructor:null,layerId:m||d?n??void 0:void 0,layers:[],tables:[]};switch(l){case"MapServer":if(null!=n){const{type:t}=await y(r,{customParameters:a});switch(u="FeatureLayer",t){case"Catalog Layer":u="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new e("arcgis-layers:unsupported",`fromUrl() not supported for "${t}" layers`)}}else{u=await g(r,a)?"TileLayer":"MapImageLayer"}break;case"ImageServer":{const e=await y(r,{customParameters:a}),{tileInfo:t,cacheType:s}=e;u=t?"LERC"!==t?.format?.toUpperCase()||s&&"elevation"!==s.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await y(s.url.path,{customParameters:a});if(u="SceneLayer",e){const r=e?.layers;if("Voxel"===e?.layerType)u="VoxelLayer";else if(r?.length){const e=r[0]?.layerType;null!=e&&null!=i[e]&&(u=i[e])}}break}case"3DTilesServer":throw new e("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(u="FeatureLayer",null!=n){const e=await y(r,{customParameters:a});w.sourceJSON=e,w.preferredUrl=c(r,e),u=o(e.type)}break;default:u=p[l]}if(f[u]&&null==n){const e=await h(r,l,a);m&&(w.preferredUrl=e.preferredUrl,w.sublayerInfos=e.layerInfos,w.tableInfos=e.tableInfos);if(1!==e.layers.length+e.tables.length)w.layers=e.layers,w.tables=e.tables,m&&e.layerInfos?.length&&(w.sublayerConstructorProvider=await P(e.layerInfos));else if(m||d){const r=e.layerInfos?.[0]??e.tableInfos?.[0];if(w.layerId=e.layers[0]?.id??e.tables[0]?.id,w.sourceJSON=r,m){const e=r?.type;u=o(e)}}}return w.Constructor=await L(u),w}async function S(e,t){const l=await y(e,{customParameters:t});let o=null,n=null;const c=l.type;if("Feature Layer"===c||"Table"===c?(o="FeatureServer",n=l.id??null):"indexedVector"===c?o="VectorTileServer":l.hasOwnProperty("mapName")?o="MapServer":l.hasOwnProperty("bandCount")&&l.hasOwnProperty("pixelSizeX")?o="ImageServer":l.hasOwnProperty("maxRecordCount")&&l.hasOwnProperty("allowGeometryUpdates")?o="FeatureServer":l.hasOwnProperty("streamUrls")?o="StreamServer":b(l)?(o="SceneServer",n=l.id):l.hasOwnProperty("layers")&&b(l.layers?.[0])&&(o="SceneServer"),!o)return null;const i=null!=n?s(e):null;return{title:null!=i&&l.name||a(e),serverType:o,sublayer:n,url:{path:null!=i?i.serviceUrl:r(e).path}}}function b(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function h(e,r,a){let t,s,l,o=!1;switch(r){case"FeatureServer":{const r=await n(e,{customParameters:a});l=r.preferredUrl,o=!!r.layersJSON,t=r.layersJSON||r.serviceJSON;break}case"SceneServer":{const r=await I(e,a);t=r.serviceInfo,s=r.tableServerUrl;break}default:t=await y(e,{customParameters:a})}const c=t?.layers,i=t?.tables;return{preferredUrl:l,layers:c?.map((e=>({id:e.id}))).reverse()||[],tables:i?.map((e=>({serverUrl:s,id:e.id}))).reverse()||[],layerInfos:o?c:[],tableInfos:o?i:[]}}async function I(e,r){const a=await y(e,{customParameters:r}),t=a.layers?.[0];if(!t)return{serviceInfo:a};try{const{serverUrl:t}=await l(e),s=await y(t,{customParameters:r}).catch((()=>null));return s&&(a.tables=s.tables),{serviceInfo:a,tableServerUrl:t}}catch{return{serviceInfo:a}}}async function L(e){return(0,u[e])()}async function g(e,r){return(await y(e,{customParameters:r})).tileInfo}async function P(e){if(!e.length)return;const r=new Set,a=[];for(const{type:l}of e)r.has(l)||(r.add(l),a.push(L(o(l))));const t=await Promise.all(a),s=new Map;return Array.from(r).forEach(((e,r)=>{s.set(e,t[r])})),e=>s.get(e.type)}export{p as fromUrl};
5
+ import e from"../../core/Error.js";import{urlToObject as r,getFilename as a}from"../../core/urlUtils.js";import{parse as t,parseNonStandardSublayerUrl as s}from"./arcgisLayerUrl.js";import{findAssociatedFeatureService as l}from"./associatedFeatureServiceUtils.js";import{getLayerModuleType as o,fetchFeatureService as n}from"./fetchService.js";import{getPreferredUrl as c,sceneServiceLayerTypeToClassName as i}from"./layerUtils.js";import{layerLookupMap as u}from"./lazyLayerLoader.js";import{fetchArcGISServiceJSON as y}from"../../support/requestPresets.js";const f={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function p(e){const{properties:r,url:a}=e,t={...r,url:a},s=await v(a,r?.customParameters),{Constructor:l,layerId:o,sourceJSON:n,parsedUrl:c,preferredUrl:i,layers:u,tables:y}=s;if(i&&(t.url=i),u.length+y.length===0)return null!=o&&(t.layerId=o),null!=n&&(t.sourceJSON=n),new l(t);const f=new(0,(await import("../GroupLayer.js")).default)({title:c.title});return await w(f,s,t),f}function m(e,r){return e?e.find((({id:e})=>e===r)):null}function d(e,r,a,t,s){const l={...s,layerId:r};return null!=e&&(l.url=e),null!=a&&(l.sourceJSON=a),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}async function w(e,r,a){const t=r.sublayerConstructorProvider;for(const{id:s,serverUrl:l}of r.layers){const o=m(r.sublayerInfos,s),n=d(l,s,o,(o&&t?.(o))??r.Constructor,a);e.add(n)}if(r.tables.length){const t=await L("FeatureLayer");r.tables.forEach((({id:s,serverUrl:l})=>{const o=d(l,s,m(r.tableInfos,s),t,a);e.tables.add(o)}))}}async function v(r,a){let s=t(r);if(null==s&&(s=await S(r,a)),null==s)throw new e("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:r});const{serverType:l,sublayer:n}=s;let u;const p={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},m="FeatureServer"===l,d="SceneServer"===l,w={parsedUrl:s,Constructor:null,layerId:m||d?n??void 0:void 0,layers:[],tables:[]};switch(l){case"MapServer":if(null!=n){const{type:t}=await y(r,{customParameters:a});switch(u="FeatureLayer",t){case"Catalog Layer":u="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new e("arcgis-layers:unsupported",`fromUrl() not supported for "${t}" layers`)}}else{u=await g(r,a)?"TileLayer":"MapImageLayer"}break;case"ImageServer":{const e=await y(r,{customParameters:a}),{tileInfo:t,cacheType:s}=e;u=t?"LERC"!==t?.format?.toUpperCase()||s&&"elevation"!==s.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await y(s.url.path,{customParameters:a});if(u="SceneLayer",e){const r=e?.layers;if("Voxel"===e?.layerType)u="VoxelLayer";else if(r?.length){const e=r[0]?.layerType;null!=e&&null!=i[e]&&(u=i[e])}}break}case"3DTilesServer":throw new e("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(u="FeatureLayer",null!=n){const e=await y(r,{customParameters:a});w.sourceJSON=e,w.preferredUrl=c(r,e),u=o(e.type)}break;default:u=p[l]}if(f[u]&&null==n){const e=await h(r,l,a);m&&(w.preferredUrl=e.preferredUrl,w.sublayerInfos=e.layerInfos,w.tableInfos=e.tableInfos);if(1!==e.layers.length+e.tables.length)w.layers=e.layers,w.tables=e.tables,m&&e.layerInfos?.length&&(w.sublayerConstructorProvider=await P(e.layerInfos));else if(m||d){const r=e.layerInfos?.[0]??e.tableInfos?.[0];if(w.layerId=e.layers[0]?.id??e.tables[0]?.id,w.sourceJSON=r,m){const e=r?.type;u=o(e)}}}return w.Constructor=await L(u),w}async function S(e,t){const l=await y(e,{customParameters:t});let o=null,n=null;const c=l.type;if("Feature Layer"===c||"Table"===c?(o="FeatureServer",n=l.id??null):"indexedVector"===c?o="VectorTileServer":l.hasOwnProperty("mapName")?o="MapServer":l.hasOwnProperty("bandCount")&&l.hasOwnProperty("pixelSizeX")?o="ImageServer":l.hasOwnProperty("maxRecordCount")&&l.hasOwnProperty("allowGeometryUpdates")?o="FeatureServer":l.hasOwnProperty("streamUrls")?o="StreamServer":b(l)?(o="SceneServer",n=l.id):l.hasOwnProperty("layers")&&b(l.layers?.[0])&&(o="SceneServer"),!o)return null;const i=null!=n?s(e):null;return{title:null!=i&&l.name||a(e),serverType:o,sublayer:n,url:{path:null!=i?i.serviceUrl:r(e).path}}}function b(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function h(e,r,a){let t,s,l,o=!1;switch(r){case"FeatureServer":{const r=await n(e,{customParameters:a});l=c(e,{preferredHost:r.preferredHost}),o=!!r.layersJSON,t=r.layersJSON||r.serviceJSON;break}case"SceneServer":{const r=await I(e,a);t=r.serviceInfo,s=r.tableServerUrl;break}default:t=await y(e,{customParameters:a})}const i=t?.layers,u=t?.tables;return{preferredUrl:l,layers:i?.map((e=>({id:e.id}))).reverse()||[],tables:u?.map((e=>({serverUrl:s,id:e.id}))).reverse()||[],layerInfos:o?i:[],tableInfos:o?u:[]}}async function I(e,r){const a=await y(e,{customParameters:r}),t=a.layers?.[0];if(!t)return{serviceInfo:a};try{const{serverUrl:t}=await l(e),s=await y(t,{customParameters:r}).catch((()=>null));return s&&(a.tables=s.tables),{serviceInfo:a,tableServerUrl:t}}catch{return{serviceInfo:a}}}async function L(e){return(0,u[e])()}async function g(e,r){return(await y(e,{customParameters:r})).tileInfo}async function P(e){if(!e.length)return;const r=new Set,a=[];for(const{type:l}of e)r.has(l)||(r.add(l),a.push(L(o(l))));const t=await Promise.all(a),s=new Map;return Array.from(r).forEach(((e,r)=>{s.set(e,t[r])})),e=>s.get(e.type)}export{p as fromUrl};