@arcgis/core 4.33.0-next.20250303 → 4.33.0-next.20250305

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 (158) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{b49af2e3a1a38a063ab9.js → 1bd4fe77ba6fb25322e7.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{2f818b9a6b1f2b61410d.js → 1e7a70a1871fea29169e.js} +27 -27
  4. package/assets/esri/core/workers/chunks/{3ebdd0701e77bb28c75d.js → 2079f9d28e4199714f22.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{0fd6a78b38b0e2dae8a5.js → 237a965bd41ba8903e03.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{618016fc1165bcfc2b0d.js → 42b862550c96cc1be956.js} +7 -9
  7. package/assets/esri/core/workers/chunks/4403b3f08907e88d0d91.js +1 -0
  8. package/assets/esri/core/workers/chunks/{4dbd4523281691401272.js → 4539a802cba77a7a7cc7.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{0e2d9cd4e8ee5a62b05c.js → 45eee326f7a649c5a15b.js} +7 -9
  10. package/assets/esri/core/workers/chunks/{99f90d085aa9eb13e4fb.js → 46fb6ba8900286d18b6f.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{2a44a6e75b2799246257.js → 4fb4884d2de42792abe3.js} +1 -1
  12. package/assets/esri/core/workers/chunks/5295e685ae839087c568.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d60da671aba70485050e.js → 6e6422eda398774acbc7.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{c9cb8a6ff01275bec713.js → 77845cd5d824c1004bfa.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{a73a262ddc959a59819f.js → 7d3b2bdc75525d47389c.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{cc1aedb2b3aa3854b0de.js → 901c957c049f53318e87.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{654fe135d41af81daa13.js → 909be86782af3deb448e.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{7d93ff4f18fd21c7b9f2.js → 94f41ef15f6c61562e5e.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{8540fb31bd0b29ff1906.js → 968956284f44187f0622.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{92b48e3365d1cc933113.js → 96d2a0777f5c418055fb.js} +1 -1
  21. package/assets/esri/core/workers/chunks/988efc508c33ca341e49.js +1 -0
  22. package/assets/esri/core/workers/chunks/{56db71ea7eb8a5652d98.js → abfc5f9ac16c3e885c5f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{856b03020b2dd047291d.js → ad9b3b83aa96db7b79ea.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{c3b2b05996e2008adbe3.js → afddb94ff4e1a70022c7.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{c409bb2acd846d3b1395.js → b2f9f0767dadf185120c.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{563594357f3648652a5c.js → ba917175ca2a6681501e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/c03e6e35082beaec02a6.js +1 -0
  28. package/assets/esri/core/workers/chunks/{759781cad91d31ab7bc4.js → db4c110ab4c26c4b768c.js} +1 -1
  29. package/assets/esri/core/workers/chunks/dcb043986fb065de0366.js +1 -0
  30. package/assets/esri/core/workers/chunks/{05c80002c37002ac99e8.js → de16b771d2c8d816c738.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{3010a22d00f45fce5939.js → e0ac90b4ad8c36fb7d70.js} +1 -1
  32. package/assets/esri/core/workers/chunks/e3e049311bced533c853.js +1 -0
  33. package/assets/esri/core/workers/chunks/{5719471414810b6a9aec.js → e56647e61296643c5f84.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{1bc22af4cc4effcbcf2b.js → e6a5911ea21bef32834b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/f4111bb5e5a4910b684a.js +1 -0
  36. package/assets/esri/core/workers/chunks/{12d798775a96a45aada2.js → f46c4a69ef2f763e905b.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{5e80e10b7c7e66dd861e.js → febae745a29a17ca130a.js} +1 -1
  38. package/chunks/Bufferer-CicaNej1.js +1 -1
  39. package/chunks/Clouds.glsl.js +19 -23
  40. package/chunks/DefaultMaterial.glsl.js +22 -22
  41. package/chunks/Distance2DCalculator-C1KHhZwD.js +1 -1
  42. package/chunks/Envelope.js +1 -1
  43. package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +1 -1
  44. package/chunks/ImageMaterial.glsl.js +1 -1
  45. package/chunks/OperatorClip.js +1 -1
  46. package/chunks/OperatorCut.js +1 -1
  47. package/chunks/OperatorGeodesicBuffer.js +1 -1
  48. package/chunks/OperatorGeodeticArea.js +1 -1
  49. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  50. package/chunks/OperatorProximity.js +1 -1
  51. package/chunks/OperatorShapePreservingProject.js +1 -1
  52. package/chunks/ProjectionTransformation.js +1 -1
  53. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  54. package/chunks/disjointOperator.js +1 -1
  55. package/core/Accessor.js +1 -1
  56. package/core/accessorSupport/decorators/subclass.js +1 -1
  57. package/core/accessorSupport/interfaces.js +1 -1
  58. package/core/arrayUtils.js +1 -1
  59. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  60. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  61. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +5 -0
  62. package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +5 -0
  63. package/geometry/operators/extendOperator.js +1 -1
  64. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  65. package/geometry/operators/gx/operatorBuffer.js +1 -1
  66. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  67. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  68. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  69. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  70. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  71. package/geometry/operators/gx/operatorSimplify.js +1 -1
  72. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  73. package/geometry/operators/gx/operatorUnion.js +1 -1
  74. package/geometry/operators/json/disjointOperator.js +1 -1
  75. package/geometry/operators/reshapeOperator.js +1 -1
  76. package/geometry/operators/support/apiConverter.js +1 -1
  77. package/geometry/operators/support/initNoPeFactory.js +1 -1
  78. package/geometry/operators/support/jsonConverter.js +1 -1
  79. package/interfaces.d.ts +20 -18
  80. package/layers/WMTSLayer.js +1 -1
  81. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  82. package/layers/graphics/dehydratedFeatures.js +1 -1
  83. package/layers/mixins/ArcGISImageService.js +1 -1
  84. package/layers/support/SubtypeSublayer.js +1 -1
  85. package/layers/support/featureLayerUtils.js +1 -1
  86. package/layers/support/wmtsUtils.js +1 -1
  87. package/package.json +1 -1
  88. package/request.js +1 -1
  89. package/rest/support/IdentifyParameters.js +1 -1
  90. package/support/revision.js +1 -1
  91. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  92. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  93. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  94. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  95. package/views/3d/environment/Clouds.glsl.js +1 -1
  96. package/views/3d/environment/CloudsParameters.js +1 -1
  97. package/views/3d/environment/CloudsRenderer.js +1 -1
  98. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  99. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  100. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  101. package/views/3d/layers/I3SMeshView3D.js +1 -1
  102. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  103. package/views/3d/layers/MediaLayerView3D.js +1 -1
  104. package/views/3d/layers/SceneLayerView3D.js +1 -1
  105. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  106. package/views/3d/layers/support/FeatureTile.js +1 -1
  107. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  108. package/views/3d/layers/support/FeatureTileFetcher3DDebugger.js +1 -1
  109. package/views/3d/layers/support/projectExtentUtils.js +1 -1
  110. package/views/3d/support/StreamTextureCollection.js +1 -1
  111. package/views/3d/support/TextureCollection.js +1 -1
  112. package/views/3d/terrain/TerrainRenderer.js +1 -1
  113. package/views/3d/terrain/TerrainSurface.js +1 -1
  114. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +7 -7
  115. package/views/3d/webgl-engine/core/shaderLibrary/util/DoublePrecision.glsl.js +5 -7
  116. package/views/3d/webgl-engine/core/shaderLibrary/util/LookupCloudsFromTextureArray.glsl.js +51 -0
  117. package/views/3d/webgl-engine/lib/GLMaterialParameters.js +5 -0
  118. package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
  119. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  120. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  121. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  122. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  123. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  124. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  125. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  126. package/views/View.js +1 -1
  127. package/views/animation/pointToPoint/apex/planning.js +1 -1
  128. package/views/support/LayerLayerViewInfo.js +5 -0
  129. package/views/support/LayerViewManager.js +5 -0
  130. package/views/webgl/FramebufferObject.js +1 -1
  131. package/views/webgl/TextureDescriptor.js +1 -1
  132. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  133. package/widgets/Editor/Edits.js +1 -1
  134. package/widgets/Editor/workflowUtils.js +1 -1
  135. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  136. package/widgets/Feature/FeatureRelationship.js +1 -1
  137. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  138. package/widgets/Feature/support/featureUtils.js +1 -1
  139. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  140. package/widgets/FeatureForm/FieldInput.js +1 -1
  141. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  142. package/widgets/Features/FeaturesDrillIn.js +1 -1
  143. package/widgets/Features/FeaturesViewModel.js +1 -1
  144. package/widgets/Features.js +1 -1
  145. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  146. package/widgets/UtilityNetworkTraceAnalysis/UtilityNetworkTraceAnalysisViewModel.js +1 -1
  147. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  148. package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +1 -1
  149. package/assets/esri/core/workers/chunks/0e6d338b0937724763c7.js +0 -1
  150. package/assets/esri/core/workers/chunks/10118666a5a5b141ece6.js +0 -1
  151. package/assets/esri/core/workers/chunks/64d3e683872791eb6ae9.js +0 -1
  152. package/assets/esri/core/workers/chunks/7d120f8b01fe719eb257.js +0 -1
  153. package/assets/esri/core/workers/chunks/95047f145ebda65c3d8e.js +0 -1
  154. package/assets/esri/core/workers/chunks/960b12a6fd5b6933212f.js +0 -1
  155. package/assets/esri/core/workers/chunks/af005704f23088db3ded.js +0 -1
  156. package/editing/sharedTemplates/executor/support/createServiceEdit.js +0 -5
  157. package/views/3d/webgl-engine/core/shaderLibrary/util/LookupCubemapFromTextureArray.glsl.js +0 -39
  158. package/views/LayerViewManager.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import e from"../../core/Error.js";import o from"../../core/Logger.js";import{watch as i}from"../../core/reactiveUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../core/support/UpdatingHandles.js";let n=class extends t{constructor(r){super(r),this._updatingHandlesLoad=new l,this._updatingHandlesExecute=new l}initialize(){this.addHandles([i((()=>[this.utilityNetwork,this.view]),(()=>{this._setUp()}),{initial:!0})])}destroy(){this._updatingHandlesLoad.destroy(),this._updatingHandlesExecute.destroy()}get executionError(){return this._executionError}get loadError(){return this._loadError}get state(){return this._updatingHandlesLoad.updating?"loading":this.loadError?"disabled":this._updatingHandlesExecute.updating?"executing":this.executionError?"failed":"ready"}get utilityNetwork(){return this.utilityNetwork}set utilityNetwork(r){this._get("utilityNetwork")!==r&&this._set("utilityNetwork",r)}get view(){return this.view}set view(r){this._get("view")!==r&&this._set("view",r)}async executeNamedTraceConfiguration(r){return this._updatingHandlesExecute.addPromise(this._executeNamedTraceConfiguration(r))}async executeTraceConfiguration(r){return this._updatingHandlesExecute.addPromise(this._executeTraceConfiguration(r))}async _executeNamedTraceConfiguration(r){if("disabled"===this.state)throw this._logError("trace-analysis-view-model:load-error",this.loadError),new e("trace-analysis-view-model:load-error",this.loadError);this._executionError=null;return await this.utilityNetwork.trace(r).catch((r=>{throw this._executionError="trace-error",this._logError("trace-analysis-view-model:execution-error",this._executionError),r}))}async _executeTraceConfiguration(r){if("disabled"===this.state)throw this._logError("trace-analysis-view-model:load-error",this.loadError),new e("trace-analysis-view-model:load-error",this.loadError);this._executionError=null;return await this.utilityNetwork.trace(r).catch((r=>{throw this._executionError="trace-error",this._logError("trace-analysis-view-model:execution-error",this._executionError),r}))}_logError(r,t){o.getLogger(this).error(new e(r,t))}async _setUp(){const{utilityNetwork:r,view:t}=this;this._updatingHandlesLoad.addPromise((async()=>(this._loadError=null,t?"2d"!==t.type?(this._loadError="sceneView-not-supported",void this._logError("trace-analysis-view-model:load-error",this._loadError)):r?void 0:(this._loadError="no-utility-network",void this._logError("trace-analysis-view-model:load-error",this._loadError)):(this._loadError="no-view",void this._logError("trace-analysis-view-model:load-error",this._loadError))))())}};r([s()],n.prototype,"_executionError",void 0),r([s()],n.prototype,"_loadError",void 0),r([s()],n.prototype,"executionError",null),r([s()],n.prototype,"loadError",null),r([s({readOnly:!0})],n.prototype,"state",null),r([s()],n.prototype,"utilityNetwork",null),r([s()],n.prototype,"view",null),n=r([a("esri.widgets.UtilityNetworkTraceAnalysis.UtilityNetworkTraceAnalysisViewModel")],n);const d=n;export{d as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import o from"../../core/Error.js";import e from"../../core/Logger.js";import{watch as i}from"../../core/reactiveUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as l}from"../../core/support/UpdatingHandles.js";import n from"../../layers/FeatureLayer.js";import{getOwningPortalUrl as d}from"../../layers/support/layerUtils.js";import c from"../../portal/Portal.js";import{hasUserTypeExtension as u}from"../../portal/support/utils.js";let h=class extends t{constructor(r){super(r),this._updatingHandlesLoad=new l,this._updatingHandlesExecute=new l}initialize(){this.addHandles([i((()=>[this.utilityNetwork,this.view]),(()=>{this._setUp()}),{initial:!0})])}destroy(){this._updatingHandlesLoad.destroy(),this._updatingHandlesExecute.destroy()}get executionError(){return this._executionError}get loadError(){return this._loadError}get state(){return this._updatingHandlesLoad.updating?"loading":this.loadError?"disabled":this._updatingHandlesExecute.updating?"executing":"ready"}get utilityNetwork(){return this.utilityNetwork}set utilityNetwork(r){this._get("utilityNetwork")!==r&&this._set("utilityNetwork",r)}get view(){return this.view}set view(r){this._get("view")!==r&&this._set("view",r)}async executeNamedTraceConfiguration(r){return this._updatingHandlesExecute.addPromise(this._executeNamedTraceConfiguration(r))}async executeTraceConfiguration(r){return this._updatingHandlesExecute.addPromise(this._executeTraceConfiguration(r))}async _executeNamedTraceConfiguration(r){if("disabled"===this.state){const r="trace-analysis-view-model:load-error";throw this._logError(r,this.loadError),new o(r,this.loadError)}this._executionError=null;return await this.utilityNetwork.trace(r).catch((r=>{throw this._executionError="trace-error",this._logError("trace-analysis-view-model:execution-error",this.executionError),r}))}async _executeTraceConfiguration(r){if("disabled"===this.state){const r="trace-analysis-view-model:load-error";throw this._logError(r,this.loadError),new o(r,this.loadError)}this._executionError=null;return await this.utilityNetwork.trace(r).catch((r=>{throw this._executionError="trace-error",this._logError("trace-analysis-view-model:execution-error",this.executionError),r}))}_logError(r,t){e.getLogger(this).error(new o(r,t))}async _setUp(){const{utilityNetwork:r,view:t}=this;this._updatingHandlesLoad.addPromise((async()=>{this._loadError=null;const e="trace-analysis-view-model:load-error";if(!t)throw this._loadError="no-view",this._logError(e,this.loadError),new o(e,this.loadError);if("2d"!==t.type)throw this._loadError="sceneView-not-supported",this._logError(e,this._loadError),new o(e,this.loadError);if("utility"!==r?.type)throw this._loadError="no-utility-network",this._logError(e,this.loadError),new o(e,this.loadError);r.loaded||await r.load().catch((r=>{throw this._loadError="no-utility-network",this._logError(e,this.loadError),r})),this._checkUserTypeExtension(r)})())}async _checkUserTypeExtension(r){const t=new n({url:r.networkSystemLayers.dirtyAreasLayerUrl});await t.load();const e=t.version;if(Number(e)<=11.1){const t=await d(r.layerUrl),e=new c({url:t});await e.load();const i=e.user?.username??"";if(!await u(e,i,"utilityNetwork")){const r="trace-analysis-view-model:load-error";throw this._loadError="no-user-type-extension",this._logError(r,this.loadError),new o(r,this.loadError)}}}};r([s()],h.prototype,"_executionError",void 0),r([s()],h.prototype,"_loadError",void 0),r([s()],h.prototype,"executionError",null),r([s()],h.prototype,"loadError",null),r([s({readOnly:!0})],h.prototype,"state",null),r([s()],h.prototype,"utilityNetwork",null),r([s()],h.prototype,"view",null),h=r([a("esri.widgets.UtilityNetworkTraceAnalysis.UtilityNetworkTraceAnalysisViewModel")],h);const p=h;export{p as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{watch as r,initial as l}from"../../core/reactiveUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{videoMetadataEntryId as o}from"../../layers/video/videoUtils.js";function a(e,t){const r={};for(const l of t){const t=e.get(l);t&&(r[t.name]=t.value)}return r}let n=class extends t{constructor(e){super(e),this.followingMode="follow-both",this.layer=null,this.seekLength=10,this.view=null}initialize(){this.addHandles([r((()=>this.layer),(e=>{e&&e.load().then((()=>this._followTelemetry())).catch((()=>{}))}),l),r((()=>[this.followingMode]),(()=>this._followTelemetry()),l)])}get _layerView(){return this.layer&&this.view?this.view.allLayerViews.find((e=>e.layer===this.layer))??null:null}get buffered(){return this.layer?.buffered||0}get currentTime(){return this.layer?.currentTime||0}get duration(){return this.layer?.duration||0}get ended(){return this.layer?.ended??!0}get metadata(){const e=this.layer?.metadata;return e?{missionInfo:a(e,[o.MissionId,o.PrecisionTimeStamp]),platformInfo:a(e,[o.PlatformTailNumber,o.PlatformTrueAirspeed,o.PlatformCallSign,o.PlatformDesignation,o.PlatformGroundRange]),frameInfo:a(e,[o.FrameCenterElevation,o.FrameCenterLatitude,o.FrameCenterLongitude])}:null}get playing(){return this.layer?.playing??!1}get state(){return this.layer?.loadError?"error":this.layer?.state}play(){this.layer?.play()}pause(){this.layer?.pause()}seekBackward(){if(this.layer){const e=this.layer.currentTime-this.seekLength;e<=0?this.layer.reset():this.layer.setCurrentTime(e)}}seekForward(){if(this.layer){const e=this.layer.currentTime+this.seekLength;e>=this.layer.duration?this.layer.reset():this.layer.setCurrentTime(e)}}seekToBeginning(){this.layer?.setCurrentTime(0)}seekToEnding(){this.layer?.setCurrentTime(this.layer.duration)}seekTo(e){this.layer?.setCurrentTime(e)}toggleSensorDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.sensorLocation=!this._layerView.visibleTelemetryElements.sensorLocation)}toggleSensorSightLineDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.lineOfSight=!this._layerView.visibleTelemetryElements.lineOfSight)}toggleFrameDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.frame=!this._layerView.visibleTelemetryElements.frame)}toggleSensorTrailDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.sensorTrail=!this._layerView.visibleTelemetryElements.sensorTrail)}toggleFrameCenterDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.frameCenter=!this._layerView.visibleTelemetryElements.frameCenter)}toggleFrameOutlineDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.frameOutline=!this._layerView.visibleTelemetryElements.frameOutline)}changePlaybackSpeed(e){this.layer&&(this.layer.playbackRate=e)}changeGraphicsColor(e){this._layerView&&(this._layerView.symbolColor=e)}_followTelemetry(){this.removeHandles("follow"),this.view&&this.layer&&this.addHandles(r((()=>this.layer?.telemetry),(()=>{const e=[],t="follow-sensor"===this.followingMode||"follow-both"===this.followingMode,r="follow-frame"===this.followingMode||"follow-both"===this.followingMode;t&&this.layer?.telemetry.sensorLocation&&e.push(this.layer.telemetry.sensorLocation),r&&this.layer?.telemetry.frameCenter&&e.push(this.layer.telemetry.frameCenter),e.length&&this.view?.goTo(e).catch((()=>{}))}),l),"follow")}};e([i()],n.prototype,"_layerView",null),e([i({readOnly:!0})],n.prototype,"buffered",null),e([i({readOnly:!0})],n.prototype,"currentTime",null),e([i({readOnly:!0})],n.prototype,"duration",null),e([i({readOnly:!0})],n.prototype,"ended",null),e([i()],n.prototype,"followingMode",void 0),e([i()],n.prototype,"layer",void 0),e([i({readOnly:!0})],n.prototype,"metadata",null),e([i({readOnly:!0})],n.prototype,"playing",null),e([i()],n.prototype,"seekLength",void 0),e([i({readOnly:!0})],n.prototype,"state",null),e([i()],n.prototype,"view",void 0),n=e([s("esri.widgets.VideoPlayer.VideoPlayerViewModel")],n);const y=n;export{y as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{watch as r,initial as l}from"../../core/reactiveUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{videoMetadataEntryId as o}from"../../layers/video/videoUtils.js";function a(e,t){const r={};for(const l of t){const t=e.get(l);t&&(r[t.name]=t.value)}return r}let n=class extends t{constructor(e){super(e),this.followingMode="follow-both",this.layer=null,this.seekLength=10,this.view=null}initialize(){this.addHandles([r((()=>this.layer),(e=>{e&&e.load().then((()=>this._followTelemetry())).catch((()=>{}))}),l),r((()=>[this.followingMode]),(()=>this._followTelemetry()),l)])}get _layerView(){return this.layer&&this.view?this.view.allLayerViews.find((e=>e.layer===this.layer))??null:null}get buffered(){return this.layer?.buffered||0}get currentTime(){return this.layer?.currentTime||0}get duration(){return this.layer?.duration||0}get ended(){return this.layer?.ended??!0}get metadata(){const e=this.layer?.metadata;return e?{missionInfo:a(e,[o.MissionId,o.PrecisionTimeStamp]),platformInfo:a(e,[o.PlatformTailNumber,o.PlatformTrueAirspeed,o.PlatformCallSign,o.PlatformDesignation,o.PlatformGroundRange]),frameInfo:a(e,[o.FrameCenterElevation,o.FrameCenterLatitude,o.FrameCenterLongitude])}:null}get playing(){return this.layer?.playing??!1}get state(){return this.layer?.loadError?"error":this.layer?.state??"not-ready"}play(){this.layer?.play()}pause(){this.layer?.pause()}seekBackward(){if(this.layer){const e=this.layer.currentTime-this.seekLength;e<=0?this.layer.reset():this.layer.setCurrentTime(e)}}seekForward(){if(this.layer){const e=this.layer.currentTime+this.seekLength;e>=this.layer.duration?this.layer.reset():this.layer.setCurrentTime(e)}}seekToBeginning(){this.layer?.setCurrentTime(0)}seekToEnding(){this.layer?.setCurrentTime(this.layer.duration)}seekTo(e){this.layer?.setCurrentTime(e)}toggleSensorDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.sensorLocation=!this._layerView.visibleTelemetryElements.sensorLocation)}toggleSensorSightLineDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.lineOfSight=!this._layerView.visibleTelemetryElements.lineOfSight)}toggleFrameDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.frame=!this._layerView.visibleTelemetryElements.frame)}toggleSensorTrailDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.sensorTrail=!this._layerView.visibleTelemetryElements.sensorTrail)}toggleFrameCenterDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.frameCenter=!this._layerView.visibleTelemetryElements.frameCenter)}toggleFrameOutlineDisplay(){this._layerView?.visibleTelemetryElements&&(this._layerView.visibleTelemetryElements.frameOutline=!this._layerView.visibleTelemetryElements.frameOutline)}changePlaybackSpeed(e){this.layer&&(this.layer.playbackRate=e)}changeGraphicsColor(e){this._layerView&&(this._layerView.symbolColor=e)}_followTelemetry(){this.removeHandles("follow"),this.view&&this.layer&&this.addHandles(r((()=>this.layer?.telemetry),(()=>{const e=[],t="follow-sensor"===this.followingMode||"follow-both"===this.followingMode,r="follow-frame"===this.followingMode||"follow-both"===this.followingMode;t&&this.layer?.telemetry.sensorLocation&&e.push(this.layer.telemetry.sensorLocation),r&&this.layer?.telemetry.frameCenter&&e.push(this.layer.telemetry.frameCenter),e.length&&this.view?.goTo(e).catch((()=>{}))}),l),"follow")}};e([i()],n.prototype,"_layerView",null),e([i({readOnly:!0})],n.prototype,"buffered",null),e([i({readOnly:!0})],n.prototype,"currentTime",null),e([i({readOnly:!0})],n.prototype,"duration",null),e([i({readOnly:!0})],n.prototype,"ended",null),e([i()],n.prototype,"followingMode",void 0),e([i()],n.prototype,"layer",void 0),e([i({readOnly:!0})],n.prototype,"metadata",null),e([i({readOnly:!0})],n.prototype,"playing",null),e([i()],n.prototype,"seekLength",void 0),e([i({readOnly:!0})],n.prototype,"state",null),e([i()],n.prototype,"view",void 0),n=e([s("esri.widgets.VideoPlayer.VideoPlayerViewModel")],n);const y=n;export{y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{generateGlobalId as e}from"../../../../editing/sharedTemplates/executor/support/createServiceEdit.js";import{isSubtypeSublayer as t}from"../../../../layers/support/layerUtils.js";import r from"../../../../rest/networks/support/Association.js";import o from"../../../../rest/networks/support/NetworkElement.js";function i(t){return new r({fromNetworkElement:s(t.fromFeature,t.utilityNetwork),toNetworkElement:s(t.toFeature,t.utilityNetwork),associationType:t.associationType,globalId:e()})}function s(e,r){const i=t(e.sourceLayer)?e.sourceLayer.parent:e.sourceLayer;if(i&&"globalIdField"in i&&"layerId"in i&&i.globalIdField){const t=r.getSourceIdByLayerId(i.layerId),s="junction"===r.getSourceTypeById(t)?r.getTerminalConfiguration(e):void 0,a=s?.terminals.at(0)?.id,n=i.fieldsIndex.get("assetGroup").name,l=i.fieldsIndex.get("assetType").name,u=e.attributes[n],d=e.attributes[l],p=e.attributes[i.globalIdField];if(p&&null!=t)return new o({globalId:p,networkSourceId:t,assetGroupCode:u,assetTypeCode:d,terminalId:a})}}export{i as createAssociation};
5
+ import{generateBracedUUID as e}from"../../../../core/uuid.js";import{isSubtypeSublayer as t}from"../../../../layers/support/layerUtils.js";import r from"../../../../rest/networks/support/Association.js";import o from"../../../../rest/networks/support/NetworkElement.js";function i(t){return new r({fromNetworkElement:s(t.fromFeature,t.utilityNetwork),toNetworkElement:s(t.toFeature,t.utilityNetwork),associationType:t.associationType,globalId:e()})}function s(e,r){const i=t(e.sourceLayer)?e.sourceLayer.parent:e.sourceLayer;if(i&&"globalIdField"in i&&"layerId"in i&&i.globalIdField){const t=r.getSourceIdByLayerId(i.layerId),s="junction"===r.getSourceTypeById(t)?r.getTerminalConfiguration(e):void 0,a=s?.terminals.at(0)?.id,n=i.fieldsIndex.get("assetGroup").name,l=i.fieldsIndex.get("assetType").name,u=e.attributes[n],d=e.attributes[l],p=e.attributes[i.globalIdField];if(p&&null!=t)return new o({globalId:p,networkSourceId:t,assetGroupCode:u,assetTypeCode:d,terminalId:a})}}export{i as createAssociation};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[309],{13043:(e,t,r)=>{function i(e,t){if(e&&t)for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&i(r,t)}else i(r,e)}}function*s(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*s(r,e)}}r.d(t,{i:()=>s,p:()=>i})},20309:(e,t,r)=>{r.r(t),r.d(t,{default:()=>fe});var i,s=r(90237),l=r(78888),o=r(4576),n=r(5503),a=r(49186),c=r(4718),u=r(92071),p=r(93637),d=r(74887),h=r(36708),m=r(84952),y=r(10107),f=(r(44208),r(53966),r(36005)),g=r(40608),w=r(43937),x=r(5443),M=r(4146),v=r(47314),S=r(63074),I=r(16131),L=r(8303),T=r(54310),A=r(25036),_=r(33446),P=r(87045),C=r(65509),b=r(83703),E=r(25482);r(87811);let O=i=class extends E.A{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){const e=new i;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()??null),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo?.clone()??null),e}};(0,s._)([(0,y.MZ)({type:x.A,json:{read:{source:"fullExtent"}}})],O.prototype,"fullExtent",void 0),(0,s._)([(0,y.MZ)({type:String,json:{read:{source:"id"}}})],O.prototype,"id",void 0),(0,s._)([(0,y.MZ)({type:P.A,json:{read:{source:"tileInfo"}}})],O.prototype,"tileInfo",void 0),O=i=(0,s._)([(0,g.$)("esri.layers.support.TileMatrixSet")],O);const R=O;var F;let Z=F=class extends E.A{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){const e=new F;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s._)([(0,y.MZ)({json:{read:{source:"id"}}})],Z.prototype,"id",void 0),(0,s._)([(0,y.MZ)({json:{read:{source:"title"}}})],Z.prototype,"title",void 0),(0,s._)([(0,y.MZ)({json:{read:{source:"abstract"}}})],Z.prototype,"description",void 0),(0,s._)([(0,y.MZ)({json:{read:{source:"legendUrl"}}})],Z.prototype,"legendUrl",void 0),(0,s._)([(0,y.MZ)({json:{read:{source:"isDefault"}}})],Z.prototype,"isDefault",void 0),(0,s._)([(0,y.MZ)({json:{read:{source:"keywords"}}})],Z.prototype,"keywords",void 0),Z=F=(0,s._)([(0,g.$)("esri.layers.support.WMTSStyle")],Z);const U=Z;var V;let j=V=class extends E.A{constructor(e){super(e),this.description=null,this.fullExtent=null,this.fullExtents=null,this.id=null,this.imageFormats=null,this.layer=null,this.parent=null,this.styles=null,this.title=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}readFullExtent(e,t){return(e=t.fullExtent)?x.A.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map((e=>x.A.fromJSON(e))):t.tileMatrixSets?.map((e=>x.A.fromJSON(e.fullExtent))).filter((e=>e))??[]}get imageFormat(){let e=this._get("imageFormat");return e||(e=this.imageFormats?.length?this.imageFormats[0]:""),e}set imageFormat(e){const t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||(e=this.styles?.at(0)?.id??""),e}set styleId(e){this._set("styleId",e)}get tileMatrixSet(){return this.tileMatrixSets?.find((({id:e})=>e===this.tileMatrixSetId))??null}clone(){const e=new V;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats?.slice()??null),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles?.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets?.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,s._)([(0,y.MZ)()],j.prototype,"description",void 0),(0,s._)([(0,y.MZ)({type:x.A})],j.prototype,"fullExtent",void 0),(0,s._)([(0,f.w)("fullExtent",["fullExtent"])],j.prototype,"readFullExtent",null),(0,s._)([(0,y.MZ)({readOnly:!0})],j.prototype,"fullExtents",void 0),(0,s._)([(0,f.w)("fullExtents",["fullExtents","tileMatrixSets"])],j.prototype,"readFullExtents",null),(0,s._)([(0,y.MZ)()],j.prototype,"id",void 0),(0,s._)([(0,y.MZ)()],j.prototype,"imageFormat",null),(0,s._)([(0,y.MZ)({json:{read:{source:"formats"}}})],j.prototype,"imageFormats",void 0),(0,s._)([(0,y.MZ)()],j.prototype,"layer",void 0),(0,s._)([(0,y.MZ)()],j.prototype,"parent",void 0),(0,s._)([(0,y.MZ)()],j.prototype,"styleId",null),(0,s._)([(0,y.MZ)({type:n.A.ofType(U),json:{read:{source:"styles"}}})],j.prototype,"styles",void 0),(0,s._)([(0,y.MZ)({json:{write:{ignoreOrigin:!0}}})],j.prototype,"title",void 0),(0,s._)([(0,y.MZ)()],j.prototype,"tileMatrixSetId",void 0),(0,s._)([(0,y.MZ)({readOnly:!0})],j.prototype,"tileMatrixSet",null),(0,s._)([(0,y.MZ)({type:n.A.ofType(R),json:{read:{source:"tileMatrixSets"}}})],j.prototype,"tileMatrixSets",void 0),j=V=(0,s._)([(0,g.$)("esri.layers.support.WMTSSublayer")],j);const N=j;var k=r(73941),D=r(86738),W=r(22530),B=r(38458),K=r(13043),$=r(91806);const H=90.71428571428571;function J(e){const t=e.replaceAll(/ows:/gi,"");if(!G("Contents",(new DOMParser).parseFromString(t,"text/xml").documentElement))throw new a.A("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant",{text:e})}function q(e){return e.nodeType===Node.ELEMENT_NODE}function G(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(q(i)&&i.nodeName===e)return i}return null}function z(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];q(s)&&s.nodeName===e&&r.push(s)}return r}function Q(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];q(s)&&s.nodeName===e&&r.push(s)}return r.map((e=>e.textContent)).filter(o.Ru)}function X(e,t){return e.split(">").forEach((e=>{t&&(t=G(e,t))})),t&&t.textContent}function Y(e,t,r,i){let s;return Array.prototype.slice.call(i.childNodes).some((i=>{if(i.nodeName.includes(e)){const e=G(t,i),l=e?.textContent;if(l===r||r.split(":")&&r.split(":")[1]===l)return s=i,!0}return!1})),s}function ee(e,t,r,i,s){const l=X("Abstract",t),o=Q("Format",t);return{id:e,fullExtent:re(t),fullExtents:ie(t),description:l,formats:o,styles:se(t,i),title:X("Title",t),tileMatrixSets:le(s,t,r)}}function te(e,t){const r=[],i=e.layerMap?.get(t);if(!i)return null;const s=z("ResourceURL",i),l=z("Dimension",i);let o,n,a,c;return l.length&&(o=X("Identifier",l[0]),n=Q("Default",l[0])),l.length>1&&(a=X("Identifier",l[1]),c=Q("Default",l[1])),e.dimensionMap.set(t,{dimensions:n,dimensions2:c}),s.forEach((e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(o&&n.length)if(t.includes("{"+o+"}"))t=t.replace("{"+o+"}","{dimensionValue}");else{const e=t.toLowerCase().indexOf("{"+o.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue}"+t.slice(e+o.length+2))}if(a&&c.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue2}");else{const e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue2}"+t.slice(e+a.length+2))}r.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}})),r}function re(e){const t=G("WGS84BoundingBox",e),r=t?X("LowerCorner",t).split(" "):["-180","-90"],i=t?X("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(r[0]),ymin:parseFloat(r[1]),xmax:parseFloat(i[0]),ymax:parseFloat(i[1]),spatialReference:{wkid:4326}}}function ie(e){const t=[];return(0,K.p)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;const r=e.getAttribute("crs").toLowerCase(),i=oe(r),s=r.includes("epsg")&&(0,B.m)(i.wkid);let l,o,n,a;(0,K.p)(e,{LowerCorner:e=>{[l,o]=e.textContent.split(" ").map((e=>Number.parseFloat(e))),s&&([l,o]=[o,l])},UpperCorner:e=>{[n,a]=e.textContent.split(" ").map((e=>Number.parseFloat(e))),s&&([n,a]=[a,n])}}),t.push({xmin:l,ymin:o,xmax:n,ymax:a,spatialReference:i})}}),t}function se(e,t){return z("Style",e).map((e=>{const r=G("LegendURL",e),i=G("Keywords",e),s=i?Q("Keyword",i):[];let l=r?.getAttribute("xlink:href");return t&&(l=l?.replace(/^http:/i,"https:")),{abstract:X("Abstract",e),id:X("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:s,legendUrl:l,title:X("Title",e)}}))}function le(e,t,r){return z("TileMatrixSetLink",t).map((t=>function(e,t,r){const i=G("TileMatrixSet",t).textContent,s=Q("TileMatrix",t),l=r.find((e=>{const t=G("Identifier",e),r=t?.textContent;return!!(r===i||i.split(":")&&i.split(":")[1]===r)})),o=G("TileMatrixSetLimits",t),n=o&&z("TileMatrixLimits",o),a=new Map;if(n?.length)for(const e of n){const t=G("TileMatrix",e).textContent,r=+G("MinTileRow",e).textContent,i=+G("MaxTileRow",e).textContent,s=+G("MinTileCol",e).textContent,l=+G("MaxTileCol",e).textContent;a.set(t,{minCol:s,maxCol:l,minRow:r,maxRow:i})}const c=X("SupportedCRS",l).toLowerCase(),u=function(e,t){return ne(G("TileMatrix",e),t)}(l,c),p=u.spatialReference,d=G("TileMatrix",l),h=[parseInt(X("TileWidth",d),10),parseInt(X("TileHeight",d),10)],m=[];s.length?s.forEach(((e,t)=>{const r=Y("TileMatrix","Identifier",e,l);m.push(pe(r,c,t,i,a))})):z("TileMatrix",l).forEach(((e,t)=>{m.push(pe(e,c,t,i,a))}));const y=function(e,t,r,i,s){const l=G("BoundingBox",t);let o,n,a,c,u,p;if(l&&(o=X("LowerCorner",l).split(" "),n=X("UpperCorner",l).split(" ")),o&&o.length>1&&n&&n.length>1)a=parseFloat(o[0]),u=parseFloat(o[1]),c=parseFloat(n[0]),p=parseFloat(n[1]);else{const e=G("TileMatrix",t),l=parseInt(X("MatrixWidth",e),10),o=parseInt(X("MatrixHeight",e),10);a=r.x,p=r.y,c=a+l*i[0]*s.resolution,u=p-o*i[1]*s.resolution}return function(e,t,r){return"1.0.0"===e&&(0,B.m)(t.wkid)&&!(r.spatialReference.isGeographic&&r.x<-90&&r.y>=-90)}(e,r.spatialReference,r)?new x.A(u,a,p,c,r.spatialReference):new x.A(a,u,c,p,r.spatialReference)}(e,l,u,h,m[0]).toJSON(),f=new P.A({dpi:96,spatialReference:p,size:h,origin:u,lods:m}).toJSON();return{id:i,fullExtent:y,tileInfo:f}}(e,t,r)))}function oe(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);900913!==t&&3857!==t||(t=102100);const r=function(e){return e.includes("crs84")||e.includes("crs:84")?ae.CRS84:e.includes("crs83")||e.includes("crs:83")?ae.CRS83:e.includes("crs27")||e.includes("crs:27")?ae.CRS27:null}(e);return null!=r&&(t=r),{wkid:t}}function ne(e,t){const r=oe(t),[i,s]=X("TopLeftCorner",e).split(" ").map((e=>parseFloat(e))),l=t.includes("epsg")&&(0,B.m)(r.wkid);return new D.A(l?{x:s,y:i,spatialReference:r}:{x:i,y:s,spatialReference:r})}var ae,ce,ue;function pe(e,t,r,i,s){const l=oe(t),o=X("Identifier",e);let n=parseFloat(X("ScaleDenominator",e));const a=de(l.wkid,n,i);n*=96/H;const c=+X("MatrixWidth",e),u=+X("MatrixHeight",e),{maxCol:p=c-1,maxRow:d=u-1,minCol:h=0,minRow:m=0}=s.get(o)??{},{x:y,y:f}=ne(e,t);return new $.A({cols:[h,p],level:r,levelValue:o,origin:[y,f],scale:n,resolution:a,rows:[m,d]})}function de(e,t,r){let i;return i=W.A.hasOwnProperty(""+e)?W.A.values[W.A[e]]:"default028mm"===r?6370997*Math.PI/180:(0,k.y7)(e).metersPerDegree,7*t/25e3/i}(ce=ae||(ae={}))[ce.CRS84=4326]="CRS84",ce[ce.CRS83=4269]="CRS83",ce[ce.CRS27=4267]="CRS27";const he={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},me=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let ye=ue=class extends((0,S.dM)((0,T.J)((0,A.j)((0,I.q)((0,L.A)((0,u.P)(M.A))))))){constructor(...e){super(...e),this.activeLayer=null,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.fullExtent=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,h.wB)((()=>this.activeLayer),((e,t)=>{t&&!this.sublayers?.includes(t)&&(t.layer=null,t.parent=null),e&&(e.layer=this,e.parent=this)}),h.OH),(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.layer=this,e.parent=this}),h.OH),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=null,e.parent=null}),h.OH),(0,h.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=null,e.parent=null;if(e)for(const t of e)t.layer=this,t.parent=this}),h.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(d.QP).then((()=>this._fetchService(e))).catch((e=>{throw(0,d.QP)(e),new a.A("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})}))),Promise.resolve(this)}readActiveLayerFromService(e,t,r){this.activeLayer||(this.activeLayer=new N);let i=t.layers.find((e=>e.id===this.activeLayer.id));return i||(i=t.layers[0]),this.activeLayer.read(i,r),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){const{templateUrl:r,wmtsInfo:i}=t,s=r?this._getLowerCasedUrlParams(r):null,l=i?.layerIdentifier;let o=null;const n=i?.tileMatrixSet;n&&(Array.isArray(n)?n.length&&(o=n[0]):o=n);const a=s?.format,c=s?.style;return new N({id:l,imageFormat:a,styleId:c,tileMatrixSetId:o})}writeActiveLayer(e,t,r,i){const s=this.activeLayer;t.templateUrl=this.getUrlTemplate(s.id,s.tileMatrixSetId,s.imageFormat,s.styleId);const l=(0,p.wc)("tileMatrixSet.tileInfo",s);t.tileInfo=l?l.toJSON(i):null,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:s.id,tileMatrixSet:s.tileMatrixSetId}}readCustomParameters(e,t){const r=t.wmtsInfo;return r?this._mergeParams(r.customParameters,r.url):null}get fullExtents(){return this.activeLayer.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,r){return function(e,t){return e.map((e=>{const r=new N;return r.read(e,t),r}))}(t.layers,r)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets?.map((e=>e.tileInfo?.spatialReference)).toArray().filter(o.Ru)??[]}get tilemapCache(){const e=this.activeLayer?.tileMatrixSet?.tileInfo;return e?new C.A(e):void 0}get title(){return this.activeLayer?.title??"Layer"}set title(e){this._overrideIfSome("title",e)}get url(){return this._get("url")}set url(e){e&&e.endsWith("/")?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){const t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),r=this._getTileMatrixSetById(e.tileMatrixSetId),i=r?.tileInfo,s=e.fullExtent,l=new b.x({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(l.customLayerParameters=this.customLayerParameters),this.customParameters&&(l.customParameters=this.customParameters),new v.default({fullExtent:s,urlTemplate:t,tileInfo:i,wmtsInfo:l})}async fetchTile(e,t,r,i={}){const{signal:s}=i,o=this.getTileUrl(e,t,r),{data:n}=await(0,l.A)(o,{responseType:"image",signal:s});return n}async fetchImageBitmapTile(e,t,r,i={}){const{signal:s}=i;if(this.fetchTile!==ue.prototype.fetchTile){const l=await this.fetchTile(e,t,r,i);return(0,_.C)(l,e,t,r,s)}const o=this.getTileUrl(e,t,r),{data:n}=await(0,l.A)(o,{responseType:"blob",signal:s});return(0,_.C)(n,e,t,r,s)}findSublayerById(e){return this.sublayers?.find((t=>t.id===e))}getTileUrl(e,t,r){const i=this._getTileMatrixSetById(this.activeLayer.tileMatrixSetId),s=i?.tileInfo?.lods[e],l=s?s.levelValue||`${s.level}`:`${e}`;let o=this.resourceInfo?"":function(e,t,r,i,s,l,o,n){const a=function(e,t,r){const i=te(e,t),s=i?.filter((e=>e.format===r));return(s?.length?s:i)??[]}(e,t,i);if(!(a?.length>0))return"";const{dimensionMap:c}=e,u=c.get(t).dimensions?.[0],p=c.get(t).dimensions2?.[0];return a[o%a.length].template.replaceAll(/\{Style\}/gi,s??"").replaceAll(/\{TileMatrixSet\}/gi,r??"").replaceAll(/\{TileMatrix\}/gi,l).replaceAll(/\{TileRow\}/gi,""+o).replaceAll(/\{TileCol\}/gi,""+n).replaceAll(/\{dimensionValue\}/gi,u).replaceAll(/\{dimensionValue2\}/gi,p)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId,l,t,r);return o||(o=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId).replaceAll(/\{level\}/gi,l).replaceAll(/\{row\}/gi,`${t}`).replaceAll(/\{col\}/gi,`${r}`)),o=this._appendCustomLayerParameters(o),o}getUrlTemplate(e,t,r,i){if(!this.resourceInfo){const r=function(e,t,r,i){const{dimensionMap:s}=e,l=te(e,t);let o="";if(l&&l.length>0){const e=s.get(t).dimensions?.[0],n=s.get(t).dimensions2?.[0];o=l[0].template,o.endsWith(".xxx")&&(o=o.slice(0,-4)),o=o.replaceAll(/\{Style\}/gi,i),o=o.replaceAll(/\{TileMatrixSet\}/gi,r),o=o.replaceAll(/\{TileMatrix\}/gi,"{level}"),o=o.replaceAll(/\{TileRow\}/gi,"{row}"),o=o.replaceAll(/\{TileCol\}/gi,"{col}"),o=o.replaceAll(/\{dimensionValue\}/gi,e),o=o.replaceAll(/\{dimensionValue2\}/gi,n)}return o}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,i);if(r)return r}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+i+"&FORMAT="+r+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let s="";return he[r.toLowerCase()]&&(s=he[r.toLowerCase()]),this.url+e+"/"+i+"/"+t+"/{level}/{row}/{col}"+s}return""}async _fetchService(e){let t;if(this.resourceInfo)"KVP"===this.resourceInfo.serviceMode&&(this.url+=this.url.includes("?")?"":"?"),t={ssl:!1,data:this.resourceInfo};else try{t=await this._getCapabilities(this.serviceMode,e),J(t.data)}catch{const r="KVP"===this.serviceMode?"RESTful":"KVP";try{t=await this._getCapabilities(r,e),J(t.data),this.serviceMode=r}catch(e){throw new a.A("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}this.resourceInfo?t.data=function(e){return e.layers.forEach((e=>{e.tileMatrixSets?.forEach((e=>{const t=e.tileInfo;t&&96!==t.dpi&&(t.lods?.forEach((r=>{r.scale=96*r.scale/t.dpi,r.resolution=de(t.spatialReference?.wkid,r.scale*H/96,e.id)})),t.dpi=96)}))})),e}(t.data):t.data=function(e,t){e=e.replaceAll(/ows:/gi,"");const r=(new DOMParser).parseFromString(e,"text/xml").documentElement,i=new Map,s=new Map,l=G("Contents",r);if(!l)throw new a.A("wmtslayer:wmts-capabilities-xml-is-not-valid");const o=G("OperationsMetadata",r),n=o?.querySelector("[name='GetTile']"),c=n?.getElementsByTagName("Get"),u=c&&Array.prototype.slice.call(c),p=t.url?.indexOf("https"),d=void 0!==p&&p>-1;let h,m,y=t.serviceMode,f=t?.url;if(u?.length&&u.some((e=>{const t=G("Constraint",e);return!t||Y("AllowedValues","Value",y,t)?(f=e.attributes[0].nodeValue,!0):(!t||Y("AllowedValues","Value","RESTful",t)||Y("AllowedValues","Value","REST",t)?m=e.attributes[0].nodeValue:t&&!Y("AllowedValues","Value","KVP",t)||(h=e.attributes[0].nodeValue),!1)})),!f)if(m)f=m,y="RESTful";else if(h)f=h,y="KVP";else{const e=G("ServiceMetadataURL",r);f=e?.getAttribute("xlink:href")}const g=f.indexOf("1.0.0/");-1===g&&"RESTful"===y?f+="/":g>-1&&(f=f.slice(0,g)),"KVP"===y&&(f+=g>-1?"":"?"),d&&(f=f.replace(/^http:/i,"https:"));const w=X("ServiceIdentification>ServiceTypeVersion",r),x=X("ServiceIdentification>AccessConstraints",r),M=x&&/^none$/i.test(x)?null:x,v=z("Layer",l),S=z("TileMatrixSet",l),I=v.map((e=>{const t=X("Identifier",e);return i.set(t,e),ee(t,e,S,d,w)}));return{copyright:M,dimensionMap:s,layerMap:i,layers:I,serviceMode:y,tileUrl:f}}(t.data,{serviceMode:this.serviceMode,url:this.url}),t.data&&this.read(t.data,{origin:"service"})}async _getCapabilities(e,t){const r=this._getCapabilitiesUrl(e);return await(0,l.A)(r,{...t,responseType:"text"})}_getTileMatrixSetById(e){const t=this.findSublayerById(this.activeLayer.id),r=t?.tileMatrixSets?.find((t=>t.id===e));return r}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,c.o8)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){const r=(0,m.An)(e),i={...r.query,...t},s=(0,m.x0)(i);return""===s?r.path:`${r.path}?${s}`}_getCapabilitiesUrl(e){this.url=(0,m.An)(this.url).path;let t=this.url;switch(e){case"KVP":t+=`?request=GetCapabilities&service=WMTS&version=${this.version}`;break;case"RESTful":{const e=`/${this.version}/WMTSCapabilities.xml`,r=new RegExp(e,"i");t=t.replace(r,""),t+=e;break}}return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;const t=(0,m.An)(e).query;if(!t)return null;const r={};return Object.keys(t).forEach((e=>{r[e.toLowerCase()]=t[e]})),r}_mergeParams(e,t){const r=this._getLowerCasedUrlParams(t);if(r){const t=Object.keys(r);t.length&&(e=e?(0,c.o8)(e):{},t.forEach((t=>{e.hasOwnProperty(t)||me.has(t)||(e[t]=r[t])})))}return e}};(0,s._)([(0,y.MZ)()],ye.prototype,"dimensionMap",void 0),(0,s._)([(0,y.MZ)()],ye.prototype,"layerMap",void 0),(0,s._)([(0,y.MZ)({type:N,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],ye.prototype,"activeLayer",void 0),(0,s._)([(0,f.w)("service","activeLayer",["layers"])],ye.prototype,"readActiveLayerFromService",null),(0,s._)([(0,f.w)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],ye.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,s._)([(0,w.K)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:P.A},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],ye.prototype,"writeActiveLayer",null),(0,s._)([(0,y.MZ)({type:String,value:"",json:{write:!0}})],ye.prototype,"copyright",void 0),(0,s._)([(0,y.MZ)({type:["show","hide"]})],ye.prototype,"listMode",void 0),(0,s._)([(0,y.MZ)({json:{read:!0,write:!0}})],ye.prototype,"blendMode",void 0),(0,s._)([(0,y.MZ)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],ye.prototype,"customParameters",void 0),(0,s._)([(0,f.w)(["portal-item","web-document"],"customParameters")],ye.prototype,"readCustomParameters",null),(0,s._)([(0,y.MZ)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],ye.prototype,"customLayerParameters",void 0),(0,s._)([(0,y.MZ)({type:x.A,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],ye.prototype,"fullExtent",void 0),(0,s._)([(0,y.MZ)({readOnly:!0})],ye.prototype,"fullExtents",null),(0,s._)([(0,y.MZ)({type:["WebTiledLayer"]})],ye.prototype,"operationalLayerType",void 0),(0,s._)([(0,y.MZ)()],ye.prototype,"resourceInfo",void 0),(0,s._)([(0,y.MZ)()],ye.prototype,"serviceMode",void 0),(0,s._)([(0,f.w)(["portal-item","web-document"],"serviceMode",["templateUrl"])],ye.prototype,"readServiceMode",null),(0,s._)([(0,y.MZ)({type:n.A.ofType(N)})],ye.prototype,"sublayers",void 0),(0,s._)([(0,f.w)("service","sublayers",["layers"])],ye.prototype,"readSublayersFromService",null),(0,s._)([(0,y.MZ)({readOnly:!0})],ye.prototype,"supportedSpatialReferences",null),(0,s._)([(0,y.MZ)({readOnly:!0})],ye.prototype,"tilemapCache",null),(0,s._)([(0,y.MZ)({json:{read:{source:"title"}}})],ye.prototype,"title",null),(0,s._)([(0,y.MZ)({json:{read:!1},readOnly:!0,value:"wmts"})],ye.prototype,"type",void 0),(0,s._)([(0,y.MZ)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],ye.prototype,"url",null),(0,s._)([(0,y.MZ)()],ye.prototype,"version",void 0),ye=ue=(0,s._)([(0,g.$)("esri.layers.WMTSLayer")],ye);const fe=ye},38458:(e,t,r)=>{r.d(t,{m:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return null!=e&&i.some((([t,r])=>e>=t&&e<=r))}},65509:(e,t,r)=>{r.d(t,{A:()=>l});var i=r(49186),s=r(74887);class l{constructor(e,t=0,r=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=r,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(r)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,r){const i=this.tileInfo?.lodAt(e);return!i||e<this.minLOD||e>this.maxLOD?"unavailable":i.cols&&i.rows?r>=i.cols[0]&&r<=i.cols[1]&&t>=i.rows[0]&&t<=i.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,r,l){await(0,s.NO)(l);const o=this.getAvailability(e,t,r);if("unavailable"===o)throw new i.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:r});return o}async fetchAvailabilityUpsample(e,t,r,i,l){await(0,s.NO)(l),i.level=e,i.row=t,i.col=r;const o=this.tileInfo;return o.updateTileInfo(i),this.fetchAvailability(e,t,r,l).catch((e=>{if((0,s.zf)(e))throw e;if(o.upsampleTile(i))return this.fetchAvailabilityUpsample(i.level,i.row,i.col,i,l);throw e}))}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2741],{926:(e,r,t)=>{t.d(r,{Jn:()=>i});var s=t(92602),n=t(84952);const o=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]);function a(e){const r=(0,n.$z)(e,!0);return!!r&&r.endsWith(".arcgis.com")&&!o.has(r)&&!e.endsWith("/sharing/rest/generateToken")}function i(e,r){return!(!r&&!s.A.apiKey||!a(e))}},2741:(e,r,t)=>{t.d(r,{s:()=>i});var s=t(92602),n=(t(78888),t(49186)),o=t(53966),a=t(84952);function i(e){if(!s.A.assetsPath)throw o.A.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.A("assets:path-not-set","config.assetsPath is not set");return(0,a.fj)(s.A.assetsPath,e)}},56058:(e,r,t)=>{t.d(r,{Sx:()=>i,c8:()=>d,m3:()=>f,ql:()=>u,tz:()=>p,xW:()=>h});var s=t(92602),n=t(44208),o=t(74887),a=t(84952);function i(e,r,t=!1,s){return new Promise(((a,i)=>{if((0,o.G4)(s))return void i(l());let c=()=>{p(),i(new Error(`Unable to load ${r}`))},u=()=>{const r=e;p(),a(r)},d=()=>{if(!e)return;const r=e;p(),r.src="",i(l())};const p=()=>{(0,n.A)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",u)),c=null,u=null,e=null,null!=s&&s.removeEventListener("abort",d),d=null,t&&URL.revokeObjectURL(r)};null!=s&&s.addEventListener("abort",d),(0,n.A)("esri-image-decode")?e.decode().then(u,c):(e.addEventListener("error",c),e.addEventListener("load",u))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const c="Timeout exceeded";function u(){return new Error(c)}function d(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===c}function p(e){s.A.request.crossOriginNoCorsDomains||(s.A.request.crossOriginNoCorsDomains={});const r=s.A.request.crossOriginNoCorsDomains;for(let t of e)t=t.toLowerCase(),/^https?:\/\//.test(t)?r[(0,a.$z)(t)??""]=0:(r[(0,a.$z)("http://"+t)??""]=0,r[(0,a.$z)("https://"+t)??""]=0)}function h(e){const r=s.A.request.crossOriginNoCorsDomains;if(r){let t=(0,a.$z)(e);if(t)return t=t.toLowerCase(),!(0,a.FX)(t,(0,a.Xq)())&&r[t]<Date.now()-36e5}return!1}async function f(e){const r=(0,a.An)(e);e=r.path,"json"===r.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}const t=s.A.request.crossOriginNoCorsDomains,n=(0,a.$z)(e);t&&n&&(t[n.toLowerCase()]=Date.now())}},60694:(e,r,t)=>{t.d(r,{Fi:()=>u,HZ:()=>g,Jf:()=>w,LS:()=>y,Wo:()=>m,bd:()=>v,cr:()=>h,iz:()=>p,qg:()=>d,yG:()=>f});var s=t(84952),n=t(97159);const o={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},a=Object.values(o),i=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function u(e){return i.test(e)}function d(e){if(null==e)return null;const r=(0,s.An)(e),t=r?.path.match(i)||r?.path.match(l);if(!t)return null;const[,n,a,c,u]=t,d=a.indexOf("/");return{title:h(-1!==d?a.slice(d+1):a),serverType:o[c.toLowerCase()],sublayer:null!=u&&""!==u?parseInt(u,10):null,url:{path:n}}}function p(e){const r=(0,s.An)(e).path.match(c);return r?{serviceUrl:r[1],sublayerId:Number(r[2])}:null}function h(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function f(e,r){const t=[];if(e){const r=d(e);null!=r&&r.title&&t.push(r.title)}if(r){const e=h(r);t.push(e)}if(2===t.length){if(t[0].toLowerCase().includes(t[1].toLowerCase()))return t[0];if(t[1].toLowerCase().includes(t[0].toLowerCase()))return t[1]}return t.join(" - ")}function m(e){let r=(0,s.$z)(e,!0);return!!r&&(r=r.toLowerCase(),r.endsWith(".arcgis.com")&&(r.startsWith("services")||r.startsWith("tiles")||r.startsWith("features")))}function w(e,r){return e?(0,s.UC)((0,s.zi)(e,r)):e}function g(e){let{url:r}=e;if(!r)return{url:r};r=(0,s.zi)(r,e.logger);const t=(0,s.An)(r),n=d(t.path);let o;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(o=n.sublayer),r=n.url.path;else if(e.nonStandardUrlAllowed){const e=p(t.path);null!=e&&(r=e.serviceUrl,o=e.sublayerId)}return{url:(0,s.UC)(r),layerId:o}}function y(e,r,t,o,a){(0,n.w)(r,o,"url",a),o.url&&null!=e.layerId&&(o.url=(0,s.fj)(o.url,t,e.layerId.toString()))}function v(e){if(!e)return!1;const r=e.toLowerCase(),t=r.includes("/services/"),s=r.includes("/mapserver/wmsserver"),n=r.includes("/imageserver/wmsserver"),o=r.includes("/wmsserver");return t&&(s||n||o)}},78888:(e,r,t)=>{t.d(r,{A:()=>m});var s=t(92602),n=t(70333),o=t(49186),a=t(44208),i=t(4718),l=t(91869),c=t(74887),u=t(84952),d=t(60694),p=t(39131),h=t(926),f=t(56058);async function m(e,r){e instanceof URL&&(e=e.toString()),r?.query instanceof URLSearchParams&&(r.query=(0,u.zf)(r.query.toString().replaceAll("+"," ")));const s=(0,u.DB)(e),n=(0,u.w8)(e);n||s||(e=(0,u.S8)(e));const o={url:e,requestOptions:{...r}},i=e=>({data:e,getAllHeaders:S,getHeader:S,httpStatus:200,requestOptions:o.requestOptions,url:o.url}),p=(0,u.sC)(e,g.internalInterceptors);if(p){const e=await L(p,o);if(null!=e)return i(e)}let h=(0,u.sC)(e);if(h){const e=await L(h,o);if(null!=e)return i(e);h.after||h.error||(h=null)}if(e=o.url,"image"===(r=o.requestOptions).responseType&&((0,a.A)("host-webworker")||(0,a.A)("host-node")))throw x("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),o);if("head"===r.method){if(r.body)throw x("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),o);if(s||n)throw x("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),o)}if(await async function(){(0,a.A)("host-webworker")&&!w&&(w=await t.e(369).then(t.bind(t,40369)))}(),w)return w.execute(e,r);const f=new AbortController,m=(0,c.u7)(r,(()=>f.abort())),y={controller:f,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:h,params:o,redoRequest:!1,useIdentity:g.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},v=r.useRequestQueue?async function(e){const r=function(e){let r,t;return"string"==typeof e?(r=(0,u.$z)(e,!0),t=(0,d.Wo)(e)):(r=e.origin,t=(0,d.Wo)(e.toString())),null==r?null:{origin:r,isHosted:t}}(e.params.url);if(!r)return P(e);const{QueueProcessor:s}=await t.e(563).then(t.bind(t,563)),n=(0,l.tE)(U,r.origin,(()=>{const e=r.isHosted?(0,a.A)("request-queue-concurrency-hosted"):(0,a.A)("request-queue-concurrency-non-hosted");return new s({concurrency:e,process:e=>{if((0,c.G4)(e.params.requestOptions))throw x("",(0,c.NK)("Request canceled"),e.params);return P(e)}})}));return n.push(e)}(y):P(y),b=await v.finally((()=>m?.remove()));return h?.after?.(b),b}let w;const g=s.A.request,y="FormData"in globalThis,v=new Set([499,498,403,401]),b=new Set(["COM_0056","COM_0057","SB_0008"]),q=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],S=()=>null,C=Symbol();function O(e){const r=(0,u.$z)(e);return!r||r.endsWith(".arcgis.com")||m._corsServers.includes(r)||(0,u.FL)(r)}function x(e,r,t,s){let n="Error";const a={url:t.url,requestOptions:t.requestOptions,getAllHeaders:S,getHeader:S,ssl:!1};if(r instanceof o.A)return r.details?(r.details=(0,i.o8)(r.details),r.details.url=t.url,r.details.requestOptions=t.requestOptions):r.details=a,r;if(r){const e=s&&(()=>Array.from(s.headers)),t=s&&(e=>s.headers.get(e)),o=s?.status,i=r.message;i&&(n=i),e&&t&&(a.getAllHeaders=e,a.getHeader=t),a.httpStatus=(null!=r.httpCode?r.httpCode:r.code)||o||0,a.subCode=r.subcode,a.messageCode=r.messageCode,"string"==typeof r.details?a.messages=[r.details]:a.messages=r.details,a.raw=C in r?r[C]:r}return(0,c.zf)(r)?(0,c.NK)():new o.A(e,n,a)}async function A(){n.id||await Promise.all([t.e(6285),t.e(7292),t.e(7112)]).then(t.bind(t,67112))}function T(e){return q.some((r=>r.test(e)))}async function k(e){let r=e.params.url;const t=e.params.requestOptions,s=e.fetchOptions??{},o=(0,u.w8)(r)||(0,u.DB)(r),i=t.responseType||"json",l=o?0:null!=t.timeout?t.timeout:g.timeout;let d=!1;if(!o){e.useSSL&&(r=(0,u.lM)(r));let o={...t.query};e.credentialToken&&(o.token=e.credentialToken);let i=(0,u.x0)(o);(0,a.A)("esri-url-encodes-apostrophe")&&(i=i.replaceAll("'","%27"));const l=r.length+1+i.length;let c;d="delete"===t.method||"post"===t.method||"put"===t.method||!!t.body||l>g.maxUrlLength;const h=t.useProxy||!!(0,u.zs)(r);if(h){const e=(0,u.s_)(r);c=e.path,!d&&c.length+1+l>g.maxUrlLength&&(d=!0),e.query&&(o={...e.query,...o})}if("HEAD"===s.method&&(d||h)){if(d){if(l>g.maxUrlLength)throw x("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw x("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(h)throw x("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(d?(s.method="delete"===t.method?"DELETE":"put"===t.method?"PUT":"POST",t.body?r=(0,u.a6)(r,o):(s.body=(0,u.x0)(o),s.headers||(s.headers={}),s.headers["Content-Type"]="application/x-www-form-urlencoded")):r=(0,u.a6)(r,o),h&&(e.useProxy=!0,r=`${c}?${r}`),o.token&&y&&s.body instanceof FormData&&!(0,p.$E)(r)&&s.body.set("token",o.token),t.hasOwnProperty("withCredentials"))e.withCredentials=t.withCredentials;else if(!(0,u.FX)(r,(0,u.Xq)()))if((0,u.FL)(r))e.withCredentials=!0;else if(n.id){const t=n.id.findServerInfo(r);t?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(s.credentials="include",(0,f.xW)(r)&&await(0,f.m3)(d?(0,u.a6)(r,o):r))}let h,w,v=0,b=!1;l>0&&(v=setTimeout((()=>{b=!0,e.controller.abort()}),l));try{if("native-request-init"===t.responseType)w=s,w.url=r,t.signal?w.signal=t.signal:delete w.signal;else if("image"!==t.responseType||"default"!==s.cache||"GET"!==s.method||d||function(e){if(e)for(const r of Object.getOwnPropertyNames(e))if(e[r])return!0;return!1}(t.headers)||!o&&!e.useProxy&&g.proxyUrl&&!O(r)){if(m._beforeFetch&&await m._beforeFetch(r,s),h=await fetch(r,s),m._afterFetch&&await m._afterFetch(h),e.useProxy||function(e){const r=(0,u.$z)(e);r&&!m._corsServers.includes(r)&&m._corsServers.push(r)}(r),"native"===t.responseType)w=h;else if("HEAD"!==s.method)if(h.ok){switch(i){case"array-buffer":w=await h.arrayBuffer();break;case"blob":case"image":w=await h.blob();break;default:w=await h.text()}if(v&&(clearTimeout(v),v=0),"json"===i||"xml"===i||"document"===i)if(w)switch(i){case"json":w=JSON.parse(w);break;case"xml":w=E(w,"application/xml");break;case"document":w=E(w,"text/html")}else w=null;if(w){if("array-buffer"===i||"blob"===i){const e=h.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&w["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(w).json();e.error&&(w=e)}catch{}}"image"===i&&w instanceof Blob&&(w=await R(URL.createObjectURL(w),e,!0))}}else{w=await h.text();try{w=JSON.parse(w)}catch{}}}else w=await R(r,e)}catch(s){if("AbortError"===s.name){if(b)throw(0,f.ql)();throw(0,c.NK)("Request canceled")}if(!(!h&&s instanceof TypeError&&g.proxyUrl)||t.body||"delete"===t.method||"head"===t.method||"post"===t.method||"put"===t.method||e.useProxy||O(r))throw s;e.redoRequest=!0,(0,u.oy)({proxyUrl:g.proxyUrl,urlPrefix:(0,u.$z)(r)??""})}finally{v&&clearTimeout(v)}return[h,w]}async function L(e,r){if(null!=e.responseData)return e.responseData;if(e.headers&&(r.requestOptions.headers={...r.requestOptions.headers,...e.headers}),e.query&&(r.requestOptions.query={...r.requestOptions.query,...e.query}),e.before){let t,s;try{s=await e.before(r)}catch(e){t=x("request:interceptor",e,r)}if((s instanceof Error||s instanceof o.A)&&(t=x("request:interceptor",s,r)),t)throw e.error&&e.error(t),t;return s}}function E(e,r){let t;try{t=(new DOMParser).parseFromString(e,r)}catch{}if(!t||t.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return t}m._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"],m._beforeFetch=void 0,m._afterFetch=void 0;const U=new Map;async function P(e){let r,t;await async function(e){const r=e.params.url,t=e.params.requestOptions,o=e.controller.signal,a=t.body;let i=null,l=null;if(y&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(i=new FormData(a))),"string"==typeof a&&(l=a),e.fetchOptions={cache:t.cacheBust?"no-cache":"default",credentials:"same-origin",headers:t.headers||{},method:"head"===t.method?"HEAD":"GET",mode:"cors",priority:g.priority,redirect:"follow",signal:o},(i||l)&&(e.fetchOptions.body=i||l),"anonymous"===t.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(r)||t.query?.token||i?.get("token")),!e.hasToken&&(0,h.Jn)(r)&&(t.query||(t.query={}),t.query.token=s.A.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!T(r)&&!(0,c.G4)(o)){let s;"immediate"===t.authMode?(await A(),s=await n.id.getCredential(r,{signal:o}),e.credential=s):"no-prompt"===t.authMode?(await A(),s=await n.id.getCredential(r,{prompt:!1,signal:o}).catch((()=>{})),e.credential=s):n.id&&(s=n.id.findCredential(r)),s&&(e.credentialToken=s.token,e.useSSL=!!s.ssl)}}(e);try{do{[r,t]=await k(e)}while(!await I(e,r,t))}catch(t){const s=x("request:server",t,e.params,r);throw s.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(s),s}const o=e.params.url;if(t&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)){if(!e.hasToken&&!e.credentialToken&&t.user?.username&&!(0,u.FL)(o)){const e=(0,u.$z)(o,!0);e&&g.trustedServers.push(e)}Array.isArray(t.authorizedCrossOriginNoCorsDomains)&&(0,f.tz)(t.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&n.id){const e=n.id.findServerInfo(a.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=n.id.findCredential(r,a.userId);e&&-1===n.id._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:t,getAllHeaders:r?()=>Array.from(r.headers):S,getHeader:r?e=>r.headers.get(e):S,httpStatus:r?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function I(e,r,t){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!r||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let o,a;if(t&&(t.error&&"object"==typeof t.error?o=t.error:"error"===t.status&&Array.isArray(t.messages)&&(o={...t},o[C]=t,o.details=t.messages)),!o&&!r.ok)throw o=new Error(`Unable to load ${r.url} status: ${r.status}`),o[C]=t,o;let i,l=null;o&&(a=Number(o.code),l=o.hasOwnProperty("subcode")?Number(o.subcode):null,i=o.messageCode,i=i?.toUpperCase());const c=s.authMode;if(403===a&&(4===l||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&v.has(a)&&!T(e.params.url)&&(403!==a||(!i||!b.has(i))&&(null==l||2===l&&e.credentialToken))){await A();try{const r=await n.id.getCredential(e.params.url,{error:x("request:server",o,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(r){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;o=r}}if(o)throw o;return!0}function R(e,r,t=!1){const s=r.controller.signal,n=new Image;return r.withCredentials?n.crossOrigin="use-credentials":n.crossOrigin="anonymous",n.alt="",n.fetchPriority=g.priority,n.src=e,(0,f.Sx)(n,e,t,s)}},97159:(e,r,t)=>{t.d(r,{M:()=>y,a:()=>w,b:()=>b,e:()=>f,f:()=>a,i:()=>p,p:()=>h,r:()=>l,t:()=>i,w:()=>c});var s=t(70333),n=t(84952),o=t(39131);function a(e,r){const t=r?.url?.path;if(e&&t&&(e=(0,n.s2)(e,t,{preserveProtocolRelative:!0}),r.portalItem&&r.readResourcePaths)){const t=(0,n.V1)(e,r.portalItem.itemUrl);null!=t&&d.test(t)&&r.readResourcePaths.push(r.portalItem.resourceFromPath(t).path)}return(e=m(e,r?.portal))&&u.test(e)?w(e):e}function i(e,r,t=y.YES){if(null==(e=e&&u.test(e)?g(e):e))return e;!(0,n.oP)(e)&&r?.blockedRelativeUrls&&r.blockedRelativeUrls.push(e);let s=(0,n.s2)(e);if(r){const t=r.verifyItemRelativeUrls?.rootPath||r.url?.path;if(t){const o=m(t,r.portal),a=m(s,r.portal);s=(0,n.V1)(a,o,o),null!=s&&s!==a&&s!==e&&r.verifyItemRelativeUrls&&r.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=f(s,r?.portal),(0,n.oP)(s)&&(s=(0,n.S8)(s)),r?.resources&&r?.portalItem&&!(0,n.oP)(s)&&!(0,n.DB)(s)&&t===y.YES&&r.resources.toKeep.push({resource:r.portalItem.resourceFromPath(s),compress:!1}),s}function l(e,r,t){return a(e,t)}function c(e,r,t,s){const n=i(e,s);void 0!==n&&(r[t]=n)}const u=/\/items\/([^/]+)\/resources\/(.*)/,d=/^\.\/resources\//;function p(e){const r=e?.match(u)??null;return r?.[1]??null}function h(e){const r=e?.match(u)??null;if(null==r)return null;const t=r[2],s=t.lastIndexOf("/");if(-1===s){const{path:e,extension:r}=(0,n.xw)(t);return{prefix:null,filename:e,extension:r}}const{path:o,extension:a}=(0,n.xw)(t.slice(s+1));return{prefix:t.slice(0,s),filename:o,extension:a}}function f(e,r){return r&&!r.isPortal&&r.urlKey&&r.customBaseUrl?(0,n.T1)(e,`${r.urlKey}.${r.customBaseUrl}`,r.portalHostname):e}function m(e,r){if(!r||r.isPortal||!r.urlKey||!r.customBaseUrl)return e;const t=`${r.urlKey}.${r.customBaseUrl}`,s=(0,n.Xq)();return(0,n.FX)(s,`${s.scheme}://${t}`)?(0,n.T1)(e,r.portalHostname,t):(0,n.T1)(e,t,r.portalHostname)}function w(e){if(!e)return e||null;let r=e;return r&&s.id&&!s.id.findCredential(r)&&(r=(0,o.qG)(r),r=r.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),r=r.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),r=r.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),r}function g(e){if(!e)return e||null;let r=e;return r=r.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),r=r.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),r=r.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),r&&s.id&&!s.id.findCredential(r)&&(r=(0,o.qG)(r)),r}var y,v;(v=y||(y={}))[v.YES=0]="YES",v[v.NO=1]="NO";const b=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return y},ensureMainOnlineDomain:f,fromCDNUrl:g,fromJSON:a,itemIdFromResourceUrl:p,prefixAndFilenameFromResourceUrl:h,read:l,toCDNUrl:w,toJSON:i,write:c},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[272],{18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),s=i(53966),n=i(10107),a=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,r._)([(0,n.MZ)()],t.prototype,"title",null),(0,r._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,a.$)("esri.layers.mixins.ArcGISService")],t),t}},33446:(e,t,i)=>{i.d(t,{C:()=>a,m:()=>n});var r=i(49186),s=i(74887);async function n(e,t,i){let n;try{n=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(i),n}async function a(e,t,i,n,a){let o;try{o=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load tile ${t}/${i}/${n}`,{error:e,level:t,row:i,col:n})}return(0,s.Te)(a),o}},56551:(e,t,i)=>{i.d(t,{H:()=>d});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608)),a=i(69540),o=i(25482),l=i(56507),u=i(93223),p=i(94359);let c=class extends(a.A.ClonableMixin(o.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,r._)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"name",void 0),(0,r._)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],c.prototype,"method",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"value",void 0),(0,r._)([(0,s.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],c.prototype,"bandIds",void 0),(0,r._)([(0,s.MZ)({types:p.uy,json:{write:!0,origins:{"web-scene":{types:p.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],c.prototype,"renderer",void 0),c=(0,r._)([(0,n.$)("esri.renderers.support.RasterPresetRenderer")],c);const m=c,d=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,r._)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,r._)([(0,s.MZ)({type:[m],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,r._)([(0,n.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},58434:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Zi});var r=i(90237),s=i(13874),n=i(69540),a=i(49186),o=i(92071),l=i(74887),u=i(10107),p=(i(44208),i(53966)),c=(i(87811),i(40608)),m=i(43937),d=i(4146),y=i(52106),h=i(78888),f=i(51447),g=i(4718),w=i(36708),v=i(84952),R=i(56507),_=i(36005),b=i(5443),S=i(39829),M=i(16930),A=i(21325),x=i(10873),I=i(45617),F=i(25482),D=i(22796),T=i(16019);const P={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var j=i(67369),N=i(70274),Z=i(48940);const C=new Set(["u1","u2","u4","u8","s8","u16","s16"]),O={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},V=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function q(e){return V.has(e.type)}function E(e,t){if(!e||!t)return(0,g.o8)(e||t);const i=(0,g.o8)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),J(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(L(i.functionArguments).Raster=t);return i}function J(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&J(e[i].arguments,t))}function G(e){const t=(0,g.o8)(P[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=G(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=k(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function L(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?L(t.functionArguments):e}const $={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function z(e,t){const i=C.has(t)?(0,T.hP)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function U(e){if(null==e)return;const{fields:t}=e,i=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return i?.name}function B(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find((e=>"fill"===e.type))?.material?.color:e.symbol?.color}function k(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,j.vL)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var Q=i(85675),H=i(13868);let K=class extends F.A{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return this.requestRawData||"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new Q.A({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");this.requestRawData||(t=this._addResampleRasterFunction(t));const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=function(e,t){return E(new D.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,s)),this.requestRawData||!r||i||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&q(r)?E(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new D.A;r.functionName="Stretch";const s=$[N.u.toJSON(e.stretchType)],n="u8",a=e.customStatistics?.map((e=>[e.min,e.max,e.avg??0,e.stddev??1])),o={StretchType:s,Statistics:a,DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),s===$.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===$.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=n):s===$.minMax?r.outputPixelType=n:s===$.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new D.A;if(i)n.functionArguments={ColorRamp:(0,j.hf)(s)};else{const i=(0,j.hs)(s,!0);if(i)n.functionArguments={colorRampName:i};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,j.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new D.A({rasterFunctionDefinition:G(n)}):n}return i?new D.A({rasterFunctionDefinition:G(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],a=1e-4,{pixelType:o,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=U(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,i)=>{const r=t.symbol?.color;let s;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((a=>{null!=t.minValue&&null!=t.maxValue&&(s=a.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([a.attributes[p],r.r,r.g,r.b]))}))}));const i=o?z(n,o):n,r=new D.A;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new D.A({rasterFunctionDefinition:G(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const o=e.symbol&&e.symbol.color;o?.a?(0===t?i.push(e.minValue,e.maxValue+a):i.push(e.minValue+a,e.maxValue+a),r.push(t),n.push([t,o.r,o.g,o.b])):s.push(e.minValue,e.maxValue)}));const c=o?z(n,o):n,m=new D.A;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const d=new D.A;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new D.A({rasterFunctionDefinition:G(d)}):d}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,a=U(s),o=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(a){const t=new Map;l.forEach((e=>{const i=e.value,r=B(e);null!=i&&r?.a&&t.set(String(i),r.toRgb())}));const r=e.field;r&&n.forEach((({attributes:e})=>{const s=String(e[r]),n=e[a],l=t.get(s);l?i.push([n,...l]):o&&i.push([n,...o])}))}}else for(let e=0;e<l.length;e++){const t=l[e],r=B(t),s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r?z(i,r):i,p=new D.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new D.A({rasterFunctionDefinition:G(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,s=r?z(i,r):i,n=new D.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new D.A({rasterFunctionDefinition:G(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new D.A;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:s}=t,n="vector-uv"===r;let a,o;if(s&&2===s.length){const e=s.map((e=>e.toLowerCase()));a=e.indexOf("magnitude"),o=e.indexOf("direction")}-1!==a&&null!==a||(a=0,o=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new Z.A,c={magnitudeBandID:a,directionBandID:o,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:O[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const m=G(i);return t.convertToRFT?D.A.fromJSON({rasterFunctionDefinition:m}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new D.A;const r=new D.A;r.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,a={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(a.Azimuth=e.azimuth,a.Altitude=e.altitude),3===n&&(a.PSPower=e.pixelSizePower,a.PSZFactor=e.pixelSizeFactor),r.functionArguments=a,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?a.ColorRamp=(0,j.hf)(e.colorRamp):a.Colormap=(0,j.R8)(e.colorRamp)),i?new D.A({rasterFunctionDefinition:G(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new D.A({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new D.A({rasterFunctionDefinition:G(r)}):r,E(r,e)}};(0,r._)([(0,u.MZ)()],K.prototype,"layer",void 0),(0,r._)([(0,u.MZ)()],K.prototype,"requestRawData",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"adjustAspectRatio",null),(0,r._)([(0,m.K)("adjustAspectRatio")],K.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"bandIds",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"compression",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"compressionQuality",null),(0,r._)([(0,m.K)("compressionQuality")],K.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"compressionTolerance",null),(0,r._)([(0,m.K)("compressionTolerance")],K.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"format",null),(0,r._)([(0,u.MZ)({type:String,json:{read:{reader:H.SZ.read},write:{writer:H.SZ.write}}})],K.prototype,"interpolation",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"noData",null),(0,r._)([(0,u.MZ)({type:String,json:{read:{reader:H.hm.read},write:{writer:H.hm.write}}})],K.prototype,"noDataInterpretation",null),(0,r._)([(0,u.MZ)({type:H.e8.apiValues,json:{read:H.e8.read,write:H.e8.write}})],K.prototype,"pixelType",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"lercVersion",void 0),(0,r._)([(0,m.K)("lercVersion")],K.prototype,"writeLercVersion",null),(0,r._)([(0,u.MZ)({type:Number})],K.prototype,"version",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],K.prototype,"mosaicRule",null),(0,r._)([(0,u.MZ)({json:{write:!0,name:"renderingRule"}})],K.prototype,"rasterFunction",null),K=(0,r._)([(0,c.$)("esri.layers.support.ExportImageServiceParameters")],K);var W=i(20437),X=i(95466),Y=i(33446),ee=i(43577),te=i(14140),ie=i(74797),re=i(87186),se=i(77301),ne=i(51244),ae=i(14636),oe=i(12711),le=i(85676),ue=i(94359),pe=i(65864),ce=i(17136),me=i(2272),de=i(86738);let ye=class extends(n.A.ClonableMixin(F.A)){constructor(){super(...arguments),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,r._)([(0,u.MZ)({type:de.A,json:{read:!0}})],ye.prototype,"fromGeometry",void 0),(0,r._)([(0,u.MZ)({type:de.A,json:{read:!0,write:!0}})],ye.prototype,"toGeometry",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],ye.prototype,"objectIds",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],ye.prototype,"where",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],ye.prototype,"maxCount",void 0),ye=(0,r._)([(0,c.$)("esri.rest.support.FindImagesParameters")],ye);const he=ye,fe=e=>{let t=class extends e{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"make",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"model",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"focalLength",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"pixelSize",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"rows",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"cols",void 0),t=(0,r._)([(0,c.$)("esri.rest.support.CameraInfoMixin")],t),t};let ge=class extends(fe(F.A)){constructor(){super(...arguments),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,r._)([(0,u.MZ)({json:{write:!0}})],ge.prototype,"id",void 0),(0,r._)([(0,u.MZ)({json:{name:"uri",write:!0}})],ge.prototype,"referenceUri",void 0),(0,r._)([(0,u.MZ)({type:Date,json:{write:!0}})],ge.prototype,"acquisitionDate",void 0),(0,r._)([(0,m.K)("acquisitionDate")],ge.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],ge.prototype,"cameraID",void 0),(0,r._)([(0,u.MZ)({type:de.A,json:{write:!0}})],ge.prototype,"center",void 0),(0,r._)([(0,u.MZ)({type:de.A,json:{write:!0}})],ge.prototype,"perspectiveCenter",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],ge.prototype,"orientation",void 0),ge=(0,r._)([(0,c.$)("esri.rest.support.ImageInspectionInfo")],ge);const we=ge;let ve=class extends F.A{constructor(){super(...arguments),this.images=null}};(0,r._)([(0,u.MZ)({type:[we],json:{write:!0}})],ve.prototype,"images",void 0),ve=(0,r._)([(0,c.$)("esri.rest.support.FindImagesResult")],ve);const Re=ve;var _e;let be=_e=class extends F.A{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new _e((0,g.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,u.MZ)({type:[String],json:{name:"angleName",write:!0}})],be.prototype,"angleNames",void 0),(0,r._)([(0,u.MZ)({type:de.A,json:{write:!0}})],be.prototype,"point",void 0),(0,r._)([(0,u.MZ)({type:M.A,json:{write:!0}})],be.prototype,"spatialReference",void 0),(0,r._)([(0,u.MZ)({type:R.jz,json:{write:!0}})],be.prototype,"rasterId",void 0),be=_e=(0,r._)([(0,c.$)("esri.rest.support.ImageAngleParameters")],be);const Se=be;let Me=class extends F.A{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Me.prototype,"north",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Me.prototype,"up",void 0),(0,r._)([(0,u.MZ)({type:M.A,json:{write:!0}})],Me.prototype,"spatialReference",void 0),Me=(0,r._)([(0,c.$)("esri.rest.support.ImageAngleResult")],Me);const Ae=Me;var xe=i(83047),Ie=i(50498),Fe=i(66552);const De=new Fe.J({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let Te=class extends F.A{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,u.MZ)({type:Number,json:{read:!0,write:!0}})],Te.prototype,"value",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Te.prototype,"displayValue",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{read:!0,write:!0}})],Te.prototype,"uncertainty",void 0),Te=(0,r._)([(0,c.$)("esri.rest.support.imageMeasureUtils.BaseImageMeasureResultValue")],Te);let Pe=class extends Te{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:xe.Sk.read,write:xe.Sk.write}})],Pe.prototype,"unit",void 0),Pe=(0,r._)([(0,c.$)("esri.rest.support.imageMeasureUtils.ImageMeasureResultLengthValue")],Pe);let je=class extends Te{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:xe.dk.read,write:xe.dk.write}})],je.prototype,"unit",void 0),je=(0,r._)([(0,c.$)("esri.rest.support.imageMeasureUtils.ImageMeasureResultAreaValue")],je);let Ne=class extends Te{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:xe.b$.read,write:xe.b$.write}})],Ne.prototype,"unit",void 0),Ne=(0,r._)([(0,c.$)("esri.rest.support.imageMeasureUtils.ImageMeasureResultAngleValue")],Ne);let Ze=class extends F.A{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};(0,r._)([(0,u.MZ)()],Ze.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],Ze.prototype,"measureOperation",void 0),(0,r._)([(0,u.MZ)({type:Q.A,json:{write:!0}})],Ze.prototype,"mosaicRule",void 0),(0,r._)([(0,u.MZ)({type:de.A,json:{write:!0}})],Ze.prototype,"pixelSize",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ze.prototype,"raster",void 0),Ze=(0,r._)([(0,c.$)("esri.rest.support.BaseImageMeasureParameters")],Ze);const Ce=Ze;var Oe;let Ve=Oe=class extends Ce{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,pe.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Oe((0,g.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({types:Ie.yR,json:{name:"fromGeometry",read:!0,write:!0}})],Ve.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],Ve.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:De.apiValues,json:{write:De.write}})],Ve.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],Ve.prototype,"is3D",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:xe.Sk.read,write:xe.Sk.write}})],Ve.prototype,"linearUnit",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:xe.dk.read,write:xe.dk.write}})],Ve.prototype,"areaUnit",void 0),Ve=Oe=(0,r._)([(0,c.$)("esri.rest.support.ImageAreaParameters")],Ve);const qe=Ve;let Ee=class extends F.A{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Ee.prototype,"name",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Ee.prototype,"sensorName",void 0),Ee=(0,r._)([(0,c.$)("esri.rest.support.BaseImageMeasureResult")],Ee);const Je=Ee;let Ge=class extends Je{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,u.MZ)({type:je,json:{read:!0,write:!0}})],Ge.prototype,"area",void 0),(0,r._)([(0,u.MZ)({type:Pe,json:{read:!0,write:!0}})],Ge.prototype,"perimeter",void 0),Ge=(0,r._)([(0,c.$)("esri.rest.support.ImageAreaResult")],Ge);const Le=Ge;let $e=class extends(n.A.ClonableMixin(F.A)){constructor(){super(...arguments),this.outSpatialReference=null}};(0,r._)([(0,u.MZ)({type:M.A,json:{name:"outSR",write:!0}})],$e.prototype,"outSpatialReference",void 0),$e=(0,r._)([(0,c.$)("esri.rest.support.ImageBoundaryParameters")],$e);const ze=$e;let Ue=class extends F.A{constructor(){super(...arguments),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?S.A.fromJSON(e):b.A.fromJSON(e)}};(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Ue.prototype,"area",void 0),(0,r._)([(0,u.MZ)({types:Ie.yR,json:{name:"shape",write:!0}})],Ue.prototype,"geometry",void 0),(0,r._)([(0,_.w)("geometry")],Ue.prototype,"readGeometry",null),Ue=(0,r._)([(0,c.$)("esri.rest.support.ImageBoundaryResult")],Ue);const Be=Ue;var ke;let Qe=ke=class extends Ce{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,pe.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new ke((0,g.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({type:de.A,json:{read:!0,write:!0}})],Qe.prototype,"fromGeometry",void 0),(0,r._)([(0,m.K)("fromGeometry")],Qe.prototype,"writeFromGeometry",null),(0,r._)([(0,u.MZ)({type:de.A,json:{read:!0,write:!0}})],Qe.prototype,"toGeometry",void 0),(0,r._)([(0,u.MZ)({type:De.apiValues,json:{write:De.write}})],Qe.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],Qe.prototype,"is3D",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:xe.Sk.read,write:xe.Sk.write}})],Qe.prototype,"linearUnit",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:xe.b$.read,write:xe.b$.write}})],Qe.prototype,"angularUnit",void 0),Qe=ke=(0,r._)([(0,c.$)("esri.rest.support.ImageDistanceParameters")],Qe);const He=Qe;let Ke=class extends Je{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,u.MZ)({type:Pe,json:{read:!0,write:!0}})],Ke.prototype,"distance",void 0),(0,r._)([(0,u.MZ)({type:Ne,json:{read:!0,write:!0}})],Ke.prototype,"azimuthAngle",void 0),(0,r._)([(0,u.MZ)({type:Ne,json:{read:!0,write:!0}})],Ke.prototype,"elevationAngle",void 0),Ke=(0,r._)([(0,c.$)("esri.rest.support.ImageDistanceResult")],Ke);const We=Ke;var Xe=i(93223),Ye=i(58174),et=i(79677);let tt=class extends(n.A.ClonableMixin(F.A)){constructor(){super(...arguments),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,pe.$B)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,r._)([(0,u.MZ)({types:Ie.yR,json:{read:pe.rS,write:!0}})],tt.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],tt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],tt.prototype,"objectIds",void 0),(0,r._)([(0,Xe.e)(Ye.x,{ignoreUnknown:!1,name:"spatialRel"})],tt.prototype,"spatialRelationship",void 0),(0,r._)([(0,u.MZ)({type:et.A,json:{name:"time",write:!0}})],tt.prototype,"timeExtent",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],tt.prototype,"where",void 0),tt=(0,r._)([(0,c.$)("esri.rest.support.ImageGPSInfoParameters")],tt);const it=tt;let rt=class extends(fe(F.A)){constructor(){super(...arguments),this.id=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],rt.prototype,"id",void 0),rt=(0,r._)([(0,c.$)("esri.rest.support.CameraInfo")],rt);const st=rt;let nt=class extends F.A{constructor(){super(...arguments),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,r._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"id",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"name",void 0),(0,r._)([(0,u.MZ)({type:Date,json:{write:!0}})],nt.prototype,"acquisitionDate",void 0),(0,r._)([(0,m.K)("acquisitionDate")],nt.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"cameraID",void 0),(0,r._)([(0,u.MZ)({type:de.A,json:{write:!0}})],nt.prototype,"center",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"gps",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"orientation",void 0),nt=(0,r._)([(0,c.$)("esri.rest.support.ImageGPSInfo")],nt);const at=nt;let ot=class extends F.A{constructor(){super(...arguments),this.images=null,this.cameras=null}};(0,r._)([(0,u.MZ)({type:[at],json:{write:!0}})],ot.prototype,"images",void 0),(0,r._)([(0,u.MZ)({type:[st],json:{write:!0}})],ot.prototype,"cameras",void 0),ot=(0,r._)([(0,c.$)("esri.rest.support.ImageGPSInfoResult")],ot);const lt=ot;var ut;let pt=ut=class extends Ce{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,pe.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new ut((0,g.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({type:de.A,json:{read:!0}})],pt.prototype,"fromGeometry",void 0),(0,r._)([(0,m.K)("fromGeometry")],pt.prototype,"writeFromGeometry",null),(0,r._)([(0,u.MZ)({type:de.A,json:{read:!0,write:!0}})],pt.prototype,"toGeometry",void 0),(0,r._)([(0,u.MZ)({type:De.apiValues,json:{write:De.write}})],pt.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],pt.prototype,"operationType",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:xe.Sk.read,write:xe.Sk.write}})],pt.prototype,"linearUnit",void 0),pt=ut=(0,r._)([(0,c.$)("esri.rest.support.ImageHeightParameters")],pt);const ct=pt;let mt=class extends Je{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,u.MZ)({type:Pe,json:{read:!0,write:!0}})],mt.prototype,"height",void 0),mt=(0,r._)([(0,c.$)("esri.rest.support.ImageHeightResult")],mt);const dt=mt;var yt,ht=i(22048);let ft=yt=class extends F.A{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,pe.$B)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=D.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new yt((0,g.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.MZ)({types:Ie.yR,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],ft.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:Q.A,json:{write:!0}})],ft.prototype,"mosaicRule",null),(0,r._)([(0,m.K)("mosaicRule")],ft.prototype,"writeMosaicRule",null),(0,r._)([(0,u.MZ)({type:D.A,json:{write:!0,name:"renderingRule"}})],ft.prototype,"rasterFunction",null),(0,r._)([(0,m.K)("rasterFunction")],ft.prototype,"writeRasterFunction",null),(0,r._)([(0,u.MZ)({type:[D.A],json:{write:!0,name:"renderingRules"}})],ft.prototype,"rasterFunctions",void 0),(0,r._)([(0,m.K)("rasterFunctions")],ft.prototype,"writeRasterFunctions",null),(0,r._)([(0,u.MZ)({type:de.A,json:{write:!0}})],ft.prototype,"pixelSize",void 0),(0,r._)([(0,m.K)("pixelSize")],ft.prototype,"writePixelSize",null),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnGeometry",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnCatalogItems",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnPixelValues",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],ft.prototype,"maxItemCount",void 0),(0,r._)([(0,u.MZ)({type:et.A,json:{write:{target:"time"}}})],ft.prototype,"timeExtent",void 0),(0,r._)([(0,m.K)("timeExtent")],ft.prototype,"writeTimeExtent",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],ft.prototype,"raster",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],ft.prototype,"viewId",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"processAsMultidimensional",void 0),ft=yt=(0,r._)([(0,c.$)("esri.rest.support.ImageIdentifyParameters")],ft);const gt=ft;var wt=i(22671);let vt=class extends F.A{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,u.MZ)({type:wt.A,json:{write:!0}})],vt.prototype,"catalogItems",void 0),(0,r._)([(0,u.MZ)({type:de.A,json:{write:!0}})],vt.prototype,"location",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"name",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"objectId",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"processedValues",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"properties",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"value",void 0),vt=(0,r._)([(0,c.$)("esri.rest.support.ImageIdentifyResult")],vt);const Rt=vt;var _t;let bt=_t=class extends F.A{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new _t({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,u.MZ)({type:[de.A],json:{write:!0}})],bt.prototype,"geometries",void 0),(0,r._)([(0,m.K)("geometries")],bt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:R.jz,json:{write:!0}})],bt.prototype,"rasterId",void 0),bt=_t=(0,r._)([(0,c.$)("esri.rest.support.ImagePixelLocationParameters")],bt);const St=bt;let Mt=class extends F.A{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],Mt.prototype,"geometries",void 0),Mt=(0,r._)([(0,c.$)("esri.rest.support.ImagePixelLocationResult")],Mt);const At=Mt;var xt;let It=xt=class extends Ce{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,pe.$B)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new xt((0,g.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({types:Ie.yR,json:{name:"fromGeometry",read:pe.rS}})],It.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],It.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],It.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],It.prototype,"is3D",void 0),It=xt=(0,r._)([(0,c.$)("esri.rest.support.ImagePointParameters")],It);const Ft=It;let Dt=class extends Je{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,u.MZ)({type:de.A,json:{name:"point.value",read:!0,write:!0}})],Dt.prototype,"point",void 0),Dt=(0,r._)([(0,c.$)("esri.rest.support.ImagePointResult")],Dt);const Tt=Dt;var Pt=i(34606),jt=i(51508);let Nt=class extends(n.A.ClonableMixin(F.A)){constructor(){super(...arguments),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,pe.$B)(e[0]),geometries:e.map((e=>({...e.toJSON(),spatialReference:void 0})))}:null}};(0,r._)([(0,u.MZ)({types:[Ie.yR]})],Nt.prototype,"geometries",void 0),(0,r._)([(0,m.K)("geometries")],Nt.prototype,"writeGeometries",null),(0,r._)([(0,u.MZ)({type:[R.jz],json:{write:!0}})],Nt.prototype,"rasterIds",void 0),(0,r._)([(0,u.MZ)({type:M.A,json:{name:"outSR",write:!0}})],Nt.prototype,"outSpatialReference",void 0),Nt=(0,r._)([(0,c.$)("esri.rest.support.ImageToMapMultirayParameters")],Nt);const Zt=Nt;let Ct=class extends(n.A.ClonableMixin(F.A)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,pe.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,r._)([(0,u.MZ)({types:Ie.yR,json:{read:pe.rS,write:!0}})],Ct.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],Ct.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"rasterId",void 0),(0,r._)([(0,u.MZ)({type:M.A,json:{name:"outSR",write:!0}})],Ct.prototype,"outSpatialReference",void 0),(0,r._)([(0,u.MZ)({json:{name:"options.DOff",write:!0}})],Ct.prototype,"depthOffset",void 0),(0,r._)([(0,u.MZ)({json:{name:"options.Adjust",write:!0}})],Ct.prototype,"adjust",void 0),Ct=(0,r._)([(0,c.$)("esri.rest.support.ImageToMapParameters")],Ct);const Ot=Ct;let Vt=class extends(n.A.ClonableMixin(F.A)){constructor(){super(...arguments),this.referenceUri=null,this.rasterId=null}};(0,r._)([(0,u.MZ)({type:String,json:{name:"uri",write:!0}})],Vt.prototype,"referenceUri",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Vt.prototype,"rasterId",void 0),Vt=(0,r._)([(0,c.$)("esri.rest.support.ImageUrlParameters")],Vt);const qt=Vt;let Et=class extends F.A{constructor(){super(...arguments),this.url=null}};(0,r._)([(0,u.MZ)({json:{name:"imageURL",write:!0}})],Et.prototype,"url",void 0),Et=(0,r._)([(0,c.$)("esri.rest.support.ImageUrlResult")],Et);const Jt=Et,Gt=new Fe.J({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0});let Lt=class extends(n.A.ClonableMixin(F.A)){constructor(){super(...arguments),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,i){e?.length&&(t.geometryType=(0,pe.$B)(e[0]),t.geometries=e.map((e=>e.toJSON())))}};(0,r._)([(0,u.MZ)({types:[Ie.yR]})],Lt.prototype,"geometries",void 0),(0,r._)([(0,m.K)("geometries")],Lt.prototype,"writeGeometries",null),(0,r._)([(0,u.MZ)({type:Q.A,json:{write:!0}})],Lt.prototype,"mosaicRule",void 0),(0,r._)([(0,u.MZ)({type:de.A,json:{write:!0}})],Lt.prototype,"pixelSize",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Lt.prototype,"constantZ",void 0),(0,r._)([(0,u.MZ)({type:Gt.apiValues,json:{read:Gt.read,write:Gt.write}})],Lt.prototype,"baseType",void 0),Lt=(0,r._)([(0,c.$)("esri.rest.support.ImageVolumeParameters")],Lt);const $t=Lt;let zt=class extends F.A{constructor(){super(...arguments),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],zt.prototype,"area",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],zt.prototype,"cut",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],zt.prototype,"fill",void 0),(0,r._)([(0,u.MZ)({json:{name:"maxz",write:!0}})],zt.prototype,"maxZ",void 0),(0,r._)([(0,u.MZ)({json:{name:"minz",write:!0}})],zt.prototype,"minZ",void 0),(0,r._)([(0,u.MZ)({json:{name:"meanz",write:!0}})],zt.prototype,"meanZ",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],zt.prototype,"cutCellCount",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],zt.prototype,"fillCellCount",void 0),zt=(0,r._)([(0,c.$)("esri.rest.support.ImageVolume")],zt);const Ut=zt;let Bt=class extends F.A{constructor(){super(...arguments),this.volumes=[]}};(0,r._)([(0,u.MZ)({type:[Ut],json:{write:!0}})],Bt.prototype,"volumes",void 0),Bt=(0,r._)([(0,c.$)("esri.rest.support.ImageVolumeResult")],Bt);const kt=Bt;let Qt=class extends(n.A.ClonableMixin(F.A)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,pe.$B)(e),t[i]=JSON.stringify(e))}};(0,r._)([(0,u.MZ)({types:Ie.yR,json:{read:pe.rS,write:!0}})],Qt.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],Qt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],Qt.prototype,"rasterId",void 0),(0,r._)([(0,u.MZ)({json:{name:"options.VisibleOnly",write:!0}})],Qt.prototype,"visibleOnly",void 0),Qt=(0,r._)([(0,c.$)("esri.rest.support.MapToImageParameters")],Qt);const Ht=Qt;let Kt=class extends F.A{constructor(){super(...arguments),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),de.A.fromJSON(e)}};(0,r._)([(0,u.MZ)({types:Ie.yR,json:{name:"Shape",read:pe.rS,write:!0}})],Kt.prototype,"geometry",void 0),(0,r._)([(0,u.MZ)({json:{name:"Length",write:!0}})],Kt.prototype,"length",void 0),(0,r._)([(0,u.MZ)({json:{name:"Area",write:!0}})],Kt.prototype,"area",void 0),(0,r._)([(0,u.MZ)({type:de.A,json:{name:"Center",write:!0}})],Kt.prototype,"center",void 0),(0,r._)([(0,_.w)("center")],Kt.prototype,"readCenter",null),Kt=(0,r._)([(0,c.$)("esri.rest.support.MeasureAreaFromImageResult")],Kt);const Wt=Kt;var Xt;let Yt=Xt=class extends F.A{constructor(){super(...arguments),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,pe.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,g.o8)({geometry:this.geometry,rasterId:this.rasterId});return new Xt(e)}};(0,r._)([(0,u.MZ)({types:Ie.yR,json:{name:"fromGeometry",read:pe.rS,write:!0}})],Yt.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],Yt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],Yt.prototype,"rasterId",void 0),Yt=Xt=(0,r._)([(0,c.$)("esri.rest.support.MeasureFromImageParameters")],Yt);const ei=Yt;let ti=class extends F.A{constructor(){super(...arguments),this.geometry=null,this.length=null}};(0,r._)([(0,u.MZ)({types:Ie.yR,json:{name:"Shape",read:pe.rS,write:!0}})],ti.prototype,"geometry",void 0),(0,r._)([(0,u.MZ)({json:{name:"Length",write:!0}})],ti.prototype,"length",void 0),ti=(0,r._)([(0,c.$)("esri.rest.support.MeasureLengthFromImageResult")],ti);const ii=ti;function ri(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function si(e,t,i){t=(0,R.PZ)(ht.A,t);const r=(0,me.Dl)(e),s=t.geometry?[t.geometry]:[],n=await(0,ce.el)(s),a=t.toJSON();ri(a);const o=n?.[0];null!=o&&(a.geometry=li(o));const l=(0,me.lF)({...r.query,f:"json",...a});return(0,me.jV)(l,i)}async function ni(e,t,i){t=(0,R.PZ)(gt,t);const r=(0,me.Dl)(e),s=t.geometry?[t.geometry]:[];return(0,ce.el)(s).then((e=>{const s=t.toJSON(),n=e?.[0];null!=n&&(s.geometry=JSON.stringify(li(n)));const a=(0,me.lF)({...r.query,f:"json",...s}),o=(0,me.jV)(a,i);return(0,h.A)(r.path+"/identify",o)})).then((e=>Rt.fromJSON(e.data)))}async function ai(e,t,i,r){const s=(0,me.Dl)(e),n=await(0,ce.el)(i),a=t.toJSON();null!=n[0]&&(a.fromGeometry=JSON.stringify(li(n[0]))),null!=n[1]&&(a.toGeometry=JSON.stringify(li(n[1])));const o=(0,me.lF)({...s.query,f:"json",...a}),l=(0,me.jV)(o,r),{data:u}=await(0,h.A)(s.path+"/measure",l);return u}async function oi(e,t,i){t=(0,R.PZ)(ei,t);const r=(0,me.Dl)(e),s=t.toJSON(),n=(0,me.lF)({...r.query,f:"json",...s}),a=(0,me.jV)(n,i),{data:o}=await(0,h.A)(r.path+"/measureFromImage",a);return o}function li(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=ui(e.spatialReference)),t}function ui(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function pi(e,t){if(!e.imageCoordinateSystem)return(0,A.YX)(e);const i=ui(e),{icsid:r,icsns:s}=i;return null==r||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}var ci=i(82371),mi=i(20223),di=i(20615),yi=i(78286),hi=i(99199),fi=i(61956);const gi=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),wi=(0,R.Qp)(R.GB,{min:0,max:255}),vi=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new K({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?Q.A.fromJSON(t):null}get fieldsIndex(){return this.fields?new X.A(this.fields):null}set format(e){e&&gi.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?Q.A.fromJSON(i):this._isMosaicRuleSupported(t)?Q.A.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const s=this.definitionExpression;r?s&&s!==r.where&&(r=r.clone(),r.where=s):s&&(r=new Q.A({where:s})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=wi(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i?.name}return e}get parsedUrl(){return(0,v.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find((({name:t})=>t===e));return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,ue.LF)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),q(s)||p.A.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.fields?.map((e=>e.clone()))??[];e.push((0,ie.rZ)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,ie.Nd)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((({name:e})=>"none"===e.toLowerCase()))&&e.push((0,ie.dy)()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((({name:e})=>"none"!==e.toLowerCase())).forEach((({name:t})=>e.push((0,ie.nq)(t))));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=(0,ie.DV)(i),s=(0,ie.y6)();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const i=(0,ie.AL)(t.multidimensionalInfo);e.push(...i)}const i=t?.attributeTable;if(null!=i){const t=(0,ie.jC)(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=D.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?D.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):D.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?M.A.fromJSON(i):null}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=H.e8.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:s,pixelFilter:n}=this;if(!this._isPicture()&&r&&s&&!n){await this._updateSymbolizer(s,r);const{bandIds:n}=this;i=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return i}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new a.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,g.o8)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),async function(e,t,i){const r=(t=(0,R.PZ)($t,t)).toJSON();r.geometries=JSON.stringify(r.geometries);const s=(0,me.Dl)(e),n=(0,me.lF)({...s.query,f:"json",...r}),a=(0,me.jV)(n,i),{data:o}=await(0,h.A)(`${s.path}/calculateVolume`,a);return kt.fromJSON({volumes:o.results})}(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new a.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,R.PZ)(Se,t)).toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=ui(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(r.spatialReference=pi(t.spatialReference));const s=(0,me.Dl)(e),n=(0,me.lF)({...s.query,f:"json",...r}),a=(0,me.jV)(n,i),{data:o}=await(0,h.A)(`${s.path}/computeAngles`,a);return o.spatialReference=o.spatialReference?null!=o.spatialReference.geodataXform?new M.A({wkid:0,imageCoordinateSystem:o.spatialReference}):M.A.fromJSON(o.spatialReference):null,"NaN"===o.north&&(o.north=null),"NaN"===o.up&&(o.up=null),new Ae(o)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new a.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,R.PZ)(St,t)).toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=ui(s[e].spatialReference));const n=(0,me.Dl)(e),a=(0,me.lF)({...n.query,f:"json",...r}),o=(0,me.jV)(a,i),{data:l}=await(0,h.A)(`${n.path}/computePixelLocation`,o);return At.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new a.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,g.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await si(e,t,i),s=(0,me.Dl)(e),{data:n}=await(0,h.A)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new a.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,g.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await si(e,t,i),s=(0,me.Dl)(e),{data:n}=await(0,h.A)(`${s.path}/computeStatisticsHistograms`,r),{statistics:a}=n;return a?.length&&a.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:a,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new a.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,g.o8)(e),this._applyMosaicRule(e),async function(e,t,i){t=(0,R.PZ)(ct,t);const r=await ai(e,t,[t.fromGeometry,t.toGeometry],i);return dt.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new a.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,g.o8)(e),this._applyMosaicRule(e),async function(e,t,i){t=(0,R.PZ)(qe,t);const r=await ai(e,t,[t.geometry],i);return Le.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new a.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,g.o8)(e),this._applyMosaicRule(e),async function(e,t,i){t=(0,R.PZ)(He,t);const r=await ai(e,t,[t.fromGeometry,t.toGeometry],i);return We.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new a.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,g.o8)(e),this._applyMosaicRule(e),async function(e,t,i){t=(0,R.PZ)(Ft,t);const r=await ai(e,t,[t.geometry],i);return Tt.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new a.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new a.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return async function(e,t,i){const r=await oi(e,t,i);return ii.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new a.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new a.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return async function(e,t,i){const r=await oi(e,t,i);return Wt.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}fetchImage(e,t,i,r={}){if((0,f.eO)(p.A.getLogger(this),"`ImageryLayer.fetchImage` is deprecated in favor of 'ImageryLayer.fetchPixels'.",{replacement:"ImageryLayer.fetchPixels",version:"4.33",warnOnce:!0}),null==e||null==t||null==i)throw new a.A("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");return this.internalFetchImage(e,t,i,r)}async internalFetchImage(e,t,r,s={}){this._updateCurrentRasterInfo();const n=this.getExportImageServiceParameters(e,t,r,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,s.returnImageBitmap?{imageBitmap:await(0,Y.m)(e,`${i(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:a}=this,o=(n?.length||a.bandCount)??0,l=t*r,u=a.pixelType,p=[];for(let e=0;e<o;e++)p.push(te.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new te.A({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!s.requestAsImageElement&&!this.pixelFilter,o=a&&!!s.returnImageBitmap,l={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:a,returnImageBitmap:o,signal:s.signal};return this._requestArrayBuffer(l)}async fetchPixels(e,t,i,r={}){await this._initJobHandler(),r.applyRendering&&this._updateCurrentRasterInfo();const s=r.applyRendering?void 0:new K({layer:this,requestRawData:!0,interpolation:r.interpolation??"nearest",bandIds:r.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,i,r.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,delete n.bandIds,delete n.compressionQuality;const a={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:r.signal},{pixelData:o}=await this._requestArrayBuffer(a);return o??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return(0,h.A)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new a.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,h.A)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>wt.A.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,me.Dl)(e),s=(0,me.lF)({...r?.query,f:"json"}),n=(0,me.jV)(s,i),a=`${r?.path}/${t}/info`,o=(0,h.A)(`${a}`,n),l=(0,h.A)(`${a}/keyProperties`,n),u=await Promise.allSettled([o,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let m=null;p.statistics?.length&&(m=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const d=b.A.fromJSON(p.extent),y=Math.ceil(d.width/p.pixelSizeX-.1),f=Math.ceil(d.height/p.pixelSizeY-.1),g=d.spatialReference,w=new de.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),v=p.histograms?.length?p.histograms:null,R=new mi.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new re.A({width:y,height:f,bandCount:p.bandCount,extent:d,spatialReference:g,pixelSize:w,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:v,keyProperties:c,storageInfo:R})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,h.A)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await(0,h.A)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const a=this.version>=10.7?(0,h.A)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},o=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,A.YX)(o),outSR:"0:"+e},u=(0,h.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,m=n.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const y={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,A.YX)(o),outSR:"0:"+e},f=(0,h.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(y),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([a,u,f]);let w=g[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=b.A.fromJSON(g[1]?.geometries?.[0]);v&&(v.spatialReference=new M.A({wkid:0,imageCoordinateSystem:s}));const R=g[2].geometries?g[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],_=R.length;if(_<3)return{ics:s,icsToPixelTransform:w,icsExtent:v,northDirection:null};let S=0,x=0,I=0,F=0;for(let e=0;e<_;e++)S+=R[e].x,x+=R[e].y,I+=R[e].x*R[e].x,F+=R[e].x*R[e].y;const D=(_*F-S*x)/(_*I-S*S);let T=0;const P=R[4].x>R[0].x,j=R[4].y>R[0].y;return D===1/0?T=j?90:270:0===D?T=P?0:180:D>0?T=P?180*Math.atan(D)/Math.PI:180*Math.atan(D)/Math.PI+180:D<0&&(T=j?180+180*Math.atan(D)/Math.PI:360+180*Math.atan(D)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:v,northDirection:T}}async generateRasterInfo(e,t){e=(0,R.PZ)(D.A,e);const r={...t,query:this._getQueryParams()};if(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))return this.serviceRasterInfo??(0,ci.Tw)(i(this.parsedUrl),this.sourceJSON,r);const s=function(e){const t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map((e=>i?e.slice(8,-18):e.slice(18,-1)));return s?s.join("/"):null}(e);if(!s)throw new a.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[s])return this._functionRasterInfos[s];const n=(0,ci.X6)(i(this.parsedUrl),e,r);this._functionRasterInfos[s]=n;try{return await n}catch(e){throw this._functionRasterInfos[s]=null,e}}getExportImageServiceParameters(e,t,r,s,n){const a=pi((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));n??=this.exportImageServiceParameters;const o=n.toJSON(),{bandIds:l,noData:u}=o;let{renderingRule:p}=o;const c=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,d=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(l?.length&&this._hasRasterFunction(this.rasterFunction)&&!c&&d){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFunctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){const t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;o.bandIds=void 0}else o.bandIds=l?.join(",");Array.isArray(u)&&u.length>0&&(o.noData=u.join(","));const y=this._processMultidimensionalIntersection(null,s,n.mosaicRule);if(y.isOutSide)return null;o.mosaicRule=null!=y.mosaicRule?JSON.stringify(y.mosaicRule):null,s=y.timeExtent,o.renderingRule=this._getRenderingRuleString(D.A.fromJSON(p));const h={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?h.time=""+e:null==e&&null==t||(h.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:a,imageSR:a,size:t+","+r,...o,...h}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new a.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,g.o8)(e);const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=(t=(0,R.PZ)(Pt.A,t)).toJSON();ri(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const s=await(0,ce.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=li(n));const a=(0,me.Dl)(e),o=(0,me.lF)({...a.query,f:"json",...r}),l=(0,me.jV)(o,i),{data:u}=await(0,h.A)(`${a.path}/getSamples`,l),p=u.samples.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return jt.A.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new a.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,g.o8)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=S.A.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new a.A("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),r&&null==e.raster&&(e.raster=r),ni(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new a.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,R.PZ)(Ot,t)).toJSON();t.geometry.spatialReference.imageCoordinateSystem&&(r.geometry=li(t.geometry)),t.depthOffset&&t.adjust||delete r.options;const s=(0,me.Dl)(e),n=(0,me.lF)({...s.query,f:"json",...r}),a=(0,me.jV)(n,i),{data:o}=await(0,h.A)(`${s.path}/imageToMap`,a);return(0,pe.rS)(o)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new a.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,R.PZ)(Zt,t)).toJSON();t.rasterIds?.length&&(r.rasterIds=t.rasterIds.join(","));const s=(0,me.Dl)(e),n=(0,me.lF)({...s.query,f:"json",...r}),a=(0,me.jV)(n,i),{data:o}=await(0,h.A)(`${s.path}/imageToMapMultiray`,a);return(0,pe.rS)(o)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new a.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,R.PZ)(Ht,t)).toJSON(),s=await(0,ce.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=li(n)),t.visibleOnly||delete r.options;const a=n?.spatialReference??t.geometry?.spatialReference;a&&(r.inSR=pi(a));const o=(0,me.Dl)(e),l=(0,me.lF)({...o.query,f:"json",...r}),u=(0,me.jV)(l,i),{data:p}=await(0,h.A)(`${o.path}/mapToImage`,u);return(0,pe.rS)(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new a.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,R.PZ)(he,t)).toJSON(),s=await(0,ce.el)([t.fromGeometry,t.toGeometry]);null!=s[0]&&(r.fromGeometry=li(s[0]),s[0].spatialReference&&(r.inSR=pi(s[0].spatialReference))),null!=s[1]&&(r.toGeometry=li(s[1])),t.objectIds?.length&&(r.objectIds=r.objectIds.join(","));const n=(0,me.Dl)(e),a=(0,me.lF)({...n.query,f:"json",...r}),o=(0,me.jV)(a,i),{data:l}=await(0,h.A)(`${n.path}/find`,o);return Re.fromJSON(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new a.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,R.PZ)(qt,t)).toJSON(),s=(0,me.Dl)(e),n=(0,me.lF)({...s.query,f:"json",...r}),a=(0,me.jV)(n,i),{data:o}=await(0,h.A)(`${s.path}/getImageUrl`,a);return Jt.fromJSON(o)}(i(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new fi.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new a.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},async function(e,t,i){t=(0,R.PZ)(ze,t);const r=(0,me.Dl)(e),s=t.toJSON();t.outSpatialReference&&(s.outSR=pi(t.outSpatialReference));const n=(0,me.lF)({...r.query,f:"json",...s}),a=(0,me.jV)(n,i),{data:o}=await(0,h.A)(r.path+"/queryBoundary",a);return Be.fromJSON(o)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,hi.s)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,yi.V)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new a.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},async function(e,t,i){const r=(t=(0,R.PZ)(it,t)).toJSON();ri(r),r.objectIds?.length&&(r.objectIds=r.objectIds.join(",")),r.geometry||r.objectIds||r.time||r.where||(r.where="1=1");const s=await(0,ce.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=li(n));const a=n?.spatialReference??t.geometry?.spatialReference;a&&(r.inSR=pi(a));const o=(0,me.Dl)(e),l=(0,me.lF)({...o.query,f:"json",...r}),u=(0,me.jV)(l,i),{data:p}=await(0,h.A)(`${o.path}/queryGPSInfo`,u);return lt.fromJSON(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,di.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new a.A("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,l=null,u=null;const p=ie.F_.servicePixelValue.toLowerCase(),c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some((e=>!e.toLowerCase().startsWith(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().startsWith(p)&&e.length>p.length)).map((e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new D.A({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some((e=>e.functionName===i.functionName))&&(l.push(i),u.push(i.functionName))}const m=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let y=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:i}=(0,se.Rp)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new a.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(y=i.timeExtent)}const h=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,y);let f=e.geometry;this.version<10.91&&"extent"===f?.type&&(f=S.A.fromExtent(f));const g=this._getQueryParams({geometry:f,timeExtent:y,mosaicRule:h,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:o,returnGeometry:m,raster:this.raster,maxItemCount:s?1:null});delete g.f;const w=new gt(g);try{await this._generateRasterInfo(this.rasterFunction);const i=await ni(this.url,w,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,a=null!=i.value&&i.value.toLowerCase().includes("nodata"),l=o&&!m&&i?.catalogItems?.features.length&&(n||!a),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?(0,se.XU)({rasterInfo:this.rasterInfo,multidimensionalDefinition:h?.multidimensionalDefinition,timeExtent:y,multidimensionalSubset:this.multidimensionalSubset}):null;if(!l)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p});const c=this.objectIdField||"ObjectId",d=i.catalogItems?.features??[],f=d.map((e=>e.attributes?.[c])),g=new fi.A({objectIds:f,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[c]}),v=await this.queryRasters(g);return v?.features?.length&&v.features.forEach((t=>{d.forEach((i=>{i.attributes[c]===t.attributes[c]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new a.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,h.A)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,h.A)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),n=await Promise.all([r,s]);return n[0]&&n[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,se.z2)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,ci.Tw)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,ci.E9)(e,t),e))),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([r,s,n]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),p.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,w.wB)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some((e=>e.dimensions.some((e=>e.name===s))))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==n)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const a=e.multidimensionalDefinition.filter((e=>e.dimensionName===n)),o=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==o||null==l||o===l,p=u?[o||l]:[[o,l]],c=this.version>=10.8;if(a.length)a.forEach((e=>{e.dimensionName===n&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))}));else if(!c){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=n,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new I.A({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new a.A("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,R.PZ)(fi.A,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,oe.fp)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:s}=await(0,h.A)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new a.A("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=(0,oe.I8)({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&i.bandCount>=3){const e=r?.bandIds??(0,oe.ci)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=r?.renderer??(0,oe.PD)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=(0,oe.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=i):this.symbolizer=new le.A({rendererJSON:s,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):(0,ne.D)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await(0,h.A)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:s,signal:n}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:a}=await(0,h.A)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return a instanceof Blob?{imageBitmap:await(0,Y.m)(a,r,n),params:t}:{imageOrCanvasElement:a,params:t}}const o=this._initJobHandler(),l=(0,h.A)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),u=(await Promise.all([l,o]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,ne.g)(u)),!c)throw new a.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const m={signal:n},d="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,ne.D)(u,{useCanvas:!0,...t},m):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},m);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,se.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new Q.A;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:s,returnDomainValues:n,templateFields:a}=t,o=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!l&&(!c||s)){const e={};e[p]=0,u=[i],l=[new y.A({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,ie.eS)(this.rasterFields,e,t.effectiveMultidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,a),c&&!s&&(l=[]);const{itemPixelValue:d,servicePixelValue:h}=ie.F_,f=this.rasterFields.some((e=>e.name===d));for(let e=0;e<l.length;e++){const t=l[e];if(null!=i){const n=u[e],a=this.rasterFunction&&o&&o.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?o[r.indexOf(this.rasterFunction.functionName)]:i;if("nodata"===n.toLowerCase()&&!s)continue;f&&(t.attributes[d]=n),t.attributes[h]=a,this._updateFeatureWithMagDirValues(t,n);const l=this.fields&&this.fields.length>0;let p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:i:a;this.rasterFunction||(p=l?n:i),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,n&&this._updateFeatureWithDomainValues(t),r&&o&&r.length===o.length)for(let e=0;e<r.length;e++){const i=`${ie.F_.servicePixelValue}.${r[e]}`;t.attributes[i]=o[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=(0,se.Rp)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,se.Rp)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map((e=>e.name)).find((e=>"value"===e.toLowerCase()));if(!n)return;const a=r.filter((e=>e.attributes[n]===(null!=t?parseInt(t,10):null)));a&&a[0]&&s.forEach((t=>{const i=ie.ER+t.name;e.attributes[i]=a[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),s=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new te.A({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new b.A(0,0,0,0,this.spatialReference)});const a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,ae.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[ie.F_.magnitude]=a[0],e.attributes[ie.F_.direction]=a[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach((e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:s}=e,n=t.includes("image"),a="esriImageServiceDataTypeElevation"===e.serviceDataType,o=!(!e.spatialReference&&!e.extent?.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&o,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic"),m=this._isMosaicDataset(e)&&t.includes("catalog"),d=t.includes("download"),y=i>=10.7&&a||i>=11.4&&(a||u&&p.includes("3d"));return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsImageToMap:i>=11.2&&m,supportsImageToMapMultiray:i>=11.2&&m,supportsMapToImage:i>=11.2&&m,supportsFindImages:i>=11.2&&m,supportsGetImageUrl:i>=11.3&&d,supportsMeasure:u,supportsMeasureFromImage:i>=11.2,supportsDownload:d,supportsQuery:m&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&n,supportsProject:i>=10.3&&n,supportsComputeStatisticsHistograms:i>=10.4&&n,supportsQueryBoundary:i>=10.6&&n,supportsCalculateVolume:y,supportsComputePixelLocation:i>=10.7&&m,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&m,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsCurrentUser:!1,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function i(e){return e?.path??""}return(0,r._)([(0,u.MZ)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,_.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,u.MZ)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,u.MZ)({type:[R.jz],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,_.w)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,_.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,u.MZ)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,m.K)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.MZ)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,m.K)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,_.w)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,u.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,type:[W.A]})],t.prototype,"fields",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,u.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,_.w)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,u.MZ)({type:b.A})],t.prototype,"fullExtent",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,u.MZ)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,u.MZ)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,u.MZ)({type:String,json:{type:H.SZ.jsonValues,read:H.SZ.read,write:H.SZ.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"minScale",void 0),(0,r._)([(0,_.w)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,u.MZ)()],t.prototype,"maxScale",void 0),(0,r._)([(0,_.w)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,u.MZ)({type:Q.A})],t.prototype,"mosaicRule",null),(0,r._)([(0,_.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,m.K)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,u.MZ)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,u.MZ)({type:ee.A,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,u.MZ)({json:{type:R.jz}})],t.prototype,"noData",void 0),(0,r._)([(0,m.K)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,u.MZ)({type:String,json:{type:H.hm.jsonValues,read:H.hm.read,write:H.hm.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,u.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,_.w)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,r._)([(0,u.MZ)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,u.MZ)({})],t.prototype,"types",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,u.MZ)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"raster",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,_.w)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,u.MZ)()],t.prototype,"viewId",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"renderer",null),(0,r._)([(0,u.MZ)({types:ue.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:ue.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"internalRenderer",null),(0,r._)([(0,_.w)("internalRenderer")],t.prototype,"readRenderer",null),(0,r._)([(0,m.K)("internalRenderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,u.MZ)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,r._)([(0,u.MZ)(x.ke)],t.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,u.MZ)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,u.MZ)({type:D.A,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,r._)([(0,_.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,type:M.A})],t.prototype,"spatialReference",void 0),(0,r._)([(0,_.w)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,u.MZ)({type:H.e8.apiValues,json:{read:H.e8.read,type:H.e8.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,m.K)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,u.MZ)({constructOnly:!0,type:re.A})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,u.MZ)(x.OZ)],t.prototype,"url",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,_.w)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,c.$)("esri.layers.mixins.ArcGISImageService")],t),t};var Ri=i(18768),_i=i(63074),bi=i(69208),Si=i(16131),Mi=i(8303),Ai=i(63660),xi=i(56551),Ii=i(54310),Fi=i(25036),Di=i(82935),Ti=i(91908),Pi=i(30291),ji=i(92935);let Ni=class extends((0,_i.dM)((0,Di.e)((0,Fi.j)((0,Si.q)((0,Mi.A)((0,xi.H)(vi((0,Ai.G)((0,Ii.J)((0,bi.d)((0,Ri.b)((0,o.P)(n.A.ClonableMixin(d.A)))))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.sg)((async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case ji.X.SAVE:return s(this,t);case ji.X.SAVE_AS:return n(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:t}=this,i=new Set,r=ie.F_.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=ie.Oo.toLowerCase(),a=`${ie.F_.servicePixelValue.toLowerCase()}.`;for(const e of t){const t=e.name.toLowerCase();t===r||t.startsWith(a)||s&&t.startsWith(n)||i.add(e.name)}const o=(0,Pi.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:l}=this;return o?.fieldInfos&&l&&(0,ie.h4)(o.fieldInfos,l),o}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(ji.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(ji.X.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,Ti.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.A("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,r._)([(0,u.MZ)(x.fV)],Ni.prototype,"legendEnabled",null),(0,r._)([(0,u.MZ)({type:["show","hide"]})],Ni.prototype,"listMode",null),(0,r._)([(0,u.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ni.prototype,"isReference",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Ni.prototype,"operationalLayerType",void 0),(0,r._)([(0,m.K)("web-map","operationalLayerType")],Ni.prototype,"writeOperationalLayerType",null),(0,r._)([(0,u.MZ)(x.M6)],Ni.prototype,"popupEnabled",void 0),(0,r._)([(0,u.MZ)({type:s.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Ni.prototype,"popupTemplate",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],Ni.prototype,"defaultPopupTemplate",null),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],Ni.prototype,"type",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],Ni.prototype,"_isPreviewLayer",null),Ni=(0,r._)([(0,c.$)("esri.layers.ImageryLayer")],Ni);const Zi=Ni},58501:(e,t,i)=>{i.d(t,{q:()=>s});var r=i(62815);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},82371:(e,t,i)=>{i.d(t,{E9:()=>y,Tw:()=>m,X6:()=>d});var r=i(78888),s=i(5443),n=i(86738),a=i(16930),o=i(87186),l=i(20223),u=i(2272),p=i(22671);async function c(e,t,i){const c=(0,u.Dl)(e),{rasterFunction:m,sourceJSON:d}=t||{},y=m?JSON.stringify(m.rasterFunctionDefinition||m):null,h=(0,u.lF)({...c.query,renderingRule:y,f:"json"}),f=(0,u.jV)(h,i);e=c.path;const g=d||await(0,r.A)(e,f).then((e=>e.data)),w=g.hasRasterAttributeTable?(0,r.A)(`${e}/rasterAttributeTable`,f):null,v=g.hasColormap?(0,r.A)(`${e}/colormap`,f):null,R=g.hasHistograms?(0,r.A)(`${e}/histograms`,f):null,_=g.currentVersion>=10.3?(0,r.A)(`${e}/keyProperties`,f):null,b=g.hasMultidimensions?(0,r.A)(`${e}/multidimensionalInfo`,f):null,S=await Promise.allSettled([w,v,R,_,b]);let M=null;if(g.minValues&&g.minValues.length===g.bandCount){M=[];for(let e=0;e<g.minValues.length;e++)M.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const A=s.A.fromJSON(g.extent),x=Math.ceil(A.width/g.pixelSizeX-.1),I=Math.ceil(A.height/g.pixelSizeY-.1),F=a.A.fromJSON(g.spatialReference||g.extent.spatialReference),D="fulfilled"===S[0].status?S[0].value?.data:null,T=D?.features?.length?p.A.fromJSON(D):null,P="fulfilled"===S[1].status?S[1].value?.data.colormap:null,j=P?.length?P:null,N="fulfilled"===S[2].status?S[2].value?.data.histograms:null,Z=N?.[0]?.counts?.length?N:null,C="fulfilled"===S[3].status?S[3].value?.data??{}:{},O="fulfilled"===S[4].status?S[4].value?.data.multidimensionalInfo:null,V=O?.variables?.length?O:null;V&&V.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),e.dimensions?.forEach((e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")}))}));const{defaultVariable:q,serviceDataType:E}=g;q&&q!==C.DefaultVariable&&(C.DefaultVariable=q),E?.includes("esriImageServiceDataTypeVector")&&!E.includes(C.DataType)&&(C.DataType=E.replace("esriImageServiceDataType",""));let J=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some((e=>e!==J))&&(J=g.noDataValues);const G=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:F}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(x,I))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:x,height:I,bandCount:g.bandCount,extent:s.A.fromJSON(g.extent),spatialReference:F,pixelSize:new n.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:F}),pixelType:g.pixelType.toLowerCase(),statistics:M,attributeTable:T,colormap:j,histograms:Z,keyProperties:C,noDataValue:J,multidimensionalInfo:V,storageInfo:G})}function m(e,t,i){return c(e,{sourceJSON:t},i)}function d(e,t,i){return c(e,{rasterFunction:t},i)}function y(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},91908:(e,t,i)=>{i.d(t,{D:()=>n});var r=i(60694);const s=[];function n(e,t){if((0,r.Wo)(e.url??""))return!0;const{wkid:i}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5141],{5141:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(46686),l(32680),l(49255),l(76591),l(76597),l(82991),l(96336),l(10764),l(71955),l(53466),l(92700),l(72824),l(35640),l(40261),l(77695),l(54849),l(74081),l(98619),l(62602),l(22393),l(59469),l(25618),l(96598),l(51406),l(42398),l(11955),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(46540),l(60517),l(14113);var s=l(28491)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9926],{18047:(e,t,n)=>{n.d(t,{ZV:()=>u,yx:()=>l});var r=n(73444);const i={ar:"ar-u-nu-latn"};let a=new WeakMap,o={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function u(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!a.has(t)){const n=(0,r.JK)(),o=i[(0,r.JK)()]||n;a.set(t,new Intl.NumberFormat(o,e))}return a.get(t)}(t).format(e)}(0,r.Ml)((()=>{a=new WeakMap,o={}})),new Map},29926:(e,t,n)=>{n.r(t),n.d(t,{applyTextFormattingHTML:()=>_,createFieldInfoMap:()=>V,findRelatedLayer:()=>oe,findUtilityNetwork:()=>le,fixTokens:()=>j,formatAttributes:()=>Y,formatEditInfo:()=>Q,formatValueToFieldInfo:()=>G,getAllFieldInfos:()=>K,getFieldInfo:()=>J,getFieldInfoLabel:()=>A,getFixedFieldName:()=>k,getFixedFieldNames:()=>q,getHighlightKeyForFeature:()=>fe,getSourceLayer:()=>N,graphicCallback:()=>x,htmlEntities:()=>P,isAssociatedFeatureSupportedLayer:()=>O,isExpressionField:()=>Z,isFeatureSupportedLayer:()=>$,isGraphicForRelatableFeatureSupportedLayer:()=>z,isRelatableFeatureSupportedLayer:()=>S,isRelatableLayer:()=>D,isRelatedField:()=>ee,preLayerQueryCallback:()=>ie,preRequestCallback:()=>ae,querySourceLayer:()=>B,queryUpdatedFeature:()=>X,shouldOpenInNewTab:()=>C,substituteAttributes:()=>v,substituteFieldsInLinksAndAttributes:()=>M});var r=n(44208),i=n(53966),a=n(799),o=n(97770),l=n(18047),u=n(30524),s=n(83531),f=n(4560),c=n(71386),d=n(56400);const p=()=>i.A.getLogger("esri.widgets.Feature.support.featureUtils"),y=/href=(""|'')/gi,m=/(\{([^{\r\n]+)\})/g,b=/'/g,g=/^\s*expression\//i,h=/(\n)/gi,I=/[\u00A0-\u9999<>&]/gim,F=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,w=/^(?:mailto:|tel:)/,T="relationships/",L=(0,o.J2)("short-date-short-time");function N(e){if(null!=e)return(e.sourceLayer||e.layer)??void 0}async function x({type:e,value:t,event:n}){try{return"function"==typeof t?t(n):await t}catch(r){return void p().error("error",`An error occurred when calling the "${e}" function`,{error:r,graphic:n.graphic,value:t})}}function C(e=""){if(e)return!w.test(e.trim().toLowerCase())}function Z(e){return!!e&&g.test(e)}function A(e,t){const n=function(e,t){if(!t||!Z(t)||!e)return;const n=t.replace(g,"").toLowerCase();return e.find((({name:e})=>e.toLowerCase()===n))}(t,e?.fieldName);return n?n.title||null:e?e.label||e.fieldName:null}function k(e,t){const n=R(t,e);return n?n.name:e}function q(e,t){return e&&e.map((e=>k(e,t)))}function R(e,t){return e&&"function"==typeof e.getField&&t?e.getField(t)??null:null}function E(e){return`${e}`.trim()}function M({attributes:e,globalAttributes:t,layer:n,text:r,expressionAttributes:i,fieldInfoMap:a}){return r?v({formattedAttributes:t,template:U(r,{...t,...i,...e},n),fieldInfoMap:a}):""}function v({formattedAttributes:e,template:t,fieldInfoMap:n}){return E(function(e){return e.replaceAll(y,"")}((0,a.HC)((0,a.HC)(t,(e=>function(e,t){const n=t.get(e.toLowerCase());return`{${n?.fieldName||e}}`}(e,n))),e)))}function j(e,t){return e.replaceAll(m,((e,n,r)=>{const i=R(t,r);return i?`{${i.name}}`:n}))}function U(e,t,n){const r=j(e,n);return r?r.replaceAll(F,((e,n,r)=>function(e,t,n){const r=(t=E(t))&&"{"!==t[0];return(0,a.HC)(e,function(e,t=!1){const n={...e};return Object.keys(n).forEach((e=>function(e,t,n=!1){const r=t[e];if("string"==typeof r){const i="%27",a=(n?encodeURIComponent(r):r).replaceAll(b,i);t[e]=a}}(e,n,t))),n}(n,r||!1))}(e,n||r,t))):r}function $(e){return null!=e&&"object"==typeof e&&"fieldsIndex"in e&&"geometryType"in e&&"getField"in e&&"load"in e&&"loaded"in e&&"objectIdField"in e&&"spatialReference"in e&&"type"in e&&("feature"===e.type||"scene"===e.type||"subtype-sublayer"===e.type||"sublayer"===e.type)&&"when"in e}function D(e){return null!=e&&"object"==typeof e&&"createQuery"in e&&"queryFeatureCount"in e&&"queryObjectIds"in e&&"queryRelatedFeatures"in e&&"queryRelatedFeaturesCount"in e&&"relationships"in e}function S(e){return $(e)&&D(e)}function O(e){return!(!(e&&"object"==typeof e&&"createQuery"in e&&"getField"in e&&"queryFeatureCount"in e&&"queryFeatures"in e&&"queryObjectIds"in e&&"capabilities"in e&&"fields"in e&&"fieldsIndex"in e&&"type"in e)||"feature"!==e.type&&"subtype-group"!==e.type&&"subtype-sublayer"!==e.type&&"sublayer"!==e.type||!("when"in e))&&("subtype-sublayer"===e.type&&"parent"in e&&e.parent&&"object"==typeof e.parent?"globalIdField"in e.parent:"globalIdField"in e)}function z(e){return!!e&&"object"==typeof e&&"sourceLayer"in e&&S(e.sourceLayer)}function G(e,t){const{fieldInfos:n,fieldName:r,preventPlacesFormatting:i,layer:a,timeZone:o}=t,s=J(n,r),c=R(a,r);if(s&&!(0,u.JL)(r)){const t=c?.type,n=s.format?.dateFormat;if("date"===t||"date-only"===t||"time-only"===t||"timestamp-offset"===t||n)return(0,f.i0)(e,{format:n,fieldType:t,timeZoneOptions:{layerTimeZone:a&&"preferredTimeZone"in a?a.preferredTimeZone:null,viewTimeZone:o,datesInUnknownTimezone:!(!a||!("datesInUnknownTimezone"in a)||!a.datesInUnknownTimezone)}})}const d=s?.format;return"string"==typeof e&&(0,u.JL)(r)&&d?function(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(",")?H(e,",",", ",t):e.includes(";")?H(e,";","; ",t):e.includes(" ")?H(e," "," ",t):(0,l.ZV)(Number(e),(0,l.yx)(t))}(e,d):"string"==typeof(e=function(e,t){if("string"==typeof e&&t&&null==t.dateFormat&&(null!=t.places||null!=t.digitSeparator)){const t=Number(e);if(!isNaN(t))return t}return e}(e,d))||null==e||null==d?_(e):(0,l.ZV)(e,i?{...(0,l.yx)(d),minimumFractionDigits:0,maximumFractionDigits:20}:(0,l.yx)(d))}function H(e,t,n,r){return e.trim().split(t).map((e=>(0,l.ZV)(Number(e),(0,l.yx)(r)))).join(n)}function J(e,t){if(e?.length&&t)return e.find((e=>e.fieldName?.toLowerCase()===t.toLowerCase()))}function Q(e,t,n,r){const{creatorField:i,creationDateField:a,editorField:l,editDateField:u}=e;if(!t)return;const s=(0,d.hv)(r&&"preferredTimeZone"in r?r.preferredTimeZone:null,!(!r||!("datesInUnknownTimezone"in r)||!r.datesInUnknownTimezone),n,L,"date"),f={...L,...s},c=t[u];if("number"==typeof c){const e=t[l];return{type:"edit",date:(0,o.Yq)(c,f),user:e}}const p=t[a];if("number"==typeof p){const e=t[i];return{type:"create",date:(0,o.Yq)(p,f),user:e}}return null}function V(e,t){const n=new Map;if(!e)return n;for(const r of e){if(!r.fieldName)continue;const e=k(r.fieldName,t);r.fieldName=e,n.set(e.toLowerCase(),r)}return n}function K(e){const t=[];if(!e)return t;const{fieldInfos:n,content:r}=e;return n&&t.push(...n),r&&Array.isArray(r)?(r.forEach((e=>{if("fields"===e.type){const n=e?.fieldInfos;n&&t.push(...n)}})),t):t}function P(e){return e.replaceAll(I,(e=>`&#${e.charCodeAt(0)};`))}function _(e){return"string"==typeof e?e.replaceAll(h,'<br class="esri-text-new-line" />'):e}function W(e){const{value:t,fieldName:n,fieldInfos:i,fieldInfoMap:a,layer:o,graphic:l,timeZone:s}=e;if(null==t)return"";const c=function({fieldName:e,value:t,graphic:n,layer:i}){if(ee(e))return null;if(!i||"function"!=typeof i.getFieldDomain)return null;const a=n&&i.getFieldDomain(e,{feature:n,excludeImpliedDomains:(0,r.A)("esri-widget-legacy-field-domain-calculation")});return a&&"coded-value"===a.type?a.getName(t):null}({fieldName:n,value:t,graphic:l,layer:o});if(c)return c;const d=function({fieldName:e,graphic:t,layer:n}){if(ee(e))return null;if(!n||"function"!=typeof n.getFeatureType)return null;const{typeIdField:r}=n;if(!r||e!==r)return null;const i=n.getFeatureType(t);return i?i.name:null}({fieldName:n,graphic:l,layer:o});if(d)return d;if(a.get(n.toLowerCase()))return G(t,{fieldInfos:i||Array.from(a.values()),fieldName:n,layer:o,timeZone:s});const p=o?.fieldsIndex?.get(n);return p&&((0,f.fs)(p)||(0,u.OH)(p))?(0,f.i0)(t,{fieldType:p.type,timeZoneOptions:{layerTimeZone:o&&"preferredTimeZone"in o?o.preferredTimeZone:null,viewTimeZone:s,datesInUnknownTimezone:!(!o||!("datesInUnknownTimezone"in o)||!o.datesInUnknownTimezone)}}):_(t)}function Y({fieldInfos:e,attributes:t,layer:n,graphic:r,fieldInfoMap:i,relatedInfos:a,timeZone:o}){const l={};return a?.forEach((t=>function({attributes:e,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a}){e&&t&&(t.relatedFeatures?.forEach((o=>te({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a}))),t.relatedStatsFeatures?.forEach((o=>te({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a}))))}({attributes:l,relatedInfo:t,fieldInfoMap:i,fieldInfos:e,layer:n,timeZone:o}))),t&&Object.keys(t).forEach((a=>{const u=t[a];l[a]=W({fieldName:a,fieldInfos:e,fieldInfoMap:i,layer:n,value:u,graphic:r,timeZone:o})})),l}async function B(e,t){const{layer:n,graphic:r,outFields:i,objectIds:a,returnGeometry:o,spatialReference:l}=e,u=a[0];if("number"!=typeof u&&"string"!=typeof u){const e="Could not query required fields for the specified feature. The feature's ID is invalid.",t={layer:n,graphic:r,objectId:u,requiredFields:i};return p().warn(e,t),null}if(!(0,s.BR)(n)?.operations?.supportsQuery){const e="The specified layer cannot be queried. The following fields will not be available.",t={layer:n,graphic:r,requiredFields:i,returnGeometry:o};return p().warn(e,t),null}const f=n.createQuery();return f.objectIds=a,f.outFields=i?.length?i:[n.objectIdField],f.returnGeometry=!!o,f.returnZ=!!o,f.returnM=!!o,f.outSpatialReference=l,(await n.queryFeatures(f,t)).features[0]}async function X({graphic:e,popupTemplate:t,layer:n,spatialReference:r},i){if(!n||!t)return;if("function"==typeof n.load&&await n.load(i),!e.attributes)return;const a=n.objectIdField,o=e.attributes[a];if(null==o)return;const l=[o],s=await t.getRequiredFields(n.fieldsIndex),f=(0,u.Kl)(s,e),d=f?[]:s.includes(a)?s:[...s,a],p=t.returnGeometry||await async function(e){if(!e.expressionInfos?.length)return!1;const t=await(0,c.lw)(),{arcadeUtils:{hasGeometryFunctions:n}}=t;return n(e)}(t);if(f&&!p)return;const y=await B({layer:n,graphic:e,outFields:d,objectIds:l,returnGeometry:p,spatialReference:r},i);y&&(y.geometry&&(e.geometry=y.geometry),y.attributes&&(e.attributes={...e.attributes,...y.attributes}))}function ee(e=""){return!!e&&e.includes(T)}function te({attributes:e,graphic:t,relatedInfo:n,fieldInfos:r,fieldInfoMap:i,layer:a,timeZone:o}){e&&t&&n&&Object.keys(t.attributes).forEach((l=>{const u=function(e){return`${T}${e.layerId}/${e.fieldName}`}({layerId:n.relation.id.toString(),fieldName:l}),s=t.attributes[l];e[u]=W({fieldName:u,fieldInfos:r,fieldInfoMap:i,layer:a,value:s,graphic:t,timeZone:o})}))}const ne=e=>{if(!e)return!1;const t=e.toUpperCase();return t.includes("CURRENT_TIMESTAMP")||t.includes("CURRENT_DATE")||t.includes("CURRENT_TIME")},re=({layer:e,method:t,query:n,definitionExpression:r})=>{if(!e.capabilities?.query?.supportsCacheHint||"attachments"===t)return;const i=null!=n.where?n.where:null,a=null!=n.geometry?n.geometry:null;ne(r)||ne(i)||"extent"===a?.type||"tile"===n.resultType||(n.cacheHint=!0)},ie=({query:e,layer:t,method:n})=>{re({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})},ae=({queryPayload:e,layer:t,method:n})=>{re({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??""}`})};function oe(e,t,n){return e&&t&&n?"sublayer"===t.type?se({layers:t.layer?.sublayers,map:e,relatedLayer:t,relationship:n})||se({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:n}):se({layers:e.allLayers,map:e,relatedLayer:t,relationship:n})||se({layers:e.allTables,map:e,relatedLayer:t,relationship:n}):null}function le(e,t){return e&&"utilityNetworks"in e&&t?e.utilityNetworks?.find((e=>e.isUtilityLayer(t))):null}function ue(e,t){return e?.allTables.find((e=>"feature"===e.type&&e.layerId===t.id&&e.url===t.layer?.url))}function se({map:e,relationship:t,relationship:{relatedTableId:n},relatedLayer:r,layers:i}){if(!i)return null;for(const a of i){if("map-image"===a.type){const n=se({layers:a.sublayers,map:e,relatedLayer:r,relationship:t})||se({layers:a.subtables,map:e,relatedLayer:r,relationship:t});if(n)return n;continue}if(!S(a))continue;if("sublayer"===r.type){if(a!==r&&a.id===n)return a.isTable?ue(e,a):a;continue}const i="scene"===r.type&&r.associatedLayer?r.associatedLayer.url:r.url;if(!i)return null;if("sublayer"!==a.type){if(a!==r&&a.url===i&&a.layerId===n)return a}else if(a!==r&&a.layer?.url===i&&a.id===n)return a.isTable?ue(e,a):a}return null}function fe(e){const t=e.getObjectId();return null!=t?`oid:${t}`:`uid:${e.uid}`}}}]);