@arcgis/core 4.28.0-next.20230818 → 4.28.0-next.20230821

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 (200) hide show
  1. package/arcade/functions/centroid.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/003744a45b07865f1be9.js +1 -0
  4. package/assets/esri/core/workers/chunks/034accc7cab6c88a3b31.js +1 -0
  5. package/assets/esri/core/workers/chunks/05ab09713d599687afa3.js +1 -0
  6. package/assets/esri/core/workers/chunks/{3724f23b6f5ac8ec2568.js → 12b8fe0374fa9ab4ca09.js} +1 -1
  7. package/assets/esri/core/workers/chunks/16d1a72014074e87ecb9.js +1 -0
  8. package/assets/esri/core/workers/chunks/{e4b6565c16430b28ad93.js → 19857e5420cdf23c5f2e.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{1a804dea42c0fb5e5c07.js → 1bab408eaffd2c18976d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/201365f53509e3f78e17.js +1 -0
  11. package/assets/esri/core/workers/chunks/{2031451b82ff70fb201a.js → 2f48f4a9a0a056ac5e1c.js} +1 -1
  12. package/assets/esri/core/workers/chunks/318b51fdee09c1fd750f.js +1 -0
  13. package/assets/esri/core/workers/chunks/{5b799dc155adeb728c74.js → 3361e3e8385f8de8820c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/3ce1870c28ab6ac3648e.js +1 -0
  15. package/assets/esri/core/workers/chunks/41929e4531787389804b.js +1 -0
  16. package/assets/esri/core/workers/chunks/{55ac725127c5ea9fb942.js → 4e39252f40bc57be9d12.js} +1 -1
  17. package/assets/esri/core/workers/chunks/4e496b03ce24b1206f86.js +1 -0
  18. package/assets/esri/core/workers/chunks/{ee5f17c1790dc07f9d9e.js → 50455c84131b634ca6b4.js} +1 -1
  19. package/assets/esri/core/workers/chunks/54513578f735d274a20e.js +1 -0
  20. package/assets/esri/core/workers/chunks/{d46f8ef92e79d12384c9.js → 587437526ea77f764986.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{ab720e2f0a35138564b2.js → 5ffabd1a90c5b08109aa.js} +1 -1
  22. package/assets/esri/core/workers/chunks/6108d72faf48a592c8ba.js +1 -0
  23. package/assets/esri/core/workers/chunks/6479439afae01f9bb5e6.js +1 -0
  24. package/assets/esri/core/workers/chunks/69306dfc89e877539223.js +1 -0
  25. package/assets/esri/core/workers/chunks/6db4a6f9d25691830829.js +1 -0
  26. package/assets/esri/core/workers/chunks/{61393fd3376ea599a447.js → 76e27cece1559ae815df.js} +1 -1
  27. package/assets/esri/core/workers/chunks/81526909c0fa11639038.js +1 -0
  28. package/assets/esri/core/workers/chunks/873111ddf4813cdd4903.js +1 -0
  29. package/assets/esri/core/workers/chunks/8d4f1170394a8be15da9.js +1 -0
  30. package/assets/esri/core/workers/chunks/8d8bdfda09c24e363f78.js +1 -0
  31. package/assets/esri/core/workers/chunks/9b54b5bdb6367c36f6e9.js +1 -0
  32. package/assets/esri/core/workers/chunks/b2752e038c5fa3c21e49.js +1 -0
  33. package/assets/esri/core/workers/chunks/{dd3b7cfc6f78552249a4.js → b78dc6cbe14e5817b4d9.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{e31d0c7363cbceeb5ac9.js → c35b850fbfcb28133235.js} +1 -1
  35. package/assets/esri/core/workers/chunks/c83e1be4ee64320cf2fe.js +1 -0
  36. package/assets/esri/core/workers/chunks/c88869d2a647c22dc3e6.js +1 -0
  37. package/assets/esri/core/workers/chunks/cb0a5bc6deaa98026bb5.js +1 -0
  38. package/assets/esri/core/workers/chunks/{767467738aeabec14abd.js → d0c4367a197b193e95d4.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{f113141e254505116b82.js → d1cc2c050423595e54e0.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{7f34945036495ad7c3f8.js → d2a8bf2d090b94cb294b.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{08af7f7f1950a59a8e47.js → d6c96a20e9640b433719.js} +4 -4
  42. package/assets/esri/core/workers/chunks/da5453e67d00ff546640.js +1 -0
  43. package/assets/esri/core/workers/chunks/daa79c14150c12d8bc3d.js +1 -0
  44. package/assets/esri/core/workers/chunks/ef03b78659c72de93076.js +1 -0
  45. package/assets/esri/core/workers/chunks/{c3cace5b25b5170228ba.js → f2fe89b6ac6bf6817e71.js} +1 -1
  46. package/assets/esri/core/workers/chunks/f3554627664a419e00fa.js +1 -0
  47. package/assets/esri/themes/base/_core.scss +2 -0
  48. package/assets/esri/themes/base/widgets/_DirectionalPad.scss +76 -0
  49. package/assets/esri/themes/base/widgets/_Editor.scss +65 -4
  50. package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +97 -39
  51. package/assets/esri/themes/dark/main.css +1 -1
  52. package/assets/esri/themes/light/main.css +1 -1
  53. package/assets/esri/themes/light/view.css +1 -1
  54. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad.json +1 -0
  55. package/assets/esri/widgets/DirectionalPad/t9n/DirectionalPad_en.json +1 -0
  56. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  57. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  58. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-caps/butt.png +0 -0
  59. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-caps/round.png +0 -0
  60. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-caps/square.png +0 -0
  61. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/dash-dot.png +0 -0
  62. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/dash.png +0 -0
  63. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/dot.png +0 -0
  64. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/long-dash-dot-dot.png +0 -0
  65. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/long-dash-dot.png +0 -0
  66. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/long-dash.png +0 -0
  67. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash-dot-dot.png +0 -0
  68. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash-dot.png +0 -0
  69. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash.png +0 -0
  70. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dot.png +0 -0
  71. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/solid.png +0 -0
  72. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations.json +1 -1
  73. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_en.json +1 -1
  74. package/chunks/HighlightBlur.glsl.js +3 -3
  75. package/chunks/HighlightDownsample.glsl.js +24 -6
  76. package/chunks/SSAO.glsl.js +2 -2
  77. package/core/timeUtils.js +1 -1
  78. package/interfaces.d.ts +182 -2
  79. package/intl/date.js +1 -1
  80. package/layers/FeatureLayer.js +1 -1
  81. package/layers/ImageryLayer.js +1 -1
  82. package/layers/ImageryTileLayer.js +1 -1
  83. package/layers/StreamLayer.js +1 -1
  84. package/layers/SubtypeGroupLayer.js +1 -1
  85. package/layers/VoxelWasmPerSceneView.js +1 -1
  86. package/layers/graphics/sources/support/uploads.js +1 -1
  87. package/layers/mixins/ArcGISImageService.js +1 -1
  88. package/layers/mixins/ImageryTileMixin.js +1 -1
  89. package/layers/save/featureLayerUtils.js +1 -1
  90. package/layers/save/imageryUtils.js +1 -1
  91. package/layers/save/streamLayerUtils.js +1 -1
  92. package/libs/maquette-advanced-projector/utils.js +1 -1
  93. package/package.json +1 -1
  94. package/popup/support/FieldInfoFormat.js +1 -1
  95. package/portal/PortalItem.js +1 -1
  96. package/support/revision.js +1 -1
  97. package/views/2d/navigation/MapViewNavigation.js +1 -1
  98. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  99. package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
  100. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  101. package/views/3d/support/LaserLineRenderer.js +1 -1
  102. package/views/3d/terrain/OverlayRenderer.js +1 -1
  103. package/views/3d/terrain/TerrainRenderer.js +1 -1
  104. package/views/3d/terrain/TerrainSurface.js +1 -1
  105. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  106. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  107. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  108. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  109. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  110. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  111. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  112. package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
  113. package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
  114. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  115. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  116. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  117. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  118. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  119. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  120. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  121. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  122. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  123. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  124. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  125. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  126. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  127. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  128. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  129. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  130. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  131. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  132. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  133. package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +1 -1
  134. package/views/draw/DrawGraphicTool.js +1 -1
  135. package/views/draw/DrawOperation.js +1 -1
  136. package/views/interactive/sketch/constraints.js +1 -1
  137. package/views/interactive/sketch/normalizedPoint.js +1 -1
  138. package/views/interactive/snapping/SnappingManager.js +1 -1
  139. package/views/interactive/snapping/candidates/IntersectionSnappingCandidate.js +1 -1
  140. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  141. package/views/interactive/tooltip/TooltipEditableFieldAngle.js +1 -1
  142. package/views/interactive/tooltip/constraintUtils.js +5 -0
  143. package/views/support/angularMeasurementUtils.js +1 -1
  144. package/widgets/Compass/CompassViewModel.js +1 -1
  145. package/widgets/Compass/utils.js +5 -0
  146. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +4 -0
  147. package/widgets/DirectionalPad/DirectionalPadViewModel.js +5 -0
  148. package/widgets/DirectionalPad/VisibleElements.js +5 -0
  149. package/widgets/DirectionalPad/constants.js +5 -0
  150. package/widgets/DirectionalPad/css.js +5 -0
  151. package/widgets/DirectionalPad/utils.js +5 -0
  152. package/widgets/DirectionalPad.d.ts +4 -0
  153. package/widgets/DirectionalPad.js +5 -0
  154. package/widgets/Editor/EditorViewModel.js +1 -1
  155. package/widgets/Editor/Upload.js +1 -1
  156. package/widgets/Editor/components/CreateFeaturesPanelContent.js +1 -1
  157. package/widgets/Editor/components/UploadDetails.js +1 -1
  158. package/widgets/Editor/modelUploadUtils.js +1 -1
  159. package/widgets/Editor.js +1 -1
  160. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  161. package/widgets/ElevationProfile.js +1 -1
  162. package/widgets/Feature/FeatureViewModel.js +1 -1
  163. package/widgets/Feature/support/featureUtils.js +1 -1
  164. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  165. package/widgets/FeatureForm/FieldInput.js +1 -1
  166. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  167. package/widgets/FeatureForm/InputBase.js +1 -1
  168. package/widgets/FeatureForm.js +1 -1
  169. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +5 -0
  170. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  171. package/widgets/UtilityNetworkAssociations/VisibleElements.js +5 -0
  172. package/widgets/UtilityNetworkAssociations/VisibleElementsSettingsPane.js +5 -0
  173. package/widgets/UtilityNetworkAssociations.js +1 -1
  174. package/assets/esri/core/workers/chunks/11abbbf97093b55e2417.js +0 -1
  175. package/assets/esri/core/workers/chunks/1b2a081f2c3b97ba7e00.js +0 -1
  176. package/assets/esri/core/workers/chunks/235f333177ed7ea21e01.js +0 -1
  177. package/assets/esri/core/workers/chunks/3725dd14c2da0f47198f.js +0 -1
  178. package/assets/esri/core/workers/chunks/39467e1da18924cfb9b6.js +0 -1
  179. package/assets/esri/core/workers/chunks/42595c4870c673ed451c.js +0 -1
  180. package/assets/esri/core/workers/chunks/481cdd2a4bc40c6fef66.js +0 -1
  181. package/assets/esri/core/workers/chunks/54893132e70c515ea7e3.js +0 -1
  182. package/assets/esri/core/workers/chunks/6509a4198972b323d9b6.js +0 -1
  183. package/assets/esri/core/workers/chunks/68598d2806d4aa3d8acc.js +0 -1
  184. package/assets/esri/core/workers/chunks/718d2e8ea61f3b7b70c5.js +0 -1
  185. package/assets/esri/core/workers/chunks/7bce4b5eec630ef57f1e.js +0 -1
  186. package/assets/esri/core/workers/chunks/81df7304f97d1fc3ba16.js +0 -1
  187. package/assets/esri/core/workers/chunks/8706dc9f852df9b2095d.js +0 -1
  188. package/assets/esri/core/workers/chunks/8ef26aac0fe7feb8c324.js +0 -1
  189. package/assets/esri/core/workers/chunks/91e61da22f258d9e86c5.js +0 -1
  190. package/assets/esri/core/workers/chunks/9f039bf79b34d8fd75ae.js +0 -1
  191. package/assets/esri/core/workers/chunks/a1f3352301472e4b8956.js +0 -1
  192. package/assets/esri/core/workers/chunks/a20fd9e7db37b3c3b041.js +0 -1
  193. package/assets/esri/core/workers/chunks/aa83dce42d64034a0a13.js +0 -1
  194. package/assets/esri/core/workers/chunks/c8c8471b59700914ee9d.js +0 -1
  195. package/assets/esri/core/workers/chunks/cdcf0a5e05283d37b3ac.js +0 -1
  196. package/assets/esri/core/workers/chunks/d4f9106bf2ea5d66d96a.js +0 -1
  197. package/assets/esri/core/workers/chunks/e6bfbc4347fa13db4df2.js +0 -1
  198. package/assets/esri/core/workers/chunks/f1d5487f2d828fb142ba.js +0 -1
  199. package/assets/esri/core/workers/chunks/f97f165d05439e668e05.js +0 -1
  200. package/assets/esri/core/workers/chunks/fe973d8155c22d73a4f9.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1724,5935],{84552:(e,t,r)=>{r.d(t,{Z:()=>p});var i=r(43697),s=r(2368),n=r(96674),o=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),d=r(78981);let c=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.J)(d.v,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i._)([(0,u.j)("esri.TimeInterval")],c);const p=c},88387:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Y});var i,s=r(43697),n=(r(66577),r(51773)),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423)),l=r(32400),a=r(3172),u=r(2368),d=r(20102),c=r(50758),p=r(22974),y=r(92604),h=r(16453),m=r(95330),f=r(5600),w=r(75215),b=r(71715),v=r(52011),g=r(86973),I=r(87085),S=r(17287),_=r(71612),C=r(17017),j=r(69637),x=r(6404),E=r(38009),F=r(16859),P=r(34760),R=r(72965),T=r(28294),Z=r(21506),O=r(50957),U=r(1231),L=r(53518),M=r(35671),N=r(54306),A=r(30707),D=r(96674);r(67676),r(80442);let q=i=class extends D.wq{constructor(){super(...arguments),this.age=null,this.ageReceived=null,this.displayCount=null,this.maxObservations=1}clone(){return new i({age:this.age,ageReceived:this.ageReceived,displayCount:this.displayCount,maxObservations:this.maxObservations})}};(0,s._)([(0,f.Cb)({type:Number,json:{write:!0}})],q.prototype,"age",void 0),(0,s._)([(0,f.Cb)({type:Number,json:{write:!0}})],q.prototype,"ageReceived",void 0),(0,s._)([(0,f.Cb)({type:Number,json:{write:!0}})],q.prototype,"displayCount",void 0),(0,s._)([(0,f.Cb)({type:Number,json:{write:!0}})],q.prototype,"maxObservations",void 0),q=i=(0,s._)([(0,v.j)("esri.layers.support.PurgeOptions")],q);const k=q;var G=r(40555),V=r(14165),H=r(32163),$=r(86787),J=r(82971),B=r(6570);const Q=(0,L.v)();function z(e,t){return new d.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}let W=class extends((0,x.M)((0,j.b)((0,_.h)((0,T.n)((0,R.M)((0,P.Q)((0,S.Y)((0,E.q)((0,F.I)((0,h.R)((0,C.N)((0,u.J)(I.Z))))))))))))){constructor(...e){super(...e),this.copyright=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.geometryDefinition=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.maxReconnectionAttempts=0,this.maxReconnectionInterval=20,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.operationalLayerType="ArcGISStreamLayer",this.popupEnabled=!0,this.popupTemplate=null,this.purgeOptions=new k,this.refreshInterval=0,this.screenSizePerspectiveEnabled=!0,this.sourceJSON=null,this.spatialReference=J.Z.WGS84,this.type="stream",this.url=null,this.updateInterval=300,this.useViewTime=!0,this.webSocketUrl=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){if(!("WebSocket"in globalThis))return this.addResolvingPromise(Promise.reject(new d.Z("stream-layer:websocket-unsupported","WebSocket is not supported in this browser. StreamLayer will not have real-time connection with the stream service."))),Promise.resolve(this);const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Stream Service","Feed"]},e).catch(m.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}set renderer(e){(0,M.YN)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=(0,o.a)(i,t,r)||void 0;return e||y.Z.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return(0,O.Ob)(t,r)}async connect(e){const[{createConnection:t}]=await Promise.all([Promise.all([r.e(4599),r.e(5660)]).then(r.bind(r,95047)),this.load()]),i=this.geometryType?g.M.toJSON(this.geometryType):null,{customParameters:s=null,definitionExpression:n=null,geometryDefinition:o=null,maxReconnectionAttempts:l=0,maxReconnectionInterval:a=20,spatialReference:u=this.spatialReference}=e||this.createConnectionParameters(),d=t(this.parsedUrl,this.spatialReference,u,i,{geometry:o,where:n},l,a,s??void 0),p=(0,c.AL)([this.on("send-message-to-socket",(e=>d.sendMessageToSocket(e))),this.on("send-message-to-client",(e=>d.sendMessageToClient(e)))]);return d.once("destroy",p.remove),d}createConnectionParameters(){return{spatialReference:this.spatialReference,customParameters:this.customParameters,definitionExpression:this.definitionExpression,geometryDefinition:this.geometryDefinition,maxReconnectionAttempts:this.maxReconnectionAttempts,maxReconnectionInterval:this.maxReconnectionInterval}}createPopupTemplate(e){return(0,H.eZ)(this,e)}createQuery(){const e=new V.Z;return e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1",e}getFieldDomain(e,t){if(!this.fields)return null;let r=null;return this.fields.some((t=>(t.name===e&&(r=t.domain),!!r))),r}getField(e){return this.fieldsIndex.get(e)}serviceSupportsSpatialReference(e){return!0}sendMessageToSocket(e){this.emit("send-message-to-socket",e)}sendMessageToClient(e){this.emit("send-message-to-client",e)}async save(e){const{save:t}=await r.e(4330).then(r.bind(r,94330));return t(this,e)}async saveAs(e,t){const{saveAs:i}=await r.e(4330).then(r.bind(r,94330));return i(this,e,t)}write(e,t){const r=t?.messages;return this.webSocketUrl?(r?.push(z(this,"using a custom websocket connection cannot be written to web scenes and web maps")),null):this.parsedUrl?super.write(e,t):(r?.push(z(this,"using a client-side only connection without a url cannot be written to web scenes and web maps")),null)}async _fetchService(e){if(!this.webSocketUrl&&this.parsedUrl){if(!this.sourceJSON){const{data:t}=await(0,a.Z)(this.parsedUrl.path,{query:{f:"json",...this.customParameters,...this.parsedUrl.query},responseType:"json",signal:e});this.sourceJSON=t}}else{if(!this.timeInfo?.trackIdField)throw new d.Z("stream-layer:missing-metadata","The stream layer trackIdField must be specified.");if(!this.objectIdField){const e=this.fields.find((e=>"oid"===e.type))?.name;if(!e)throw new d.Z("stream-layer:missing-metadata","The stream layer objectIdField must be specified.");this.objectIdField=e}if(!this.fields)throw new d.Z("stream-layer:missing-metadata","The stream layer fields must be specified.");if(this.fields.some((e=>e.name===this.objectIdField))||this.fields.push(new U.Z({name:this.objectIdField,alias:this.objectIdField,type:"oid"})),!this.geometryType)throw new d.Z("stream-layer:missing-metadata","The stream layer geometryType must be specified.");this.webSocketUrl&&(this.url=this.webSocketUrl)}return this.read(this.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}),(0,M.YN)(this.renderer,this.fieldsIndex),(0,M.UF)(this.timeInfo,this.fieldsIndex),this.objectIdField||(this.objectIdField="__esri_stream_id__"),(0,G.y)(this,{origin:"service"})}};(0,s._)([(0,f.Cb)({type:String})],W.prototype,"copyright",void 0),(0,s._)([(0,f.Cb)({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,f.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],W.prototype,"definitionExpression",void 0),(0,s._)([(0,f.Cb)({type:String})],W.prototype,"displayField",void 0),(0,s._)([(0,f.Cb)({type:$.Z})],W.prototype,"elevationInfo",void 0),(0,s._)([(0,f.Cb)({json:{origins:{"web-map":{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],W.prototype,"featureReduction",null),(0,s._)([(0,f.Cb)(Q.fields)],W.prototype,"fields",void 0),(0,s._)([(0,f.Cb)(Q.fieldsIndex)],W.prototype,"fieldsIndex",void 0),(0,s._)([(0,f.Cb)({type:B.Z,json:{name:"layerDefinition.definitionGeometry",write:!0}})],W.prototype,"geometryDefinition",void 0),(0,s._)([(0,f.Cb)({type:g.M.apiValues,json:{read:{reader:g.M.read}}})],W.prototype,"geometryType",void 0),(0,s._)([(0,f.Cb)(Z.iR)],W.prototype,"labelsVisible",void 0),(0,s._)([(0,f.Cb)({type:[N.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:A.r},write:!0}})],W.prototype,"labelingInfo",void 0),(0,s._)([(0,f.Cb)(Z.rn)],W.prototype,"legendEnabled",void 0),(0,s._)([(0,f.Cb)({type:["show","hide"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],W.prototype,"listMode",void 0),(0,s._)([(0,f.Cb)({type:w.z8})],W.prototype,"maxReconnectionAttempts",void 0),(0,s._)([(0,f.Cb)({type:w.z8})],W.prototype,"maxReconnectionInterval",void 0),(0,s._)([(0,f.Cb)(Z.u1)],W.prototype,"maxScale",void 0),(0,s._)([(0,f.Cb)(Z.rO)],W.prototype,"minScale",void 0),(0,s._)([(0,f.Cb)({type:String})],W.prototype,"objectIdField",void 0),(0,s._)([(0,f.Cb)({value:"ArcGISStreamLayer",type:["ArcGISStreamLayer"]})],W.prototype,"operationalLayerType",void 0),(0,s._)([(0,f.Cb)(Z.C_)],W.prototype,"popupEnabled",void 0),(0,s._)([(0,f.Cb)({type:n.Z,json:{name:"popupInfo",write:!0}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,f.Cb)({type:k})],W.prototype,"purgeOptions",void 0),(0,s._)([(0,f.Cb)({json:{read:!1,write:!1}})],W.prototype,"refreshInterval",void 0),(0,s._)([(0,f.Cb)({types:l.A,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{name:"layerDefinition.drawingInfo.renderer",types:l.o,write:!0}},write:{target:"layerDefinition.drawingInfo.renderer"}}})],W.prototype,"renderer",null),(0,s._)([(0,b.r)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,b.r)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],W.prototype,"readRenderer",null),(0,s._)([(0,f.Cb)((()=>{const e=(0,p.d9)(Z.YI);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],W.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,f.Cb)()],W.prototype,"sourceJSON",void 0),(0,s._)([(0,f.Cb)({type:J.Z,json:{origins:{service:{read:{source:"spatialReference"}}}}})],W.prototype,"spatialReference",void 0),(0,s._)([(0,f.Cb)({json:{read:!1}})],W.prototype,"type",void 0),(0,s._)([(0,f.Cb)(Z.HQ)],W.prototype,"url",void 0),(0,s._)([(0,f.Cb)({type:Number})],W.prototype,"updateInterval",void 0),(0,s._)([(0,f.Cb)({json:{read:!1,write:!1}})],W.prototype,"useViewTime",void 0),(0,s._)([(0,f.Cb)({type:String})],W.prototype,"webSocketUrl",void 0),W=(0,s._)([(0,v.j)("esri.layers.StreamLayer")],W);const Y=W},17287:(e,t,r)=>{r.d(t,{Y:()=>a});var i=r(43697),s=r(92604),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),l=r(66677);const a=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,l.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,s.Z.getLogger(this)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>o});var i=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,n.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},69637:(e,t,r)=>{r.d(t,{b:()=>E});var i,s=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),l=r(20102),a=r(96674),u=r(78286),d=r(67760),c=r(66577),p=r(92835),y=r(35454),h=r(22974),m=r(14165);const f=new y.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),w=new y.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let b=i=class extends a.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:s,objectIds:n,units:o,distance:l}=this;return new m.Z({geometry:(0,h.d9)(r),objectIds:(0,h.d9)(n),spatialRelationship:i,timeExtent:(0,h.d9)(s),where:t,units:o,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:s,objectIds:n,units:o,distance:l}=this;return new i({geometry:(0,h.d9)(t),objectIds:(0,h.d9)(n),spatialRelationship:r,timeExtent:(0,h.d9)(s),where:e,units:o,distance:l})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],b.prototype,"where",void 0),(0,s._)([(0,n.Cb)({types:c.qM,json:{write:!0}})],b.prototype,"geometry",void 0),(0,s._)([(0,n.Cb)({type:f.apiValues,json:{name:"spatialRel",read:{reader:f.read},write:{allowNull:!1,writer:f.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],b.prototype,"spatialRelationship",void 0),(0,s._)([(0,n.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],b.prototype,"distance",void 0),(0,s._)([(0,n.Cb)({type:[Number],json:{write:!0}})],b.prototype,"objectIds",void 0),(0,s._)([(0,n.Cb)({type:w.apiValues,json:{read:w.read,write:{writer:w.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],b.prototype,"units",void 0),(0,s._)([(0,n.Cb)({type:p.Z,json:{write:!0}})],b.prototype,"timeExtent",void 0),b=i=(0,s._)([(0,o.j)("esri.layers.support.FeatureFilter")],b);const v=b;var g;const I={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},_={name:"showExcludedLabels",default:!0};let C=g=class extends a.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new g({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,s._)([(0,n.Cb)({type:v,json:{write:{allowNull:!0,writer(e,t,r,i){const s=e?.write({},i);s&&0!==Object.keys(s).length?(0,u.RB)(r,s,t):(0,u.RB)(r,null,t)}}}})],C.prototype,"filter",void 0),(0,s._)([(0,n.Cb)({json:{write:!0,origins:{"web-map":I,"portal-item":I}}})],C.prototype,"includedEffect",void 0),(0,s._)([(0,n.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],C.prototype,"excludedEffect",void 0),(0,s._)([(0,n.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":_,"portal-item":_}}})],C.prototype,"excludedLabelsVisible",void 0),C=g=(0,s._)([(0,o.j)("esri.layers.support.FeatureEffect")],C);const j=C,x={write:{allowNull:!0}},E=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,s._)([(0,n.Cb)({type:j,json:{origins:{"web-map":x,"portal-item":x}}})],t.prototype,"featureEffect",void 0),t=(0,s._)([(0,o.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>S});var i=r(43697),s=r(68773),n=r(40330),o=r(3172),l=r(66643),a=r(20102),u=r(92604),d=r(70586),c=r(95330),p=r(17452),y=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),f=r(30556),w=r(84230),b=r(48522),v=r(15235),g=r(86082),I=r(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,I.Ss)(r);let s,o;if(i)s=r.portal.url;else try{s=await(0,w.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!s||!(0,p.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,I.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=b.Z.getDefault();if(s&&s.loaded&&(0,p.Fv)(s.restUrl)===(0,p.Fv)(i))return s.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,d=await(0,l.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return d.ok?g.Z.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&i&&!(0,p.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},28294:(e,t,r)=>{r.d(t,{n:()=>p});var i=r(43697),s=r(92835),n=r(84552),o=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(35671),d=r(76259),c=r(78981);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=c.v.fromJSON(r.timeOffsetUnits);return i&&s?new n.Z({value:i,unit:s}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,o.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,o.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,o.Cb)({value:null,type:d.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,o.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},76259:(e,t,r)=>{r.d(t,{Z:()=>m});var i=r(43697),s=r(92835),n=r(84552),o=r(2368),l=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),c=r(30556),p=r(80216);function y(e,t){return n.Z.fromJSON({value:e,unit:t})}let h=class extends((0,o.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new s.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,a.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,c.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,a.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,c.c)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,a.Cb)({type:p.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"timeReference",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,i._)([(0,d.j)("esri.layers.support.TimeInfo")],h);const m=h},66677:(e,t,r)=>{r.d(t,{B5:()=>d,DR:()=>p,G:()=>v,M8:()=>m,Nm:()=>f,Qc:()=>c,XG:()=>w,a7:()=>h,ld:()=>y,wH:()=>b});var i=r(17452),s=r(25929);const n={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(n),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return!!l.test(e)}function c(e){if(null==e)return null;const t=(0,i.mN)(e),r=t.path.match(l)||t.path.match(a);if(!r)return null;const[,s,o,u,d]=r,c=o.indexOf("/");return{title:y(-1!==c?o.slice(c+1):o),serverType:n[u.toLowerCase()],sublayer:null!=d&&""!==d?parseInt(d,10):null,url:{path:s}}}function p(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function y(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function h(e,t){const r=[];if(e){const t=c(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=y(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function m(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),r=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&r}function f(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function w(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const r=(0,i.mN)(t),s=c(r.path);let n;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(n=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=p(r.path);null!=e&&(t=e.serviceUrl,n=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:n}}function b(e,t,r,n,o){(0,s.w)(t,n,"url",o),n.url&&null!=e.layerId&&(n.url=(0,i.v_)(n.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),n=t.includes("/wmsserver");return r&&(i||s||n)}},50957:(e,t,r)=>{r.d(t,{C9:()=>F,Ci:()=>S,FV:()=>I,Fr:()=>m,JD:()=>f,JY:()=>O,Jj:()=>v,KE:()=>x,Ob:()=>A,SU:()=>_,VG:()=>j,Y5:()=>b,gG:()=>P,kZ:()=>Z,kp:()=>E,nU:()=>L,rP:()=>R,rk:()=>T,sX:()=>M,tD:()=>C,uA:()=>D,uj:()=>g});var i=r(40330),s=r(9790),n=r(20102),o=r(35454),l=r(42033),a=r(63213),u=r(84230),d=r(84382),c=r(81571),p=r(56545),y=r(14165),h=r(75935);const m=new o.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function f(e,t,r,i){const s=await U(e);if(await w(e,t,i),!s.addAttachment)throw new n.Z(i,"Layer source does not support addAttachment capability");return s.addAttachment(t,r)}function w(e,t,r){const{attributes:i}=t,{objectIdField:s}=e;return e.capabilities?.data?.supportsAttachment?t?i?s&&i[s]?Promise.resolve():Promise.reject(new n.Z(r,`feature is missing the identifying attribute ${s}`)):Promise.reject(new n.Z(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n.Z(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n.Z(r,"this layer doesn't support attachments"))}async function b(e,t,r,i,s){const o=await U(e);if(await w(e,t,s),!o.updateAttachment)throw new n.Z(s,"Layer source does not support updateAttachment capability");return o.updateAttachment(t,r,i)}async function v(e,t,i){const{applyEdits:s}=await r.e(4720).then(r.bind(r,14720)),n=await e.load();return s(n,n.source,t,i)}async function g(e,t,i){const{uploadAssets:s}=await r.e(4720).then(r.bind(r,14720)),n=await e.load();return s(n,n.source,t,i)}async function I(e,t,r,i){const s=await U(e);if(await w(e,t,i),!s.deleteAttachments)throw new n.Z(i,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r)}async function S(e,t,r){const i=(await e.load({signal:t?.signal})).source;if(!i.fetchRecomputedExtents)throw new n.Z(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function _(e,t,r,i){t=p.Z.from(t),await e.load();const s=e.source,o=e.capabilities;if(!o?.data?.supportsAttachment)throw new n.Z(i,"this layer doesn't support attachments");const{attachmentTypes:l,objectIds:a,globalIds:u,num:d,size:c,start:y,where:h}=t;if(!o?.operations?.supportsQueryAttachments&&(l?.length>0||u?.length>0||c?.length>0||d||y||h))throw new n.Z(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(a?.length||u?.length||h))throw new n.Z(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!s.queryAttachments)throw new n.Z(i,"Layer source does not support queryAttachments capability",t);return s.queryAttachments(t)}async function C(e,t,r,i){const s=await U(e);if(!s.queryObjectIds)throw new n.Z(i,"Layer source does not support queryObjectIds capability");return s.queryObjectIds(y.Z.from(t)??e.createQuery(),r)}async function j(e,t,r,i){const s=await U(e);if(!s.queryFeatureCount)throw new n.Z(i,"Layer source does not support queryFeatureCount capability");return s.queryFeatureCount(y.Z.from(t)??e.createQuery(),r)}async function x(e,t,r,i){const s=await U(e);if(!s.queryExtent)throw new n.Z(i,"Layer source does not support queryExtent capability");return s.queryExtent(y.Z.from(t)??e.createQuery(),r)}async function E(e,t,r,i){const s=await U(e);if(!s.queryRelatedFeatures)throw new n.Z(i,"Layer source does not support queryRelatedFeatures capability");return s.queryRelatedFeatures(h.default.from(t),r)}async function F(e,t,r,i){const s=await U(e);if(!s.queryRelatedFeaturesCount)throw new n.Z(i,"Layer source does not support queryRelatedFeaturesCount capability");return s.queryRelatedFeaturesCount(h.default.from(t),r)}async function P(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:i}=await t.refresh();if(null!=i&&(e.sourceJSON={...e.sourceJSON,...i},e.read(i,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.E)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function R(e){const t=new y.Z,r=e.capabilities?.data,i=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,i&&(t.compactGeometryEnabled=i.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=i.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:s,timeExtent:n}=e;return t.timeExtent=null!=s&&null!=n?n.offset(-s.value,s.unit):n||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function T(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function Z(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function O(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function U(e){return(await e.load()).source}async function L(e,t,r){const s=e.parsedUrl?.path;s&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!i.id)return;if(i.id.findCredential(e))return;let r;try{const s=await(0,u.oP)(e,t);s&&(r=await i.id.checkSignInStatus(`${s}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await i.id.getCredential(e,{signal:r})}catch(e){}}(s,r)}function M(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const N=(0,a.d)({types:s.QT});function A(e,t){if(e.defaultSymbol)return e.types&&e.types.length?new c.Z({defaultSymbol:N(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:N(e.symbol,e,t)})))}):new d.Z({symbol:N(e.defaultSymbol,e,t)})}function D(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}},53518:(e,t,r)=>{r.d(t,{v:()=>l});var i=r(92604),s=r(1231),n=r(99514),o=r(35671);function l(){return{fields:{type:[s.Z],value:null},fieldsIndex:{readOnly:!0,get(){return new n.Z(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,o.Q0)(this.fieldsIndex,e)}}}}},30707:(e,t,r)=>{r.d(t,{a:()=>c,r:()=>u});var i=r(20102),s=r(22974),n=r(92604),o=r(54306);const l=n.Z.getLogger("esri.layers.support.labelingInfo"),a=/\[([^\[\]]+)\]/gi;function u(e,t,r){return e?e.map((e=>{const i=new o.Z;if(i.read(e,r),i.labelExpression){const e=t.fields||t.layerDefinition&&t.layerDefinition.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`))}return i})):null}const d={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null};function c(e,t){const r=(0,s.d9)(e);return r.some((e=>function(e,t){const r=e.labelPlacement,s=d[t];if(!e.symbol)return l.warn("No ILabelClass symbol specified."),!0;if(!s)return l.error(new i.Z("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),!0;if(!s.includes(r)){const i=s[0];r&&l.warn(`Found invalid label placement type ${r} for ${t}. Defaulting to ${i}`),e.labelPlacement=i}return!1}(e,t)))?[]:r}},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},40555:(e,t,r)=>{r.d(t,{y:()=>o});var i=r(66643),s=r(95330),n=r(20941);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const l=await(0,i.q6)(o.populateFromStyle());if((0,s.k_)(r),!1===l.ok){const r=l.error;t&&t.messages&&t.messages.push(new n.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},75935:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,s=r(43697),n=(r(66577),r(96674)),o=r(22974),l=r(5600),a=r(75215),u=r(52011),d=r(30556),c=r(10158),p=r(82971);let y=i=class extends n.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,s._)([(0,l.Cb)({type:c.n,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,s._)([(0,l.Cb)({type:Date})],y.prototype,"historicMoment",void 0),(0,s._)([(0,d.c)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,l.Cb)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,s._)([(0,l.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,s._)([(0,l.Cb)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,s._)([(0,l.Cb)({type:p.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,s._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,s._)([(0,d.c)("start"),(0,d.c)("num")],y.prototype,"writeStart",null),(0,s._)([(0,l.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,s._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,s._)([(0,l.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=i=(0,s._)([(0,u.j)("esri.rest.support.RelationshipQuery")],y),y.from=(0,a.se)(y);const h=y},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>s,eG:()=>a,lF:()=>o,lj:()=>d,qP:()=>l,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2462,5732],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var n,s=r(43697),i=r(66577),o=r(51773),l=r(9790),a=r(2368),u=r(96674),c=r(99001),m=r(5600),p=(r(75215),r(67676),r(80442),r(52011)),d=r(33955);function h(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let y=n=class extends((0,a.J)(u.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,c.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,n){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:n}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:h(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(s.action=n),"attributes"===e&&(s.attributeName=n),this.layer.graphicChanged(s)}};(0,s._)([(0,m.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,d.im)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,s._)([(0,m.Cb)({value:null})],y.prototype,"attributes",null),(0,s._)([(0,m.Cb)({value:null,types:i.qM,json:{read:d.im}})],y.prototype,"geometry",null),(0,s._)([(0,m.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,s._)([(0,m.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,s._)([(0,m.Cb)({type:o.Z})],y.prototype,"popupTemplate",void 0),(0,s._)([(0,m.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,s._)([(0,m.Cb)({value:null,types:l.LB})],y.prototype,"symbol",null),(0,s._)([(0,m.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=n=(0,s._)([(0,p.j)("esri.Graphic")],y),(y||(y={})).generateUID=c.D;const f=y},92835:(e,t,r)=>{r.d(t,{Z:()=>h});var n,s=r(43697),i=r(96674),o=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),c=r(30556);let m=n=class extends i.wq{static get allTime(){return p}static get empty(){return d}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===n&&r===s}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.JE)(r,e,t));let s=this.end;if(s){const r=(0,o.JE)(s,e,t);s=s.getTime()===r.getTime()?r:(0,o.Nm)(r,1,e,t)}return new n({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,i=e.end?.getTime()??1/0;let o,l;if(s>=t&&s<=r?o=s:t>=s&&t<=i&&(o=t),r>=s&&r<=i?l=r:i>=t&&i<=r&&(l=i),null!=o&&null!=l&&!isNaN(o)&&!isNaN(l)){const e=new n;return e.start=o===-1/0?null:new Date(o),e.end=l===1/0?null:new Date(l),e}return n.empty}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime)return this.clone();const s=new n,{start:i,end:l}=this;return null!=i&&(s.start=(0,o.Nm)(i,e,t,r)),null!=l&&(s.end=(0,o.Nm)(l,e,t,r)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"end",void 0),(0,s._)([(0,a.r)("end")],m.prototype,"readEnd",null),(0,s._)([(0,c.c)("end")],m.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],m.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],m.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"start",void 0),(0,s._)([(0,a.r)("start")],m.prototype,"readStart",null),(0,s._)([(0,c.c)("start")],m.prototype,"writeStart",null),m=n=(0,s._)([(0,u.j)("esri.TimeExtent")],m);const p=new m,d=new m({start:void 0,end:void 0}),h=m},84552:(e,t,r)=>{r.d(t,{Z:()=>p});var n=r(43697),s=r(2368),i=r(96674),o=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),c=r(78981);let m=class extends((0,s.J)(i.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,a.J)(c.v,{nonNullable:!0})],m.prototype,"unit",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],m.prototype,"value",void 0),m=(0,n._)([(0,u.j)("esri.TimeInterval")],m);const p=m},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>s});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},25929:(e,t,r)=>{r.d(t,{M:()=>h,a:()=>f,e:()=>p,f:()=>s,i:()=>c,p:()=>m,r:()=>o,t:()=>i,w:()=>l});var n=r(17452);function s(e,t){const r=t&&t.url&&t.url.path;if(e&&r&&(e=(0,n.hF)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,n.PF)(e,t.portalItem.itemUrl);null!=r&&u.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return d(e,t&&t.portal)}function i(e,t,r=h.YES){if(null==e)return e;!(0,n.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,n.hF)(e);if(t){const r=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(r){const i=d(r,t.portal),o=d(s,t.portal);s=(0,n.PF)(o,i,i),null!=s&&s!==o&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=p(s,t?.portal),(0,n.YP)(s)&&(s=(0,n.Fv)(s)),t?.resources&&t?.portalItem&&!(0,n.YP)(s)&&!(0,n.HK)(s)&&r===h.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function o(e,t,r){return s(e,r)}function l(e,t,r,n){const s=i(e,n);void 0!==s&&(t[r]=s)}const a=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function c(e){const t=e?.match(a)??null;return t?.[1]??null}function m(e){const t=e?.match(a)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,n.fZ)(r);return{prefix:null,filename:e,extension:t}}const{path:i,extension:o}=(0,n.fZ)(r.slice(s+1));return{prefix:r.slice(0,s),filename:i,extension:o}}function p(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,n.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function d(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,n.TI)();return(0,n.D6)(s,`${s.scheme}://${r}`)?(0,n.Ie)(e,t.portalHostname,r):(0,n.Ie)(e,r,t.portalHostname)}var h,y;(y=h||(h={}))[y.YES=0]="YES",y[y.NO=1]="NO";const f=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return h},ensureMainOnlineDomain:p,fromJSON:s,itemIdFromResourceUrl:c,prefixAndFilenameFromResourceUrl:m,read:o,toJSON:i,write:l},Symbol.toStringTag,{value:"Module"}))},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(43697),s=r(46791),i=(r(66643),r(20102),r(92604),r(26258),r(87538)),o=r(5600),l=r(52011);let a=class extends s.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,i.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n._)([(0,o.Cb)()],a.prototype,"getCollections",void 0),(0,n._)([(0,o.Cb)()],a.prototype,"getChildrenFunction",void 0),(0,n._)([(0,o.Cb)()],a.prototype,"itemFilterFunction",void 0),a=(0,n._)([(0,l.j)("esri.core.CollectionFlattener")],a);const u=a},17445:(e,t,r)=>{r.d(t,{N1:()=>p,YP:()=>a,Z_:()=>y,gx:()=>u,nn:()=>f,on:()=>m,tX:()=>g}),r(66643),r(46791);var n=r(91460),s=r(50758),i=r(70586),o=r(95330),l=r(26258);function a(e,t,r={}){return c(e,t,r,d)}function u(e,t,r={}){return c(e,t,r,h)}function c(e,t,r={},n){let s=null;const o=r.once?(e,r)=>{n(e)&&((0,i.hw)(s),t(e,r))}:(e,r)=>{n(e)&&t(e,r)};if(s=(0,l.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return s}function m(e,t,r,o={}){let l=null,u=null,c=null;function m(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function p(e){o.once&&o.once&&(0,i.hw)(c),r(e)}const d=a(e,((e,r)=>{m(),(0,n.vT)(e)&&(l=e,u=(0,n.on)(e,t,p),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return c=(0,s.kB)((()=>{d.remove(),m()})),c}function p(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const n=e();if(t?.(n))return Promise.resolve(n);let l=null;function a(){l=(0,i.hw)(l)}return new Promise(((n,i)=>{l=(0,s.AL)([(0,o.fu)(r,(()=>{a(),i((0,o.zE)())})),c(e,(e=>{a(),n(e)}),{sync:!1,once:!0},t??d)])}))}(e,h,t)}function d(e){return!0}function h(e){return!!e}r(87538);const y={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>l,Nm:()=>o,rJ:()=>a});var n=r(90344),s=r(17126);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function o(e,t,r,n="system"){const i=c(n),o=s.ou.fromJSDate(e,{zone:i}),l="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),o.plus({[l]:t}).toJSDate()}function l(e,t,r="system"){const n=c(r),i=s.ou.fromJSDate(e,{zone:n});if("decades"===t||"centuries"===t){const e=i.startOf("year"),{year:r}=e,n=r-r%("decades"===t?10:100);return e.set({year:n}).toJSDate()}const o=u(t);return i.startOf(o).toJSDate()}function a(e,t,r){return 0===e?0:e*i[t]/i[r]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}function c(e){const t=(0,n.f1)(e);return t?new s.vF(t):s.Oh.instance}},91040:(e,t,r)=>{r.d(t,{yZ:()=>i});var n=r(67900);const s=96;function i(e,t){const r=t||e.extent,i=e.width,o=(0,n.c9)(r&&r.spatialReference);return r&&i?r.width/i*o*n.hd*s:0}},90344:(e,t,r)=>{r.d(t,{LJ:()=>C,Xr:()=>g,Ze:()=>_,cZ:()=>u,f1:()=>T,i$:()=>S,o8:()=>I,p6:()=>x});var n=r(35454),s=r(70171),i=r(17126);const o={year:void 0,month:void 0,day:void 0,weekday:void 0},l={hour:void 0,minute:void 0,second:void 0},a={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},u={timeZone:"Etc/UTC"},c={year:"numeric",month:"numeric",day:"numeric"},m={year:"numeric",month:"long",day:"numeric"},p={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},h={hour:"numeric",minute:"numeric"},y={...h,second:"numeric"},f={"short-date":c,"short-date-short-time":{...c,...h},"short-date-short-time-24":{...c,...h,hour12:!1},"short-date-long-time":{...c,...y},"short-date-long-time-24":{...c,...y,hour12:!1},"short-date-le":c,"short-date-le-short-time":{...c,...h},"short-date-le-short-time-24":{...c,...h,hour12:!1},"short-date-le-long-time":{...c,...y},"short-date-le-long-time-24":{...c,...y,hour12:!1},"long-month-day-year":m,"long-month-day-year-short-time":{...m,...h},"long-month-day-year-short-time-24":{...m,...h,hour12:!1},"long-month-day-year-long-time":{...m,...y},"long-month-day-year-long-time-24":{...m,...y,hour12:!1},"day-short-month-year":p,"day-short-month-year-short-time":{...p,...h},"day-short-month-year-short-time-24":{...p,...h,hour12:!1},"day-short-month-year-long-time":{...p,...y},"day-short-month-year-long-time-24":{...p,...y,hour12:!1},"long-date":d,"long-date-short-time":{...d,...h},"long-date-short-time-24":{...d,...h,hour12:!1},"long-date-long-time":{...d,...y},"long-date-long-time-24":{...d,...y,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":h,"long-time":y},g=(0,n.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),b={ar:"ar-u-nu-latn-ca-gregory"};let v=new WeakMap;const w=f["short-date-short-time"];function _(e){return f[e]}function x(e,t=w){return function(e){let t=v.get(e);if(!t){const r=(0,s.Kd)(),n=b[r]||r,i=T(e.timeZone??"system"),o={...e,timeZone:i};t=new Intl.DateTimeFormat(n,o),v.set(e,t)}return t}(t).format(e)}function I(e,t=w){return x(new Date(e),{...t,...u,...l})}function C(e,t=w){return x(new Date(`1970-01-01T${e}Z`),{...t,...u,...o})}function S(e,t=w){const r=i.ou.fromISO(e,{setZone:!0}),n=(0,s.Kd)(),o=b[n]??n;return r.toLocaleString({...a,...t},{locale:o})}function T(e){switch(e){case"system":return;case"unknown":return"UTC";default:return e}}(0,s.Ze)((()=>{v=new WeakMap}))},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>xe});var n=r(43697),s=r(68773),i=r(38171),o=r(51773),l=r(3172),a=r(46791),u=r(57435),c=r(35454),m=r(22974),p=r(16453),d=r(95330),h=r(17445),y=r(17452),f=r(5600),g=r(75215),b=r(71715),v=r(52011),w=r(30556),_=r(76169),x=r(6570),I=r(82971),C=r(91040),S=r(8744),T=r(87085),E=r(71612),N=r(38009),F=r(16859),O=r(34760),P=r(72965),L=r(28294),U=r(52162),R=r(66677),j=r(21506),A=r(92036),M=r(67676);r(80442);const D={visible:"visibleSublayers"};let Z=class extends A.Z{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(D[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,n=[],s=e=>{const{minScale:r,maxScale:i,sublayers:o,visible:l}=e;l&&(0===t||(0===r||t<=r)&&(0===i||t>=i))&&(o?o.forEach(s):n.push(e))};return r?.forEach(s),n}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:n,version:s}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:n?"TRUE":"FALSE",version:s,layers:t}}};(0,n._)([(0,f.Cb)()],Z.prototype,"layer",null),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"layers",null),(0,n._)([(0,f.Cb)({type:Number})],Z.prototype,"scale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"version",null),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"visibleSublayers",null),Z=(0,n._)([(0,v.j)("esri.layers.support.ExportWMSImageParameters")],Z);var k,$=r(90082),q=r(10699),H=r(90578);let B=0,J=k=class extends((0,q.IG)(p.w)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),h.Z_),(0,h.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.Z_)])}get id(){return this._get("id")??B++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,g.se)(a.Z.ofType(k),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new k;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers&&this.sublayers.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,n._)([(0,f.Cb)()],J.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({type:x.Z,json:{name:"extent"}})],J.prototype,"fullExtent",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],J.prototype,"id",null),(0,n._)([(0,f.Cb)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],J.prototype,"legendUrl",void 0),(0,n._)([(0,b.r)("legendUrl",["legendUrl","legendURL"])],J.prototype,"readLegendUrl",null),(0,n._)([(0,f.Cb)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],J.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"layer",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"maxScale",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"minScale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"effectiveScaleRange",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"name",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"parent",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],J.prototype,"popupEnabled",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],J.prototype,"queryable",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"sublayers",void 0),(0,n._)([(0,H.p)("sublayers")],J.prototype,"castSublayers",null),(0,n._)([(0,f.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],J.prototype,"spatialReferences",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"title",void 0),(0,n._)([(0,f.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],J.prototype,"visible",null),J=k=(0,n._)([(0,v.j)("esri.layers.support.WMSSublayer")],J);const G=J;var W=r(20102);const V={84:4326,83:4269,27:4267};function Y(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new W.Z("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=Q("Capability",r),s=Q("Service",r),i=n&&Q("Request",n);if(!n||!s||!i)return null;const o=Q("Layer",n);if(!o)return null;const l="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",a=te("Title",s,"")||te("Name",s,""),u=te("AccessConstraints",s,""),c=/^none$/i.test(u)?"":u,m=te("Abstract",s,""),p=parseInt(te("MaxWidth",s,"5000"),10),d=parseInt(te("MaxHeight",s,"5000"),10),h=se(i,"GetMap"),y=ne(i,"GetMap"),f=oe(o,l,t);if(!f)return null;let g,b=0;const v=Array.prototype.slice.call(n.childNodes),w=f.sublayers??[],_=e=>{null!=e&&w.push(e)};v.forEach((e=>{"Layer"===e.nodeName&&(0===b?g=e:1===b?(f.name&&(f.name="",_(oe(g,l,t))),_(oe(e,l,t))):_(oe(e,l,t)),b++)}));let I=f.sublayers,C=f.extent;const S=f.fullExtents??[];if(I||(I=[]),0===I.length&&I.push(f),!C){const e=new x.Z(I[0].extent);f.extent=e.toJSON(),C=f.extent}const T=f.spatialReferences.length>0?f.spatialReferences:X(f),E=ne(i,"GetFeatureInfo"),N=E?se(i,"GetFeatureInfo"):null,F=z(I),O=f.minScale||0,P=f.maxScale||0,L=f.dimensions??[],U=F.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),R=L.concat(U).filter(ae);let j=null;if(R.length){const e=R.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(M.pC);j={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:c,description:m,dimensions:L,extent:C,fullExtents:S,featureInfoFormats:N,featureInfoUrl:E,mapUrl:y,maxWidth:p,maxHeight:d,maxScale:P,minScale:O,layers:F,spatialReferences:T,supportedImageFormatTypes:h,timeInfo:j,title:a,version:l}}function X(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=X(t);if(e.length>0)return e}return[]}function z(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(z(r.sublayers)),delete r.sublayers);return t}function K(e,t,r){return t.getAttribute(e)??r}function Q(e,t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(le(n)&&n.nodeName===e)return n}return null}function ee(e,t){if(null==t)return[];const r=[];for(let n=0;n<t.childNodes.length;n++){const s=t.childNodes[n];le(s)&&s.nodeName===e&&r.push(s)}return r}function te(e,t,r){return Q(e,t)?.textContent??r}function re(e,t,r){if(!e)return null;const n=parseFloat(e.getAttribute("minx")),s=parseFloat(e.getAttribute("miny")),i=parseFloat(e.getAttribute("maxx")),o=parseFloat(e.getAttribute("maxy"));let l,a,u,c;r?(l=isNaN(s)?-Number.MAX_VALUE:s,a=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(o)?Number.MAX_VALUE:o,c=isNaN(i)?Number.MAX_VALUE:i):(l=isNaN(n)?-Number.MAX_VALUE:n,a=isNaN(s)?-Number.MAX_VALUE:s,u=isNaN(i)?Number.MAX_VALUE:i,c=isNaN(o)?Number.MAX_VALUE:o);const m=new I.Z({wkid:t});return new x.Z({xmin:l,ymin:a,xmax:u,ymax:c,spatialReference:m})}function ne(e,t){const r=Q(t,e);if(r){const e=Q("DCPType",r);if(e){const t=Q("HTTP",e);if(t){const e=Q("Get",t);if(e){let t=function(e,t,r,n){const s=Q("OnlineResource",r);return s?K("xlink:href",s,null):null}(0,0,e);if(t)return t.indexOf("&")===t.length-1&&(t=t.substring(0,t.length-1)),function(e,t){const r=[],n=(0,y.mN)(e);for(const e in n.query)n.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+n.query[e]));return n.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}return null}function se(e,t){const r=ee("Operation",e);if(!r.length)return ee("Format",Q(t,e)).map((({textContent:e})=>e)).filter(M.pC);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=ee("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function ie(e,t,r){const n=Q(t,e);if(!n)return r;const{textContent:s}=n;if(null==s||""===s)return r;const i=Number(s);return isNaN(i)?r:i}function oe(e,t,r){if(!e)return null;const n={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},s=Q("LatLonBoundingBox",e),i=Q("EX_GeographicBoundingBox",e);let o=null;s&&(o=re(s,4326)),i&&(o=new x.Z(0,0,0,0,new I.Z({wkid:4326})),o.xmin=parseFloat(te("westBoundLongitude",i,"0")),o.ymin=parseFloat(te("southBoundLatitude",i,"0")),o.xmax=parseFloat(te("eastBoundLongitude",i,"0")),o.ymax=parseFloat(te("northBoundLatitude",i,"0"))),s||i||(o=new x.Z(-180,-90,180,90,new I.Z({wkid:4326}))),n.minScale=ie(e,"MaxScaleDenominator",0),n.maxScale=ie(e,"MinScaleDenominator",0);const l=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)n.name=e.textContent||"";else if("Title"===e.nodeName)n.title=e.textContent||"";else if("Abstract"===e.nodeName)n.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(l);if(r&&0===r.indexOf("EPSG:")){const n=parseInt(r.substring(5),10);0===n||isNaN(n)||o||(o="1.3.0"===t?re(e,n,(0,U.A)(n)):re(e,n))}const s=r&&r.indexOf(":");if(s&&s>-1){let i=parseInt(r.substring(s+1,r.length),10);0===i||isNaN(i)||(i=V[i]??i);const o="1.3.0"===t?re(e,i,(0,U.A)(i)):re(e,i);o&&n.fullExtents&&n.fullExtents.push(o)}}else if(e.nodeName===l)(e.textContent?.split(" ")??[]).forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=V[t]??t;n.spatialReferences.includes(e)||n.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||n.legendUrl){if("Layer"===e.nodeName){const s=oe(e,t,r);s&&(s.parentLayerId=n.id,n.sublayers||(n.sublayers=[]),n.sublayers.push(s))}}else{const t=Q("LegendURL",e);if(t){const e=Q("OnlineResource",t);e&&(n.legendUrl=e.getAttribute("xlink:href"))}}})),n.extent=o?.toJSON(),n.dimensions=ee("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),n=e.textContent,s=e.getAttribute("unitSymbol")??void 0,i=e.getAttribute("default")??void 0,o="0"!==K("default",e,"0"),l="0"!==K("nearestValue",e,"0"),a="0"!==K("current",e,"0");return ae({name:t,units:r})?{name:"time",units:"ISO8601",extent:me(n),default:me(i),multipleValues:o,nearestValue:l,current:a}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(n),unitSymbol:s,default:ue(i),multipleValues:o,nearestValue:l}:{name:t,units:r,extent:ce(n),unitSymbol:s,default:ce(i),multipleValues:o,nearestValue:l}})),n}function le(e){return e.nodeType===Node.ELEMENT_NODE}function ae(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(M.pC):r.map((e=>parseFloat(e)))}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(M.pC):r}function me(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?pe(t[2]):void 0}})).filter(M.pC):r.map((e=>new Date(e)))}function pe(e){const t=e.match(/(?:p(\d+y|\d+(?:.|,)\d+y)?(\d+m|\d+(?:.|,)\d+m)?(\d+d|\d+(?:.|,)\d+d)?)?(?:t(\d+h|\d+(?:.|,)\d+h)?(\d+m|\d+(?:.|,)\d+m)?(\d+s|\d+(?:.|,)\d+s)?)?/i);return t?{years:de(t[1]),months:de(t[2]),days:de(t[3]),hours:de(t[4]),minutes:de(t[5]),seconds:de(t[6])}:null}function de(e){if(!e)return 0;const t=e.match(/(?:\d+(?:.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function he(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const ye=new Set([102100,3857,102113,900913]),fe=new Set([3395,54004]),ge=new c.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function be(e){return"text/html"===e}function ve(e){return"text/plain"===e}let we=class extends((0,E.h)((0,L.n)((0,O.Q)((0,P.M)((0,N.q)((0,F.I)((0,p.R)(T.Z)))))))){constructor(...e){super(...e),this.allSublayers=new u.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),h.Z_)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(d.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new x.Z({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(be)??this.featureInfoFormats.find(ve)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(be(e)||ve(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new I.Z(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return _e(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return _e(t.layers,r)}writeSublayers(e,t,r,n){t.layers=[];const s=new Map,i=e.flatten((({sublayers:e})=>e??[]));for(const e of i)if("number"==typeof e.parent?.id){const t=s.get(e.parent.id);null!=t?t.push(e.id):s.set(e.parent.id,[e.id])}for(const e of i){const r={sublayer:e,...n},i=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(s.has(e.id)&&(i.sublayerIds=s.get(e.id)),!e.sublayers&&e.name){const n=e.write({},r);delete n.id,t.layers.push(n)}}t.visibleLayers=i.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,y.mN)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,y.fl)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const s=n?.pixelRatio??1,i=(0,C.yZ)({extent:e,width:t})*s,o=new Z({layer:this,scale:i}),{xmin:l,ymin:a,xmax:u,ymax:c,spatialReference:m}=e,p=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ye.has(r)?t.find((e=>ye.has(e)))||t.find((e=>fe.has(e)))||102100:r)}(m,this.spatialReferences),d="1.3.0"===this.version&&(0,U.A)(p)?`${a},${l},${c},${u}`:`${l},${a},${u},${c}`,h=o.toJSON();return{bbox:d,["1.3.0"===this.version?"crs":"srs"]:null==p||isNaN(p)?void 0:"EPSG:"+p,...h}}async fetchImage(e,t,r,n){const s=this.mapUrl,i=this.createExportImageParameters(e,t,r,n);if(!i.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const o=n?.timeExtent?.start,a=n?.timeExtent?.end,u=null!=o&&null!=a?o.getTime()===a.getTime()?he(o):`${he(o)}/${he(a)}`:void 0,c={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...i,time:u,...this.refreshParameters}),signal:n?.signal};return(0,l.Z)(s??"",c).then((e=>e.data))}async fetchImageBitmap(e,t,r,n){const s=this.mapUrl??"",i=this.createExportImageParameters(e,t,r,n);if(!i.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const o=n?.timeExtent?.start,a=n?.timeExtent?.end,u=null!=o&&null!=a?o.getTime()===a.getTime()?he(o):`${he(o)}/${he(a)}`:void 0,c={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...i,time:u,...this.refreshParameters}),signal:n?.signal},{data:m}=await(0,l.Z)(s,c);return(0,$.g)(m,s,n?.signal)}fetchFeatureInfo(e,t,r,n,s){const i=(0,C.yZ)({extent:e,width:t}),o=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new Z({layer:this,scale:i}).visibleSublayers);if(null==this.featureInfoUrl||null==o)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const l="1.3.0"===this.version?{I:n,J:s}:{x:n,y:s},a={query_layers:o,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...l},u={...this.createExportImageParameters(e,t,r),...a},c=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(c):this._defaultFetchFeatureInfoFunction((0,y.fl)(this.featureInfoUrl,c))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,R.G)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?I.Z.WebMercator:new I.Z({wkid:t});return(0,S.fS)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,y.qg)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new o.Z({title:this.title,content:t}),n=new i.Z({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:n}=await(0,l.Z)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=Y(n)}if(this.parsedUrl){const e=new y.R9(this.parsedUrl.path),{httpsDomains:t}=s.default.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function _e(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,m.d9)(e)).forEach(((e,t)=>e.id=t));for(const s of e){const e=new G;e.read(s,t),r&&!r.includes(e.name)&&(e.visible=!1),n.set(e.id,e)}const s=[];for(const t of e){const e=null!=t.id?n.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=n.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new a.Z),r.sublayers.push(e)}else s.push(e)}return s}(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"allSublayers",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customParameters",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customLayerParameters",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:!0}})],we.prototype,"copyright",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],we.prototype,"fullExtent",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"fullExtent",["extent"])],we.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,w.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],we.prototype,"writeFullExtent",null),(0,n._)([(0,f.Cb)()],we.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoFormat",null),(0,n._)([(0,f.Cb)({type:[String],readOnly:!0})],we.prototype,"featureInfoFormats",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoUrl",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,f.Cb)({type:String,json:{origins:{"web-document":{default:"image/png",type:ge.jsonValues,read:{reader:ge.read,source:"format"},write:{writer:ge.write,target:"format"}}}}})],we.prototype,"imageFormat",void 0),(0,n._)([(0,b.r)("imageFormat",["supportedImageFormatTypes"])],we.prototype,"readImageFormat",null),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],we.prototype,"imageMaxHeight",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],we.prototype,"imageMaxWidth",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"imageTransparency",void 0),(0,n._)([(0,f.Cb)(j.rn)],we.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)({type:["show","hide","hide-children"]})],we.prototype,"listMode",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"mapUrl",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],we.prototype,"isReference",void 0),(0,n._)([(0,f.Cb)({type:["WMS"]})],we.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"resourceInfo",void 0),(0,n._)([(0,f.Cb)({type:I.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],we.prototype,"spatialReference",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],we.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,f.Cb)({type:[g.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],we.prototype,"spatialReferences",void 0),(0,n._)([(0,w.c)(["web-document","portal-item"],"spatialReferences")],we.prototype,"writeSpatialReferences",null),(0,n._)([(0,f.Cb)({type:a.Z.ofType(G),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,_.d)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],we.prototype,"sublayers",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],we.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,b.r)("service","sublayers",["layers"])],we.prototype,"readSublayers",null),(0,n._)([(0,w.c)("sublayers",{layers:{type:[G]},visibleLayers:{type:[String]}})],we.prototype,"writeSublayers",null),(0,n._)([(0,f.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],we.prototype,"type",void 0),(0,n._)([(0,f.Cb)(j.HQ)],we.prototype,"url",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"version",void 0),we=(0,n._)([(0,v.j)("esri.layers.WMSLayer")],we);const xe=we},16859:(e,t,r)=>{r.d(t,{I:()=>x});var n=r(43697),s=r(68773),i=r(40330),o=r(3172),l=r(66643),a=r(20102),u=r(92604),c=r(70586),m=r(95330),p=r(17452),d=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),y=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),_=r(14661);const x=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:n}=await r.e(8062).then(r.bind(r,18062));return(0,m.k_)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,m.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,m.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,m.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=e===r.id;if(n&&r.portal.user)return(0,_.Ss)(r);let s,o;if(n)s=r.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,m.r9)(e)}if(!s||!(0,p.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(i.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,m.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(n?await r.reload():(r=new v.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,m.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,m.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?i.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=i.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,s=b.Z.getDefault();if(s&&s.loaded&&(0,p.Fv)(s.restUrl)===(0,p.Fv)(n))return s.user;const a=`${n}/community/self`,u=null!=e?e.signal:null,c=await(0,l.q6)((0,o.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?w.Z.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,n=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&n&&!(0,p.tm)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n._)([(0,d.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,n._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var n=r(43697),s=r(92604),i=r(95330),o=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),u=r(46791),c=(r(66643),r(20102),r(26258),r(87538));const m=new u.Z,p=new WeakMap;function d(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:d(t,e%t):0}let h=0,y=0;function f(){const e=Date.now();let t=!1;for(const r of m){const n=r.deref();n?n.refreshInterval&&e-(p.get(n)??0)+5>=6e4*n.refreshInterval&&(p.set(n,e),n.refresh(e)):t=!0}if(t)for(let e=m.length-1;e>=0;e--)m.at(e).deref()||m.removeAt(e)}(0,c.EH)((()=>{const e=Date.now();let t=0;for(const r of m){const n=r.deref();n&&(t=d(Math.round(6e4*n.refreshInterval),t),n.refreshInterval?p.get(n)||p.set(n,e):p.delete(n))}if(t!==y){if(y=t,clearInterval(h),0===y)return void(h=0);h=setInterval(f,y)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&m.push(new WeakRef(e))}(this)}),(()=>{}))}destroy(){!function(e){const t=m.find((t=>t.deref()===e));t&&m.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,n._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>p});var n=r(43697),s=r(92835),i=r(84552),o=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(35671),c=r(76259),m=r(78981);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,s=m.v.fromJSON(r.timeOffsetUnits);return n&&s?new i.Z({value:n,unit:s}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,o.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,o.Cb)({type:i.Z})],t.prototype,"timeOffset",void 0),(0,n._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,o.Cb)({value:null,type:c.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,o.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>s});const n=[[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&&n.some((([t,r])=>e>=t&&e<=r))}},76259:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),s=r(92835),i=r(84552),o=r(2368),l=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),m=r(30556),p=r(80216);function d(e,t){return i.Z.fromJSON({value:e,unit:t})}let h=class extends((0,o.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),n=new Date(t.timeExtent[1]);return new s.Z({start:r,end:n})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?d(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?d(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,n._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,n._)([(0,a.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,n._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,n._)([(0,m.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,n._)([(0,a.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,n._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,n._)([(0,m.c)("interval")],h.prototype,"writeInterval",null),(0,n._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,n._)([(0,a.Cb)({type:p.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"timeReference",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,n._)([(0,c.j)("esri.layers.support.TimeInfo")],h);const y=h},66677:(e,t,r)=>{r.d(t,{B5:()=>c,DR:()=>p,G:()=>v,M8:()=>y,Nm:()=>f,Qc:()=>m,XG:()=>g,a7:()=>h,ld:()=>d,wH:()=>b});var n=r(17452),s=r(25929);const i={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(i),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function c(e){return!!l.test(e)}function m(e){if(null==e)return null;const t=(0,n.mN)(e),r=t.path.match(l)||t.path.match(a);if(!r)return null;const[,s,o,u,c]=r,m=o.indexOf("/");return{title:d(-1!==m?o.slice(m+1):o),serverType:i[u.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:s}}}function p(e){const t=(0,n.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function d(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function h(e,t){const r=[];if(e){const t=m(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=d(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function y(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),r=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&r}function f(e,t){return e?(0,n.Qj)((0,n.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,n.Hu)(t,e.logger);const r=(0,n.mN)(t),s=m(r.path);let i;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(i=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=p(r.path);null!=e&&(t=e.serviceUrl,i=e.sublayerId)}return{url:(0,n.Qj)(t),layerId:i}}function b(e,t,r,i,o){(0,s.w)(t,i,"url",o),i.url&&null!=e.layerId&&(i.url=(0,n.v_)(i.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),n=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),i=t.includes("/wmsserver");return r&&(n||s||i)}},90082:(e,t,r)=>{r.d(t,{V:()=>o,g:()=>i});var n=r(20102),s=r(95330);async function i(e,t,r){let i;try{i=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),i}async function o(e,t,r,i,o){let l;try{l=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load tile ${t}/${r}/${i}`,{error:e,level:t,row:r,col:i})}return(0,s.k_)(o),l}},78981:(e,t,r)=>{r.d(t,{v:()=>n});const n=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4608,5935],{60590:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ht});var i=r(43697),s=r(51773),n=r(16453),o=r(95330),a=r(5600),l=r(75215),u=(r(67676),r(80442),r(52011)),p=r(30556),c=r(87085),d=r(66577),m=r(38171),h=r(30030),y=r(3172),f=r(60235),g=r(20102),b=r(22974),v=r(92604),w=r(17445),R=r(17452),_=r(71715),S=r(21506),C=r(35956),x=r(96674),I=r(45663),F=r(81578);const T={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 D=r(93010),j=r(75509),P=r(23847);const N=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)"},A=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function M(e){return A.has(e.type)}function V(e,t){if(!e||!t)return(0,b.d9)(e||t);const r=(0,b.d9)(e);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),Z(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(E(r.functionArguments).Raster=t);return r}function Z(e,t){for(const r in e)"raster"===r.toLowerCase()&&("RasterFunctionVariable"===e[r].type?(e[r]=t.rasterFunctionDefinition,e[r].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[r].type&&Z(e[r].arguments,t))}function J(e){const t=(0,b.d9)(T[e.functionName+"Function"]),r=e.functionArguments;for(const e in r)"raster"===e.toLowerCase()?(t.arguments[e]=J(r[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=U(r[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=r[e];return t}function E(e){const t=e?.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?E(t.functionArguments):e}const q={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function H(e,t){const r=N.has(t)?(0,F.r)(t):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function z(e){if(null==e)return;const{fields:t}=e,r=t&&t.find((e=>e&&e.name&&"value"===e.name.toLowerCase()));return r&&r.name}function G(e){const t=[];return e?.forEach((e=>{const r=e;if(Array.isArray(r))t.push(r);else{if(null==r.min||null==r.max)return;const e=[r.min,r.max,r.avg||0,r.stddev||0];t.push(e)}})),t}function U(e){const t=[],r=[];return e.forEach((e=>{t.push(e[0]),r.push((0,D.oI)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:r}}var L=r(98974),B=r(69608);let Q=class extends x.wq{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return"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}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=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("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 r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new L.Z({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.pixelFilter,i=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=this._addClipFunction(t,s)),i&&!r&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:i}=t;return e=e||t.rasterFunction,i&&M(i)?V(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const r=t.convertToRFT,i=new I.Z;i.functionName="Stretch";const s=q[j.v.toJSON(e.stretchType)],n="u8",o={StretchType:s,Statistics:G(e.statistics??[]),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===q.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,i.outputPixelType=n):s===q.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,i.outputPixelType=n):s===q.minMax?i.outputPixelType=n:s===q.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),i.functionArguments=o,i.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new I.Z;if(r)n.functionArguments={ColorRamp:(0,D.pM)(s)};else{const r=(0,D.Uh)(s,!0);if(r)n.functionArguments={colorRamp:r};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,D.Jw)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=i,r?new I.Z({rasterFunctionDefinition:J(n)}):n}return r?new I.Z({rasterFunctionDefinition:J(i)}):i}(e,t);case"class-breaks":return function(e,t){const r=[],i=[],s=[],n=[],o=1e-6,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=z(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,r)=>{const i=t.symbol?.color;let s;i?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||r===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],i.r,i.g,i.b]))}))}));const r=a?H(n,a):n,i=new I.Z;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=r,i.variableName="Raster",t.convertToRFT?new I.Z({rasterFunctionDefinition:J(i)}):i}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?r.push(e.minValue,e.maxValue+o):r.push(e.minValue+o,e.maxValue+o),i.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)}));const c=a?H(n,a):n,d=new I.Z;d.functionName="Remap",d.functionArguments={InputRanges:r,OutputValues:i,NoDataRanges:s},d.variableName="Raster";const m=new I.Z;return m.functionName="Colormap",m.functionArguments={Colormap:c,Raster:d},t.convertToRFT?new I.Z({rasterFunctionDefinition:J(m)}):m}(e,t);case"unique-value":return function(e,t){const r=[],{pixelType:i,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=z(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach((e=>{const r=e.value,i=e.symbol?.color;null!=r&&i&&i.a&&t.set(String(r),i.toRgb())}));const i=e.field;n.forEach((({attributes:e})=>{const s=String(e[i]),n=e[o],l=t.get(s);l?r.push([n,...l]):a&&r.push([n,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],i=t.symbol?.color,s=+t.value;if(i?.a){if(isNaN(s))return null;r.push([s,i.r,i.g,i.b])}}const u=i&&r.length>0?H(r,i):r,p=new I.Z;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new I.Z({rasterFunctionDefinition:J(p)}):p}(e,t);case"raster-colormap":return function(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:i}=t,s=i?H(r,i):r,n=new I.Z;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new I.Z({rasterFunctionDefinition:J(n)}):n}(e,t);case"vector-field":return function(e,t){const r=new I.Z;r.functionName="VectorFieldRenderer";const{dataType:i,bandNames:s}=t,n="vector-uv"===i;let o,a;if(s&&2===s.length){const e=s.map((e=>e.toLowerCase()));o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=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 P.Z,c={magnitudeBandID:o,directionBandID:a,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};r.functionArguments=c;const d=J(r);return t.convertToRFT?I.Z.fromJSON({rasterFunctionDefinition:d}):r}(e,t);case"raster-shaded-relief":return function(e,t){const r=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 I.Z;const i=new I.Z;i.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),i.functionArguments=o,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?o.ColorRamp=(0,D.pM)(e.colorRamp):o.Colormap=(0,D.Jw)(e.colorRamp)),r?new I.Z({rasterFunctionDefinition:J(i)}):i}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(i,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.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,r=this.layer.serviceRasterInfo.pixelSize;let i=new I.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:r}});return i=e?.rasterFunctionDefinition?new I.Z({rasterFunctionDefinition:J(i)}):i,V(i,e)}_addClipFunction(e,t){return V(new I.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,i._)([(0,a.Cb)()],Q.prototype,"layer",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"adjustAspectRatio",null),(0,i._)([(0,p.c)("adjustAspectRatio")],Q.prototype,"writeAdjustAspectRatio",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"bandIds",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"compression",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"compressionQuality",null),(0,i._)([(0,p.c)("compressionQuality")],Q.prototype,"writeCompressionQuality",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"compressionTolerance",null),(0,i._)([(0,p.c)("compressionTolerance")],Q.prototype,"writeCompressionTolerance",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"format",null),(0,i._)([(0,a.Cb)({type:String,json:{read:{reader:B.cl.read},write:{writer:B.cl.write}}})],Q.prototype,"interpolation",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"noData",null),(0,i._)([(0,a.Cb)({type:String,json:{read:{reader:B.kQ.read},write:{writer:B.kQ.write}}})],Q.prototype,"noDataInterpretation",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"pixelType",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"lercVersion",void 0),(0,i._)([(0,p.c)("lercVersion")],Q.prototype,"writeLercVersion",null),(0,i._)([(0,a.Cb)({type:Number})],Q.prototype,"version",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"mosaicRule",null),(0,i._)([(0,a.Cb)({json:{write:!0,name:"renderingRule"}})],Q.prototype,"rasterFunction",null),Q=(0,i._)([(0,u.j)("esri.layers.mixins.ExportImageServiceParameters")],Q);var k=r(1231),W=r(99514),$=r(90082),X=r(29876),K=r(5847),Y=r(25972),ee=r(88281),te=r(99815),re=r(75993),ie=r(80676),se=r(67058),ne=r(72758),oe=r(16306),ae=r(11282),le=r(82971);let ue=class extends x.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],ue.prototype,"north",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],ue.prototype,"up",void 0),(0,i._)([(0,a.Cb)({type:le.Z,json:{write:!0}})],ue.prototype,"spatialReference",void 0),ue=(0,i._)([(0,u.j)("esri.rest.support.ImageAngleResult")],ue);const pe=ue;var ce=r(67900);let de=class extends x.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,i._)([(0,a.Cb)({type:Number,json:{read:!0,write:!0}})],de.prototype,"value",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:!0,write:!0}})],de.prototype,"displayValue",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{read:!0,write:!0}})],de.prototype,"uncertainty",void 0),de=(0,i._)([(0,u.j)("esri.rest.support.ImageMeasureResultValue")],de);let me=class extends de{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],me.prototype,"unit",void 0),me=(0,i._)([(0,u.j)("esri.rest.support.ImageMeasureResultLengthValue")],me);let he=class extends de{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,a.Cb)({type:String,json:{read:ce.gV.read,write:ce.gV.write}})],he.prototype,"unit",void 0),he=(0,i._)([(0,u.j)("esri.rest.support.ImageMeasureResultAreaValue")],he);let ye=class extends de{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,a.Cb)({type:String,json:{read:ce.CN.read,write:ce.CN.write}})],ye.prototype,"unit",void 0),ye=(0,i._)([(0,u.j)("esri.rest.support.ImageMeasureResultAngleValue")],ye);let fe=class extends x.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,i._)([(0,a.Cb)({type:String,json:{read:!0,write:!0}})],fe.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:!0,write:!0}})],fe.prototype,"sensorName",void 0),fe=(0,i._)([(0,u.j)("esri.rest.support.BaseImageMeasureResult")],fe);let ge=class extends fe{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,i._)([(0,a.Cb)({type:he,json:{read:!0,write:!0}})],ge.prototype,"area",void 0),(0,i._)([(0,a.Cb)({type:me,json:{read:!0,write:!0}})],ge.prototype,"perimeter",void 0),ge=(0,i._)([(0,u.j)("esri.rest.support.ImageAreaResult")],ge);const be=ge;let ve=class extends fe{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,i._)([(0,a.Cb)({type:me,json:{read:!0,write:!0}})],ve.prototype,"distance",void 0),(0,i._)([(0,a.Cb)({type:ye,json:{read:!0,write:!0}})],ve.prototype,"azimuthAngle",void 0),(0,i._)([(0,a.Cb)({type:ye,json:{read:!0,write:!0}})],ve.prototype,"elevationAngle",void 0),ve=(0,i._)([(0,u.j)("esri.rest.support.ImageDistanceResult")],ve);const we=ve;let Re=class extends fe{constructor(){super(...arguments),this.height=null}};(0,i._)([(0,a.Cb)({type:me,json:{read:!0,write:!0}})],Re.prototype,"height",void 0),Re=(0,i._)([(0,u.j)("esri.rest.support.ImageHeightResult")],Re);const _e=Re;var Se=r(94139),Ce=r(74889);let xe=class extends x.wq{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,i._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"catalogItemVisibilities",void 0),(0,i._)([(0,a.Cb)({type:Ce.Z,json:{write:!0}})],xe.prototype,"catalogItems",void 0),(0,i._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],xe.prototype,"location",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"name",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"objectId",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"processedValues",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"properties",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"value",void 0),xe=(0,i._)([(0,u.j)("esri.rest.support.ImageIdentifyResult")],xe);const Ie=xe;let Fe=class extends x.wq{constructor(){super(...arguments),this.geometries=null}};(0,i._)([(0,a.Cb)({json:{write:!0}})],Fe.prototype,"geometries",void 0),Fe=(0,i._)([(0,u.j)("esri.rest.support.ImagePixelLocationResult")],Fe);const Te=Fe;let De=class extends fe{constructor(){super(...arguments),this.point=null}};(0,i._)([(0,a.Cb)({type:Se.Z,json:{name:"point.value",read:!0,write:!0}})],De.prototype,"point",void 0),De=(0,i._)([(0,u.j)("esri.rest.support.ImagePointResult")],De);const je=De;let Pe=class extends x.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,i._)([(0,a.Cb)({json:{write:!0}})],Pe.prototype,"attributes",void 0),(0,i._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],Pe.prototype,"location",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Pe.prototype,"locationId",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Pe.prototype,"rasterId",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Pe.prototype,"resolution",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],Pe.prototype,"pixelValue",void 0),Pe=(0,i._)([(0,u.j)("esri.rest.support.ImageSample")],Pe);const Ne=Pe;let Oe=class extends x.wq{constructor(){super(...arguments),this.samples=null}};(0,i._)([(0,a.Cb)({type:[Ne],json:{write:!0}})],Oe.prototype,"samples",void 0),Oe=(0,i._)([(0,u.j)("esri.rest.support.ImageSampleResult")],Oe);const Ae=Oe;function Me(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const r=[];null!=t.start&&r.push(t.start),null==t.end||r.includes(t.end)||r.push(t.end),e.time=r.join(",")}}async function Ve(e,t,r){const i=(0,ae.en)(e),s=t.geometry?[t.geometry]:[],n=await(0,oe.aX)(s),o=t.toJSON();Me(o);const a=n&&n[0];null!=a&&(o.geometry=a.toJSON());const l=(0,ae.cv)({...i.query,f:"json",...o});return(0,ae.lA)(l,r)}async function Ze(e,t,r){const i=(0,ae.en)(e),s=t.geometry?[t.geometry]:[];return(0,oe.aX)(s).then((e=>{const s=t.toJSON(),n=e&&e[0];null!=n&&(s.geometry=JSON.stringify(n.toJSON()));const o=(0,ae.cv)({...i.query,f:"json",...s}),a=(0,ae.lA)(o,r);return(0,y.Z)(i.path+"/identify",a)})).then((e=>Ie.fromJSON(e.data)))}async function Je(e,t,r,i){const s=(0,ae.en)(e),n=await(0,oe.aX)(r),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(Ee(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(Ee(n[1])));const a=(0,ae.cv)({...s.query,f:"json",...o}),l=(0,ae.lA)(a,i),{data:u}=await(0,y.Z)(s.path+"/measure",l);return u}function Ee(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=qe(e.spatialReference)),t}function qe(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:r}=t;return null!=e?r?{icsid:e,icsns:r}:{icsid:e}:{ics:t}}return e.toJSON()}function He(e,t){const r=qe(e),{icsid:i,icsns:s,wkid:n}=r;return null!=i?null==s||t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?`0:${i}`:JSON.stringify(r):n?n.toString():JSON.stringify(r)}r(10158);var ze,Ge=r(4967),Ue=(r(68773),r(40330),r(2109),r(8744),r(98732),r(6570)),Le=(r(9361),r(65091)),Be=r(38913),Qe=(r(58901),r(45091),r(14165)),ke=(r(98326),r(56545),r(41818)),We=r(5396),$e=(r(75935),r(28141),r(26059)),Xe=r(36679);let Ke=ze=class extends x.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new ze((0,b.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,i._)([(0,a.Cb)({type:[String],json:{name:"angleName",write:!0}})],Ke.prototype,"angleNames",void 0),(0,i._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],Ke.prototype,"point",void 0),(0,i._)([(0,a.Cb)({type:le.Z,json:{write:!0}})],Ke.prototype,"spatialReference",void 0),(0,i._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],Ke.prototype,"rasterId",void 0),Ke=ze=(0,i._)([(0,u.j)("esri.rest.support.ImageAngleParameters")],Ke);const Ye=Ke;var et=r(33955);const tt=new(r(35454).X)({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 rt=class extends x.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var it;(0,i._)([(0,a.Cb)()],rt.prototype,"type",void 0),(0,i._)([(0,a.Cb)({type:tt.apiValues,json:{read:tt.read,write:tt.write}})],rt.prototype,"measureOperation",void 0),(0,i._)([(0,a.Cb)({type:L.Z,json:{write:!0}})],rt.prototype,"mosaicRule",void 0),(0,i._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],rt.prototype,"pixelSize",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],rt.prototype,"raster",void 0),rt=(0,i._)([(0,u.j)("esri.rest.support.BaseImageMeasureParameters")],rt);let st=it=class extends rt{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,et.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new it((0,b.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,a.Cb)({types:d.qM,json:{name:"fromGeometry",read:!0,write:!0}})],st.prototype,"geometry",void 0),(0,i._)([(0,p.c)("geometry")],st.prototype,"writeGeometry",null),(0,i._)([(0,a.Cb)({type:tt.apiValues,json:{write:tt.write}})],st.prototype,"measureOperation",null),(0,i._)([(0,a.Cb)({json:{read:!0}})],st.prototype,"is3D",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],st.prototype,"linearUnit",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:ce.gV.read,write:ce.gV.write}})],st.prototype,"areaUnit",void 0),st=it=(0,i._)([(0,u.j)("esri.rest.support.ImageAreaParameters")],st);const nt=st;var ot;let at=ot=class extends rt{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,r){null!=e&&(t.geometryType=(0,et.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new ot((0,b.d9)({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,i._)([(0,a.Cb)({type:Se.Z,json:{read:!0,write:!0}})],at.prototype,"fromGeometry",void 0),(0,i._)([(0,p.c)("fromGeometry")],at.prototype,"writeFromGeometry",null),(0,i._)([(0,a.Cb)({type:Se.Z,json:{read:!0,write:!0}})],at.prototype,"toGeometry",void 0),(0,i._)([(0,a.Cb)({type:tt.apiValues,json:{write:tt.write}})],at.prototype,"measureOperation",null),(0,i._)([(0,a.Cb)({json:{read:!0}})],at.prototype,"is3D",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],at.prototype,"linearUnit",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:ce.CN.read,write:ce.CN.write}})],at.prototype,"angularUnit",void 0),at=ot=(0,i._)([(0,u.j)("esri.rest.support.ImageDistanceParameters")],at);const lt=at;var ut;let pt=ut=class extends rt{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,et.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new ut((0,b.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,a.Cb)({type:Se.Z,json:{read:!0}})],pt.prototype,"fromGeometry",void 0),(0,i._)([(0,p.c)("fromGeometry")],pt.prototype,"writeFromGeometry",null),(0,i._)([(0,a.Cb)({type:Se.Z,json:{read:!0,write:!0}})],pt.prototype,"toGeometry",void 0),(0,i._)([(0,a.Cb)({type:tt.apiValues,json:{write:tt.write}})],pt.prototype,"measureOperation",null),(0,i._)([(0,a.Cb)({json:{read:!0}})],pt.prototype,"operationType",void 0),(0,i._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],pt.prototype,"linearUnit",void 0),pt=ut=(0,i._)([(0,u.j)("esri.rest.support.ImageHeightParameters")],pt);const ct=pt;var dt,mt=r(79681),ht=r(92835);let yt=dt=class extends x.wq{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,r){null!=e&&(t.geometryType=(0,et.Ji)(e),t[r]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=L.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))}get renderingRule(){return(0,f.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,f.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,f.Mr)(v.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,f.Mr)(v.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t&&t.rasterFunction&&(t=I.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[r]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,r){null!=e&&(t[r]=JSON.stringify(e))}writeTimeExtent(e,t,r){if(null!=e){const i=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[r]=null!=i?null!=s?`${i},${s}`:`${i}`:null}}clone(){return new dt((0,b.d9)({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,i._)([(0,a.Cb)({json:{write:!0}})],yt.prototype,"geometry",void 0),(0,i._)([(0,p.c)("geometry")],yt.prototype,"writeGeometry",null),(0,i._)([(0,a.Cb)({type:L.Z,json:{write:!0}})],yt.prototype,"mosaicRule",null),(0,i._)([(0,p.c)("mosaicRule")],yt.prototype,"writeMosaicRule",null),(0,i._)([(0,a.Cb)({type:I.Z})],yt.prototype,"renderingRule",null),(0,i._)([(0,a.Cb)({type:[I.Z]})],yt.prototype,"renderingRules",null),(0,i._)([(0,a.Cb)({type:I.Z,json:{write:!0,name:"renderingRule"}})],yt.prototype,"rasterFunction",null),(0,i._)([(0,p.c)("rasterFunction")],yt.prototype,"writeRasterFunction",null),(0,i._)([(0,a.Cb)({type:[I.Z],json:{write:!0,name:"renderingRules"}})],yt.prototype,"rasterFunctions",void 0),(0,i._)([(0,p.c)("rasterFunctions")],yt.prototype,"writeRasterFunctions",null),(0,i._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],yt.prototype,"pixelSize",void 0),(0,i._)([(0,p.c)("pixelSize")],yt.prototype,"writePixelSize",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],yt.prototype,"returnGeometry",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],yt.prototype,"returnCatalogItems",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],yt.prototype,"returnPixelValues",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],yt.prototype,"maxItemCount",void 0),(0,i._)([(0,a.Cb)({type:ht.Z,json:{write:{target:"time"}}})],yt.prototype,"timeExtent",void 0),(0,i._)([(0,p.c)("timeExtent")],yt.prototype,"writeTimeExtent",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],yt.prototype,"raster",void 0),(0,i._)([(0,a.Cb)({json:{write:!0}})],yt.prototype,"viewId",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],yt.prototype,"processAsMultidimensional",void 0),yt=dt=(0,i._)([(0,u.j)("esri.rest.support.ImageIdentifyParameters")],yt);const ft=yt;var gt;let bt=gt=class extends x.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,r){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new gt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,i._)([(0,a.Cb)({type:[Se.Z],json:{write:!0}})],bt.prototype,"geometries",void 0),(0,i._)([(0,p.c)("geometries")],bt.prototype,"writeGeometry",null),(0,i._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],bt.prototype,"rasterId",void 0),bt=gt=(0,i._)([(0,u.j)("esri.rest.support.ImagePixelLocationParameters")],bt);const vt=bt;var wt;let Rt=wt=class extends rt{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,et.Ji)(e),t[r]=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 wt((0,b.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,a.Cb)({types:d.qM,json:{name:"fromGeometry",read:et.im}})],Rt.prototype,"geometry",void 0),(0,i._)([(0,p.c)("geometry")],Rt.prototype,"writeGeometry",null),(0,i._)([(0,a.Cb)({type:tt.apiValues,json:{read:tt.read,write:tt.write}})],Rt.prototype,"measureOperation",null),(0,i._)([(0,a.Cb)({json:{read:!0}})],Rt.prototype,"is3D",void 0),Rt=wt=(0,i._)([(0,u.j)("esri.rest.support.ImagePointParameters")],Rt);const _t=Rt;var St;let Ct=St=class extends x.wq{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,et.Ji)(e),t[r]=e.toJSON())}set locations(e){if(e?.length){const t=new Le.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new St((0,b.d9)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,i._)([(0,a.Cb)({types:d.qM,json:{read:et.im}})],Ct.prototype,"geometry",void 0),(0,i._)([(0,p.c)("geometry")],Ct.prototype,"writeGeometry",null),(0,i._)([(0,a.Cb)()],Ct.prototype,"locations",null),(0,i._)([(0,a.Cb)({type:String,json:{type:B.cl.jsonValues,read:B.cl.read,write:B.cl.write}})],Ct.prototype,"interpolation",void 0),(0,i._)([(0,a.Cb)({type:L.Z,json:{write:!0}})],Ct.prototype,"mosaicRule",void 0),(0,i._)([(0,a.Cb)({type:[String],json:{write:!0}})],Ct.prototype,"outFields",void 0),(0,i._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],Ct.prototype,"pixelSize",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],Ct.prototype,"raster",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],Ct.prototype,"returnFirstValueOnly",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],Ct.prototype,"sampleDistance",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],Ct.prototype,"sampleCount",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0}})],Ct.prototype,"sliceId",void 0),(0,i._)([(0,a.Cb)({type:ht.Z,json:{read:{source:"time"},write:{target:"time"}}})],Ct.prototype,"timeExtent",void 0),Ct=St=(0,i._)([(0,u.j)("esri.rest.support.ImageSampleParameters")],Ct);const xt=Ct;var It=r(23808);const Ft=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Tt=(0,a.Eg)(l.q9,{min:0,max:255}),Dt=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",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 Q({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,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?L.Z.fromJSON(t):null}get fieldsIndex(){return this.fields?new W.Z(this.fields):null}set format(e){e&&Ft.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&&t.mosaicMethod&&(t=L.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?L.Z.fromJSON(r):this._isMosaicRuleSupported(t)?L.Z.fromJSON(t):null}writeMosaicRule(e,t,r){let i=this.mosaicRule;const s=this.definitionExpression;i?s&&s!==i.where&&(i=i.clone(),i.where=s):s&&(i=new L.Z({where:s})),this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}writeNoData(e,t,r){null!=e&&"number"==typeof e&&(t[r]=Tt(e))}readObjectIdField(e,t){if(!e){const r=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=r&&r[0]&&r[0].name}return e}get parsedUrl(){return(0,R.mN)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer,s=(0,h.ij)(i,r);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!i.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),M(s)||v.Z.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,r){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._rasterAttributeTableFieldPrefix||"Raster.",t=new k.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new k.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new k.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?(0,b.d9)(this.fields):[];s.push(r),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(i),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new k.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new k.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new k.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:n}=this.rasterInfo??{};if(null!=n){const t=n.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const r=(0,b.d9)(t);return r.name=e+t.name,r}));s=s.concat(t)}return s}get renderingRule(){return(0,f.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,f.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t&&t.rasterFunction&&(t=I.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r&&r.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?I.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):I.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?le.Z.fromJSON(r):null}readPixelType(e){return B.sM.fromJSON(e)||e}writePixelType(e,t,r){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[r]=B.sM.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e;const{renderer:i,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&i&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(i.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=i.toJSON());const l=await a.symbolize({bandIds:o,...e},t);r={extent:e.extent,pixelBlock:l}}else r={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return r}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new g.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,l.TJ)(Ye,e).clone(),async function(e,t,r){const i=t.toJSON();null!=i.angleName&&(i.angleName=i.angleName.join(",")),null!=t.point&&t.point.spatialReference?.imageCoordinateSystem&&(i.point.spatialReference=qe(t.point.spatialReference)),null!=t.spatialReference&&t.spatialReference.imageCoordinateSystem&&(i.spatialReference=He(t.spatialReference));const s=(0,ae.en)(e),n=(0,ae.cv)({...s.query,f:"json",...i}),o=(0,ae.lA)(n,r),{data:a}=await(0,y.Z)(`${s.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new le.Z({wkid:0,imageCoordinateSystem:a.spatialReference}):le.Z.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new pe(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new g.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,l.TJ)(vt,e).clone(),async function(e,t,r){const i=t.toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(i.geometries.geometries[e].spatialReference=qe(s[e].spatialReference));const n=(0,ae.en)(e),o=(0,ae.cv)({...n.query,f:"json",...i}),a=(0,ae.lA)(o,r),{data:l}=await(0,y.Z)(`${n.path}/computePixelLocation`,a);return Te.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new g.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,l.TJ)(mt.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ve(e,t,r),s=(0,ae.en)(e),{data:n}=await(0,y.Z)(`${s.path}/computeHistograms`,i);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new g.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,l.TJ)(mt.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ve(e,t,r),s=(0,ae.en)(e),{data:n}=await(0,y.Z)(`${s.path}/computeStatisticsHistograms`,i),{statistics:o}=n;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const r=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?r.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?r.mensuration.supportsHeightFromBaseAndTopShadow:r.mensuration.supportsHeightFromTopAndTopShadow))throw new g.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,l.TJ)(ct,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Je(e,t,[t.fromGeometry,t.toGeometry],r);return _e.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsAreaAndPerimeter||e.is3D&&!r.mensuration.supports3D)throw new g.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,l.TJ)(nt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Je(e,t,[t.geometry],r);return be.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsDistanceAndAngle||e.is3D&&!r.mensuration.supports3D)throw new g.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,l.TJ)(lt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Je(e,t,[t.fromGeometry,t.toGeometry],r);return we.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsPointOrCentroid||e.is3D&&!r.mensuration.supports3D)throw new g.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,l.TJ)(_t,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Je(e,t,[t.geometry],r);return je.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}async fetchImage(e,t,i,s={}){if(null==e||null==t||null==i)throw new g.Z("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:s.signal});e&&(this.rasterInfo=e)}const n=this.getExportImageServiceParameters(e,t,i,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=i,s.returnImageBitmap?{imageBitmap:await(0,$.g)(e,`${r(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*i,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(K.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new K.Z({width:t,height:i,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const o=!!s.requestAsImageElement&&!this.pixelFilter,a=o&&!!s.returnImageBitmap,l={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:o,returnImageBitmap:a,signal:s.signal};return this._requestArrayBuffer(l)}fetchKeyProperties(e){return(0,y.Z)(r(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 g.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,y.Z)(r(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>Ce.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,r){const i=(0,ae.en)(e),s=(0,ae.cv)({...i?.query,f:"json"}),n=(0,ae.lA)(s,r),o=`${i?.path}/${t}/info`,a=(0,y.Z)(`${o}`,n),l=(0,y.Z)(`${o}/keyProperties`,n),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let d=null;p.statistics?.length&&(d=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const m=Ue.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),f=Math.ceil(m.height/p.pixelSizeY-.1),g=m.spatialReference,b=new Se.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),v=p.histograms?.length?p.histograms:null,w=new Xe.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new Y.Z({width:h,height:f,bandCount:p.bandCount,extent:m,spatialReference:g,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:v,keyProperties:c,storageInfo:w})}(r(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,y.Z)(r(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=i&&i.ics;if(!s)return;let n=null;try{n=(await(0,y.Z)(r(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n||!n.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,y.Z)(r(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},u=(0,y.Z)(r(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,d=n.ymin+c,m=[];for(let e=0;e<5;e++)m.push({x:p,y:d+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:m}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},f=(0,y.Z)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,f]);let b=g[0].ipxf;if(null==b){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(b={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=Ue.Z.fromJSON(g[1]&&g[1].geometries&&g[1].geometries[0]);v&&(v.spatialReference=new le.Z({wkid:0,imageCoordinateSystem:s}));const w=g[2].geometries?g[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],R=w.length;if(R<3)return{ics:s,icsToPixelTransform:b,icsExtent:v,northDirection:null};let _=0,S=0,C=0,x=0;for(let e=0;e<R;e++)_+=w[e].x,S+=w[e].y,C+=w[e].x*w[e].x,x+=w[e].x*w[e].y;const I=(R*x-_*S)/(R*C-_*_);let F=0;const T=w[4].x>w[0].x,D=w[4].y>w[0].y;return I===1/0?F=D?90:270:0===I?F=T?0:180:I>0?F=T?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(F=D?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:s,icsToPixelTransform:b,icsExtent:v,northDirection:F}}async generateRasterInfo(e,t){if(e=(0,l.TJ)(I.Z,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const i=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),r=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return r?r.join("/"):null}(e);if(!i)throw new g.Z("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const s={...t,query:this._getQueryParams()},n=(0,$e.N)(r(this.parsedUrl),e,s);this._functionRasterInfos[i]=n;try{return await n}catch(e){throw this._functionRasterInfos[i]=null,e}}getExportImageServiceParameters(e,t,i,s){const n=He((e=e.clone().shiftCentralMeridian()).spatialReference,r(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;o.bandIds=void 0}else o.bandIds=a?.join(",");l instanceof Array&&l.length>0&&(o.noData=l.join(","));const d=this._processMultidimensionalIntersection(null,s,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,s=d.timeExtent,o.renderingRule=this._getRenderingRuleString(I.Z.fromJSON(u));const m={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?m.time=""+e:null==e&&null==t||(m.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+i,...o,...m}}async getSamples(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r?.operations.supportsGetSamples)throw new g.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,l.TJ)(xt,e).clone();const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,r){const i=t.toJSON();Me(i),i.outFields?.length&&(i.outFields=i.outFields.join(","));const s=await(0,oe.aX)(t.geometry),n=s?.[0];null!=n&&(i.geometry=n.toJSON());const o=(0,ae.en)(e),a=(0,ae.cv)({...o.query,f:"json",...i}),l=(0,ae.lA)(a,r),{data:u}=await(0,y.Z)(`${o.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 Ae.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new g.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,l.TJ)(ft,e).clone();const r=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(r.isOutSide)throw new g.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=r.timeExtent,e.mosaicRule=r.mosaicRule;const{raster:i,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),i&&null==e.raster&&(e.raster=i),Ze(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new Qe.Z;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Ge.e)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,We.G)(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,ke.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new g.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,a=null,l=null;const u="raster.servicepixelvalue",p=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some((e=>!e.toLowerCase().includes(u))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(u)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,p),t]}));a=t.map((e=>new I.Z({functionName:e[0]}))),l=t.map((e=>e[1]));const{rasterFunction:r}=this;0===a.length?r?.functionName?(a.push(r),l.push(r.functionName)):a=null:r?.functionName&&!a.some((e=>e.functionName===r.functionName))&&(a.push(r),l.push(r.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let m=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:r}=(0,te.W2)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new g.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");r&&null!=r.timeExtent&&(m=r.timeExtent)}const h=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,m),y=this._getQueryParams({geometry:e.geometry,timeExtent:m,mosaicRule:h,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:a,pixelSize:r,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:s?1:null});delete y.f;const f=new ft(y);try{await this._generateRasterInfo(this.rasterFunction);const r=await Ze(this.url,f,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,a=null!=r.value&&r.value.toLowerCase().includes("nodata");if(!o||c||!r?.catalogItems?.features.length||!n&&a)return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s});const u=this.objectIdField||"ObjectId",p=r.catalogItems?.features??[],d=p.map((e=>e.attributes?.[u])),m=new Qe.Z({objectIds:d,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[u]}),h=await this.queryRasters(m);return h?.features?.length&&h.features.forEach((t=>{p.forEach((r=>{r.attributes[u]===t.attributes[u]&&(r.geometry=new Be.Z(t.geometry),null!=e.outSpatialReference&&(r.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s})}catch{throw new g.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const i=(0,y.Z)(r(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,y.Z)(r(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),n=await Promise.all([i,s]);return n[0]&&n[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:n[0]||null,histograms:n[1]||null}}async createFlowMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(e,t):(0,It.GE)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,te.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,$e.g)(r(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),e))),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([i,s,n]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),v.Z.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,w.YP)((()=>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 r=this.timeInfo,{multidimensionalInfo:i}=this.serviceRasterInfo;if(null==e||null==i||null==t||null==r?.startField)return e;const{startField:s}=r,n=i.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 o=e.multidimensionalDefinition.filter((e=>e.dimensionName===n)),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.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 C.Z({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 g.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,l.TJ)(Qe.Z,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new ee.Z;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:r}=this;return"unique-value"===e.type&&this._hasRasterFunction(r)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,se.U0)(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:i,ssl:s}=await(0,y.Z)(r(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=i,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 g.Z("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),r=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||r}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:r}=e,i="resample"===t?.toLowerCase(),s=r?.ResampleType||r?.resampleType;return i&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:r}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&r.bandCount>=3){const e=(0,se.YD)(r);!e||3===r.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,se.Ob)(r,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,se.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=r):this.symbolizer=new ne.Z({rendererJSON:t,rasterInfo:r}),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){e&&null!=e.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,re.J)(e,t,r)}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 i=await(0,y.Z)(r(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return i.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,returnImageBitmap:s,signal:n}=e;if(i&&this._canRequestImageElement(t.format)){const i=`${r(this.parsedUrl)}/exportImage`,{data:o}=await(0,y.Z)(i,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,$.g)(o,i,n),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),a=(0,y.Z)(r(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),l=(await Promise.all([a,o]))[0].data,u=t.format||"jpgpng";let p=u;if("bsq"!==p&&"bip"!==p&&(p=(0,re.y)(l)),!p)throw new g.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:n},d="gif"===u||"bmp"===u||u.includes("png")&&("png"===p||"jpg"===p)?(0,re.J)(l,{useCanvas:!0,...t},c):this._decodePixelBlock(l,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:u},c);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,te.Tj)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new L.Z;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 r=e.value,{templateRRFunctionNames:i,showNoDataRecords:s,returnDomainValues:n,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems&&e.catalogItems.features,u=e.properties&&e.properties.Values&&e.properties.Values.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),d=[];if(r&&!l&&!c){const e={};e[p]=0,u=[r],l=[new m.Z(this.fullExtent,null,e)]}if(!l)return[];let h,y,f;this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);for(let e=0;e<l.length;e++){if(h=l[e],null!=r){if(y=u[e],f=this.rasterFunction&&a&&a.length>0&&i&&i.length>0&&i.includes(this.rasterFunction.functionName)?a[i.indexOf(this.rasterFunction.functionName)]:r,"nodata"===y.toLowerCase()&&!s)continue;const t="Raster.ItemPixelValue",n="Raster.ServicePixelValue";h.attributes[t]=y,h.attributes[n]=f,this._updateFeatureWithMagDirValues(h,y);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?y:r:f;this.rasterFunction||(l=o?y:r),this._updateFeatureWithRasterAttributeTableValues(h,l)}if(h.sourceLayer=h.layer=this,n&&this._updateFeatureWithDomainValues(h),i&&a&&i.length===a.length)for(let e=0;e<i.length;e++){const t="Raster.ServicePixelValue."+i[e];h.attributes[t]=a[e]}d.push(l[e])}return d}_processMultidimensionalIntersection(e,t,r){const{multidimensionalSubset:i}=this;if(!i)return{isOutSide:!1,timeExtent:t,mosaicRule:r=this._combineMosaicRuleWithTimeExtent(r,t)};if(i){const{isOutside:r,intersection:s}=(0,te.W2)(i,{geometry:e,timeExtent:t});if(r)return{isOutSide:!0,timeExtent:null,mosaicRule:null};s&&null!=s.timeExtent&&(t=s.timeExtent)}if(null!=(r=this._combineMosaicRuleWithTimeExtent(r,t))&&r.multidimensionalDefinition){const{isOutside:e}=(0,te.W2)(i,{multidimensionalDefinition:r.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:r}}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==r)return;const{features:i,fields:s}=r,n=s.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),o=n&&n[0];if(!o)return;const a=i.filter((e=>e.attributes[o]===(null!=t?parseInt(t,10):null)));a&&a[0]&&s.forEach((t=>{const r=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[r]=a[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const r=t.split(/,\s*/).map((e=>parseFloat(e))),i=r.map((e=>[e])),s=r.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new K.Z({height:1,width:1,pixelType:"f32",pixels:i,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new Ue.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,ie.Tg)([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.find((e=>e.code===r));i&&(e.attributes[t.name]=i.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;null!=r&&e.forEach((e=>{if(e&&e.attributes)for(const i of t){const t=r.get(i)?.name;t&&t!==i&&(e.attributes[i]=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&&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 r=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(r)?t.get(r):e}_isRFTJson(e){return e&&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:r,rasterFunction:i}=this;i&&e instanceof mt.Z&&null==e.rasterFunction&&(e.rasterFunction=i),r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:r,advancedQueryCapabilities:i,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!!(e.spatialReference||e.extent&&e.extent.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:r>=10.2&&n,supportsProject:r>=10.3&&n,supportsComputeStatisticsHistograms:r>=10.4&&n,supportsQueryBoundary:r>=10.6&&n,supportsCalculateVolume:r>=10.7&&o,supportsComputePixelLocation:r>=10.7&&t.includes("catalog"),supportsComputeAngles:r>=10.91,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,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!i?.supportsStatistics,supportsOrderBy:!!i?.supportsOrderBy,supportsDistinct:!!i?.supportsDistinct,supportsPagination:!!i?.supportsPagination,supportsStandardizedQueriesOnly:!!i?.useStandardizedQueries,supportsPercentileStatistics:!!i?.supportsPercentileStatistics,supportsCentroid:!!i?.supportsReturningGeometryCentroid,supportsDistance:!!i?.supportsQueryWithDistance,supportsExtent:!!i?.supportsReturningQueryExtent,supportsGeometryProperties:!!i?.supportsReturningGeometryProperties,supportsHavingClause:!!i?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!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:!!i?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},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 r(e){return e?.path??""}return(0,i._)([(0,a.Cb)()],t.prototype,"_functionRasterInfos",void 0),(0,i._)([(0,a.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,i._)([(0,a.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,i._)([(0,_.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,i._)([(0,a.Cb)()],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,i._)([(0,a.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,i._)([(0,a.Cb)({type:[l.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,i._)([(0,_.r)("bandIds")],t.prototype,"readBandIds",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,i._)([(0,_.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,i._)([(0,a.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,i._)([(0,p.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,i._)([(0,a.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,i._)([(0,p.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,i._)([(0,a.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,a.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,i._)([(0,_.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,i._)([(0,a.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,i._)([(0,a.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,i._)([(0,a.Cb)()],t.prototype,"rasterInfo",void 0),(0,i._)([(0,a.Cb)({readOnly:!0,type:[k.Z]})],t.prototype,"fields",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,i._)([(0,a.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,i._)([(0,_.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,i._)([(0,a.Cb)({type:Ue.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,i._)([(0,a.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,i._)([(0,a.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,i._)([(0,a.Cb)({type:String,json:{type:B.cl.jsonValues,read:B.cl.read,write:B.cl.write}})],t.prototype,"interpolation",void 0),(0,i._)([(0,a.Cb)()],t.prototype,"minScale",void 0),(0,i._)([(0,_.r)("service","minScale")],t.prototype,"readMinScale",null),(0,i._)([(0,a.Cb)()],t.prototype,"maxScale",void 0),(0,i._)([(0,_.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,i._)([(0,a.Cb)({type:L.Z})],t.prototype,"mosaicRule",null),(0,i._)([(0,_.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,i._)([(0,p.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,i._)([(0,a.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,i._)([(0,a.Cb)({type:X.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,i._)([(0,a.Cb)({json:{type:l.z8}})],t.prototype,"noData",void 0),(0,i._)([(0,p.c)("noData")],t.prototype,"writeNoData",null),(0,i._)([(0,a.Cb)({type:String,json:{type:B.kQ.jsonValues,read:B.kQ.read,write:B.kQ.write}})],t.prototype,"noDataInterpretation",void 0),(0,i._)([(0,a.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,i._)([(0,_.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,i._)([(0,a.Cb)({})],t.prototype,"geometryType",void 0),(0,i._)([(0,a.Cb)({})],t.prototype,"typeIdField",void 0),(0,i._)([(0,a.Cb)({})],t.prototype,"types",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,i._)([(0,a.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,i._)([(0,a.Cb)()],t.prototype,"raster",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,i._)([(0,_.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,i._)([(0,a.Cb)()],t.prototype,"viewId",void 0),(0,i._)([(0,a.Cb)({types:h.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:h.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,i._)([(0,_.r)("renderer")],t.prototype,"readRenderer",null),(0,i._)([(0,p.c)("renderer")],t.prototype,"writeRenderer",null),(0,i._)([(0,a.Cb)()],t.prototype,"symbolizer",void 0),(0,i._)([(0,a.Cb)(S.Oh)],t.prototype,"opacity",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,i._)([(0,a.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,i._)([(0,a.Cb)({type:I.Z})],t.prototype,"renderingRule",null),(0,i._)([(0,a.Cb)({type:I.Z,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,i._)([(0,_.r)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,i._)([(0,a.Cb)()],t.prototype,"serviceDataType",void 0),(0,i._)([(0,a.Cb)({readOnly:!0,type:le.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,_.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,a.Cb)({json:{type:B.sM.jsonValues}})],t.prototype,"pixelType",void 0),(0,i._)([(0,_.r)("pixelType")],t.prototype,"readPixelType",null),(0,i._)([(0,p.c)("pixelType")],t.prototype,"writePixelType",null),(0,i._)([(0,a.Cb)({constructOnly:!0,type:Y.Z})],t.prototype,"serviceRasterInfo",void 0),(0,i._)([(0,a.Cb)()],t.prototype,"sourceJSON",void 0),(0,i._)([(0,a.Cb)(S.HQ)],t.prototype,"url",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,_.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,i._)([(0,u.j)("esri.layers.mixins.ArcGISImageService")],t),t};var jt=r(17287),Pt=r(71612),Nt=r(17017),Ot=r(38009),At=r(16859),Mt=r(34760),Vt=r(72965),Zt=r(28294),Jt=r(60199),Et=r(32163);let qt=class extends((0,Pt.h)((0,Zt.n)((0,Vt.M)((0,Ot.q)((0,At.I)(Dt((0,Mt.Q)((0,Nt.N)((0,jt.Y)((0,n.R)(c.Z))))))))))){constructor(...e){super(...e),this.legendEnabled=!0,this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery"}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(o.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}writeOperationalLayerType(e,t,r){const i="vector-field"===this.renderer?.type;t[r]=i?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.rasterFields,r=this.title,i=new Set;let s=!1,n=!1;this.capabilities&&(s=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,n="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;s&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||i.add(e.name)}return n&&i.add("raster.magnitude").add("raster.direction"),(0,Et.eZ)({fields:t,title:r},{...e,visibleFieldNames:i})}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){const{save:t}=await r.e(4697).then(r.bind(r,64697));return t(this,e)}async saveAs(e,t){const{saveAs:i}=await r.e(4697).then(r.bind(r,64697));return i(this,e,t)}serviceSupportsSpatialReference(e){return(0,Jt.D)(this,e)}};(0,i._)([(0,a.Cb)(S.rn)],qt.prototype,"legendEnabled",void 0),(0,i._)([(0,a.Cb)({type:["show","hide"]})],qt.prototype,"listMode",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],qt.prototype,"isReference",void 0),(0,i._)([(0,a.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],qt.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.c)("web-map","operationalLayerType")],qt.prototype,"writeOperationalLayerType",null),(0,i._)([(0,a.Cb)(S.C_)],qt.prototype,"popupEnabled",void 0),(0,i._)([(0,a.Cb)({type:s.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],qt.prototype,"popupTemplate",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],qt.prototype,"defaultPopupTemplate",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],qt.prototype,"type",void 0),qt=(0,i._)([(0,u.j)("esri.layers.ImageryLayer")],qt);const Ht=qt},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),s=r(92604),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);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,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>_});var i=r(43697),s=r(68773),n=r(40330),o=r(3172),a=r(66643),l=r(20102),u=r(92604),p=r(70586),c=r(95330),d=r(17452),m=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),y=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),R=r(14661);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,R.Ss)(r);let s,o;if(i)s=r.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!s||!(0,d.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,R.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=b.Z.getDefault();if(s&&s.loaded&&(0,d.Fv)(s.restUrl)===(0,d.Fv)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.q6)((0,o.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.Z.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,m.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},66677:(e,t,r)=>{r.d(t,{B5:()=>p,DR:()=>d,G:()=>v,M8:()=>y,Nm:()=>f,Qc:()=>c,XG:()=>g,a7:()=>h,ld:()=>m,wH:()=>b});var i=r(17452),s=r(25929);const n={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(n),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function p(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.mN)(e),r=t.path.match(a)||t.path.match(l);if(!r)return null;const[,s,o,u,p]=r,c=o.indexOf("/");return{title:m(-1!==c?o.slice(c+1):o),serverType:n[u.toLowerCase()],sublayer:null!=p&&""!==p?parseInt(p,10):null,url:{path:s}}}function d(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function m(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function h(e,t){const r=[];if(e){const t=c(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=m(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function y(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),r=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&r}function f(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const r=(0,i.mN)(t),s=c(r.path);let n;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(n=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=d(r.path);null!=e&&(t=e.serviceUrl,n=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:n}}function b(e,t,r,n,o){(0,s.w)(t,n,"url",o),n.url&&null!=e.layerId&&(n.url=(0,i.v_)(n.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),n=t.includes("/wmsserver");return r&&(i||s||n)}},90082:(e,t,r)=>{r.d(t,{V:()=>o,g:()=>n});var i=r(20102),s=r(95330);async function n(e,t,r){let n;try{n=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),n}async function o(e,t,r,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,s.k_)(o),a}},60199:(e,t,r)=>{r.d(t,{D:()=>n});var i=r(66677);const s=[];function n(e,t){if((0,i.M8)(e.url??""))return!0;const{wkid:r}=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(r))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=102759;t<=102760;t++)e.add(t);for(let t=102901;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}]),s.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),s.push([10.61,()=>new Set([102497])]),s.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}]),s.push([10.51,()=>{const e=new Set([7683,7881,7886,7899,8888,9e3]);for(let t=8013;t<=8032;t++)e.add(t);for(let t=9053;t<=9057;t++)e.add(t);for(let t=104017;t<=104018;t++)e.add(t);for(let t=104971;t<=104974;t++)e.add(t);return e}]),s.push([10.5,()=>{const e=new Set([6962,7035,7037,7039,7041,7084,7086,7133,7798,102399]);for(let t=4087;t<=4088;t++)e.add(t);for(let t=5896;t<=5899;t++)e.add(t);for(let t=7005;t<=7007;t++)e.add(t);for(let t=7057;t<=7070;t++)e.add(t);for(let t=7073;t<=7082;t++)e.add(t);for(let t=7109;t<=7128;t++)e.add(t);for(let t=7844;t<=7859;t++)e.add(t);return e}])},41818:(e,t,r)=>{r.d(t,{P:()=>o});var i=r(11282),s=r(34599),n=r(14165);async function o(e,t,r){const o=(0,i.en)(e);return(0,s.hH)(o,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(11282),s=r(34599),n=r(14165);async function o(e,t,r){const o=(0,i.en)(e);return(0,s.Ev)(o,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>l,e:()=>a});var i=r(11282),s=r(34599),n=r(74889),o=r(14165);async function a(e,t,r){const i=await l(e,t,r);return n.Z.fromJSON(i)}async function l(e,t,r){const n=(0,i.en)(e),a={...r},l=o.Z.from(t),{data:u}=await(0,s.JT)(n,l,l.sourceSpatialReference,a);return u}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},98326:(e,t,r)=>{r.d(t,{Z:()=>c});var i,s=r(43697),n=r(96674),o=r(5600),a=r(75215),l=(r(67676),r(80442),r(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=i=class extends n.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:r,tagName:i}=e;if(!t||!r||!i)return null;const s=t.find((e=>e.name===r));return s?function(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const i=r.find((e=>e.name===t));return i&&i.value||null}({tagName:i,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new i({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,s._)([(0,o.Cb)({type:String})],p.prototype,"contentType",void 0),(0,s._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,s._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,s._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=i=(0,s._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,r)=>{r.d(t,{Z:()=>d});var i,s=r(43697),n=r(96674),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556);let c=i=class extends n.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new i((0,o.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=i=(0,s._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,s=r(43697),n=(r(66577),r(96674)),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556),c=r(10158),d=r(82971);let m=i=class extends n.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,s._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,s._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=i=(0,s._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,r)=>{r.d(t,{Z:()=>_});var i,s=r(43697),n=r(66577),o=r(92835),a=r(35454),l=r(96674),u=r(22974),p=r(5600),c=r(75215),d=r(52011),m=r(30556),h=r(33955);r(67676),r(80442);let y=i=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=i=(0,s._)([(0,d.j)("esri.rest.support.TopFilter")],y);const f=y;var g,b=r(82971);const v=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),w=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=g=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new g((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],R.prototype,"distance",void 0),(0,s._)([(0,p.Cb)({types:n.qM,json:{read:h.im,write:!0}})],R.prototype,"geometry",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),(0,s._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"objectIds",void 0),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),(0,s._)([(0,p.Cb)({type:b.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],R.prototype,"outSpatialReference",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),(0,s._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"returnGeometry",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnM",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnZ",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),(0,s._)([(0,m.c)("start"),(0,m.c)("num")],R.prototype,"writeStart",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"spatialRel",reader:v.read},write:{target:"spatialRel",writer:v.write}}})],R.prototype,"spatialRelationship",void 0),(0,s._)([(0,p.Cb)({type:o.Z,json:{write:!0}})],R.prototype,"timeExtent",void 0),(0,s._)([(0,p.Cb)({type:f,json:{write:!0}})],R.prototype,"topFilter",void 0),(0,s._)([(0,p.Cb)({type:String,json:{read:w.read,write:{writer:w.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],R.prototype,"units",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"where",void 0),R=g=(0,s._)([(0,d.j)("esri.rest.support.TopFeaturesQuery")],R),R.from=(0,c.se)(R);const _=R}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4330],{65845:(e,t,r)=>{r.d(t,{D:()=>n});var a=r(81153);function n(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>a})},94330:(e,t,r)=>{r.d(t,{save:()=>p,saveAs:()=>c});var a=r(95330),n=r(64383),o=r(14661);const i="Stream Service";function l(e){return{isValid:"stream"===e.type&&!!e.url&&!e.webSocketUrl,errorMessage:"Stream layer should be created using a url to a stream service"}}function s(e){const t=e.layerJSON;return Promise.resolve(t&&Object.keys(t).length?t:null)}async function u(e,t){const{parsedUrl:r,title:a,fullExtent:n}=e;t.url=r.path,t.title||=a,t.extent=null,null!=n&&(t.extent=await(0,o.$o)(n)),(0,o.qj)(t,o.Kz.SINGLE_LAYER)}const p=(0,a.Ds)((async function(e,t){return(0,n.a1)({layer:e,itemType:i,validateLayer:l,createItemData:s,errorNamePrefix:"stream-layer-save"},t)})),c=(0,a.Ds)((async function(e,t,r){return(0,n.po)({layer:e,itemType:i,validateLayer:l,createItemData:s,errorNamePrefix:"stream-layer-save-as",newItem:t,setItemProperties:u},r)}))},64383:(e,t,r)=>{r.d(t,{DC:()=>u,Nw:()=>y,UY:()=>w,Ym:()=>d,a1:()=>v,jX:()=>g,po:()=>h,uT:()=>f,xG:()=>c});var a=r(20102),n=r(65845),o=r(48522),i=r(15235),l=r(33516),s=r(14661);function u(e,t,r){const n=r(e);if(!n.isValid)throw new a.Z(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}async function p(e){const{layer:t,errorNamePrefix:r,validateLayer:a}=e;await t.load(),u(t,r,a)}function c(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function m(e,t,r,n){if(e.type!==r)throw new a.Z(`${t}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:e,layer:n})}function d(e,t,r){const{portalItem:n}=e;if(!n)throw new a.Z(`${t}:portal-item-not-set`,c(e,"requires the portalItem property to be set"));if(!n.loaded)throw new a.Z(`${t}:portal-item-not-loaded`,c(e,"cannot be saved to a portal item that does not exist or is inaccessible"));m(n,t,r,e)}function f(e,t,r,a){let n=i.default.from(e);return n.id&&(n=n.clone(),n.id=null),n.type??=r,n.portal??=o.Z.getDefault(),m(n,t,r,a),n}async function y(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const n=e.write({},t);return function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.Z(e,t,r)));if(t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new a.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),n}function w(e){(0,s.qj)(e,s.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function g(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}async function v(e,t){const{layer:r,createItemData:a,errorNamePrefix:o,itemType:i}=e;await p(e),d(r,o,i);const s=r.portalItem,u=(0,l.Y)(s),c=await y(r,u,t),m=await a({layer:r,layerJSON:c},s);return w(s),await s.update({data:m}),(0,n.D)(u),s}async function h(e,t){const{layer:r,createItemData:a,setItemProperties:o,newItem:i,errorNamePrefix:s,itemType:u}=e;await p(e);const c=f(i,s,u,r),m=(0,l.Y)(c),d=await y(r,m,t),v=await a({layer:r,layerJSON:d},c);return await o(r,c),w(c),await g(c,v,t),r.portalItem=c,(0,n.D)(m),c}},33516:(e,t,r)=>{r.d(t,{Y:()=>i,h:()=>o});var a=r(17452),n=r(48522);function o(e){return{origin:"portal-item",url:(0,a.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function i(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}}}]);