@arcgis/core 4.30.0-next.20240213 → 4.30.0-next.20240215

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 (193) hide show
  1. package/TimeExtent.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/08ba549f9c4afc42a21c.js +1 -0
  4. package/assets/esri/core/workers/chunks/114afcee6a66415cd123.js +1 -0
  5. package/assets/esri/core/workers/chunks/1320562881294ce93806.js +1 -0
  6. package/assets/esri/core/workers/chunks/13451fa3e4b02ca2beb0.js +1 -0
  7. package/assets/esri/core/workers/chunks/{a384f29cb3256401962a.js → 1629a8c2085dce59cd1b.js} +1 -1
  8. package/assets/esri/core/workers/chunks/18512caeeb03b9759ab1.js +1 -0
  9. package/assets/esri/core/workers/chunks/{cc1c958aad790a44048b.js → 1ca28af7c516d8283bb0.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1f8a0fb32b96e50f5909.js +1 -0
  11. package/assets/esri/core/workers/chunks/{abab3abb8ea7610d9fb8.js → 21e7a88478f5d15e0e71.js} +1 -1
  12. package/assets/esri/core/workers/chunks/24452a26b0c5322c7d2b.js +1 -0
  13. package/assets/esri/core/workers/chunks/25b88787ead0cc44cda4.js +1 -0
  14. package/assets/esri/core/workers/chunks/2649166d1a462c7f8338.js +1 -0
  15. package/assets/esri/core/workers/chunks/2c96771a365f8f70e996.js +1 -0
  16. package/assets/esri/core/workers/chunks/352e7f8d694f3f217a2d.js +1 -0
  17. package/assets/esri/core/workers/chunks/392214a3a1d712eda155.js +1 -0
  18. package/assets/esri/core/workers/chunks/397f15b5bce6838db084.js +1 -0
  19. package/assets/esri/core/workers/chunks/3bf281e979408b9363ed.js +1 -0
  20. package/assets/esri/core/workers/chunks/4edc667148d023b5b5af.js +1 -0
  21. package/assets/esri/core/workers/chunks/51e4f771bfe352967c97.js +1 -0
  22. package/assets/esri/core/workers/chunks/55cd747e06bb59d1a328.js +1 -0
  23. package/assets/esri/core/workers/chunks/5638d95e600ff271c5b1.js +1 -0
  24. package/assets/esri/core/workers/chunks/563d172caa15ea1b510d.js +1108 -0
  25. package/assets/esri/core/workers/chunks/58f088b08e12c5435dbc.js +1 -0
  26. package/assets/esri/core/workers/chunks/5aef1e898618f8dda2c9.js +1 -0
  27. package/assets/esri/core/workers/chunks/608be8ebf772aefc36a5.js +1 -0
  28. package/assets/esri/core/workers/chunks/64df2521b2814d2fb918.js +1 -0
  29. package/assets/esri/core/workers/chunks/65070fb591f6ef8313c3.js +1 -0
  30. package/assets/esri/core/workers/chunks/656ec8a14df0e4b68433.js +1 -0
  31. package/assets/esri/core/workers/chunks/6601fe99d587b9dff3c7.js +1 -0
  32. package/assets/esri/core/workers/chunks/{274e623323e24250ca46.js → 6ac424af4f2825fabceb.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{eb2d6f1ee63b40ae0736.js → 774b655498289b1b36bb.js} +1 -1
  34. package/assets/esri/core/workers/chunks/781bb63af571568358e3.js +1 -0
  35. package/assets/esri/core/workers/chunks/9e54d2cbe42f5552aaca.js +1 -0
  36. package/assets/esri/core/workers/chunks/{f03d62ab7806b68d0b62.js → 9fbf61675e2a5374f754.js} +1 -1
  37. package/assets/esri/core/workers/chunks/a5253543eae1708d11b9.js +1 -0
  38. package/assets/esri/core/workers/chunks/aa9b46bcb75c96731de3.js +1 -0
  39. package/assets/esri/core/workers/chunks/cfb8b6b5e9c21d582cf4.js +1 -0
  40. package/assets/esri/core/workers/chunks/d1b2372084c1e8c60f79.js +1 -0
  41. package/assets/esri/core/workers/chunks/{1c6914ded7db720f7bf7.js → daf6eab5dd198ca9a67b.js} +1 -1
  42. package/assets/esri/core/workers/chunks/e03edeaf3af46495449e.js +1 -0
  43. package/assets/esri/core/workers/chunks/e685214698fbc84276dd.js +1 -0
  44. package/assets/esri/core/workers/chunks/ebb294c82207f3ff9f04.js +1 -0
  45. package/assets/esri/core/workers/chunks/ec20e23aec9370df8a55.js +1 -0
  46. package/assets/esri/core/workers/chunks/{e4da908079417cc2f495.js → ee0c77889059815a31b2.js} +1 -1
  47. package/assets/esri/core/workers/chunks/f68b7bb88c444a7cbbd2.js +1 -0
  48. package/assets/esri/core/workers/chunks/f90bbebd2dc07a77ce09.js +1 -0
  49. package/assets/esri/core/workers/chunks/fa388680ff976a6b30f6.js +1 -0
  50. package/chunks/vec32.js +1 -1
  51. package/interfaces.d.ts +135 -68
  52. package/layers/WFSLayer.js +1 -1
  53. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  54. package/layers/graphics/applyEditsUtils.js +1 -1
  55. package/layers/graphics/editingSupport.js +1 -1
  56. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  57. package/layers/mixins/ArcGISImageService.js +1 -1
  58. package/layers/save/featureLayerUtils.js +1 -1
  59. package/layers/support/arcgisLayers.js +1 -1
  60. package/layers/support/fetchService.js +1 -1
  61. package/layers/support/fromPortalItem.js +1 -1
  62. package/networks/Network.js +1 -1
  63. package/package.json +1 -1
  64. package/portal/Portal.js +1 -1
  65. package/portal/PortalGroup.js +1 -1
  66. package/portal/PortalUser.js +1 -1
  67. package/portal/support/geometryServiceUtils.js +1 -1
  68. package/portal/support/layersLoader.js +1 -1
  69. package/portal/support/loadUtils.js +1 -1
  70. package/portal/support/portalLayers.js +1 -1
  71. package/renderers/visualVariables/SizeVariable.js +1 -1
  72. package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
  73. package/rest/networks/support/Association.js +1 -1
  74. package/rest/places.js +1 -1
  75. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  76. package/rest/support/ImageSampleParameters.js +1 -1
  77. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  78. package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
  79. package/support/elevationInfoUtils.js +1 -1
  80. package/support/revision.js +1 -1
  81. package/symbols/cim/cimAnalyzer.js +1 -1
  82. package/symbols/cim/defaultCIMValues.js +1 -1
  83. package/symbols/cim/utils.js +1 -1
  84. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  85. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  86. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  87. package/views/2d/engine/webgl/definitions.js +1 -1
  88. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  89. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  90. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  91. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  92. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  93. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  94. package/views/2d/layers/features/Processor.js +1 -1
  95. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  96. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  97. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  98. package/views/2d/layers/features/schema/processor/VisualVariablesSchema.js +1 -1
  99. package/views/2d/layers/features/sources/strategies/SnapshotLoadStrategy.js +1 -1
  100. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  101. package/views/2d/layers/features/support/DisplayIdGenerator.js +1 -1
  102. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  103. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  104. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  105. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  106. package/views/3d/layers/SceneLayerView3D.js +1 -1
  107. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  108. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  109. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  110. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  111. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  112. package/views/3d/support/orientedBoundingBox.js +1 -1
  113. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  114. package/views/3d/terrain/OverlayRenderer.js +1 -1
  115. package/views/3d/webgl/RenderNode.js +1 -1
  116. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  117. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  118. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +9 -7
  119. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceConstants.js +5 -0
  120. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
  121. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  122. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  123. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  124. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  125. package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
  126. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
  127. package/views/draw/DrawGraphicTool.js +1 -1
  128. package/views/draw/DrawOperation.js +1 -1
  129. package/views/draw/drawSurfaces.js +1 -1
  130. package/views/interactive/snapping/SnappingManager.js +1 -1
  131. package/views/interactive/snapping/SnappingOptions.js +1 -1
  132. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  133. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  134. package/views/layers/ImageryTileLayerView.js +1 -1
  135. package/webdoc/support/webdocLoadUtils.js +1 -1
  136. package/webdoc/support/webdocSaveUtils.js +1 -1
  137. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  138. package/widgets/Editor/EditorViewModel.js +1 -1
  139. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  140. package/widgets/Editor/UpdateWorkflow.js +1 -1
  141. package/widgets/Editor/components/FooterActions.js +1 -1
  142. package/widgets/Editor/support/EditorItem.js +1 -1
  143. package/widgets/Editor.js +1 -1
  144. package/widgets/FeatureForm.js +1 -1
  145. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  146. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  147. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  148. package/widgets/FeatureTable.js +1 -1
  149. package/widgets/Features/FeaturesViewModel.js +1 -1
  150. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  151. package/widgets/Print/PrintViewModel.js +1 -1
  152. package/widgets/Print.js +1 -1
  153. package/widgets/Search/support/locatorUtils.js +1 -1
  154. package/widgets/Sketch/SketchViewModel.js +1 -1
  155. package/assets/esri/core/workers/chunks/00b9e92f8df245a83921.js +0 -1
  156. package/assets/esri/core/workers/chunks/02a6c43ec17e7223fac5.js +0 -1
  157. package/assets/esri/core/workers/chunks/02ee044597c89c86b934.js +0 -1
  158. package/assets/esri/core/workers/chunks/05ebb9cec0e1826b283f.js +0 -1
  159. package/assets/esri/core/workers/chunks/143ccb14c9e915dd1412.js +0 -1
  160. package/assets/esri/core/workers/chunks/24649b410b757599a549.js +0 -1
  161. package/assets/esri/core/workers/chunks/24d19abc680b341d13bb.js +0 -1
  162. package/assets/esri/core/workers/chunks/2519b207894132d5ea91.js +0 -1
  163. package/assets/esri/core/workers/chunks/30f9b2a3417cbcfeecca.js +0 -1
  164. package/assets/esri/core/workers/chunks/42ab9c282bb267c3db03.js +0 -1
  165. package/assets/esri/core/workers/chunks/478815fc19b452d8317d.js +0 -1
  166. package/assets/esri/core/workers/chunks/49afeac45250b15b5f36.js +0 -1
  167. package/assets/esri/core/workers/chunks/50bb67f2eeace5d50673.js +0 -1
  168. package/assets/esri/core/workers/chunks/50cdc59426ba859027e2.js +0 -1
  169. package/assets/esri/core/workers/chunks/5401ec9c9fd62dcac6ec.js +0 -1
  170. package/assets/esri/core/workers/chunks/554d86df71821d671d2c.js +0 -1
  171. package/assets/esri/core/workers/chunks/58c5861d060c808813a1.js +0 -1
  172. package/assets/esri/core/workers/chunks/5dbb3ef6fdd25ac632ad.js +0 -1
  173. package/assets/esri/core/workers/chunks/61c4bb58ef9f2d99c75e.js +0 -1
  174. package/assets/esri/core/workers/chunks/6e50220f8e2d392e2855.js +0 -1
  175. package/assets/esri/core/workers/chunks/6fd8047741a0df006ddd.js +0 -1
  176. package/assets/esri/core/workers/chunks/7709248f59520aee6f51.js +0 -1
  177. package/assets/esri/core/workers/chunks/8852a64918caf80fc414.js +0 -1
  178. package/assets/esri/core/workers/chunks/8d119dc0a92ad3612daa.js +0 -1
  179. package/assets/esri/core/workers/chunks/94dfb80ab23dda92918b.js +0 -1
  180. package/assets/esri/core/workers/chunks/9ebbc75ba5c623a322aa.js +0 -1
  181. package/assets/esri/core/workers/chunks/a5babc10f47c24651d15.js +0 -1
  182. package/assets/esri/core/workers/chunks/a74c59cf5d1c4e63a4e1.js +0 -1
  183. package/assets/esri/core/workers/chunks/ada5d6fd70bd3e403442.js +0 -1
  184. package/assets/esri/core/workers/chunks/b95d69d84d60ac9828b9.js +0 -1
  185. package/assets/esri/core/workers/chunks/be562536212360943388.js +0 -1
  186. package/assets/esri/core/workers/chunks/ce823fc2d0e0095f398c.js +0 -1
  187. package/assets/esri/core/workers/chunks/d06d36815c2121484a13.js +0 -1
  188. package/assets/esri/core/workers/chunks/d5f06a7b0ea7951c8dd0.js +0 -1
  189. package/assets/esri/core/workers/chunks/ddc71fe66c7a49082920.js +0 -1
  190. package/assets/esri/core/workers/chunks/de6d54df7ae32694fd70.js +0 -1
  191. package/assets/esri/core/workers/chunks/f13c4b9692dad5802a32.js +0 -1106
  192. package/assets/esri/core/workers/chunks/f1e8f7d1a98b9e207b1b.js +0 -1
  193. package/assets/esri/core/workers/chunks/f9e9675f1c2287231653.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[712,8648],{13452:(e,t,r)=>{r.d(t,{c:()=>p});var i=r(41948),s=r(3856),n=r(40504),o=r(94360),a=r(1580),l=(r(9456),r(66360),r(72052),r(9968)),c=r(12552),d=r(4736);let u=class extends((0,s.q)(n.am)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.QJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.G)(d.e,{nonNullable:!0})],u.prototype,"unit",void 0),(0,i._)([(0,a.qq)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,i._)([(0,c.c)("esri.TimeInterval")],u);const p=u},22156:(e,t,r)=>{r.d(t,{MR:()=>o,qm:()=>a});var i=r(41948),s=r(12552);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.c)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.c)("esri.core.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,i._)([(0,s.c)("esri.core.Identifiable")],l)},77380:(e,t,r)=>{r.d(t,{I:()=>f,Y:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function c(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function d(e,t,r,i,s,n,o){return c(t&r|~t&i,e,t,s,n,o)}function u(e,t,r,i,s,n,o){return c(t&i|r&~i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return c(t^r^i,e,t,s,n,o)}function y(e,t,r,i,s,n,o){return c(r^(t|~i),e,t,s,n,o)}function h(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,c=s,h=n;r=d(r,i,s,n,e[t],7,-680876936),n=d(n,r,i,s,e[t+1],12,-389564586),s=d(s,n,r,i,e[t+2],17,606105819),i=d(i,s,n,r,e[t+3],22,-1044525330),r=d(r,i,s,n,e[t+4],7,-176418897),n=d(n,r,i,s,e[t+5],12,1200080426),s=d(s,n,r,i,e[t+6],17,-1473231341),i=d(i,s,n,r,e[t+7],22,-45705983),r=d(r,i,s,n,e[t+8],7,1770035416),n=d(n,r,i,s,e[t+9],12,-1958414417),s=d(s,n,r,i,e[t+10],17,-42063),i=d(i,s,n,r,e[t+11],22,-1990404162),r=d(r,i,s,n,e[t+12],7,1804603682),n=d(n,r,i,s,e[t+13],12,-40341101),s=d(s,n,r,i,e[t+14],17,-1502002290),i=d(i,s,n,r,e[t+15],22,1236535329),r=u(r,i,s,n,e[t+1],5,-165796510),n=u(n,r,i,s,e[t+6],9,-1069501632),s=u(s,n,r,i,e[t+11],14,643717713),i=u(i,s,n,r,e[t],20,-373897302),r=u(r,i,s,n,e[t+5],5,-701558691),n=u(n,r,i,s,e[t+10],9,38016083),s=u(s,n,r,i,e[t+15],14,-660478335),i=u(i,s,n,r,e[t+4],20,-405537848),r=u(r,i,s,n,e[t+9],5,568446438),n=u(n,r,i,s,e[t+14],9,-1019803690),s=u(s,n,r,i,e[t+3],14,-187363961),i=u(i,s,n,r,e[t+8],20,1163531501),r=u(r,i,s,n,e[t+13],5,-1444681467),n=u(n,r,i,s,e[t+2],9,-51403784),s=u(s,n,r,i,e[t+7],14,1735328473),i=u(i,s,n,r,e[t+12],20,-1926607734),r=p(r,i,s,n,e[t+5],4,-378558),n=p(n,r,i,s,e[t+8],11,-2022574463),s=p(s,n,r,i,e[t+11],16,1839030562),i=p(i,s,n,r,e[t+14],23,-35309556),r=p(r,i,s,n,e[t+1],4,-1530992060),n=p(n,r,i,s,e[t+4],11,1272893353),s=p(s,n,r,i,e[t+7],16,-155497632),i=p(i,s,n,r,e[t+10],23,-1094730640),r=p(r,i,s,n,e[t+13],4,681279174),n=p(n,r,i,s,e[t],11,-358537222),s=p(s,n,r,i,e[t+3],16,-722521979),i=p(i,s,n,r,e[t+6],23,76029189),r=p(r,i,s,n,e[t+9],4,-640364487),n=p(n,r,i,s,e[t+12],11,-421815835),s=p(s,n,r,i,e[t+15],16,530742520),i=p(i,s,n,r,e[t+2],23,-995338651),r=y(r,i,s,n,e[t],6,-198630844),n=y(n,r,i,s,e[t+7],10,1126891415),s=y(s,n,r,i,e[t+14],15,-1416354905),i=y(i,s,n,r,e[t+5],21,-57434055),r=y(r,i,s,n,e[t+12],6,1700485571),n=y(n,r,i,s,e[t+3],10,-1894986606),s=y(s,n,r,i,e[t+10],15,-1051523),i=y(i,s,n,r,e[t+1],21,-2054922799),r=y(r,i,s,n,e[t+8],6,1873313359),n=y(n,r,i,s,e[t+15],10,-30611744),s=y(s,n,r,i,e[t+6],15,-1560198380),i=y(i,s,n,r,e[t+13],21,1309151649),r=y(r,i,s,n,e[t+4],6,-145523070),n=y(n,r,i,s,e[t+11],10,-1120210379),s=y(s,n,r,i,e[t+2],15,718787259),i=y(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,c),n=o(n,h)}return[r,i,s,n]}function f(e,t=i.Hex){const r=t||i.Base64,n=h(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},90636:(e,t,r)=>{r.d(t,{O:()=>y});var i=r(20744),s=r(77380),n=r(4644),o=r(28176),a=r(63564),l=r(44296),c=r(71448),d=r(1580),u=r(73960),p=r(91952);function y(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.EF)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,p.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,p.t)(t,l)):void(s[a]=t.write({},l));const d=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),y=(0,p.t)(d,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},p.M.NO),g=i.type!==String&&(!(0,n.w)(this)||l?.origin&&this.originIdOf(r)>(0,c.CQ)(l.origin)),w={object:this,propertyName:r,value:t,targetUrl:y,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&y&&!(0,o.ic)(y)?g&&e?.contentAddressed?h(w):g?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),c=m(s,r,t),d=(0,u.e)(c),p=(0,o.wt)(l.path),y=i?.compress??!1;d===p?(t.resources&&f({...e,resource:l,content:c,compress:y,updates:t.resources.toUpdate}),n[a]=r):h(e)}(w):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(w):l?.portalItem&&(null==y||null!=(0,p.i)(y)||(0,o.ue)(y)||g)?h(w):s[a]=y}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=p.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,d.aq)(r,e,i);for(const e in s)t[e]=s[e]}}}function h(e){const{targetUrl:t,params:r,value:n,context:l,dest:c,targetPropertyName:d}=e;if(!l.portalItem)return;const y=(0,p.p)(t),h=m(n,t,l);if(r?.contentAddressed&&"json"!==h.type)return void l.messages?.push(new i.c("persistable:contentAddressingUnsupported",`Property "${d}" is trying to serializing a resource with content of type ${h.type} with content addressing. Content addressing is only supported for json resources.`,{content:h}));const g=r?.contentAddressed&&"json"===h.type?(0,s.I)(h.jsonString):y?.filename??(0,a.g1)(),w=(0,o.kn)(r?.prefix??y?.prefix,g),v=`${w}.${(0,u.e)(h)}`;if(r?.contentAddressed&&l.resources&&"json"===h.type){const e=l.resources.toKeep.find((({resource:e})=>e.path===v))??l.resources.toAdd.find((({resource:e})=>e.path===v));if(e)return void(c[d]=e.resource.itemRelativeUrl)}const b=l.portalItem.resourceFromPath(v);(0,o.ue)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.SW)(t).then((e=>{b.path=`${w}.${(0,u.e)({type:"blob",blob:e})}`,c[d]=b.itemRelativeUrl})).catch((()=>{})));const q=r?.compress??!1;l.resources&&f({...e,resource:b,content:h,compress:q,updates:l.resources.toAdd}),c[d]=b.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function m(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},63564:(e,t,r)=>{r.d(t,{Mr:()=>o,cf:()=>n,g1:()=>s});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}},13819:(e,t,r)=>{r.d(t,{c:()=>v});var i,s=r(41948),n=r(92400),o=r(14628),a=r(40504),l=r(24296),c=r(69504),d=r(1580),u=(r(9456),r(66360),r(33600)),p=r(12552),y=r(18996);const h=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=h.jsonValues.slice();(0,n.sH)(f,"orthometric");const m=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=i=class extends a.am{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return h.write(e,t,r)}readHeightModel(e,t,r){return h.read(e)||(r?.messages&&r.messages.push(function(e,t){return new c.c("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(w(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.oG)(e)||m.read(e)||(r?.messages&&r.messages.push(w(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l._2)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function w(e,t){return new c.c("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,d.qq)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,y.G)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,u.E)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,d.qq)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,u.E)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,u.E)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,d.qq)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,u.E)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,s._)([(0,p.c)("esri.geometry.HeightModelInfo")],g);const v=g},81436:(e,t,r)=>{r.d(t,{c:()=>v});var i=r(41948),s=(r(60708),r(2600)),n=r(20744),o=r(77860),a=r(22156),l=r(95800),c=r(66360),d=r(10860),u=r(28176),p=r(1580),y=(r(9456),r(72052),r(12552)),h=r(6220),f=r(95247),m=r(56156);let g=0,w=class extends(o.c.EventedMixin((0,a.MR)(l.c))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.c(-180,-90,180,90,m.c.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.c.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(9232).then(r.bind(r,69232))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(2259).then(r.bind(r,12259));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||h.default.portalUrl;throw c.c.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.mA)(e)||c.c.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,u.as)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.c)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.c("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,p.qq)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i._)([(0,p.qq)({type:f.c})],w.prototype,"fullExtent",void 0),(0,i._)([(0,p.qq)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i._)([(0,p.qq)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i._)([(0,p.qq)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i._)([(0,p.qq)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i._)([(0,p.qq)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i._)([(0,p.qq)({clonable:!1})],w.prototype,"parent",void 0),(0,i._)([(0,p.qq)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,p.qq)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i._)([(0,p.qq)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i._)([(0,p.qq)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i._)([(0,p.qq)({type:m.c})],w.prototype,"spatialReference",void 0),(0,i._)([(0,p.qq)({type:String})],w.prototype,"title",void 0),(0,i._)([(0,p.qq)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i._)([(0,p.qq)()],w.prototype,"url",void 0),(0,i._)([(0,p.qq)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i._)([(0,y.c)("esri.layers.Layer")],w);const v=w},3688:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Fe});var i=r(41948),s=r(6444),n=r(82692),o=(r(99704),r(73868),r(90200),r(12836),r(63718),r(2360),r(64624),r(24948),r(70236),r(37284)),a=r(2600),l=r(3856),c=r(2952),d=r(20744),u=r(66360),p=r(26496),y=r(10860),h=r(57896),f=r(28176),m=r(1580),g=(r(9456),r(72052),r(20916)),w=r(33600),v=r(12552),b=r(71448),q=r(94716),I=r(67776),_=r(81436),S=r(4040),F=r(38724),x=r(16660),j=r(28584),E=r(6576),L=r(66576),O=r(98768),A=r(3116),R=r(87072),T=r(6828),U=r(48212),P=r(50420),M=r(36088),D=r(21488),C=r(70388),N=r(66464),G=r(17968),$=r(81732),k=r(16424),V=r(564),H=r(44104),Q=r(4048),J=r(6168),W=r(34880),B=r(24144),K=r(83928),z=r(40504);let Z=class extends z.am{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i._)([(0,m.qq)({type:String,json:{read:!0,write:!0}})],Z.prototype,"name",void 0),(0,i._)([(0,m.qq)({type:String,json:{read:!0,write:!0}})],Z.prototype,"field",void 0),(0,i._)([(0,m.qq)({type:[Number],json:{read:!0,write:!0}})],Z.prototype,"currentRangeExtent",void 0),(0,i._)([(0,m.qq)({type:[Number],json:{read:!0,write:!0}})],Z.prototype,"fullRangeExtent",void 0),(0,i._)([(0,m.qq)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],Z.prototype,"type",void 0),Z=(0,i._)([(0,v.c)("esri.layers.support.RangeInfo")],Z);var Y,X=r(62088),ee=r(90636),te=r(69504),re=r(7488),ie=r(60074);let se=Y=class extends((0,z.Ib)(c.c.ofType(re.c))){constructor(e){super(e)}clone(){return new Y(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((r=>{if(!t.equals(r.spatialReference)){if(!(0,ie.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages&&e.messages.push(new te.c("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new re.c;(0,ie.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new te.c("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const r=new Y;return e.forEach((e=>r.add(re.c.fromJSON(e,t)))),r}};se=Y=(0,i._)([(0,v.c)("esri.layers.support.PolygonCollection")],se);const ne=se;var oe,ae=r(91952);let le=oe=class extends z.am{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ne,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.du))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=ne.fromJSON(e,r):this._geometriesSource={url:(0,ae.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,a.c)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map((e=>({...e,spatialReference:n})));this.geometries=ne.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new oe({geometries:(0,X.ct)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i._)([(0,m.qq)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],le.prototype,"spatialRelationship",void 0),(0,i._)([(0,m.qq)({type:ne,nonNullable:!0,json:{write:!0}}),(0,ee.O)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],le.prototype,"geometries",void 0),(0,i._)([(0,w.E)(["web-scene","portal-item"],"geometries")],le.prototype,"readGeometries",null),le=oe=(0,i._)([(0,v.c)("esri.layers.support.SceneFilter")],le);const ce=le;var de=r(97824),ue=r(95776),pe=r(69204),ye=r(56672),he=r(65548);async function fe(e){const t=[];for(const r of e)r.name.toLowerCase().endsWith(".zip")?t.push(me(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}async function me(e){const{BlobReader:t,ZipReader:i,BlobWriter:s}=await Promise.all([r.e(4831),r.e(9752)]).then(r.bind(r,79752)),n=[],o=new i(new t(e));return(await o.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s,r=e.getData?.(t).then((t=>new File([t],e.filename)));r&&n.push(r)})),Promise.all(n)}var ge=r(74776),we=r(63680),ve=r(9332);const be=new Set(["3DObject","Point"]),qe=(0,$.l)();let Ie=class extends((0,T.c)((0,E.CE)((0,R.G6)((0,x.u)((0,L.Y)((0,O.K)((0,A.I)((0,p.U)((0,j.G)((0,F.C)((0,l.q)(_.c)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new c.c,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new k.c(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:H.yq.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,C.ig)(this.associatedLayer)}get geometryType(){return Se[this.profile]||"mesh"}set renderer(e){(0,V.Gi)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:M.u;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:c,isVersioned:d,supportsAttachment:u},operations:{supportsEditing:p,supportsAdd:y,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:w}}=e,v=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D&&(0,ye.g1)();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&o,supportsUploadWithItemId:n},data:{supportsAttachment:u,supportsZ:l,supportsM:c,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:p&&v,supportsAdd:b&&y&&v,supportsDelete:b&&f&&v,supportsUpdate:h&&v,supportsAsyncConvert3D:w}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&_e[r]?_e[r]:(u.c.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.CE),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await(0,de.M)(this,{origin:"service"},t),(0,V.Gi)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.c.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ue.c;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new d.c("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new d.c("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,V.k7)(this.fieldsIndex,await(0,we.W_)(this,(0,we.M$)(this)));return(0,ge.cx)(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new d.c("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.c;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.c.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,he.Ap)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new d.c("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new d.c("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new d.c("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new d.c("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.statisticsInfo)if(e.name===r.name){const r=(0,f.kn)(this.parsedUrl.path,e.href);return(0,a.c)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new d.c("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(R.UJ.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(R.UJ.SAVE,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(387).then(r.bind(r,62768));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new d.c(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,l=s?.globalIdUsed??!0;if(a&&null==o)throw new d.c(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new d.c(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,U.Wq)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,C.wl)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new d.c(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){const r=e=>{throw u.c.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new d.c("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce(((e,t)=>(0,Q.kD)(this.infoFor3D,t)?e+1:e),0);0===s&&r(new S.Su),s>1&&r(new S.Ev);const n=this.spatialReference,o=t?.location??new I.c({x:0,y:0,z:0,spatialReference:n}),a=t?.vertexSpace,l=q.c.createWithExternalSource(o,i,{vertexSpace:a}),[c]=await this.uploadAssets([l],t);return c}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await fe(e)).filter((e=>(0,Q.sz)(t,e))):e}validateLayer(e){if(e.layerType&&!be.has(e.layerType))throw new d.c("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d.c("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new d.c("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new d.c("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new d.c("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new d.c("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,g.m6)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(n===b.sT.SERVICE||n===b.sT.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.editingInfo?.lastEditDate,t=this.associatedLayer?.serverGens,r=this.associatedLayer?.getAtOrigin("fullExtent","service");(0,ye.g1)()&&null!=this.associatedLayer?.infoFor3D&&r&&(0,U.Wq)(this.associatedLayer?.url)&&e&&this.serviceUpdateTimeStamp?.lastUpdate!==e.getTime()&&(this.serviceUpdateTimeStamp||t?.minServerGen!==t?.serverGen)&&(0,g.m6)(this).setAtOrigin("fullExtent",r.clone(),b.sT.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await(0,P.S)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await K.q.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,y.mA)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.Eq)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.c.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):u.c.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,pe.A$)(u.c.getLogger(this),(0,pe.ay)("Mesh scene layers","relative-to-scene",e)),(0,pe.A$)(u.c.getLogger(this),(0,pe.W8)("Scene layers",e))}};(0,i._)([(0,m.qq)({types:{key:"type",base:N.E,typeMap:{selection:G.c}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Ie.prototype,"featureReduction",void 0),(0,i._)([(0,m.qq)({type:[Z],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Ie.prototype,"rangeInfos",void 0),(0,i._)([(0,m.qq)({json:{read:!1}})],Ie.prototype,"associatedLayer",void 0),(0,i._)([(0,m.qq)({type:["show","hide"]})],Ie.prototype,"listMode",void 0),(0,i._)([(0,m.qq)({type:["ArcGISSceneServiceLayer"]})],Ie.prototype,"operationalLayerType",void 0),(0,i._)([(0,m.qq)({json:{read:!1},readOnly:!0})],Ie.prototype,"type",void 0),(0,i._)([(0,m.qq)({...qe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"fields",void 0),(0,i._)([(0,m.qq)()],Ie.prototype,"types",null),(0,i._)([(0,m.qq)()],Ie.prototype,"typeIdField",null),(0,i._)([(0,m.qq)()],Ie.prototype,"templates",null),(0,i._)([(0,m.qq)()],Ie.prototype,"formTemplate",null),(0,i._)([(0,m.qq)({readOnly:!0,clonable:!1})],Ie.prototype,"fieldsIndex",null),(0,i._)([(0,m.qq)({type:B.c,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Ie.prototype,"floorInfo",void 0),(0,i._)([(0,m.qq)(qe.outFields)],Ie.prototype,"outFields",void 0),(0,i._)([(0,m.qq)({type:H.yq,readOnly:!0,json:{read:!1}})],Ie.prototype,"nodePages",void 0),(0,i._)([(0,w.E)("service","nodePages",["nodePages","pointNodePages"])],Ie.prototype,"readNodePages",null),(0,i._)([(0,m.qq)({type:[H.a],readOnly:!0})],Ie.prototype,"materialDefinitions",void 0),(0,i._)([(0,m.qq)({type:[H.G4],readOnly:!0})],Ie.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,m.qq)({type:[H.iK],readOnly:!0})],Ie.prototype,"geometryDefinitions",void 0),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"statisticsInfo",void 0),(0,i._)([(0,m.qq)({type:c.c.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Ie.prototype,"excludeObjectIds",void 0),(0,i._)([(0,m.qq)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Ie.prototype,"definitionExpression",void 0),(0,i._)([(0,m.qq)({type:ce,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Ie.prototype,"filter",void 0),(0,i._)([(0,m.qq)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ie.prototype,"path",void 0),(0,i._)([(0,m.qq)(D.Kg)],Ie.prototype,"elevationInfo",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{read:!1}})],Ie.prototype,"effectiveCapabilities",null),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,m.qq)({type:String})],Ie.prototype,"geometryType",null),(0,i._)([(0,m.qq)(D.Wu)],Ie.prototype,"labelsVisible",void 0),(0,i._)([(0,m.qq)({type:[J.c],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:W.E},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W.E},write:!0}})],Ie.prototype,"labelingInfo",void 0),(0,i._)([(0,m.qq)(D.Uj)],Ie.prototype,"legendEnabled",void 0),(0,i._)([(0,m.qq)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,ve.u)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Ie.prototype,"opacity",void 0),(0,i._)([(0,m.qq)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"priority",void 0),(0,i._)([(0,m.qq)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"semantic",void 0),(0,i._)([(0,m.qq)({types:o.Q,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Ie.prototype,"renderer",null),(0,i._)([(0,m.qq)({json:{read:!1}})],Ie.prototype,"cachedDrawingInfo",void 0),(0,i._)([(0,w.E)("service","cachedDrawingInfo")],Ie.prototype,"readCachedDrawingInfo",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{read:!1}})],Ie.prototype,"capabilities",null),(0,i._)([(0,m.qq)({type:Boolean,json:{read:!1}})],Ie.prototype,"editingEnabled",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{write:!1,read:!1}})],Ie.prototype,"infoFor3D",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{write:!1,read:!1}})],Ie.prototype,"relationships",null),(0,i._)([(0,m.qq)(D.Ou)],Ie.prototype,"popupEnabled",void 0),(0,i._)([(0,m.qq)({type:n.c,json:{name:"popupInfo",write:!0}})],Ie.prototype,"popupTemplate",void 0),(0,i._)([(0,m.qq)({readOnly:!0,json:{read:!1}})],Ie.prototype,"defaultPopupTemplate",null),(0,i._)([(0,m.qq)({type:String,json:{read:!1}})],Ie.prototype,"objectIdField",void 0),(0,i._)([(0,w.E)("service","objectIdField",["objectIdField","fields"])],Ie.prototype,"readObjectIdField",null),(0,i._)([(0,m.qq)({type:String,json:{read:!1}})],Ie.prototype,"globalIdField",void 0),(0,i._)([(0,w.E)("service","globalIdField",["globalIdField","fields"])],Ie.prototype,"readGlobalIdField",null),(0,i._)([(0,m.qq)({readOnly:!0,type:String,json:{read:!1}})],Ie.prototype,"displayField",null),(0,i._)([(0,m.qq)({type:String,json:{read:!1}})],Ie.prototype,"profile",void 0),(0,i._)([(0,w.E)("service","profile",["store.profile"])],Ie.prototype,"readProfile",null),(0,i._)([(0,m.qq)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Ie.prototype,"normalReferenceFrame",void 0),(0,i._)([(0,m.qq)(D.Q9)],Ie.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,m.qq)({json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"serviceItemId",void 0),Ie=(0,i._)([(0,v.c)("esri.layers.SceneLayer")],Ie);const _e={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Se={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},Fe=Ie},4040:(e,t,r)=>{r.d(t,{AQ:()=>u,Av:()=>d,Ev:()=>m,KY:()=>o,Qr:()=>l,Su:()=>f,a:()=>a,iq:()=>h,kQ:()=>p,kz:()=>c,q8:()=>y});var i=r(20744);const s="upload-assets",n=()=>new Error;class o extends i.c{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends i.c{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends i.c{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class c extends i.c{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class d extends i.c{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class u extends i.c{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class p extends i.c{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class y extends i.c{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class h extends i.c{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class f extends i.c{constructor(){super("invalid-input:no-model","No supported model found")}}class m extends i.c{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},6576:(e,t,r)=>{r.d(t,{CE:()=>m,iC:()=>y,mK:()=>d});var i=r(41948),s=r(77860),n=r(62088),o=r(10860),a=(r(66360),r(9456),r(20744),r(12552)),l=r(73184);const c=new s.c.EventEmitter;function d(e,t,r=null,i=!1){const s=(0,o.qG)();return i=null==t||i,c.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const u="esri.layers.mixins.EditBusLayer",p=Symbol(u);function y(e){return null!=e&&"object"==typeof e&&p in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function f(e,t,r){const i=new URL(e).host,s=l.k5.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}const m=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,c=null!=r&&null!=this.layerId&&r===this.layerId,d=h(this),u=h(this)&&f(t,i,this.gdbVersion);if(!a||d&&!u||!c&&!s)return;const p=o.then((e=>{if(c&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.ct)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:r,updates:i,deletes:s}=t.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:s?s.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:i?i.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.ct)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.ct)(e.historicMoment)};return this.emit("edits",o),o}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.ct)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.ct)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(0,l.oK)(t,i)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=h(this),o=h(this)&&f(t,r,this.gdbVersion),a=h(this)&&!f(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then((()=>{this.addHandles(function(e){return c.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return c.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=p,r=(0,i._)([(0,a.c)(u)],r),r}},3116:(e,t,r)=>{r.d(t,{I:()=>o});var i=r(41948),s=r(1580),n=(r(9456),r(66360),r(72052),r(12552));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.qq)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.c)("esri.layers.mixins.ScaleRangeLayer")],t),t}},66464:(e,t,r)=>{r.d(t,{E:()=>a});var i=r(41948),s=r(40504),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));let a=class extends s.am{constructor(){super(...arguments),this.type=null}};(0,i._)([(0,n.qq)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,o.c)("esri.layers.support.FeatureReduction")],a)},17968:(e,t,r)=>{r.d(t,{c:()=>c});var i,s=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552)),a=r(66464);let l=i=class extends a.E{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s._)([(0,n.qq)({type:["selection"]})],l.prototype,"type",void 0),l=i=(0,s._)([(0,o.c)("esri.layers.support.FeatureReductionSelection")],l);const c=l},99336:(e,t,r)=>{r.d(t,{c:()=>f});var i=r(41948),s=r(25228),n=r(13452),o=r(3856),a=r(40504),l=r(1580),c=(r(9456),r(66360),r(72052),r(33600)),d=r(12552),u=r(18996),p=r(28484);function y(e,t){return n.c.fromJSON({value:e,unit:t})}let h=class extends((0,o.q)(a.am)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=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.c({start:r,end:i})}writeFullTimeExtent(e,t){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,l.qq)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,l.qq)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,l.qq)({type:s.c,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,c.E)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,u.G)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,l.qq)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,l.qq)({type:n.c,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,c.E)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,u.G)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,l.qq)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,l.qq)((0,p.SM)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i._)([(0,l.qq)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,i._)([(0,d.c)("esri.layers.support.TimeInfo")],h);const f=h},70388:(e,t,r)=>{r.d(t,{wj:()=>v,cV:()=>I,ig:()=>N,i:()=>$,cJ:()=>T,WC:()=>S,oh:()=>C,s1:()=>F,sD:()=>w,wl:()=>V,yo:()=>R,gx:()=>k,Q1:()=>x,iq:()=>L,YL:()=>E,W2:()=>j,ms:()=>O,UN:()=>A,Y9:()=>U,qY:()=>P,Ce:()=>M,kd:()=>q,Wm:()=>_});var i=r(47620),s=r(17988),n=r(40196),o=r(20744),a=r(14628),l=r(44247),c=r(64408),d=r(95776);async function u(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=p(e));const i=function(e){return p(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),s=e.capabilities.query.supportsPagination;t.start=0,t.num=i;let n=null;for(;;){const o=await e.source.queryFeaturesJSON(t,r);if(null==n?n=o:n.features=n.features.concat(o.features),n.exceededTransferLimit=o.exceededTransferLimit,!s||!o.exceededTransferLimit)break;t.start+=i}return n}function p(e){return e.capabilities.query.supportsMaxRecordCountFactor?d.c.MAX_MAX_RECORD_COUNT_FACTOR:1}var y=r(71068),h=r(64624),f=r(24948),m=r(19212),g=r(18648);const w=new a.O({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function v(e,t,r,i){const s=await D(e);if(await b(e,t,i),!s.addAttachment)throw new o.c(i,"Layer source does not support addAttachment capability");return s.addAttachment(t,r)}function b(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 o.c(r,`feature is missing the identifying attribute ${s}`)):Promise.reject(new o.c(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.c(r,"A feature is required to add/delete/update attachments")):Promise.reject(new o.c(r,"this layer doesn't support attachments"))}async function q(e,t,r,i,s){const n=await D(e);if(await b(e,t,s),!n.updateAttachment)throw new o.c(s,"Layer source does not support updateAttachment capability");return n.updateAttachment(t,r,i)}async function I(e,t,i){const{applyEdits:s}=await r.e(2768).then(r.bind(r,62768)),n=await e.load(),{source:o,globalIdField:a}=n;let l=i;return("feature"===n.type?n.infoFor3D:null)&&null!=t.deleteFeatures&&null!=a&&(l={...l,globalIdToObjectId:await V(e,t.deleteFeatures,a)}),s(n,o,t,i)}async function _(e,t,i){const{uploadAssets:s}=await r.e(2768).then(r.bind(r,62768)),n=await e.load();return s(n,n.source,t,i)}async function S(e,t,r,i){const s=await D(e);if(await b(e,t,i),!s.deleteAttachments)throw new o.c(i,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r)}async function F(e,t,r){const i=(await e.load({signal:t?.signal})).source;if(!i.fetchRecomputedExtents)throw new o.c(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function x(e,t,r,i){t=m.c.from(t),await e.load();const s=e.source,n=e.capabilities;if(!n?.data?.supportsAttachment)throw new o.c(i,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:c,num:d,size:u,start:p,where:y}=t;if(!n?.operations?.supportsQueryAttachments&&(a?.length>0||c?.length>0||u?.length>0||d||p||y))throw new o.c(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||c?.length||y))throw new o.c(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!s.queryAttachments)throw new o.c(i,"Layer source does not support queryAttachments capability",t);return s.queryAttachments(t)}async function j(e,t,r,i){const s=await D(e);if(!s.queryObjectIds)throw new o.c(i,"Layer source does not support queryObjectIds capability");return s.queryObjectIds(d.c.from(t)??e.createQuery(),r)}async function E(e,t,r,i){const s=await D(e);if(!s.queryFeatureCount)throw new o.c(i,"Layer source does not support queryFeatureCount capability");return s.queryFeatureCount(d.c.from(t)??e.createQuery(),r)}async function L(e,t,r,i){const s=await D(e);if(!s.queryExtent)throw new o.c(i,"Layer source does not support queryExtent capability");return s.queryExtent(d.c.from(t)??e.createQuery(),r)}async function O(e,t,r,i){const s=await D(e);if(!s.queryRelatedFeatures)throw new o.c(i,"Layer source does not support queryRelatedFeatures capability");return s.queryRelatedFeatures(g.default.from(t),r)}async function A(e,t,r,i){const s=await D(e);if(!s.queryRelatedFeaturesCount)throw new o.c(i,"Layer source does not support queryRelatedFeaturesCount capability");return s.queryRelatedFeaturesCount(g.default.from(t),r)}async function R(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.u)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function T(e){const t=new d.c,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 U(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 P(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 M(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 D(e){return(await e.load()).source}async function C(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,y.mK)(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 N(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const G=(0,c.g)({types:s.IX});function $(e,t){if(e.defaultSymbol)return e.types?.length?new f.c({defaultSymbol:G(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:G(e.symbol,e,t)})))}):new h.c({symbol:G(e.defaultSymbol,e,t)})}function k(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)}async function V(e,t,r){if(null==t)return null;const i=[],{objectIdField:s}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:i}=e;t={globalId:i[r],objectId:null!=i[s]&&-1!==i[s]?i[s]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||i.push(t.globalId))})),0===i.length)return null;const o=e.createQuery();o.where=i.map((e=>`${r}='${e}'`)).join(" OR "),o.returnGeometry=!1,o.outFields=[s,r],o.cacheHint=!1;const a=await(0,n.SO)(u(e,o));if(!a.ok)return null;const l=new Map,c=a.value.features;for(const e of c){const t=e.attributes[r],i=e.attributes[s];null!=t&&null!=i&&-1!==i&&l.set(t,i)}return l}},81732:(e,t,r)=>{r.d(t,{l:()=>l});var i=r(9456),s=r(66360),n=r(600),o=r(16424),a=r(564);function l(){return{fields:{type:[n.c],value:null,set:function(e){if(e&&(0,i.c)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.c.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.c.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!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||s.c.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.OO)(this.fieldsIndex,e)}}}}},4048:(e,t,r)=>{r.d(t,{If:()=>a,K0:()=>c,Mn:()=>h,kD:()=>n,me:()=>o,sz:()=>s,w$:()=>l});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=u(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const r=c(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function o(e,t){return p(function(e,t){const r=e.toLowerCase();return d(t).find((e=>y(e)===r))}(e,t))}function a(e,t){return p(u(e,t))}function l(e,t){return y(function(e,t){return d(t).find((t=>p(t)===e))}(e,t))}function c(e,t){return a(e.name,t)??o(e.type,t)}function d(e){return[...i,...e]}function u(e,t){const r=e.toLowerCase();return d(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function p(e){return e?.[0]}function y(e){return e?.[1].toLowerCase()}function h(e){return e.tables?.find((e=>"assetMaps"===e.role))}},73960:(e,t,r)=>{r.d(t,{e:()=>s});var i=r(28176);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.wt)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},4736:(e,t,r)=>{r.d(t,{e:()=>i});const i=(0,r(14628).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},97824:(e,t,r)=>{r.d(t,{M:()=>o});var i=r(40196),s=r(10860),n=r(69504);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 a=await(0,i.aG)(o.populateFromStyle());if((0,s.wp)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.c("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},18648:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,s=r(41948),n=(r(60708),r(40504)),o=r(62088),a=r(1580),l=r(53368),c=r(12552),d=r(18996),u=r(88204),p=r(56156);let y=i=class extends n.am{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.ct)({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.qq)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,s._)([(0,a.qq)({type:u.U,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.qq)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.qq)({type:Date})],y.prototype,"historicMoment",void 0),(0,s._)([(0,d.G)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,s._)([(0,a.qq)({type:p.c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,s._)([(0,d.G)("start"),(0,d.G)("num")],y.prototype,"writeStart",null),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=i=(0,s._)([(0,c.c)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.ey)(y);const h=y},73184:(e,t,r)=>{r.d(t,{aG:()=>s,eY:()=>l,k5:()=>n,oK:()=>c,sy:()=>a});var i=r(2600);const s=(0,r(63564).Mr)(),n=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.c)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,i=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(772).then(r.bind(r,70772)),r.e(2460).then(r.bind(r,22460))]);return t(n,e,new i({sessionId:s,moment:o.moment}))}return t}return!0}function c(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2124,8648],{75824:(e,t,i)=>{i.d(t,{Md:()=>n,m0:()=>o,qG:()=>s});var r=i(39452);class s{}function n(e){return e instanceof r.C?e===s.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return n(e)?s.instance:e}s.instance=new r._C("Etc/UTC")},7896:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ti});var r=i(41948),s=i(82692),n=i(3856),o=i(20744),a=i(26496),l=i(10860),u=i(1580),p=(i(9456),i(66360)),c=(i(72052),i(12552)),m=i(18996),d=i(81436),h=i(60708),y=i(6444),g=i(87080),f=i(2600),w=i(26832),q=i(62088),v=i(57896),_=i(28176),R=i(53368),b=i(33600),S=i(60544),F=i(21488),I=i(91768),x=i(40504),j=i(75e3),T=i(620);const D={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 O=i(44748),N=i(76688),P=i(91920);const C=new Set(["u1","u2","u4","u8","s8","u16","s16"]),M={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 V(e){return A.has(e.type)}function G(e,t){if(!e||!t)return(0,q.ct)(e||t);const i=(0,q.ct)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),E(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(U(i.functionArguments).Raster=t);return i}function E(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&E(e[i].arguments,t))}function J(e){const t=(0,q.ct)(D[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=J(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=W(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function U(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?U(t.functionArguments):e}const z={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function L(e,t){const i=C.has(t)?(0,T.mO)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function B(e){if(null==e)return;const{fields:t}=e,i=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return i?.name}function H(e){const t=[];return e?.forEach((e=>{const i=e;if(Array.isArray(i))t.push(i);else{if(null==i.min||null==i.max)return;const e=[i.min,i.max,i.avg||0,i.stddev||0];t.push(e)}})),t}function W(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,O.WA)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var Q=i(88392),k=i(59520);let Z=class extends x.am{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,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return"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,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new Q.c({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=this._addClipFunction(t,s)),r&&!i&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&V(r)?G(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new j.c;r.functionName="Stretch";const s=z[N.K.toJSON(e.stretchType)],n="u8",o={StretchType:s,Statistics:H(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===z.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===z.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=n):s===z.minMax?r.outputPixelType=n:s===z.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new j.c;if(i)n.functionArguments={ColorRamp:(0,O.sl)(s)};else{const i=(0,O.It)(s,!0);if(i)n.functionArguments={colorRampName:i};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,O.Ky)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new j.c({rasterFunctionDefinition:J(n)}):n}return i?new j.c({rasterFunctionDefinition:J(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=B(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,i)=>{const r=t.symbol?.color;let s;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],r.r,r.g,r.b]))}))}));const i=a?L(n,a):n,r=new j.c;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new j.c({rasterFunctionDefinition:J(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)}));const c=a?L(n,a):n,m=new j.c;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const d=new j.c;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new j.c({rasterFunctionDefinition:J(d)}):d}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=B(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach((e=>{const i=e.value,r=e.symbol?.color;null!=i&&r?.a&&t.set(String(i),r.toRgb())}));const r=e.field;n.forEach((({attributes:e})=>{const s=String(e[r]),n=e[o],l=t.get(s);l?i.push([n,...l]):a&&i.push([n,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],r=t.symbol?.color,s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r?L(i,r):i,p=new j.c;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new j.c({rasterFunctionDefinition:J(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,s=r?L(i,r):i,n=new j.c;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new j.c({rasterFunctionDefinition:J(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new j.c;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:s}=t,n="vector-uv"===r;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.c,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:M[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const m=J(i);return t.convertToRFT?j.c.fromJSON({rasterFunctionDefinition:m}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new j.c;const r=new j.c;r.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),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,O.sl)(e.colorRamp):o.Colormap=(0,O.Ky)(e.colorRamp)),i?new j.c({rasterFunctionDefinition:J(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new j.c({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new j.c({rasterFunctionDefinition:J(r)}):r,G(r,e)}_addClipFunction(e,t){return G(new j.c({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,r._)([(0,u.qq)()],Z.prototype,"layer",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"adjustAspectRatio",null),(0,r._)([(0,m.G)("adjustAspectRatio")],Z.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"bandIds",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"compression",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"compressionQuality",null),(0,r._)([(0,m.G)("compressionQuality")],Z.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"compressionTolerance",null),(0,r._)([(0,m.G)("compressionTolerance")],Z.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"format",null),(0,r._)([(0,u.qq)({type:String,json:{read:{reader:k.gh.read},write:{writer:k.gh.write}}})],Z.prototype,"interpolation",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"noData",null),(0,r._)([(0,u.qq)({type:String,json:{read:{reader:k.ec.read},write:{writer:k.ec.write}}})],Z.prototype,"noDataInterpretation",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"pixelType",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"lercVersion",void 0),(0,r._)([(0,m.G)("lercVersion")],Z.prototype,"writeLercVersion",null),(0,r._)([(0,u.qq)({type:Number})],Z.prototype,"version",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"mosaicRule",null),(0,r._)([(0,u.qq)({json:{write:!0,name:"renderingRule"}})],Z.prototype,"rasterFunction",null),Z=(0,r._)([(0,c.c)("esri.layers.mixins.ExportImageServiceParameters")],Z);var $=i(600),Y=i(16424),X=i(80428),K=i(72464),ee=i(32104),te=i(64896),ie=i(7368),re=i(56660),se=i(34084),ne=i(32876),oe=i(40996),ae=i(61944),le=i(20480),ue=i(21980),pe=i(67776);const ce=e=>{let t=class extends e{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"make",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"model",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"focalLength",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"pixelSize",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"rows",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"cols",void 0),t=(0,r._)([(0,c.c)("esri.rest.support.CameraInfoMixin")],t),t};let me=class extends(ce(x.am)){constructor(){super(...arguments),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,r._)([(0,u.qq)({json:{write:!0}})],me.prototype,"id",void 0),(0,r._)([(0,u.qq)({json:{name:"uri",write:!0}})],me.prototype,"referenceUri",void 0),(0,r._)([(0,u.qq)({type:Date,json:{write:!0}})],me.prototype,"acquisitionDate",void 0),(0,r._)([(0,m.G)("acquisitionDate")],me.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.qq)({json:{write:!0}})],me.prototype,"cameraID",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],me.prototype,"center",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],me.prototype,"perspectiveCenter",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],me.prototype,"orientation",void 0),me=(0,r._)([(0,c.c)("esri.rest.support.ImageInspectionInfo")],me);const de=me;let he=class extends x.am{constructor(){super(...arguments),this.images=null}};(0,r._)([(0,u.qq)({type:[de],json:{write:!0}})],he.prototype,"images",void 0),he=(0,r._)([(0,c.c)("esri.rest.support.FindImagesResult")],he);const ye=he;var ge=i(56156);let fe=class extends x.am{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],fe.prototype,"north",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],fe.prototype,"up",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{write:!0}})],fe.prototype,"spatialReference",void 0),fe=(0,r._)([(0,c.c)("esri.rest.support.ImageAngleResult")],fe);const we=fe;var qe=i(24296);let ve=class extends x.am{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,u.qq)({type:Number,json:{read:!0,write:!0}})],ve.prototype,"value",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:!0,write:!0}})],ve.prototype,"displayValue",void 0),(0,r._)([(0,u.qq)({type:Number,json:{read:!0,write:!0}})],ve.prototype,"uncertainty",void 0),ve=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultValue")],ve);let _e=class extends ve{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],_e.prototype,"unit",void 0),_e=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultLengthValue")],_e);let Re=class extends ve{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.qq)({type:String,json:{read:qe.iy.read,write:qe.iy.write}})],Re.prototype,"unit",void 0),Re=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultAreaValue")],Re);let be=class extends ve{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.qq)({type:String,json:{read:qe.aq.read,write:qe.aq.write}})],be.prototype,"unit",void 0),be=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultAngleValue")],be);let Se=class extends x.am{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,r._)([(0,u.qq)({type:String,json:{read:!0,write:!0}})],Se.prototype,"name",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:!0,write:!0}})],Se.prototype,"sensorName",void 0),Se=(0,r._)([(0,c.c)("esri.rest.support.BaseImageMeasureResult")],Se);let Fe=class extends Se{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,u.qq)({type:Re,json:{read:!0,write:!0}})],Fe.prototype,"area",void 0),(0,r._)([(0,u.qq)({type:_e,json:{read:!0,write:!0}})],Fe.prototype,"perimeter",void 0),Fe=(0,r._)([(0,c.c)("esri.rest.support.ImageAreaResult")],Fe);const Ie=Fe;var xe=i(95247),je=i(7488);let Te=class extends x.am{constructor(){super(...arguments),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?je.c.fromJSON(e):xe.c.fromJSON(e)}};(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],Te.prototype,"area",void 0),(0,r._)([(0,u.qq)({json:{name:"shape",write:!0}})],Te.prototype,"geometry",void 0),(0,r._)([(0,b.E)("geometry")],Te.prototype,"readGeometry",null),Te=(0,r._)([(0,c.c)("esri.rest.support.ImageBoundaryResult")],Te);const De=Te;let Oe=class extends Se{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,u.qq)({type:_e,json:{read:!0,write:!0}})],Oe.prototype,"distance",void 0),(0,r._)([(0,u.qq)({type:be,json:{read:!0,write:!0}})],Oe.prototype,"azimuthAngle",void 0),(0,r._)([(0,u.qq)({type:be,json:{read:!0,write:!0}})],Oe.prototype,"elevationAngle",void 0),Oe=(0,r._)([(0,c.c)("esri.rest.support.ImageDistanceResult")],Oe);const Ne=Oe;let Pe=class extends(ce(x.am)){constructor(){super(...arguments),this.id=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],Pe.prototype,"id",void 0),Pe=(0,r._)([(0,c.c)("esri.rest.support.CameraInfo")],Pe);const Ce=Pe;let Me=class extends x.am{constructor(){super(...arguments),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"id",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"name",void 0),(0,r._)([(0,u.qq)({type:Date,json:{write:!0}})],Me.prototype,"acquisitionDate",void 0),(0,r._)([(0,m.G)("acquisitionDate")],Me.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"cameraID",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],Me.prototype,"center",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"gps",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"orientation",void 0),Me=(0,r._)([(0,c.c)("esri.rest.support.ImageGPSInfo")],Me);const Ae=Me;let Ve=class extends x.am{constructor(){super(...arguments),this.images=null,this.cameras=null}};(0,r._)([(0,u.qq)({type:[Ae],json:{write:!0}})],Ve.prototype,"images",void 0),(0,r._)([(0,u.qq)({type:[Ce],json:{write:!0}})],Ve.prototype,"cameras",void 0),Ve=(0,r._)([(0,c.c)("esri.rest.support.ImageGPSInfoResult")],Ve);const Ge=Ve;let Ee=class extends Se{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,u.qq)({type:_e,json:{read:!0,write:!0}})],Ee.prototype,"height",void 0),Ee=(0,r._)([(0,c.c)("esri.rest.support.ImageHeightResult")],Ee);const Je=Ee;var Ue=i(59500);let ze=class extends x.am{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,u.qq)({type:Ue.c,json:{write:!0}})],ze.prototype,"catalogItems",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],ze.prototype,"location",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"name",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"objectId",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"processedValues",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"properties",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"value",void 0),ze=(0,r._)([(0,c.c)("esri.rest.support.ImageIdentifyResult")],ze);const Le=ze;let Be=class extends x.am{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],Be.prototype,"geometries",void 0),Be=(0,r._)([(0,c.c)("esri.rest.support.ImagePixelLocationResult")],Be);const He=Be;let We=class extends Se{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,u.qq)({type:pe.c,json:{name:"point.value",read:!0,write:!0}})],We.prototype,"point",void 0),We=(0,r._)([(0,c.c)("esri.rest.support.ImagePointResult")],We);const Qe=We;let ke=class extends x.am{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"attributes",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],ke.prototype,"location",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"locationId",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"rasterId",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"resolution",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"pixelValue",void 0),ke=(0,r._)([(0,c.c)("esri.rest.support.ImageSample")],ke);const Ze=ke;let $e=class extends x.am{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,u.qq)({type:[Ze],json:{write:!0}})],$e.prototype,"samples",void 0),$e=(0,r._)([(0,c.c)("esri.rest.support.ImageSampleResult")],$e);const Ye=$e;let Xe=class extends x.am{constructor(){super(...arguments),this.url=null}};(0,r._)([(0,u.qq)({json:{name:"imageURL",write:!0}})],Xe.prototype,"url",void 0),Xe=(0,r._)([(0,c.c)("esri.rest.support.ImageUrlResult")],Xe);const Ke=Xe;var et=i(6704);let tt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),pe.c.fromJSON(e)}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"Shape",read:et.h4,write:!0}})],tt.prototype,"geometry",void 0),(0,r._)([(0,u.qq)({json:{name:"Length",write:!0}})],tt.prototype,"length",void 0),(0,r._)([(0,u.qq)({json:{name:"Area",write:!0}})],tt.prototype,"area",void 0),(0,r._)([(0,u.qq)({json:{name:"Center",write:!0}})],tt.prototype,"center",void 0),(0,r._)([(0,b.E)("center")],tt.prototype,"readCenter",null),tt=(0,r._)([(0,c.c)("esri.rest.support.MeasureAreaFromImageResult")],tt);const it=tt;let rt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.length=null}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"Shape",read:et.h4,write:!0}})],rt.prototype,"geometry",void 0),(0,r._)([(0,u.qq)({json:{name:"Length",write:!0}})],rt.prototype,"length",void 0),rt=(0,r._)([(0,c.c)("esri.rest.support.MeasureLengthFromImageResult")],rt);const st=rt;function nt(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function ot(e,t,i){const r=(0,ue.UX)(e),s=t.geometry?[t.geometry]:[],n=await(0,le.WW)(s),o=t.toJSON();nt(o);const a=n?.[0];null!=a&&(o.geometry=pt(a));const l=(0,ue.OW)({...r.query,f:"json",...o});return(0,ue.sR)(l,i)}async function at(e,t,i){const r=(0,ue.UX)(e),s=t.geometry?[t.geometry]:[];return(0,le.WW)(s).then((e=>{const s=t.toJSON(),n=e?.[0];null!=n&&(s.geometry=JSON.stringify(pt(n)));const o=(0,ue.OW)({...r.query,f:"json",...s}),a=(0,ue.sR)(o,i);return(0,f.c)(r.path+"/identify",a)})).then((e=>Le.fromJSON(e.data)))}async function lt(e,t,i,r){const s=(0,ue.UX)(e),n=await(0,le.WW)(i),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(pt(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(pt(n[1])));const a=(0,ue.OW)({...s.query,f:"json",...o}),l=(0,ue.sR)(a,r),{data:u}=await(0,f.c)(s.path+"/measure",l);return u}async function ut(e,t,i){const r=(0,ue.UX)(e),s=t.toJSON(),n=(0,ue.OW)({...r.query,f:"json",...s}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(r.path+"/measureFromImage",o);return a}function pt(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=ct(e.spatialReference)),t}function ct(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function mt(e,t){if(!e.imageCoordinateSystem)return(0,S.um)(e);const i=ct(e),{icsid:r,icsns:s}=i;return null==r||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}i(88204);var dt=i(99944),ht=(i(6220),i(47620),i(22080),i(77048),i(53648),i(50853),i(53004)),yt=(i(48516),i(44048),i(67932),i(91232),i(95776)),gt=(i(31864),i(19212),i(46788)),ft=i(819),wt=(i(18648),i(9770),i(71599)),qt=i(84452);let vt=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0}})],vt.prototype,"fromGeometry",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],vt.prototype,"toGeometry",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],vt.prototype,"objectIds",void 0),(0,r._)([(0,u.qq)({type:String,json:{write:!0}})],vt.prototype,"where",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],vt.prototype,"maxCount",void 0),vt=(0,r._)([(0,c.c)("esri.rest.support.FindImagesParameters")],vt);const _t=vt;var Rt;let bt=Rt=class extends x.am{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Rt((0,q.ct)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,u.qq)({type:[String],json:{name:"angleName",write:!0}})],bt.prototype,"angleNames",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],bt.prototype,"point",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{write:!0}})],bt.prototype,"spatialReference",void 0),(0,r._)([(0,u.qq)({type:R.Ab,json:{write:!0}})],bt.prototype,"rasterId",void 0),bt=Rt=(0,r._)([(0,c.c)("esri.rest.support.ImageAngleParameters")],bt);const St=bt,Ft=new(i(14628).O)({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 It=class extends x.am{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var xt;(0,r._)([(0,u.qq)()],It.prototype,"type",void 0),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{read:Ft.read,write:Ft.write}})],It.prototype,"measureOperation",void 0),(0,r._)([(0,u.qq)({type:Q.c,json:{write:!0}})],It.prototype,"mosaicRule",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],It.prototype,"pixelSize",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],It.prototype,"raster",void 0),It=(0,r._)([(0,c.c)("esri.rest.support.BaseImageMeasureParameters")],It);let jt=xt=class extends It{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new xt((0,q.ct)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"fromGeometry",read:!0,write:!0}})],jt.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],jt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{write:Ft.write}})],jt.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],jt.prototype,"is3D",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],jt.prototype,"linearUnit",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.iy.read,write:qe.iy.write}})],jt.prototype,"areaUnit",void 0),jt=xt=(0,r._)([(0,c.c)("esri.rest.support.ImageAreaParameters")],jt);const Tt=jt;let Dt=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.outSpatialReference=null}};(0,r._)([(0,u.qq)({type:ge.c,json:{name:"outSR",write:!0}})],Dt.prototype,"outSpatialReference",void 0),Dt=(0,r._)([(0,c.c)("esri.rest.support.ImageBoundaryParameters")],Dt);const Ot=Dt;var Nt;let Pt=Nt=class extends It{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new Nt((0,q.ct)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],Pt.prototype,"fromGeometry",void 0),(0,r._)([(0,m.G)("fromGeometry")],Pt.prototype,"writeFromGeometry",null),(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],Pt.prototype,"toGeometry",void 0),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{write:Ft.write}})],Pt.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],Pt.prototype,"is3D",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],Pt.prototype,"linearUnit",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.aq.read,write:qe.aq.write}})],Pt.prototype,"angularUnit",void 0),Pt=Nt=(0,r._)([(0,c.c)("esri.rest.support.ImageDistanceParameters")],Pt);const Ct=Pt;var Mt=i(25228),At=i(9968),Vt=i(6152);let Gt=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4,write:!0}})],Gt.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],Gt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Gt.prototype,"objectIds",void 0),(0,r._)([(0,At.G)(Vt.K,{ignoreUnknown:!1,name:"spatialRel"})],Gt.prototype,"spatialRelationship",void 0),(0,r._)([(0,u.qq)({type:Mt.c,json:{name:"time",write:!0}})],Gt.prototype,"timeExtent",void 0),(0,r._)([(0,u.qq)({type:String,json:{write:!0}})],Gt.prototype,"where",void 0),Gt=(0,r._)([(0,c.c)("esri.rest.support.ImageGPSInfoParameters")],Gt);const Et=Gt;var Jt;let Ut=Jt=class extends It{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new Jt((0,q.ct)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0}})],Ut.prototype,"fromGeometry",void 0),(0,r._)([(0,m.G)("fromGeometry")],Ut.prototype,"writeFromGeometry",null),(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],Ut.prototype,"toGeometry",void 0),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{write:Ft.write}})],Ut.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],Ut.prototype,"operationType",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],Ut.prototype,"linearUnit",void 0),Ut=Jt=(0,r._)([(0,c.c)("esri.rest.support.ImageHeightParameters")],Ut);const zt=Ut;var Lt,Bt=i(65680);let Ht=Lt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.c.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}get renderingRule(){return(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,w.y2)(p.c.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,w.y2)(p.c.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=j.c.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new Lt((0,q.ct)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.qq)({json:{write:!0}})],Ht.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],Ht.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:Q.c,json:{write:!0}})],Ht.prototype,"mosaicRule",null),(0,r._)([(0,m.G)("mosaicRule")],Ht.prototype,"writeMosaicRule",null),(0,r._)([(0,u.qq)({type:j.c})],Ht.prototype,"renderingRule",null),(0,r._)([(0,u.qq)({type:[j.c]})],Ht.prototype,"renderingRules",null),(0,r._)([(0,u.qq)({type:j.c,json:{write:!0,name:"renderingRule"}})],Ht.prototype,"rasterFunction",null),(0,r._)([(0,m.G)("rasterFunction")],Ht.prototype,"writeRasterFunction",null),(0,r._)([(0,u.qq)({type:[j.c],json:{write:!0,name:"renderingRules"}})],Ht.prototype,"rasterFunctions",void 0),(0,r._)([(0,m.G)("rasterFunctions")],Ht.prototype,"writeRasterFunctions",null),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],Ht.prototype,"pixelSize",void 0),(0,r._)([(0,m.G)("pixelSize")],Ht.prototype,"writePixelSize",null),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"returnGeometry",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"returnCatalogItems",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"returnPixelValues",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],Ht.prototype,"maxItemCount",void 0),(0,r._)([(0,u.qq)({type:Mt.c,json:{write:{target:"time"}}})],Ht.prototype,"timeExtent",void 0),(0,r._)([(0,m.G)("timeExtent")],Ht.prototype,"writeTimeExtent",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Ht.prototype,"raster",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Ht.prototype,"viewId",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"processAsMultidimensional",void 0),Ht=Lt=(0,r._)([(0,c.c)("esri.rest.support.ImageIdentifyParameters")],Ht);const Wt=Ht;var Qt;let kt=Qt=class extends x.am{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new Qt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,u.qq)({type:[pe.c],json:{write:!0}})],kt.prototype,"geometries",void 0),(0,r._)([(0,m.G)("geometries")],kt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:R.Ab,json:{write:!0}})],kt.prototype,"rasterId",void 0),kt=Qt=(0,r._)([(0,c.c)("esri.rest.support.ImagePixelLocationParameters")],kt);const Zt=kt;var $t;let Yt=$t=class extends It{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new $t((0,q.ct)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"fromGeometry",read:et.h4}})],Yt.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],Yt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{read:Ft.read,write:Ft.write}})],Yt.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],Yt.prototype,"is3D",void 0),Yt=$t=(0,r._)([(0,c.c)("esri.rest.support.ImagePointParameters")],Yt);const Xt=Yt;var Kt;let ei=Kt=class extends x.am{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,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new ht.c({spatialReference:e[0].spatialReference,points:e.map((({x:e,y:t})=>[e,t]))});this._set("locations",e),this.geometry=t}}clone(){return new Kt((0,q.ct)({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,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4}})],ei.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],ei.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)()],ei.prototype,"locations",null),(0,r._)([(0,u.qq)({type:String,json:{type:k.gh.jsonValues,read:k.gh.read,write:k.gh.write}})],ei.prototype,"interpolation",void 0),(0,r._)([(0,u.qq)({type:Q.c,json:{write:!0}})],ei.prototype,"mosaicRule",void 0),(0,r._)([(0,u.qq)({type:[String],json:{write:!0}})],ei.prototype,"outFields",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],ei.prototype,"pixelSize",void 0),(0,r._)([(0,u.qq)({type:String,json:{write:!0}})],ei.prototype,"raster",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],ei.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],ei.prototype,"sampleDistance",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],ei.prototype,"sampleCount",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],ei.prototype,"sliceId",void 0),(0,r._)([(0,u.qq)({type:Mt.c,json:{read:{source:"time"},write:{target:"time"}}})],ei.prototype,"timeExtent",void 0),ei=Kt=(0,r._)([(0,c.c)("esri.rest.support.ImageSampleParameters")],ei);const ti=ei;let ii=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,et.Ce)(e[0]),geometries:e.map((e=>({...e.toJSON(),spatialReference:void 0})))}:null}};(0,r._)([(0,u.qq)({types:[h.Su]})],ii.prototype,"geometries",void 0),(0,r._)([(0,m.G)("geometries")],ii.prototype,"writeGeometries",null),(0,r._)([(0,u.qq)({type:[R.Ab],json:{write:!0}})],ii.prototype,"rasterIds",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{name:"outSR",write:!0}})],ii.prototype,"outSpatialReference",void 0),ii=(0,r._)([(0,c.c)("esri.rest.support.ImageToMapMultirayParameters")],ii);const ri=ii;let si=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4,write:!0}})],si.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],si.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],si.prototype,"rasterId",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{name:"outSR",write:!0}})],si.prototype,"outSpatialReference",void 0),(0,r._)([(0,u.qq)({json:{name:"options.DOff",write:!0}})],si.prototype,"depthOffset",void 0),(0,r._)([(0,u.qq)({json:{name:"options.Adjust",write:!0}})],si.prototype,"adjust",void 0),si=(0,r._)([(0,c.c)("esri.rest.support.ImageToMapParameters")],si);const ni=si;let oi=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.referenceUri=null}};(0,r._)([(0,u.qq)({type:String,json:{name:"uri",write:!0}})],oi.prototype,"referenceUri",void 0),oi=(0,r._)([(0,c.c)("esri.rest.support.ImageUrlParameters")],oi);const ai=oi;let li=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=JSON.stringify(e))}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4,write:!0}})],li.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],li.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],li.prototype,"rasterId",void 0),(0,r._)([(0,u.qq)({json:{name:"options.VisibleOnly",write:!0}})],li.prototype,"visibleOnly",void 0),li=(0,r._)([(0,c.c)("esri.rest.support.MapToImageParameters")],li);const ui=li;var pi;let ci=pi=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,q.ct)({geometry:this.geometry,rasterId:this.rasterId});return new pi(e)}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"fromGeometry",read:et.h4,write:!0}})],ci.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],ci.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],ci.prototype,"rasterId",void 0),ci=pi=(0,r._)([(0,c.c)("esri.rest.support.MeasureFromImageParameters")],ci);const mi=ci;var di=i(46320);const hi=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),yi=(0,u.Mu)(R.Oe,{min:0,max:255}),gi=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 Z({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?Q.c.fromJSON(t):null}get fieldsIndex(){return this.fields?new Y.c(this.fields):null}set format(e){e&&hi.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.c.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?Q.c.fromJSON(i):this._isMosaicRuleSupported(t)?Q.c.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const s=this.definitionExpression;r?s&&s!==r.where&&(r=r.clone(),r.where=s):s&&(r=new Q.c({where:s})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=yi(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i?.name}return e}get parsedUrl(){return(0,_.as)(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,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,g.gH)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),V(s)||p.c.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix,t=new $.c({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new $.c({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new $.c({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?(0,q.ct)(this.fields):[];s.push(i),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(r),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new $.c({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new $.c({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new $.c({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 i=(0,q.ct)(t);return i.name=e+t.name,i}));s=s.concat(t)}return s}get renderingRule(){return(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this.rasterFunction}set renderingRule(e){(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=j.c.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?j.c.fromJSON({rasterFunctionDefinition:t.renderingRule}):j.c.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?ge.c.fromJSON(i):null}readPixelType(e){return k.K0.fromJSON(e)||e}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=k.K0.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&r&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(r.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=r.toJSON());const l=await a.symbolize({bandIds:o,...e},t);i={extent:e.extent,pixelBlock:l}}else i={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return i}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 o.c("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,R.uY)(St,e).clone(),async function(e,t,i){const r=t.toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=ct(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(r.spatialReference=mt(t.spatialReference));const s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new ge.c({wkid:0,imageCoordinateSystem:a.spatialReference}):ge.c.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new we(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o.c("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,R.uY)(Zt,e).clone(),async function(e,t,i){const r=t.toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=ct(s[e].spatialReference));const n=(0,ue.UX)(e),o=(0,ue.OW)({...n.query,f:"json",...r}),a=(0,ue.sR)(o,i),{data:l}=await(0,f.c)(`${n.path}/computePixelLocation`,a);return He.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o.c("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,R.uY)(Bt.c,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await ot(e,t,i),s=(0,ue.UX)(e),{data:n}=await(0,f.c)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new o.c("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,R.uY)(Bt.c,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await ot(e,t,i),s=(0,ue.UX)(e),{data:n}=await(0,f.c)(`${s.path}/computeStatisticsHistograms`,r),{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 i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new o.c("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,R.uY)(zt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.fromGeometry,t.toGeometry],i);return Je.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new o.c("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,R.uY)(Tt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.geometry],i);return Ie.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new o.c("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,R.uY)(Ct,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.fromGeometry,t.toGeometry],i);return Ne.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new o.c("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,R.uY)(Xt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.geometry],i);return Qe.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.c("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new o.c("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return e=(0,R.uY)(mi,e).clone(),async function(e,t,i){const r=await ut(e,t,i);return st.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.c("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new o.c("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return e=(0,R.uY)(mi,e).clone(),async function(e,t,i){const r=await ut(e,t,i);return it.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async fetchImage(e,t,r,s={}){if(null==e||null==t||null==r)throw new o.c("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,r,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,s.returnImageBitmap?{imageBitmap:await(0,X.E)(e,`${i(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*r,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(ee.c.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ee.c({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!s.requestAsImageElement&&!this.pixelFilter,l=a&&!!s.returnImageBitmap,u={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:a,returnImageBitmap:l,signal:s.signal};return this._requestArrayBuffer(u)}fetchKeyProperties(e){return(0,f.c)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new o.c("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.c)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>Ue.c.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ue.UX)(e),s=(0,ue.OW)({...r?.query,f:"json"}),n=(0,ue.sR)(s,i),o=`${r?.path}/${t}/info`,a=(0,f.c)(`${o}`,n),l=(0,f.c)(`${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 m=null;p.statistics?.length&&(m=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const d=xe.c.fromJSON(p.extent),h=Math.ceil(d.width/p.pixelSizeX-.1),y=Math.ceil(d.height/p.pixelSizeY-.1),g=d.spatialReference,w=new pe.c({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),q=p.histograms?.length?p.histograms:null,v=new qt.c({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new te.c({width:h,height:y,bandCount:p.bandCount,extent:d,spatialReference:g,pixelSize:w,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:q,keyProperties:c,storageInfo:v})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,f.c)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await(0,f.c)(i(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,f.c)(i(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:(0,S.um)(a),outSR:"0:"+e},u=(0,f.c)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,m=n.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,S.um)(a),outSR:"0:"+e},y=(0,f.c)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,y]);let w=g[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const q=xe.c.fromJSON(g[1]?.geometries?.[0]);q&&(q.spatialReference=new ge.c({wkid:0,imageCoordinateSystem:s}));const v=g[2].geometries?g[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],_=v.length;if(_<3)return{ics:s,icsToPixelTransform:w,icsExtent:q,northDirection:null};let R=0,b=0,F=0,I=0;for(let e=0;e<_;e++)R+=v[e].x,b+=v[e].y,F+=v[e].x*v[e].x,I+=v[e].x*v[e].y;const x=(_*I-R*b)/(_*F-R*R);let j=0;const T=v[4].x>v[0].x,D=v[4].y>v[0].y;return x===1/0?j=D?90:270:0===x?j=T?0:180:x>0?j=T?180*Math.atan(x)/Math.PI:180*Math.atan(x)/Math.PI+180:x<0&&(j=D?180+180*Math.atan(x)/Math.PI:360+180*Math.atan(x)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:q,northDirection:j}}async generateRasterInfo(e,t){if(e=(0,R.uY)(j.c,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const r=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),i=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return i?i.join("/"):null}(e);if(!r)throw new o.c("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const s={...t,query:this._getQueryParams()},n=(0,wt.cV)(i(this.parsedUrl),e,s);this._functionRasterInfos[r]=n;try{return await n}catch(e){throw this._functionRasterInfos[r]=null,e}}getExportImageServiceParameters(e,t,r,s){const n=mt((e=e.clone().shiftCentralMeridian()).spatialReference,i(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 m=this._processMultidimensionalIntersection(null,s,this.exportImageServiceParameters.mosaicRule);if(m.isOutSide)return null;o.mosaicRule=null!=m.mosaicRule?JSON.stringify(m.mosaicRule):null,s=m.timeExtent,o.renderingRule=this._getRenderingRuleString(j.c.fromJSON(u));const d={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?d.time=""+e:null==e&&null==t||(d.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+r,...o,...d}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new o.c("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,R.uY)(ti,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=t.toJSON();nt(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const s=await(0,le.WW)(t.geometry),n=s?.[0];null!=n&&(r.geometry=pt(n));const o=(0,ue.UX)(e),a=(0,ue.OW)({...o.query,f:"json",...r}),l=(0,ue.sR)(a,i),{data:u}=await(0,f.c)(`${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 Ye.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o.c("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,R.uY)(Wt,e).clone(),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=je.c.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new o.c("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),r&&null==e.raster&&(e.raster=r),at(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new o.c("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return e=(0,R.uY)(ni,e),async function(e,t,i){const r=t.toJSON();t.geometry.spatialReference.imageCoordinateSystem&&(r.geometry=pt(t.geometry)),t.depthOffset&&t.adjust||delete r.options;const s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/imageToMap`,o);return(0,et.h4)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new o.c("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return e=(0,R.uY)(ri,e),async function(e,t,i){const r=t.toJSON();t.rasterIds?.length&&(r.rasterIds=t.rasterIds.join(","));const s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/imageToMapMultiray`,o);return(0,et.h4)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new o.c("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return e=(0,R.uY)(ui,e),async function(e,t,i){const r=t.toJSON(),s=await(0,le.WW)(t.geometry),n=s?.[0];null!=n&&(r.geometry=pt(n)),t.visibleOnly||delete r.options;const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=mt(o));const a=(0,ue.UX)(e),l=(0,ue.OW)({...a.query,f:"json",...r}),u=(0,ue.sR)(l,i),{data:p}=await(0,f.c)(`${a.path}/mapToImage`,u);return(0,et.h4)(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new o.c("imagery-layer:find-images","findImages operation is not supported on the input image service");return e=(0,R.uY)(_t,e),async function(e,t,i){const r=t.toJSON(),s=await(0,le.WW)([t.fromGeometry,t.toGeometry]);null!=s[0]&&(r.fromGeometry=pt(s[0]),s[0].spatialReference&&(r.inSR=mt(s[0].spatialReference))),null!=s[1]&&(r.toGeometry=pt(s[1])),t.objectIds?.length&&(r.objectIds=r.objectIds.join(","));const n=(0,ue.UX)(e),o=(0,ue.OW)({...n.query,f:"json",...r}),a=(0,ue.sR)(o,i),{data:l}=await(0,f.c)(`${n.path}/find`,a);return ye.fromJSON(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new o.c("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return e=(0,R.uY)(ai,e),async function(e,t,i){const r=t.toJSON(),s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/getImageUrl`,o);return Ke.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new yt.c({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new o.c("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=(0,R.uY)(Ot,e??{outSpatialReference:this.spatialReference}).clone(),async function(e,t,i){const r=(0,ue.UX)(e),s=t.toJSON();t.outSpatialReference&&(s.outSR=mt(t.outSpatialReference));const n=(0,ue.OW)({...r.query,f:"json",...s}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(r.path+"/queryBoundary",o);return De.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,dt.c)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,ft.g)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new o.c("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=(0,R.uY)(Et,e??{outSpatialReference:this.spatialReference}).clone(),async function(e,t,i){const r=t.toJSON();nt(r),r.objectIds?.length&&(r.objectIds=r.objectIds.join(",")),r.geometry||r.objectIds||r.time||r.where||(r.where="1=1");const s=await(0,le.WW)(t.geometry),n=s?.[0];null!=n&&(r.geometry=pt(n));const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=mt(o));const a=(0,ue.UX)(e),l=(0,ue.OW)({...a.query,f:"json",...r}),u=(0,ue.sR)(l,i),{data:p}=await(0,f.c)(`${a.path}/queryGPSInfo`,u);return Ge.fromJSON(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,gt._)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o.c("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some((e=>!e.toLowerCase().includes(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(p)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new j.c({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some((e=>e.functionName===i.functionName))&&(l.push(i),u.push(i.functionName))}const m=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let h=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:i}=(0,re.W8)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new o.c("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(h=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=je.c.fromExtent(g));const f=this._getQueryParams({geometry:g,timeExtent:h,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:a,returnGeometry:m,raster:this.raster,maxItemCount:s?1:null});delete f.f;const w=new Wt(f);try{await this._generateRasterInfo(this.rasterFunction);const i=await at(this.url,w,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,o=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!a||m||!i?.catalogItems?.features.length||!n&&o)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s});const l=this.objectIdField||"ObjectId",p=i.catalogItems?.features??[],c=p.map((e=>e.attributes?.[l])),d=new yt.c({objectIds:c,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),h=await this.queryRasters(d);return h?.features?.length&&h.features.forEach((t=>{p.forEach((i=>{i.attributes[l]===t.attributes[l]&&(i.geometry=new je.c(t.geometry),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s})}catch{throw new o.c("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,f.c)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,f.c)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),n=await Promise.all([r,s]);return n[0]&&n[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:n[0]||null,histograms:n[1]||null}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,di.__)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,re.aQ)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,wt.Rk)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,wt.sJ)(e,t),e))),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([r,s,n]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),p.c.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,v.aE)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some((e=>e.dimensions.some((e=>e.name===s))))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==n)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const 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 I.c({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 o.c("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,R.uY)(yt.c,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 ie.c;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:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,oe.RC)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:s}=await(0,f.c)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new o.c("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&i.bandCount>=3){const e=(0,oe.oh)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,oe.i)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,oe.uw)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=i):this.symbolizer=new ae.c({rendererJSON:t,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,se.Y)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await(0,f.c)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:s,signal:n}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:o}=await(0,f.c)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,X.E)(o,r,n),params:t}:{imageOrCanvasElement:o,params:t}}const a=this._initJobHandler(),l=(0,f.c)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),u=(await Promise.all([l,a]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,se.o)(u)),!c)throw new o.c("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const m={signal:n},d="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,se.Y)(u,{useCanvas:!0,...t},m):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},m);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,re.Qz)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new Q.c;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:s,returnDomainValues:n,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!l&&!c){const e={};e[p]=0,u=[i],l=[new y.c(this.fullExtent,null,e)]}if(!l)return[];let d,h,g;this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);for(let e=0;e<l.length;e++){if(d=l[e],null!=i){if(h=u[e],g=this.rasterFunction&&a&&a.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?a[r.indexOf(this.rasterFunction.functionName)]:i,"nodata"===h.toLowerCase()&&!s)continue;const t="Raster.ItemPixelValue",n="Raster.ServicePixelValue";d.attributes[t]=h,d.attributes[n]=g,this._updateFeatureWithMagDirValues(d,h);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?h:i:g;this.rasterFunction||(l=o?h:i),this._updateFeatureWithRasterAttributeTableValues(d,l)}if(d.sourceLayer=d.layer=this,n&&this._updateFeatureWithDomainValues(d),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];d.attributes[t]=a[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=(0,re.W8)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,re.W8)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map((e=>e.name)).find((e=>"value"===e.toLowerCase()));if(!n)return;const o=r.filter((e=>e.attributes[n]===(null!=t?parseInt(t,10):null)));o&&o[0]&&s.forEach((t=>{const i=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=o[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),s=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new ee.c({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new xe.c(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,ne.KO)([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 i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach((e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&e instanceof Bt.c&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!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"),m=this._isMosaicDataset(e)&&t.includes("catalog"),d=t.includes("download");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsImageToMap:i>=11.2&&m,supportsImageToMapMultiray:i>=11.2&&m,supportsMapToImage:i>=11.2&&m,supportsFindImages:i>=11.2&&m,supportsGetImageUrl:i>=11.2&&d,supportsMeasure:u,supportsMeasureFromImage:i>=11.2,supportsDownload:d,supportsQuery:m&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&n,supportsProject:i>=10.3&&n,supportsComputeStatisticsHistograms:i>=10.4&&n,supportsQueryBoundary:i>=10.6&&n,supportsCalculateVolume:i>=10.7&&o,supportsComputePixelLocation:i>=10.7&&m,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&m,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.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:!!r?.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 i(e){return e?.path??""}return(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,b.E)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,u.qq)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,u.qq)({type:[R.Ab],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,b.E)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,u.qq)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,b.E)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,u.qq)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,m.G)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.qq)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,m.G)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.qq)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,u.qq)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,b.E)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,u.qq)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,u.qq)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,u.qq)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,u.qq)({readOnly:!0,type:[$.c]})],t.prototype,"fields",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,u.qq)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,b.E)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,u.qq)({type:xe.c})],t.prototype,"fullExtent",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,u.qq)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,u.qq)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,u.qq)({type:String,json:{type:k.gh.jsonValues,read:k.gh.read,write:k.gh.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,u.qq)()],t.prototype,"minScale",void 0),(0,r._)([(0,b.E)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,u.qq)()],t.prototype,"maxScale",void 0),(0,r._)([(0,b.E)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,u.qq)({type:Q.c})],t.prototype,"mosaicRule",null),(0,r._)([(0,b.E)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,m.G)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,u.qq)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,u.qq)({type:K.c,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,u.qq)({json:{type:R.Ab}})],t.prototype,"noData",void 0),(0,r._)([(0,m.G)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,u.qq)({type:String,json:{type:k.ec.jsonValues,read:k.ec.read,write:k.ec.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,u.qq)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,b.E)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,r._)([(0,u.qq)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,u.qq)({})],t.prototype,"types",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,u.qq)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,u.qq)()],t.prototype,"raster",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,b.E)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,u.qq)()],t.prototype,"viewId",void 0),(0,r._)([(0,u.qq)({types:g._0,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:g.qk,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,r._)([(0,b.E)("renderer")],t.prototype,"readRenderer",null),(0,r._)([(0,m.G)("renderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,r._)([(0,u.qq)(F.o9)],t.prototype,"opacity",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,u.qq)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,u.qq)({type:j.c})],t.prototype,"renderingRule",null),(0,r._)([(0,u.qq)({type:j.c,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,r._)([(0,b.E)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,r._)([(0,u.qq)({readOnly:!0,type:ge.c})],t.prototype,"spatialReference",void 0),(0,r._)([(0,b.E)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,u.qq)({json:{type:k.K0.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,b.E)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,m.G)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,u.qq)({constructOnly:!0,type:te.c})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,u.qq)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,u.qq)(F.qW)],t.prototype,"url",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,b.E)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,c.c)("esri.layers.mixins.ArcGISImageService")],t),t};var fi=i(16660),wi=i(25216),qi=i(28584),vi=i(66576),_i=i(98768),Ri=i(26916),bi=i(3116),Si=i(19560),Fi=i(98984),Ii=i(65548),xi=i(8616);let ji=class extends((0,wi.W)((0,Si.u)((0,bi.I)((0,vi.Y)((0,_i.K)(gi((0,Ri.G)((0,qi.G)((0,fi.u)((0,a.U)((0,n.q)(d.c)))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.Cu)((async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(7448).then(i.bind(i,67448));switch(e){case xi.U.SAVE:return s(this,t);case xi.U.SAVE_AS:return n(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l.CE).then((()=>this._fetchService(t)))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const t=this.rasterFields,i=this.title,r=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.")||r.add(e.name)}n&&r.add("raster.magnitude").add("raster.direction");const a=(0,Ii.Ap)({fields:t,title:i},{...e,visibleFieldNames:r});return a?.fieldInfos&&this.rasterInfo?.pixelType.startsWith("f")&&a.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),a}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(xi.U.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(xi.U.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,Fi.o)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.c("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,r._)([(0,u.qq)(F.Uj)],ji.prototype,"legendEnabled",null),(0,r._)([(0,u.qq)({type:["show","hide"]})],ji.prototype,"listMode",null),(0,r._)([(0,u.qq)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ji.prototype,"isReference",void 0),(0,r._)([(0,u.qq)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],ji.prototype,"operationalLayerType",void 0),(0,r._)([(0,m.G)("web-map","operationalLayerType")],ji.prototype,"writeOperationalLayerType",null),(0,r._)([(0,u.qq)(F.Ou)],ji.prototype,"popupEnabled",void 0),(0,r._)([(0,u.qq)({type:s.c,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],ji.prototype,"popupTemplate",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],ji.prototype,"defaultPopupTemplate",null),(0,r._)([(0,u.qq)({readOnly:!0,json:{read:!1}})],ji.prototype,"type",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],ji.prototype,"_isPreviewLayer",null),ji=(0,r._)([(0,c.c)("esri.layers.ImageryLayer")],ji);const Ti=ji},34888:(e,t,i)=>{i.d(t,{ED:()=>s,_M:()=>r});class r{constructor(e=null,t={},i,r){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new r(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new r(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function s(e){return!!e.geometry?.coords?.length}},90412:(e,t,i)=>{i.d(t,{c:()=>r});class r{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},16424:(e,t,i)=>{i.d(t,{c:()=>m});var r=i(20744),s=i(40504),n=i(66360),o=i(86916),a=i(75824),l=i(564),u=i(28484),p=i(39452);const c=new Map;class m{static fromJSON(e){return new m(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new m(e.fields??[],g(e))}static fromLayerJSON(e){return new m(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=h(t);if(t&&r){const s=d(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.gp)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.iW)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.Mz)(e)||(0,l.w1)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.Mz)(e)||(0,l.w1)(e)||e.nullable||void 0!==(0,l.gB)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(d(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.c.getLogger("esri.layers.support.FieldsIndex").error(new r.c("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.Gw):y.has(t.type)?u.OI:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.OI?a.qG.instance:t===u.Gw?p.Kq.utcInstance:(0,o.wJ)(c,t,(()=>p._C.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.eM)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.wt)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function d(e){return e.trim().toLowerCase()}function h(e){return(0,l.gP)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.Mt)(e.dateFieldsTimeReference):null,l=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,u.Mt)(s.dateFieldsTimeReference):a??u.Gw:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,u.Mt)(r.timeReference):a:null,c=new Map([[d(s?.creationDateField??""),l],[d(s?.editDateField??""),l],[d(n),p],[d(o),p]]);for(const{name:r,type:s}of e.fields)if(y.has(s))t.set(r,u.OI);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,u.OI);else{const e=c.get(d(r??""))??a;t.set(r,e)}return t}},80428:(e,t,i)=>{i.d(t,{E:()=>n,G:()=>o});var r=i(20744),s=i(10860);async function n(e,t,i){let n;try{n=await createImageBitmap(e)}catch(e){throw new r.c("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.wp)(i),n}async function o(e,t,i,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.c("request:server",`Unable to load tile ${t}/${i}/${n}`,{error:e,level:t,row:i,col:n})}return(0,s.wp)(o),a}},98984:(e,t,i)=>{i.d(t,{o:()=>n});var r=i(48212);const s=[];function n(e,t){if((0,r.Wq)(e.url??""))return!0;const{wkid:i}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),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}])},46788:(e,t,i)=>{i.d(t,{_:()=>o});var r=i(21980),s=i(32848),n=i(95776);async function o(e,t,i){const o=(0,r.UX)(e);return(0,s.WE)(o,n.c.from(t),{...i}).then((e=>e.data.count))}},819:(e,t,i)=>{i.d(t,{g:()=>o});var r=i(21980),s=i(32848),n=i(95776);async function o(e,t,i){const o=(0,r.UX)(e);return(0,s.Qn)(o,n.c.from(t),{...i}).then((e=>e.data.objectIds))}},99944:(e,t,i)=>{i.d(t,{E:()=>l,c:()=>a});var r=i(21980),s=i(32848),n=i(59500),o=i(95776);async function a(e,t,i){const r=await l(e,t,i);return n.c.fromJSON(r)}async function l(e,t,i){const n=(0,r.UX)(e),a={...i},l=o.c.from(t),{data:u}=await(0,s.EL)(n,l,l.sourceSpatialReference,a);return u}},21012:(e,t,i)=>{i.d(t,{M:()=>s});var r=i(37924);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.O)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},31864:(e,t,i)=>{i.d(t,{c:()=>c});var r,s=i(41948),n=i(40504),o=i(1580),a=i(53368),l=(i(72052),i(9456),i(12552));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=r=class extends n.am{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:i,tagName:r}=e;if(!t||!i||!r)return null;const s=t.find((e=>e.name===i));return s?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r?.value||null}({tagName:r,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({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.qq)({type:String})],p.prototype,"contentType",void 0),(0,s._)([(0,o.qq)()],p.prototype,"exifInfo",void 0),(0,s._)([(0,o.qq)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,s._)([(0,o.qq)({type:a.Ab})],p.prototype,"id",void 0),(0,s._)([(0,o.qq)({type:String})],p.prototype,"globalId",void 0),(0,s._)([(0,o.qq)({type:String})],p.prototype,"keywords",void 0),(0,s._)([(0,o.qq)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,o.qq)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,s._)([(0,o.qq)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,s._)([(0,o.qq)({type:a.Ab})],p.prototype,"size",void 0),(0,s._)([(0,o.qq)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,s._)([(0,l.c)("esri.layers.support.AttachmentInfo")],p);const c=p},19212:(e,t,i)=>{i.d(t,{c:()=>m});var r,s=i(41948),n=i(40504),o=i(62088),a=i(1580),l=i(53368),u=i(12552),p=i(18996);let c=r=class extends n.am{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 r((0,o.ct)({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.qq)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,s._)([(0,p.G)("start"),(0,p.G)("num")],c.prototype,"writeStart",null),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=r=(0,s._)([(0,u.c)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.ey)(c);const m=c},18648:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,s=i(41948),n=(i(60708),i(40504)),o=i(62088),a=i(1580),l=i(53368),u=i(12552),p=i(18996),c=i(88204),m=i(56156);let d=r=class extends n.am{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 r((0,o.ct)({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.qq)({type:Boolean,json:{write:!0}})],d.prototype,"cacheHint",void 0),(0,s._)([(0,a.qq)({type:c.U,json:{write:!0}})],d.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.qq)({type:String,json:{write:!0}})],d.prototype,"gdbVersion",void 0),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],d.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.qq)({type:Date})],d.prototype,"historicMoment",void 0),(0,s._)([(0,p.G)("historicMoment")],d.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],d.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],d.prototype,"objectIds",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],d.prototype,"orderByFields",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],d.prototype,"outFields",void 0),(0,s._)([(0,a.qq)({type:m.c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],d.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],d.prototype,"relationshipId",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultOffset"}}})],d.prototype,"start",void 0),(0,s._)([(0,p.G)("start"),(0,p.G)("num")],d.prototype,"writeStart",null),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],d.prototype,"num",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],d.prototype,"returnGeometry",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],d.prototype,"returnM",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],d.prototype,"returnZ",void 0),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],d.prototype,"where",void 0),d=r=(0,s._)([(0,u.c)("esri.rest.support.RelationshipQuery")],d),d.from=(0,l.ey)(d);const h=d},9770:(e,t,i)=>{i.d(t,{c:()=>R});var r,s=i(41948),n=i(60708),o=i(25228),a=i(14628),l=i(40504),u=i(62088),p=i(1580),c=i(53368),m=i(12552),d=i(18996),h=i(6704);i(9456),i(66360),i(72052);let y=r=class extends l.am{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new r({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=r=(0,s._)([(0,m.c)("esri.rest.support.TopFilter")],y);const g=y;var f,w=i(56156);const q=new a.O({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),v=new a.O({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let _=f=class extends l.am{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 f((0,u.ct)({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.qq)({type:Boolean,json:{write:!0}})],_.prototype,"cacheHint",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],_.prototype,"distance",void 0),(0,s._)([(0,p.qq)({types:n.Su,json:{read:h.h4,write:!0}})],_.prototype,"geometry",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:!0}})],_.prototype,"geometryPrecision",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:!0}})],_.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,p.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],_.prototype,"num",void 0),(0,s._)([(0,p.qq)({json:{write:!0}})],_.prototype,"objectIds",void 0),(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],_.prototype,"orderByFields",void 0),(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],_.prototype,"outFields",void 0),(0,s._)([(0,p.qq)({type:w.c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],_.prototype,"outSpatialReference",void 0),(0,s._)([(0,p.qq)({type:String,json:{write:!0}})],_.prototype,"resultType",void 0),(0,s._)([(0,p.qq)({json:{write:!0}})],_.prototype,"returnGeometry",void 0),(0,s._)([(0,p.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnM",void 0),(0,s._)([(0,p.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnZ",void 0),(0,s._)([(0,p.qq)({type:Number,json:{read:{source:"resultOffset"}}})],_.prototype,"start",void 0),(0,s._)([(0,d.G)("start"),(0,d.G)("num")],_.prototype,"writeStart",null),(0,s._)([(0,p.qq)({type:String,json:{read:{source:"spatialRel",reader:q.read},write:{target:"spatialRel",writer:q.write}}})],_.prototype,"spatialRelationship",void 0),(0,s._)([(0,p.qq)({type:o.c,json:{write:!0}})],_.prototype,"timeExtent",void 0),(0,s._)([(0,p.qq)({type:g,json:{write:!0}})],_.prototype,"topFilter",void 0),(0,s._)([(0,p.qq)({type:String,json:{read:v.read,write:{writer:v.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],_.prototype,"units",void 0),(0,s._)([(0,p.qq)({type:String,json:{write:!0}})],_.prototype,"where",void 0),_=f=(0,s._)([(0,m.c)("esri.rest.support.TopFeaturesQuery")],_),_.from=(0,c.ey)(_);const R=_}}]);