@arcgis/core 4.28.0-next.20230919 → 4.28.0-next.20230921

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 (412) hide show
  1. package/Color.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/ArcadeDate.js +1 -1
  4. package/arcade/executionError.js +1 -1
  5. package/arcade/featureset/support/errorsupport.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/06621efb2573fad23b45.js +1 -0
  8. package/assets/esri/core/workers/chunks/072b4e041b8630c513a0.js +1 -0
  9. package/assets/esri/core/workers/chunks/101f776316a85b708927.js +1 -0
  10. package/assets/esri/core/workers/chunks/107546ef77a45d31c7ac.js +1 -0
  11. package/assets/esri/core/workers/chunks/10fd951bd296b2beeeba.js +1 -0
  12. package/assets/esri/core/workers/chunks/114269dda1d296893908.js +1 -0
  13. package/assets/esri/core/workers/chunks/126df6237fc80608344e.js +1 -0
  14. package/assets/esri/core/workers/chunks/134524cf6b1ebf208338.js +1 -0
  15. package/assets/esri/core/workers/chunks/17a36704e63ca1b34c5d.js +1 -0
  16. package/assets/esri/core/workers/chunks/1c83f47d446f2bca1721.js +1 -0
  17. package/assets/esri/core/workers/chunks/{09d395a9786607294689.js → 1c8469fbde39d85ee622.js} +1 -1
  18. package/assets/esri/core/workers/chunks/1cbaba30f55f00f7498b.js +1 -0
  19. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +1 -0
  20. package/assets/esri/core/workers/chunks/{506874f562ce11f8914a.js → 243a4eed107d363dfad8.js} +1 -1
  21. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +1 -0
  22. package/assets/esri/core/workers/chunks/2a1c1be9c202462cf54d.js +1 -0
  23. package/assets/esri/core/workers/chunks/2bb69d76a13564e8e455.js +1 -0
  24. package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +1 -0
  25. package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +1 -0
  26. package/assets/esri/core/workers/chunks/32ba4eba730e9232d964.js +1 -0
  27. package/assets/esri/core/workers/chunks/{b428fcb53ecc82b49e66.js → 332689bf60d246485993.js} +1 -1
  28. package/assets/esri/core/workers/chunks/3619e04cbb6691549014.js +1 -0
  29. package/assets/esri/core/workers/chunks/37116fb4c68cf3c3890a.js +1 -0
  30. package/assets/esri/core/workers/chunks/{3a7ad0d24264e2bc2e87.js → 3ca759f72d3bb29e9ea9.js} +22 -22
  31. package/assets/esri/core/workers/chunks/3dbfb4f370a874393822.js +1 -0
  32. package/assets/esri/core/workers/chunks/3f4e9b1663ec521bfe00.js +1 -0
  33. package/assets/esri/core/workers/chunks/406db5c90271a3a203d4.js +1 -0
  34. package/assets/esri/core/workers/chunks/4339ce8aaf87fabb80cc.js +1 -0
  35. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +1 -0
  36. package/assets/esri/core/workers/chunks/43ba2bacd0f7d19915f7.js +1 -0
  37. package/assets/esri/core/workers/chunks/44b8e75593b7df1843e1.js +1 -0
  38. package/assets/esri/core/workers/chunks/467a821d05df8ec0dc1c.js +1 -0
  39. package/assets/esri/core/workers/chunks/47be4c75dd6372b96fe4.js +1 -0
  40. package/assets/esri/core/workers/chunks/53097659f31750c03a6d.js +1 -0
  41. package/assets/esri/core/workers/chunks/{c1141056581af072aee9.js → 580039dd491854ca325c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +1 -0
  43. package/assets/esri/core/workers/chunks/5a5720caa64a46daadf9.js +1 -0
  44. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +1 -0
  45. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +1 -0
  46. package/assets/esri/core/workers/chunks/652749dc847fcb887234.js +1 -0
  47. package/assets/esri/core/workers/chunks/6c495077cc79e1898927.js +1 -0
  48. package/assets/esri/core/workers/chunks/{e5c3beebd507e1dda35f.js → 749fc49246093d693227.js} +1 -1
  49. package/assets/esri/core/workers/chunks/74d3ecb1a06d9f81e2c5.js +1 -0
  50. package/assets/esri/core/workers/chunks/77c15b1c2729c780f75a.js +1 -0
  51. package/assets/esri/core/workers/chunks/7ea33aa455c5143affb1.js +1 -0
  52. package/assets/esri/core/workers/chunks/7ed70c96fbfe00792e7c.js +1 -0
  53. package/assets/esri/core/workers/chunks/8ab832468300cc4feb5a.js +1 -0
  54. package/assets/esri/core/workers/chunks/90771b0de3e520a1df9a.js +1 -0
  55. package/assets/esri/core/workers/chunks/94188fe381239d48a975.js +1 -0
  56. package/assets/esri/core/workers/chunks/a277c980ba8704939688.js +1 -0
  57. package/assets/esri/core/workers/chunks/b1746c022fe6edaeda55.js +1 -0
  58. package/assets/esri/core/workers/chunks/b449d6bd5851187d419f.js +1 -0
  59. package/assets/esri/core/workers/chunks/bbc0dcd316c5598bc9ad.js +1 -0
  60. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +1 -0
  61. package/assets/esri/core/workers/chunks/bc6323bdc98013da6fe5.js +1 -0
  62. package/assets/esri/core/workers/chunks/bde89b2684b6185992ef.js +1 -0
  63. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +1 -0
  64. package/assets/esri/core/workers/chunks/{727548fffd4e270617d3.js → c6ea5aac232d1eca04dd.js} +1 -1
  65. package/assets/esri/core/workers/chunks/c8438c2d9ac48afe4033.js +1 -0
  66. package/assets/esri/core/workers/chunks/c9dfb145f0c1d93e0fbd.js +1 -0
  67. package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +1 -0
  68. package/assets/esri/core/workers/chunks/cec607d0138351a4952e.js +1 -0
  69. package/assets/esri/core/workers/chunks/d24afa6d8fd0061d9f00.js +1 -0
  70. package/assets/esri/core/workers/chunks/{f147269d85adfb4588ed.js → d9061beaa43065316062.js} +1 -1
  71. package/assets/esri/core/workers/chunks/dd7508d4016715371e0c.js +1 -0
  72. package/assets/esri/core/workers/chunks/dff1c3c38dda2bd1a9d6.js +1 -0
  73. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +1 -0
  74. package/assets/esri/core/workers/chunks/eb01f4cdb9b918cc61e7.js +1 -0
  75. package/assets/esri/core/workers/chunks/ec8258c9dc1491e97fc8.js +1 -0
  76. package/assets/esri/core/workers/chunks/ed1fbc1bc8d50453e2f5.js +1 -0
  77. package/assets/esri/core/workers/chunks/eeac53da496de4cd4182.js +1 -0
  78. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +1 -0
  79. package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +1 -0
  80. package/assets/esri/core/workers/chunks/f508ccfde6425dabe9ac.js +1 -0
  81. package/assets/esri/core/workers/chunks/f5e0ff5292b9fd18fc92.js +1 -0
  82. package/assets/esri/core/workers/chunks/f5eb8b5021620be7538e.js +1 -0
  83. package/assets/esri/images/portal/onlinemedialayer16.png +0 -0
  84. package/assets/esri/themes/base/widgets/_FeatureForm.scss +2 -1
  85. package/assets/esri/themes/dark/main.css +1 -1
  86. package/assets/esri/themes/light/main.css +1 -1
  87. package/assets/esri/themes/light/view.css +1 -1
  88. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm.json +1 -1
  89. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
  90. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
  91. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
  92. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
  93. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
  94. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
  95. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
  96. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
  97. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_en.json +1 -1
  98. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
  99. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
  100. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
  101. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
  102. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
  103. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
  104. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
  105. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
  106. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
  107. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
  108. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
  109. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
  110. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
  111. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nb.json +1 -1
  112. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
  113. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
  114. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
  115. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
  116. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
  117. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
  118. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
  119. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
  120. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
  121. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
  122. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
  123. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
  124. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
  125. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
  126. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
  127. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
  128. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
  129. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
  130. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
  131. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
  132. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
  133. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
  134. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  135. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
  136. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
  137. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  138. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
  139. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
  140. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
  141. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
  142. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  143. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
  144. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
  145. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
  146. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
  147. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
  148. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
  149. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
  150. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
  151. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  152. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nb.json +1 -1
  153. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
  154. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
  155. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
  156. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
  157. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
  158. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
  159. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
  160. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
  161. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
  162. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
  163. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
  164. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
  165. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
  166. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
  167. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
  168. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
  169. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
  170. package/chunks/LaserlinePath.glsl.js +5 -1
  171. package/core/HandleOwner.js +1 -1
  172. package/core/MemCache.js +1 -1
  173. package/core/date.js +5 -0
  174. package/core/sql.js +1 -1
  175. package/core/string.js +1 -1
  176. package/interfaces.d.ts +60 -43
  177. package/intl/date.js +1 -1
  178. package/layers/GeoJSONLayer.js +1 -1
  179. package/layers/ImageryLayer.js +1 -1
  180. package/layers/VoxelWasmPerSceneView.js +1 -1
  181. package/layers/WFSLayer.js +1 -1
  182. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  183. package/layers/graphics/sources/MemorySource.js +1 -1
  184. package/layers/graphics/sources/WFSSource.js +1 -1
  185. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  186. package/layers/graphics/sources/csv/csv.js +1 -1
  187. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  188. package/layers/graphics/sources/geojson/geojson.js +1 -1
  189. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  190. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  191. package/{views/interactive/tooltip/tooltipInfoUnion.js → layers/graphics/sources/support/QueryEngineBuildLayer.js} +1 -0
  192. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  193. package/layers/mixins/SceneService.js +1 -1
  194. package/layers/ogc/wfsUtils.js +1 -1
  195. package/layers/save/utils.js +1 -1
  196. package/layers/support/editableLayers.js +1 -1
  197. package/layers/support/fieldUtils.js +1 -1
  198. package/layers/support/labelFormatUtils.js +1 -1
  199. package/layers/support/layersCreator.js +1 -1
  200. package/layers/support/rasterFunctionUtils.js +1 -1
  201. package/layers/support/rasterFunctions/creators/createBandIndexFunctions.js +1 -1
  202. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +1 -1
  203. package/layers/support/rasterFunctions/creators/createLocalFunctions.js +1 -1
  204. package/networks/support/utils.js +1 -1
  205. package/package.json +1 -1
  206. package/portal/PortalItem.js +1 -1
  207. package/portal/support/layersLoader.js +1 -1
  208. package/rest/geometryService/cut.js +1 -1
  209. package/rest/query/operations/query.js +1 -1
  210. package/rest/versionManagement/deleteVersion.js +1 -1
  211. package/rest/versionManagement/gdbVersion/alterVersion.js +1 -1
  212. package/rest/versionManagement/gdbVersion/post.js +1 -1
  213. package/rest/versionManagement/gdbVersion/reconcile.js +1 -1
  214. package/rest/versionManagement/gdbVersion/serverVersionUtils.js +5 -0
  215. package/support/revision.js +1 -1
  216. package/time/timeZoneUtils.js +1 -1
  217. package/views/2d/engine/Stage.js +1 -1
  218. package/views/2d/engine/webgl/mesh/factories/WGLMeshFactory.js +1 -1
  219. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  220. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  221. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  222. package/views/2d/layers/features/sources/StreamSource.js +1 -1
  223. package/views/2d/layers/features/support/whereUtils.js +1 -1
  224. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  225. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  226. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  227. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  228. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  229. package/views/3d/environment/LocalAtmosphere.js +1 -1
  230. package/views/3d/externalRenderers/StageRenderer.js +1 -1
  231. package/views/3d/interactive/manipulatorUtils.js +1 -1
  232. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  233. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  234. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  235. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  236. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  237. package/views/3d/layers/MediaLayerView3D.js +1 -1
  238. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  239. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  240. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  241. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  242. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  243. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  244. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  245. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  246. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  247. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  248. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  249. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  250. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  251. package/views/3d/layers/support/overlayImageUtils.js +1 -1
  252. package/views/3d/layers/support/patternUtils.js +1 -1
  253. package/views/3d/support/LaserLineRenderer.js +1 -1
  254. package/views/3d/support/StreamDataLoader.js +1 -1
  255. package/views/3d/support/dito.js +1 -1
  256. package/views/3d/support/engineContent/line.js +1 -1
  257. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  258. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  259. package/views/3d/terrain/OverlayRenderer.js +1 -1
  260. package/views/3d/terrain/TerrainRenderer.js +1 -1
  261. package/views/3d/terrain/TileRenderer.js +1 -1
  262. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  263. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  264. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  265. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  266. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +6 -6
  267. package/views/3d/webgl-engine/core/shaderLibrary/hud/AlignPixel.glsl.js +10 -12
  268. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDVisibility.glsl.js +8 -21
  269. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  270. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  271. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  272. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  273. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  274. package/views/3d/webgl-engine/lib/Attribute.js +1 -1
  275. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  276. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  277. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  278. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  279. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  280. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  281. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  282. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  283. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  284. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  285. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  286. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  287. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  288. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  289. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  290. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  291. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  292. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  293. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  294. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  295. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  296. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  297. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  298. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  299. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  300. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  301. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  302. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  303. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  304. package/views/View.js +1 -1
  305. package/views/draw/DrawGraphicTool.js +1 -1
  306. package/views/draw/support/HighlightHelper.js +1 -1
  307. package/views/draw/support/Reshape.js +1 -1
  308. package/views/draw/support/layerUtils.js +1 -1
  309. package/views/interactive/SegmentLabels.js +1 -1
  310. package/views/interactive/keybindings.js +1 -1
  311. package/views/interactive/tooltip/SketchTooltipInfo.js +1 -1
  312. package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
  313. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  314. package/views/interactive/tooltip/TranslateTooltipInfos.js +1 -1
  315. package/views/interactive/tooltip/content/Fields.js +5 -0
  316. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  317. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  318. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  319. package/views/layers/FeatureLayerView.js +1 -1
  320. package/views/webgl/FramebufferObject.js +1 -1
  321. package/webdoc/saveAPIKeyUtils.js +5 -0
  322. package/webdoc/webdocSaveUtils.js +1 -1
  323. package/widgets/BasemapGallery.js +1 -1
  324. package/widgets/BasemapLayerList.js +1 -1
  325. package/widgets/Bookmarks.js +1 -1
  326. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  327. package/widgets/Editor/EditorViewModel.js +1 -1
  328. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  329. package/widgets/Editor/UpdateWorkflow.js +1 -1
  330. package/widgets/Expand.js +1 -1
  331. package/widgets/Feature/FeatureRelationship.js +1 -1
  332. package/widgets/Feature/support/featureUtils.js +1 -1
  333. package/widgets/FeatureForm/EditableInput.js +1 -1
  334. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  335. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  336. package/widgets/FeatureForm.js +1 -1
  337. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  338. package/widgets/Fullscreen.js +1 -1
  339. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  340. package/widgets/Search.js +1 -1
  341. package/widgets/Swipe.js +1 -1
  342. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  343. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  344. package/widgets/UtilityNetworkTrace/support/UtilityHelper.js +1 -1
  345. package/widgets/UtilityNetworkTrace.js +1 -1
  346. package/widgets/support/SketchTooltipControls.js +1 -1
  347. package/widgets/support/globalCss.js +1 -1
  348. package/assets/esri/core/workers/chunks/0274b84548cb048562e4.js +0 -1
  349. package/assets/esri/core/workers/chunks/034accc7cab6c88a3b31.js +0 -1
  350. package/assets/esri/core/workers/chunks/0839b45999fcb556e460.js +0 -1
  351. package/assets/esri/core/workers/chunks/09589852b129bfb5624f.js +0 -1
  352. package/assets/esri/core/workers/chunks/132e9e6147304ffd128d.js +0 -1
  353. package/assets/esri/core/workers/chunks/1790ca4193d730f5f206.js +0 -1
  354. package/assets/esri/core/workers/chunks/1a449168d30a688e6128.js +0 -1
  355. package/assets/esri/core/workers/chunks/1c94624fd001c803a814.js +0 -1
  356. package/assets/esri/core/workers/chunks/25ab3bec45de900be36e.js +0 -1
  357. package/assets/esri/core/workers/chunks/273167b2dd46e58b8739.js +0 -1
  358. package/assets/esri/core/workers/chunks/2c5eb8aaad696fa16744.js +0 -1
  359. package/assets/esri/core/workers/chunks/353bad8530710a284592.js +0 -1
  360. package/assets/esri/core/workers/chunks/357d452b8522185cc433.js +0 -1
  361. package/assets/esri/core/workers/chunks/3c2be3d204e6bf87266a.js +0 -1
  362. package/assets/esri/core/workers/chunks/3c2c64832fb498bbaa83.js +0 -1
  363. package/assets/esri/core/workers/chunks/3c4d59018ce8502c65e7.js +0 -1
  364. package/assets/esri/core/workers/chunks/43eff89599f36d83924b.js +0 -1
  365. package/assets/esri/core/workers/chunks/4632ada4af99cab70a61.js +0 -1
  366. package/assets/esri/core/workers/chunks/481eab7879ed5d8a1f67.js +0 -1
  367. package/assets/esri/core/workers/chunks/4b3a5cc435435c81e6a5.js +0 -1
  368. package/assets/esri/core/workers/chunks/4f34fd8c2bb769541e9c.js +0 -1
  369. package/assets/esri/core/workers/chunks/4f5a0bc7411c0db33662.js +0 -1
  370. package/assets/esri/core/workers/chunks/56a4cea67cc579bf7547.js +0 -1
  371. package/assets/esri/core/workers/chunks/56afd89d08c874f620a1.js +0 -1
  372. package/assets/esri/core/workers/chunks/5b08d578521562b166e3.js +0 -1
  373. package/assets/esri/core/workers/chunks/5f938d6da9fd3f3edc74.js +0 -1
  374. package/assets/esri/core/workers/chunks/6108d72faf48a592c8ba.js +0 -1
  375. package/assets/esri/core/workers/chunks/656a8be4ce1bec721366.js +0 -1
  376. package/assets/esri/core/workers/chunks/7531ebc60e9ae61220e0.js +0 -1
  377. package/assets/esri/core/workers/chunks/77923afde29ae1ff10ca.js +0 -1
  378. package/assets/esri/core/workers/chunks/79683324be49aab79dd8.js +0 -1
  379. package/assets/esri/core/workers/chunks/7cdb4416afd5922cf5f3.js +0 -1
  380. package/assets/esri/core/workers/chunks/7e87bc83a0a2715e3016.js +0 -1
  381. package/assets/esri/core/workers/chunks/7f680cf24dd97d61bcd2.js +0 -1
  382. package/assets/esri/core/workers/chunks/7f797fed73cf7b48a686.js +0 -1
  383. package/assets/esri/core/workers/chunks/861609ebd3a77b787b0f.js +0 -1
  384. package/assets/esri/core/workers/chunks/869c3927f1e246cd1e42.js +0 -1
  385. package/assets/esri/core/workers/chunks/95371c0f5464f5daae9f.js +0 -1
  386. package/assets/esri/core/workers/chunks/962b99fd273709c726d3.js +0 -1
  387. package/assets/esri/core/workers/chunks/98fbcbb2115376d7ff62.js +0 -1
  388. package/assets/esri/core/workers/chunks/9abcd1d11bfd92f872ab.js +0 -1
  389. package/assets/esri/core/workers/chunks/9b54b5bdb6367c36f6e9.js +0 -1
  390. package/assets/esri/core/workers/chunks/9dab9f6c07ececa7f851.js +0 -1
  391. package/assets/esri/core/workers/chunks/9ff6ce486898713af7e2.js +0 -1
  392. package/assets/esri/core/workers/chunks/a98a435d4dbea73f7517.js +0 -1
  393. package/assets/esri/core/workers/chunks/b05bb6e784e5453696be.js +0 -1
  394. package/assets/esri/core/workers/chunks/b51d0ec283f61f638a48.js +0 -1
  395. package/assets/esri/core/workers/chunks/b5ee6c0c07fa50410370.js +0 -1
  396. package/assets/esri/core/workers/chunks/b9cf8f02974aeb3ce208.js +0 -1
  397. package/assets/esri/core/workers/chunks/bdf13091bd0e1ab0db7e.js +0 -1
  398. package/assets/esri/core/workers/chunks/bef1a1218a94ab6e2b51.js +0 -1
  399. package/assets/esri/core/workers/chunks/c22c2b15fe5f2c97a2ae.js +0 -1
  400. package/assets/esri/core/workers/chunks/c880d2f0ff06b3bf731f.js +0 -1
  401. package/assets/esri/core/workers/chunks/c88869d2a647c22dc3e6.js +0 -1
  402. package/assets/esri/core/workers/chunks/cc96be71fee49f07dcd4.js +0 -1
  403. package/assets/esri/core/workers/chunks/e4237360eef474d1f0ac.js +0 -1
  404. package/assets/esri/core/workers/chunks/e54ae2a4281dd58e0707.js +0 -1
  405. package/assets/esri/core/workers/chunks/e977e721f6f50e3c5f13.js +0 -1
  406. package/assets/esri/core/workers/chunks/ed31cf6688c0f7dac1f9.js +0 -1
  407. package/assets/esri/core/workers/chunks/f07a0ea10428adecea1a.js +0 -1
  408. package/assets/esri/core/workers/chunks/f1eab5c67ed808c18f86.js +0 -1
  409. package/assets/esri/core/workers/chunks/f2e7142a8db164940544.js +0 -1
  410. package/assets/esri/core/workers/chunks/f939b4166f76975f5da0.js +0 -1
  411. package/assets/esri/core/workers/chunks/ff4f4107a866e4a68386.js +0 -1
  412. package/layers/ogc/dateUtils.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5464,7873],{92835:(e,t,r)=>{r.d(t,{Z:()=>y});var i,o=r(43697),n=r(96674),s=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),c=r(30556);let p=i=class extends n.wq{static get allTime(){return d}static get empty(){return h}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,o=e.end?.getTime()??e.end;return t===i&&r===o}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.JE)(r,e,t));let o=this.end;if(o){const r=(0,s.JE)(o,e,t);o=o.getTime()===r.getTime()?r:(0,s.Nm)(r,1,e,t)}return new i({start:r,end:o})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,o=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let s,a;if(o>=t&&o<=r?s=o:t>=o&&t<=n&&(s=t),r>=o&&r<=n?a=r:n>=t&&n<=r&&(a=n),null!=s&&null!=a&&!isNaN(s)&&!isNaN(a)){const e=new i;return e.start=s===-1/0?null:new Date(s),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime)return this.clone();const o=new i,{start:n,end:a}=this;return null!=n&&(o.start=(0,s.Nm)(n,e,t,r)),null!=a&&(o.end=(0,s.Nm)(a,e,t,r)),o}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,o._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,o._)([(0,l.r)("end")],p.prototype,"readEnd",null),(0,o._)([(0,c.c)("end")],p.prototype,"writeEnd",null),(0,o._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,o._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,o._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,o._)([(0,l.r)("start")],p.prototype,"readStart",null),(0,o._)([(0,c.c)("start")],p.prototype,"writeStart",null),p=i=(0,o._)([(0,u.j)("esri.TimeExtent")],p);const d=new p,h=new p({start:void 0,end:void 0}),y=p},46521:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,i,o,n,s,a,l){return[e,t,r,i,o,n,s,a,l]}function n(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>i,c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:n,fromValues:o},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{a:()=>h,c:()=>g,g:()=>c,j:()=>T,k:()=>m,m:()=>p,s:()=>u});var i=r(46521),o=r(94961),n=r(65617),s=r(46851),a=r(17896),l=r(98766);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.g)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],o=t[1],n=t[2],s=t[3],a=r[0],l=r[1],u=r[2],c=r[3];return e[0]=i*c+s*a+o*u-n*l,e[1]=o*c+s*l+n*a-i*u,e[2]=n*c+s*u+i*l-o*a,e[3]=s*c-i*a-o*l-n*u,e}function d(e,t,r,i){const o=t[0],n=t[1],a=t[2],l=t[3];let u,c,p,d,h,y=r[0],m=r[1],g=r[2],f=r[3];return c=o*y+n*m+a*g+l*f,c<0&&(c=-c,y=-y,m=-m,g=-g,f=-f),1-c>(0,s.g)()?(u=Math.acos(c),p=Math.sin(u),d=Math.sin((1-i)*u)/p,h=Math.sin(i*u)/p):(d=1-i,h=i),e[0]=d*o+h*y,e[1]=d*n+h*m,e[2]=d*a+h*g,e[3]=d*l+h*f,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,n=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*n+n]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+n]-t[3*n+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[n]=(t[3*n+r]+t[3*r+n])*i}return e}function m(e,t,r,i){const o=.5*Math.PI/180;t*=o,r*=o,i*=o;const n=Math.sin(t),s=Math.cos(t),a=Math.sin(r),l=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=n*l*c-s*a*u,e[1]=s*a*c+n*l*u,e[2]=s*l*u-n*a*c,e[3]=s*l*c+n*a*u,e}const g=l.c,f=l.s,v=l.a,b=p,w=l.b,S=l.d,_=l.l,x=l.f,I=x,j=l.g,C=j,V=l.n,T=l.h,R=l.e,M=(0,n.c)(),N=(0,n.f)(1,0,0),q=(0,n.f)(0,1,0),z=(0,o.a)(),Z=(0,o.a)(),P=(0,i.a)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){const r=t[0],i=t[1],o=t[2];return e[0]=r,e[1]=i,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-o*o)),e},conjugate:h,copy:g,dot:S,equals:R,exactEquals:T,fromEuler:m,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],o=t[2],n=t[3],s=r*r+i*i+o*o+n*n,a=s?1/s:0;return e[0]=-r*a,e[1]=-i*a,e[2]=-o*a,e[3]=n*a,e},len:I,length:x,lerp:_,mul:b,multiply:p,normalize:V,random:function(e){const t=s.R,r=t(),i=t(),o=t(),n=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=n*Math.sin(2*Math.PI*i),e[1]=n*Math.cos(2*Math.PI*i),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+s*a,e[1]=o*l+n*a,e[2]=n*l-o*a,e[3]=s*l-i*a,e},rotateY:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l-n*a,e[1]=o*l+s*a,e[2]=n*l+i*a,e[3]=s*l-o*a,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+o*a,e[1]=o*l-i*a,e[2]=n*l+s*a,e[3]=s*l-n*a,e},rotationTo:function(e,t,r){const i=(0,a.j)(t,r);return i<-.999999?((0,a.b)(M,N,t),(0,a.k)(M)<1e-6&&(0,a.b)(M,q,t),(0,a.n)(M,M),u(e,M,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.b)(M,t,r),e[0]=M[0],e[1]=M[1],e[2]=M[2],e[3]=1+i,V(e,e))},scale:w,set:f,setAxes:function(e,t,r,i){const o=P;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=i[0],o[4]=i[1],o[7]=i[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],V(e,y(e,o))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,o,n){return d(z,t,o,n),d(Z,r,i,n),d(e,z,Z,2*n*(1-n)),e},sqrLen:C,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function i(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function n(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>i,b:()=>o,c:()=>n});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:i,createView:n,fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},35270:(e,t,r)=>{r.d(t,{B7:()=>l,St:()=>o,VL:()=>s,h$:()=>n,rW:()=>u});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(e){return!!i[e]||!!i[e.toLowerCase()]}function n(e){return i[e]??i[e.toLowerCase()]}function s(e){return[...n(e)]}function a(e,t,r){r<0&&++r,r>1&&--r;const i=6*r;return i<1?e+(t-e)*i:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,i=1){const o=(e%360+360)%360/360,n=r<=.5?r*(t+1):r+t-r*t,s=2*r-n;return[Math.round(255*a(s,n,o+1/3)),Math.round(255*a(s,n,o)),Math.round(255*a(s,n,o-1/3)),i]}function u(e){const t=e.length>5,r=t?8:4,i=(1<<r)-1,o=t?1:17,n=t?9===e.length:5===e.length;let s=Number("0x"+e.substr(1));if(isNaN(s))return null;const a=[0,0,0,1];let l;return n&&(l=s&i,s>>=r,a[3]=o*l/255),l=s&i,s>>=r,a[2]=o*l,l=s&i,s>>=r,a[1]=o*l,l=s&i,s>>=r,a[0]=o*l,a}},68251:(e,t,r)=>{r.d(t,{BV:()=>s});var i=r(22021);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,r,i=0,o=!1){return(r-=i)<e?r+=this.ndiff(e-r):r>t&&(r-=this.ndiff(r-t)),o&&r===t&&(r=e),r+i}normalize(e,t=0,r=!1){return this._normalize(this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.uZ)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+this.ndiff(e-t,r)}minimalMonotonic(e,t,r){return this._normalize(e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}n(new o(0,2*Math.PI)),n(new o(-Math.PI,Math.PI));const s=n(new o(0,360))},44543:(e,t,r)=>{r.d(t,{F:()=>m,M:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},o=8,n=(1<<o)-1;function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*o;r<i;r+=o)t[r>>5]|=(e.charCodeAt(r/o)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=o)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function u(e,t,r,i,o,n){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,n)),o),r)}function c(e,t,r,i,o,n,s){return u(t&r|~t&i,e,t,o,n,s)}function p(e,t,r,i,o,n,s){return u(t&i|r&~i,e,t,o,n,s)}function d(e,t,r,i,o,n,s){return u(t^r^i,e,t,o,n,s)}function h(e,t,r,i,o,n,s){return u(r^(t|~i),e,t,o,n,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,o=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,u=o,y=n;r=c(r,i,o,n,e[t],7,-680876936),n=c(n,r,i,o,e[t+1],12,-389564586),o=c(o,n,r,i,e[t+2],17,606105819),i=c(i,o,n,r,e[t+3],22,-1044525330),r=c(r,i,o,n,e[t+4],7,-176418897),n=c(n,r,i,o,e[t+5],12,1200080426),o=c(o,n,r,i,e[t+6],17,-1473231341),i=c(i,o,n,r,e[t+7],22,-45705983),r=c(r,i,o,n,e[t+8],7,1770035416),n=c(n,r,i,o,e[t+9],12,-1958414417),o=c(o,n,r,i,e[t+10],17,-42063),i=c(i,o,n,r,e[t+11],22,-1990404162),r=c(r,i,o,n,e[t+12],7,1804603682),n=c(n,r,i,o,e[t+13],12,-40341101),o=c(o,n,r,i,e[t+14],17,-1502002290),i=c(i,o,n,r,e[t+15],22,1236535329),r=p(r,i,o,n,e[t+1],5,-165796510),n=p(n,r,i,o,e[t+6],9,-1069501632),o=p(o,n,r,i,e[t+11],14,643717713),i=p(i,o,n,r,e[t],20,-373897302),r=p(r,i,o,n,e[t+5],5,-701558691),n=p(n,r,i,o,e[t+10],9,38016083),o=p(o,n,r,i,e[t+15],14,-660478335),i=p(i,o,n,r,e[t+4],20,-405537848),r=p(r,i,o,n,e[t+9],5,568446438),n=p(n,r,i,o,e[t+14],9,-1019803690),o=p(o,n,r,i,e[t+3],14,-187363961),i=p(i,o,n,r,e[t+8],20,1163531501),r=p(r,i,o,n,e[t+13],5,-1444681467),n=p(n,r,i,o,e[t+2],9,-51403784),o=p(o,n,r,i,e[t+7],14,1735328473),i=p(i,o,n,r,e[t+12],20,-1926607734),r=d(r,i,o,n,e[t+5],4,-378558),n=d(n,r,i,o,e[t+8],11,-2022574463),o=d(o,n,r,i,e[t+11],16,1839030562),i=d(i,o,n,r,e[t+14],23,-35309556),r=d(r,i,o,n,e[t+1],4,-1530992060),n=d(n,r,i,o,e[t+4],11,1272893353),o=d(o,n,r,i,e[t+7],16,-155497632),i=d(i,o,n,r,e[t+10],23,-1094730640),r=d(r,i,o,n,e[t+13],4,681279174),n=d(n,r,i,o,e[t],11,-358537222),o=d(o,n,r,i,e[t+3],16,-722521979),i=d(i,o,n,r,e[t+6],23,76029189),r=d(r,i,o,n,e[t+9],4,-640364487),n=d(n,r,i,o,e[t+12],11,-421815835),o=d(o,n,r,i,e[t+15],16,530742520),i=d(i,o,n,r,e[t+2],23,-995338651),r=h(r,i,o,n,e[t],6,-198630844),n=h(n,r,i,o,e[t+7],10,1126891415),o=h(o,n,r,i,e[t+14],15,-1416354905),i=h(i,o,n,r,e[t+5],21,-57434055),r=h(r,i,o,n,e[t+12],6,1700485571),n=h(n,r,i,o,e[t+3],10,-1894986606),o=h(o,n,r,i,e[t+10],15,-1051523),i=h(i,o,n,r,e[t+1],21,-2054922799),r=h(r,i,o,n,e[t+8],6,1873313359),n=h(n,r,i,o,e[t+15],10,-30611744),o=h(o,n,r,i,e[t+6],15,-1560198380),i=h(i,o,n,r,e[t+13],21,1309151649),r=h(r,i,o,n,e[t+4],6,-145523070),n=h(n,r,i,o,e[t+11],10,-1120210379),o=h(o,n,r,i,e[t+2],15,718787259),i=h(i,o,n,r,e[t+9],21,-343485551),r=s(r,a),i=s(i,l),o=s(o,u),n=s(n,y)}return[r,i,o,n]}function m(e,t=i.Hex){const r=t||i.Base64,n=y(a(e),e.length*o);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,o=4*e.length;i<o;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let o=0;o<4;o++)8*r+6*o>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-o)&63))}return t.join("")}(n)}}},28576:(e,t,r)=>{r.d(t,{B:()=>h});var i=r(20102),o=r(44543),n=r(81153),s=r(17452),a=r(41123),l=r(7628),u=r(31263),c=r(5600),p=r(66094),d=r(25929);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const o=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.Oe)(t,r);return{type:String,read:(e,t,r)=>{const o=(0,d.r)(e,t,r);return i.type===String?o:"function"==typeof i.type?new i.type({url:o}):void 0},write:{writer(t,o,a,l){if(!l||!l.resources)return"string"==typeof t?void(o[a]=(0,d.t)(t,l)):void(o[a]=t.write({},l));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...l,verifyItemRelativeUrls:l&&l.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),f=i.type!==String&&(!(0,n.l)(this)||l&&l.origin&&this.originIdOf(r)>(0,u.M9)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:o,targetPropertyName:a,context:l,params:e};l&&l.portalItem&&h&&!(0,s.YP)(h)?f&&e?.contentAddressed?y(v):f?function(e){const{context:t,targetUrl:r,params:i,value:o,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=g(o,r,t),c=(0,p.B)(u),d=(0,s.Ml)(l.path),h=i?.compress??!1;c===d?(t.resources&&m({...e,resource:l,content:u,compress:h,updates:t.resources.toUpdate}),n[a]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l&&l.portalItem&&(null==h||null!=(0,d.i)(h)||(0,s.jc)(h)||f)?y(v):o[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.a;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,c.CJ)(r,e,i);for(const e in o)t[e]=o[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:l,dest:u,targetPropertyName:c}=e;if(!l.portalItem)return;const h=(0,d.p)(t),y=g(n,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new i.Z("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const f=r?.contentAddressed&&"json"===y.type?(0,o.F)(y.jsonString):h?.filename??(0,a.D)(),v=(0,s.v_)(r?.prefix??h?.prefix,f),b=`${v}.${(0,p.B)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find((e=>e.resource.path===b))??l.resources.toAdd.find((e=>e.resource.path===b));if(e)return void(u[c]=e.resource.itemRelativeUrl)}const w=l.portalItem.resourceFromPath(b);(0,s.jc)(t)&&l.resources&&l.resources.pendingOperations.push((0,s.gi)(t).then((e=>{w.path=`${v}.${(0,p.B)({type:"blob",blob:e})}`,u[c]=w.itemRelativeUrl})).catch((()=>{})));const S=r?.compress??!1;l.resources&&m({...e,resource:w,content:y,compress:S,updates:l.resources.toAdd}),u[c]=w.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:i,content:o,compress:n}){r.push({resource:i,content:o,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},65845:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},70921:(e,t,r)=>{r.d(t,{R:()=>n,Z:()=>o});var i=r(46791);function o(e,t,r=i.Z){return t||(t=new r),t===e||(t.removeAll(),(o=e)&&(Array.isArray(o)||"items"in o&&Array.isArray(o.items))?t.addMany(e):e&&t.add(e)),t;var o}function n(e){return e}},81153:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>i})},35463:(e,t,r)=>{r.d(t,{JE:()=>a,Nm:()=>s,rJ:()=>l});var i=r(23756),o=r(17126);const n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function s(e,t,r,n="system"){const s=new o.vF((0,i.f1)(n)),a=o.ou.fromJSDate(e,{zone:s}),l="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),a.plus({[l]:t}).toJSDate()}function a(e,t,r="system"){const n=new o.vF((0,i.f1)(r)),s=o.ou.fromJSDate(e,{zone:n});if("decades"===t||"centuries"===t){const e=s.startOf("year"),{year:r}=e,i=r-r%("decades"===t?10:100);return e.set({year:i}).toJSDate()}const a=u(t);return s.startOf(a).toJSDate()}function l(e,t,r){return 0===e?0:e*n[t]/n[r]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},41123:(e,t,r)=>{r.d(t,{D:()=>o,z:()=>n});const i="randomUUID"in crypto;function o(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${o()}}`}},79235:(e,t,r)=>{r.d(t,{Z:()=>b});var i,o=r(43697),n=r(67676),s=r(35454),a=r(96674),l=r(67900),u=r(20941),c=r(5600),p=(r(75215),r(80442),r(71715)),d=r(52011),h=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.e$)(m,"orthometric");const g=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new u.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,c.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,o._)([(0,h.c)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,o._)([(0,p.r)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,o._)([(0,c.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,o._)([(0,p.r)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,o._)([(0,p.r)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,o._)([(0,c.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,o._)([(0,p.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,o._)([(0,d.j)("esri.geometry.HeightModelInfo")],f);const b=f},23756:(e,t,r)=>{r.d(t,{Ze:()=>S,Xr:()=>g,p6:()=>_,f1:()=>I});var i=r(35454),o=r(70171);const n="system",s="unknown",a="UTC";r(17126);const l=Intl.DateTimeFormat().resolvedOptions().timeZone,u={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},p={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},h={hour:"numeric",minute:"numeric"},y={...h,second:"numeric"},m={"short-date":u,"short-date-short-time":{...u,...h},"short-date-short-time-24":{...u,...h,hour12:!1},"short-date-long-time":{...u,...y},"short-date-long-time-24":{...u,...y,hour12:!1},"short-date-le":u,"short-date-le-short-time":{...u,...h},"short-date-le-short-time-24":{...u,...h,hour12:!1},"short-date-le-long-time":{...u,...y},"short-date-le-long-time-24":{...u,...y,hour12:!1},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...h},"long-month-day-year-short-time-24":{...c,...h,hour12:!1},"long-month-day-year-long-time":{...c,...y},"long-month-day-year-long-time-24":{...c,...y,hour12:!1},"day-short-month-year":p,"day-short-month-year-short-time":{...p,...h},"day-short-month-year-short-time-24":{...p,...h,hour12:!1},"day-short-month-year-long-time":{...p,...y},"day-short-month-year-long-time-24":{...p,...y,hour12:!1},"long-date":d,"long-date-short-time":{...d,...h},"long-date-short-time-24":{...d,...h,hour12:!1},"long-date-long-time":{...d,...y},"long-date-long-time-24":{...d,...y,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":h,"long-time":y},g=(0,i.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),f={ar:"ar-u-nu-latn-ca-gregory"};let v=new WeakMap;const b=m["short-date-short-time"];function w(e){let t=v.get(e);if(!t){const r=(0,o.Kd)(),i=f[r]||r,n=x(e);t=new Intl.DateTimeFormat(i,n),v.set(e,t)}return t}function S(e){return m[e]}function _(e,t=b){return w(t).format(e)}function x(e){const t=I(e.timeZone??n);return{...e,timeZone:t}}function I(e){switch(e){case n:return l;case s:return a;default:return e}}(0,o.Ze)((()=>{v=new WeakMap}))},28865:(e,t,r)=>{r.r(t),r.d(t,{default:()=>He});var i=r(43697),o=r(51773),n=r(46791),s=r(20102),a=r(92604),l=r(16453),u=r(95330),c=r(5600),p=r(75215),d=(r(67676),r(80442),r(71715)),h=r(52011),y=r(17896),m=r(65617),g=r(6570),f=r(87085),v=r(54295),b=r(17287),w=r(38009),S=r(16859),_=r(72965),x=r(20559),I=r(66677),j=r(21506),C=r(1231),V=r(2368),T=r(68251),R=r(96674),M=r(28576),N=r(51305),q=r(94961),z=r(46851);const Z=(0,m.c)(),P=(0,q.a)(),A=(0,q.a)(),D=(0,q.a)(),F=(0,m.f)(0,0,1),L=(0,m.f)(0,1,0),k=(0,m.f)(1,0,0);function E(e){(0,y.c)(Z,e),(0,y.n)(Z,Z);const t=Math.atan2(Z[1],Z[0]),r=(0,N.s)((0,q.a)(),F,-t);(0,y.v)(Z,Z,r);const i=-1*Math.atan2(Z[2],Z[0]);return[(0,z.a)(t)+270,(0,z.a)(i)+90]}function U(e,t){return(0,N.s)(A,F,(0,z.t)(e-270)),(0,N.s)(D,L,(0,z.t)(t-90)),(0,N.m)(P,A,D),(0,y.c)(Z,k),(0,y.v)(Z,Z,P),(0,y.n)(Z,Z),[Z[0],Z[1],Z[2]]}var O=r(90578);let B=class extends((0,V.J)(R.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return T.BV.normalize((0,p.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return T.BV.normalize((0,p.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.Cb)({type:Boolean,json:{write:!0}})],B.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],B.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,O.p)((e=>T.BV.normalize((0,p.q9)(e),0,!0)))],B.prototype,"orientation",null),(0,i._)([(0,c.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,O.p)((e=>T.BV.normalize((0,p.q9)(e),0,!0)))],B.prototype,"tilt",null),(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],B.prototype,"normal",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],B.prototype,"point",void 0),B=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSlice")],B);const $=B;var J=r(25929);let K=class extends((0,V.J)(R.wq)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return T.BV.normalize((0,p.q9)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return T.BV.normalize((0,p.q9)(t),0,!0)}};(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!0,write:!0}})],K.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:String,json:{origins:{service:{read:J.r}},write:{enabled:!0,isRequired:!0}}}),(0,M.B)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],K.prototype,"href",void 0),(0,i._)([(0,c.Cb)({type:p.z8,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"id",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],K.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],K.prototype,"orientation",null),(0,i._)([(0,c.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],K.prototype,"tilt",null),(0,i._)([(0,c.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"normal",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"point",void 0),(0,i._)([(0,c.Cb)({type:[p.z8],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"sizeInPixel",void 0),(0,i._)([(0,c.Cb)({type:[$],json:{write:!0}})],K.prototype,"slices",void 0),(0,i._)([(0,c.Cb)({type:p.z8,json:{default:0,write:!0}})],K.prototype,"timeId",void 0),(0,i._)([(0,c.Cb)({type:p.z8,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"variableId",void 0),K=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSection")],K);const H=K;let Y=class extends R.wq{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,c.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"diffuseFactor",void 0),(0,i._)([(0,c.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"specularFactor",void 0),Y=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelSimpleShading")],Y);const W=Y;let G=class extends R.wq{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,c.Cb)({type:["discrete","continuous"],json:{write:!0}})],G.prototype,"continuity",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{write:!0}})],G.prototype,"hasNoData",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],G.prototype,"noData",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],G.prototype,"offset",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],G.prototype,"scale",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],G.prototype,"type",void 0),G=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelFormat")],G);const Q=G;let X=class extends R.wq{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"id",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],X.prototype,"description",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"name",void 0),(0,i._)([(0,c.Cb)({type:Q,json:{write:!0}})],X.prototype,"originalFormat",void 0),(0,i._)([(0,c.Cb)({type:Q,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"renderingFormat",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],X.prototype,"unit",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],X.prototype,"volumeId",void 0),(0,i._)([(0,c.Cb)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],X.prototype,"type",void 0),X=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVariable")],X);const ee=X;var te=r(22974),re=r(22303);let ie=class extends((0,V.J)(R.wq)){constructor(){super(...arguments),this.color=re.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,c.Cb)({type:re.Z,json:{type:[p.z8],write:{enabled:!0,isRequired:!0}}})],ie.prototype,"color",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ie.prototype,"value",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!0,write:!0}})],ie.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],ie.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!1,write:!0}})],ie.prototype,"colorLocked",void 0),ie=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelIsosurface")],ie);const oe=ie;var ne=r(70921),se=r(22021);let ae=class extends((0,V.J)(R.wq)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,c.Cb)({type:re.Z,json:{type:[p.z8],write:{enabled:!0,isRequired:!0}}})],ae.prototype,"color",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelColorStop")],ae);const le=ae;let ue=class extends((0,V.J)(R.wq)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,c.Cb)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],ue.prototype,"opacity",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ue.prototype,"position",void 0),ue=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelOpacityStop")],ue);const ce=ue;let pe=class extends((0,V.J)(R.wq)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!1,write:!0}})],pe.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],pe.prototype,"range",void 0),pe=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelRangeFilter")],pe);const de=pe;var he,ye;(ye=he||(he={}))[ye.Color=1]="Color",ye[ye.Alpha=2]="Alpha",ye[ye.Both=3]="Both";let me=class extends((0,V.J)(R.wq)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(n.Z.ofType(le)),this.opacityStops=new(n.Z.ofType(ce))}set colorStops(e){this._set("colorStops",(0,ne.Z)(e,this._get("colorStops"),n.Z.ofType(le)))}set opacityStops(e){this._set("opacityStops",(0,ne.Z)(e,this._get("opacityStops"),n.Z.ofType(ce)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==he.Both;);let o=e;const n=t.length;for(;++o<n&&t[o].type!==r&&t[o].type!==he.Both;);return[i,o]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:he.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,se.uZ)(e.position,0,1),i=Math.round(255*(0,se.uZ)(1-e.opacity,0,1));let o=!1;for(const e of r)if(e.type===he.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=he.Both,o=!0;break}o||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:he.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==he.Both)if(i.type===he.Color){const[o,n]=this.getPreviousNext(t,r,he.Alpha);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position);i.color.a=Math.round((0,se.t7)(r[o].color.a,r[n].color.a,e))}else i.color.a=-1!==o?r[o].color.a:r[n].color.a}else{const[o,n]=this.getPreviousNext(t,r,he.Color);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position),t=r[o].color,s=r[n].color;fe.forEach((r=>{i.color[r]=Math.round((0,se.t7)(t[r],s[r],e))}))}else-1!==o?fe.forEach((e=>{i.color[e]=r[o].color[e]})):fe.forEach((e=>{i.color[e]=r[n].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,o=1;for(let r=0;r<this._colorMapSize;++r){const n=r/this._colorMapSize;for(;n>t[o].position;)i=o++;const s=(n-t[i].position)/(t[o].position-t[i].position),a=t[i].color,l=t[o].color,u=new re.Z;fe.forEach((e=>{u[e]=Math.round((0,se.t7)(a[e],l[e],s))})),u.a=(0,se.uZ)(1-(0,se.t7)(a.a,l.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],o=this.stretchRange[1];if(i>o){const e=i;i=o,o=e}e=(0,se.uZ)(e,i,o);const n=r[Math.round((e-i)/(o-i)*(this._colorMapSize-1))].clone();return t||(n.a=1),n}};(0,i._)([(0,c.Cb)({type:["linear","nearest"],json:{write:!0}})],me.prototype,"interpolation",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],me.prototype,"stretchRange",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(le),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],me.prototype,"colorStops",null),(0,i._)([(0,c.Cb)({type:n.Z.ofType(ce),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],me.prototype,"opacityStops",null),(0,i._)([(0,c.Cb)({type:de,json:{write:!0}})],me.prototype,"rangeFilter",void 0),(0,i._)([(0,c.Cb)({type:[re.Z],clonable:!1,json:{read:!1}})],me.prototype,"rasterizedTransferFunction",null),me=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelTransferFunctionStyle")],me);const ge=me,fe=["r","g","b"];let ve=class extends((0,V.J)(R.wq)){constructor(){super(...arguments),this.color=re.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,c.Cb)({type:re.Z,json:{type:[p.z8],write:{enabled:!0,isRequired:!0}}})],ve.prototype,"color",void 0),(0,i._)([(0,c.Cb)({type:p.z8,json:{write:{enabled:!0,isRequired:!0}}})],ve.prototype,"value",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!0,write:!0}})],ve.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],ve.prototype,"label",void 0),ve=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelUniqueValue")],ve);const be=ve;var we;let Se=we=class extends R.wq{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(n.Z.ofType(be)),this.isosurfaces=new(n.Z.ofType(oe))}clone(){return new we({variableId:this.variableId,label:this.label,transferFunction:(0,te.d9)(this.transferFunction),uniqueValues:(0,te.d9)(this.uniqueValues),isosurfaces:(0,te.d9)(this.isosurfaces)})}};(0,i._)([(0,c.Cb)({type:p.z8,json:{write:{enabled:!0,isRequired:!0}}})],Se.prototype,"variableId",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],Se.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:ge,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],Se.prototype,"transferFunction",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(be),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],Se.prototype,"uniqueValues",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(oe),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],Se.prototype,"isosurfaces",void 0),Se=we=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVariableStyle")],Se);const _e=Se;var xe=r(94139),Ie=r(82971),je=r(8744);let Ce=class extends R.wq{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],Ce.prototype,"values",void 0),Ce=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelIrregularSpacing")],Ce);const Ve=Ce;let Te=class extends R.wq{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],Te.prototype,"scale",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],Te.prototype,"offset",void 0),Te=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelRegularSpacing")],Te);const Re=Te;let Me=class extends R.wq{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,c.Cb)({type:Ve,json:{write:!0}})],Me.prototype,"irregularSpacing",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{write:!0}})],Me.prototype,"isPositiveUp",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{write:!0}})],Me.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],Me.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],Me.prototype,"name",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],Me.prototype,"quantity",void 0),(0,i._)([(0,c.Cb)({type:Re,json:{write:!0}})],Me.prototype,"regularSpacing",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:!0}})],Me.prototype,"size",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],Me.prototype,"unit",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{read:!1}})],Me.prototype,"isRegular",null),Me=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelDimension")],Me);const Ne=Me,qe="esri.layers.voxel.VoxelVolume",ze=a.Z.getLogger(qe);let Ze=class extends R.wq{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=Ie.Z.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],o=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)o[e]<2?o[e]=1:o[e]-=1;return r.isRegular&&!r.isPositiveUp&&(o[2]*=-1),[(e[1]-e[0])/o[0],(t[1]-t[0])/o[1],(i[1]-i[0])/o[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return ze.error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,je.fS)(this.spatialReference,e.spatialReference))return ze.error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,m.f)(e.x,e.y,e.z??0);(0,y.f)(t,t,this.originInLayerSpace3D),(0,y.B)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,o=r.irregularSpacing.values,n=r.isPositiveUp?1:-1,s=o.reduce(((e,t)=>Math.abs(n*t-i)<Math.abs(n*e-i)?t:e));for(let e=0;e<o.length;++e)if(o[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new xe.Z({x:0,y:0,spatialReference:this.spatialReference});const t=(0,m.e)(e);if((0,y.A)(t,t,this.voxelSizeInLayerSpaceSigned),(0,y.g)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new xe.Z({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new xe.Z({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Ze.prototype,"id",void 0),(0,i._)([(0,c.Cb)({type:[Ne],json:{write:{enabled:!0,isRequired:!0}}})],Ze.prototype,"dimensions",void 0),(0,i._)([(0,c.Cb)({type:Ie.Z,json:{read:{enabled:!1}}})],Ze.prototype,"spatialReference",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{read:!1}})],Ze.prototype,"zDimension",null),(0,i._)([(0,c.Cb)({type:[Boolean],json:{read:!1}})],Ze.prototype,"isValid",null),(0,i._)([(0,c.Cb)({type:[Number],json:{read:!1}})],Ze.prototype,"originInLayerSpace3D",null),(0,i._)([(0,c.Cb)({type:[Number],json:{read:!1}})],Ze.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,c.Cb)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Ze.prototype,"volumeType",null),(0,i._)([(0,c.Cb)({type:[Number],json:{read:!1}})],Ze.prototype,"sizeInVoxels",null),Ze=(0,i._)([(0,h.j)(qe)],Ze);const Pe=Ze;var Ae;let De=Ae=class extends R.wq{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Ae;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"apronWidth",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"brickSize",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"maxLodLevel",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],De.prototype,"nodeSize",void 0),De=Ae=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVolumeIndex")],De);const Fe=De;let Le=class extends((0,V.J)(R.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return T.BV.normalize((0,p.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=E(this.normal);return T.BV.normalize((0,p.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.Cb)({type:Boolean,json:{default:!0,write:!0}})],Le.prototype,"enabled",void 0),(0,i._)([(0,c.Cb)({type:String,json:{write:!0}})],Le.prototype,"label",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,O.p)((e=>T.BV.normalize((0,p.q9)(e),0,!0)))],Le.prototype,"orientation",null),(0,i._)([(0,c.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,O.p)((e=>T.BV.normalize((0,p.q9)(e),0,!0)))],Le.prototype,"tilt",null),(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],Le.prototype,"normal",void 0),(0,i._)([(0,c.Cb)({type:[Number],json:{write:!0}})],Le.prototype,"point",void 0),Le=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelDynamicSection")],Le);const ke=Le;var Ee;let Ue=Ee=class extends R.wq{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(n.Z.ofType($)),this.dynamicSections=new(n.Z.ofType(ke))}set slices(e){this._set("slices",(0,ne.Z)(e,this._get("slices"),n.Z.ofType($)))}set dynamicSections(e){this._set("dynamicSections",(0,ne.Z)(e,this._get("dynamicSections"),n.Z.ofType(ke)))}clone(){return new Ee({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,te.d9)(this.slices),dynamicSections:(0,te.d9)(this.dynamicSections)})}};(0,i._)([(0,c.Cb)({type:p.z8,json:{write:{enabled:!0,isRequired:!0}}})],Ue.prototype,"volumeId",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{default:1,write:!0}})],Ue.prototype,"verticalExaggeration",void 0),(0,i._)([(0,c.Cb)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Ue.prototype,"exaggerationMode",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{default:0,write:!0}})],Ue.prototype,"verticalOffset",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType($),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Ue.prototype,"slices",null),(0,i._)([(0,c.Cb)({type:n.Z.ofType(ke),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Ue.prototype,"dynamicSections",null),Ue=Ee=(0,i._)([(0,h.j)("esri.layers.voxel.VoxelVolumeStyle")],Ue);const Oe=Ue;var Be=r(32163);const $e="esri.layers.VoxelLayer",Je=a.Z.getLogger($e);let Ke=class extends((0,x.Vt)((0,b.Y)((0,w.q)((0,S.I)((0,_.M)((0,l.R)((0,v.V)(f.Z)))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new W,this.opacity=1,this.variables=new n.Z,this.volumes=new n.Z,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!1,this.test=null,this.volumeStyles=new(n.Z.ofType(Oe)),this.variableStyles=new(n.Z.ofType(_e)),this.sections=new(n.Z.ofType(H))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,I.Nm)(e,Je))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.r9).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new s.Z("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new s.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new s.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=g.Z.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Pe.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new C.Z({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new C.Z({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new C.Z({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new C.Z({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new C.Z({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new C.Z({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get popupTemplate(){return this.loaded?this.createPopupTemplate():null}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Be.eZ)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const o=this.variableStyles.findIndex((t=>t.variableId===e));if(o<0)return null;const n=this.variableStyles.at(o);return n?.transferFunction?n.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new H({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),Je.error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&Je.error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(Je.error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)Je.error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else Je.error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else Je.error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,m.f)(e.normal[0],e.normal[1],e.normal[2]);return(0,y.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,c.Cb)({type:["Voxel"]})],Ke.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.Cb)(j.rn)],Ke.prototype,"legendEnabled",void 0),(0,i._)([(0,c.Cb)({json:{write:!0}})],Ke.prototype,"title",void 0),(0,i._)([(0,c.Cb)(j.HQ)],Ke.prototype,"url",null),(0,i._)([(0,c.Cb)({type:n.Z.ofType(H),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],Ke.prototype,"sections",void 0),(0,i._)([(0,c.Cb)({type:p.z8,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],Ke.prototype,"currentVariableId",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(Oe),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],Ke.prototype,"volumeStyles",void 0),(0,i._)([(0,c.Cb)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],Ke.prototype,"renderMode",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(_e),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],Ke.prototype,"variableStyles",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],Ke.prototype,"enableSlices",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],Ke.prototype,"enableSections",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],Ke.prototype,"enableDynamicSections",void 0),(0,i._)([(0,c.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],Ke.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,c.Cb)({type:W,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],Ke.prototype,"shading",void 0),(0,i._)([(0,c.Cb)({type:["show","hide"]})],Ke.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Ke.prototype,"opacity",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(ee)})],Ke.prototype,"variables",void 0),(0,i._)([(0,c.Cb)({type:n.Z.ofType(Pe)})],Ke.prototype,"volumes",void 0),(0,i._)([(0,c.Cb)({type:Fe})],Ke.prototype,"index",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],Ke.prototype,"minScale",void 0),(0,i._)([(0,c.Cb)({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],Ke.prototype,"maxScale",void 0),(0,i._)([(0,c.Cb)({json:{read:!1},readOnly:!0})],Ke.prototype,"type",void 0),(0,i._)([(0,c.Cb)({readOnly:!0,json:{name:"serviceVersion"}})],Ke.prototype,"version",void 0),(0,i._)([(0,d.r)("service","version")],Ke.prototype,"readVersion",null),(0,i._)([(0,c.Cb)({type:g.Z})],Ke.prototype,"fullExtent",void 0),(0,i._)([(0,d.r)("service","fullExtent",["fullExtent"])],Ke.prototype,"readFullExtent",null),(0,i._)([(0,c.Cb)({readOnly:!0,clonable:!1,json:{read:!1}})],Ke.prototype,"voxelFields",null),(0,i._)([(0,c.Cb)({type:Boolean,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,ignoreOrigin:!0,writer(e,t,r){t[r]=!e}},origins:{"portal-item":{default:!0},"web-scene":{default:!0}}}})],Ke.prototype,"popupEnabled",void 0),(0,i._)([(0,c.Cb)({type:o.Z,json:{read:!1}})],Ke.prototype,"popupTemplate",null),(0,i._)([(0,c.Cb)({readOnly:!0})],Ke.prototype,"defaultPopupTemplate",null),Ke=(0,i._)([(0,h.j)($e)],Ke);const He=Ke},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{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._)([(0,o.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),o=r(92604),n=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,o.Z.getLogger(this)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,s.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>_});var i=r(43697),o=r(68773),n=r(40330),s=r(3172),a=r(66643),l=r(20102),u=r(92604),c=r(70586),p=r(95330),d=r(17452),h=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),g=r(30556),f=r(84230),v=r(48522),b=r(15235),w=r(86082),S=r(14661);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async setUserPrivileges(e,t){if(!o.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,S.Ss)(r);let o,s;if(i)o=r.portal.url;else try{o=await(0,f.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!o||!(0,d.Zo)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return(0,S.Ss)(r)}catch(e){(0,p.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=v.Z.getDefault();if(o&&o.loaded&&(0,d.Fv)(o.restUrl)===(0,d.Fv)(i))return o.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.q6)((0,s.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?w.Z.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||v.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},x={credential:null,user:null}},72965:(e,t,r)=>{r.d(t,{M:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20559:(e,t,r)=>{r.d(t,{xp:()=>L,Vt:()=>z});var i=r(43697),o=r(3172),n=r(20102),s=r(92604),a=r(95330),l=r(17452),u=r(5600),c=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),d=r(30556),h=r(65845),y=r(6570),m=r(79235),g=r(82971),f=r(66677),v=r(21506),b=r(61064);var w=r(48522),S=r(15235),_=r(66643),x=r(41123),I=r(97873);async function j(e,t,r=null){const i=await V(e,t,r);await T(i,t,r)}async function C(e,t,r,i,o=null){const n=await V(r,i,o);await e.update({data:t}),await T(n,i,o)}async function V(e,t,r=null){if(!t||!t.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const o=new Set(t.resources.toKeep.map((e=>e.resource.path))),s=new Set,l=[];o.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const n of t.resources.toUpdate)if(i.delete(n.resource.path),o.has(n.resource.path)||s.has(n.resource.path)){const{resource:t,content:i,finish:o,error:s}=n,a=(0,I.W7)(t,(0,x.D)());e.paths.push(a.path),l.push(R({resource:a,content:i,compress:n.compress,finish:o,error:s},r))}else e.paths.push(n.resource.path),l.push(M(n,r)),s.add(n.resource.path);for(const o of t.resources.toAdd)e.paths.push(o.resource.path),i.has(o.resource.path)?i.delete(o.resource.path):l.push(R(o,r));if(0===l.length)return i;const u=await(0,a.UO)(l);if((0,a.k_)(r),u.length>0)throw new n.Z("save:resources","Failed to save one or more resources",{errors:u});return i}async function T(e,t,r=null){if(!e||!t.portalItem)return;const i=[];for(const o of e){const e=t.portalItem.resourceFromPath(o);i.push(e.portalItem.removeResource(e,r))}await(0,a.as)(i)}async function R(e,t){const r={...null!=t?t:{},compress:e.compress},i=await(0,_.q6)(e.resource.portalItem.addResource(e.resource,await(0,I.FO)(e.content),r));if(!0!==i.ok)throw e.error?.(i.error),i.error;e.finish?.(e.resource)}async function M(e,t){const r=await(0,_.q6)(e.resource.update(await(0,I.FO)(e.content),t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}const N="esri.layers.mixins.SceneService",q=s.Z.getLogger(N),z=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.Ds)((async(e,t,r)=>{switch(e){case L.SAVE:return this._save(t);case L.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return g.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=i?new g.Z(i):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return y.Z.fromJSON(i,r)}const i=t.store,o=this._readSpatialReference(t);return null==o||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<Z))?null:new y.Z({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:o})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,f.a7)(this.url,t.name);let i=t.name;if(!i&&this.url){const e=(0,f.Qc)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,f.ld)(i)}set url(e){const t=(0,f.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:q});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,f.wH)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,l.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,b.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,q,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new n.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<Z||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,o=r.obb.center[2],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=o-s,this.fullExtent.zmax=o+s}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<Z)return;const r=t[2],i=t[3],{fullExtent:o}=this;o&&(o.zmin=r-i,o.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,o.Z)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,o.Z)(this.parsedUrl?.path??"",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,o.Z)(this.parsedUrl?.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===P.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...F,...t};let i=S.default.from(e);i||(q.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new n.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),i.id&&(i=i.clone(),i.id=null);const o=i.portal||w.Z.getDefault();await this._ensureLoadBeforeSave(),i.type=D,i.portal=o;const s={origin:"portal-item",url:null,messages:[],portal:o,portalItem:i,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},a={layers:[this.write({},s)]};return await Promise.all(s.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,s,r),i.url=this.url,i.title||(i.title=this.title),this._updateTypeKeywords(i,r,P.newItem),await o.signIn(),await(o.user?.addItem({item:i,folder:r&&r.folder,data:a})),await j(this.resourceReferences,s,null),this.portalItem=i,(0,h.D)(s),s.portalItem=i,i}async _save(e){const t={...F,...e};if(!this.portalItem)throw q.error("_save(): requires the .portalItem property to be set"),new n.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==D)throw q.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+D),new n.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${D}"`);await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,l.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||w.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,P.existingItem),await C(this.portalItem,i,this.resourceReferences,r,null),(0,h.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let i=t.messages?.filter((e=>"error"===e.type)).map((e=>new n.Z(e.name,e.message,e.details)))??[];r?.validationOptions?.ignoreUnsupported&&(i=i.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name)));const o=r?.validationOptions,s=o?.enabled,a=null;if(s&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(q.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===o.failPolicy){const e=t.map((e=>new n.Z("sceneservice:schema-validation",e))).concat(i);throw new n.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(i.length>0)throw new n.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}};return(0,i._)([(0,u.Cb)(v.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:g.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,c.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.Cb)({type:y.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,c.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,u.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,c.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,u.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,u.Cb)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,c.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,c.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,u.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,u.Cb)(v.HQ)],t.prototype,"url",null),(0,i._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,u.Cb)()],t.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,p.j)(N)],t),t},Z=-1e38;var P,A;(A=P||(P={}))[A.existingItem=0]="existingItem",A[A.newItem=1]="newItem";const D="Scene Service",F={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var L;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(L||(L={}))},61064:(e,t,r)=>{r.d(t,{T:()=>n});var i=r(3172),o=r(20102);async function n(e,t,r,n,s,a){let l=null;if(null!=r){const t=`${e}/nodepages/`,o=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.Z)(o,{query:{f:"json",token:n},responseType:"json",signal:a})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=s&&s.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",o,e),l=e}}if(!t)return null;const u=`${e}/nodes/`,c=u+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,i.Z)(c,{query:{f:"json",token:n},responseType:"json",signal:a})).data,urlPrefix:u}}catch(e){throw new o.Z("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:e,url:c})}}},66094:(e,t,r)=>{r.d(t,{B:()=>o});var i=r(17452);function o(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Ml)(e);return l[t]||s}(e.url)}(e)]||a}const n={},s="text/plain",a=n[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},97873:(e,t,r)=>{r.d(t,{FO:()=>p,W7:()=>d,addOrUpdateResource:()=>a,fetchResources:()=>s,removeAllResources:()=>u,removeResource:()=>l});var i=r(3172),o=r(20102),n=r(17452);async function s(e,t={},r){await e.load(r);const i=(0,n.v_)(e.itemUrl,"resources"),{start:o=1,num:s=10,sortOrder:a="asc",sortField:l="created"}=t,u={query:{start:o,num:s,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},c=await e.portal.request(i,u);return{total:c.total,nextStart:c.nextStart,resources:c.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function a(e,t,r,i){if(!e.hasPath())throw new o.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const s=e.portalItem;await s.load(i);const a=(0,n.v_)(s.userItemUrl,"add"===t?"addResources":"updateResources"),[l,u]=c(e.path),p=new FormData;return l&&"."!==l&&p.append("resourcesPrefix",l),null!=i&&i.compress&&p.append("compress","true"),p.append("fileName",u),p.append("file",r,u),p.append("f","json"),null!=i&&i.access&&p.append("access",i.access),await s.portal.request(a,{method:"post",body:p,signal:i?.signal}),e}async function l(e,t,r){if(!t.hasPath())throw new o.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,n.v_)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,n.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function c(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,i.Z)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[r,,i]=function(e){const[t,r]=function(e){const t=(0,n.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,o]=c(t);return[i,o,r]}(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+i))}},32163:(e,t,r)=>{r.d(t,{eZ:()=>u});var i=r(51773),o=r(35671),n=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(29986);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},h){if(!r)return null;const m=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new a.Z({fieldName:t.name,isEditable:(0,o.Hp)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!m.length)return null;const g=function(e){const t=(0,o.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),f=[new s.Z,new n.Z];return new i.Z({title:g,content:f,fieldInfos:m})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,o.Fv)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"string":return(0,o.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null;default:return null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5286],{88764:(e,t,s)=>{s.d(t,{q:()=>l});var i,r,a,n=s(5732),o={exports:{}};i=o,r=function(){function e(s,i,r,a,n){for(;a>r;){if(a-r>600){var o=a-r+1,l=i-r+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-l*c/o+h)),Math.min(a,Math.floor(i+(o-l)*c/o+h)),n)}var d=s[i],f=r,p=a;for(t(s,r,i),n(s[a],d)>0&&t(s,r,a);f<p;){for(t(s,f,p),f++,p--;n(s[f],d)<0;)f++;for(;n(s[p],d)>0;)p--}0===n(s[r],d)?t(s,r,p):t(s,++p,a),p<=i&&(r=p+1),i<=p&&(a=p-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,a,n){e(t,i,r||0,a||t.length-1,n||s)}},void 0!==(a=r())&&(i.exports=a);const l=(0,n.g)(o.exports)},95528:(e,t,s)=>{s.d(t,{t:()=>o});var i=s(22974),r=s(58971),a=s(10661);class n{constructor(e,t){this._observable=new a.s,this._value=e,this._equalityFunction=t}get value(){return(0,r.it)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=i.y7){return new n(e,t)}},37455:(e,t,s)=>{s.d(t,{N:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),a=e.hasZ(t),n=e.hasM(t);return a&&(i.z=e.getPointZ(t)),n&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),a=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);a.zmin=s.vmin,a.zmax=s.vmax}if(r){const s=e.getMExtent(t);a.mmin=s.vmin,a.mmax=s.vmax}return a}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class a{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class n{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},11028:(e,t,s)=>{s.d(t,{q:()=>De});var i=s(67676),r=s(20102),a=s(22974),n=s(70586),o=s(69801),l=s(95330),u=s(67900),c=s(73615),h=s(60437),d=s(24470),f=s(20322),p=s(33955),m=s(16306),g=s(8744),_=s(98732),y=s(35454),x=s(13867),S=s(8968);const E=new class{constructor(e,t){this._cache=new x.z(e),this._invalidCache=new x.z(t)}get(e,t){const s=`${t.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(void 0!==this._invalidCache.get(s))return null;try{const i=S.WhereClause.create(e,t);return this._cache.put(s,i),i}catch{return this._invalidCache.put(s,null),null}}}(50,500),R="feature-store:unsupported-query",T=" as ",I=new y.X({esriFieldTypeString:"string"}),F=new y.X({esriFieldTypeOID:"oid",esriFieldTypeSmallInteger:"small-integer",esriFieldTypeBigInteger:"big-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long"}),w=new y.X({esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),A=new y.X({esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id"}),b=new Set([...F.jsonValues,...w.jsonValues,...I.jsonValues,...A.jsonValues]),v=new Intl.ListFormat("en-US",{type:"conjunction"}).format([...F.apiValues,...w.apiValues,...I.apiValues,...A.apiValues]);function C(e,t,s={}){const i=P(e,t);if(!i)throw new r.Z(R,"invalid SQL expression",{expression:e});const a=s.expressionName||"expression";if(s.validateStandardized&&!i.isStandardized)throw new r.Z(R,`${a} is not standard`,{expression:e});if(s.validateAggregate&&!i.isAggregate)throw new r.Z(R,`${a} does not contain a valid aggregate function`,{expression:e});return i.fieldNames}function N(e,t,s,i){if(!t)return!0;const a="having",n=C(t,e,{validateAggregate:!0,expressionName:a});O(e,n,{expressionName:a,query:i}),M(e,n,{expressionName:a,query:i});const o=E.get(t,e),l=o?.getExpressions().every((t=>{const{aggregateType:i,field:r}=t,a=e.get(r)?.name;return s.some((t=>{const{onStatisticField:s,statisticType:r}=t,n=e.get(s)?.name;return n===a&&r.toLowerCase().trim()===i}))}));if(!l)throw new r.Z(R,"expressions in having should also exist in outStatistics",{having:t});return!0}function P(e,t){return e?E.get(e,t):null}function O(e,t,s={}){s.errorMessage||(s.errorMessage=s.expressionName?`${s.expressionName} contains invalid fields`:"Fields are invalid"),k(e,t,((e,t)=>t.has(e)),s)}function M(e,t,s={}){s.errorMessage||(s.errorMessage=s.expressionName?`${s.expressionName} only supports ${v} field types`:`Only ${v} field types are supported`),k(e,t,((e,t)=>!G(e,t)),s)}function k(e,t,s,i={}){const a=i.verifyExpression??!0,n=[];for(const r of t){const t=s(r,e);if("*"!==r&&!t)if(a){const t=D(r);try{k(e,C(t,e,{validateStandardized:!0}),s,i)}catch(e){const t=e?.details;if(t?.expression)throw e;t?.invalidFields?n.push(...t.invalidFields):n.push(r)}}else n.push(r)}if(n.length)throw new r.Z(R,i.errorMessage,{invalidFields:n,query:i.query})}function D(e){return/\((.*?)\)/.test(e)?e:e.split(T)[0]}function G(e,t,s=b){const i=t.get(e);return!!i&&!s.has(i.type)}var Q=s(37427),L=s(61159),V=s(35308),U=s(49600),q=s(82397),z=s(11490),Z=s(24452),j=s(59266);class B{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=D(t),r=this.fieldsIndex.get(i),a=r?null:P(i,s),n=r?r.name:t.split(T)[1]||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:n,clause:a})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i)?.clause:s||(r=P(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t){const s=t.normalizationType,i=t.normalizationTotal,r=this.fieldsIndex.isDateField(t.field);return e.map((e=>{let a=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(a=`${(0,Z.wk)(a)}${t.fieldDelimiter}${(0,Z.wk)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(a=`${a}${t.fieldDelimiter}${(0,Z.wk)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):r&&"string"==typeof a&&(a=a?new Date(a).getTime():null),s&&Number.isFinite(a)){const r="field"===s&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;a=(0,Z.fk)(a,s,r,i)}return a}))}async getExpressionValues(e,t,s,i){const{arcadeUtils:r}=await(0,j.LC)(),a=r.hasGeometryOperations(t);a&&await r.enableGeometryOperations();const n=r.createFunction(t),o=s&&r.getViewInfo(s),l={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:l,geometry:a?{...(0,z.Op)(i.geometryType,i.hasZ,i.hasM,this.featureAdapter.getGeometry(e)),spatialReference:s?.spatialReference}:null},u=r.createExecContext(t,o);return r.executeFunction(n,u)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:P(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:P(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t||!t.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}function Y(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function H(e,t,s,i,r,a=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:a}}var W=s(35671);class X{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new B(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const a=new Map,n=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!n.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,a);s.push(t)}n.set(l,this._calculateUniqueValues(s,e.returnDistinctValues))}const u=n.get(l);for(const t in u){const{data:i,items:r}=u[t],a=i.join(",");s&&!e.validateItems(r,s)||o.add(a)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse(this.query):await this._createStatisticsQueryResponse(this.query):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,g.JY)(this.query.outSR)&&!(0,g.fS)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,z.S2)({spatialReference:this.query.outSR,...(0,Q.iV)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,z.S2)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const s=this.featureAdapter,i=J(this.hasZ,this.hasM),{point:r,mode:a}=e,n="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c=this._getPointCreator(a,this.spatialReference,t),h=new K(null,0),d=new K(null,0),f={x:0,y:0,z:0};for(const t of this.items){const a=s.getGeometry(t);if(null==a)continue;const{coords:p,lengths:m}=a;if(h.coords=p,d.coords=p,e.returnEdge){let e=0;for(let a=0;a<m.length;a++){const u=m[a];for(let a=0;a<u;a++,e+=i){const p=h;if(p.coordsIndex=e,a!==u-1){const a=d;a.coordsIndex=e+i;const u=f;$(f,r,p,a);const h=(r.x-u.x)/n,m=(r.y-u.y)/o,g=h*h+m*m;g<=1&&l.candidates.push(H(s.getObjectId(t),c(u),Math.sqrt(g),c(p),c(a)))}}}}if(e.returnVertex){const e=u?p.length-i:p.length;for(let a=0;a<e;a+=i){const e=h;e.coordsIndex=a;const i=(r.x-e.x)/n,u=(r.y-e.y)/o,d=i*i+u*u;d<=1&&l.candidates.push(Y(s.getObjectId(t),c(e),Math.sqrt(d)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s){const i=null==s||(0,g.fS)(t,s)?e=>e:e=>(0,Q.iV)(e,t,s),{hasZ:r}=this;return"3d"===e?r?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:0}):({x:e,y:t})=>i({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,minValue:n,maxValue:o,scale:l}=e,u=this.fieldsIndex.isDateField(t),c=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,scale:l}),h=(0,Z.S5)({normalizationType:r,normalizationField:i,minValue:n,maxValue:o}),d=this.fieldsIndex.get(t),f={value:.5,fieldType:d?.type},p=(0,W.qN)(d)?(0,Z.H0)({values:c,supportsNullCount:h,percentileParams:f}):(0,Z.i5)({values:c,minValue:n,maxValue:o,useSampleStdDev:!r,supportsNullCount:h,percentileParams:f});return(0,Z.F_)(p,u)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:a}=e,n=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:a}),o=(0,Z.eT)(n);return(0,Z.Qm)(o,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h}=e,d=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,scale:h}),f=(0,Z.G2)(d,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:a,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,Z.DL)(f,n)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h}=e,d=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:a,scale:h});return(0,Z.oF)(d,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:a,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t&&t.length)for(const i of t.reverse()){const t=i.split(" "),r=t[0],a=this.fieldsIndex.get(r),n=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,Z.Lq)(a?.type,n);e.sort(((e,t)=>{const i=s(e,r,a),n=s(t,r,a);return o(i,n)}))}}_createFeatureQueryResponse(e){const t=this.items,{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:n}=this,{outFields:o,outSR:l,quantizationParameters:u,resultRecordCount:c,resultOffset:h,returnZ:d,returnM:f}=e,p=null!=c&&t.length>(h||0)+c,m=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:p,features:this._createFeatures(e,t),fields:m,geometryType:s,hasM:i&&f,hasZ:r&&d,objectIdFieldName:a,spatialReference:(0,z.S2)(l||n),transform:u&&(0,q.vY)(u)||null}}_createFeatures(e,t){const s=new B(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:a,quantizationParameters:n,returnGeometry:o,returnCentroid:l,maxAllowableOffset:u,resultOffset:c,resultRecordCount:h,returnZ:d=!1,returnM:f=!1}=e,p=r&&d,m=i&&f;let g=[],_=0;const y=[...t];if(this._sortFeatures(y,a,((e,t,i)=>s.getFieldValue(e,t,i))),o||l){const e=(0,q.vY)(n)??void 0;if(o&&!l)for(const t of y)g[_++]={attributes:s.getAttributes(t),geometry:(0,z.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,p,m)};else if(!o&&l)for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,z.EG)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of y)g[_++]={attributes:s.getAttributes(t),centroid:(0,z.EG)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,z.Op)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),u,e,p,m)}}else for(const e of y){const t=s.getAttributes(e);t&&(g[_++]={attributes:t})}const x=c||0;if(null!=h){const e=x+h;g=g.slice(x,Math.min(g.length,e))}return g}_createExceedsLimitQueryResponse(e){let t=!1,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY;for(const t of e.outStatistics??[])if("exceedslimit"===t.statisticType){s=null!=t.maxPointCount?t.maxPointCount:Number.POSITIVE_INFINITY,i=null!=t.maxRecordCount?t.maxRecordCount:Number.POSITIVE_INFINITY,r=null!=t.maxVertexCount?t.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)t=this.items.length>s;else if(this.items.length>i)t=!0;else{const e=J(this.hasZ,this.hasM),s=this.featureAdapter;t=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/e>r}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(t)}}]}}async _createStatisticsQueryResponse(e){const t={attributes:{}},s=[],i=new Map,r=new Map,a=new Map,n=new Map,o=new B(e,this.featureAdapter,this.fieldsIndex),l=e.outStatistics,{groupByFieldsForStatistics:u,having:c,orderByFields:h}=e,d=u&&u.length,f=!!d,p=f?u[0]:null,m=f&&!this.fieldsIndex.get(p);for(const e of l??[]){const{outStatisticFieldName:l,statisticType:h}=e,g=e,_="exceedslimit"!==h?e.onStatisticField:void 0,y="percentile_disc"===h||"percentile_cont"===h,x="EnvelopeAggregate"===h||"CentroidAggregate"===h||"ConvexHullAggregate"===h,S=f&&1===d&&(_===p||m)&&"count"===h;if(f){if(!a.has(_)){const e=[];for(const t of u){const s=this._getAttributeValues(o,t,i);e.push(s)}a.set(_,this._calculateUniqueValues(e,!x&&o.returnDistinctValues))}const e=a.get(_);for(const t in e){const{count:s,data:r,items:a,itemPositions:h}=e[t],d=r.join(",");if(!c||o.validateItems(a,c)){const e=n.get(d)||{attributes:{}};if(x){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(g,a);e.aggregateGeometries[s]=t}else{let t=null;if(S)t=s;else{const e=this._getAttributeValues(o,_,i),s=h.map((t=>e[t]));t=y&&"statisticParameters"in g?this._getPercentileValue(g,s):this._getStatisticValue(g,s,null,o.returnDistinctValues)}e.attributes[l]=t}let t=0;u.forEach(((s,i)=>e.attributes[this.fieldsIndex.get(s)?s:"EXPR_"+ ++t]=r[i])),n.set(d,e)}}}else if(x){t.aggregateGeometries||(t.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(g,this.items);t.aggregateGeometries[s]=e}else{const e=this._getAttributeValues(o,_,i);t.attributes[l]=y&&"statisticParameters"in g?this._getPercentileValue(g,e):this._getStatisticValue(g,e,r,o.returnDistinctValues)}s.push({name:l,alias:l,type:"esriFieldTypeDouble"})}const g=f?Array.from(n.values()):[t];return this._sortFeatures(g,h,((e,t)=>e.attributes[t])),{fields:s,features:g}}async _getAggregateGeometry(e,t){const{convexHull:i,union:r}=await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)),{statisticType:a,outStatisticFieldName:n}=e,{featureAdapter:o,spatialReference:l,geometryType:u,hasZ:c,hasM:h}=this,d=t.map((e=>(0,z.Op)(u,c,h,o.getGeometry(e)))),f=i(l,d,!0)[0],p={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===a){const e=f?(0,U._w)(f):(0,U.aO)(r(l,d));p.aggregateGeometries={...e,spatialReference:l},p.outStatisticFieldName=n||"extent"}else if("CentroidAggregate"===a){const e=f?(0,V.tO)(f):(0,V.$G)((0,U.aO)(r(l,d)));p.aggregateGeometries={x:e[0],y:e[1],spatialReference:l},p.outStatisticFieldName=n||"centroid"}else"ConvexHullAggregate"===a&&(p.aggregateGeometries=f,p.outStatisticFieldName=n||"convexHull");return p}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:a}=e;let n=null;return n=s?.has(r)?s.get(r):(0,W.qN)(this.fieldsIndex.get(r))?(0,Z.H0)({values:t,returnDistinct:i}):(0,Z.i5)({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,n),n["var"===a?"variance":a]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:a,orderBy:n}=i,o=this.fieldsIndex.get(s);return(0,Z.XL)(t,{value:a,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s){if(s.has(t))return s.get(t);const i=this.fieldsIndex.get(t),r=this.items.map((s=>e.getFieldValue(s,t,i)));return s.set(t,r),r}_calculateUniqueValues(e,t){const s={},i=this.items,r=i.length;for(let a=0;a<r;a++){const r=i[a],n=[];for(const t of e)n.push(t[a]);const o=n.join(",");null==s[o]?s[o]={count:1,data:n,items:[r],itemPositions:[a]}:(t||s[o].count++,s[o].items.push(r),s[o].itemPositions.push(a))}return s}async _getDataValues(e){const t=new B(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:s,scale:i}=e,r=s?{viewingMode:"map",scale:i,spatialReference:this.query.outSR||this.spatialReference}:null;return s?t.getExpressionValues(this.items,s,r,{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM}):t.getDataValues(this.items,{field:e.field,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal})}}function $(e,t,s,i){const r=i.x-s.x,a=i.y-s.y,n=r*r+a*a,o=(t.x-s.x)*r+(t.y-s.y)*a,l=Math.min(1,Math.max(0,o/n));e.x=s.x+r*l,e.y=s.y+a*l}function J(e,t){return e?t?4:3:t?3:2}class K{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}var ee=s(10402),te=s(17590),se=s(99514),ie=s(61247),re=(s(80442),s(92604)),ae=s(54790),ne=s(44553),oe=s(17445),le=s(95528),ue=s(76882);class ce{constructor(){this._tasks=new Array,this._running=(0,le.t)(!1)}get length(){return this._tasks.length}get running(){return this._running.value}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this._running.value=!0,new Promise(((i,r)=>this._tasks.push(new he(i,r,e,t,s))))}unshift(e,t,s){return this._running.value=!0,new Promise(((i,r)=>this._tasks.unshift(new he(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,l.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,l.zE)());else{const i=s?t.abortCallback?.((0,l.zE)()):t.callback(e);(0,l.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this._running.value=this._tasks.length>0,!0}cancelAll(){const e=(0,l.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this._running.value=!1}}class he{constructor(e,t,s,i=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var de=s(43697),fe=s(92036),pe=s(5600),me=(s(75215),s(52011));let ge=class extends fe.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,de._)([(0,pe.Cb)()],ge.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,de._)([(0,pe.Cb)()],ge.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),ge=(0,de._)([(0,me.j)("esri.views.support.DebugFlags")],ge);const _e=new ge;var ye,xe,Se,Ee=s(95720);(Se=ye||(ye={}))[Se.YIELD=1]="YIELD",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(xe||(xe={}));const Re=new Map([[xe.RESOURCE_CONTROLLER_IMMEDIATE,0],[xe.RESOURCE_CONTROLLER,4],[xe.SLIDE,0],[xe.STREAM_DATA_LOADER,0],[xe.ELEVATION_QUERY,0],[xe.TERRAIN_SURFACE,1],[xe.SURFACE_GEOMETRY_UPDATES,1],[xe.LOD_RENDERER,2],[xe.GRAPHICS_CORE,2],[xe.I3S_CONTROLLER,2],[xe.POINT_CLOUD_LAYER,2],[xe.FEATURE_TILE_FETCHER,2],[xe.OVERLAY,4],[xe.STAGE,4],[xe.GRAPHICS_DECONFLICTOR,4],[xe.FILTER_VISIBILITY,4],[xe.SCALE_VISIBILITY,4],[xe.FRUSTUM_VISIBILITY,4],[xe.CLOUDS_GENERATOR,4],[xe.POINT_OF_INTEREST_FREQUENT,6],[xe.POINT_OF_INTEREST_INFREQUENT,30],[xe.LABELER,8],[xe.FEATURE_QUERY_ENGINE,8],[xe.FEATURE_TILE_TREE,16],[xe.FEATURE_TILE_TREE_ACTIVE,0],[xe.ELEVATION_ALIGNMENT,12],[xe.TEXT_TEXTURE_ATLAS,12],[xe.TEXTURE_UNLOAD,12],[xe.LINE_OF_SIGHT_TOOL,16],[xe.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[xe.SNAPPING,0],[xe.SHADOW_ACCUMULATOR,30]]);function Te(e){return Re.has(e)?Re.get(e):"number"==typeof e?e:1}const Ie=(0,ue.HA)(6.5),Fe=(0,ue.HA)(1),we=(0,ue.HA)(30),Ae=(0,ue.HA)(1e3/30),be=(0,ue.HA)(100);var ve,Ce;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,le.t)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new ae.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=Ee.n.INTERACTING,this._tasks=new ne.Z,this._runQueue=new ne.Z,this._load=0,this._idleStateCallbacks=new ne.Z,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,oe.YP)((()=>_e.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),oe.nn);for(const e of Object.keys(xe))this.performanceInfo.tasks.set(xe[e],new ae.Z(xe[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:Ie,INTERACTING_BUDGET:Ae,IDLE_BUDGET:be,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,n.hw)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())})))}registerTask(e,s){const i=Te(e),r=new t(this,e,s,i);return this._tasks.push(r),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new ae.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===Ee.n.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===Ee.n.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Ee.n.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=Ie,s=e.frameDuration,i=Fe;switch(this.state){case Ee.n.IDLE:t=(0,ue.HA)(0),s=(0,ue.HA)(Math.max(be,e.frameDuration)),i=we;break;case Ee.n.INTERACTING:s=(0,ue.HA)(Math.max(Ae,e.frameDuration));case Ee.n.ANIMATING:}return s=(0,ue.HA)(s-e.elapsedFrameTime-t),this.state!==Ee.n.IDLE&&s<Fe&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,ue.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Ee.n.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Ee.n.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,ue.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return Ce.SCHEDULED;let t=Ce.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=Ce.READY:t!==Ce.READY&&(t=Ce.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===ye.YIELD&&(s.blockFrame=this._frameNumber)}catch(e){re.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e),s.blockFrame=this._frameNumber}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,xe.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&i>2*this._budget.budget&&console.log("Task",s.name,"used",i,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(xe))this._frameTaskTimes.set(xe[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,s,i){this._scheduler=e,this.name=t,this._basePriority=i,this.blockFrame=0,this.runtime=0,this._queue=new ce,this._handles=new ie.Z,this.schedulePriority=this._basePriority,this._task=(0,le.t)(null!=s?s:this._queue),this._handles.add((0,oe.gx)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(Ne),this._scheduler.removeTask(this),this.schedule=Pe.schedule,this.reschedule=Pe.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=Te(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Ee.n.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(ve||(ve={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(Ce||(Ce={}));const Ne=(()=>{const e=new ve.Budget;return e.enabled=!1,e})(),Pe=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,l.Hc)(t)){const e=(0,l.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,l.gx)(e(Ne))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},Oe="feature-store:unsupported-query",Me=new o.WJ(2e6);let ke=0;class De{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:L.g},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new o.Xq(ke+++"$$",Me)),this.fieldsIndex=new se.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,n.hw)(this._frameTask),this.clearCache(),(0,n.SC)(this._geometryQueryCache),this._changeHandle=(0,n.hw)(this._changeHandle),(0,n.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==z.Ti)throw t;return new X([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==z.Ti)throw e;return 0}}async executeQueryForExtent(e,t){const s=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=i.size;return r?{count:r,extent:await this._getBounds(i.items,i.spatialReference,s||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===z.Ti)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),i=s.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(s.featureAdapter.getObjectId(e))}),t),r}catch(e){if(e===z.Ti)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,returnEdge:r,returnVertex:n}=e;if(!r&&!n)return{candidates:[]};let o=(0,a.d9)(e.query);o=await this._schedule((()=>(0,z.j6)(o,this.definitionExpression,this.spatialReference)),t),o=await this._reschedule((()=>this._checkQuerySupport(o)),t);const l=!(0,g.fS)(s.spatialReference,this.spatialReference);l&&await(0,Q._W)(s.spatialReference,this.spatialReference);const u="number"==typeof i?i:i.x,c="number"==typeof i?i:i.y,h={xmin:s.x-u,xmax:s.x+u,ymin:s.y-c,ymax:s.y+c,spatialReference:s.spatialReference},d=l?(0,Q.iV)(h,this.spatialReference):h;if(!d)return{candidates:[]};const f=(await(0,m.aX)((0,p.im)(s),null,{signal:t}))[0],_=(await(0,m.aX)((0,p.im)(d),null,{signal:t}))[0];if(null==f||null==_)return{candidates:[]};const y=new X(await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(_.toJSON()))),t),o,this);await this._reschedule((()=>this._executeObjectIdsQuery(y)),t),await this._reschedule((()=>this._executeTimeQuery(y)),t),await this._reschedule((()=>this._executeAttributesQuery(y)),t),await this._reschedule((()=>this._executeGeometryQueryForSnapping(y,t)),t);const x=f.toJSON(),S=l?(0,Q.iV)(x,this.spatialReference):x,E=l?Math.max(d.xmax-d.xmin,d.ymax-d.ymin)/2:i;return y.createSnappingResponse({...e,point:S,distance:E},s.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new r.Z(Oe,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const s=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(s)),t),s.createQueryResponse()}catch(t){if(t!==z.Ti)throw t;return new X([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:a},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,field2:r,field3:a,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,field2:r,field3:a,valueExpression:n},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:a},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:a},s)).createHistogramResponse(t)}async fetchRecomputedExtents(e){this._timeExtentPromise||=(0,te.R)(this.timeInfo,this.featureStore);const[t,s]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,l.k_)(e),{fullExtent:t,timeExtent:s}}async _getBounds(e,t,s){const i=(0,h.t8)((0,h.Ue)(),h.G_);await this.featureStore.forEachBounds(e,(e=>(0,h.TC)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,z.S2)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5]);const a=(0,Q.iV)(r,t,s);if(a.spatialReference=(0,z.S2)(s),a.xmax-a.xmin==0){const e=(0,u.c9)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,u.c9)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,u.c9)(a.spatialReference);a.zmin-=e,a.zmax+=e}return a}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async _schedule(e,t){return null!=this._frameTask?this._frameTask.schedule(e,t):e(Ne)}async _reschedule(e,t){return null!=this._frameTask?this._frameTask.reschedule(e,t):e(Ne)}async _getAllFeaturesQueryEngineResult(e){return new X(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,a.d9)(e),e=await this._schedule((()=>(0,z.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkQuerySupport(e)),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,a=this.featureStore.featureSpatialReference,n=e.sceneFilter.geometry,o=null==a||(0,g.fS)(a,n.spatialReference)?n:(0,Q.iV)(n,a);if(!o)return null;const l=i||r,u=(0,g.JY)(s)&&!(0,g.fS)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,h=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const s=new Set;for(const e of h)s.add(c.getObjectId(e));const i=await this._reschedule((()=>this._getAllFeatures()),t),r=await this._reschedule((async()=>{const r=await(0,ee.cW)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),a=await this._runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new X(a,e,this)}),t);return u(r)}if(!h.length)return new X([],e,this);if(this._canExecuteSinglePass(o,e))return u(new X(h,e,this));const d=await(0,ee.cW)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),f=await this._runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new X(f,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;e=null!=t?t.query:e;const{geometry:r,outSR:a,spatialRel:n,returnGeometry:o,returnCentroid:l}=e,u=this.featureStore.featureSpatialReference,c=!r||null==u||(0,g.fS)(u,r.spatialReference)?r:(0,Q.iV)(r,u),h=o||l,d=(0,g.JY)(a)&&!(0,g.fS)(this.spatialReference,a),f=this._geometryQueryCache&&null==t?d&&h?JSON.stringify({originalFilterGeometry:r,spatialRelationship:n,outSpatialReference:a}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:n}):null,p=f?this._geometryQueryCache.get(f):null;if(null!=p)return new X(p,e,this);const m=async e=>(d&&h&&await this._project(e,a),f&&this._geometryQueryCache.put(f,e.items,e.items.length+1),e);if(!c)return m(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const _=this.featureAdapter;let y=await this._reschedule((()=>this._searchFeatures(this._getQueryBBoxes(r))),s);if("esriSpatialRelDisjoint"===n){if(!y.length)return m(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of y)i.add(_.getObjectId(e));const r=null!=t?t.items:await this._reschedule((()=>this._getAllFeatures()),s),a=await this._reschedule((async()=>{const t=await(0,ee.cW)(n,c,this.geometryType,this.hasZ,this.hasM),a=await this._runSpatialFilter(r,(e=>!i.has(_.getObjectId(e))||t(_.getGeometry(e))),s);return new X(a,e,this)}),s);return m(a)}if(null!=t){const e=new i.SO;y=y.filter((s=>(0,i.cq)(t.items,s,t.items.length,e)>=0))}if(!y.length){const t=new X([],e,this);return f&&this._geometryQueryCache.put(f,t.items,1),t}if(this._canExecuteSinglePass(c,e))return m(new X(y,e,this));const x=await(0,ee.cW)(n,c,this.geometryType,this.hasZ,this.hasM),S=await this._runSpatialFilter(y,(e=>x(_.getGeometry(e))),s);return m(new X(S,e,this))}async _executeGeometryQueryForSnapping(e,t){const{query:s}=e,{spatialRel:i}=s;if(!(null!=e&&e.items&&e.items.length&&s.geometry&&i))return;const r=await(0,ee.cW)(i,s.geometry,this.geometryType,this.hasZ,this.hasM),a=await this._runSpatialFilter(e.items,(e=>r(e.geometry)),t);e.items=a}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds||!e.query.aggregateIds.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds||!e.query.objectIds.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,te.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=P(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,a=async n=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),n.madeProgress()),n.done&&await this._reschedule((e=>a(e)),s)}};return this._reschedule((e=>a(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,a=new Map,n=this.featureAdapter.getAttribute;for(const s of e.items){const e=n(s,t),i=n(s,r),o=a.get(e);(!o||i>n(o,r))&&a.set(e,s)}e.items=Array.from(a.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,ee.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s))}async _project(e,t){if(!t||(0,g.fS)(this.spatialReference,t))return e;const s=this.featureAdapter;let i;try{const e=await this._getFullExtent();i=(0,c.getTransformation)(this.spatialReference,t,e)}catch{}const r=await(0,Q.oj)(e.items.map((e=>(0,z.Op)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t,i);return e.items=r.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,_.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,ee.hN)(e)){if((0,p.YX)(e))return[(0,d.al)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,p.oU)(e))return e.rings.map((e=>(0,d.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,f.$P)((0,d.Ue)(),e)]}async _searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _checkStatisticsSupport(e,t){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.Z(Oe,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t,e),(0,ee.P0)(e,this.geometryType,this.spatialReference),(0,Q._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e,t){let s=[];if(e.valueExpression){const{arcadeUtils:t}=await(0,j.LC)();s=t.extractFieldNames(e.valueExpression)}if(e.field&&s.push(e.field),e.field2&&s.push(e.field2),e.field3&&s.push(e.field3),e.normalizationField&&s.push(e.normalizationField),!s.length&&!e.valueExpression)throw new r.Z(Oe,"field or valueExpression is required",{params:e});O(this.fieldsIndex,s,{errorMessage:"Cannot calculate statistics for missing fields",query:t}),M(this.fieldsIndex,s,{expressionName:"statistics",query:t})}async _checkQuerySupport(e){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.Z(Oe,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,ee.P0)(e,this.geometryType,this.spatialReference),(0,Q._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:i,outStatistics:a}=e,n=a?a.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(s&&s.length>0){const t=" asc",i=" desc",r=s.map((e=>{const s=e.toLowerCase();return s.includes(t)?s.split(t)[0]:s.includes(i)?s.split(i)[0]:e})).filter((e=>!n.includes(e)));O(this.fieldsIndex,r,{expressionName:"orderByFields",query:e})}if(t&&t.length>0)O(this.fieldsIndex,t,{expressionName:"outFields",query:e});else if(i)throw new r.Z(Oe,"outFields should be specified for returnDistinctValues",{query:e});!function(e,t,s){if(!t)return!0;const i="where clause",r=C(t,e,{validateStandardized:!0,expressionName:i});O(e,r,{expressionName:i,query:s}),M(e,r,{expressionName:i,query:s})}(this.fieldsIndex,e.where,e)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:i}=e,a=s&&s.length,n=t&&t.length;if(i){if(!a||!n)throw new r.Z(Oe,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});N(this.fieldsIndex,i,t,e)}if(n){if(!function(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const i=t.map((e=>e.onStatisticField)).filter(Boolean);O(this.fieldsIndex,i,{expressionName:"onStatisticFields",query:e}),a&&O(this.fieldsIndex,s,{expressionName:"groupByFieldsForStatistics",query:e});const n=new Set([...F.jsonValues,...w.jsonValues]),o=new Intl.ListFormat("en-US",{type:"conjunction"}).format([...F.apiValues,...w.apiValues]);for(const s of t){const{onStatisticField:t,statisticType:i}=s;if("percentile_disc"!==i&&"percentile_cont"!==i||!("statisticParameters"in s)){if("count"!==i&&"min"!==i&&"max"!==i&&t&&G(t,this.fieldsIndex,n))throw new r.Z(Oe,`outStatistics with '${i}' statistic type, only supports ${o} field types`,{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new r.Z(Oe,"statisticParameters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e,t,s){e=(0,a.d9)(e);try{e=await this._schedule((()=>(0,z.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}catch(t){if(t!==z.Ti)throw t;return new X([],e,this)}}}},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},37427:(e,t,s)=>{s.d(t,{_W:()=>f,iV:()=>g,oj:()=>y});var i=s(67676),r=s(95330),a=s(73615),n=s(37455),o=s(8744),l=s(40488);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,u),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,u),[s.xmax,s.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const s=[];for(const i of e)s.push(d(i,t));return s}function d(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function f(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(i.pC):[e];await(0,a.initializeProjection)(s.map((e=>({source:e,dest:t}))))}const p=c.bind(null,l.hG),m=c.bind(null,l.R6);function g(e,t,s,i){if(!e)return e;if(s||(s=t,t=e.spatialReference),!(0,o.JY)(t)||!(0,o.JY)(s)||(0,o.fS)(t,s))return e;if((0,l.Q8)(t,s)){const t=(0,o.sS)(s)?p(e):m(e);return t.spatialReference=s,t}return(0,a.projectMany)(n.N,[e],t,s,null,i)[0]}const _=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s,i){if(!e||!e.length||!t||!s||(0,o.fS)(t,s))return e;const a={geometries:e,inSpatialReference:t,outSpatialReference:s,geographicTransformation:i,resolve:(0,r.hh)()};return this._jobs.push(a),this._timer??=setTimeout(this._process,10),a.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:r,geographicTransformation:u}=e;(0,l.Q8)(s,i)?(0,o.sS)(i)?r(t.map(p)):r(t.map(m)):r((0,a.projectMany)(n.N,t,s,i,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function y(e,t,s,i){return _.push(e,t,s,i)}},10402:(e,t,s)=>{s.d(t,{hN:()=>E,P0:()=>S,cW:()=>x});var i=s(20102),r=s(54102),a=s(87416),n=s(33955),o=s(8744);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,a){const n=l(r,a),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=n)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const a=l(t,s),{coords:n,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,n,a,c,e,i,r),c+=e*a;return u}function h(e,t,s,i,r,a,n){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<n&&d>=n||d<n&&c>=n)&&r+(n-c)/(d-c)*(h-r)<a&&(o=!o)}return o}var d=s(98732),f=s(5428),p=s(37427),m=s(11490);const g="feature-store:unsupported-query",_={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}};function x(e,t,i,o,l){if((0,n.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new f.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,n.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new f.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>u(s,!1,!1,e,o,l)))}if((0,n.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,m.Op)(i,o,l,e))));if((0,n.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,m.Op)(i,o,l,e))));if((0,n.YX)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(h=i)?a.h_:(0,a.IY)(h);return Promise.resolve((s=>e(t,(0,m.Op)(i,o,l,s))))}var h;return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[_[e]].bind(null,t.spatialReference,t);return e=>r((0,m.Op)(i,o,l,e))}))}async function S(e,t,s){const{spatialRel:r,geometry:a}=e;if(a){if(!function(e){return null!=e&&!0===y.spatialRelationship[e]}(r))throw new i.Z(g,"Unsupported query spatial relationship",{query:e});if((0,o.JY)(a.spatialReference)&&(0,o.JY)(s)){if(!function(e){return null!=e&&!0===y.queryGeometry[(0,n.Ji)(e)]}(a))throw new i.Z(g,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===y.layerGeometry[e]}(t))throw new i.Z(g,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function E(e){if((0,n.YX)(e))return!0;if((0,n.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{async function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let a=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;if(i&&r)await t.forEach((e=>{const t=s.getAttribute(e,i),o=s.getAttribute(e,r);null==t||isNaN(t)||(a=Math.min(a,t)),null==o||isNaN(o)||(n=Math.max(n,o))}));else{const e=i||r;await t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(a=Math.min(a,i),n=Math.max(n,i))}))}return{start:a,end:n}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:a,end:n}=t;if(null===a&&null===n)return null;if(void 0===a&&void 0===n)return()=>!1;const o=s.getAttributeAsTimestamp?.bind(s)??s.getAttribute.bind(s);return i&&r?function(e,t,s,i,r){return null!=i&&null!=r?a=>{const n=e(a,t),o=e(a,s);return(null==n||n<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e(t,s);return null==r||r>=i}:null!=r?s=>{const i=e(s,t);return null==i||i<=r}:void 0}(o,i,r,a,n):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e(i,t)===s:null!=s&&null!=i?r=>{const a=e(r,t);return a>=s&&a<=i}:null!=s?i=>e(i,t)>=s:null!=i?s=>e(s,t)<=i:void 0}(o,i||r,a,n)}s.d(t,{R:()=>i,y:()=>r})},11490:(e,t,s)=>{s.d(t,{EG:()=>x,Op:()=>S,S2:()=>I,Ti:()=>p,Up:()=>E,j6:()=>R});var i=s(35454),r=s(67900),a=s(73615),n=s(49600),o=s(33955),l=s(16306),u=s(8744),c=s(98732),h=s(5428),d=s(37427);const f=new i.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m=new h.Z,g=new h.Z,_=new h.Z,y={esriGeometryPoint:c.fQ,esriGeometryPolyline:c.J6,esriGeometryPolygon:c.eG,esriGeometryMultipoint:c.Iv};function x(e,t,s,i=e.hasZ,r=e.hasM){if(null==t)return null;const a=e.hasZ&&i,n=e.hasM&&r;if(s){const o=(0,c.Nh)(_,t,e.hasZ,e.hasM,"esriGeometryPoint",s,i,r);return(0,c.fQ)(o,a,n)}return(0,c.fQ)(t,a,n)}function S(e,t,s,i,r,a,n=t,o=s){const l=t&&n,u=s&&o,h=null!=i?"coords"in i?i:i.geometry:null;if(null==h)return null;if(r){let i=(0,c.zj)(g,h,t,s,e,r,n,o);return a&&(i=(0,c.Nh)(_,i,l,u,e,a)),y[e]?.(i,l,u)??null}if(a){const i=(0,c.Nh)(_,h,t,s,e,a,n,o);return y[e]?.(i,l,u)??null}return(0,c.hY)(m,h,t,s,n,o),y[e]?.(m,l,u)??null}async function E(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:a,outStatistics:n}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(a)for(let e=0;e<a.length;e++)a[e]=a[e].trim();if(n)for(let e=0;e<n.length;e++)n[e].onStatisticField&&(n[e].onStatisticField=n[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),R(e,t,s)}async function R(e,t,i){if(!e)return null;let{where:a}=e;if(e.where=a=a&&a.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let c=await async function(e){const{distance:t,units:i}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const n=a.spatialReference,o=i?f.fromJSON(i):(0,r.qE)(n),l=n&&((0,u.sT)(n)||(0,u.sS)(n))?a:await(0,d._W)(n,u.Zn).then((()=>(0,d.iV)(a,u.Zn)));return(await async function(){return(await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))).geodesicBuffer}())(l.spatialReference,l,t,o)}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;c=(0,n.aO)(c),c.spatialReference=t}if(c){await(0,d._W)(c.spatialReference,i),c=function(e,t){const s=e.spatialReference;return T(e,t)&&(0,o.YX)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(c,i);const t=(await(0,l.aX)((0,o.im)(c)))[0];if(null==t)throw p;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,r=s&&T(c,i)?{densificationStep:8*s}:void 0,a=t.toJSON(),n=await(0,d.iV)(a,a.spatialReference,i,r);if(!n)throw p;n.spatialReference=i,e.geometry=n}return e}function T(e,t){if(!e)return!1;const s=e.spatialReference;return((0,o.YX)(e)||(0,o.oU)(e)||(0,o.l9)(e))&&!(0,u.fS)(s,t)&&!(0,a.canProjectWithoutEngine)(s,t)}function I(e){return e&&F in e?JSON.parse(JSON.stringify(e,w)):e}const F="_geVersion",w=(e,t)=>e!==F?t:void 0},95720:(e,t,s)=>{var i;s.d(t,{n:()=>i}),function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(i||(i={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4330],{65845:(e,t,r)=>{r.d(t,{D:()=>n});var a=r(81153);function n(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>a})},94330:(e,t,r)=>{r.d(t,{save:()=>c,saveAs:()=>m});var a=r(64383),n=r(14661);const o="Stream Service",i="stream-layer-save",l="stream-layer-save-as";function s(e){return{isValid:"stream"===e.type&&!!e.url&&!e.webSocketUrl,errorMessage:"Stream layer should be created using a url to a stream service"}}function u(e){const t=e.layerJSON;return Promise.resolve(t&&Object.keys(t).length?t:null)}async function p(e,t){const{parsedUrl:r,title:a,fullExtent:o}=e;t.url=r.path,t.title||=a,t.extent=null,null!=o&&(t.extent=await(0,n.$o)(o)),(0,n.qj)(t,n.Kz.SINGLE_LAYER)}async function c(e,t){return(0,a.a1)({layer:e,itemType:o,validateLayer:s,createItemData:u,errorNamePrefix:i},t)}async function m(e,t,r){return(0,a.po)({layer:e,itemType:o,validateLayer:s,createItemData:u,errorNamePrefix:l,newItem:t,setItemProperties:p},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>w,po:()=>g});var a=r(20102),n=r(65845),o=r(48522),i=r(15235),l=r(33516),s=r(14661);async function u(e){const{layer:t,errorNamePrefix:r,validateLayer:n}=e;await t.load(),function(e,t,r){const n=r(e);if(!n.isValid)throw new a.Z(`${t}:invalid-parameters`,n.errorMessage,{layer:e})}(t,r,n)}function p(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function c(e,t,r,n){if(e.type!==r)throw new a.Z(`${t}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:e,layer:n})}function m(e,t,r){const{portalItem:n}=e;if(!n)throw new a.Z(`${t}:portal-item-not-set`,p(e,"requires the portalItem property to be set"));if(!n.loaded)throw new a.Z(`${t}:portal-item-not-loaded`,p(e,"cannot be saved to a portal item that does not exist or is inaccessible"));c(n,t,r,e)}function d(e,t,r,a){let n=i.default.from(e);return n.id&&(n=n.clone(),n.id=null),n.type??=r,n.portal??=o.Z.getDefault(),c(n,t,r,a),n}async function f(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const n=e.write({},t);return function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.Z(e,t,r)));if(t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new a.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),n}function y(e){(0,s.qj)(e,s.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function w(e,t){const{layer:r,createItemData:a,errorNamePrefix:o,itemType:i}=e;await u(e),m(r,o,i);const s=r.portalItem,p=(0,l.Y)(s),c=await f(r,p,t),d=await a({layer:r,layerJSON:c},s);return y(s),await s.update({data:d}),(0,n.D)(p),s}async function g(e,t){const{layer:r,createItemData:a,setItemProperties:o,newItem:i,errorNamePrefix:s,itemType:p}=e;await u(e);const c=d(i,s,p,r),m=(0,l.Y)(c),w=await f(r,m,t),g=await a({layer:r,layerJSON:w},c);return await o(r,c),y(c),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(c,g,t),r.portalItem=c,(0,n.D)(m),c}},33516:(e,t,r)=>{r.d(t,{Y:()=>i,h:()=>o});var a=r(17452),n=r(48522);function o(e){return{origin:"portal-item",url:(0,a.mN)(e.itemUrl),portal:e.portal||n.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function i(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||n.Z.getDefault(),portalItem:e}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3230],{43230:(e,t,n)=>{n.r(t),n.d(t,{default:()=>h});var r=n(66643),o=n(20102),i=n(92604),a=n(95330),s=n(8744),u=n(98732),l=n(28972),c=n(37427),p=n(11028),d=n(92722),y=n(23095),f=n(51432),m=n(99514);class h{constructor(){this._queryEngine=null,this._customParameters=null,this._snapshotFeatures=async e=>{const{objectIdField:t}=this._queryEngine,n=await(0,f.Bm)(this._getFeatureUrl??"",this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,dateFields:this._queryEngine.fieldsIndex.dateFields.map((e=>e.name)),signal:e});await(0,d.O3)(n,this._getFeatureSpatialReference.wkid),(0,a.k_)(e);const r=(0,d.lG)(n,{geometryType:this._queryEngine.geometryType,hasZ:!1,objectIdField:t});if(!(0,s.fS)(this._queryEngine.spatialReference,this._getFeatureSpatialReference))for(const e of r)null!=e.geometry&&(e.geometry=(0,u.GH)((0,c.iV)((0,u.di)(e.geometry,this._queryEngine.geometryType,!1,!1),this._getFeatureSpatialReference,this._queryEngine.spatialReference)));let o=1;for(const e of r){const n={};(0,y.O0)(this._fieldsIndex,n,e.attributes,!0),e.attributes=n,null==e.attributes[t]&&(e.objectId=e.attributes[t]=o++)}return r}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t){const{getFeatureUrl:n,getFeatureOutputFormat:r,fields:i,geometryType:s,featureType:u,objectIdField:d,customParameters:y}=e,f={wkid:u.defaultSpatialReference},h=e.spatialReference??f,g=h.wkid&&u.supportedSpatialReferences.includes(h.wkid)?{wkid:h.wkid}:{wkid:u.defaultSpatialReference};this._featureType=u,this._customParameters=y,this._getFeatureUrl=n,this._getFeatureOutputFormat=r,this._getFeatureSpatialReference=g,this._fieldsIndex=new m.Z(i);try{await(0,c._W)(g,h)}catch{throw new o.Z("unsupported-projection","Projection not supported",{inSpatialReference:g,outSpatialReference:h})}(0,a.k_)(t),this._queryEngine=new p.q({fields:i,geometryType:s,hasM:!1,hasZ:!1,objectIdField:d,spatialReference:h,timeInfo:null,featureStore:new l.Z({geometryType:s,hasM:!1,hasZ:!1})});const w=await this._snapshotFeatures(t.signal);return this._queryEngine.featureStore.addMany(w),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new o.Z("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,a.D_)(e)||i.Z.getLogger("esri.layers.WFSLayer").error(new o.Z("wfs-layer:getfeature-error","An error occurred during the GetFeature request",{error:e}))})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}}},92722:(e,t,n)=>{n.d(t,{O3:()=>T,lG:()=>C,my:()=>_,q9:()=>l});var r=n(20102),o=n(8744),i=n(70272),a=n(5428),s=n(35671);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function l(e){return u[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*p(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function d(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],o=e[(n+1)%e.length];t+=r[0]*o[1]-o[0]*r[1]}return t<=0}function f(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function m(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return w(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)w(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){h(e,r[0],n);for(let t=1;t<r.length;t++)g(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return S(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;h(e,r[0],n);for(let t=1;t<r.length;t++)g(e,r[t],n);return e}(e,t,n)}}function h(e,t,n){const r=f(t);!function(e){return!y(e)}(r)?w(e,r,n):b(e,r,n)}function g(e,t,n){const r=f(t);!function(e){return y(e)}(r)?w(e,r,n):b(e,r,n)}function w(e,t,n){for(const r of t)S(e,r,n);e.lengths.push(t.length)}function b(e,t,n){for(let r=t.length-1;r>=0;r--)S(e,t[r],n);e.lengths.push(t.length)}function S(e,t,n){const[r,o,i]=t;e.coords.push(r,o),n.hasZ&&e.coords.push(i||0)}function F(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function T(e,t=4326){if(!e)throw new r.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new r.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:n}=e;if(!n)return;const i="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,a=(0,o.oR)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!i||!a.test(i))throw new r.Z("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function _(e,t={}){const n=[],r=new Set,o=new Set;let i,a=!1,u=null,y=!1,{geometryType:f=null}=t,m=!1;for(const t of c(e)){const{geometry:e,properties:c,id:h}=t;if((!e||(f||(f=l(e.type)),l(e.type)===f))&&(a||(a=d(p(e))),y||(y=null!=h,y&&(i=typeof h,c&&(u=Object.keys(c).filter((e=>c[e]===h))))),c&&u&&y&&null!=h&&(u.length>1?u=u.filter((e=>c[e]===h)):1===u.length&&(u=c[u[0]]===h?u:[])),!m&&c)){let e=!0;for(const t in c){if(r.has(t))continue;const i=c[t];if(null==i){e=!1,o.add(t);continue}const a=F(i);if("unknown"===a){o.add(t);continue}o.delete(t),r.add(t);const u=(0,s.q6)(t);u&&n.push({name:u,alias:t,type:a})}m=e}}const h=(0,s.q6)(1===u?.length&&u[0]||null)??void 0;if(h)for(const e of n)if(e.name===h&&(0,s.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:f,hasZ:a,objectIdFieldName:h,objectIdFieldType:i,unknownFields:Array.from(o)}}function C(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const o of e){const{geometry:e,properties:s,id:u}=o;if(e&&l(e.type)!==n)continue;const c=s||{};let p;r&&(p=c[r],null==u||p||(c[r]=p=u));const d=new i.u_(e?m(new a.Z,e,t):null,c,null,p??void 0);yield d}}(c(e),t))}},51432:(e,t,n)=>{n.d(t,{ft:()=>Z,FU:()=>N,Bm:()=>D,be:()=>q,eB:()=>O,u2:()=>b}),n(66577);var r=n(3172),o=n(20102),i=n(66374),a=n(17452),s=n(73615),u=n(8744),l=n(86973),c=n(92722);function p(e){return function(e){const t=d.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,o=+n.month-1,i=+n.day,a=+(n.hours??"0"),s=+(n.minutes??"0"),u=+(n.seconds??"0");if(a>23)return null;if(s>59)return null;if(u>59)return null;const l=n.ms??"0",c=l?+l.padEnd(3,"0").substring(0,3):0;let p;if(n.isUTC)p=Date.UTC(r,o,i,a,s,u,c);else if(n.offsetSign){const e=+n.offsetHours,t=+n.offsetMinutes;p=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,o,i,a,s,u,c)}else p=new Date(r,o,i,a,s,u,c).getTime();return Number.isNaN(p)?null:p}(e)??function(e){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}(e)}const d=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/;var y=n(88724),f=n(1231),m=n(82971),h=n(6570);const g="xlink:href",w="2.0.0",b="__esri_wfs_id__",S="wfs-layer:getWFSLayerTypeInfo-error",F="wfs-layer:empty-service",T="wfs-layer:feature-type-not-found",_="wfs-layer:geojson-not-supported",C="wfs-layer:kvp-encoding-not-supported",x="wfs-layer:malformed-json",v="wfs-layer:unknown-geometry-type",E="wfs-layer:unknown-field-type",k="wfs-layer:unsupported-spatial-reference",P="wfs-layer:unsupported-wfs-version";async function N(e,t){const n=function(e){const t=U(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==w)throw new o.Z(P,`Unsupported WFS version ${t}. Supported version: ${w}`)})(t),$(t);const n=t.firstElementChild,r=(0,i.Fs)(function(e){return(0,y.H)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},n=new Set;return(0,y.h)(e,{Name:e=>{const{name:n,prefix:r}=L(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=function(e){let t,n,r,o;for(const i of e.children)switch(i.localName){case"LowerCorner":[t,n]=i.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[r,o]=i.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:n,xmax:r,ymax:o,spatialReference:u.Zn}}(e)},DefaultCRS:e=>{const r=V(e);r&&(t.defaultSpatialReference=r,n.add(r))},OtherCRS:e=>{const t=V(e);t&&n.add(t)}}),t.title||(t.title=t.name),n.add(4326),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:j(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.Z)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:w,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,a.$U)(e)&&((0,a.D6)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,a.hO)(t.operations.DescribeFeatureType.url)),(0,a.D6)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,a.hO)(t.operations.GetFeature.url)))}(e,n),n}const R=new Set(["json","application/json","geojson","application/json; subtype=geojson"]);function j(e){let t=!1;const n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}};if((0,y.h)(e,{OperationsMetadata:{Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(g)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(g)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(g)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:e=>{const t=e.textContent;t&&R.has(t.toLowerCase())&&(n.GetFeature.outputFormat=t)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),!t)throw new o.Z(C,"WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new o.Z(_,"WFS service doesn't support GeoJSON output format");return n}function V(e){const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function Z(e,t,n){return(0,i.sE)(e,(e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t))}async function q(e,t,n,r={}){const{featureType:i,extent:a}=await async function(e,t,n,r={}){const i=e.readFeatureTypes(),a=t?Z(i,t,n):i.next().value,{spatialReference:l=new m.Z({wkid:a?.defaultSpatialReference})}=r;if(null==a)throw t?new o.Z(T,`The type '${t}' could not be found in the service`):new o.Z(F,"The service is empty");let c=new h.Z({...a.extent,spatialReference:m.Z.WGS84});if(!(0,u.fS)(c.spatialReference,l))try{await(0,s.initializeProjection)(c.spatialReference,l,void 0,r),c=(0,s.project)(c,l)}catch{throw new o.Z(k,"Projection not supported")}return{extent:c,spatialReference:l,featureType:a}}(e,t,n,r),{fields:l,geometryType:c,swapXY:p,objectIdField:d,geometryField:y}=await async function(e,t,n={}){const{typeName:r,defaultSpatialReference:i}=t,[a,s]=await Promise.allSettled([A(e.operations.DescribeFeatureType.url,r,n),G(e,r,i,n)]),u=e=>new o.Z(S,`An error occurred while getting info about the feature type '${r}'`,{error:e});if("rejected"===a.status)throw u(a.reason);if("rejected"===s.status)throw u(s.reason);const{fields:l,errors:c}=a.value??{},p=a.value?.geometryType||s.value?.geometryType,d=s.value?.swapXY??!1;if(null==p)throw new o.Z(v,`The geometry type could not be determined for type '${r}`,{typeName:r,geometryType:p,fields:l,errors:c});return{...O(l??[]),geometryType:p,swapXY:d}}(e,i,r);return{url:e.operations.GetCapabilities.url,name:i.name,namespaceUri:i.namespaceUri,fields:l,geometryField:y,geometryType:c,objectIdField:d,spatialReference:r.spatialReference??new m.Z({wkid:i.defaultSpatialReference}),extent:a,swapXY:p,wfsCapabilities:e,customParameters:r.customParameters}}function O(e){const t=e.find((e=>"geometry"===e.type));let n=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),n||(n=new f.Z({name:b,type:"oid",alias:b}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function G(e,t,n,o={}){let i,a=!1;const[s,u]=await Promise.all([D(e.operations.GetFeature.url,t,n,e.operations.GetFeature.outputFormat,{...o,count:1}),(0,r.Z)(e.operations.GetFeature.url,{responseType:"text",query:M(t,n,void 0,{...o,count:1}),signal:o?.signal})]),p="FeatureCollection"===s.type&&s.features[0]?.geometry;if(p){let e;switch(i=l.M.fromJSON((0,c.q9)(p.type)),p.type){case"Point":e=p.coordinates;break;case"LineString":case"MultiPoint":e=p.coordinates[0];break;case"MultiLineString":case"Polygon":e=p.coordinates[0][0];break;case"MultiPolygon":e=p.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(u.data);if(t){const n=e[0].toFixed(3),r=e[1].toFixed(3),o=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===o&&(a=!0)}}return{geometryType:i,swapXY:a}}async function A(e,t,n){return function(e,t){const{name:n}=L(e),r=U(t);$(r);const a=(0,i.sE)((0,y.H)(r.firstElementChild,{element:e=>({name:e.getAttribute("name"),typeName:L(e.getAttribute("type")).name})}),(({name:e})=>e===n));if(null!=a){const e=(0,i.sE)((0,y.H)(r.firstElementChild,{complexType:e=>e}),(e=>e.getAttribute("name")===a.typeName));if(null!=e)return function(e){const t=[],n=[];let r;const i=(0,y.H)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const a of i){const i=a.getAttribute("name");if(!i)continue;let s,u;if(a.hasAttribute("type")?s=L(a.getAttribute("type")).name:(0,y.h)(a,{simpleType:{restriction:e=>(s=L(e.getAttribute("base")).name,{maxLength:e=>{u=+e.getAttribute("value")}})}}),!s)continue;const l="true"===a.getAttribute("nillable");let c=!1;switch(s.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":n.push(new f.Z({name:i,alias:i,type:"integer",nullable:l}));break;case"float":case"double":case"decimal":n.push(new f.Z({name:i,alias:i,type:"double",nullable:l}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":n.push(new f.Z({name:i,alias:i,type:"string",nullable:l,length:u??255}));break;case"datetime":case"date":n.push(new f.Z({name:i,alias:i,type:"date",nullable:l,length:u??36}));break;case"pointpropertytype":r="point",c=!0;break;case"multipointpropertytype":r="multipoint",c=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":r="polyline",c=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":r="polygon",c=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":c=!0,t.push(new o.Z(v,`geometry type '${s}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new o.Z(E,`Unknown field type '${s}'`,{type:(new XMLSerializer).serializeToString(e)}))}c&&n.push(new f.Z({name:i,alias:i,type:"geometry",nullable:l}))}for(const e of n)if("integer"===e.type&&!e.nullable&&I.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:r,fields:n,errors:t}}(e)}throw new o.Z(T,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.Z)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:w,TYPENAME:t,...n?.customParameters},signal:n?.signal})).data)}const I=new Set(["objectid","fid"]);async function D(e,t,n,i,a){let{data:s}=await(0,r.Z)(e,{responseType:"text",query:M(t,n,i,a),signal:a?.signal});s=s.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{if(a?.dateFields?.length){const e=new Set(a.dateFields);return JSON.parse(s,((t,n)=>e.has(t)?p(n):n))}return JSON.parse(s)}catch(e){throw new o.Z(x,"Error while parsing the response",{response:s,error:e})}}function M(e,t,n,r){const o="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:e,OUTPUTFORMAT:n,SRSNAME:"EPSG:"+o,STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}function U(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function L(e){const[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function $(e){let t="",n="";if((0,y.h)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new o.Z(`wfs-layer:${t}`,n)}},88724:(e,t,n)=>{function r(e,t){if(e&&t)for(const n of e.children)if(n.localName in t){const e=t[n.localName];if("function"==typeof e){const t=e(n);t&&r(n,t)}else r(n,e)}}function*o(e,t){for(const n of e.children)if(n.localName in t){const e=t[n.localName];"function"==typeof e?yield e(n):yield*o(n,e)}}n.d(t,{H:()=>o,h:()=>r})},1231:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(35454),a=n(96674),s=n(5600),u=n(75215),l=(n(67676),n(80442),n(36030)),c=n(71715),p=n(52011),d=n(72729),y=n(86719);const f=new i.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=r=class extends a.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?f.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,o._)([(0,s.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,o._)([(0,s.Cb)()],m.prototype,"description",void 0),(0,o._)([(0,c.r)("description")],m.prototype,"readDescription",null),(0,o._)([(0,s.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],m.prototype,"domain",void 0),(0,o._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,o._)([(0,s.Cb)({type:u.z8,json:{write:!0}})],m.prototype,"length",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,o._)([(0,s.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,o._)([(0,l.J)(y.v)],m.prototype,"type",void 0),(0,o._)([(0,s.Cb)()],m.prototype,"valueType",void 0),(0,o._)([(0,c.r)("valueType",["description"])],m.prototype,"readValueType",null),(0,o._)([(0,s.Cb)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=r=(0,o._)([(0,p.j)("esri.layers.support.Field")],m);const h=m},72729:(e,t,n)=>{n.d(t,{im:()=>C,V5:()=>_}),n(80442);var r,o=n(43697),i=n(22974),a=n(5600),s=(n(75215),n(36030)),u=n(52011),l=n(96674);n(67676);let c=r=class extends l.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,o._)([(0,a.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=r=(0,o._)([(0,u.j)("esri.layers.support.CodedValue")],c);const p=new(n(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends l.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,o._)([(0,s.J)(p)],d.prototype,"type",void 0),d=(0,o._)([(0,u.j)("esri.layers.support.Domain")],d);const y=d;var f;let m=f=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,i.d9)(this.codedValues),name:this.name})}};(0,o._)([(0,a.Cb)({type:[c],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,o._)([(0,s.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,o._)([(0,u.j)("esri.layers.support.CodedValueDomain")],m);const h=m;var g;n(92604),n(20102);let w=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,o._)([(0,s.J)({inherited:"inherited"})],w.prototype,"type",void 0),w=g=(0,o._)([(0,u.j)("esri.layers.support.InheritedDomain")],w);const b=w;var S;let F=S=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new S({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],F.prototype,"maxValue",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],F.prototype,"minValue",void 0),(0,o._)([(0,s.J)({range:"range"})],F.prototype,"type",void 0),F=S=(0,o._)([(0,u.j)("esri.layers.support.RangeDomain")],F);const T=F,_={key:"type",base:y,typeMap:{range:F,"coded-value":h,inherited:b}};function C(e){if(!e||!e.type)return null;switch(e.type){case"range":return T.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2763],{92835:(e,t,i)=>{i.d(t,{Z:()=>p});var r,s=i(43697),n=i(96674),o=i(35463),a=i(5600),l=(i(75215),i(67676),i(80442),i(71715)),h=i(52011),u=i(30556);let d=r=class extends n.wq{static get allTime(){return c}static get empty(){return m}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.JE)(i,e,t));let s=this.end;if(s){const i=(0,o.JE)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.Nm)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;if(s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?a=i:n>=t&&n<=i&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new r;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return r.empty}offset(e,t,i="system"){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.Nm)(n,e,t,i)),null!=a&&(s.end=(0,o.Nm)(a,e,t,i)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return c.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,s._)([(0,l.r)("end")],d.prototype,"readEnd",null),(0,s._)([(0,u.c)("end")],d.prototype,"writeEnd",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,s._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,s._)([(0,l.r)("start")],d.prototype,"readStart",null),(0,s._)([(0,u.c)("start")],d.prototype,"writeStart",null),d=r=(0,s._)([(0,h.j)("esri.TimeExtent")],d);const c=new d,m=new d({start:void 0,end:void 0}),p=d},10699:(e,t,i)=>{i.d(t,{IG:()=>o,iv:()=>a});var r=i(43697),s=i(52011);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,r._)([(0,s.j)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,r._)([(0,s.j)("esri.core.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,r._)([(0,s.j)("esri.core.Identifiable")],l)},13867:(e,t,i)=>{i.d(t,{z:()=>s});var r=i(69801);class s{constructor(e,t){this._storage=new r.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,i)=>{i.d(t,{WJ:()=>a,Xq:()=>o});var r,s,n=i(44553);(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(e,t,i){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,i,r=0){this._storage.put(this,e,t,i,r)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,i){this._storage.updateSize(this,e,t,i)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.Z,this._users=new n.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,i,s,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return void console.warn("Refusing to cache entry with invalid size "+s);const a=1+Math.max(n,-3)- -3;this._db.set(t,{entry:i,size:s,lifetime:a,lives:a}),this._size+=s,e.size+=s,this._checkSizeLimits()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach(((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forAll((i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}}))}));const r={};this._users.forAll((e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"}));const s=Object.keys(t);s.sort(((e,i)=>t[i]-t[e])),s.forEach((i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]));for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,r.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i){let r;return this._removeFuncs.some((s=>{if(e.startsWith(s[0])){const e=s[1](t,i);return"number"==typeof e&&(r=e),!0}return!1})),r}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,i]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,i,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,i=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>l,Z_:()=>y,gx:()=>h,nn:()=>g,on:()=>d,tX:()=>_}),i(66643),i(46791);var r=i(91460),s=i(50758),n=i(70586),o=i(95330),a=i(26258);function l(e,t,i={}){return u(e,t,i,m)}function h(e,t,i={}){return u(e,t,i,p)}function u(e,t,i={},r){let s=null;const o=i.once?(e,i)=>{r(e)&&((0,n.hw)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,a.aQ)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function d(e,t,i,o={}){let a=null,h=null,u=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function c(e){o.once&&o.once&&(0,n.hw)(u),i(e)}const m=l(e,((e,i)=>{d(),(0,r.vT)(e)&&(a=e,h=(0,r.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,s.kB)((()=>{m.remove(),d()})),u}function c(e,t){return function(e,t,i){if((0,o.Hc)(i))return Promise.reject((0,o.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((r,n)=>{a=(0,s.AL)([(0,o.fu)(i,(()=>{l(),n((0,o.zE)())})),u(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??m)])}))}(e,p,t)}function m(e){return!0}function p(e){return!!e}i(87538);const y={sync:!0},g={initial:!0},_={sync:!0,initial:!0}},35463:(e,t,i)=>{i.d(t,{JE:()=>a,Nm:()=>o,rJ:()=>l});var r=i(23756),s=i(17126);const n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function o(e,t,i,n="system"){const o=new s.vF((0,r.f1)(n)),a=s.ou.fromJSDate(e,{zone:o}),l="decades"===i||"centuries"===i?"year":h(i);return"decades"===i&&(t*=10),"centuries"===i&&(t*=100),a.plus({[l]:t}).toJSDate()}function a(e,t,i="system"){const n=new s.vF((0,r.f1)(i)),o=s.ou.fromJSDate(e,{zone:n});if("decades"===t||"centuries"===t){const e=o.startOf("year"),{year:i}=e,r=i-i%("decades"===t?10:100);return e.set({year:r}).toJSDate()}const a=h(t);return o.startOf(a).toJSDate()}function l(e,t,i){return 0===e?0:e*n[t]/n[i]}function h(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},79235:(e,t,i)=>{i.d(t,{Z:()=>v});var r,s=i(43697),n=i(67676),o=i(35454),a=i(96674),l=i(67900),h=i(20941),u=i(5600),d=(i(75215),i(80442),i(71715)),c=i(52011),m=i(30556);const p=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),y=p.jsonValues.slice();(0,n.e$)(y,"orthometric");const g=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let _=r=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return p.write(e,t,i)}readHeightModel(e,t,i){return p.read(e)||(i&&i.messages&&i.messages.push(function(e,t){return new h.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return g.read(e)||(i&&i.messages&&i.messages.push(f(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.$C)(e)||g.read(e)||(i&&i.messages&&i.messages.push(f(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.cM)(t);return new r({heightModel:e.heightModel,heightUnit:i,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new h.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.Cb)({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y,default:"ellipsoidal"}}}})],_.prototype,"heightModel",void 0),(0,s._)([(0,m.c)("web-scene","heightModel")],_.prototype,"writeHeightModel",null),(0,s._)([(0,d.r)(["web-scene","service"],"heightModel")],_.prototype,"readHeightModel",null),(0,s._)([(0,u.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],_.prototype,"heightUnit",void 0),(0,s._)([(0,d.r)("web-scene","heightUnit")],_.prototype,"readHeightUnit",null),(0,s._)([(0,d.r)("service","heightUnit")],_.prototype,"readHeightUnitService",null),(0,s._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],_.prototype,"vertCRS",void 0),(0,s._)([(0,d.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],_.prototype,"readVertCRS",null),_=r=(0,s._)([(0,c.j)("esri.geometry.HeightModelInfo")],_);const v=_},23756:(e,t,i)=>{i.d(t,{Ze:()=>w,Xr:()=>g,p6:()=>S,f1:()=>T});var r=i(35454),s=i(70171);const n="system",o="unknown",a="UTC";i(17126);const l=Intl.DateTimeFormat().resolvedOptions().timeZone,h={year:"numeric",month:"numeric",day:"numeric"},u={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},c={year:"numeric",month:"long",weekday:"long",day:"numeric"},m={hour:"numeric",minute:"numeric"},p={...m,second:"numeric"},y={"short-date":h,"short-date-short-time":{...h,...m},"short-date-short-time-24":{...h,...m,hour12:!1},"short-date-long-time":{...h,...p},"short-date-long-time-24":{...h,...p,hour12:!1},"short-date-le":h,"short-date-le-short-time":{...h,...m},"short-date-le-short-time-24":{...h,...m,hour12:!1},"short-date-le-long-time":{...h,...p},"short-date-le-long-time-24":{...h,...p,hour12:!1},"long-month-day-year":u,"long-month-day-year-short-time":{...u,...m},"long-month-day-year-short-time-24":{...u,...m,hour12:!1},"long-month-day-year-long-time":{...u,...p},"long-month-day-year-long-time-24":{...u,...p,hour12:!1},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...m},"day-short-month-year-short-time-24":{...d,...m,hour12:!1},"day-short-month-year-long-time":{...d,...p},"day-short-month-year-long-time-24":{...d,...p,hour12:!1},"long-date":c,"long-date-short-time":{...c,...m},"long-date-short-time-24":{...c,...m,hour12:!1},"long-date-long-time":{...c,...p},"long-date-long-time-24":{...c,...p,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":m,"long-time":p},g=(0,r.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),_={ar:"ar-u-nu-latn-ca-gregory"};let f=new WeakMap;const v=y["short-date-short-time"];function b(e){let t=f.get(e);if(!t){const i=(0,s.Kd)(),r=_[i]||i,n=z(e);t=new Intl.DateTimeFormat(r,n),f.set(e,t)}return t}function w(e){return y[e]}function S(e,t=v){return b(t).format(e)}function z(e){const t=T(e.timeZone??n);return{...e,timeZone:t}}function T(e){switch(e){case n:return l;case o:return a;default:return e}}(0,s.Ze)((()=>{f=new WeakMap}))},65665:(e,t,i)=>{i.r(t),i.d(t,{default:()=>M});var r=i(43697),s=i(3172),n=i(20102),o=i(70586),a=i(16453),l=i(95330),h=i(17452),u=i(5600),d=(i(75215),i(67676)),c=(i(80442),i(71715)),m=i(52011),p=i(79235),y=i(87085),g=i(46486),_=i(17287),f=i(38009),v=i(16859),b=i(21506);class w{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var S=i(50758),z=i(92604),T=i(56569);class I{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,T.bA)(e,{...s,schedule:r}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>z.Z.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,S.kB)((()=>{i.removed=!0,(0,d.Od)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,i){if(this._thread){const r=this._transferLists[e],s=r?r(t):[];return this._thread.invoke(e,t,{transferList:s,signal:i})}return this._promise?this._promise.then((()=>((0,l.k_)(i),this.invokeMethod(e,t,i)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class C extends I{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(D.forEach(((e,t)=>{e===this&&D.delete(t)})),this.destroy())}}const D=new Map;let E=class extends((0,g.Z)((0,_.Y)((0,f.q)((0,v.I)((0,a.R)(y.Z)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=D.get(e);return t||(null!=e?(t=new C((t=>e.immediate.schedule(t))),D.set(e,t)):(t=new C,D.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.RY)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=null!=(r=r||{signal:null}).signal?r.signal:r.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:r.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,i,r))).then((()=>(0,s.Z)(this.getTileUrl(e,t,i),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new w(e)))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.B7)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await i.e(5642).then(i.bind(i,55642));return(0,l.k_)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await i.e(5642).then(i.bind(i,55642));return(0,l.k_)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.Z)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[L]}};(0,r._)([(0,u.Cb)({readOnly:!0})],E.prototype,"capabilities",void 0),(0,r._)([(0,c.r)("service","capabilities",["capabilities"])],E.prototype,"readCapabilities",null),(0,r._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],E.prototype,"copyright",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,type:p.Z})],E.prototype,"heightModelInfo",void 0),(0,r._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],E.prototype,"path",void 0),(0,r._)([(0,u.Cb)({type:["show","hide"]})],E.prototype,"listMode",void 0),(0,r._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],E.prototype,"minScale",void 0),(0,r._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],E.prototype,"maxScale",void 0),(0,r._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],E.prototype,"opacity",void 0),(0,r._)([(0,u.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],E.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.Cb)()],E.prototype,"sourceJSON",void 0),(0,r._)([(0,u.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],E.prototype,"type",void 0),(0,r._)([(0,u.Cb)(b.HQ)],E.prototype,"url",void 0),(0,r._)([(0,u.Cb)()],E.prototype,"version",void 0),(0,r._)([(0,c.r)("version",["currentVersion"])],E.prototype,"readVersion",null),E=(0,r._)([(0,m.j)("esri.layers.ElevationLayer")],E);const L=Symbol("default-fetch-tile");E.prototype.fetchTile[L]=!0;const M=E},87085:(e,t,i)=>{i.d(t,{Z:()=>v});var r=i(43697),s=(i(66577),i(3172)),n=i(20102),o=i(32448),a=i(10699),l=i(83379),h=i(92604),u=i(95330),d=i(17452),c=i(5600),m=(i(75215),i(67676),i(80442),i(52011)),p=i(68773),y=i(6570),g=i(82971);let _=0,f=class extends(o.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.Z(-180,-90,180,90,g.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(3529).then(i.bind(i,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await i.e(8008).then(i.bind(i,28008));try{return await r(t)}catch(e){const i=t&&t.portalItem,r=i&&i.id||"unset",s=i&&i.portal&&i.portal.url||p.default.portalUrl;throw h.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.D_)(e)||h.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.Z)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,c.Cb)({type:String})],f.prototype,"attributionDataUrl",void 0),(0,r._)([(0,c.Cb)({type:y.Z})],f.prototype,"fullExtent",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],f.prototype,"hasAttributionData",null),(0,r._)([(0,c.Cb)({type:String,clonable:!1})],f.prototype,"id",void 0),(0,r._)([(0,c.Cb)({type:Boolean,nonNullable:!0})],f.prototype,"legendEnabled",void 0),(0,r._)([(0,c.Cb)({type:["show","hide","hide-children"]})],f.prototype,"listMode",void 0),(0,r._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],f.prototype,"opacity",void 0),(0,r._)([(0,c.Cb)({clonable:!1})],f.prototype,"parent",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],f.prototype,"parsedUrl",null),(0,r._)([(0,c.Cb)({type:Boolean,readOnly:!0})],f.prototype,"persistenceEnabled",void 0),(0,r._)([(0,c.Cb)({type:Boolean})],f.prototype,"popupEnabled",void 0),(0,r._)([(0,c.Cb)({type:Boolean})],f.prototype,"attributionVisible",void 0),(0,r._)([(0,c.Cb)({type:g.Z})],f.prototype,"spatialReference",void 0),(0,r._)([(0,c.Cb)({type:String})],f.prototype,"title",void 0),(0,r._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],f.prototype,"type",void 0),(0,r._)([(0,c.Cb)()],f.prototype,"url",void 0),(0,r._)([(0,c.Cb)({type:Boolean,nonNullable:!0})],f.prototype,"visible",void 0),f=(0,r._)([(0,m.j)("esri.layers.Layer")],f);const v=f},16859:(e,t,i)=>{i.d(t,{I:()=>S});var r=i(43697),s=i(68773),n=i(40330),o=i(3172),a=i(66643),l=i(20102),h=i(92604),u=i(70586),d=i(95330),c=i(17452),m=i(5600),p=(i(75215),i(67676),i(80442),i(71715)),y=i(52011),g=i(30556),_=i(84230),f=i(48522),v=i(15235),b=i(86082),w=i(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new v.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,d.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.r9)(e),!0))))}async setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.Ss)(i);let s,o;if(r)s=i.portal.url;else try{s=await(0,_.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!s||!(0,c.Zo)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new v.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,d.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=z.credential===t?z.user:await this._fetchEditingUser(e);return z.credential=t,z.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=f.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(r))return s.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,a.q6)((0,o.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?b.Z.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||f.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,g.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},z={credential:null,user:null}}}]);