@arcgis/core 5.1.0-next.54 → 5.1.0-next.56

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 (191) hide show
  1. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
  2. package/applications/Components/navigationDuration.d.ts +15 -0
  3. package/applications/Components/navigationDuration.js +2 -0
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/05bc675c029ed311427f.js +1 -0
  6. package/assets/esri/core/workers/chunks/{123e15c9e068a053d54e.js → 05d25a98c54679233902.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{16a46688df5fad5cf8d5.js → 0b4a2361b9f9a6c0b8a7.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{1fdd736c4932655ff1d9.js → 0e88e61d89f89994c4bf.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0f2ab57e4eb722b3b0c0.js +1 -0
  10. package/assets/esri/core/workers/chunks/{ce59ec4f0cfbdf780bcb.js → 1f91280032aa42b1585b.js} +1 -1
  11. package/assets/esri/core/workers/chunks/254898b41cabe313b6ce.js +1 -0
  12. package/assets/esri/core/workers/chunks/26cafd20c8d03c274389.js +1 -0
  13. package/assets/esri/core/workers/chunks/{a69f1879735a031f62e9.js → 2a2d5f9ea42cb2eee9c6.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{c03190faca955bffc8c1.js → 2bc6edeb3156d241677b.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{d587b7842091affdaac3.js → 3158a3487d3e8a61b680.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{07e791530677f7e70f32.js → 3a2ecb883fdb5c598544.js} +2 -2
  17. package/assets/esri/core/workers/chunks/{d7456829e404874a9e2f.js → 3e0752a81a7247c567ab.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{fcda652fb5262696d59c.js → 3ef740d25dc17bef11b2.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{2304f7b8173cf86dd805.js → 457bbf27e9bc18132464.js} +1 -1
  20. package/assets/esri/core/workers/chunks/45eddf3918973fa8d751.js +1 -0
  21. package/assets/esri/core/workers/chunks/4a6186001323b47c23a4.js +1 -0
  22. package/assets/esri/core/workers/chunks/{0b79630ad435a7734104.js → 4b3622fc355fd2fd8678.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{193775b3b7de8f5dc578.js → 4fb718174c6e07d752e0.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{cd14b6157862f33ab116.js → 5143f74f1fe7533a6069.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{36425d29aaa5852cb41d.js → 522bc1d79dbe957301e4.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{f80f04657762666b9165.js → 52dbfd7519555028a8af.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{f4472e3486fdc33abb9a.js → 56bce3a6701f8549606b.js} +1 -1
  28. package/assets/esri/core/workers/chunks/572fcd33ae3648ed4f9c.js +1 -0
  29. package/assets/esri/core/workers/chunks/{d6f1ed8d8f76a32bc81d.js → 576a1784e93c5406e657.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{ddc7956d80498518551e.js → 5a1d975b3e9e6b7eff67.js} +1 -1
  31. package/assets/esri/core/workers/chunks/5a83ea967ecde01d5622.js +1 -0
  32. package/assets/esri/core/workers/chunks/{4c38af9ae023fde2b5cd.js → 5aff2d6ae0d2a2d92ecc.js} +1 -1
  33. package/assets/esri/core/workers/chunks/5eb9fdb076488de9cd83.js +1 -0
  34. package/assets/esri/core/workers/chunks/{b59f03c64e4965d87291.js → 66fc3c4d6c54eee231b9.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{de359f89e03da18999fc.js → 691d0a60354b6458b9de.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{d44217de4c73475f9c66.js → 73a045061e69a22b6869.js} +1 -1
  37. package/assets/esri/core/workers/chunks/76064c2c801da55cd844.js +1 -0
  38. package/assets/esri/core/workers/chunks/770880ad43f252962017.js +1 -0
  39. package/assets/esri/core/workers/chunks/{52c90975cf22add7ee2b.js → 78cb6b9ab32abdd1d530.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{11fed97adc9bca0f95e9.js → 7b6e3cc086d13da770fa.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{d69cdee402ba4fc3735f.js → 7ed2aa1092c0a2c839c0.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{097c037705ab485372ee.js → 83113a9e284701d053b5.js} +1 -1
  43. package/assets/esri/core/workers/chunks/8418ad9ad7b6481ebe82.js +1 -0
  44. package/assets/esri/core/workers/chunks/{173d94e162b210dee0a2.js → 85c72d9fa533552a6e8a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{5d202f60891fcae7174d.js → 861a7d0e665add901e11.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{16ed8c0af8bb8b400163.js → 87077f4cbca13e030411.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{199f70c0373f6008a545.js → 8df0c154bb0d79a905c0.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{0f4759efc0982fb0ea03.js → 9066f095f16448c0a04e.js} +1 -1
  49. package/assets/esri/core/workers/chunks/91718795fc4ca6516ac7.js +1 -0
  50. package/assets/esri/core/workers/chunks/{796d27d1bbb2eed53cbd.js → 9321f5ec514805307219.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{57dc80942e51dedd8335.js → 93d1118f7a909d123b40.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{e6220c1fa887e21ffbbd.js → 9a235c92f21df2c17aa8.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{6666ef3fd6ce877a4509.js → 9d11e7972bc298cb94ce.js} +1 -1
  54. package/assets/esri/core/workers/chunks/a11f05ddd8314b648f76.js +1 -0
  55. package/assets/esri/core/workers/chunks/{d4961d307651431328a8.js → a256edc8337e462f80f0.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{2714ec856c2b3223425b.js → a41fabf8b2cf15b7d0c9.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{e2d1d9929ed7744785a1.js → a7a553e245ba011d259f.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{7ef1c1f765b6d423e474.js → a9eb90b901e64e67b7a3.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{21decfc1e477fb769204.js → aa7aaeae31ddb259e55e.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{a7b315a660f0f4e1d197.js → ad1946c084219bb678a0.js} +1 -1
  61. package/assets/esri/core/workers/chunks/b056b4c79bcd542dd1d2.js +1 -0
  62. package/assets/esri/core/workers/chunks/{bae1d6dd2376dff271e8.js → b1a0a7cdaf50f98adb3e.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{c1ad062ccc1817cbee4c.js → b20f4c82d0b44fdb4670.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{1a1e57267306c07e5bdb.js → b3f0600729227b458a75.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{16f5cd740321a3539bf1.js → bacc343a79828e456de7.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{e23fc5853e2f4016936b.js → c250799c131aa4ed2c35.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{a495e60996a36ce19a32.js → c4da2ca1dee0c44051d0.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{be60a6e210186ff09ae2.js → c6149e0ac1c103e03baf.js} +1 -1
  69. package/assets/esri/core/workers/chunks/c69fefe9d51ac7c2b0a6.js +1 -0
  70. package/assets/esri/core/workers/chunks/{bbb9659f79511c2c4690.js → c91d39e8e14be3d8bdf5.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{c93454e37ae0f124bcb0.js → c9c5e6996f36ec4b1558.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{4c8c69d081ed37bf5bc5.js → cd391415b8b8320e12e4.js} +1 -1
  73. package/assets/esri/core/workers/chunks/d3b3e8c6d7096bc59489.js +1 -0
  74. package/assets/esri/core/workers/chunks/{bad82ce3f84f7efb7ab7.js → da2a10e72a315c3c1f82.js} +1 -1
  75. package/assets/esri/core/workers/chunks/de79645e559a2d1ffa67.js +1 -0
  76. package/assets/esri/core/workers/chunks/{8569ae372fc64641b6b1.js → e2e3c39876bbe019c57a.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{d31e68e73527c88b8276.js → e7e565e7c0ce1464c6b0.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{f3f26f6116ab9126c2e7.js → e8a23ae30d586e3a973c.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{d1aa1d51662f4a01e793.js → ea068f75397c3b3337ec.js} +3 -3
  80. package/assets/esri/core/workers/chunks/{c09bc36347e8eb9fff00.js → f09446b9ff937a84d6d3.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{354b309c8225336bc1e5.js → f6d047358d14328f3622.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{b43889ed9737c27e89f1.js → fb9a889ec9fd23739a14.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{b2a67fe89f6505498bc3.js → fe1b67ab7748a3aef231.js} +1 -1
  84. package/assets/esri/themes/base/_Ui.scss +3 -3
  85. package/assets/esri/themes/base/_mixins.scss +2 -2
  86. package/assets/esri/themes/base/widgets/_Attachments.scss +3 -3
  87. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +8 -8
  88. package/assets/esri/themes/base/widgets/_BasemapToggle.scss +1 -1
  89. package/assets/esri/themes/base/widgets/_BuildingExplorer.scss +1 -1
  90. package/assets/esri/themes/base/widgets/_BuildingLevelPicker.scss +4 -4
  91. package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +1 -1
  92. package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +2 -2
  93. package/assets/esri/themes/base/widgets/_DatePicker.scss +4 -4
  94. package/assets/esri/themes/base/widgets/_Daylight.scss +1 -1
  95. package/assets/esri/themes/base/widgets/_Editor.scss +2 -2
  96. package/assets/esri/themes/base/widgets/_ElevationProfile.scss +2 -2
  97. package/assets/esri/themes/base/widgets/_FeatureMedia.scss +1 -1
  98. package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -1
  99. package/assets/esri/themes/base/widgets/_FloorFilter.scss +2 -2
  100. package/assets/esri/themes/base/widgets/_Grid.scss +1 -1
  101. package/assets/esri/themes/base/widgets/_GridControls.scss +1 -1
  102. package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
  103. package/assets/esri/themes/base/widgets/_Legend.scss +1 -1
  104. package/assets/esri/themes/base/widgets/_LineOfSight.scss +1 -1
  105. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +1 -1
  106. package/assets/esri/themes/base/widgets/_OrientedImageryViewerNavigationUI.scss +3 -3
  107. package/assets/esri/themes/base/widgets/_Popup.scss +1 -1
  108. package/assets/esri/themes/base/widgets/_Print.scss +3 -3
  109. package/assets/esri/themes/base/widgets/_Sketch.scss +1 -1
  110. package/assets/esri/themes/base/widgets/_Slice.scss +1 -1
  111. package/assets/esri/themes/base/widgets/_Slider.scss +3 -3
  112. package/assets/esri/themes/base/widgets/_SnappingControls.scss +2 -2
  113. package/assets/esri/themes/base/widgets/_Spinner.scss +2 -2
  114. package/assets/esri/themes/base/widgets/_Swipe.scss +2 -2
  115. package/assets/esri/themes/base/widgets/_Tooltip.scss +2 -2
  116. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +1 -1
  117. package/assets/esri/themes/base/widgets/_VideoPlayer.scss +2 -2
  118. package/assets/esri/themes/base/widgets/_Widget.scss +8 -8
  119. package/assets/esri/themes/dark/main.css +1 -1
  120. package/assets/esri/themes/light/main.css +1 -1
  121. package/assets/esri/themes/light/view.css +1 -1
  122. package/chunks/CutFillComposition.glsl.js +10 -4
  123. package/chunks/RibbonLine.glsl.js +75 -63
  124. package/chunks/Water.glsl.js +24 -16
  125. package/config.js +1 -1
  126. package/geometry/operators/offsetOperator.d.ts +1 -1
  127. package/geometry/operators/proximityOperator.d.ts +1 -1
  128. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  129. package/geometry/support/curves/circularArcUtils.js +1 -1
  130. package/geometry/support/curves/ellipticArc4Utils.js +1 -1
  131. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  132. package/geometry/support/zscale.js +1 -1
  133. package/interfaces.d.ts +7 -0
  134. package/kernel.js +1 -1
  135. package/layers/LinkChartLayer.js +1 -1
  136. package/layers/OrientedImageryLayer.d.ts +0 -152
  137. package/layers/OrientedImageryLayer.js +1 -1
  138. package/layers/support/layerUtils.js +1 -1
  139. package/package.json +1 -1
  140. package/portal/schemas/definitions.js +1 -1
  141. package/support/revision.js +1 -1
  142. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  143. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  144. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  145. package/views/3d/interactive/manipulators/ShiftManipulator.js +1 -1
  146. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  147. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  148. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  149. package/views/3d/layers/graphics/lineUtils.js +1 -1
  150. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  151. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  152. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  153. package/views/3d/terrain/TerrainRenderer.js +1 -1
  154. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  155. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  156. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  157. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  158. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  159. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  160. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  161. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  162. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  163. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  164. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  165. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  166. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  167. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  168. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  169. package/views/3d/webgl.js +1 -1
  170. package/views/draw/plugins/TangentArcSegmentPlugin.js +2 -0
  171. package/views/webgl/checkWebGLError.js +1 -1
  172. package/widgets/Histogram.js +1 -1
  173. package/widgets/Sketch/support/PluginManager.js +1 -1
  174. package/assets/esri/core/workers/chunks/0ab19ad980fda1cf402a.js +0 -1
  175. package/assets/esri/core/workers/chunks/1cce2f8837ad765acf44.js +0 -1
  176. package/assets/esri/core/workers/chunks/20f9f3470cad47d01803.js +0 -1
  177. package/assets/esri/core/workers/chunks/23a9070e9362b8439770.js +0 -1
  178. package/assets/esri/core/workers/chunks/28ac3a75130fe2b57ac7.js +0 -1
  179. package/assets/esri/core/workers/chunks/36a0e48113ab59a4f21d.js +0 -1
  180. package/assets/esri/core/workers/chunks/440a650ed0867a16f559.js +0 -1
  181. package/assets/esri/core/workers/chunks/440f76c397a813b0dcf9.js +0 -1
  182. package/assets/esri/core/workers/chunks/5344919fc6e8050450f1.js +0 -1
  183. package/assets/esri/core/workers/chunks/5e9bd5ed6ecee5b15127.js +0 -1
  184. package/assets/esri/core/workers/chunks/64845b1f53eca9db1229.js +0 -1
  185. package/assets/esri/core/workers/chunks/7278cc37e85f0242f19b.js +0 -1
  186. package/assets/esri/core/workers/chunks/7d56b2ac5030dd8b748e.js +0 -1
  187. package/assets/esri/core/workers/chunks/96e799ca97989a6ed448.js +0 -1
  188. package/assets/esri/core/workers/chunks/9db2ff1d4cbb5d1b623e.js +0 -1
  189. package/assets/esri/core/workers/chunks/ab414a60808ea05a63e6.js +0 -1
  190. package/assets/esri/core/workers/chunks/ec65c9c72507ef9a9cf9.js +0 -1
  191. package/assets/esri/core/workers/chunks/f1767b8ba82fdd9bd947.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8434],{62815(e,t,i){i.d(t,{N:()=>o,d:()=>l});var r=i(86211),s=i(73941),n=i(21325),a=i(52006);function o(e,t,i){const r=l(t,i);if(1!==r)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,r);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const i of e.curvePaths)for(const e of i){const i=(0,a.yP)(e);i.length>2&&(i[2]*=t)}if(e.paths)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}}(e,r);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const i of e.curveRings)for(const e of i){const i=(0,a.yP)(e);i.length>2&&(i[2]*=t)}if(e.rings)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}}(e,r);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,r);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,r);default:return}}function l(e,t){return null==e||null==t||(e.vcsWkid??null)!==(t.vcsWkid??null)||(0,n.aI)(e,t)||(0,s.xP)(e)||(0,s.xP)(t)?1:(0,r.G9)(e)/(0,r.G9)(t)}},74379(e,t,i){i.d(t,{V:()=>r,t:()=>s});const r=Symbol("isImageryGraphicOrigin");function s(e){return!!e&&r in e}},87772(e,t,i){i.r(t),i.d(t,{default:()=>gi});var r,s=i(5482),n=i(37838),a=i(69540),o=i(53966),l=i(25728),u=i(17676),p=i(91429),c=i(89808),m=i(99959),d=i(74379);class y extends m.A{get[(r=d.V,c.Q)](){return this.layer}constructor(e){super(),this[r]=!0,this.type="imagery",this.layer=e}get id(){return this.layer.id}}var g=i(4146),h=i(52106),f=i(11254),v=i(49186),w=i(4718),R=i(36708),C=i(84952),b=i(56507),S=i(62788),x=i(5443),I=i(39829),M=i(16930),F=i(21325),A=i(4366),D=i(20758),P=i(34251),T=i(10873),j=i(45617),N=i(25482),Z=i(94778);const O={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 _=i(22796),V=i(67369),q=i(70274),E=i(48940);const J=new Set(["u1","u2","u4","u8","s8","u16","s16"]),G={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)"},z=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function U(e){return z.has(e.type)}function $(e,t){if(!e||!t)return(0,w.o8)(e||t);const i=(0,w.o8)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),L(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(B(i.functionArguments).Raster=t);return i}function L(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&&L(e[i].arguments,t))}function K(e){const t=(0,w.o8)(O[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=K(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=X(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return e.outputPixelType&&t.function&&(t.function.pixelType=e.outputPixelType.toUpperCase()),t}function B(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?B(t.functionArguments):e}const Q={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function k(e,t){const i=J.has(t)?(0,Z.hP)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function H(e){if(null==e)return;const{fields:t}=e,i=t?.find(e=>e?.name&&"value"===e.name.toLowerCase());return i?.name}function W(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find(e=>"fill"===e.type)?.material?.color:e.symbol?.color}function X(e){const t=[],i=[];return e.forEach(e=>{t.push(e[0]),i.push((0,V.vL)([...e.slice(1),255]))}),{type:"RasterColormap",values:t,colors:i}}var Y=i(85675),ee=i(13868),te=i(43937);let ie=class extends N.o{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return this.requestRawData||"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new Y.A({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");this.requestRawData||(t=this._addResampleRasterFunction(t));const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=function(e,t){return $(new _.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,s)),this.requestRawData||!r||i||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&U(r)?$(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new _.A;r.functionName="Stretch";const s=Q[q.u.toJSON(e.stretchType)],n="u8",a=e.customStatistics?.map(e=>[e.min,e.max,e.avg??0,e.stddev??1]),o={StretchType:s,Statistics:a,DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),s===Q.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===Q.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=n):s===Q.minMax?r.outputPixelType=n:s===Q.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new _.A;if(i)n.functionArguments={ColorRamp:(0,V.hf)(s)};else{const i=(0,V.hs)(s,!0);if(i)n.functionArguments={colorRampName:i};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach(e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm"),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,V.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new _.A({rasterFunctionDefinition:K(n)}):n}return i?new _.A({rasterFunctionDefinition:K(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],a=1e-4,{pixelType:o,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=H(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach((t,i)=>{const r=t.symbol?.color;let s;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach(a=>{null!=t.minValue&&null!=t.maxValue&&(s=a.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([a.attributes[p],r.r,r.g,r.b]))})});const i=o?k(n,o):n,r=new _.A;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:K(r)}):r}e.classBreakInfos.forEach((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const o=e.symbol&&e.symbol.color;o?.a?(0===t?i.push(e.minValue,e.maxValue+a):i.push(e.minValue+a,e.maxValue+a),r.push(t),n.push([t,o.r,o.g,o.b])):s.push(e.minValue,e.maxValue)});const c=o?k(n,o):n,m=new _.A;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const d=new _.A;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new _.A({rasterFunctionDefinition:K(d)}):d}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,a=H(s),o=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(a){const t=new Map;l.forEach(e=>{const i=e.value,r=W(e);null!=i&&r?.a&&t.set(String(i),r.toRgb())});const r=e.field;r&&n.forEach(({attributes:e})=>{const s=String(e[r]),n=e[a],l=t.get(s);l?i.push([n,...l]):o&&i.push([n,...o])})}}else for(let e=0;e<l.length;e++){const t=l[e],r=W(t),s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r?k(i,r):i,p=new _.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:K(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?k(i,r):i,n=new _.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new _.A({rasterFunctionDefinition:K(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new _.A;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:s}=t,n="vector-uv"===r;let a,o;if(2===s?.length){const e=s.map(e=>e.toLowerCase());a=e.indexOf("magnitude"),o=e.indexOf("direction")}-1!==a&&null!==a||(a=0,o=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find(e=>"Magnitude"===e.field):new E.A,c={magnitudeBandID:a,directionBandID:o,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:G[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const m=K(i);return t.convertToRFT?_.A.fromJSON({rasterFunctionDefinition:m}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new _.A;const r=new _.A;r.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,a={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(a.Azimuth=e.azimuth,a.Altitude=e.altitude),3===n&&(a.PSPower=e.pixelSizePower,a.PSZFactor=e.pixelSizeFactor),r.functionArguments=a,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?a.ColorRamp=(0,V.hf)(e.colorRamp):a.Colormap=(0,V.R8)(e.colorRamp)),i?new _.A({rasterFunctionDefinition:K(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 _.A({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new _.A({rasterFunctionDefinition:K(r)}):r,$(r,e)}};(0,s.Cg)([(0,p.MZ)()],ie.prototype,"layer",void 0),(0,s.Cg)([(0,p.MZ)()],ie.prototype,"requestRawData",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"adjustAspectRatio",null),(0,s.Cg)([(0,te.K)("adjustAspectRatio")],ie.prototype,"writeAdjustAspectRatio",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"bandIds",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"compression",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"compressionQuality",null),(0,s.Cg)([(0,te.K)("compressionQuality")],ie.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"compressionTolerance",null),(0,s.Cg)([(0,te.K)("compressionTolerance")],ie.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"format",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:{reader:ee.SZ.read},write:{writer:ee.SZ.write}}})],ie.prototype,"interpolation",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"noData",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:{reader:ee.hm.read},write:{writer:ee.hm.write}}})],ie.prototype,"noDataInterpretation",null),(0,s.Cg)([(0,p.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,write:ee.e8.write}})],ie.prototype,"pixelType",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"lercVersion",void 0),(0,s.Cg)([(0,te.K)("lercVersion")],ie.prototype,"writeLercVersion",null),(0,s.Cg)([(0,p.MZ)({type:Number})],ie.prototype,"version",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],ie.prototype,"mosaicRule",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0,name:"renderingRule"}})],ie.prototype,"rasterFunction",null),ie=(0,s.Cg)([(0,p.$K)("esri.layers.support.ExportImageServiceParameters")],ie);var re=i(20437),se=i(95466),ne=i(33446),ae=i(43577),oe=i(14140),le=i(74797),ue=i(87186),pe=i(12711),ce=i(85676),me=i(94359),de=i(65864),ye=i(17136),ge=i(2272),he=i(86738);let fe=class extends((0,a.OU)(N.o)){constructor(e){super(e),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0}})],fe.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],fe.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],fe.prototype,"objectIds",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],fe.prototype,"where",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],fe.prototype,"maxCount",void 0),fe=(0,s.Cg)([(0,p.$K)("esri.rest.support.FindImagesParameters")],fe);const ve=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"make",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"model",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"focalLength",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"rows",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],i.prototype,"cols",void 0),i=(0,s.Cg)([(0,p.$K)("esri.rest.support.CameraInfoMixin")],i),i};let we=class extends(ve(N.o)){constructor(e){super(e),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,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"id",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"uri",write:!0}})],we.prototype,"referenceUri",void 0),(0,s.Cg)([(0,p.MZ)({type:Date,json:{write:!0}})],we.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],we.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"cameraID",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],we.prototype,"center",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],we.prototype,"perspectiveCenter",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"orientation",void 0),we=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageInspectionInfo")],we);const Re=we;let Ce=class extends N.o{constructor(e){super(e),this.images=null}};var be;(0,s.Cg)([(0,p.MZ)({type:[Re],json:{write:!0}})],Ce.prototype,"images",void 0),Ce=(0,s.Cg)([(0,p.$K)("esri.rest.support.FindImagesResult")],Ce);let Se=be=class extends N.o{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new be((0,w.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,s.Cg)([(0,p.MZ)({type:[String],json:{name:"angleName",write:!0}})],Se.prototype,"angleNames",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],Se.prototype,"point",void 0),(0,s.Cg)([(0,p.MZ)({type:M.A,json:{write:!0}})],Se.prototype,"spatialReference",void 0),(0,s.Cg)([(0,p.MZ)({type:b.jz,json:{write:!0}})],Se.prototype,"rasterId",void 0),Se=be=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAngleParameters")],Se);let xe=class extends N.o{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],xe.prototype,"north",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],xe.prototype,"up",void 0),(0,s.Cg)([(0,p.MZ)({type:M.A,json:{write:!0}})],xe.prototype,"spatialReference",void 0),xe=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAngleResult")],xe);var Ie=i(86211),Me=i(60408),Fe=i(50498),Ae=i(66552);const De=new Ae.J({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let Pe=class extends N.o{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var Te;(0,s.Cg)([(0,p.MZ)()],Pe.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],Pe.prototype,"measureOperation",void 0),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],Pe.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],Pe.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Pe.prototype,"raster",void 0),Pe=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureParameters")],Pe);let je=Te=class extends Pe{constructor(e){super(e),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,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Te((0,w.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:!0,write:!0}})],je.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],je.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],je.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],je.prototype,"is3D",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:Ie.Sk.read,write:Ie.Sk.write}})],je.prototype,"linearUnit",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:Ie.dk.read,write:Ie.dk.write}})],je.prototype,"areaUnit",void 0),je=Te=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAreaParameters")],je);let Ne=class extends N.o{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ne.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ne.prototype,"sensorName",void 0),Ne=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureResult")],Ne);var Ze=i(64108);let Oe=class extends N.o{constructor(e){super(e),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,s.Cg)([(0,p.MZ)({type:String})],Oe.prototype,"unit",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0}})],Oe.prototype,"value",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Oe.prototype,"displayValue",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0}})],Oe.prototype,"uncertainty",void 0),Oe=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureResultValue")],Oe);const _e=Oe;let Ve=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:Ie.dk.read,write:Ie.dk.write}})],Ve.prototype,"unit",void 0),Ve=(0,s.Cg)([(0,Ze.$)("esri.rest.support.ImageMeasureResultAreaValue")],Ve);const qe=Ve;let Ee=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:Ie.Sk.read,write:Ie.Sk.write}})],Ee.prototype,"unit",void 0),Ee=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageMeasureResultLengthValue")],Ee);const Je=Ee;let Ge=class extends Ne{constructor(e){super(e),this.area=null,this.perimeter=null}};(0,s.Cg)([(0,p.MZ)({type:qe,json:{read:!0,write:!0}})],Ge.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],Ge.prototype,"perimeter",void 0),Ge=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAreaResult")],Ge);let ze=class extends((0,a.OU)(N.o)){constructor(e){super(e),this.outSpatialReference=null}};(0,s.Cg)([(0,p.MZ)({type:M.A,json:{name:"outSR",write:!0}})],ze.prototype,"outSpatialReference",void 0),ze=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageBoundaryParameters")],ze);var Ue=i(36005);let $e=class extends N.o{constructor(e){super(e),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?I.A.fromJSON(e):x.A.fromJSON(e)}};var Le;(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],$e.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"shape",write:!0}})],$e.prototype,"geometry",void 0),(0,s.Cg)([(0,Ue.w)("geometry")],$e.prototype,"readGeometry",null),$e=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageBoundaryResult")],$e);let Ke=Le=class extends Pe{constructor(e){super(e),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,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new Le((0,w.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],Ke.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],Ke.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],Ke.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],Ke.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],Ke.prototype,"is3D",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:Ie.Sk.read,write:Ie.Sk.write}})],Ke.prototype,"linearUnit",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:Ie.b$.read,write:Ie.b$.write}})],Ke.prototype,"angularUnit",void 0),Ke=Le=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageDistanceParameters")],Ke);let Be=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:Ie.b$.read,write:Ie.b$.write}})],Be.prototype,"unit",void 0),Be=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageMeasureResultAngleValue")],Be);const Qe=Be;let ke=class extends Ne{constructor(e){super(e),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],ke.prototype,"distance",void 0),(0,s.Cg)([(0,p.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"azimuthAngle",void 0),(0,s.Cg)([(0,p.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"elevationAngle",void 0),ke=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageDistanceResult")],ke);var He=i(58174),We=i(79677),Xe=i(93223);let Ye=class extends((0,a.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],Ye.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Ye.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ye.prototype,"objectIds",void 0),(0,s.Cg)([(0,Xe.e)(He.x,{ignoreUnknown:!1,name:"spatialRel"})],Ye.prototype,"spatialRelationship",void 0),(0,s.Cg)([(0,p.MZ)({type:We.A,json:{name:"time",write:!0}})],Ye.prototype,"timeExtent",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],Ye.prototype,"where",void 0),Ye=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfoParameters")],Ye);let et=class extends(ve(N.o)){constructor(e){super(e),this.id=null}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],et.prototype,"id",void 0),et=(0,s.Cg)([(0,p.$K)("esri.rest.support.CameraInfo")],et);const tt=et;let it=class extends N.o{constructor(e){super(e),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,s.Cg)([(0,p.MZ)({json:{write:!0}})],it.prototype,"id",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],it.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:Date,json:{write:!0}})],it.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],it.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],it.prototype,"cameraID",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],it.prototype,"center",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],it.prototype,"gps",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],it.prototype,"orientation",void 0),it=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfo")],it);const rt=it;let st=class extends N.o{constructor(e){super(e),this.images=null,this.cameras=null}};var nt;(0,s.Cg)([(0,p.MZ)({type:[rt],json:{write:!0}})],st.prototype,"images",void 0),(0,s.Cg)([(0,p.MZ)({type:[tt],json:{write:!0}})],st.prototype,"cameras",void 0),st=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfoResult")],st);let at=nt=class extends Pe{constructor(e){super(e),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,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new nt((0,w.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0}})],at.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],at.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],at.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],at.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],at.prototype,"operationType",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:Ie.Sk.read,write:Ie.Sk.write}})],at.prototype,"linearUnit",void 0),at=nt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageHeightParameters")],at);let ot=class extends Ne{constructor(e){super(e),this.height=null}};(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],ot.prototype,"height",void 0),ot=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageHeightResult")],ot);var lt,ut=i(22048);let pt=lt=class extends N.o{constructor(e){super(e),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,Me.$B)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Y.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map(e=>e.rasterFunctionDefinition||e.toJSON())))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new lt((0,w.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{write:!0}})],pt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],pt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],pt.prototype,"mosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],pt.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,p.MZ)({type:_.A,json:{write:!0,name:"renderingRule"}})],pt.prototype,"rasterFunction",null),(0,s.Cg)([(0,te.K)("rasterFunction")],pt.prototype,"writeRasterFunction",null),(0,s.Cg)([(0,p.MZ)({type:[_.A],json:{write:!0,name:"renderingRules"}})],pt.prototype,"rasterFunctions",void 0),(0,s.Cg)([(0,te.K)("rasterFunctions")],pt.prototype,"writeRasterFunctions",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],pt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,te.K)("pixelSize")],pt.prototype,"writePixelSize",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnCatalogItems",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnPixelValues",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],pt.prototype,"maxItemCount",void 0),(0,s.Cg)([(0,p.MZ)({type:We.A,json:{write:{target:"time"}}})],pt.prototype,"timeExtent",void 0),(0,s.Cg)([(0,te.K)("timeExtent")],pt.prototype,"writeTimeExtent",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],pt.prototype,"raster",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],pt.prototype,"viewId",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"processAsMultidimensional",void 0),pt=lt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageIdentifyParameters")],pt);var ct=i(22671);let mt=class extends N.o{constructor(e){super(e),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};var dt;(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"catalogItemVisibilities",void 0),(0,s.Cg)([(0,p.MZ)({type:ct.A,json:{write:!0}})],mt.prototype,"catalogItems",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],mt.prototype,"location",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"objectId",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"processedValues",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"properties",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"value",void 0),mt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageIdentifyResult")],mt);let yt=dt=class extends N.o{constructor(e){super(e),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map(e=>e.toJSON())}}clone(){return new dt({geometries:this.geometries?.map(e=>e.clone())??[],rasterId:this.rasterId})}};(0,s.Cg)([(0,p.MZ)({type:[he.A],json:{write:!0}})],yt.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],yt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:b.jz,json:{write:!0}})],yt.prototype,"rasterId",void 0),yt=dt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePixelLocationParameters")],yt);let gt=class extends N.o{constructor(e){super(e),this.geometries=null}};var ht;(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],gt.prototype,"geometries",void 0),gt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePixelLocationResult")],gt);let ft=ht=class extends Pe{constructor(e){super(e),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new ht((0,w.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:de.rS}})],ft.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],ft.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],ft.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],ft.prototype,"is3D",void 0),ft=ht=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePointParameters")],ft);let vt=class extends Ne{constructor(e){super(e),this.point=null}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{name:"point.value",read:!0,write:!0}})],vt.prototype,"point",void 0),vt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePointResult")],vt);var wt=i(34606),Rt=i(29127);let Ct=class extends((0,a.OU)(N.o)){constructor(e){super(e),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,Me.$B)(e[0]),geometries:e.map(e=>({...e.toJSON(),spatialReference:void 0}))}:null}};(0,s.Cg)([(0,p.MZ)({types:[Fe.yR]})],Ct.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],Ct.prototype,"writeGeometries",null),(0,s.Cg)([(0,p.MZ)({type:[b.jz],json:{write:!0}})],Ct.prototype,"rasterIds",void 0),(0,s.Cg)([(0,p.MZ)({type:M.A,json:{name:"outSR",write:!0}})],Ct.prototype,"outSpatialReference",void 0),Ct=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageToMapMultirayParameters")],Ct);let bt=class extends((0,a.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],bt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],bt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],bt.prototype,"rasterId",void 0),(0,s.Cg)([(0,p.MZ)({type:M.A,json:{name:"outSR",write:!0}})],bt.prototype,"outSpatialReference",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.DOff",write:!0}})],bt.prototype,"depthOffset",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.Adjust",write:!0}})],bt.prototype,"adjust",void 0),bt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageToMapParameters")],bt);let St=class extends((0,a.OU)(N.o)){constructor(e){super(e),this.referenceUri=null,this.rasterId=null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{name:"uri",write:!0}})],St.prototype,"referenceUri",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],St.prototype,"rasterId",void 0),St=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageUrlParameters")],St);let xt=class extends N.o{constructor(e){super(e),this.url=null}};(0,s.Cg)([(0,p.MZ)({json:{name:"imageURL",write:!0}})],xt.prototype,"url",void 0),xt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageUrlResult")],xt);const It=new Ae.J({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0});let Mt=class extends((0,a.OU)(N.o)){constructor(e){super(e),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,i){e?.length&&(t.geometryType=(0,Me.$B)(e[0]),t.geometries=e.map(e=>e.toJSON()))}};(0,s.Cg)([(0,p.MZ)({types:[Fe.yR]})],Mt.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],Mt.prototype,"writeGeometries",null),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],Mt.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],Mt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Mt.prototype,"constantZ",void 0),(0,s.Cg)([(0,p.MZ)({type:It.apiValues,json:{read:It.read,write:It.write}})],Mt.prototype,"baseType",void 0),Mt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolumeParameters")],Mt);let Ft=class extends N.o{constructor(e){super(e),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"cut",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"fill",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"maxz",write:!0}})],Ft.prototype,"maxZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"minz",write:!0}})],Ft.prototype,"minZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"meanz",write:!0}})],Ft.prototype,"meanZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"cutCellCount",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"fillCellCount",void 0),Ft=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolume")],Ft);const At=Ft;let Dt=class extends N.o{constructor(e){super(e),this.volumes=[]}};(0,s.Cg)([(0,p.MZ)({type:[At],json:{write:!0}})],Dt.prototype,"volumes",void 0),Dt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolumeResult")],Dt);let Pt=class extends((0,a.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]=JSON.stringify(e))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],Pt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Pt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Pt.prototype,"rasterId",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.VisibleOnly",write:!0}})],Pt.prototype,"visibleOnly",void 0),Pt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MapToImageParameters")],Pt);let Tt=class extends N.o{constructor(e){super(e),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),he.A.fromJSON(e)}};var jt;(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"Shape",read:de.rS,write:!0}})],Tt.prototype,"geometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Length",write:!0}})],Tt.prototype,"length",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Area",write:!0}})],Tt.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{name:"Center",write:!0}})],Tt.prototype,"center",void 0),(0,s.Cg)([(0,Ue.w)("center")],Tt.prototype,"readCenter",null),Tt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureAreaFromImageResult")],Tt);let Nt=jt=class extends N.o{constructor(e){super(e),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Me.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,w.o8)({geometry:this.geometry,rasterId:this.rasterId});return new jt(e)}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:de.rS,write:!0}})],Nt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Nt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Nt.prototype,"rasterId",void 0),Nt=jt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureFromImageParameters")],Nt);let Zt=class extends N.o{constructor(e){super(e),this.geometry=null,this.length=null}};function Ot(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 _t(e,t,i){const r=(0,b.PZ)(ut.A,t),s=(0,ge.Dl)(e),n=r.geometry?[r.geometry]:[],a=await(0,ye.el)(n),o=r.toJSON();Ot(o);const l=a?.[0];null!=l&&(o.geometry=Jt(l));const u=(0,ge.lF)({...s.query,f:"json",...o});return(0,ge.jV)(u,i)}async function Vt(e,t,i){const r=(0,b.PZ)(pt,t),s=(0,ge.Dl)(e),n=r.geometry?[r.geometry]:[];return(0,ye.el)(n).then(e=>{const t=r.toJSON(),n=e?.[0];null!=n&&(t.geometry=JSON.stringify(Jt(n)));const a=(0,ge.lF)({...s.query,f:"json",...t}),o=(0,ge.jV)(a,i);return(0,f.A)(s.path+"/identify",o)}).then(e=>mt.fromJSON(e.data))}async function qt(e,t,i,r){const s=(0,ge.Dl)(e),n=await(0,ye.el)(i),a=t.toJSON();null!=n[0]&&(a.fromGeometry=JSON.stringify(Jt(n[0]))),null!=n[1]&&(a.toGeometry=JSON.stringify(Jt(n[1])));const o=(0,ge.lF)({...s.query,f:"json",...a}),l=(0,ge.jV)(o,r),{data:u}=await(0,f.A)(s.path+"/measure",l);return u}async function Et(e,t,i){t=(0,b.PZ)(Nt,t);const r=(0,ge.Dl)(e),s=t.toJSON(),n=(0,ge.lF)({...r.query,f:"json",...s}),a=(0,ge.jV)(n,i),{data:o}=await(0,f.A)(r.path+"/measureFromImage",a);return o}function Jt(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=Gt(e.spatialReference)),t}function Gt(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 zt(e,t){if(!e.imageCoordinateSystem)return(0,F.YX)(e);const i=Gt(e),{icsid:r,icsns:s}=i;return null==r||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"Shape",read:de.rS,write:!0}})],Zt.prototype,"geometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Length",write:!0}})],Zt.prototype,"length",void 0),Zt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureLengthFromImageResult")],Zt);var Ut=i(82371),$t=i(20223),Lt=i(20615),Kt=i(74910),Bt=i(78286),Qt=i(99199),kt=i(61956);const Ht=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Wt=(0,b.Qp)(b.GB,{min:0,max:255}),Xt=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new ie({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?(0,S.F_)(()=>Y.A.fromJSON(t)):null}get fieldsIndex(){return this.fields?new se.A(this.fields):null}set format(e){e&&Ht.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=Y.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?Y.A.fromJSON(i):this._isMosaicRuleSupported(t)?Y.A.fromJSON(t):null}writeMosaicRule(e,t,i){const{mosaicRule:r}=this;this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=Wt(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,C.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,me.LF)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),U(s)||o.A.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON()}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push((0,le.rZ)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,le.Nd)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push((0,le.dy)()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push((0,le.nq)(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=(0,le.DV)(i),s=(0,le.y6)();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const i=(0,le.AL)(t.multidimensionalInfo);e.push(...i)}const i=t?.attributeTable;if(null!=i){const t=(0,le.jC)(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?_.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):_.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?M.A.fromJSON(i):null}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=ee.e8.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e,{renderer:r,symbolizer:s,pixelFilter:n}=this;const{isRawData:a}=e;if(a&&"lerc"!==this.format&&(r??=(0,pe.PD)(this.rasterInfo,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}),s||(this.symbolizer=new ce.A({rendererJSON:r.toJSON(),rasterInfo:this.rasterInfo}),s=this.symbolizer)),(a||!this._isPicture())&&r&&s&&!n){await this._updateSymbolizer(s,r);const n=this.bandIds?.length?this.bandIds:(0,pe.ci)(this.rasterInfo);i=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return i}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new v.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,w.o8)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),async function(e,t,i){const r=(0,b.PZ)(Mt,t).toJSON();r.geometries=JSON.stringify(r.geometries);const s=(0,ge.Dl)(e),n=(0,ge.lF)({...s.query,f:"json",...r}),a=(0,ge.jV)(n,i),{data:o}=await(0,f.A)(`${s.path}/calculateVolume`,a);return Dt.fromJSON({volumes:o.results})}(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new v.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(Se,t),s=r.toJSON();null!=s.angleName&&(s.angleName=s.angleName.join(",")),r?.point?.spatialReference?.imageCoordinateSystem&&(s.point.spatialReference=Gt(r.point.spatialReference)),r?.spatialReference?.imageCoordinateSystem&&(s.spatialReference=zt(r.spatialReference));const n=(0,ge.Dl)(e),a=(0,ge.lF)({...n.query,f:"json",...s}),o=(0,ge.jV)(a,i),{data:l}=await(0,f.A)(`${n.path}/computeAngles`,o);return l.spatialReference=l.spatialReference?null!=l.spatialReference.geodataXform?new M.A({wkid:0,imageCoordinateSystem:l.spatialReference}):M.A.fromJSON(l.spatialReference):null,"NaN"===l.north&&(l.north=null),"NaN"===l.up&&(l.up=null),new xe(l)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new v.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(yt,t),s=r.toJSON(),{geometries:n}=r;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(s.geometries.geometries[e].spatialReference=Gt(n[e].spatialReference));const a=(0,ge.Dl)(e),o=(0,ge.lF)({...a.query,f:"json",...s}),l=(0,ge.jV)(o,i),{data:u}=await(0,f.A)(`${a.path}/computePixelLocation`,l);return gt.fromJSON(u)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new v.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await _t(e,t,i),s=(0,ge.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new v.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await _t(e,t,i),s=(0,ge.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeStatisticsHistograms`,r),{statistics:a}=n;return a?.length&&a.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:a,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new v.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(at,t),s=await qt(e,r,[r.fromGeometry,r.toGeometry],i);return ot.fromJSON(s)}(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 v.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(je,t),s=await qt(e,r,[r.geometry],i);return Ge.fromJSON(s)}(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 v.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(Ke,t),s=await qt(e,r,[r.fromGeometry,r.toGeometry],i);return ke.fromJSON(s)}(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 v.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){const r=(0,b.PZ)(ft,t),s=await qt(e,r,[r.geometry],i);return vt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new v.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new v.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return async function(e,t,i){const r=(0,b.PZ)(Nt,t),s=await Et(e,r,i);return Zt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new v.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new v.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return async function(e,t,i){const r=(0,b.PZ)(Nt,t),s=await Et(e,r,i);return Tt.fromJSON(s)}(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 internalFetchImage(e,t,i,s={}){await this._updateCurrentRasterInfo();const{exportImageServiceParameters:n}=this;let a=!1;s.requestRawData&&(await this._initJobHandler(),n.requestRawData||"lerc"===this.format||(a=!0,n.requestRawData=!0));const o=this.getExportImageServiceParameters(e,t,i,s.timeExtent);if(a&&(n.requestRawData=!1,o&&!this.bandIds?.length&&(null==o.bandIds||""===o.bandIds))){const e=(0,pe.ci)(this.rasterInfo);o.bandIds=e?.join(",")}if(null==o){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=i,s.returnImageBitmap?{imageBitmap:await(0,ne.m)(e,`${r(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:a}=this,o=(n?.length||a.bandCount)??0,l=t*i,u=a.pixelType,p=[];for(let e=0;e<o;e++)p.push(oe.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new oe.A({width:t,height:i,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const l=!!s.requestAsImageElement&&!this.pixelFilter,u=l&&!!s.returnImageBitmap,p={imageServiceParameters:o,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:l,returnImageBitmap:u,signal:s.signal};return this._requestArrayBuffer(p)}async fetchPixels(e,t,i,r={}){await this._initJobHandler(),r.applyRendering&&this._updateCurrentRasterInfo();const s=r.applyRendering?void 0:new ie({layer:this,requestRawData:!0,interpolation:r.interpolation??"nearest",bandIds:r.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,i,r.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,r.bandIds||delete n.bandIds,delete n.compressionQuality;const a={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:r.signal},{pixelData:o}=await this._requestArrayBuffer(a);return o??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return(0,f.A)(r(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new v.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.A)(r(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>ct.A.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ge.Dl)(e),s=(0,ge.lF)({...r?.query,f:"json"}),n=(0,ge.jV)(s,i),a=`${r?.path}/${t}/info`,o=(0,f.A)(`${a}`,n),l=(0,f.A)(`${a}/keyProperties`,n),u=await Promise.allSettled([o,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let m=null;p.statistics?.length&&(m=p.statistics.map(e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]})));const d=x.A.fromJSON(p.extent),y=Math.ceil(d.width/p.pixelSizeX-.1),g=Math.ceil(d.height/p.pixelSizeY-.1),h=d.spatialReference,v=new he.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:h}),w=p.histograms?.length?p.histograms:null,R=new $t.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new ue.A({width:y,height:g,bandCount:p.bandCount,extent:d,spatialReference:h,pixelSize:v,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:w,keyProperties:c,storageInfo:R})}(r(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,f.A)(r(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=i?.ics;if(!s)return;let n=null;try{n=(await(0,f.A)(r(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const a=this.version>=10.7?(0,f.A)(r(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},o=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,F.YX)(o),outSR:"0:"+e},u=(0,f.A)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,m=n.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const y={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,F.YX)(o),outSR:"0:"+e},g=(0,f.A)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(y),...t}).then(e=>e.data).catch(()=>({})),h=await Promise.all([a,u,g]);let v=h[0].ipxf;if(null==v){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(v={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const w=x.A.fromJSON(h[1]?.geometries?.[0]);w&&(w.spatialReference=new M.A({wkid:0,imageCoordinateSystem:s}));const R=h[2].geometries?h[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],C=R.length;if(C<3)return{ics:s,icsToPixelTransform:v,icsExtent:w,northDirection:null};let b=0,S=0,I=0,A=0;for(let e=0;e<C;e++)b+=R[e].x,S+=R[e].y,I+=R[e].x*R[e].x,A+=R[e].x*R[e].y;const D=(C*A-b*S)/(C*I-b*b);let P=0;const T=R[4].x>R[0].x,j=R[4].y>R[0].y;return D===1/0?P=j?90:270:0===D?P=T?0:180:D>0?P=T?180*Math.atan(D)/Math.PI:180*Math.atan(D)/Math.PI+180:D<0&&(P=j?180+180*Math.atan(D)/Math.PI:360+180*Math.atan(D)/Math.PI),{ics:s,icsToPixelTransform:v,icsExtent:w,northDirection:P}}async generateRasterInfo(e,t){const i=(0,b.PZ)(_.A,e),s={...t,query:this._getQueryParams()};if(!i||"none"===i.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(i))return this.serviceRasterInfo??(0,Ut.Tw)(r(this.parsedUrl),this.sourceJSON,s);const n=function(e){const t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map(e=>i?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}(i);if(!n)throw new v.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[n])return this._functionRasterInfos[n];const a=(0,Ut.X6)(r(this.parsedUrl),i,s);this._functionRasterInfos[n]=a;try{return await a}catch(e){throw this._functionRasterInfos[n]=null,e}}getExportImageServiceParameters(e,t,i,s,n){const a=zt((e=e.clone().shiftCentralMeridian()).spatialReference,r(this.parsedUrl));n??=this.exportImageServiceParameters;const o=n.toJSON(),{bandIds:l,noData:u}=o;let{renderingRule:p}=o;const c=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,d=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(l?.length&&this._hasRasterFunction(this.rasterFunction)&&!c&&d){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFunctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){const t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;o.bandIds=void 0}else o.bandIds=l?.join(",");Array.isArray(u)&&u.length>0&&(o.noData=u.join(","));const y=this._processMultidimensionalIntersection(null,s,n.mosaicRule);if(y.isOutSide)return null;o.mosaicRule=null!=y.mosaicRule?JSON.stringify(y.mosaicRule):null,s=y.timeExtent,o.renderingRule=this._getRenderingRuleString(_.A.fromJSON(p));const g={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?g.time=""+e:null==e&&null==t||(g.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:a,imageSR:a,size:t+","+i,...o,...g}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new v.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,w.o8)(e);const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=(0,b.PZ)(wt.A,t),s=r.toJSON();Ot(s),s.outFields?.length&&(s.outFields=s.outFields.join(","));const n=await(0,ye.el)(r.geometry),a=n?.[0];null!=a&&(s.geometry=Jt(a));const o=(0,ge.Dl)(e),l=(0,ge.lF)({...o.query,f:"json",...s}),u=(0,ge.jV)(l,i),{data:p}=await(0,f.A)(`${o.path}/getSamples`,u),c=p.samples.map(e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map(e=>Number(e));return{...e,pixelValue:t}});return Rt.A.fromJSON({samples:c})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new v.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,w.o8)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=I.A.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new v.A("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),r&&null==e.raster&&(e.raster=r),Vt(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new v.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(bt,t),s=r.toJSON();r.geometry.spatialReference.imageCoordinateSystem&&(s.geometry=Jt(r.geometry)),r.depthOffset&&r.adjust||delete s.options;const n=(0,ge.Dl)(e),a=(0,ge.lF)({...n.query,f:"json",...s}),o=(0,ge.jV)(a,i),{data:l}=await(0,f.A)(`${n.path}/imageToMap`,o);return(0,de.rS)(l)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new v.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(Ct,t),s=r.toJSON();r.rasterIds?.length&&(s.rasterIds=r.rasterIds.join(","));const n=(0,ge.Dl)(e),a=(0,ge.lF)({...n.query,f:"json",...s}),o=(0,ge.jV)(a,i),{data:l}=await(0,f.A)(`${n.path}/imageToMapMultiray`,o);return(0,de.rS)(l)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new v.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(Pt,t),s=r.toJSON(),n=await(0,ye.el)(r.geometry),a=n?.[0];null!=a&&(s.geometry=Jt(a)),r.visibleOnly||delete s.options;const o=a?.spatialReference??r.geometry?.spatialReference;o&&(s.inSR=zt(o));const l=(0,ge.Dl)(e),u=(0,ge.lF)({...l.query,f:"json",...s}),p=(0,ge.jV)(u,i),{data:c}=await(0,f.A)(`${l.path}/mapToImage`,p);return(0,de.rS)(c)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new v.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(fe,t),s=r.toJSON(),n=await(0,ye.el)([r.fromGeometry,r.toGeometry]);null!=n[0]&&(s.fromGeometry=Jt(n[0]),n[0].spatialReference&&(s.inSR=zt(n[0].spatialReference))),null!=n[1]&&(s.toGeometry=Jt(n[1])),r.objectIds?.length&&(s.objectIds=s.objectIds.join(","));const a=(0,ge.Dl)(e),o=(0,ge.lF)({...a.query,f:"json",...s}),l=(0,ge.jV)(o,i),{data:u}=await(0,f.A)(`${a.path}/find`,l);return Ce.fromJSON(u)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new v.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return async function(e,t,i){const r=(0,b.PZ)(St,t).toJSON(),s=(0,ge.Dl)(e),n=(0,ge.lF)({...s.query,f:"json",...r}),a=(0,ge.jV)(n,i),{data:o}=await(0,f.A)(`${s.path}/getImageUrl`,a);return xt.fromJSON(o)}(r(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new kt.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new v.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},async function(e,t,i){const r=(0,b.PZ)(ze,t),s=(0,ge.Dl)(e),n=r.toJSON();r.outSpatialReference&&(n.outSR=zt(r.outSpatialReference));const a=(0,ge.lF)({...s.query,f:"json",...n}),o=(0,ge.jV)(a,i),{data:l}=await(0,f.A)(s.path+"/queryBoundary",o);return $e.fromJSON(l)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async queryExtent(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Kt.L)(this.url,e,t)}async queryRasters(e,t){({query:e,requestOptions:t}=await this._prepareForQuery(e,t));const i=await(0,Qt.s)(this.url,e,t),r=this.graphicOrigin;return i.features.forEach(e=>{e.layer=this,e.origin=r}),i}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Bt.V)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new v.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},async function(e,t,i){const r=(0,b.PZ)(Ye,t),s=r.toJSON();Ot(s),s.objectIds?.length&&(s.objectIds=s.objectIds.join(",")),s.geometry||s.objectIds||s.time||s.where||(s.where="1=1");const n=await(0,ye.el)(r.geometry),a=n?.[0];null!=a&&(s.geometry=Jt(a));const o=a?.spatialReference??r.geometry?.spatialReference;o&&(s.inSR=zt(o));const l=(0,ge.Dl)(e),u=(0,ge.lF)({...l.query,f:"json",...s}),p=(0,ge.jV)(u,i),{data:c}=await(0,f.A)(`${l.path}/queryGPSInfo`,p);return st.fromJSON(c)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Lt.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new v.A("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,o=null,l=null;const u=le.F_.servicePixelValue.toLowerCase(),p=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some(e=>!e.toLowerCase().startsWith(u)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(u)&&e.length>u.length).map(e=>{const t=e.slice(u.length+1);return[this._updateRenderingRulesFunctionName(t,p),t]});o=t.map(e=>new _.A({functionName:e[0]})),l=t.map(e=>e[1]);const{rasterFunction:i}=this;0===o.length?i?.functionName?(o.push(i),l.push(i.functionName)):o=null:i?.functionName&&!o.some(e=>e.functionName===i.functionName)&&(o.push(i),l.push(i.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let d=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:i}=(0,A.Rp)(m,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new v.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(d=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=I.A.fromExtent(g));const h=this._getQueryParams({geometry:g,timeExtent:d,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:o,pixelSize:i,returnCatalogItems:a,returnGeometry:c,raster:this.raster,maxItemCount:s?1:null});delete h.f;const f=new pt(h);try{await this._generateRasterInfo(this.rasterFunction);const i=await Vt(this.url,f,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,o=null!=i.value&&i.value.toLowerCase().includes("nodata"),u=a&&!c&&i?.catalogItems?.features.length&&(n||!o),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?(0,A.XU)({rasterInfo:this.rasterInfo,multidimensionalDefinition:y?.multidimensionalDefinition,timeExtent:d,multidimensionalSubset:this.multidimensionalSubset}):null;if(!u)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p});const m=this.objectIdField||"ObjectId",g=i.catalogItems?.features??[],h=g.map(e=>e.attributes?.[m]),v=new kt.A({objectIds:h,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[m]}),w=await this.queryRasters(v);return w?.features?.length&&w.features.forEach(t=>{g.forEach(i=>{i.attributes[m]===t.attributes[m]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new v.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const i=(0,f.A)(r(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=(0,f.A)(r(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([i,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,A.z2)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Ut.Tw)(r(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,Ut.E9)(e,t),e)),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([i,s,n]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),o.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,R.wB)(()=>this.rasterFunction,e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then(e=>{e&&(this.rasterInfo=e)})})]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)})}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const a=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),o=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==o||null==l||o===l,p=u?[o||l]:[[o,l]],c=this.version>=10.8;if(a.length)a.forEach(e=>{e.dimensionName===n&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))});else if(!c){const t=e.multidimensionalDefinition.filter(e=>null!=e.variableName&&null==e.dimensionName);t.length?t.forEach(e=>{e.dimensionName=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new j.A({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter(e=>!(!e.variableName&&!e.dimensionName)),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new v.A("imagery-layer:query-rasters","query operation is not supported on the input image service");const i=null!=e?(0,b.PZ)(kt.A,e):this.createQuery();return t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:i,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,pe.fp)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:i,ssl:s}=await(0,f.A)(r(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=i,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new v.A("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=(0,pe.I8)({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&i.bandCount>=3){const e=r?.bandIds??(0,pe.ci)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=r?.renderer??(0,pe.PD)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=(0,pe.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=i):this.symbolizer=new ce.A({rendererJSON:s,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):(0,D.D)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const i=await(0,f.A)(r(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return i.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,returnImageBitmap:s,signal:n}=e;if(i&&this._canRequestImageElement(t.format)){const i=`${r(this.parsedUrl)}/exportImage`,{data:a}=await(0,f.A)(i,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return a instanceof Blob?{imageBitmap:await(0,ne.m)(a,i,n),params:t}:{imageOrCanvasElement:a,params:t}}const a=this._initJobHandler(),o=(0,f.A)(r(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),l=(await Promise.all([o,a]))[0].data,u=t.format||"jpgpng";let p=u;if("bsq"!==p&&"bip"!==p&&(p=(0,D.g)(l)),!p)throw new v.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:n},m="gif"===u||"bmp"===u||u.includes("png")&&("png"===p||"jpg"===p)?(0,D.D)(l,{useCanvas:!0,...t},c):this._decodePixelBlock(l,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:u},c);return{pixelData:{pixelBlock:await m,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,A.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new Y.A;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach(e=>e.variableName=""),t=t.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:s,returnDomainValues:n,templateFields:a}=t,o=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map(e=>e.replaceAll(/ /gi,", "))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!l&&(!c||s)){const e={};e[p]=0,u=[i],l=[new h.A({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,le.eS)(this.rasterFields,e,t.effectiveMultidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,a),c&&!s&&(l=[]);const{itemPixelValue:d,servicePixelValue:y}=le.F_,g=this.rasterFields.some(e=>e.name===d),f=this.graphicOrigin;for(let e=0;e<l.length;e++){const t=l[e];if(null!=i){const n=u[e],a=this.rasterFunction&&o&&o.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?o[r.indexOf(this.rasterFunction.functionName)]:i;if("nodata"===n.toLowerCase()&&!s)continue;g&&(t.attributes[d]=n),t.attributes[y]=a,this._updateFeatureWithMagDirValues(t,n);const l=this.fields&&this.fields.length>0;let p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:i:a;this.rasterFunction||(p=l?n:i),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,t.origin=f,n&&this._updateFeatureWithDomainValues(t),r&&o&&r.length===o.length)for(let e=0;e<r.length;e++){const i=`${le.F_.servicePixelValue}.${r[e]}`;t.attributes[i]=o[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=(0,A.Rp)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,A.Rp)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const a=r.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));a&&a[0]&&s.forEach(t=>{const i=le.ER+t.name;e.attributes[i]=a[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map(e=>parseFloat(e)),r=i.map(e=>[e]),s=i.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new oe.A({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new x.A(0,0,0,0,this.spatialReference)});const a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,P.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[le.F_.magnitude]=a[0],e.attributes[le.F_.direction]=a[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>"coded-value"===e.domain?.type);null!=t&&t.forEach(t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find(e=>e.code===i);r&&(e.attributes[t.name]=r.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach(e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}})}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:i,maxRecordCount:r}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),o=t.includes("edit"),l=t.includes("mensuration")&&a,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),c=this._isMosaicDataset(e)&&t.includes("catalog"),m=t.includes("download"),d=i>=10.7&&n||i>=11.4&&(n||l&&u.includes("3d")),y=c&&e.fields&&e.fields.length>0,g=y&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:i>=11.2&&c,supportsImageToMapMultiray:i>=11.2&&c,supportsMapToImage:i>=11.2&&c,supportsFindImages:i>=11.2&&c,supportsGetImageUrl:i>=11.3&&m,supportsMeasure:l,supportsMeasureFromImage:i>=11.2,supportsDownload:m,supportsQuery:y,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:d,supportsComputePixelLocation:i>=10.7&&c,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&c,supportsAdd:o,supportsDelete:o,supportsEditing:o,supportsUpdate:o,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:r,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,supportsStatistics:!!g?.supportsStatistics,supportsOrderBy:!!g?.supportsOrderBy,supportsDistinct:!!g?.supportsDistinct,supportsPagination:!!g?.supportsPagination,supportsPaginationOnAggregatedQueries:!!g?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!g?.useStandardizedQueries,supportsPercentileStatistics:!!g?.supportsPercentileStatistics,supportsCentroid:!!g?.supportsReturningGeometryCentroid,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!!g?.supportsQueryWithDistance,supportsExtent:!!g?.supportsReturningQueryExtent,supportsGeometryProperties:!!g?.supportsReturningGeometryProperties,supportsHavingClause:!!g?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:g?.supportsSqlExpression??!!g,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!g?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function r(e){return e?.path??""}return(0,s.Cg)([(0,p.MZ)({clonable:!1})],i.prototype,"_functionRasterInfos",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"_serviceSupportsMosaicRule",void 0),(0,s.Cg)([(0,Ue.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],i.prototype,"readServiceSupportsMosaicRule",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"_rasterFunctionNamesIndex",null),(0,s.Cg)([(0,p.MZ)()],i.prototype,"adjustAspectRatio",void 0),(0,s.Cg)([(0,p.MZ)({type:[b.jz],json:{write:!0}})],i.prototype,"bandIds",void 0),(0,s.Cg)([(0,Ue.w)("bandIds")],i.prototype,"readBandIds",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],i.prototype,"capabilities",void 0),(0,s.Cg)([(0,Ue.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],i.prototype,"readCapabilities",null),(0,s.Cg)([(0,p.MZ)({type:Number})],i.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,te.K)("compressionQuality")],i.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,p.MZ)({type:Number})],i.prototype,"compressionTolerance",void 0),(0,s.Cg)([(0,te.K)("compressionTolerance")],i.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"defaultMosaicRule",void 0),(0,s.Cg)([(0,Ue.w)("defaultMosaicRule",["defaultMosaicMethod"])],i.prototype,"readDefaultMosaicRule",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],i.prototype,"definitionExpression",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,constructOnly:!0})],i.prototype,"exportImageServiceParameters",void 0),(0,s.Cg)([(0,p.MZ)()],i.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,type:[re.A]})],i.prototype,"fields",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"fieldsIndex",null),(0,s.Cg)([(0,p.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],i.prototype,"format",null),(0,s.Cg)([(0,Ue.w)("service","format",["serviceDataType"])],i.prototype,"readFormat",null),(0,s.Cg)([(0,p.MZ)({type:x.A})],i.prototype,"fullExtent",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"hasMultidimensions",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"maxImageHeight"}}})],i.prototype,"imageMaxHeight",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"maxImageWidth"}}})],i.prototype,"imageMaxWidth",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{type:ee.SZ.jsonValues,read:ee.SZ.read,write:ee.SZ.write}})],i.prototype,"interpolation",void 0),(0,s.Cg)([(0,p.MZ)()],i.prototype,"minScale",void 0),(0,s.Cg)([(0,Ue.w)("service","minScale")],i.prototype,"readMinScale",null),(0,s.Cg)([(0,p.MZ)()],i.prototype,"maxScale",void 0),(0,s.Cg)([(0,Ue.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,s.Cg)([(0,p.MZ)({type:Y.A})],i.prototype,"mosaicRule",null),(0,s.Cg)([(0,Ue.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],i.prototype,"readMosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],i.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,p.MZ)()],i.prototype,"multidimensionalInfo",void 0),(0,s.Cg)([(0,p.MZ)({type:ae.A,json:{write:!0}})],i.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,p.MZ)({json:{type:b.jz}})],i.prototype,"noData",void 0),(0,s.Cg)([(0,te.K)("noData")],i.prototype,"writeNoData",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{type:ee.hm.jsonValues,read:ee.hm.read,write:ee.hm.write}})],i.prototype,"noDataInterpretation",void 0),(0,s.Cg)([(0,p.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],i.prototype,"objectIdField",void 0),(0,s.Cg)([(0,Ue.w)("objectIdField")],i.prototype,"readObjectIdField",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"geometryType",void 0),(0,s.Cg)([(0,p.MZ)({})],i.prototype,"typeIdField",void 0),(0,s.Cg)([(0,p.MZ)({})],i.prototype,"types",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"parsedUrl",null),(0,s.Cg)([(0,p.MZ)({type:Function})],i.prototype,"pixelFilter",void 0),(0,s.Cg)([(0,p.MZ)()],i.prototype,"raster",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"sourceType",void 0),(0,s.Cg)([(0,Ue.w)("sourceType",["serviceSourceType","fields"])],i.prototype,"readSourceType",null),(0,s.Cg)([(0,p.MZ)()],i.prototype,"viewId",void 0),(0,s.Cg)([(0,p.MZ)({types:me.uy})],i.prototype,"renderer",null),(0,s.Cg)([(0,p.MZ)({types:me.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:me.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],i.prototype,"internalRenderer",null),(0,s.Cg)([(0,Ue.w)("internalRenderer")],i.prototype,"readRenderer",null),(0,s.Cg)([(0,te.K)("internalRenderer")],i.prototype,"writeRenderer",null),(0,s.Cg)([(0,p.MZ)({clonable:!1})],i.prototype,"symbolizer",void 0),(0,s.Cg)([(0,p.MZ)(T.ke)],i.prototype,"opacity",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"rasterFields",null),(0,s.Cg)([(0,p.MZ)({constructOnly:!0})],i.prototype,"rasterFunctionInfos",void 0),(0,s.Cg)([(0,p.MZ)({type:_.A,json:{name:"renderingRule"}})],i.prototype,"rasterFunction",null),(0,s.Cg)([(0,Ue.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],i.prototype,"readRasterFunction",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"serviceDataType",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,type:M.A})],i.prototype,"spatialReference",void 0),(0,s.Cg)([(0,Ue.w)("spatialReference",["spatialReference","extent"])],i.prototype,"readSpatialReference",null),(0,s.Cg)([(0,p.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,type:ee.e8.jsonValues}})],i.prototype,"pixelType",void 0),(0,s.Cg)([(0,te.K)("pixelType")],i.prototype,"writePixelType",null),(0,s.Cg)([(0,p.MZ)({constructOnly:!0,type:ue.A})],i.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,p.MZ)()],i.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,p.MZ)(T.OZ)],i.prototype,"url",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],i.prototype,"version",void 0),(0,s.Cg)([(0,Ue.w)("version",["currentVersion","fields","timeInfo"])],i.prototype,"readVersion",null),i=(0,s.Cg)([(0,p.$K)("esri.layers.mixins.ArcGISImageService")],i),i};var Yt=i(18768),ei=i(63074),ti=i(69208),ii=i(16131),ri=i(8303),si=i(72545),ni=i(56551),ai=i(54310),oi=i(25036),li=i(82935),ui=i(91908),pi=i(24212),ci=i(30291),mi=i(88625),di=i(59923);let yi=class extends((0,ei.dM)((0,li.e)((0,oi.j)((0,ii.q)((0,ri.A)((0,ni.H)(Xt((0,si.G)((0,ai.J)((0,ti.d)((0,Yt.b)((0,l.M)((0,a.OU)(g.A)))))))))))))){constructor(...e){super(...e),this.graphicOrigin=new y(this),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.type="imagery",this._debouncedSaveOperations=(0,u.sg)(async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case 0:return s(this,t);case 1: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(u.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}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)}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:t}=this,i=new Set,r=le.F_.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=le.Oo.toLowerCase(),a=`${le.F_.servicePixelValue.toLowerCase()}.`;for(const e of t){const t=e.name.toLowerCase();t===r||t.startsWith(a)||s&&t.startsWith(n)||i.add(e.name)}const o=(0,ci.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:l}=this;return o?.fieldInfos&&l&&(0,le.h4)(o.fieldInfos,l),o}queryFeatures(e,t){return this.queryRasters(e,t).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}serviceSupportsSpatialReference(e){return(0,ui.D)(this,e)}write(e,t){return this._isPreviewLayer?((0,di.U4)(t,this,"preview layer cannot be saved"),null):super.write(e,t)}_validateElevationInfo(e){(0,pi.XF)(o.A.getLogger(this),(0,pi.$7)("Imagery layers","relative-to-scene",e)),(0,pi.XF)(o.A.getLogger(this),(0,pi.tW)("Imagery layers",e))}};(0,s.Cg)([(0,p.MZ)({type:mi.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],yi.prototype,"elevationInfo",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0,clonable:!1})],yi.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,p.MZ)(T.fV)],yi.prototype,"legendEnabled",null),(0,s.Cg)([(0,p.MZ)({type:["show","hide"]})],yi.prototype,"listMode",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],yi.prototype,"isReference",void 0),(0,s.Cg)([(0,p.MZ)({type:["ArcGISImageServiceLayer"]})],yi.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,p.MZ)(T.M6)],yi.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,p.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],yi.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],yi.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,p.MZ)(T.PY)],yi.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],yi.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],yi.prototype,"_isPreviewLayer",null),yi=(0,s.Cg)([(0,p.$K)("esri.layers.ImageryLayer")],yi);const gi=yi},18768(e,t,i){i.d(t,{b:()=>o});var r=i(5482),s=i(53966),n=i(91429),a=i(60694);const o=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],i),i}},56551(e,t,i){i.d(t,{H:()=>c});var r=i(5482),s=i(91429),n=i(69540),a=i(25482),o=i(56507),l=i(94359),u=i(93223);let p=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],p.prototype,"method",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"value",void 0),(0,r.Cg)([(0,s.MZ)({type:[o.jz],json:{write:{isRequired:!0}}})],p.prototype,"bandIds",void 0),(0,r.Cg)([(0,s.MZ)({types:l.uy,json:{write:!0,origins:{"web-scene":{types:l.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],p.prototype,"renderer",void 0),p=(0,r.Cg)([(0,s.$K)("esri.renderers.support.RasterPresetRenderer")],p);const c=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,r.Cg)([(0,s.MZ)({type:[p],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},33446(e,t,i){i.d(t,{C:()=>a,m:()=>n});var r=i(49186),s=i(17676);async function n(e,t,i){let n;try{n=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(i),n}async function a(e,t,i,n,a){let o;try{o=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load tile ${t}/${i}/${n}`,{error:e,level:t,row:i,col:n})}return(0,s.Te)(a),o}},91908(e,t,i){i.d(t,{D:()=>n});var r=i(60694);const s=[];function n(e,t){if((0,r.Wo)(e.url??""))return!0;const{wkid:i}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},82371(e,t,i){i.d(t,{E9:()=>y,Tw:()=>m,X6:()=>d});var r=i(11254),s=i(5443),n=i(86738),a=i(16930),o=i(87186),l=i(20223),u=i(2272),p=i(22671);async function c(e,t,i){const c=(0,u.Dl)(e),{rasterFunction:m,sourceJSON:d}=t||{},y=m?JSON.stringify(m.rasterFunctionDefinition||m):null,g=(0,u.lF)({...c.query,renderingRule:y,f:"json"}),h=(0,u.jV)(g,i);e=c.path;const f=d||await(0,r.A)(e,h).then(e=>e.data),v=f.hasRasterAttributeTable?(0,r.A)(`${e}/rasterAttributeTable`,h):null,w=f.hasColormap?(0,r.A)(`${e}/colormap`,h):null,R=f.hasHistograms?(0,r.A)(`${e}/histograms`,h):null,C=f.currentVersion>=10.3?(0,r.A)(`${e}/keyProperties`,h):null,b=f.hasMultidimensions?(0,r.A)(`${e}/multidimensionalInfo`,h):null,S=f.currentVersion>=10.81?(0,r.A)(`${e}/statistics`,h):null,x=await Promise.allSettled([v,w,R,C,b,S]),I=s.A.fromJSON(f.extent),M=Math.ceil(I.width/f.pixelSizeX-.1),F=Math.ceil(I.height/f.pixelSizeY-.1),A=a.A.fromJSON(f.spatialReference||f.extent.spatialReference),D="fulfilled"===x[0].status?x[0].value?.data:null,P=D?.features?.length?p.A.fromJSON(D):null,T="fulfilled"===x[1].status?x[1].value?.data.colormap:null,j=T?.length?T:null,N="fulfilled"===x[2].status?x[2].value?.data.histograms:null,Z=N?.[0]?.counts?.length?N:null,O="fulfilled"===x[3].status?x[3].value?.data??{}:{},_="fulfilled"===x[4].status?x[4].value?.data.multidimensionalInfo:null,V=_?.variables?.length?_:null;V&&V.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});let q=null;const E="fulfilled"===x[5].status?x[5].value?.data.statistics:null;if(E&&E.length===f.bandCount)q=E.map(e=>({avg:e.mean,count:e.count,max:e.max,median:e.median,min:e.min,mode:e.mode,stddev:e.standardDeviation,sum:e.sum}));else if(f.minValues&&f.minValues.length===f.bandCount){q=[];for(let e=0;e<f.minValues.length;e++)q.push({min:f.minValues[e],max:f.maxValues[e],avg:f.meanValues[e],stddev:f.stdvValues[e]})}const{defaultVariable:J,serviceDataType:G}=f;J&&J!==O.DefaultVariable&&(O.DefaultVariable=J),G?.includes("esriImageServiceDataTypeVector")&&!G.includes(O.DataType)&&(O.DataType=G.replace("esriImageServiceDataType",""));let z=f.noDataValue;f.noDataValues?.length&&f.noDataValues.some(e=>e!==z)&&(z=f.noDataValues);const U=f.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:f.extent.xmin,y:f.extent.ymax,spatialReference:A}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(M,F))/Math.LN2-8)),transposeInfo:f.transposeInfo}):void 0;return new o.A({width:M,height:F,bandCount:f.bandCount,extent:s.A.fromJSON(f.extent),spatialReference:A,pixelSize:new n.A({x:f.pixelSizeX,y:f.pixelSizeY,spatialReference:A}),pixelType:f.pixelType.toLowerCase(),statistics:q,attributeTable:P,colormap:j,histograms:Z,keyProperties:O,noDataValue:z,multidimensionalInfo:V,storageInfo:U})}function m(e,t,i){return c(e,{sourceJSON:t},i)}function d(e,t,i){return c(e,{rasterFunction:t},i)}function y(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},20615(e,t,i){i.d(t,{I:()=>a});var r=i(2272),s=i(80893),n=i(61956);function a(e,t,i,a){return(0,s.gW)((0,r.Dl)(e),n.A.from(t),i,a)}},74910(e,t,i){i.d(t,{L:()=>o});var r=i(5443),s=i(2272),n=i(80893),a=i(61956);async function o(e,t,i){const o=(0,s.Dl)(e),l=await(0,n.Jf)(o,a.A.from(t),{...i}),u=l.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.count,extent:null}:{count:l.count,extent:r.A.fromJSON(u)}}},78286(e,t,i){i.d(t,{V:()=>a});var r=i(2272),s=i(80893),n=i(61956);async function a(e,t,i,a){const o=(0,r.Dl)(e),l=await(0,s.Pk)(o,n.A.from(t),i,a);return l.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(l.uniqueIds)??[]}},99199(e,t,i){i.d(t,{e:()=>l,s:()=>o});var r=i(2272),s=i(80893),n=i(22671),a=i(61956);async function o(e,t,i,r){const s=await l(e,t,i,r);return n.A.fromJSON(s)}function l(e,t,i,n){const o=(0,r.Dl)(e),l={...i},u=a.A.from(t);return(0,s.eW)(o,u,u.sourceSpatialReference,l,n)}},58501(e,t,i){i.d(t,{q:()=>s});var r=i(62815);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(s)for(const e of i.features)s(e.geometry)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9062],{62815(e,t,n){n.d(t,{N:()=>l,d:()=>a});var o=n(86211),r=n(73941),s=n(21325),i=n(52006);function l(e,t,n){const o=a(t,n);if(1!==o)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const n of e.curvePaths)for(const e of n){const n=(0,i.yP)(e);n.length>2&&(n[2]*=t)}if(e.paths)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const n of e.curveRings)for(const e of n){const n=(0,i.yP)(e);n.length>2&&(n[2]*=t)}if(e.rings)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return}}function a(e,t){return null==e||null==t||(e.vcsWkid??null)!==(t.vcsWkid??null)||(0,s.aI)(e,t)||(0,r.xP)(e)||(0,r.xP)(t)?1:(0,o.G9)(e)/(0,o.G9)(t)}},96520(e,t,n){n.d(t,{u:()=>a});var o=n(86211),r=n(21325),s=n(52006);function i(e,t,n){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=n)}function l(e,t,n){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e){const e=(0,s.yP)(t);e.length>2&&(e[2]*=n)}}function a(e,t,n){if(!e&&!t||!n)return;const r=(0,o.G9)(n);f(e,n,r),f(t,n,r)}function f(e,t,n){if(e)for(const o of e)u(o.geometry,t,n)}function u(e,t,n){if(!e?.spatialReference||(0,r.aI)(e.spatialReference,t))return;const s=(0,o.G9)(e.spatialReference)/n;if(1!==s)if("x"in e)null!=e.z&&(e.z*=s);else if("curveRings"in e)l(e,e.curveRings,s);else if("curvePaths"in e)l(e,e.curvePaths,s);else if("rings"in e)i(e,e.rings,s);else if("paths"in e)i(e,e.paths,s);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=s)}},58501(e,t,n){n.d(t,{q:()=>r});var o=n(62815);function r(e,t,n){if(!n?.features||!n.hasZ)return;const r=(0,o.N)(n.geometryType,t,e.outSpatialReference);if(r)for(const e of n.features)r(e.geometry)}},22671(e,t,n){n.d(t,{A:()=>v});var o,r=n(5482),s=n(52106),i=n(66552),l=n(25482),a=n(4718),f=n(91429),u=n(16930),c=n(60408),p=n(65864),y=n(50498),h=n(20437),m=n(36005),g=n(43937);const d=new i.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=o=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,n,o){if(e)return void d.write(e,t,n,o);const{features:r}=this;if(r)for(const e of r)if(null!=e?.geometry)return void d.write(e.geometry.type,t,n,o)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,o=(0,p.rS)(e);return o&&!n&&t.spatialReference&&(o.spatialReference=u.A.fromJSON(t.spatialReference)),o}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new o(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let n=0;n<t.features.length;n++){const o=t.features[n];if(o.geometry){const t=e?.[n];o.geometry=t?.toJSON()||o.geometry}}return t}quantize(e){const{scale:[t,n],translate:[o,r]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-o)/t),e=>Math.round((r-e)/n));for(let e=0,t=s.length;e<t;e++)i?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[o,r],scale:[s,i]}=n;let l=null,a=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;l=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;a=n=>null==n?n:n*t+e}const f=this._getHydrationFunction(e,e=>e*s+o,e=>r-e*i,l,a);for(const{geometry:e}of t)null!=e&&f&&f(e);return this.transform=null,this}readFeaturesWithClass(e,t,n){const o=u.A.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const s=e[t],i=n.fromJSON(s),l=s.geometry?.spatialReference;null==i.geometry||l||(i.geometry.spatialReference=o);const a=s.aggregateGeometries,f=i.aggregateGeometries;if(a&&null!=f)for(const e in f){const t=f[e],n=a[e],r=n?.spatialReference;null==t||r||(t.spatialReference=o)}r.push(i)}return r}_quantizePoints(e,t,n){let o,r;const s=[];for(let i=0,l=e.length;i<l;i++){const l=e[i];if(i>0){const e=t(l[0]),i=n(l[1]);e===o&&i===r||(s.push([e-o,i-r]),o=e,r=i)}else o=t(l[0]),r=n(l[1]),s.push([o,r])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const o=(0,c.Bi)(e)?e.rings:e.paths,r=[];for(let e=0,s=o.length;e<s;e++){const s=o[e],i=this._quantizePoints(s,t,n);i&&r.push(i)}return r.length>0?((0,c.Bi)(e)?e.rings=r:e.paths=r,e):null}:"multipoint"===e?e=>{const o=this._quantizePoints(e.points,t,n);return o&&o.length>0?(e.points=o,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,o,r){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),o&&(e.z=o(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,c.Bi)(e)?e.rings:e.paths;let i,l;for(let e=0,o=s.length;e<o;e++){const o=s[e];for(let e=0,r=o.length;e<r;e++){const r=o[e];e>0?(i+=r[0],l+=r[1]):(i=r[0],l=r[1]),r[0]=t(i),r[1]=n(l)}}if(o&&r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2]),n[3]=r(n[3])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),o&&null!=e.zmax&&null!=e.zmin&&(e.zmax=o(e.zmax),e.zmin=o(e.zmin)),r&&null!=e.mmax&&null!=e.mmin&&(e.mmax=r(e.mmax),e.mmin=r(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let i,l;for(let e=0,o=s.length;e<o;e++){const o=s[e];e>0?(i+=o[0],l+=o[1]):(i=o[0],l=o[1]),o[0]=t(i),o[1]=n(l)}if(o&&r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2]),t[3]=r(t[3])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}}:null}};(0,r.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,r.Cg)([(0,f.MZ)({type:[s.A],json:{write:!0}})],v.prototype,"features",void 0),(0,r.Cg)([(0,m.w)("features")],v.prototype,"readFeatures",null),(0,r.Cg)([(0,f.MZ)({type:[h.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,r.Cg)([(0,f.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:d.read}}})],v.prototype,"geometryType",void 0),(0,r.Cg)([(0,g.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,r.Cg)([(0,f.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,r.Cg)([(0,f.MZ)({types:y.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,r.Cg)([(0,m.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,r.Cg)([(0,f.MZ)({type:u.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,r.Cg)([(0,g.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,r.Cg)([(0,f.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=o=(0,r.Cg)([(0,f.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7451],{38961(e,t,r){r.d(t,{A:()=>p});var i=r(5482),s=r(7762),n=r(36708),o=r(10107),a=r(64108),l=r(80559);let u=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,l.fm)(()=>this._refresh(),n.OH))}destroy(){this.getCollections=null}_refresh(){const e=this.getCollections?.();if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i.Cg)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i.Cg)([(0,a.$)("esri.core.CollectionFlattener")],u);const p=u},46140(e,t,r){r.d(t,{A:()=>s});var i=r(49186);class s{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new s(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),o=/^\s*\d+\s*$/;if(!r?.match||!o.test(r))throw new i.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!o.test(n))throw new i.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),l=parseInt(n,10);return new s(a,l,t)}}},6797(e,t,r){r.d(t,{Ui:()=>d});var i=r(69622),s=r(7762),n=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof s.A?Object.keys(e.items):a(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),s=l(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter(e=>!i.includes(e)),d=i.filter(e=>!s.includes(e)),y=i.filter(r=>s.includes(r)&&u(e,r)!==u(t,r)).concat(n,d).sort(),h=p(e);if(h&&o.has(h)&&y.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=a(e)&&a(t);for(const i of y){const s=u(e,i),n=u(t,i);let o;if((m||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&p(s)===p(n)?c(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=f?f.diff[i]=o:f={type:"partial",diff:{[i]:o}})}}return f}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},81583(e,t,r){r.d(t,{L:()=>a,g:()=>o});var i=r(60999),s=r(7762),n=r(92474);async function o(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],o=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?o(...t):s.A.isCollection(t)?t.forEach(e=>o(e)):(0,n.Zm)(t)&&r.push(t))};t(o);let a=null;if(await(0,i.Tj)(r,async e=>{const t=await(0,i.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)}),a)throw a.error;return e}},62815(e,t,r){r.d(t,{N:()=>a,d:()=>l});var i=r(86211),s=r(73941),n=r(21325),o=r(52006);function a(e,t,r){const i=l(t,r);if(1!==i)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,i);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const r of e.curvePaths)for(const e of r){const r=(0,o.yP)(e);r.length>2&&(r[2]*=t)}if(e.paths)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}}(e,i);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const r of e.curveRings)for(const e of r){const r=(0,o.yP)(e);r.length>2&&(r[2]*=t)}if(e.rings)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}}(e,i);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,i);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,i);default:return}}function l(e,t){return null==e||null==t||(e.vcsWkid??null)!==(t.vcsWkid??null)||(0,n.aI)(e,t)||(0,s.xP)(e)||(0,s.xP)(t)?1:(0,i.G9)(e)/(0,i.G9)(t)}},64314(e,t,r){r.d(t,{A:()=>C});var i=r(5482),s=r(69622),n=r(49186),o=r(44208),a=r(17676),l=r(84952),u=r(91429),p=r(21325),c=r(20557),d=r(2272),y=r(65615),h=r(20615),f=r(74910),m=r(78286),g=r(99199),b=r(62815),w=r(63746);class v{constructor(e){this._options=e,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=v._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e&&(this.featureSet.objectIdFieldName=e)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:e,features:t}=this.featureSet;if(e)for(const{geometry:r}of t)r&&(r.spatialReference=e)}feature(){this._attributesClass??=(0,w._7)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([e,t]){this.featureSet.features.at(-1).centroid={x:e,y:t}}geometry(e,t,r){this._previousX=this._previousY=0,this._lengths=r;let i,{hasZ:s,hasM:n}=this.featureSet;switch(s??=!1,n??=!1,this._i=0,this._vertex=[0,0],s&&this._vertex.push(0),n&&this._vertex.push(0),this._finishVertex=v._finishVertexNonPoint,t){case"esriGeometryPoint":this._point={x:0,y:0},i=this._point,this._finishVertex=s?n?v._finishVertexPointXYZM:v._finishVertexPointXYZ:n?v._finishVertexPointXYM:v._finishVertexPointXY;break;case"esriGeometryMultipoint":i={points:[],hasZ:s,hasM:n},this._part=i.points,this._parts=[];break;case"esriGeometryPolyline":i={paths:[],hasZ:s,hasM:n},this._parts=i.paths,this._part=[];break;case"esriGeometryPolygon":i={rings:[],hasZ:s,hasM:n},this._parts=i.rings,this._part=[]}1===e?(this.featureSet.queryGeometry=i,this.featureSet.queryGeometryType=t,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=i}coord(e){const t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,this._transformInPlace&&(t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._transformInPlace(t)),this._finishVertex(this))}curvedGeometry(e,t,r,i){let s,{hasZ:n,hasM:o}=this.featureSet;switch(n??=!1,o??=!1,e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`);case"esriGeometryPolyline":s={paths:[],curvePaths:[],hasZ:n,hasM:o},this._parts=s.curvePaths,this._part=[];break;case"esriGeometryPolygon":s={rings:[],curveRings:[],hasZ:n,hasM:o},this._parts=s.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=s}startCurvedPart(e){this._part.push(this._transform(e))}finishCurvedPart(e){this._parts.push(this._part),this._part=[]}lineSegment(e,t){this._part.push(this._transform(t))}bezierSegment(e,t,r,i){this._part.push({b:[this._transform(t),this._transformXY(r),this._transformXY(i)]})}circularArcSegment(e,t,r){this._part.push({c:[this._transform(t),this._transformXY(r)]})}ellipticArcSegment(e,t,r,i,s,n,o,a){this._part.push({a:[this._transform(t),this._transformXY(r),i,s,n,o,a]})}static _finishVertexPointXY({_point:e,_vertex:t}){[e.x,e.y]=t}static _finishVertexPointXYZ({_point:e,_vertex:t}){[e.x,e.y,e.z]=t}static _finishVertexPointXYM({_point:e,_vertex:t}){[e.x,e.y,e.m]=t}static _finishVertexPointXYZM({_point:e,_vertex:t}){[e.x,e.y,e.z,e.m]=t}static _finishVertexNonPoint(e){const{_part:t,_parts:r,_lengths:i,_vertex:s}=e;t.push([...s]),t.length<i[r.length]||(e._previousX=e._previousY=0,e._part=[],r.push(t))}_setVertexTransformer(){const{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:r,transform:i}=this.featureSet,s=r?(0,b.d)(e,t):1;this._transformInPlace??=(0,w.Mv)(this.featureSet,s),this._transformInPlaceXY??=(0,w.Mv)({transform:i})}_transform(e){const t=[...e];return this._transformInPlace?.(t),t}_transformXY(e){const t=[e[0],e[1]];return this._transformInPlaceXY?.(t),t}}var S=r(80893),_=r(22671),x=r(61956);async function I(e,t,r,i){const s=(0,d.Dl)(e),n={...r},o=x.A.from(t),a=!o.quantizationParameters;return await(0,S.IJ)(s,o,new v({sourceSpatialReference:o.sourceSpatialReference,applyTransform:a}),n,i)}let C=class extends s.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,l.An)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],s=(0,o.A)("featurelayer-pbf-statistics");let n;if(this.pbfSupported&&(!i||s)&&(!e.returnTrueCurves||this.pbfSupportedWithCurves))try{n=await I(this.url,r,t,{uniqueIdFields:this.uniqueIdFields})}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return n??=await(0,g.e)(this.url,r,t,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(n.fields),n}async featureSetFromJSON(e,t,i){if(!this._queryGet3DObjectFormat(e)||null==this.infoFor3D||!t.features)return _.A.fromJSON(t);const{meshFeatureSetFromJSON:s}=await(0,a.qr)(Promise.all([r.e(6860),r.e(36),r.e(8366)]).then(r.bind(r,40050)),i);return s(e,this.infoFor3D,t)}executeForCount(e,t){return(0,h.I)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(e,t){return(0,f.L)(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,m.V)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(e,t){const[{default:i},{executeRelationshipQuery:s}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),t);let n=i.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(n=n.clone(),n.gdbVersion=n.gdbVersion||this.gdbVersion,n.dynamicDataSource=n.dynamicDataSource||this.dynamicDataSource),s(this.url,n,t)}async executeRelationshipQueryForCount(e,t){const[{default:i},{executeRelationshipQueryForCount:s}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),t);let n=i.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(n=n.clone(),n.gdbVersion=n.gdbVersion||this.gdbVersion,n.dynamicDataSource=n.dynamicDataSource||this.dynamicDataSource),s(this.url,n,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:i,fetchAttachments:s,processAttachmentQueryResult:n}=await(0,a.qr)(r.e(9239).then(r.bind(r,9239)),t),o=(0,d.Dl)(this.url);return n(o,await(this.queryAttachmentsSupported?i(o,e,t):s(o,e,t)))}async executeAttributeBinsQuery(e,t){const{executeAttributeBinsQuery:i}=await(0,a.qr)(r.e(3103).then(r.bind(r,33103)),t);return i(this.parsedUrl,e,t)}async executePivotQuery(e,t){const{executePivotQuery:i}=await(0,a.qr)(r.e(566).then(r.bind(r,80566)),t);return i(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:i}=await(0,a.qr)(r.e(1273).then(r.bind(r,11273)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:i}=await(0,a.qr)(r.e(1277).then(r.bind(r,21277)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:i}=await(0,a.qr)(r.e(8018).then(r.bind(r,8018)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:i}=await(0,a.qr)(r.e(980).then(r.bind(r,10980)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=x.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?y.A.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this,i=this._queryGet3DObjectFormat(e);if(null!=r&&i){if(t=t===e?t.clone():t,t.formatOf3DObjects=i,t.outSpatialReference&&!(0,p.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new n.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:i,originY:s,originZ:n,translationX:o,translationY:a,translationZ:l,scaleX:u,scaleY:p,scaleZ:c,rotationX:d,rotationY:y,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,s,n,o,a,l,u,p,c,d,y,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryGet3DObjectFormat({returnGeometry:e,multipatchOption:t,outStatistics:r}){return!0!==e||"xyFootprint"===t||r?null:(0,c.Hz)(this.infoFor3D)}};(0,i.Cg)([(0,u.MZ)({type:y.A})],C.prototype,"dynamicDataSource",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"gdbVersion",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"infoFor3D",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],C.prototype,"parsedUrl",null),(0,i.Cg)([(0,u.MZ)()],C.prototype,"pbfSupported",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"pbfSupportedWithCurves",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"queryAttachmentsSupported",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"relativeTimeBinWindow",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"sourceSpatialReference",void 0),(0,i.Cg)([(0,u.MZ)()],C.prototype,"uniqueIdFields",void 0),(0,i.Cg)([(0,u.MZ)({type:String})],C.prototype,"url",void 0),C=(0,i.Cg)([(0,u.$K)("esri.layers.graphics.sources.support.QueryTask")],C)},52136(e,t,r){r.d(t,{p:()=>n});var i=r(5482),s=r(91429);const n=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.APIKeyMixin")],r),r}},98534(e,t,r){r.d(t,{V:()=>g});var i=r(5482),s=r(11254),n=r(5479),o=r(91869),a=r(17676),l=r(84952),u=r(46140),p=r(91429),c=r(5443),d=r(16930),y=r(60694),h=r(10873),f=r(10407),m=r(36005);const g=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,n=r.includes("query"),o=r.includes("map"),a=!!t.exportTilesAllowed,l=r.includes("tilemap"),p=r.includes("data"),c="tile"!==i&&(!t.tileInfo||s),d="tile"!==i&&(!t.tileInfo||s),y="tile"!==i,h="tile"!==i&&s&&t.currentVersion>=11.1,f=t.cimVersion?u.A.parse(t.cimVersion):null,m=f?.greaterEqual(1,4)??!1,g=f?.greaterEqual(2,0)??!1;return{operations:{supportsExportMap:o,supportsExportTiles:a,supportsIdentify:n,supportsQuery:p,supportsTileMap:l},exportMap:o?{supportsArcadeExpressionForLabeling:m,supportsCIMSymbols:g,supportsDynamicLayers:s,supportsSublayerOrderBy:h,supportsSublayerDefinitionExpression:d,supportsSublayerVisibility:c,supportsSublayersChanges:y}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,f.bK)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then(e=>e.find(e=>"Feature Service"===e.type)??null,()=>null));const r=await this._relatedFeatureServicePromise;return(0,a.Te)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,f.bK)(this.portalItem)&&e.originIdOf("url")<2){const i=await this.fetchRelatedService(t);i&&(e.url=(0,l.fj)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let n;if("data-layer"===r.type)n=(await(0,s.A)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else{let s=e.id;"map-layer"===r?.type&&(s=r.mapLayerId);try{n=(await this.fetchAllLayersAndTables(t)).get(s)}catch{}if(i&&e.originIdOf("url")>2)try{const e=await this._fetchAllLayersAndTablesFromService(i),t=(0,y.qg)(i)?.sublayer??r.mapLayerId,s=structuredClone(e.get(t));if(null!=s){const e=["drawingInfo","maxScale","minScale","name"];for(const t of e)delete s[t];n={...n,...s}}}catch{}}return n}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,y.qg)(e),i=(0,o.tE)(this._allLayersAndTablesMap,r?.url.path,()=>(0,s.A)((0,l.fj)(r?.url.path,"/layers"),{query:{f:"json",...this.customParameters,token:this.apiKey}}).then(async e=>{const t=new Map,{layers:i,tables:o}=e.data,a=[...i??[],...o??[]];for(const e of a)t.set(e.id,e);if((0,n.zN)(t.values(),e=>null==e.capabilities||null==e.extent)){const{data:e}=await(0,s.A)(r?.url.path,{query:{f:"json",...this.customParameters,token:this.apiKey}}).catch(()=>({data:{capabilities:"",fullExtent:void 0}}));for(const r of t.values())r.capabilities??=e.capabilities??"",r.extent??=e.fullExtent}return{result:t}},e=>({error:e}))),u=await i;if((0,a.Te)(t),"result"in u)return u.result;throw u.error}};return(0,i.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"capabilities",void 0),(0,i.Cg)([(0,m.w)("service","capabilities",["capabilities","cimVersion","currentVersion","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],r.prototype,"readCapabilities",null),(0,i.Cg)([(0,p.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,p.MZ)({type:c.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,p.MZ)(h.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],r.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)(h.M6)],r.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:d.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,m.w)("service","version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],r.prototype,"readVersion",null),r=(0,i.Cg)([(0,p.$K)("esri.layers.mixins.ArcGISMapService")],r),r}},32756(e,t,r){r.d(t,{Rr:()=>a,fY:()=>u,ne:()=>l});var i=r(5482),s=r(93637),n=r(91429),o=r(91880);function a(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const s=new o.A;return s.read(i,r),[s]}const l={type:[o.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const n=e.find(e=>!!e.field);n&&(0,s.sM)(r,[n.toJSON()],t)}}}},u=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,n.MZ)(l)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.OrderedLayer")],r),r}},91921(e,t,r){r.d(t,{I:()=>m});var i=r(5482),s=r(7762),n=r(38961),o=r(49186),a=r(53966),l=r(36708),u=r(91429),p=r(35666),c=r(88620),d=r(15775),y=r(63389);const h=s.A.ofType(d.A);function f(e,t){e&&e.forEach(e=>{t(e),e.sublayers&&e.sublayers.length&&f(e.sublayers,t)})}const m=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this.allSublayers=new n.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={2:{},3:{},4:{},5:{},6:{}},this.subtables=null,this.addHandles([(0,l.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),l.OH),(0,l.wB)(()=>this.subtables,(e,t)=>this._handleSublayersChange(e,t),l.OH)])}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,p.aB)(t.origin);if(i<2)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>2)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:n}=this.createSublayersForOrigin("web-document"),o=(0,c.oY)(this);o.setDefaultOrigin(n),this._set("sublayers",new h(s)),o.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find(t=>t.id===e)}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){let t;const r=(0,p.aB)("web-document"===e?"web-map":e);let i=2,s=this.sublayersSourceJSON[2].layers,n=this.sublayersSourceJSON[2].context,o=null;const a=[3,4,5].filter(e=>e<=r);for(const e of a){const t=this.sublayersSourceJSON[e];(0,y._X)(t.layers)&&(i=e,s=t.layers,n=t.context,t.visibleLayers&&(o={visibleLayers:t.visibleLayers,context:t.context}))}const l=[3,4,5].filter(e=>e>i&&e<=r);let u=null;for(const e of l){const{layers:r,visibleLayers:i,context:s}=this.sublayersSourceJSON[e];r&&(u={layers:r,context:s},t??=e),i&&(o={visibleLayers:i,context:s})}const c=function(e,t){const r=[],i={};return e?(e.forEach(e=>{const s=new d.A;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)}),r):r}(s,n),m=new Map,g=new Set;if(u)for(const e of u.layers)m.set(e.id,e);if(o?.visibleLayers)for(const e of o.visibleLayers)g.add(e);return f(c,e=>{u&&e.read(m.get(e.id),u.context),o&&e.read({defaultVisibility:g.has(e.id)},o.context)}),{origin:(0,p.OL)(i),originWithPartialOverrides:t?(0,p.OL)(t):null,sublayers:new h({items:c})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this,e.layer=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null})],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",e=>{a.A.getLogger("esri.layers.TileLayer").error(new o.A("tilelayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()}),"sublayers-owner"))}};return(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"allSublayers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0,type:s.A.ofType(d.A)})],r.prototype,"serviceSublayers",void 0),(0,i.Cg)([(0,u.MZ)({value:null,type:h,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],r.prototype,"sublayers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"sublayersSourceJSON",void 0),(0,i.Cg)([(0,u.MZ)({type:h,json:{read:{source:"tables"}}})],r.prototype,"subtables",void 0),r=(0,i.Cg)([(0,u.$K)("esri.layers.mixins.SublayersOwner")],r),r}},28032(e,t,r){r.d(t,{A:()=>l});var i=r(5482),s=r(69540),n=r(25482),o=r(91429),a=r(56400);let l=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,i.Cg)([(0,o.MZ)()],l.prototype,"creatorField",void 0),(0,i.Cg)([(0,o.MZ)()],l.prototype,"creationDateField",void 0),(0,i.Cg)([(0,o.MZ)()],l.prototype,"editorField",void 0),(0,i.Cg)([(0,o.MZ)()],l.prototype,"editDateField",void 0),(0,i.Cg)([(0,o.MZ)()],l.prototype,"realm",void 0),(0,i.Cg)([(0,o.MZ)((0,a.P6)("dateFieldsTimeReference",!0))],l.prototype,"timeZone",void 0),l=(0,i.Cg)([(0,o.$K)("esri.layers.support.EditFieldsInfo")],l)},29005(e,t,r){r.d(t,{A:()=>u});var i=r(5482),s=r(69540),n=r(66552),o=r(25482),a=r(91429);const l=new n.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,a.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>c});var i=r(5482),s=r(69540),n=r(25482),o=r(91429),a=r(8631),l=r(29005),u=r(36005),p=r(43937);let c=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,a.r)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],c.prototype,"readDomains",null),(0,i.Cg)([(0,p.K)("domains")],c.prototype,"writeDomains",null),(0,i.Cg)([(0,o.MZ)({type:[l.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i.Cg)([(0,o.$K)("esri.layers.support.FeatureType")],c)},37352(e,t,r){r.d(t,{A:()=>l});var i,s=r(5482),n=r(7762),o=r(25482),a=r(91429);let l=i=class extends o.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"floorField",void 0),(0,s.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllMode",void 0),(0,s.Cg)([(0,a.MZ)({json:{read:!1,write:!1}})],l.prototype,"viewAllLevelIds",void 0),l=i=(0,s.Cg)([(0,a.$K)("esri.layers.support.LayerFloorInfo")],l)},91880(e,t,r){r.d(t,{A:()=>u});var i,s=r(5482),n=r(66552),o=r(25482),a=r(91429);const l=new n.J({asc:"ascending",desc:"descending"});let u=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,s.Cg)([(0,a.MZ)({type:l.apiValues,json:{type:l.jsonValues,read:l.read,write:l.write}})],u.prototype,"order",void 0),u=i=(0,s.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],u)},45067(e,t,r){r.d(t,{A:()=>p});var i=r(5482),s=r(69540),n=r(66552),o=r(25482),a=r(91429);const l=new n.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new n.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let p=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,a.MZ)({json:{read:l.read,write:l.write}})],p.prototype,"cardinality",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"catalogID"}})],p.prototype,"catalogId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"composite",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyField",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!0,write:!0}})],p.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"role",void 0),p=(0,i.Cg)([(0,a.$K)("esri.layers.support.Relationship")],p)},15775(e,t,r){r.d(t,{A:()=>de});var i=r(5482),s=r(37838),n=r(11254),o=r(7762),a=r(49186),l=r(44208),u=r(4902),p=r(4718),c=r(92474),d=r(53966),y=r(25728),h=r(39516),f=r(84952),m=r(91429),g=r(56507),b=r(35666),w=r(88620),v=r(5443),S=r(16930),_=r(50498),x=r(89808),I=r(99959);const C=Symbol("isMapImageGraphicOriginSymbol");var A;class F extends I.A{get[(A=C,x.Q)](){return this.layer}constructor(e,t){super(),this[A]=!0,this.type="map-image",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}const T=Symbol("isTileGraphicOriginSymbol");var M;class O extends I.A{get[(M=T,x.Q)](){return this.layer}constructor(e,t){super(),this[M]=!0,this.type="tile",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var D,P=r(64314),Z=r(32756),j=r(28032),q=r(15426),E=r(33143),L=r(20437),R=r(95466),V=r(30524),N=r(46499),$=r(39383),k=r(37352),z=r(91880),B=r(45067),J=r(6666),Q=r(41214),G=r(2272),K=r(65615),Y=r(93849),U=r(54546),X=r(61956),W=r(30291),H=r(33910),ee=r(43440),te=r(36005),re=r(43937);function ie(e){return"esriSMS"===e?.type}function se(e,t,r){const i=r.minimumWritableOrigin||r.origin;return!!i&&e.originIdOf(t)>=(0,b.aB)(i)}function ne(e,t,r){const i=se(this,t,r);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function oe(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(se(this,t,r)||this._isOverridden(t))}}function ae(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function le(e,t,r){return{ignoreOrigin:!0,enabled:!!r?.writeSublayerStructure&&this.originIdOf(t)>2}}function ue(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||se(this,t,r))}}let pe=0;const ce=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let de=class extends((0,y.M)((0,u.s)(c.x_))){static{D=this}constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=void 0,this.editFieldsInfo=null,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this.uniqueIdFields=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise(this.reload(e)),this}readCapabilities(e,t){t=t.layerDefinition||t;const{attachment:r,operations:{supportsQuery:i,supportsQueryAttachments:s},query:{supportsFormatPBF:n,supportsOrderBy:o,supportsPagination:a,relativeTimeBinWindow:l},data:{supportsAttachment:u},queryRelated:p}=(0,J.S$)(t,this.url);return{attachment:{supportsOrderByFields:r?.supportsOrderByFields??!1,supportsResize:r?.supportsResize??!1,supportsTypeWildcard:r?.supportsTypeWildcard??!1},exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:i,supportsQueryAttachments:s},data:{supportsAttachment:u},query:{relativeTimeBinWindow:l,supportsFormatPBF:n,supportsOrderBy:o,supportsPagination:a},queryRelated:p}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new R.A(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get graphicOrigin(){if(!this.layer)return null;switch(this.layer.type){case"tile":return new O(this.layer,this);case"map-image":return new F(this.layer,this)}}get id(){return this._get("id")??pe++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,t){return"Table"===t.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map(e=>e.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach(t=>t.layer=e)}set listMode(e){this._set("listMode",e)}get loaded(){return super.loaded}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;const r=t.fields?.find(e=>"esriFieldTypeOID"===e.type);return r?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const{layerDefinition:r}=t;return 1-.01*(r?.transparency??r?.drawingInfo?.transparency??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,g.Vr)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:t,layer:r,uniqueIdFields:i,url:s}=this,{spatialReference:n}=r,o="gdbVersion"in r?r.gdbVersion:void 0,a=(0,l.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new P.A({fieldsIndex:t,gdbVersion:o,pbfSupported:a,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,relativeTimeBinWindow:e?.query?.relativeTimeBinWindow??0,sourceSpatialReference:n,uniqueIdFields:i,url:s})}set renderer(e){if((0,V.yp)(e,this.fieldsIndex),e)for(const t of e.symbols)if((0,H.wk)(t)){d.A.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new Y.A({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}get sublayers(){return this._get("sublayers")}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,g.dp)(o.A.ofType(D),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map(e=>e.id).toArray().reverse())}readTitle(e,t){return t.layerDefinition?.name??t.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}readUniqueIdFields(e,t){return t.layerDefinition?.uniqueIdInfo?.OIDFieldContainsHashValue?t.layerDefinition.uniqueIdInfo.fields:null}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,f.x0)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,w.oY)(this),t=new D;return(0,w.oY)(t).store=e.clone(ce),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,W.tn)(this,e)}createQuery(){return new X.A({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.sublayers)return null;const e=(await Promise.all([r.e(7632),r.e(9953),r.e(1017),r.e(6606),r.e(9784),r.e(7609),r.e(7694)]).then(r.bind(r,29784))).default,{layer:t,url:i}=this;let s;if(i&&this.originIdOf("url")>2)s=new e({url:i});else{if(!t?.parsedUrl)throw new a.A("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const r=t.parsedUrl;s=new e({url:r.path}),r&&this.source&&("map-layer"===this.source.type?s.layerId=this.source.mapLayerId:s.dynamicDataSource=this.source)}}return null!=t?.refreshInterval&&(s.refreshInterval=t.refreshInterval),this.definitionExpression&&(s.definitionExpression=this.definitionExpression),this.floorInfo&&(s.floorInfo=(0,p.o8)(this.floorInfo)),this.originIdOf("labelingInfo")>2&&(s.labelingInfo=(0,p.o8)(this.labelingInfo)),this.originIdOf("labelsVisible")>0&&(s.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>0&&(s.legendEnabled=this.legendEnabled),this.originIdOf("visible")>0&&(s.visible=this.visible),this.originIdOf("minScale")>0&&(s.minScale=this.minScale),this.originIdOf("maxScale")>0&&(s.maxScale=this.maxScale),this.originIdOf("opacity")>0&&(s.opacity=this.opacity),this.originIdOf("popupTemplate")>0&&(s.popupTemplate=(0,p.o8)(this.popupTemplate)),this.originIdOf("renderer")>2&&(s.renderer=(0,p.o8)(this.renderer)),"data-layer"===this.source?.type&&(s.dynamicDataSource=this.source.clone()),this.originIdOf("title")>0&&(s.title=this.title),"map-image"===t?.type&&t.originIdOf("customParameters")>0&&(s.customParameters=t.customParameters),"tile"===t?.type&&t.originIdOf("customParameters")>0&&(s.customParameters=t.customParameters),s}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return(0,q.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load();let r=U.A.from(e);const i=this.capabilities;if(!i?.data?.supportsAttachment)throw new a.A("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:s,objectIds:n,globalIds:o,num:l,size:u,start:p,where:c}=r;if(!i?.operations?.supportsQueryAttachments&&(s?.length>0||o?.length>0||u?.length>0||l||p||c))throw new a.A("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",r);if(!(n?.length||o?.length||c))throw new a.A("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",r);return!i?.attachment?.supportsOrderByFields&&r.orderByFields?.length&&(r=r.clone(),r.orderByFields=null),this.queryTask.executeAttachmentQuery(r,t)}async queryFeatureCount(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryFeatureCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features){const e=this.graphicOrigin;for(const t of r.features)t.sourceLayer=this,t.origin=e}return r}async queryObjectIds(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryObjectIds:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeatures(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryRelatedFeatures:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async reload(e){if("not-loaded"===this.loadStatus)return this.load(e).then(()=>{});const{layer:t,url:r}=this;if(!t&&!r)throw new a.A("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,n.A)(r,{query:{f:"json"},...e})).data;i&&(this.sourceJSON={...this.sourceJSON,...i},this.read({layerDefinition:i},{origin:"service",layer:t,url:(0,G.Dl)(r)}))}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,h.mA)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((e,t)=>(e[t]=this.originIdOf(t),e),{}),s=Object.keys(i).some(e=>i[e]>2);if(s){const e=t.drawingInfo={};if(i.renderer>2&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>2&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>2)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some(e=>!e.labelPlacement)&&d.A.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,$.z)(this.labelingInfo,_.gy.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter(e=>e.labelPlacement).map(e=>e.toJSON({origin:"service",layer:this.layer}))}else e.showLabels=!1;i.opacity>2&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>2&&(t.orderBy=this.orderBy?.map(e=>e.toJSON())??null),t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)ie(e.symbol)&&t(e.symbol);"symbol"in e&&ie(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&ie(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,n;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",n="supportsModification";break;case"orderBy":s="supportsSublayerOrderBy",n="supportsModification"}const o=(0,w.oY)(this).getDefaultOrigin();if("service"!==o){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(n&&!1===this.capabilities?.exportMap[n])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${n}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==o&&i!==t&&r?.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.removeAllHandles()),e&&(e.forEach(e=>{e.parent=this,e.layer=this.layer}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this.layer}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null}),e.on("before-changes",e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(d.A.getLogger(this).error(new a.A("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())})]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;d.A.getLogger(i).error(new a.A("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}static{this.test={isMapImageLayerOverridePolicy:e=>e===le||e===ae||e===ne,isTileImageLayerOverridePolicy:e=>e===oe}}};(0,i.Cg)([(0,m.MZ)({type:ee.A,json:{name:"attributeTableInfo",write:{overridePolicy:ne},origins:{"web-scene":{write:!1}}}})],de.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],de.prototype,"capabilities",void 0),(0,i.Cg)([(0,te.w)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],de.prototype,"readCapabilities",null),(0,i.Cg)([(0,m.MZ)()],de.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,m.MZ)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:ne}}})],de.prototype,"definitionExpression",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0,type:j.A,json:{origins:{service:{read:{source:"layerDefinition.editFieldsInfo"}}}}})],de.prototype,"editFieldsInfo",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],de.prototype,"effectiveScaleRange",null),(0,i.Cg)([(0,te.w)("service","maxScaleRange",["minScale","maxScale"])],de.prototype,"readMaxScaleRange",null),(0,i.Cg)([(0,m.MZ)({type:[L.A],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],de.prototype,"fields",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],de.prototype,"fieldsIndex",null),(0,i.Cg)([(0,m.MZ)({type:k.A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:ne},origins:{"web-scene":{read:!1,write:!1}}}})],de.prototype,"floorInfo",null),(0,i.Cg)([(0,m.MZ)({type:v.A,json:{read:{source:"layerDefinition.extent"}}})],de.prototype,"fullExtent",void 0),(0,i.Cg)([(0,m.MZ)({type:_.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:_.gy.read}}}}})],de.prototype,"geometryType",void 0),(0,i.Cg)([(0,m.MZ)({type:String})],de.prototype,"globalIdField",void 0),(0,i.Cg)([(0,te.w)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],de.prototype,"readGlobalIdFieldFromService",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],de.prototype,"graphicOrigin",null),(0,i.Cg)([(0,m.MZ)({type:g.jz,json:{write:{ignoreOrigin:!0}}})],de.prototype,"id",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],de.prototype,"isTable",void 0),(0,i.Cg)([(0,te.w)("service","isTable",["type"])],de.prototype,"readIsTable",null),(0,i.Cg)([(0,m.MZ)({value:null,type:[N.A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:le}}})],de.prototype,"labelingInfo",null),(0,i.Cg)([(0,re.K)("labelingInfo")],de.prototype,"writeLabelingInfo",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:ae}}})],de.prototype,"labelsVisible",null),(0,i.Cg)([(0,m.MZ)({value:null})],de.prototype,"layer",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{write:{overridePolicy:oe}}})],de.prototype,"layerItemId",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:ue}}})],de.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,m.MZ)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],de.prototype,"listMode",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:0,json:{write:{overridePolicy:ae}}})],de.prototype,"minScale",null),(0,i.Cg)([(0,te.w)("minScale",["minScale","layerDefinition.minScale"])],de.prototype,"readMinScale",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:0,json:{write:{overridePolicy:ae}}})],de.prototype,"maxScale",null),(0,i.Cg)([(0,te.w)("maxScale",["maxScale","layerDefinition.maxScale"])],de.prototype,"readMaxScale",null),(0,i.Cg)([(0,m.MZ)()],de.prototype,"objectIdField",void 0),(0,i.Cg)([(0,te.w)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],de.prototype,"readObjectIdFieldFromService",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:ae}}})],de.prototype,"opacity",null),(0,i.Cg)([(0,te.w)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],de.prototype,"readOpacity",null),(0,i.Cg)([(0,re.K)("opacity")],de.prototype,"writeOpacity",null),(0,i.Cg)([(0,m.MZ)({value:null,type:[z.A],json:{name:"layerDefinition.orderBy",read:{reader:Z.Rr},write:{overridePolicy:ne},origins:{"web-scene":{read:!1,write:!1}}}})],de.prototype,"orderBy",null),(0,i.Cg)([(0,m.MZ)({json:{type:g.jz,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:ae}}})],de.prototype,"parent",void 0),(0,i.Cg)([(0,re.K)("parent")],de.prototype,"writeParent",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:ue,writer(e,t,r){t[r]=!e}}}})],de.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,m.MZ)({type:s.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:ue}}})],de.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],de.prototype,"queryTask",null),(0,i.Cg)([(0,m.MZ)({type:[B.A],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],de.prototype,"relationships",void 0),(0,i.Cg)([(0,m.MZ)({types:Q.Hg,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:le},origins:{"web-scene":{types:Q.XJ,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:le}}}}})],de.prototype,"renderer",null),(0,i.Cg)([(0,m.MZ)({types:{key:"type",base:null,typeMap:{"data-layer":K.A,"map-layer":Y.A}},cast(e){if(e){if("mapLayerId"in e)return(0,g.PZ)(Y.A,e);if("dataSource"in e)return(0,g.PZ)(K.A,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:ae}}})],de.prototype,"source",null),(0,i.Cg)([(0,m.MZ)()],de.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,m.MZ)({type:S.A,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],de.prototype,"spatialReference",void 0),(0,i.Cg)([(0,m.MZ)({value:null,json:{type:[g.jz],write:{target:"subLayerIds",allowNull:!0,overridePolicy:ae}}})],de.prototype,"sublayers",null),(0,i.Cg)([(0,m.wg)("sublayers")],de.prototype,"castSublayers",null),(0,i.Cg)([(0,re.K)("sublayers")],de.prototype,"writeSublayers",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{name:"name",write:{overridePolicy:ue}}})],de.prototype,"title",void 0),(0,i.Cg)([(0,te.w)("service","title",["name","layerDefinition.name"])],de.prototype,"readTitle",null),(0,i.Cg)([(0,m.MZ)({type:String})],de.prototype,"typeIdField",void 0),(0,i.Cg)([(0,m.MZ)({json:{read:!1},readOnly:!0,value:"sublayer"})],de.prototype,"type",void 0),(0,i.Cg)([(0,te.w)("typeIdField",["layerDefinition.typeIdField"])],de.prototype,"readTypeIdField",null),(0,i.Cg)([(0,m.MZ)({type:[E.A],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],de.prototype,"types",void 0),(0,i.Cg)([(0,m.MZ)({type:[String],readOnly:!0})],de.prototype,"uniqueIdFields",void 0),(0,i.Cg)([(0,te.w)("service","uniqueIdFields",["layerDefinition.uniqueIdInfo.OIDFieldContainsHashValue","layerDefinition.uniqueIdInfo.fields"])],de.prototype,"readUniqueIdFields",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{name:"layerUrl",write:{overridePolicy:oe}}})],de.prototype,"url",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:ae}}})],de.prototype,"visible",null),(0,i.Cg)([(0,re.K)("visible")],de.prototype,"writeVisible",null),de=D=(0,i.Cg)([(0,m.$K)("esri.layers.support.Sublayer")],de)},33446(e,t,r){r.d(t,{C:()=>o,m:()=>n});var i=r(49186),s=r(17676);async function n(e,t,r){let n;try{n=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),n}async function o(e,t,r,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,s.Te)(o),a}},32730(e,t,r){r.d(t,{BI:()=>y,D3:()=>c,XJ:()=>d,lc:()=>p,mX:()=>f,rU:()=>h,tH:()=>v});var i=r(799);const s="__begin__",n="__end__",o=new RegExp(s,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+s,"i"),u=new RegExp(n+"$","i");function p(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function c(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function d(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=p(e.labelExpression),t.type="conventional"),t}function y(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return f(t.expression);case"arcade":return t.expression}return null}function h(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(m);return t?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function f(e){let t;return e?(t=(0,i.HC)(e,e=>s+'$feature["'+e+'"]'+n),t=l.test(t)?t.replace(l,""):'"'+t,t=u.test(t)?t.replace(u,""):t+'"',t=t.replaceAll(o,'" + ').replaceAll(a,' + "')):t='""',t}const m=/^\s*\{([^}]+)\}\s*$/i,g=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,w=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=g.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=w.exec(e),t?t[2]:null)}},63389(e,t,r){function i(e,t,r){const i=t.flatten(({sublayers:e})=>e).length;return i!==e.length||!!e.some(e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r)||!n(e,t)}function s(e,t,r){return!!e.some(e=>{const t=e.source,i=!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r);e.commitProperty("renderer"),e.commitProperty("labelingInfo"),e.commitProperty("opacity"),e.commitProperty("labelsVisible"),e.commitProperty("orderBy");const s=e.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1;return!i||e.originIdOf("renderer")>2||e.originIdOf("labelingInfo")>2||e.originIdOf("opacity")>2||e.originIdOf("labelsVisible")>2||s&&e.originIdOf("orderBy")>2})||!n(e,t)}function n(e,t){if(!e?.length||null==t)return!0;const r=t.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).map(e=>e.id).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function o(e){return!!e&&e.some(e=>null!=e.minScale||null!=e.layerDefinition?.minScale)}r.d(t,{Sk:()=>s,Zx:()=>i,_X:()=>o})},73681(e,t,r){r.d(t,{n:()=>l});var i=r(49186),s=r(53966),n=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?n.A.parse(e.dictionary_version):null,p=new Set(e.itemsNames),c={};if(t)for(const e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))d.delete(e);d.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const y=await(0,a.xR)(e.expression,null,c);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!o||!o.greaterEqual(4,0);h&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const f=new u(r,h);return new l(h,p,y,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},61760(e,t,r){r.d(t,{PU:()=>o,YW:()=>l,ex:()=>s,hv:()=>a,zp:()=>n}),r(34727);var i=r(90629);r(78955),r(91829);const s=2.4;function n(e){return(0,i.PN)(e*s)}function o(e){return(0,i.Lz)(e)/s}function a(e,t,r){const i=Math.sqrt(e**2+t**2)/r;return i>1?0:3/(Math.PI*r**2)*(1-i**2)**2}function l(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},20615(e,t,r){r.d(t,{I:()=>o});var i=r(2272),s=r(80893),n=r(61956);function o(e,t,r,o){return(0,s.gW)((0,i.Dl)(e),n.A.from(t),r,o)}},74910(e,t,r){r.d(t,{L:()=>a});var i=r(5443),s=r(2272),n=r(80893),o=r(61956);async function a(e,t,r){const a=(0,s.Dl)(e),l=await(0,n.Jf)(a,o.A.from(t),{...r}),u=l.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.count,extent:null}:{count:l.count,extent:i.A.fromJSON(u)}}},78286(e,t,r){r.d(t,{V:()=>o});var i=r(2272),s=r(80893),n=r(61956);async function o(e,t,r,o){const a=(0,i.Dl)(e),l=await(0,s.Pk)(a,n.A.from(t),r,o);return l.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(l.uniqueIds)??[]}},99199(e,t,r){r.d(t,{e:()=>l,s:()=>a});var i=r(2272),s=r(80893),n=r(22671),o=r(61956);async function a(e,t,r,i){const s=await l(e,t,r,i);return n.A.fromJSON(s)}function l(e,t,r,n){const a=(0,i.Dl)(e),l={...r},u=o.A.from(t);return(0,s.eW)(a,u,u.sourceSpatialReference,l,n)}},63746(e,t,r){function i(e){return class{constructor(){for(const t of e)this[t]=null}}}function s(e,t=1){const{transform:r,hasZ:i,hasM:s}=e;if(null==r)return i&&1!==t?e=>{e[2]*=t}:null;const[n,o]=function(e,t,r,i){let{scale:s,translate:n,originPosition:o}=e;return"upperLeft"===o&&(s=s.map((e,t)=>1===t?-e:e)),t&&(s=s.map((e,t)=>2===t?e*i:e),n=n.map((e,t)=>2===t?e*i:e)),!t&&r&&(s=s.filter((e,t)=>2!==t),n=n.filter((e,t)=>2!==t)),[s,n]}(r,i,s,t),a=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==a||0!==e[t]);++t)e[t]=e[t]*n[t]+o[t]}}r.d(t,{Mv:()=>s,_7:()=>i}),r(53966)},58501(e,t,r){r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}},41366(e,t,r){r.d(t,{K:()=>c,Q:()=>l});var i=r(5482),s=r(66552),n=r(53966),o=r(91429),a=r(93223);const l=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field",c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&u||null,t&&r&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(l,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,o.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},55674(e,t,r){r.d(t,{Ad:()=>y,Gj:()=>m,QY:()=>d,lL:()=>g,xR:()=>h});var i=r(66131),s=r(49186),n=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),u=r(43668),p=r(98623);const c=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of c)t.hasArcadeDependency(r)&&e.add(r);return e}function y(e,t){return f.create(e,t,null,["$feature","$view"])}function h(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:n,Dictionary:o}=await(0,u.l)();let a;try{a=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=n.scriptUsesGeometryEngine(a);l&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,a,null,!1,l);const p={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},c=n.compileScript(a,p);let d=null;null!=r&&(d=new o(r),d.immutable=!0);const y=new o;return y.immutable=!1,y.setField("scale",0),new f(e,n,a,c,t,y,d,o)}constructor(e,t,r,i,s,n,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=n,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===p.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??p.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1728],{71728(e,t,a){a.r(t),a.d(t,{default:()=>z});var i=a(5482),n=a(67996),s=a(7762),o=a(51447),r=a(49186),l=a(53966),h=a(91869),d=a(25728),c=a(17676),p=a(36708),u=a(91429),y=a(35666),g=a(5443),m=a(86738),f=a(82799),M=a(12359),L=a(4146),w=a(90708),C=a(15375);const b={MULTIPLIER:"multiplier",ABSOLUTE:"absolute-value"};var k=a(24137),T=a(62796),N=a(40736),v=a(69860),E=a(30504),D=a(63074),x=a(16131),A=a(25036),I=a(10873),_=a(8460),S=a(2555);let R=class extends((0,x.q)((0,D.dM)((0,A.j)((0,d.M)(L.A))))){constructor(e){if(super(e),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(s.A.ofType(T.A)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new g.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(s.A.ofType(T.A)),this.type="link-chart",this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1,this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new r.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles((0,p.wB)(()=>this.layers.concat(this.tables),(e,t)=>this._handleSublayersChange(e,t),p.OH))}normalizeCtorArgs(e){if(!e)return{};const{url:t,dataPreloadedInLocalCache:a,initializationLinkChartConfig:i}=e;let{title:n}=e;return!n&&e?.url&&(n=(0,N.$L)(e.url)),{url:t,title:n,dataPreloadedInLocalCache:a,initializationLinkChartConfig:i}}_initializeLayerProperties(e){const t=new Set;let a=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new r.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,s)=>{const o=this._graphTypeLookup.get(s);if(!o)return l.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);"relationship"===o.type?t.has(s)||(t.add(s),i.push(o)):"entity"===o.type?t.has(s)||(t.add(s),a.push(o)):(l.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(s))}):(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const n=new k.P({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=i,this.dataManager=n}load(e){const t=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,N.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach(e=>{e.useAllData=!1}),await this._initializeDiagram(),this.layers.forEach(a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise(e=>{a.on("layerview-create",()=>{e(null)})}))}),this.tables.forEach(e=>{t.push(e.refreshCachedQueryEngine())}),await Promise.all(t)};return this.addResolvingPromise(new Promise(a=>{(0,S.fetchKnowledgeGraph)(this.url).then(async i=>{i.dataModel.entityTypes?.forEach(e=>{e.name&&this._graphTypeLookup.set(e.name,e)}),i.dataModel.relationshipTypes?.forEach(e=>{e.name&&this._graphTypeLookup.set(e.name,e)});const s=this.linkChart?.linkChartProperties;6===s?.originIdOf("entitiesUrl")&&(this.membershipModified=!1,this._originalInclusionList=await n.XW.fetchAndConvertSerializedLinkChart({entitiesUrl:s?.entitiesUrl,relationshipsUrl:s?.relationshipsUrl},{signal:e?.signal}),this._alignLayersDataModelAndInclusionDefinition(i.dataModel),this.initializationLinkChartConfig={layoutSettings:s?.layoutSettings??void 0,layoutMode:(0,E.k5)(s.layoutType)}),this._initializeLayerProperties({knowledgeGraph:i,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}));const{edit:o,fullEdit:r,updateItem:l}=await(0,N.N1)(i.serviceDefinition.serviceItemId,this.url,e);if(this._set("userHasEditingPrivileges",o),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",l),this.dataPreloadedInLocalCache){const e=v.A.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);a&&(0,h.tE)(this.dataManager.sublayerCaches,t,()=>new Map).set(i.id,a)}await t()}else{const a="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,a,!0).then(async()=>{(0,c.Te)(e),await t()}))}a(null)})})),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("initializationInclusionModeDefinition",e):l.A.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded.")}get linkChart(){return this.parent}get sublayerCapabilities(){return(0,N.hZ)(this.knowledgeGraph)}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await(0,E.aq)(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter(e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async createSublayerForNamedType(e){await this.load();const t=this._graphTypeLookup.get(e);if(!t)throw new r.A("knowledge-graph:missing-type","The specified type does not exist in the knowledge graph.");if(this.dataManager.sublayerCaches.has(e))throw new r.A("knowledge-graph:duplicate-type","The specified type already exists as a sublayer.");this.dataManager.sublayerCaches.set(e,new Map),(0,h.tE)(this.sublayerIdsCache,e,()=>new Set);const a=this._createSublayer(t);return"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.set(e,{useAllData:!1,members:new Map}),a.geometryType?this.layers.push(a):this.tables.push(a),await(0,N.qN)(this,[e]),this._refreshNamedTypes(),a}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const t of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id))&&n.push(t);if(t){const e=new Set,t=[];for(const t of n)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const a of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(a);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const e of n)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);const s=a?void 0:this.getCurrentNodeLocations();await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedEntityLocations:s}),n.length>0&&(this.membershipModified=!0);const o=[];return this.layers.forEach(e=>{o.push(e.refreshCachedQueryEngine())}),await Promise.all(o),this._refreshNamedTypes(),n}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter(e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)),await this._handleNewRecords(a,t),i.length>0&&(this.membershipModified=!0),(0,c.Te)(t?.signal)}catch(e){throw(0,c.zf)(e)&&a.length>0&&await this.removeRecords(a,{overrideMembershipCheck:!0}),e}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.layers.length||0===this.originIdOf("tables")?0===this.originIdOf("layers")?this._createSublayers(e,this.layers,e=>!!e.geometryType):this._updateSublayers(e,this.layers):this.layers=new s.A,this.tables.length||0===this.originIdOf("layers")?0===this.originIdOf("tables")?this._createSublayers(e,this.tables,e=>!e.geometryType):this._updateSublayers(e,this.tables):this.tables=new s.A,this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{const a=(0,h.tE)(this.sublayerIdsCache,t,()=>new Set);e.members?.forEach(({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:(0,w.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}})})}async calculateLinkChartLayout(e="organic-standard",t){const a=[],i=[],n=[];this.dataManager.sublayerCaches.forEach((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach(e=>{a.push({typeName:t,feature:e})}):this.dataManager.relationshipTypeNames.has(t)&&e.forEach(e=>{i.push({typeName:t,feature:e})})}),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const s=new Map,o=new Map,d=new Map,p=new Map,u=new Uint8Array(a.length),y=new Float64Array(a.length),L=new Float64Array(a.length),b=new Float64Array(a.length),k=new Float64Array(a.length),T=new Uint32Array(i.length),N=new Uint32Array(i.length),v=new Float64Array(i.length),E=new Float64Array(i.length),D=[];let x=!1;const A=new g.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let I,S="organic-standard",R=0,z=0;const P=_.i6.apply;switch(S="geographic-organic-standard"===e?"organic-standard":e,S){case"organic-standard":I=_.pM.apply;break;case"organic-community":I=_.Tu.apply;break;case"hierarchical-bottom-to-top":I=_.$C.apply;break;case"radial-root-centric":I=_.vJ.apply;break;case"tree-left-to-right":I=_.Xq.apply;break;default:I=_.Wg.apply}let O=!1;a.forEach(({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedEntityLocations?.has(i.attributes[C.dr])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?u[R]=2:u[R]=0;const n=t.lockedEntityLocations.get(i.attributes[C.dr]);y[R]=n.x,L[R]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){u[R]=2;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":y[R]=t?.x,L[R]=t?.y;break;case"esriGeometryPolygon":{const a=(0,M.Ve)(t);e=a?m.A.fromJSON(a):null,null!=e?.x&&null!=e?.y?(y[R]=e.x,L[R]=e.y):u[R]=1;break}case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[R]=e.x,L[R]=e.y):u[R]=1;break;default:u[R]=1}(null==y[R]||null==L[R]||Number.isNaN(y[R])||Number.isNaN(L[R]))&&(u[R]=1,y[R]=0,L[R]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!O&&t?.lockedEntityLocations?.has(i.attributes[C.dr])&&(O=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,s=n&&e?.startField?i.attributes[n]:null;b[R]=s?new Date(s).getTime():NaN;const o=e?.endField,r=o&&e?.endField?i.attributes[o]:null;k[R]=r?new Date(r).getTime():NaN,y[R]=0,L[R]=0,u[R]=1}else u[R]=1,y[R]=0,L[R]=0;t?.rootEntityIds?.has(i.attributes[C.dr])&&(u[R]|=4),p.set(i.attributes[C.dr],R),D[R]={feature:i,typeName:a},R++}),O&&l.A.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let Z=!1;const F=new Map;i.forEach(a=>{const i=a.feature.attributes[C.Cz],s=a.feature.attributes[C.KQ],o=p.get(i),r=p.get(s),l=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?l?.startField:null,d=h?a.feature.attributes[h]:null,c=l?.endField,u=c?a.feature.attributes[c]:null;if(void 0!==o&&void 0!==r){let t=i+"-"+s;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+u);const l=F.get(t),h=l?.has(a.typeName);h||(T[z]=o,N[z]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(v[z]=d?new Date(d).getTime():NaN,E[z]=u?new Date(u).getTime():NaN),void 0===l?F.set(t,new Map([[a.typeName,z]])):l.set(a.typeName,z),z++),n.push(a)}else Z=!0,this.relationshipLinkChartDiagramLookup.set(i,null)}),Z&&l.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const G=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),U=this._convertValidatedOrganicSettingsToCalculationSettings(G);await(0,_.Hh)();let B=1,H=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:B,links:H,graphics:a}=P(()=>t?.signal?.aborted??!1,u,y,L,b,k,T.subarray(0,z),N.subarray(0,z),v.subarray(0,z),E.subarray(0,z),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),0===B&&(this.chronologicalAuxiliaryGraphics=a)}else({status:B,links:H}=I(()=>t?.signal?.aborted??!1,u,y,L,T.subarray(0,z),N.subarray(0,z),U.computationBudgetTime,U.idealEdgeLengthMultiplier,U.repulsionRadiusMultiplier));if((0,c.Te)(t?.signal),1===B)throw new r.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(2===B)throw(0,c.NK)();for(let e=0;e<D.length;e++){if(L[e]>84.9999?L[e]=84.9999:L[e]<-84.9999&&(L[e]=-84.9999),y[e]>179.9999?y[e]=179.9999:y[e]<-179.9999&&(y[e]=-179.9999),D[e].feature.attributes[C.T1]=new m.A(y[e],L[e]),s.has(D[e].typeName)){const t=s.get(D[e].typeName);t?.set(D[e].feature.attributes[C.dr],D[e].feature)}else{const t=new Map;t.set(D[e].feature.attributes[C.dr],D[e].feature),s.set(D[e].typeName,t)}d.set(D[e].feature.attributes[C.dr],D[e].feature);const t=(0,w.Ux)(D[e].feature.attributes[C.T1]);this.entityLinkChartDiagramLookup.set(D[e].feature.attributes[C.dr],D[e].feature.attributes[C.T1]?t:null);const a=(0,h.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,D[e].typeName,()=>({useAllData:!1,members:new Map}));(0,h.tE)(a.members,D[e].feature.attributes[C.dr],()=>({id:D[e].feature.attributes[C.dr],linkChartLocation:void 0})).linkChartLocation=D[e].feature.attributes[C.T1];const{x:i,y:n}=D[e].feature.attributes[C.T1];if(x)A.xmin=Math.min(A.xmin,i),A.xmax=Math.max(A.xmax,i),A.ymin=Math.min(A.ymin,n),A.ymax=Math.max(A.ymax,n);else{const e=1e-7;A.xmin=i-e,A.xmax=i+e,A.ymin=n-e,A.ymax=n+e,x=!0}}if(this.linkChartExtent.xmin=A.xmin,this.linkChartExtent.xmax=A.xmax,this.linkChartExtent.ymin=A.ymin,this.linkChartExtent.ymax=A.ymax,!H)throw new r.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const j=new Map,Q=new Map,$=new Map,q=new Set;for(let a=0;a<n.length;a++){const i=[],s=n[a],r=s.feature.attributes[C.Cz],c=s.feature.attributes[C.KQ];let u=r+"-"+c;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(s.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?s.feature.attributes[a]:null,n=e?.endField;u+="-"+i+"-"+(n?s.feature.attributes[n]:null)}const y=F.get(u).get(s.typeName),g=0===y?0:H?.vertexEndIndex[y-1];if(!q.has(y)){if(q.add(y),2===H.types[y]){const e=[H.vertices[2*g],H.vertices[2*g+1]],t=[H.vertices[2*(g+1)],H.vertices[2*(g+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],s=[a[0]+n[1],a[1]-n[0]],o=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(s),i.push(t),i.push(o),i.push(e)}else{if(0!==H.types[y]){l.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<H.vertexEndIndex[y];e++)i.push([H.vertices[2*e],H.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=D[p.get(r)]?.feature.attributes[C.T1],t=D[p.get(c)]?.feature.attributes[C.T1];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);j.has(u)?j.get(u).push(i):j.set(u,[i])}const m=j.get(u);Q.has(u)||(Q.set(u,new Map),$.set(u,new Map));const M=Q.get(u),L=$.get(u);M.has(s.typeName)||(M.set(s.typeName,m.shift()),L.set(s.typeName,0));const b=M.get(s.typeName);L.set(s.typeName,L.get(s.typeName)+1);const k=new f.A({paths:[b]});if(s.feature.attributes[C.T1]=k,o.has(s.typeName)){const e=o.get(s.typeName);e?.set(s.feature.attributes[C.dr],s.feature)}else{const e=new Map;e.set(s.feature.attributes[C.dr],s.feature),o.set(s.typeName,e)}d.set(s.feature.attributes[C.dr],s.feature);const T=(0,w.Ux)(s.feature.attributes[C.T1]);this.relationshipLinkChartDiagramLookup.set(s.feature.attributes[C.dr],s.feature.attributes[C.T1]?T:null);const N=(0,h.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,s.typeName,()=>({useAllData:!1,members:new Map}));(0,h.tE)(N.members,s.feature.attributes[C.dr],()=>({id:s.feature.attributes[C.dr],linkChartLocation:void 0})).linkChartLocation=T}for(const e of n)e.feature.attributes[C.M1]=$.get(e.feature.attributes[C.Cz]+"-"+e.feature.attributes[C.KQ])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:s,links:o,idMap:d}}async applyNewLinkChartLayout(e="organic-standard",t){let{lockedNodeLocations:a,lockedEntityLocations:i,...n}=t??{};!i&&a?((0,o.io)(l.A.getLogger(this),"lockedNodeLocations is deprecated in 5.0. Use lockedEntityLocations instead.",{replacement:"Use lockedEntityLocations instead.",version:"5.0"}),i=a):i&&a&&(0,o.io)(l.A.getLogger(this),"Both lockedNodeLocations (deprecated in 5.0) and lockedEntityLocations are defined. Use lockedEntityLocations only instead.",{replacement:"Use lockedEntityLocations instead.",version:"5.0"});const s=[];await this._calculateLayoutWithSublayerTimeInfo(e,{...n,lockedEntityLocations:i}),this.layers.forEach(e=>{s.push(e.refreshCachedQueryEngine())}),this.membershipModified=!0,await Promise.all(s),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach(t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new m.A({x:i.x,y:i.y})))});return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach(e=>{t.push(e.refreshCachedQueryEngine())}),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),(0,c.Te)(t)}catch(e){throw(0,c.zf)(e)&&this.removeRecords(a),e}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,n,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),(0,c.Te)(t)}catch(e){throw(0,c.zf)(e)&&this.removeRecords(a),e}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){const a=new Map;this.layers.forEach(e=>{a.set(e.objectType.name,e.timeInfo)}),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){const a=new Set,i=[],n=this.layers.concat(this.tables);for(const t of e)this._graphTypeLookup.has(t.typeName)&&(!1===n.some(e=>e.objectType.name===t.typeName)&&(this.dataManager.sublayerCaches.set(t.typeName,new Map),a.add(t.typeName)),(0,h.tE)(this.sublayerIdsCache,t.typeName,()=>new Set).add(t.id),i.push(t));this.dataManager.addToLayer(i);for(const e of a){const t=this._graphTypeLookup.get(e);if(t){const a=this._createSublayer(t);"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),a.geometryType?this.layers.push(a):this.tables.push(a)}}await(0,N.qN)(this,Array.from(a),t),await this.dataManager.refreshCacheContent(e.map(e=>e.id),void 0,void 0,void 0,t);const s={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedEntityLocations:new Map};for(const[e,t]of this.entityLinkChartDiagramLookup.entries())t&&s.lockedEntityLocations.set(e,new m.A(t.coords[0],t.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,s)}_createSublayers(e,t,a){e.forEach(e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)})}_updateSublayers(e,t){t.forEach(t=>{t.parentCompositeLayer=this;const a=e.find(e=>e.type===t.graphType&&e.name===t.graphTypeName);a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))})}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=3&&e<7}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e?.members?.forEach(e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const s=(0,w.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,s):this.entityLinkChartDiagramLookup.set(n,s),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)})}),this.memberRelationshipTypes.forEach(e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach(e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[C.Cz]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[C.KQ]);if(t&&a){const i=(0,w.Ux)(new f.A({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[C.dr],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[C.dr],null)})})):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedEntityLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{lockedEntityLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateOrganicLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),i=e=>a(e)&&e>=0,n={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return n;const{computationBudgetTime:s,autoRepulsionRadius:o,repulsionRadiusMultiplier:r,absoluteIdealEdgeLength:h,multiplicativeIdealEdgeLength:d,idealEdgeLengthType:c}=t;return(e=>a(e)&&e>=1)(s)?n.computationBudgetTime=s:s&&l.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),n.autoRepulsionRadius=o,!o&&(e=>a(e)&&e>=1)(r)?n.repulsionRadiusMultiplier=r:o||(n.autoRepulsionRadius=!0,l.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&((e=>Object.values(b).includes(e))(c)?n.idealEdgeLengthType=c:void 0!==c&&l.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===c&&i(h)?n.absoluteIdealEdgeLength=h:"absolute-value"===c&&void 0!==h?l.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===c&&i(d)?n.multiplicativeIdealEdgeLength=d:"multiplier"===c&&void 0!==d&&l.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),n}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===b.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===b.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new T.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this}),e.on("after-remove",({item:e})=>{e.parent=null})],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map(e=>e.name).concat((e.relationshipTypes??[]).map(e=>e.name))),a=new Set((e.entityTypes??[]).map(e=>e.name)),i=new Set((e.relationshipTypes??[]).map(e=>e.name));if(this.layers){for(const e of this.layers)!e.graphType&&t.has(e.graphTypeName)&&(e.graphType=a.has(e.graphTypeName)?"entity":"relationship");const e=this.layers.filter(e=>t.has(e.graphTypeName)&&("entity"===e.graphType?a.has(e.graphTypeName):i.has(e.graphTypeName)));this.setAtOrigin("layers",e,(0,y.OL)(this.originIdOf("layers")))}else this.layers=new s.A;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map(e=>e.graphTypeName)??[],a=this.layers.map(e=>e.graphTypeName).concat(t);for(const t of a)e.has(t)||this._originalInclusionList.namedTypeDefinitions.set(t,{useAllData:!1,members:new Map});const i=[];for(const e of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(e)||(l.A.getLogger(this).warn(`A named type, ${e}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(e));for(const e of i)this._originalInclusionList.namedTypeDefinitions.delete(e)}}};(0,i.Cg)([(0,u.MZ)(I.OZ)],R.prototype,"url",void 0),(0,i.Cg)([(0,u.MZ)()],R.prototype,"dataPreloadedInLocalCache",void 0),(0,i.Cg)([(0,u.MZ)()],R.prototype,"initializationLinkChartConfig",void 0),(0,i.Cg)([(0,u.MZ)()],R.prototype,"membershipModified",void 0),(0,i.Cg)([(0,u.MZ)()],R.prototype,"dataManager",void 0),(0,i.Cg)([(0,u.MZ)()],R.prototype,"initializationInclusionModeDefinition",null),(0,i.Cg)([(0,u.MZ)()],R.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,u.MZ)({type:s.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"layers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],R.prototype,"linkChart",null),(0,i.Cg)([(0,u.MZ)()],R.prototype,"entityLinkChartDiagramLookup",void 0),(0,i.Cg)([(0,u.MZ)()],R.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,i.Cg)([(0,u.MZ)()],R.prototype,"linkChartExtent",void 0),(0,i.Cg)([(0,u.MZ)()],R.prototype,"memberEntityTypes",void 0),(0,i.Cg)([(0,u.MZ)()],R.prototype,"memberRelationshipTypes",void 0),(0,i.Cg)([(0,u.MZ)({type:["LinkChartLayer"]})],R.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,u.MZ)()],R.prototype,"sublayerCapabilities",null),(0,i.Cg)([(0,u.MZ)()],R.prototype,"sublayerIdsCache",void 0),(0,i.Cg)([(0,u.MZ)({type:s.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"tables",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1}})],R.prototype,"type",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],R.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],R.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],R.prototype,"userHasUpdateItemPrivileges",void 0),(0,i.Cg)([(0,u.MZ)({json:{read:!1}})],R.prototype,"chronologicalAuxiliaryGraphics",void 0),R=(0,i.Cg)([(0,u.$K)("esri.layers.LinkChartLayer")],R);const z=R}}]);