@arcgis/core 5.1.0-next.104 → 5.1.0-next.106

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 (461) hide show
  1. package/analysis/AreaMeasurementAnalysis.d.ts +5 -5
  2. package/analysis/DimensionAnalysis.d.ts +3 -3
  3. package/analysis/DimensionSimpleStyle.d.ts +2 -2
  4. package/analysis/DirectLineMeasurementAnalysis.d.ts +4 -4
  5. package/analysis/DistanceMeasurementAnalysis.d.ts +4 -4
  6. package/analysis/ElevationProfileAnalysis.d.ts +3 -3
  7. package/analysis/LengthDimension.d.ts +2 -2
  8. package/analysis/LineOfSightAnalysis.d.ts +4 -4
  9. package/analysis/ShadowCast/DiscreteOptions.d.ts +7 -3
  10. package/analysis/ShadowCast/MinDurationOptions.d.ts +5 -1
  11. package/analysis/ShadowCast/TotalDurationOptions.d.ts +7 -3
  12. package/analysis/ShadowCast/types.d.ts +1 -1
  13. package/analysis/ShadowCastAnalysis.d.ts +90 -66
  14. package/analysis/SliceAnalysis.d.ts +4 -4
  15. package/analysis/SlicePlane.d.ts +3 -3
  16. package/analysis/Viewshed.d.ts +2 -2
  17. package/analysis/ViewshedAnalysis.d.ts +3 -3
  18. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +1 -1
  19. package/analysis/VolumeMeasurementAnalysis.d.ts +3 -3
  20. package/applications/Components/imageryUtils.d.ts +24 -0
  21. package/applications/Components/layerUtils.d.ts +21 -0
  22. package/applications/Components/layerUtils.js +2 -0
  23. package/applications/Components/templateUtils.d.ts +11 -1
  24. package/applications/Components/templateUtils.js +1 -1
  25. package/arcgisGlobal.d.ts +1 -0
  26. package/assets/components/assets/icon/buttons16.json +1 -0
  27. package/assets/components/assets/icon/buttons24.json +1 -0
  28. package/assets/components/assets/icon/buttons32.json +1 -0
  29. package/assets/components/assets/icon/entityTypes16.json +1 -0
  30. package/assets/components/assets/icon/entityTypes24.json +1 -0
  31. package/assets/components/assets/icon/entityTypes32.json +1 -0
  32. package/assets/esri/core/t9n/Units.json +1 -1
  33. package/assets/esri/core/t9n/Units_ar.json +1 -1
  34. package/assets/esri/core/t9n/Units_bg.json +1 -1
  35. package/assets/esri/core/t9n/Units_bs.json +1 -1
  36. package/assets/esri/core/t9n/Units_ca.json +1 -1
  37. package/assets/esri/core/t9n/Units_cs.json +1 -1
  38. package/assets/esri/core/t9n/Units_da.json +1 -1
  39. package/assets/esri/core/t9n/Units_de.json +1 -1
  40. package/assets/esri/core/t9n/Units_el.json +1 -1
  41. package/assets/esri/core/t9n/Units_en.json +1 -1
  42. package/assets/esri/core/t9n/Units_es.json +1 -1
  43. package/assets/esri/core/t9n/Units_et.json +1 -1
  44. package/assets/esri/core/t9n/Units_fi.json +1 -1
  45. package/assets/esri/core/t9n/Units_fr.json +1 -1
  46. package/assets/esri/core/t9n/Units_he.json +1 -1
  47. package/assets/esri/core/t9n/Units_hr.json +1 -1
  48. package/assets/esri/core/t9n/Units_hu.json +1 -1
  49. package/assets/esri/core/t9n/Units_id.json +1 -1
  50. package/assets/esri/core/t9n/Units_it.json +1 -1
  51. package/assets/esri/core/t9n/Units_ja.json +1 -1
  52. package/assets/esri/core/t9n/Units_ko.json +1 -1
  53. package/assets/esri/core/t9n/Units_lt.json +1 -1
  54. package/assets/esri/core/t9n/Units_lv.json +1 -1
  55. package/assets/esri/core/t9n/Units_nl.json +1 -1
  56. package/assets/esri/core/t9n/Units_no.json +1 -1
  57. package/assets/esri/core/t9n/Units_pl.json +1 -1
  58. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  59. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  60. package/assets/esri/core/t9n/Units_ro.json +1 -1
  61. package/assets/esri/core/t9n/Units_ru.json +1 -1
  62. package/assets/esri/core/t9n/Units_sk.json +1 -1
  63. package/assets/esri/core/t9n/Units_sl.json +1 -1
  64. package/assets/esri/core/t9n/Units_sr.json +1 -1
  65. package/assets/esri/core/t9n/Units_sv.json +1 -1
  66. package/assets/esri/core/t9n/Units_th.json +1 -1
  67. package/assets/esri/core/t9n/Units_tr.json +1 -1
  68. package/assets/esri/core/t9n/Units_uk.json +1 -1
  69. package/assets/esri/core/t9n/Units_vi.json +1 -1
  70. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  71. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  72. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  73. package/assets/esri/core/workers/RemoteClient.js +1 -1
  74. package/assets/esri/core/workers/chunks/01c70c27aa3a955e2928.js +262 -0
  75. package/assets/esri/core/workers/chunks/{7d571845292b1b7769c2.js → 065dd2fdc834146423c7.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{f5bd0a4f82df5e942b70.js → 093f27e4e4781870b431.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{2a5f6a8d282f2c391591.js → 15920af0c4f46773b06e.js} +1 -1
  78. package/assets/esri/core/workers/chunks/179c9fe4ac83b42e5976.js +1 -0
  79. package/assets/esri/core/workers/chunks/1d1929f98d941179be29.js +2 -0
  80. package/assets/esri/core/workers/chunks/{24247ee93f43fff5e596.js.LICENSE.txt → 1d1929f98d941179be29.js.LICENSE.txt} +1 -3
  81. package/assets/esri/core/workers/chunks/1ebb613bbe09fcf274d8.js +1 -0
  82. package/assets/esri/core/workers/chunks/24b43fb12fc3009fdc30.js +1 -0
  83. package/assets/esri/core/workers/chunks/2b9661700743d1f9717e.js +1 -0
  84. package/assets/esri/core/workers/chunks/2f0a3b22fc46d832e240.js +1 -0
  85. package/assets/esri/core/workers/chunks/340f2c996f62f7f5ceae.js +1 -0
  86. package/assets/esri/core/workers/chunks/466c250537415f12eb59.js +1 -0
  87. package/assets/esri/core/workers/chunks/549d348ca181d06aefb7.js +2 -0
  88. package/assets/esri/core/workers/chunks/{0cb8bc6dbbbe3b212712.js → 558606a1af22e4a0d536.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{7485d59d60d61737d662.js → 55b765c72d13b3b911f9.js} +1 -1
  90. package/assets/esri/core/workers/chunks/5cdf87e7a59ace38df87.js +1 -0
  91. package/assets/esri/core/workers/chunks/622bdd1b9d5d292ec12b.js +1 -0
  92. package/assets/esri/core/workers/chunks/{bff0c4094c14cb97b18f.js → 63ea4191d441efd2f146.js} +1 -1
  93. package/assets/esri/core/workers/chunks/69c9eb93553b006b640d.js +2 -0
  94. package/assets/esri/core/workers/chunks/6d20d741b8ae1a45b422.js +1 -0
  95. package/assets/esri/core/workers/chunks/{b63cbf6c2c9ec1b02b9a.js → 6e21675bbd7a44070771.js} +1 -1
  96. package/assets/esri/core/workers/chunks/702a3ef9e1b3442cbee7.js +1 -0
  97. package/assets/esri/core/workers/chunks/762e23466308f22d7076.js +1 -0
  98. package/assets/esri/core/workers/chunks/{52219561c144e5cb4442.js → 770611659b38066a6228.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{c476f4979048e558baa7.js → 7ce60331f94ee0a5d674.js} +57 -75
  100. package/assets/esri/core/workers/chunks/7e02e5c6979090fe3ea7.js +1 -0
  101. package/assets/esri/core/workers/chunks/825db2ea15308ee6e5dc.js +1 -0
  102. package/assets/esri/core/workers/chunks/{bf2c202dec5ab7bc770b.js → 829a0583b8a228c65379.js} +1 -1
  103. package/assets/esri/core/workers/chunks/8330302096d4312a4393.js +1 -0
  104. package/assets/esri/core/workers/chunks/885eac78a76184efa1e5.js +1 -0
  105. package/assets/esri/core/workers/chunks/{79dc7045d9a2d43ba8df.js → 890b7a1153b7f65eba9a.js} +1 -1
  106. package/assets/esri/core/workers/chunks/8a1751187a20b6578875.js +1 -0
  107. package/assets/esri/core/workers/chunks/{d610f517fb3c6cb24365.js → 8ade869fa9bae446266a.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{44636ef119c6a576470b.js → 94eab215bab3e4e0e5b5.js} +1 -1
  109. package/assets/esri/core/workers/chunks/95dee5853c6e89f15ea9.js +1 -0
  110. package/assets/esri/core/workers/chunks/a5b9ae4c93f9af7589f2.js +1 -0
  111. package/assets/esri/core/workers/chunks/{95798e3de3419fdda6ac.js → a8ae00e06f98e04aee8e.js} +1 -1
  112. package/assets/esri/core/workers/chunks/aaad0d3e82ed917d3886.js +1 -0
  113. package/assets/esri/core/workers/chunks/b3e8ab68fc38306f13c6.js +1 -0
  114. package/assets/esri/core/workers/chunks/b7a81fd4994eabba1869.js +640 -0
  115. package/assets/esri/core/workers/chunks/{9542ef3f6c2bc7c14d85.js → b9850fe7dcdaed0c327c.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{f7e386ece75afb6e4be5.js → bc249bb667f0564ad093.js} +1 -1
  117. package/assets/esri/core/workers/chunks/bd59cb5abc67e46f1b2c.js +2 -0
  118. package/assets/esri/core/workers/chunks/{f3a9100518b044e79501.js → be817be7c81fb630122f.js} +1 -1
  119. package/assets/esri/core/workers/chunks/{3c9482764c9e4f8bcbb0.js → c187bc997bad61b6c6e9.js} +1 -1
  120. package/assets/esri/core/workers/chunks/c4872cf3b71d00f450e1.js +1 -0
  121. package/assets/esri/core/workers/chunks/c5ab346a226df1894302.js +1 -0
  122. package/assets/esri/core/workers/chunks/{ce0c7070eeb723a718e7.js → d859c046a3ea42530bff.js} +1 -1
  123. package/assets/esri/core/workers/chunks/da29cf0e64065631a470.js +1 -0
  124. package/assets/esri/core/workers/chunks/{bb04aff0b4947408592c.js → dcba6c766eee8b90381a.js} +1 -1
  125. package/assets/esri/core/workers/chunks/ddebc1dc10a2d207389f.js +1 -0
  126. package/assets/esri/core/workers/chunks/e393fd61deb2e7f22ee6.js +1 -0
  127. package/assets/esri/core/workers/chunks/ea2bf7c543cc536400b7.js +30 -0
  128. package/assets/esri/core/workers/chunks/ece30bfd5c49b8d99752.js +1 -0
  129. package/assets/esri/core/workers/chunks/ecf4d07917efc97eb991.js +1 -0
  130. package/assets/esri/core/workers/chunks/ee56290e600cbeb25a00.js +1 -0
  131. package/assets/esri/core/workers/chunks/f52c6efc5a2abf5ac845.js +1 -0
  132. package/assets/esri/core/workers/chunks/{5cffc7b49966201eccdb.js → f75295cdd5e84eb97d5a.js} +1 -1
  133. package/assets/esri/core/workers/chunks/f7fe17a22390a24d6df8.js +2 -0
  134. package/assets/esri/core/workers/chunks/f9324420f2c6ac240f63.js +1 -0
  135. package/assets/esri/core/workers/chunks/{855bf811cd79b97c169a.js → fae2c8f053927559fff0.js} +1 -1
  136. package/assets/esri/core/workers/chunks/{64e268ebac0b62076f81.js → fbb23db01f3cf629d32e.js} +1 -1
  137. package/assets/esri/core/workers/chunks/fc1fe1f58a65a1694c09.js +1 -0
  138. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +84 -1
  139. package/assets/esri/themes/dark/main.css +1 -1
  140. package/assets/esri/themes/light/main.css +1 -1
  141. package/assets/esri/themes/light/view.css +1 -1
  142. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  143. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  144. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  145. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  146. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  147. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  148. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  149. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  150. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  151. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  152. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  153. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  154. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  155. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  156. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  157. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  158. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  159. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  160. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  161. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  162. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  163. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  164. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  165. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  166. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  167. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  168. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  169. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  170. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  171. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  172. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  173. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  174. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  175. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  176. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  177. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  178. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  179. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  180. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  181. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  182. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  183. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  184. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  185. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  186. package/chunks/ChapmanAtmosphere.glsl.js +14 -19
  187. package/chunks/ComponentShader.glsl.js +11 -15
  188. package/chunks/Compositing.glsl.js +4 -4
  189. package/chunks/GaussianSplatShadow.glsl.js +7 -7
  190. package/chunks/GlobalIllumination.glsl.js +27 -50
  191. package/chunks/GlobalIlluminationBlur.glsl.js +16 -11
  192. package/chunks/Terrain.glsl.js +1 -1
  193. package/config.js +1 -1
  194. package/core/ReactiveSet.js +1 -1
  195. package/core/generatorUtils.js +2 -0
  196. package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
  197. package/core/libs/gl-matrix-2/math/vec2.js +1 -1
  198. package/core/mathUtils.js +1 -1
  199. package/core/typedArrayUtil.js +1 -1
  200. package/geometry/HeightModelInfo.js +1 -1
  201. package/geometry/geometryEngine.d.ts +2 -2
  202. package/geometry/support/buffer/BufferView.js +1 -1
  203. package/geometry/support/vcsData.js +1 -1
  204. package/geometry/support/vcsLookup.js +1 -1
  205. package/kernel.js +1 -1
  206. package/layers/DimensionLayer.d.ts +5 -5
  207. package/layers/FeatureLayer.d.ts +2 -2
  208. package/layers/GaussianSplatLayer.d.ts +3 -3
  209. package/layers/LineOfSightLayer.d.ts +5 -5
  210. package/layers/ParquetLayer.d.ts +6 -4
  211. package/layers/SubtypeGroupLayer.d.ts +2 -2
  212. package/layers/VideoLayer.js +1 -1
  213. package/layers/ViewshedLayer.d.ts +3 -3
  214. package/layers/graphics/sources/ParquetSource.js +1 -1
  215. package/layers/graphics/sources/parquet/FileProvider.js +2 -0
  216. package/layers/graphics/sources/parquet/PortalParquetFileProvider.js +2 -0
  217. package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +2 -0
  218. package/layers/graphics/sources/parquet/UrlsFileProvider.js +2 -0
  219. package/layers/graphics/sources/parquet/createFileProvider.js +2 -0
  220. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  221. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  222. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  223. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  224. package/layers/knowledgeGraph/layerUtils.js +1 -1
  225. package/layers/orientedImagery/core/utils.js +1 -1
  226. package/layers/raster/datasets/ImageAuxRaster.js +1 -1
  227. package/layers/raster/datasets/pixelReader.js +1 -1
  228. package/layers/raster/formats/JpgPlus.js +1 -1
  229. package/layers/raster/formats/RasterCodec.js +1 -1
  230. package/layers/raster/functions/clipUtils.js +1 -1
  231. package/layers/support/AggregateField.d.ts +2 -1
  232. package/layers/support/LayerContingentValuesCache.js +1 -1
  233. package/layers/support/SubtypeSublayer.d.ts +4 -4
  234. package/layers/support/parquetUtils.d.ts +18 -7
  235. package/layers/support/parquetUtils.js +1 -1
  236. package/layers/support/rasterFunctionUtils.d.ts +2 -2
  237. package/layers/video/VideoController.js +1 -1
  238. package/libs/parquet/parquet.js +1 -1
  239. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  240. package/networks/CircuitManager.d.ts +3 -3
  241. package/networks/UnitIdentifierManager.d.ts +1 -1
  242. package/networks/UnitIdentifierManager.js +1 -1
  243. package/networks/UtilityNetwork.d.ts +2 -2
  244. package/networks/UtilityNetwork.js +1 -1
  245. package/networks/support/Circuit.d.ts +1 -1
  246. package/networks/support/CircuitLocation.d.ts +1 -1
  247. package/networks/support/CircuitSection.d.ts +1 -1
  248. package/networks/support/Subcircuit.d.ts +1 -1
  249. package/networks/support/TraceJobInfo.js +1 -1
  250. package/networks/support/jsonTypes.d.ts +10 -3
  251. package/package.json +3 -3
  252. package/popup/FieldInfo.d.ts +4 -2
  253. package/popup/support/FieldInfoFormat.d.ts +3 -2
  254. package/rest/featureService/FeatureService.d.ts +1 -1
  255. package/rest/knowledgeGraph/FieldIndex.d.ts +1 -1
  256. package/rest/knowledgeGraph/GraphObjectType.d.ts +2 -2
  257. package/rest/knowledgeGraph/GraphSearch.d.ts +1 -1
  258. package/rest/knowledgeGraph/GraphSearchStreaming.d.ts +1 -1
  259. package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +19 -1
  260. package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
  261. package/rest/networks/circuits/support/VerifyCircuitsParameters.d.ts +18 -10
  262. package/rest/networks/circuits/support/VerifyCircuitsParameters.js +1 -1
  263. package/rest/networks/support/TraceParameters.js +1 -1
  264. package/rest/networks/support/TraceResult.js +1 -1
  265. package/rest/networks/trace.js +1 -1
  266. package/rest/networks/unitIdentifiers/support/QueryUnitIdentifiersParameters.js +1 -1
  267. package/rest/support/AreasAndLengthsParameters.d.ts +1 -1
  268. package/rest/support/GeneralizeParameters.d.ts +1 -1
  269. package/rest/support/Query.d.ts +1 -1
  270. package/rest/support/RelationParameters.d.ts +1 -1
  271. package/rest/support/types.d.ts +1 -1
  272. package/support/revision.js +1 -1
  273. package/symbols/CIMSymbol.d.ts +1 -1
  274. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +1 -0
  275. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  276. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  277. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  278. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  279. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  280. package/views/2d/layers/features/sources/strategies/chunks/ParquetSnapshotSourceChunk.js +1 -1
  281. package/views/2d/layers/features/sources/strategies/chunks/ParquetSourceChunk.js +1 -1
  282. package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +1 -0
  283. package/views/3d/analysis/DimensionAnalysisView3D.d.ts +7 -6
  284. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.d.ts +2 -0
  285. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +2 -1
  286. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +14 -6
  287. package/views/3d/analysis/SliceAnalysisView3D.d.ts +4 -3
  288. package/views/3d/analysis/Viewshed/ViewshedDrawToolRenderer.js +2 -0
  289. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  290. package/views/3d/analysis/Viewshed/ViewshedInteractionVisuals.js +2 -0
  291. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +2 -0
  292. package/views/3d/analysis/Viewshed/ViewshedPlacementOperation.js +2 -0
  293. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +2 -0
  294. package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +2 -0
  295. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +2 -0
  296. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  297. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  298. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  299. package/views/3d/analysis/Viewshed/ViewshedTool2.js +1 -1
  300. package/views/3d/analysis/Viewshed/analysisViewRegister.js +1 -1
  301. package/views/3d/analysis/Viewshed/placementUtils.js +2 -0
  302. package/views/3d/analysis/Viewshed/toolLifecycleUtils.js +2 -0
  303. package/views/3d/analysis/Viewshed/viewshedSubToolUtils.js +1 -1
  304. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  305. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +4 -3
  306. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  307. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  308. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  309. package/views/3d/layers/FlowSubView3D.js +1 -1
  310. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  311. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  312. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  313. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  314. package/views/3d/layers/support/UVWorkspace.js +2 -0
  315. package/views/3d/layers/support/patternUtils.js +1 -1
  316. package/views/3d/layers/support/uvUtils.js +1 -1
  317. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  318. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  319. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  320. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  321. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  322. package/views/3d/support/meshProcessing.js +1 -1
  323. package/views/3d/terrain/TerrainRenderer.js +1 -1
  324. package/views/3d/terrain/TileCompositor.js +1 -1
  325. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  326. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  327. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +8 -8
  328. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +13 -9
  329. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +63 -49
  330. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  331. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
  332. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  333. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.js +1 -1
  334. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  335. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  336. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  337. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  338. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  339. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  340. package/views/3d/webgl-engine/lib/AttributeArray.js +1 -1
  341. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  342. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  343. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  344. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  345. package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
  346. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  347. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  348. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  349. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  350. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  351. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  352. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  353. package/views/3d/webgl-engine/materials/PathLayouts.js +2 -0
  354. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  355. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  356. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  357. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  358. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  359. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  360. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  361. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  362. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  363. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  364. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  365. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  366. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  367. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  368. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  369. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  370. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -3
  371. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  372. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
  373. package/views/PopupView.d.ts +77 -1
  374. package/views/PopupView.js +1 -1
  375. package/views/layers/DimensionLayerView.d.ts +2 -1
  376. package/views/layers/FeatureLikeLayerView.js +1 -1
  377. package/views/layers/LineOfSightLayerView.d.ts +2 -1
  378. package/views/layers/ViewshedLayerView.d.ts +2 -1
  379. package/webscene/Slide.js +1 -1
  380. package/widgets/Attachments/types.d.ts +1 -1
  381. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +38 -5
  382. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  383. package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +2 -0
  384. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  385. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  386. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  387. package/widgets/BatchAttributeForm/css.js +1 -1
  388. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +11 -0
  389. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  390. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +77 -0
  391. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  392. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +1 -1
  393. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  394. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  395. package/widgets/BatchAttributeForm/interfaceUtils.js +2 -0
  396. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  397. package/widgets/BatchAttributeForm/types.d.ts +30 -2
  398. package/widgets/BatchAttributeForm.d.ts +52 -1
  399. package/widgets/BatchAttributeForm.js +1 -1
  400. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  401. package/widgets/Editor.d.ts +1 -1
  402. package/widgets/FeatureTable/FieldColumn.js +1 -1
  403. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  404. package/widgets/LayerList/LayerListItem.js +1 -1
  405. package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
  406. package/widgets/OrientedImageryViewer.js +1 -1
  407. package/widgets/TableList/TableListViewModel.js +1 -1
  408. package/widgets/TimeSlider.d.ts +3 -3
  409. package/widgets/Track/TrackViewModel.d.ts +1 -0
  410. package/widgets/Track/TrackViewModel.js +1 -1
  411. package/widgets/Track.js +1 -1
  412. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +10 -0
  413. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  414. package/widgets/support/ContingentValuesManager.js +1 -1
  415. package/widgets/support/GeolocationPositioning.d.ts +1 -0
  416. package/widgets/support/GeolocationPositioning.js +1 -1
  417. package/widgets/support/forms/formUtils.js +1 -1
  418. package/assets/esri/core/workers/chunks/037b36d415ae27e987f9.js +0 -1
  419. package/assets/esri/core/workers/chunks/11b0d3a825fe50dd1e84.js +0 -1
  420. package/assets/esri/core/workers/chunks/1a3426276dc82a8a80f2.js +0 -1
  421. package/assets/esri/core/workers/chunks/1c83e61fd9a4f8fc8372.js +0 -1
  422. package/assets/esri/core/workers/chunks/1cb0c4fc315bbc2bd00b.js +0 -1
  423. package/assets/esri/core/workers/chunks/24247ee93f43fff5e596.js +0 -2
  424. package/assets/esri/core/workers/chunks/276cb6a1cdd26d0e1444.js +0 -1
  425. package/assets/esri/core/workers/chunks/29b00d07d3e1d095c590.js +0 -2
  426. package/assets/esri/core/workers/chunks/2f903bd3a2611e7f0946.js +0 -30
  427. package/assets/esri/core/workers/chunks/2fda38219d778f0447b5.js +0 -1
  428. package/assets/esri/core/workers/chunks/35fdd62277fd06468a29.js +0 -2
  429. package/assets/esri/core/workers/chunks/38d7430d2370b69334d7.js +0 -1
  430. package/assets/esri/core/workers/chunks/39d6032d79720935910d.js +0 -1
  431. package/assets/esri/core/workers/chunks/40caf5e09e4382d81104.js +0 -640
  432. package/assets/esri/core/workers/chunks/4213aa844900fcf95287.js +0 -1
  433. package/assets/esri/core/workers/chunks/594e1f633527749d92d7.js +0 -1
  434. package/assets/esri/core/workers/chunks/5dafd35801dca4229aed.js +0 -1
  435. package/assets/esri/core/workers/chunks/642be1619c0e76355cb6.js +0 -1
  436. package/assets/esri/core/workers/chunks/6d66dc77af8d112c33c6.js +0 -1
  437. package/assets/esri/core/workers/chunks/7b3642195d6d3ea9b830.js +0 -1
  438. package/assets/esri/core/workers/chunks/7e57029ec958f6423d5d.js +0 -2
  439. package/assets/esri/core/workers/chunks/8042e001545e2782499c.js +0 -1
  440. package/assets/esri/core/workers/chunks/881234f25c7814de8753.js +0 -1
  441. package/assets/esri/core/workers/chunks/8a7682071941c35f05c1.js +0 -1
  442. package/assets/esri/core/workers/chunks/8e986167d4a393ee41ea.js +0 -1
  443. package/assets/esri/core/workers/chunks/8fdd57e2a0af647f1e3e.js +0 -1
  444. package/assets/esri/core/workers/chunks/90ea570f6b6ce8ca693b.js +0 -1
  445. package/assets/esri/core/workers/chunks/9373daa677dc767d7cf0.js +0 -1
  446. package/assets/esri/core/workers/chunks/95df6d2ebacc43ac5fa3.js +0 -1
  447. package/assets/esri/core/workers/chunks/a02ebdcb802d128c8eee.js +0 -1
  448. package/assets/esri/core/workers/chunks/adf72d87f0114aeade0e.js +0 -1
  449. package/assets/esri/core/workers/chunks/b1a21a4d7d73ad7d0e47.js +0 -1
  450. package/assets/esri/core/workers/chunks/b75e090a7e935ff870a3.js +0 -1
  451. package/assets/esri/core/workers/chunks/bacf0c9d5d3e084dea61.js +0 -1
  452. package/assets/esri/core/workers/chunks/c0e4fd6fa1d765275248.js +0 -2
  453. package/assets/esri/core/workers/chunks/cc8d55d1830d7542c3f5.js +0 -262
  454. package/assets/esri/core/workers/chunks/cf3c0bee919bb509cd4f.js +0 -1
  455. package/assets/esri/core/workers/chunks/cfaa6e205bfc0c94a1b1.js +0 -1
  456. package/assets/esri/core/workers/chunks/dcb7a3ff59677b1cf0f1.js +0 -1
  457. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechniqueConfiguration.js +0 -2
  458. /package/assets/esri/core/workers/chunks/{7e57029ec958f6423d5d.js.LICENSE.txt → 549d348ca181d06aefb7.js.LICENSE.txt} +0 -0
  459. /package/assets/esri/core/workers/chunks/{29b00d07d3e1d095c590.js.LICENSE.txt → 69c9eb93553b006b640d.js.LICENSE.txt} +0 -0
  460. /package/assets/esri/core/workers/chunks/{35fdd62277fd06468a29.js.LICENSE.txt → bd59cb5abc67e46f1b2c.js.LICENSE.txt} +0 -0
  461. /package/assets/esri/core/workers/chunks/{c0e4fd6fa1d765275248.js.LICENSE.txt → f7fe17a22390a24d6df8.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2246],{79842(e,t,i){i.d(t,{cZ:()=>S,XW:()=>k,fe:()=>N});var n=i(11254),r=i(49186),s=i(91869),o=(i(90708),i(92722)),a=i(16930);class l{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new d}}class d{constructor(){this.objectIdFieldName="",this.uniqueIdField=new u,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new c,this.geometryType=null,this.spatialReference=new a.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new h,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class u{constructor(){this.name="",this.isSystemMaintained=!1}}class c{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class h{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new y,this.translate=new m}}class y{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class m{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class g{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class f{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}const w=["ELEMENTUID","TYPENAME"];var _=i(49403),I=i(45724),M=i(2645),T=i(93637);function E(e){const t=new l;t.version=e.version;const i=e.get_query_result();if(0!==i.results_type.value)throw new Error("Got a non-feature collection type");const n=i.get_feature_result(),r=t.queryResult.featureResult;r.objectIdFieldName=n.objectid_field_name,r.exceededTransferLimit=n.exceeded_transfer_limit,r.hasM=n.has_m,r.hasZ=n.has_z,r.geometryType=(0,T.i7)(_.bV,n.geometry_type.value),r.globalIdFieldName=n.globalid_field_name,r.geohashFieldName=n.geohash_field_name;const s=r.uniqueIdField,o=n.unique_id_field;s.name=o.name,s.isSystemMaintained=o.isSystemMaintained;const a=r.geometryProperties,p=n.geometry_properties;a.shapeAreaFieldName=p.shapeAreaFieldName,a.shapeLengthFieldName=p.shapeLengthFieldName,a.units=p.units;const d=r.spatialReference,u=n.spatial_reference;d.wkid=u.wkid,d.latestWkid=u.latestWkid,d.vcsWkid=u.vcsWkid,d.latestVcsWkid=u.latestVcsWkid,d.wkt=u.wkt,r.transform=x(n.transform);const c=r.fields,h=r.fieldNameToAttributeIndexMap,y=n.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),i=C(t);c.push(i),h[i.name]=e,t.delete()}y.delete();const g=r.values,b=n.values_count();for(let e=0;e<b;e++)g.push(n.get_value_at(e));const I=r.features,M=n.features,E=M.size();if(E>0)for(const e of w)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<E;e++){const t=new f,i=M.get(e),n=t.attributes,r=i.attributes_count();for(let e=0;e<r;e++)n.push(i.get_attribute_at(e));const s=i.get_compressed_geometry();s&&(t.compressedGeometry=v(s),t.centroid=v(i.get_centroid()));const o=t.aggregateGeometries,a=i.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),i=v(t);o.push(i),t.delete()}a.delete(),I.push(t),i.delete()}M.delete();const S=r.geometryFields,N=n.geometry_fields,L=N.size();for(let e=0;e<L;e++){const t=N.get(e),i=A(t);S.push(i),t.delete()}return N.delete(),t}function v(e){const t=new b;t.geometryType=(0,T.i7)(_.bV,e.geometry_type.value);const i=[],n=[];for(let t=0;t<e.lengths.length;t++)i.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)n.push(e.coords[t]);return t.lengths=i,t.coords=n,t}function C(e){const t=new g;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,T.i7)(_.r5,e.field_type.value),t.sqlType=(0,T.i7)(M.q,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function A(e){const t=C(e);return t.geometryType=(0,T.i7)(_.bV,e.geometry_type.value),t}function x(e){const t=new h;t.quantizeOriginPosition=(0,T.i7)(M.g,e.quantizeOriginPosition.value);const i=t.scale,n=e.scale;i.xScale=n.xScale,i.yScale=n.yScale,i.mScale=n.mScale,i.zScale=n.zScale;const r=t.translate,s=e.translate;return r.xTranslate=s.xTranslate,r.yTranslate=s.yTranslate,r.mTranslate=s.mTranslate,r.zTranslate=s.zTranslate,t}async function S(e,t,i){t??=!1;const o={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){const i=await(0,n.A)(e,{responseType:"array-buffer",signal:t?.signal}),s=await i.data;return async function(e){const t=new((await(0,I.I)()).MapOfObjectIdentifierSetsDecoder),i=t.decode(new Uint8Array(e)),n=new Map;if(0!==i.error_code)throw new r.A("knowledge-graph:layer-support-utils",i.error_message);const s=t.get_map_of_identifier_sets(),o=s.keys,a=o.size();for(let e=0;e<a;e++){const t=o.get(e),i=s.query_identifier_set(t),a=[];if(1===i.id_array_type.value){const e=i.get_globalid_array(),t=e.count();for(let i=0;i<t;i++)a.push(e.get_globalid_at(i))}else if(3===i.id_array_type.value){const e=i.get_identifier_array(),t=e.count();for(let i=0;i<t;i++)a.push(e.get_identifier_at(i).toString())}else if(2===i.id_array_type.value){const e=i.get_string_array(),t=e.count();for(let i=0;i<t;i++)a.push(e.get_string_at(i))}else{if(0!==i.id_array_type.value)throw new r.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=i.get_oid_array(),t=e.count();for(let i=0;i<t;i++)a.push(e.get_objectid_at(i).toString())}}n.set(t,a)}return t.delete(),n}(new Uint8Array(s))}(e,i).then(e=>{!function(e,t){for(const[i,n]of e){const e=(0,s.tE)(t.namedTypeDefinitions,i,()=>({useAllData:!1,members:new Map}));for(const t of n)e.members.has(t)||e.members.set(t,{id:t})}}(e,o)}),o}async function N(e){const t=await(0,I.I)(),i=new t.MapOfObjectIdentifierSets;!function(e,t,i){for(const[n,r]of i.namedTypeDefinitions){if(!r.members||r.useAllData)continue;const i=r.members.keys();let s=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,d=new t.IdentifierArray,u=new t.ObjectIdentifierSet;for(const e of i)o&&(s=!isNaN(Number(e)),o=!1),s?a.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),d.add_identifier(e);u.set_oid_array(a),u.set_string_array(l),u.set_globalid_array(p),u.set_identifier_array(d),a.delete(),l.delete(),p.delete(),d.delete(),e.put_identifier_set(n,u),u.delete()}}(i,t,e);const n=new t.MapOfObjectIdentifierSetsEncoder;try{n.set_map_of_identifier_sets(i),n.encode();const e=n.get_encoding_result();if(0!==e.error.error_code)throw new r.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return n.delete(),t}finally{i.delete()}}async function L(e,t){const i=await(0,n.A)(e,{responseType:"array-buffer",signal:t?.signal});return async function(e){const t=new((await(0,I.I)()).FeatureCollectionDecoder),i=t.decode(new Uint8Array(e));if(0!==i.error_code)throw new r.A("knowledge-graph:layer-support-utils",i.error_message);const n=E(t.get_feature_collection());return t.delete(),n}(await i.data)}function D(e,t){if(!e?.queryResult?.featureResult)return t;const{hasZ:i,hasM:n}=e.queryResult.featureResult,r=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const a of e.queryResult.featureResult.features){const e=a.attributes[r.TYPENAME],l=(0,s.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),p=a.attributes[r.ELEMENTUID];if(a.compressedGeometry?.coords?.length>0){let e=a.compressedGeometry.lengths;"esriGeometryPoint"===a.compressedGeometry.geometryType&&(e=[]),l.members.set(p,{id:p,linkChartLocation:new o.A(e,a.compressedGeometry.coords,i,n)})}else l.members.set(p,{id:p})}return t}const k={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){const i=[],n={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&i.push(L(e.entitiesUrl,t).then(e=>{D(e,n)})),e.relationshipsUrl&&i.push(L(e.relationshipsUrl,t).then(e=>{D(e,n)})),await Promise.all(i),n}(e,t)}},75503(e,t,i){i.d(t,{wq:()=>a});var n=i(4576),r=i(21818),s=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),I.prune(),M.prune(),T.prune(),E.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const n=this._toBBox;if(w(e,i))for(I.clear();i;){for(let r=0,s=i.children.length;r<s;r++){const s=i.children[r],o=i.leaf?n(s):s;w(e,o)&&(i.leaf?t(s):b(e,o)?l(s,t):I.push(s))}i=I.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!w(e,t))return!1;for(I.clear();t;){for(let n=0,r=t.children.length;n<r;n++){const r=t.children[n],s=t.leaf?i(r):r;if(w(e,s)){if(t.leaf||b(e,s))return!0;I.push(r)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(e){if(!e)return this;let t,i=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(T.clear(),E.clear();i||T.length>0;){if(i||(i=T.pop(),s=T.data[T.length-1],o=E.pop()??0,a=!0),i.leaf&&(t=(0,n.qh)(i.children,(0,r.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),T.push(i),this._condense(T),this;a||i.leaf||!b(i,l)?s?(o++,i=s.children[o],a=!1):i=null:(T.push(i),E.push(o),o=0,s=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,n){const r=i-t+1;let s=this._maxEntries;if(r<=s){const n=new A(e.slice(t,i+1));return p(n,this._toBBox),n}n||(n=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(n-1)));const o=new x([]);o.height=n;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));_(e,t,i,l,this._compareMinX);for(let r=t;r<=i;r+=l){const t=Math.min(r+l-1,i);_(e,r,t,a,this._compareMinY);for(let i=r;i<=t;i+=a){const r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,n-1))}}return p(o,this._toBBox),o}_insert(e,t,i){const n=this._toBBox,r=i?e:n(e);T.clear();const s=function(e,t,i,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==i;){let i,n=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=y(o),l=g(e,o)-a;l<r?(r=l,n=a<n?a:n,i=o):l===r&&a<n&&(n=a,i=o)}t=i||t.children[0]}return t}(r,this._data,t,T);for(s.children.push(e),u(s,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;!function(e,t,i){for(let n=i;n>=0;n--)u(t.data[n],e)}(r,T,t)}_split(e,t){const i=e.data[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);const s=this._chooseSplitIndex(i,r,n);if(!s)return;const o=i.children.splice(s,i.children.length-s),a=i.leaf?new A(o):new x(o);a.height=i.height,p(i,this._toBBox),p(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new x([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let n,r,s;n=r=1/0;for(let o=t;o<=i-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,i,this._toBBox),l=f(t,a),p=y(t)+y(a);l<n?(n=l,s=o,r=p<r?p:r):l===n&&p<r&&(r=p,s=o)}return s}_chooseSplitAxis(e,t,i){const n=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);const r=this._toBBox,s=d(e,0,t,r),o=d(e,i-t,i,r);let a=m(s)+m(o);for(let n=t;n<i-t;n++){const t=e.children[n];u(s,e.leaf?r(t):t),a+=m(s)}for(let n=i-t-1;n>=t;n--){const t=e.children[n];u(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const r=e.data[t-1],s=r.children;s.splice((0,n.qh)(s,i,s.length,r.indexHint),1)}else this.clear();else p(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(M.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,r.z)(e));else M.pushArray(i.children);i=M.pop()??null}}function p(e,t){d(e,0,e.children.length,t,e)}function d(e,t,i,n,r){r||(r=new A([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<i;o++)s=e.children[o],u(r,e.leaf?n(s):s);return r}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,s-n)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _(e,t,i,n,r){const s=[t,i];for(;s.length;){const t=s.pop(),i=s.pop();if(t-i<=n)continue;const a=i+Math.ceil((t-i)/n/2)*n;(0,o.q)(e,a,i,t,r),s.push(i,a,a,t)}}const I=new s.A,M=new s.A,T=new s.A,E=new s.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class A extends C{constructor(e){super(),this.children=e,this.leaf=!0}}class x extends C{constructor(e){super(),this.children=e,this.leaf=!1}}},6518(e,t,i){i.d(t,{F:()=>a});var n=i(44208),r=i(75503),s=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,n.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,n)=>{e[t++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,s.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,i){i.d(t,{A:()=>y});var n=i(4576),r=i(49186),s=i(65529),o=i(53966),a=i(70328),l=i(19419),p=i(90708),d=i(6518),u=i(51441),c=i(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,n,r]=this.fullBounds;return{xmin:t,ymin:i,xmax:n,ymax:r,spatialReference:(0,u.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(h,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let n;if(i?(e.displayId=i.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,p.jQ)(null!=n?n:(0,l.vt)(),e.geometry),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:n,attributes:s}=e;for(const e in s)i.attributes[e]=s[e];return n&&(i.geometry=n,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,i){i.d(t,{T:()=>r});var n=i(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new n.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance,e.vertexCount),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},64714(e,t,i){i.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>h});var n=i(44208),r=i(4718),s=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let i="";t&&(i+=`this${u(t)} = null;`);for(const t in e)i+=`this${u(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new n}catch(i){return()=>t?{[t]:null,...e}:{...e}}}function u(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},24137(e,t,i){i.d(t,{P:()=>M});var n=i(5482),r=i(69622),s=i(49186),o=i(53966),a=i(91869),l=i(17676),p=i(39516),d=i(91429),u=i(5443),c=i(39829),h=i(91218),y=i(21325),m=i(15375);const g=(e,t)=>{if("column-reference"===e.type)return e.column===t.systemOidFieldName?"ID(n)":`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&t.supportedSqlTypes.has(e.left.type)&&t.supportedSqlTypes.has(e.right.type)&&t.supportedSqlOperators.has(e.operator))return`${g(e.left,t)} ${e.operator} ${g(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let i="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)i+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";i+=`lower(n.${e.left.column})`}if(i+=" CONTAINS (","string"!==e.right.type)return t.unsupportedOperationFound=!0,"";{let t=e.right.value;t.startsWith("%")&&(t=t.slice(1)),t.endsWith("%")&&(t=t.slice(0,-1)),i+=`'${t.toLowerCase()}')`}return i}return t.unsupportedOperationFound=!0,""};var f=i(69860),b=i(99916),w=i(53902),_=i(42538),I=i(61956);let M=class extends r.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(i=>{i.name&&(t.set(i.name,"entity"),this._processingCacheUpdatesLookup.set(i.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(i.name),i.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(i.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(i=>{i.name&&(t.set(i.name,"relationship"),this._processingCacheUpdatesLookup.set(i.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(i.name),i.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(i.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((i,n)=>{if("entity"===t.get(n))this.entityTypeNames.add(n);else{if("relationship"!==t.get(n))return o.A.getLogger(this).warn(`A named type, ${n}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(n);this.relationshipTypeNames.add(n)}const r=new Map;i.members?.forEach(e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(n)}),this.sublayerCaches.set(n,r)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new s.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const i=this.inclusionModeDefinition.namedTypeDefinitions.get(e);i.members||(i.members=new Map),i.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{const i=new Map;i.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:i}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return f.A.getInstance().readFromStoreById(e)}async getData(e,t,i){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let n;if(n=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,i=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=n.outFields;r&&1===r.length&&r[0]===m.dr&&"1=1"===n.where||await Promise.all(i??[]);const s=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return s.forEach(i=>{if(this.relationshipTypeNames.has(t.objectType.name)){i.geometry=e.relationshipLinkChartDiagramLookup.get(i.attributes[t.objectIdField]);const n=this.memberIdTypeLookup.get(i.attributes[m.Cz]),r=this.memberIdTypeLookup.get(i.attributes[m.KQ]),s=this._isEndEntitySpatial(n,i,m.Cz),o=this._isEndEntitySpatial(r,i,m.KQ);i.attributes[m.BL]=Number(s&&o)}else{i.geometry=e.entityLinkChartDiagramLookup.get(i.attributes[t.objectIdField]);const n=this.geographicLookup.get(t.objectType.name);n&&i.attributes[n.name]?i.attributes[m.BL]=1:i.attributes[m.BL]=0}i.attributes[m.T1]=i.geometry,o.push(i)}),o}return this.retrieveDataFromService(n,t,i)}async getConnectedRecordIds(e,t,i){const n=[];let r="";const s=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)r=r+e+"|";r=r.slice(0,-1)}const o={},a=[];for(const[e,i]of s){const n=`${e}_ids`;o[n]=i,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r:${r}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return n;const l=a.join(" UNION "),p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:l,bindParameters:o}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const i=t[e];n.push({id:i[0],typeName:i[1]}),n.push({id:i[2],typeName:i[3]})}}return n}async getRelationshipsBetweenNodes(e,t,i){const n=this._getNamedTypeIdMapFromNodeIds(e);if(0===n.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},s=[];for(const[e,t]of n.entries()){const i=`${e}_ids`;r[i]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const o=s.join(" UNION "),a=[],l=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:o,bindParameters:r}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const i=t[e];a.push({id:i[0],typeName:i[1]})}}return a}async getRelationshipsFromNodes(e,t,i,n){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const s={relationshipExclusionIds:i,possibleConnectionEntityIds:t},o=[];for(const[e,t]of r.entries()){const i=`${e}_ids`;s[i]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=o.join(" UNION "),l=new Map,p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:a,bindParameters:s}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const i=t[e];let n=l.get(i[1]);n||(n=new Set,l.set(i[1],n)),n.add(i[0])}}const d=[];for(const[e,t]of l)for(const i of t)d.push({id:i,typeName:e});return d}async refreshCacheContent(e,t,i,n=!0,r){const o=f.A.getInstance(),p=[],d=new Map,u=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))d.has(t)?d.get(t)?.push(e):d.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?d.set(t,null):e.members&&e.members.forEach(e=>{d.has(t)&&null!==d.get(t)?d.get(t)?.push(e.id):d.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}));for(const[e,l]of d){const d=new Set(l),c=new Promise((p,c)=>{(async()=>{const p=new Set,c=[];let h,y="",g=!1;if(t||u.get(e)?.properties?.forEach(e=>{e.name&&p.add(e.name)}),i&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&p.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new s.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);g=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)})}h=new _.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const f=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,h,{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:i}=await f.read();if(t)break;const r=[];for(let e=0;e<i.length;e++){const t=i[e];let n=0,s=0;const o={properties:{}};for(o.id=t[n],n++,s++,g&&(o.originId=t[n],n++,s++,o.destinationId=t[n],n++,s++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,()=>new Set).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,()=>new Set).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,()=>[o.originId,o.destinationId]));n<t.length;n++)o.properties[c[n-s]]=t[n];d.delete(o.id),r.push(o)}const s=o.writeToStore(r,m.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach(t=>{l?.set(t.attributes[m.dr],t),n&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[m.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[m.dr],{id:t.attributes[m.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[m.dr],()=>new Set).add(e))})}const b=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(b)for(const e of d)b.members?.delete(e)})().then(()=>{p(null)}).catch(e=>{"AbortError"===e.name?p(null):c(e)})});p.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(p),r?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,i=new Set(e.map(e=>e.id));for(const i of e)t.add(i.typeName),1===this.memberIdTypeLookup.get(i.id)?.size?this.memberIdTypeLookup.delete(i.id):this.memberIdTypeLookup.get(i.id)?.delete(i.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===i.typeName&&e.members?.has(i.id)&&e.members.delete(i.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,n)=>{i.has(n)&&this.sublayerCaches.get(e)?.delete(n)})})}async retrieveDataFromService(e,t,i){const n=f.A.getInstance(),r=new Set,a=[];let l,d="",I=[];const M="relationship"===t.graphType,T=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,E=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let v=!T&&E?Array.from(E).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(v=e.objectIds);else if(null!=e.objectIds&&v&&v.length>0){const t=e.objectIds;e.objectIds=v.filter(e=>t.includes(e))}else if(null!=e.objectIds)v=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=v}if(null!=e.outFields){const i=e.outFields;i.includes("*")?t.fields.forEach(e=>{r.add(e.name)}):i.forEach(e=>{e!==m.dr&&e!==t.geometryFieldName&&r.add(e)})}if(null!=e.geometry){const i=e.geometry;let n;const o=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,m=o?.spatialReference,g=o?.serviceCapabilities?.geometryCapabilities;let f=g?.geometryMaxBoundingRectangleSizeX,w=g?.geometryMaxBoundingRectangleSizeY;if("point"===i.type){let e=i;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,y.KK),e=(0,h.project)(e,y.KK)),n=new u.A({spatialReference:y.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else i?.extent?.spatialReference&&!i.spatialReference?.isWGS84?(await(0,h.initializeProjection)(i.extent.spatialReference,y.KK),n=(0,h.project)(i.extent,y.KK)):n=i.extent;if(f&&w&&m){if(4326!==m.wkid){const e=new u.A({spatialReference:m,xmax:f,ymax:w}),t=(0,h.project)(e,y.KK);f=t.xmax,w=t.ymax}if(n.xmax-n.xmin>f)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${f}° latitude, limit exceeded`);if(n.ymax-n.ymin>w)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const i=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&r.add(e.name)})}d=M?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{d+=`, n.${e}`,a.push(e)}),l=new _.A({openCypherQuery:d,bindParameters:{param_filter_geom:new c.A({rings:(0,b.Wq)(n)})}})}else{let i="";if(null!=e.where&&"1=1"!==e.where){const n=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{n.fieldNames.includes(e.name)&&r.add(e.name)});const s={systemOidFieldName:m.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};i=g(n.parseTree,s),s.unsupportedOperationFound&&(i="")}let n="";n=M?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let s=!1;v&&(s=!0,n+=" WHERE ID(n) IN $ids"),i&&(n+=s?" AND":" WHERE",n+=` ${i}`),n+=" return ID(n)",M&&(n+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{n+=`, n.${e}`,a.push(e)}),n=((e,t)=>{let i=e;return t.orderByFields?.length&&(i=function(e,t){const i=e.trimEnd();if(/\border\s+by\b/i.test(i))return o.A.getLogger("cypherUtils").warn("Query already contains an ORDER BY clause. Skipping addition of new ORDER BY."),e;const n=t.map(e=>e.trim()).filter(e=>!!e).map(e=>{const[t,i]=e.split(/\s+/);return t?`${t===m.dr?"ID(n)":`n.${t}`} ${"DESC"===i?.toUpperCase()?"DESC":"ASC"}`:null}).filter(e=>!!e);return n.length?`${i} ORDER BY ${n.join(", ")}`:e}(i,t.orderByFields)),null!=t.start&&(i=function(e,t){const i=e.trimEnd();return/\bskip\s+(\$\w+|\d+)\b/i.test(i)?(o.A.getLogger("cypherUtils").warn("Query already contains a SKIP clause. Skipping addition of new SKIP."),e):`${i} SKIP ${t}`}(i,t.start)),null!=t.num&&(i=function(e,t){const i=e.trimEnd();return/\blimit\s+(\$\w+|\d+)\b/i.test(i)?(o.A.getLogger("cypherUtils").warn("Query already contains a LIMIT clause. Skipping addition of new LIMIT."),e):`${i} LIMIT ${t}`}(i,t.num)),i})(n,e),l=new _.A(v?{openCypherQuery:n,bindParameters:{ids:v}}:{openCypherQuery:n})}const C=(await(0,w.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,l,i)).resultRowsStream.getReader();for(;;){const{done:e,value:i}=await C.read();if(e)break;const r=[];for(let e=0;e<i.length;e++){const t=i[e];let n=0,s=0;const o={properties:{}};for(o.id=t[n],n++,s++,M&&(o.originId=t[n],n++,s++,o.destinationId=t[n],n++,s++);n<t.length;n++)o.properties[a[n-s]]=t[n];r.push(o)}I=I.concat(n.writeToStore(r,m.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return I}_isEndEntitySpatial(e,t,i){for(const n of e??[])if(this.entityTypeNames.has(n)){const e=this.geographicLookup.get(n),r=e&&this.sublayerCaches.get(n)?.get(t.attributes[i]);if(e&&r?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const i of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(i))return;t.has(i)?t.get(i)?.push(e):t.set(i,[e])}}),t}};(0,n.Cg)([(0,d.MZ)()],M.prototype,"knowledgeGraph",void 0),(0,n.Cg)([(0,d.MZ)()],M.prototype,"inclusionModeDefinition",void 0),(0,n.Cg)([(0,d.MZ)()],M.prototype,"entityTypeNames",void 0),(0,n.Cg)([(0,d.MZ)()],M.prototype,"relationshipTypeNames",void 0),(0,n.Cg)([(0,d.MZ)()],M.prototype,"geographicLookup",void 0),(0,n.Cg)([(0,d.MZ)()],M.prototype,"sublayerCaches",void 0),(0,n.Cg)([(0,d.MZ)()],M.prototype,"nodeConnectionsLookup",void 0),(0,n.Cg)([(0,d.MZ)()],M.prototype,"relationshipConnectionsLookup",void 0),(0,n.Cg)([(0,d.MZ)()],M.prototype,"memberIdTypeLookup",void 0),M=(0,n.Cg)([(0,d.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],M)},62796(e,t,i){i.d(t,{A:()=>me});var n=i(5482),r=i(37838),s=i(49186),o=i(4718),a=i(53966),l=i(25728),p=i(91429),d=(i(29953),i(78247)),u=i(5443),c=i(86738),h=i(39829),y=i(82799),m=i(91218),g=i(16930),f=i(21325),b=i(50498),w=i(55156),_=i(60950),I=i(89808),M=i(99959);const T=Symbol("isKnowledgeGraphGraphicOriginSymbol");var E;class v extends M.A{get[(E=T,_.ym)](){return this.sublayer}get[w.e](){return this.sublayer}get[I.Q](){return this.sublayer}constructor(e,t){super(),this[E]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const C=Symbol("isLinkChartGraphicOriginSymbol");var A;class x extends M.A{get[(A=C,_.ym)](){return this.sublayer}get[w.e](){return this.sublayer}get[I.Q](){return this.sublayer}constructor(e,t){super(),this[A]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var S=i(4146),N=i(83221),L=i(75752),D=i(64714),k=i(15375);const R=(0,i(17036).p)(),F=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,n.Cg)([(0,p.MZ)(R.fields)],i.prototype,"fields",void 0),(0,n.Cg)([(0,p.MZ)(R.fieldsIndex)],i.prototype,"fieldsIndex",void 0),i=(0,n.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],i),i};var B=i(40736),O=i(63074),j=i(6455),P=i(87718),G=i(56658),$=i(32756),Z=i(54310),U=i(25036),Q=i(82935),Y=i(10873),H=i(20569),z=i(29005),q=i(20437),K=i(30524),W=i(46499),X=i(39383),V=i(96184),J=i(96576),ee=i(65494),te=i(41214),ie=i(53902),ne=i(22671),re=i(61956),se=i(30291),oe=i(88625),ae=i(37531),le=i(61322),pe=i(43937);function de(e){if(!e.json)return e;e.json.write=ue(e.json.write);const t=e.json.origins;if(!t)return e;let i;for(i in t){const e=t[i];e&&(e.write=ue(e.write))}return e}function ue(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:i,overridePolicy:n,...r}=e;return function(e,t){const i=he.call(this,e,t);return i.enabled?{...r,...i}:i}}(e)),e):!0===e?ce():e}function ce(){return{overridePolicy:he}}function he(e,t){const i=!!this.geometryType;let n={enabled:i};return i&&(n={...n,...ye.call(this,e,t)}),n}function ye(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let me=class extends(F((0,j.FJ)((0,G.J)((0,P.F)((0,O.dM)((0,$.fY)((0,Q.e)((0,U.j)((0,Z.J)((0,l.M)(S.A))))))))))){constructor(e){super(e),this.blendMode="normal",this.charts=null,this.definitionExpression=null,this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=k.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new le.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const i=re.A.fromJSON(e);return this.queryFeaturesJSON(i,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,B.hZ)(null)}get isTable(){return"link-chart"!==this.parentCompositeLayer?.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}get editingEnabled(){return this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get effectiveCapabilities(){const e=(0,o.o8)(this.capabilities),{operations:t,editing:i}=e;return this.userHasUpdateItemPrivileges&&(t.supportsAdd=t.supportsDelete=t.supportsEditing=t.supportsQuery=t.supportsUpdate=i.supportsDeleteByOthers=i.supportsGeometryUpdate=i.supportsUpdateByOthers=!0),this.userHasFullEditingPrivileges&&t.supportsEditing&&(t.supportsAdd=t.supportsDelete=t.supportsUpdate=i.supportsGeometryUpdate=!0),e}get effectiveEditingEnabled(){return this.userHasUpdateItemPrivileges||this.editingEnabled}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[],t=new Map;for(const e of this.parent?.knowledgeGraph.dataModel.domains??[])t.set(e.name,e);return this.objectType?.properties?.forEach(i=>{const n="esriFieldTypeOID"===i.fieldType?"esriFieldTypeInteger":i.fieldType,r=q.A.fromJSON({name:i.name,type:n,alias:i.alias,defaultValue:i.defaultValue,editable:i.editable,nullable:i.nullable,domain:i.domain&&t.has(i.domain)?t.get(i.domain).toJSON():void 0});e.push(r)}),e.push(q.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),q.A.fromJSON({name:k.M1,type:"esriFieldTypeInteger",alias:k.M1,editable:!1}),q.A.fromJSON({name:k.BL,type:"esriFieldTypeInteger",alias:k.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,B.dD)(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?b.gy.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return k.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new v(this.parent,this);case"link-chart":return new x(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,i=t?this.objectType?.properties?.[t]:null;return i?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,i=t?this.objectType?.properties?.[t]:null;return i?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?(0,B.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,B.iW)(this.graphType,this.graphTypeName,e):(0,B.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,K.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),i=(0,B.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new J.A({type:"simple",symbol:(0,B.UT)(i)});const e=(0,ee.r)((0,D.F0)(b.gy.toJSON("point")).renderer);return(0,ae.dt)(e.symbol,i),e}const n=(0,ee.r)((0,D.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,ae.dt)(n.symbol,i),n}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??g.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,B.CP)(this)}set templates(e){this._overrideIfSome("templates",e)}set timeInfo(e){this._set("timeInfo",e)}get dateFieldsTimeZone(){return this.parentCompositeLayer?.dateFieldsTimeZone}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}get userHasEditingPrivileges(){return!this.parent||this.parent.userHasEditingPrivileges}get userHasFullEditingPrivileges(){return!!this.parent&&this.parent.userHasFullEditingPrivileges}get userHasUpdateItemPrivileges(){return!!this.parent&&this.parent.userHasUpdateItemPrivileges}createPopupTemplate(e){return(0,se.tn)(this,e)}createQuery(){return new re.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return this.fields.find(t=>t.name===e)?.domain||null}async queryFeatures(e,t){await this.load();const{resolvedQuery:i,queryEngine:n}=await this._setupQueryObjects(e),r=this.graphicOrigin,s=ne.A.fromJSON(await n.executeQuery(i.toJSON(),t?.signal));return s.features.forEach(e=>{e.sourceLayer=this,e.origin=r}),s}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:i,queryEngine:n}=await this._setupQueryObjects(e);return await n.executeQuery(i.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:i,queryEngine:n}=await this._setupQueryObjects(e);return n.executeQueryForCount(i.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const i={...e,returnGeometry:!0},{resolvedQuery:n,queryEngine:r}=await this._setupQueryObjects(i),s=await r.executeQueryForExtent(n.toJSON(),t?.signal);let o;return o=null!=s.extent?.xmin&&null!=s.extent?.xmax&&null!=s.extent?.ymin&&null!=s.extent?.ymax?new u.A(s.extent):new u.A,{count:s.count,extent:o}}async queryObjectIds(e,t){await this.load();const i=re.A.from(e);let n;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(i,this,t);n=this.loadQueryEngine(e)}return await n.executeQueryForIds(i.toJSON(),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer.dataManager.knowledgeGraph)throw new s.A("knowledge-graph-sublayer:no-knowledge-graph","ApplyEdits cannot be executed because the parent does not have a Knowledge Graph model. This is usually caused by the layer not yet being loaded");const t=await(0,B.O9)(e,this);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const i=await(0,ie.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),n=(0,B.Gz)(i,this.graphTypeName),r={addedFeatures:n.addFeatureResults,updatedFeatures:n.updateFeatureResults,deletedFeatures:n.deleteFeatureResults,addedAttachments:n.addAttachmentResults,deletedAttachments:n.deleteAttachmentResults,updatedAttachments:n.updateAttachmentResults,exceededTransferLimit:!1,historicMoment:new Date,edits:void 0};return this.emit("edits",r),this.emit("apply-edits",{result:Promise.resolve(r)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...r.addedFeatures.map(e=>e.globalId),...r.updatedFeatures.map(e=>e.globalId),...r.deletedFeatures.map(e=>e.globalId)]),n}loadQueryEngine(e){const t=new N.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),i=new L.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return i.featureStore.addMany(e),i}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new re.A({where:"1=1",outFields:[k.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>(0,K.sv)(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const i=re.A.from(e),n=i.geometry;if(n&&!n.spatialReference?.isWGS84&&(await(0,m.initializeProjection)(n.spatialReference,f.KK),i.geometry=(0,m.project)(n instanceof h.A||n instanceof y.A||n instanceof c.A?n:n.extent,f.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:i,queryEngine:this._cachedQueryEngine};const r=await this.parentCompositeLayer.dataManager.getData(i,this,t);return{resolvedQuery:i,queryEngine:this.loadQueryEngine(r)}}};(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(O.sU)))],me.prototype,"blendMode",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"capabilities",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"isTable",null),(0,n.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:ce()}})],me.prototype,"charts",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"defaultPopupTemplate",null),(0,n.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],me.prototype,"definitionExpression",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(j.Dp)))],me.prototype,"displayFilterEnabled",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(j.KV)))],me.prototype,"displayFilterInfo",void 0),(0,n.Cg)([(0,p.MZ)()],me.prototype,"editingEnabled",null),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(O.LF)))],me.prototype,"effect",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"effectiveCapabilities",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"effectiveEditingEnabled",null),(0,n.Cg)([(0,p.MZ)({type:oe.A})],me.prototype,"elevationInfo",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(P.Y)))],me.prototype,"featureEffect",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(H.d)))],me.prototype,"featureReduction",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"fields",null),(0,n.Cg)([(0,p.MZ)({type:d.A})],me.prototype,"formTemplate",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"geometryType",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"geometryFieldName",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"graphicOrigin",null),(0,n.Cg)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphType",void 0),(0,n.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],me.prototype,"graphTypeName",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"hasM",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"hasZ",null),(0,n.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],me.prototype,"id",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],me.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,p.MZ)({type:[W.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,i){const n=[["ESRI__AGGREGATION_COUNT",k.M1],["ESRI__ORIGIN_ID",k.Cz],["ESRI__DESTINATION_ID",k.KQ],["ESRI__LAYOUT_GEOMETRY",k.T1]];try{for(const t of e)for(const[e,i]of n)t.labelExpression=t.labelExpression?.replaceAll(e,i),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,i))}catch(e){a.A.getLogger(this).warn("Error updating labelingInfo",e)}return(0,X.w)(e,t,i)},write:ce()}})],me.prototype,"labelingInfo",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],me.prototype,"layerType",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Y.fV)))],me.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Y.hG)))],me.prototype,"maxScale",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Y.hn)))],me.prototype,"minScale",void 0),(0,n.Cg)([(0,p.MZ)()],me.prototype,"objectIdField",void 0),(0,n.Cg)([(0,p.MZ)()],me.prototype,"objectType",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Y.ke)))],me.prototype,"opacity",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)($.ne)))],me.prototype,"orderBy",void 0),(0,n.Cg)([(0,p.MZ)({clonable:!1})],me.prototype,"parent",void 0),(0,n.Cg)([(0,p.MZ)()],me.prototype,"parentCompositeLayer",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Y.M6)))],me.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:r.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],me.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:ye}}})],me.prototype,"refreshInterval",void 0),(0,n.Cg)([(0,p.MZ)({types:te.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:ce()}})],me.prototype,"renderer",null),(0,n.Cg)([(0,p.MZ)()],me.prototype,"source",void 0),(0,n.Cg)([(0,p.MZ)()],me.prototype,"spatialReference",null),(0,n.Cg)([(0,p.MZ)({type:z.A})],me.prototype,"templates",null),(0,n.Cg)([(0,p.MZ)({type:V.A,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:ye},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ye}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ye}}}}})],me.prototype,"timeInfo",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"dateFieldsTimeZone",null),(0,n.Cg)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],me.prototype,"title",null),(0,n.Cg)([(0,pe.K)("title")],me.prototype,"writeTitle",null),(0,n.Cg)([(0,p.MZ)({json:{read:!1}})],me.prototype,"type",void 0),(0,n.Cg)([(0,p.MZ)(de((0,o.o8)(Q.B)))],me.prototype,"useViewTime",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasEditingPrivileges",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasFullEditingPrivileges",null),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],me.prototype,"userHasUpdateItemPrivileges",null),(0,n.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:ce()}})],me.prototype,"visible",void 0),me=(0,n.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],me)},69860(e,t,i){i.d(t,{A:()=>a});var n=i(65864),r=i(90708),s=i(43334),o=i(15375);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){const t=[];return e.forEach(e=>{const i=this.readFromStoreById(e);i&&t.push(i)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,i){const a=[];return e.forEach(e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l=null;i&&e.properties[i]&&(l=(0,r.Ux)(e.properties[i])),"originId"in e&&"destinationId"in e&&(e.properties[o.Cz]=e.originId,e.properties[o.KQ]=e.destinationId),e.properties[t]=e.id;let p=e.properties;if(e.id){const t=this._featureLookup.get(e.id);if(t?.attributes){p={...t.attributes,...p};const e=i&&p[i];null!=e&&(p[i]=(0,n.rS)(e)),l=l??t.geometry}}const d=new s.Om(l?.clone(),p,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,d),a.push(d)}),a}}},15375(e,t,i){i.d(t,{BL:()=>l,Cz:()=>r,KQ:()=>s,M1:()=>a,T1:()=>o,dr:()=>n});const n="ESRI__ID",r="ESRI__OriginID",s="ESRI__DestID",o="ESRI__LayoutGeometry",a="ESRI__AggregationCount",l="LC.ESRI__IsSpatial"},40736(e,t,i){i.d(t,{Gz:()=>U,O9:()=>Z,hZ:()=>$,CP:()=>Y,dD:()=>Q,UT:()=>F,MY:()=>B,Td:()=>R,iW:()=>O,e$:()=>j,$L:()=>H,N1:()=>P,qN:()=>D});var n=i(68197),r=i(92602),s=i(70333),o=(i(49186),i(91869)),a=i(17676),l=i(78247),p=i(11684),d=i(91218),u=i(16930),c=i(17136),h=i(99352),y=i(15375),m=i(29005),g=i(46499),f=i(73913),b=i(77548),w=i(80812),_=i(10407),I=i(53902),M=i(25927),T=i(5482),E=i(69622),v=i(91429);let C=class extends E.A{constructor(e){super(e),this.entityAdds=void 0,this.entityUpdates=void 0,this.entityDeletes=void 0,this.relationshipAdds=void 0,this.relationshipUpdates=void 0,this.relationshipDeletes=void 0,this.options=void 0}};(0,T.Cg)([(0,v.MZ)()],C.prototype,"entityAdds",void 0),(0,T.Cg)([(0,v.MZ)()],C.prototype,"entityUpdates",void 0),(0,T.Cg)([(0,v.MZ)()],C.prototype,"entityDeletes",void 0),(0,T.Cg)([(0,v.MZ)()],C.prototype,"relationshipAdds",void 0),(0,T.Cg)([(0,v.MZ)()],C.prototype,"relationshipUpdates",void 0),(0,T.Cg)([(0,v.MZ)()],C.prototype,"relationshipDeletes",void 0),(0,T.Cg)([(0,v.MZ)()],C.prototype,"options",void 0),C=(0,T.Cg)([(0,v.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],C);var A=i(23150),x=i(94128),S=i(40863),N=i(68249);const L=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function D(e,t,i){return(async(e,t,i)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const n=new Map;for(const i of t)n.set(i,L(e,i));const r=await(0,I.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(n.values()),{requestOptions:{signal:i?.signal}});for(const t of[...e.layers,...e.tables]){const i=t.objectType.name;if(null==i)continue;const n=r.get(L(e,i));if(n){const e=JSON.parse(n);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}})(e,t,i)}const k=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"];function R(e){return e<0||e>=k.length?new n.A("#8f8f82"):new n.A(k[e])}function F(e){const t=e.toArray();return new S.A({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function B(e){let t="ESRI__ID",i=4;for(const n of e)if(n.name){if("name"===n.name.toLowerCase()){t=n.name;break}n.name.toLowerCase().includes("name")?(t=n.name,i=2):"esriFieldTypeString"===n.fieldType&&i>3&&(t=n.name,i=3)}return t}function O(e,t,i){const n={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},r=new g.A({labelExpressionInfo:new f.A({expression:"ESRI__ID"===i?`${t}`:`$feature.${i}`}),labelPlacement:"above-center",symbol:new N.A(n)}),s=new g.A({labelExpressionInfo:new f.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new N.A({...n,yoffset:"12px"})});return"entity"===e?[r]:[s]}function j(e,t,i){const n={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},r="ESRI__ID"===i?`${e}`:`$feature.${i}`;return"point"===t?[new g.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"above-center",symbol:new N.A(n)})]:"polyline"===t?[new g.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"center-along",repeatLabel:!0,symbol:new N.A(n)})]:"polygon"===t?[new g.A({labelExpressionInfo:new f.A({expression:r}),labelPlacement:"always-horizontal",symbol:new N.A(n)})]:null}async function P(e,t,i){return(async(e,t,i)=>{let n=!0,o=!1,a=!1;if(!r.A.userPrivilegesApplied)return{edit:n,fullEdit:o,updateItem:a};const l=await(0,b.wI)(t,i);if(!l)return{edit:n,fullEdit:o,updateItem:a};const p=s.id?.getCredential(`${l}/sharing`,{...i,prompt:!1});if(!p)return{edit:n,fullEdit:o,updateItem:a};const d=new w.default({id:e,portal:{url:l}});return await d.load(i),({features:{edit:n,fullEdit:o},content:{updateItem:a}}=(0,_.It)(d)),{edit:n,fullEdit:o,updateItem:a}})(e,t,i).catch(e=>((0,a.QP)(e),{edit:!0,fullEdit:!1,updateItem:!1}))}const G={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function $(e){const{capabilities:t,allowGeometryUpdates:i,serviceCapabilities:{geometryCapabilities:{supportsZValues:n,supportsMValues:r}}}=e?.serviceDefinition||G,s=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),o=new Set(s);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:r,supportsTrueCurve:!1,supportsZ:n},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:o.has("Create"),supportsDelete:o.has("Delete"),supportsEditing:o.has("Editing"),supportsChangeTracking:!1,supportsQuery:o.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:o.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:h.F,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:h.P,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&i,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:o.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:o.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function Z(e,t){const i=new C,n=t.graphTypeName,r=t.graphType,s="knowledge-graph"===t.parentCompositeLayer.type?t.geometryFieldName:null,a=!!t.fieldsIndex.get(s)?.editable,l=e=>{const i={...e};for(const e of t.fields)e.editable||delete i[e.name];for(const t of Object.keys(e))t.includes("ESRI__")&&delete i[t];return i},p=async e=>{await(0,d.initializeProjection)(e.spatialReference,u.A.WGS84);const t=(0,d.project)(e,u.A.WGS84);return"point"===t.type?t.normalize():(await(0,c.el)(t))[0]};for(const t of e.addFeatures??[]){const e=l(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===n&&("entity"===r?(i.entityAdds||(i.entityAdds=[]),s&&t.geometry&&(e[s]=await p(t.geometry)),i.entityAdds.push(new M.A({properties:e,typeName:n}))):(i.relationshipAdds||(i.relationshipAdds=[]),i.relationshipAdds.push(new A.A({properties:e,typeName:n}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[y.dr],o=l(t.attributes);(0,b.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===n&&("entity"===r?(i.entityUpdates||(i.entityUpdates=[]),s&&a&&t.geometry&&(o[s]=await p(t.geometry)),i.entityUpdates.push(new M.A({id:e,properties:o,typeName:n}))):(i.relationshipUpdates||(i.relationshipUpdates=[]),i.relationshipUpdates.push(new A.A({id:e,properties:o,typeName:n}))))}const h=new Map;for(const t of e.deleteFeatures??[])if((0,x.D)(t)){const e=t,i=(0,o.tE)(h,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===n&&i.ids.push(e.attributes[y.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,o.tE)(h,n,()=>({typeName:n,ids:[]})).ids.push(t.objectId);for(const e of h.values())e.ids.length>0&&("entity"===r?(i.entityDeletes||(i.entityDeletes=[]),i.entityDeletes.push({typeName:e.typeName,ids:e.ids})):(i.relationshipDeletes||(i.relationshipDeletes=[]),i.relationshipDeletes.push({typeName:e.typeName,ids:e.ids})));return i}function U(e,t){const i={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const n of e.editResults)if(n.typeName===t){for(const e of n.adds)i.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of n.updates)i.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of n.deletes)i.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return i}function Q(e){if(!e.objectType)return null;const t=[];for(const i of e.fields)!i.name.includes("ESRI__")&&i.editable&&"geometry"!==i.type&&t.push(new p.A({fieldName:i.name}));return new l.A({elements:t})}function Y(e){if(!e.objectType)return null;let t=null;switch(e.geometryType){case"point":case"multipoint":t="point";break;case"polyline":t="line";break;case"polygon":t="polygon";break;default:t=null}return[new m.A({name:e.graphTypeName,drawingTool:t,prototype:{}})]}const H=e=>{let t="";const i=e.split("/"),n=i.lastIndexOf("KnowledgeGraphServer");return n>0&&(t=i[n-1]),t}},99916(e,t,i){i.d(t,{Wq:()=>p,aq:()=>a,k5:()=>l}),i(52106);var n=i(49186),r=(i(86738),i(39829),i(82799),i(94194),i(69860),i(8460),i(69647)),s=i(53902),o=i(42538);async function a(e,t,i){const n=[],r=function(e,t){const i=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&i.set(e.name,[]);for(const t of e)i.has(t.typeName)&&i.get(t.typeName)?.push(t.id);return i}(e,t),a={},l=[];for(const[e,t]of r){if(t.length<1)continue;const i=`${e}_ids`;a[i]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${i} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const p=l.join(" UNION "),d=new o.A({openCypherQuery:p,bindParameters:a}),u=(await(0,s.executeQueryStreaming)(t,d,i?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(const e of t)n.push({id:e[0],typeName:e[1]}),n.push({id:e[2],typeName:e[3]})}return n}i(40863),i(94985),i(68249);const l=e=>r.P_.get(e)??"radial-root-centric";function p(e){if(!e.spatialReference.isWGS84)throw new n.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}},8460(e,t,i){i.d(t,{$C:()=>y,Hh:()=>o,Tu:()=>c,Wg:()=>h,Xq:()=>g,i6:()=>f,pM:()=>u,vJ:()=>m});var n=i(2741);let r,s=null;function o(){return r||(r=i.e(3666).then(i.bind(i,3666)).then(({default:e})=>e({locateFile:e=>(0,n.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){s=e}(e)}),r)}const a={right:0,left:1,top:2,bottom:3},l={none:0,"start-only":1,"start-and-end":2};function p(e){const t={timeDirection:"right",timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:"start-and-end",showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0,...e?.toJSON(),eventsTicksVisualization:e?.eventsTicksVisualization??"start-and-end"};return{...t,timeDirection:{value:a[t.timeDirection]??a.right},eventsTicksVisualization:{value:l[t.eventsTicksVisualization]??l["start-and-end"]}}}function d(e,t,i,n,r,o){const a=i.length,l=r.length,p=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,c=16+a*(u+2*p)+l*(2*d),h=s._malloc(c);try{const u=h+16-h%16,c=u+a*p,y=c+a*p,m=y+l*d,g=m+l*d,f=()=>[s.HEAPF64.subarray(u>>3,(u>>3)+a),s.HEAPF64.subarray(c>>3,(c>>3)+a),s.HEAPU32.subarray(y>>2,(y>>2)+l),s.HEAPU32.subarray(m>>2,(m>>2)+l),s.HEAPU8.subarray(g,g+a)],[b,w,_,I,M]=f();b.set(i),w.set(n),_.set(r),I.set(o),M.set(t);const T=e(a,g,u,c,l,y,m);let E=null,v=null;if(0===T.value){const e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),i=s.getLayoutLinksVertices(),n=s.countLayoutLinksVertices();!l||e&&t?n&&!i?T.value=1:(E={types:new Uint8Array(s.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(s.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(s.HEAPF64.subarray(i>>3,(i>>3)+2*n))},v=s.getAuxiliaryGraphicElements()):T.value=1}const[C,A,x,S,N]=f();return i.set(C),n.set(A),r.set(x),o.set(S),t.set(N),{status:T.value,links:E,graphics:v}}finally{s._free(h),s.cleanupLayout()}}var u,c,h,y,m,g,f,b;(b=u||(u={})).getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},b.apply=function(e,t,i,n,r,o,a=2,l=1,p=-1){return d((t,i,n,r,o,d,u)=>s.applyForceDirectedLayout(e,t,i,n,r,o,d,u,a,l,p),t,i,n,r,o)},function(e){e.apply=function(e,t,i,n,r,o,a=2,l=1,p=-1){return d((t,i,n,r,o,d,u)=>s.applyCommunityLayout(e,t,i,n,r,o,d,u,a,l,p),t,i,n,r,o)}}(c||(c={})),function(e){e.apply=function(e,t,i,n,r,o){return d((t,i,n,r,o,a,l)=>s.applySimpleLayout(e,t,i,n,r,o,a,l),t,i,n,r,o)}}(h||(h={})),function(e){e.apply=function(e,t,i,n,r,o){return d((t,i,n,r,o,a,l)=>s.applyHierarchicalLayout(e,t,i,n,r,o,a,l),t,i,n,r,o)}}(y||(y={})),function(e){e.apply=function(e,t,i,n,r,o){return d((t,i,n,r,o,a,l)=>s.applyRadialTreeLayout(e,t,i,n,r,o,a,l),t,i,n,r,o)}}(m||(m={})),function(e){e.apply=function(e,t,i,n,r,o){return d((t,i,n,r,o,a,l)=>s.applySmartTreeLayout(e,t,i,n,r,o,a,l),t,i,n,r,o)}}(g||(g={})),function(e){e.apply=function(e,t,i,n,r,o,a,l,u,c,h,y){return d((t,i,n,a,l,d,m)=>{if(r.length!==t)return{value:1};if(o.length!==t)return{value:1};if(u.length!==l)return{value:1};if(c.length!==l)return{value:1};const g=Float64Array.BYTES_PER_ELEMENT,f=16,b=s._malloc(f+t*g),w=s._malloc(f+t*g),_=s._malloc(f+l*g),I=s._malloc(f+l*g),M=b+f-b%f,T=w+f-w%f,E=_+f-_%f,v=I+f-I%f;try{return s.HEAPF64.subarray(M>>3,(M>>3)+t).set(r),s.HEAPF64.subarray(T>>3,(T>>3)+t).set(o),s.HEAPF64.subarray(E>>3,(E>>3)+l).set(u),s.HEAPF64.subarray(v>>3,(v>>3)+l).set(c),s.applyChronologicalLayout(e,t,i,n,a,M,T,l,d,m,E,v,h,p(y))}finally{s._free(b),s._free(w),s._free(_),s._free(I)}},t,i,n,a,l)}}(f||(f={}))},69647(e,t,i){i.d(t,{P_:()=>o,SJ:()=>r,lg:()=>s});var n=i(66552);const r=(0,n.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),s=(0,n.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"}),o=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]])},10407(e,t,i){i.d(t,{It:()=>h,LG:()=>o,OM:()=>p,Sm:()=>d,Y:()=>a,bK:()=>l,mm:()=>c,sQ:()=>u});var n=i(91218),r=i(16930),s=i(28735);function o(e,t){if(!a(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,c.HOSTED_SERVICE)}function p(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function d(e,t,i){i?o(e,t):p(e,t)}async function u(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const i=r.A.WGS84;return await(0,n.initializeProjection)(t,i),(0,n.project)(e,i)}(i)}const c={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function h(e){const{portal:t,isOrgItem:i,itemControl:n}=e,r=t.user?.privileges;let s=!r||r.includes("features:user:edit"),o=!!i&&!!r?.includes("features:user:fullEdit");const a="update"===n||"admin"===n;return a?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:a}}}},25927(e,t,i){i.d(t,{A:()=>a});var n=i(5482),r=i(91429),s=i(86738),o=i(54238);let a=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,n.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Entity")],a)},54238(e,t,i){i.d(t,{A:()=>o});var n=i(5482),r=i(91429),s=i(77901);let o=class extends s.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"typeName",void 0),(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"id",void 0),o=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],o)},77901(e,t,i){i.d(t,{A:()=>o});var n=i(5482),r=i(25482),s=i(91429);let o=class extends r.o{constructor(e){super(e),this.properties={}}};(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],o.prototype,"properties",void 0),o=(0,n.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.GraphObject")],o)},42538(e,t,i){i.d(t,{A:()=>l});var n=i(5482),r=i(91429),s=i(16930),o=i(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,n.Cg)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQuery")],a);let l=class extends a{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,n.Cg)([(0,r.MZ)()],l.prototype,"bindParameters",void 0),(0,n.Cg)([(0,r.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,n.Cg)([(0,r.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,n.Cg)([(0,r.MZ)({type:s.A})],l.prototype,"outputSpatialReference",void 0),(0,n.Cg)([(0,r.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},40662(e,t,i){i.d(t,{A:()=>o});var n=i(5482),r=i(91429),s=i(77901);let o=class extends s.A{constructor(e){super(e)}};o=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.ObjectValue")],o)},42095(e,t,i){i.d(t,{A:()=>a});var n=i(5482),r=i(25482),s=i(91429),o=i(77901);let a=class extends r.o{constructor(e){super(e),this.path=[]}};(0,n.Cg)([(0,s.MZ)({type:[o.A],json:{write:!0}})],a.prototype,"path",void 0),a=(0,n.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.Path")],a)},23150(e,t,i){i.d(t,{A:()=>a});var n=i(5482),r=i(91429),s=i(82799),o=i(54238);let a=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"originId",void 0),(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"destinationId",void 0),(0,n.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,n.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Relationship")],a)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9794],{89794(a,e,h){h.r(e),h.d(e,{GlobalIlluminationPassParameters:()=>t.a,build:()=>t.b,defaultRayMarchMaxReach:()=>t.d,defaultRayMarchMaxReachEmissionWeight:()=>t.c,defaultRayMarchMaxSteps:()=>t.e,defaultRayMarchMinReach:()=>t.f,defaultRayMarchMinReachEmissionWeight:()=>t.g,defaultRayMarchWorldReach:()=>t.h}),h(82048),h(92573),h(98619),h(70893),h(34845),h(20304),h(31821),h(58029),h(12791),h(63761),h(63907),h(65786),h(14113);var t=h(587)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7125],{66344(t,e,s){s.d(e,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(t=10485760,e=.3){this._maxSize=t,this._maxClientSizeRatio=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(t){this._clients.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._clients.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(t,e){const s=this._db.get(t.id+e);return s?.size??0}put(t,e,s,r,o){e=t.id+e;const a=this._db.get(e);if(a&&(this._size-=a.size,t.size-=a.size,this._db.delete(e),a.entry!==s&&this._notifyRemove(e,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(e,s,r,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${e}`),void this._notifyRemove(e,s,0,0);const h=1+Math.max(o,-4)- -3;this._db.set(e,new n(s,r,h)),this._size+=r,t.size+=r,this._checkSize()}updateSize(t,e){e=t.id+e;const s=this._db.get(e);if(!s)return;this._size-=s.size,t.size-=s.size;let i=s.entry.usedMemory;for(;i>this._maxSize;){const t=this._notifyRemove(e,s.entry,i,1);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}s.size=i,this._size+=i,t.size+=i,this._checkSize()}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach((t,i)=>{const r=t.lifetime;s[r]=(s[r]||0)+t.size,this._clients.forEach(s=>{const{id:r,name:n}=s;if(i.startsWith(r)){const s=e[n]||0;e[n]=s+t.size}})});const i={};this._clients.forEach(t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const r=e[s]||0;e[s]=r,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"});const r=Object.keys(e);r.sort((t,s)=>e[s]-e[t]),r.forEach(s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]);for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._clients.forEach(t=>t.resetHitRate())}clear(t){const e=t.id;this._db.forEach((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,t.size,0))}),t.size=0}clearAll(){this._db.forEach((t,e)=>this._notifyRemove(e,t.entry,t.size,0)),this._clients.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(const[e,s]of this._db)e.startsWith(t.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s,i){const r=this._clients.get(t.split(o)[0])?.removeFunc,n=r?.(e,i,s);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((t,e)=>this._checkSizeLimits(t,e)),this._clients.forEach(t=>this._checkSizeLimits(this._maxClientSize,t)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const s=e??this;if(s.size<=t)return;const i=e?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!i||n.startsWith(i))){const i=e??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,a,i),s.size<=.9*t)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!i||r.startsWith(i)){const i=e??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,n,i),s.size<=.9*t)return}}_purgeItem(t,e,s){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const i=this._notifyRemove(t,e.entry,e.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}new r(0);class n{constructor(t,e,s){this.entry=t,this.size=e,this.lifetime=s,this.lives=s}}const o=":";class a{constructor(t,e){this.removeFunc=e,this.id="",this.name="",this.size=0,this._storage=new r(t,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},9775(t,e,s){s.d(e,{A:()=>n});var i=s(62788),r=s(95488);class n{constructor(t=t=>t.values().next().value){this._peeker=t,this._observable=new r.I,this._items=new Set}get length(){return(0,i.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let t;for(t of this._items);return t}peek(){if(0!==this.length)return this._peeker(this._items)}push(t){this.contains(t)||(this._items.add(t),this._observable.notify())}contains(t){return(0,i.gc)(this._observable),this._items.has(t)}pop(){if(0===this.length)return;const t=this.peek();return this._items.delete(t),this._observable.notify(),t}popLast(){if(0===this.length)return;const t=this.last();return this._items.delete(t),this._observable.notify(),t}remove(t){this.contains(t)&&(this._items.delete(t),this._observable.notify())}filter(t){const e=this.length;return this._items.forEach(e=>{t(e)||this._items.delete(e)}),e!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,i.gc)(this._observable),yield*this._items}}},36745(t,e,s){s.d(e,{z:()=>a});var i=s(4718),r=s(51118),n=s(60408),o=s(92722);class a{static fromOptimized(t,e,s=1){return(new h).initialize(t,e,s)}static fromJSON(t){const[e,s]=l(t),i=(0,n.Pv)(t),r=(0,n.W0)(t);return(new c).initialize(e,s,i,r,1)}static fromOptimizedCIM(t,e,s=1){return(new p).initialize(t,e,s)}static fromJSONCIM(t,e=1){const[s,i]=l(t),r=(0,n.Pv)(t),o=(0,n.W0)(t);return(new d).initialize(s,i,r,o,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return(new p).initialize(new o.A([],[],e,s),t,i)}static createEmptyJSON(t,e=!1,s=!1){return(new c).initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return(new p).initialize(new o.A([],[],e,s),t,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return(new d).initialize([],t,e,s,i)}asJSON(){const t=(0,r.x)(this),{hasZ:e,hasM:s}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:s}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:s?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:s}:{paths:t,hasZ:e,hasM:s}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,r=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+r),-.5*s}invertY(){this.yFactor*=-1}}class h extends a{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,s){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=s,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const t=this._end,e=this._geometry.coords,s=this._pathOffset;return(new h).initialize(new o.A([this.pathSize],e.slice(s,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let r=this._pathOffset+e;r<t;r+=e){const t=s[r-e],n=s[r-e+1],o=s[r]-t,a=s[r+1]-n;i+=Math.sqrt(o*o+a*a)}return i}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,s=this._end-this._stride;for(let i=0;i<this._stride;i++)if(t[e+i]!==t[s+i])return!1;return!0}clone(){return(new h).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function u(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function l(t){return(0,n.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,n.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,n.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,n.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,n.fT)(t)?[[[u(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class c extends a{initialize(t,e,s,i,r){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=r,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;i<t;i++){const t=e[i-1],r=e[i],n=t[0],o=t[1],a=r[0]-n,h=r[1]-o;s+=Math.sqrt(a*a+h*h)}return s}startPath(){this._paths.push([])}getCurrentPath(){return(new c).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,r.x)(t);for(const t of e)this.pushPath(t)}asOptimized(){const{hasZ:t,hasM:e}=this,s=new o.A([],[],t,e),{coords:i,lengths:r}=s;if("esriGeometryPoint"===this.geometryType)i.push(...this._paths[0][0]),r.length=0;else for(const s of this._paths){for(const r of s)i.push(r[0]),i.push(r[1]*this.yFactor),t&&i.push(r[2]),e&&i.push(r[this._mIndex]);r.push(s.length)}return s}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}clone(){return(new c).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class p extends h{initialize(t,e,s){return super.initialize(t,e,s),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new p).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class d extends c{initialize(t,e,s,i,r){return super.initialize(t,e,s,i,r)}clone(){return(new d).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},32011(t,e,s){s.d(e,{d:()=>h});var i=s(19419),r=s(537),n=s(12359),o=s(95108),a=s(12176);function h(t){if(0===t.totalSize)return null;const e=(0,r.z8)(t);if(!e)return null;const s=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19;let o=0,a=0;t.reset();for(let e=0;t.nextPath();e++){const s=t.getCurrentRingArea();s>a&&(a=s,o=e)}if(t.seekPath(o),0===t.pathSize)return null;t.seekPathStart();const h=(0,r.B$)(t);if(Math.abs(a)<=2*s*s)return[(h[0]+h[2])/2,(h[1]+h[3])/2];t.seekPathStart();const p=(0,n.w2)(t,(0,i.vt)());if(null===p)return null;if(t.totalPoints<4)return p;const d=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],f=[NaN,NaN,NaN,NaN],g=[NaN,NaN,NaN,NaN];let w=!1,x=l(p,t,!0);0===x.distance&&(w=!0,d[0][0]=p[0],d[0][1]=p[1],x=l(p,t,!1)),f[0]=x.distance,g[0]=0;const S=[NaN,NaN];let z=!1,I=.25,P=-1,b=NaN;do{if(b=NaN,d[1]=c(t,y(h[0],h[2],I),0,e),isNaN(d[1][0])||isNaN(d[1][1])||(x=l(d[1],t,!1),b=x.distance),!isNaN(b)&&b>s&&u(d[1],t))z=!0,f[1]=b,g[1]=m(d[1],p);else if(!isNaN(b)&&b>P&&(P=b,S[0]=d[1][0],S[1]=d[1][1]),I-=.01,I<.1){if(!(P>=0))break;z=!0,f[1]=P,d[1][0]=S[0],d[1][1]=S[1],g[1]=m(d[1],p)}}while(!z);z=!1,I=.5,P=-1;let F=.01,v=1;do{if(b=NaN,d[2]=c(t,y(h[0],h[2],I),0,e),isNaN(d[2][0])||isNaN(d[2][1])||(x=l(d[2],t,!1),b=x.distance),!isNaN(b)&&b>s&&u(d[2],t))z=!0,f[2]=b,g[2]=m(d[2],p);else if(!isNaN(b)&&b>P)P=b,S[0]=d[2][0],S[1]=d[2][1];else if(b>P&&(P=b,S[0]=d[2][0],S[1]=d[2][1]),I=.5+F*v,F+=.01,v*=-1,I<.3||I>.7){if(!(P>=0))break;z=!0,f[2]=P,d[2][0]=S[0],d[2][1]=S[1],g[2]=m(d[2],p)}}while(!z);z=!1,I=.75,P=-1;do{if(b=NaN,d[3]=c(t,y(h[0],h[2],I),0,e),isNaN(d[3][0])||isNaN(d[3][1])||(x=l(d[3],t,!1),b=x.distance),!isNaN(b)&&b>s&&u(d[3],t))z=!0,f[3]=b,g[3]=m(d[3],p);else if(b>P&&(P=b,S[0]=d[3][0],S[1]=d[3][1]),I+=.01,I>.9){if(!(P>=0))break;z=!0,f[3]=P,d[3][0]=S[0],d[3][1]=S[1],g[3]=m(d[3],p)}}while(!z);const C=[0,1,2,3],R=w?0:1;let N;for(let t=R;t<4;t++)for(let t=R;t<3;t++){const e=g[t],s=g[t+1];_(e,s)>0&&(N=C[t],C[t]=C[t+1],C[t+1]=N,g[t]=s,g[t+1]=e)}let O=R,A=0,M=0;for(let t=R;t<4;t++){switch(t){case 0:M=2*f[C[t]];break;case 1:M=1.66666666*f[C[t]];break;case 2:M=1.33333333*f[C[t]];break;case 3:M=f[C[t]]}M>A&&(A=M,O=C[t])}return d[O]}function u(t,e){let s,i,r,n,o=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(s=e.x,i=e.y;e.nextPoint();s=r,i=n)r=e.x,n=e.y,i>t[1]!=n>t[1]&&((r-s)*(t[1]-i)-(n-i)*(t[0]-s)>0?o++:o--);return 0!==o}function l(t,e,s){if(s&&u(t,e))return{coord:t,distance:0};let i=1/0,r=0,n=0,a=[0,0],h=[0,0];const l=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(a[0]=e.x,a[1]=e.y;e.nextPoint();a=h){h=[e.x,e.y],(0,o.gR)(l,t,a,h);const s=m(t,l);s<i&&(i=s,r=l[0],n=l[1])}return{coord:[r,n],distance:Math.sqrt(i)}}function c(t,e,s,r){const n=[e,0];let o=1/0,h=1/0,u=!1,l=!1;const c=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],y=[0,0],m=[0,0],_=[[0,0],[0,0]],g=(0,i.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(_[0][0]=t.x,_[0][1]=t.y;t.nextPoint();_[0][0]=_[1][0],_[0][1]=_[1][1]){if(_[1][0]=t.x,_[1][1]=t.y,null===p(g,_))continue;if(y[0]=c[0][0],y[1]=c[0][1],m[0]=c[1][0],m[1]=c[1][1],0===d(g,y,m))continue;if(!(0,a.Ql)(c[0],c[1],_[0],_[1],f))continue;const e=f[1];o>h?e<o&&(o=e,u=!0):e<h&&(h=e,l=!0)}return u&&l?n[1]=(o+h)/2:n[0]=n[1]=NaN,n}function p(t,e){if(e.length<2)return null;t||(t=(0,i.vt)());const[s,r]=e[0],[n,o]=e[1];return t[0]=Math.min(s,n),t[1]=Math.min(r,o),t[2]=Math.max(s,n),t[3]=Math.max(r,o),t}function d(t,e,s){let i=f(e,t),r=f(s,t);const n=t[0],o=t[1],a=t[2],h=t[3];if(i&r)return 0;if(!(i|r))return 4;const u=(i?1:0)|(r?2:0);do{const u=s[0]-e[0],l=s[1]-e[1];if(u>l)3&i?(1&i?(e[1]+=l*(n-e[0])/u,e[0]=n):(e[1]+=l*(a-e[0])/u,e[0]=a),i=f(e,t)):3&r?(1&r?(s[1]+=l*(n-s[0])/u,s[0]=n):(s[1]+=l*(a-s[0])/u,s[0]=a),r=f(s,t)):i?(4&i?(e[0]+=u*(o-e[1])/l,e[1]=o):(e[0]+=u*(h-e[1])/l,e[1]=h),i=f(e,t)):(4&r?(s[0]+=u*(o-s[1])/l,s[1]=o):(s[0]+=u*(h-s[1])/l,s[1]=h),r=f(s,t));else if(12&i?(4&i?(e[0]+=u*(o-e[1])/l,e[1]=o):(e[0]+=u*(h-e[1])/l,e[1]=h),i=f(e,t)):12&r?(4&r?(s[0]+=u*(o-s[1])/l,s[1]=o):(s[0]+=u*(h-s[1])/l,s[1]=h),r=f(s,t)):i?(1&i?(e[1]+=l*(n-e[0])/u,e[0]=n):(e[1]+=l*(a-e[0])/u,e[0]=a),i=f(e,t)):(1&r?(s[1]+=l*(n-s[0])/u,s[0]=n):(s[1]+=l*(a-s[0])/u,s[0]=a),r=f(s,t)),i&r)return 0}while(i|r);return u}function f(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function y(t,e,s){return t+(e-t)*s}function m(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function _(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const s=isNaN(t),i=isNaN(e);return s<i?-1:s>i?1:0}},48459(t,e,s){s.r(e),s.d(e,{default:()=>T});var i=s(5482),r=s(7762),n=s(21818),o=s(49186),a=s(44208),h=s(53966),u=s(17676),l=s(563),c=s(39516),p=s(16930),d=s(70328),f=s(75752),y=s(8384),m=s(58727),_=s(64714),g=s(17754),w=s(20437),x=s(95466),S=s(9075),z=s(34582);function I(t){switch(t.type){case"wkb":return z.A.fromJSON(t);case"location":return S.A.fromJSON(t)}}var P=s(42760),b=s(39412),F=s(63892),v=s(30661),C=s(28923),R=s(44320),N=s(35258),O=s(16630);const A=new v.Z,M="__OBJECTID",E=new TextDecoder;class T{constructor(){this._fileInfos=new Map,this._queue=new l.QueueProcessor({concurrency:4,process:(t,e)=>this._executeQuery(t,e)}),this._indexMap={}}async load(t){const{urls:e}=t,s=t.spatialReference?p.A.fromJSON(t.spatialReference):void 0;if(s&&!s.isWGS84&&!s.isWebMercator)throw new o.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");const n=await(0,P.nc)({urls:new r.A(e),fields:t.fields?.map(t=>w.A.fromJSON(t)),geometryEncoding:t.geometryEncoding?I(t.geometryEncoding):null,geometryType:t.geometryType?(0,P.hG)(t.geometryType):null,displayOptimization:t.displayOptimization,spatialReference:s},{customParameters:t.customParameters});if(!n.fields)throw new o.A("parquet:unsupported","Fields must be defined");let a;if(n.spatialReference&&n.geometryType){if(!n.spatialReference)throw new o.A("parquet:unsupported","SpatialReference must be defined");if(!n.spatialReference.isGeographic&&!n.spatialReference.isWebMercator)throw new o.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");n.spatialReference.isGeographic&&!n.spatialReference.isWGS84&&(h.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:n.spatialReference}),n.spatialReference=p.A.WGS84),a={geometry:n.geometryEncoding?{geometryType:(0,P.sA)(n.geometryType),spatialReference:n.spatialReference.toJSON(),encoding:n.geometryEncoding.toJSON()}:null,displayOptimization:n.displayOptimization}}this.setCustomParameters(t.customParameters),this._geometryInfo=a;for(const t of e)this._addFile(t);this._capabilities=Q(await this.getFileStatistics());const u=this._fileInfos.values().next().value;if(!u)return{layerDefinition:{},capabilities:Q(null)};const l=await u,{fields:c}=n;if(null==c)throw new o.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",c);c.push(new w.A({name:M,type:"oid",alias:M}));for(const t of c){const e=l.file.columnForFieldName(t.name);null!=e&&(this._indexMap[t.name]=e)}const f=new x.A(c.map(t=>t.toJSON()));this._fieldsIndex=f;const y=(0,P.sA)(n.geometryType??"point");if(this._metadata=N.i.createFeature({fieldsIndex:f.toJSON(),geometryType:y,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"rowId"},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:n.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:y,featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:n.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},n.spatialReference){const t=await this.getFileInfos();this._fullExtent=function(t,e){const s=(0,d.hZ)((0,d.vt)(),d.qv);for(const e of t){const t=(0,F.hD)(e.file);if(!t)return null;const i=t.columns[t.primary_column];if(!i.bbox)return null;const r=G(i.bbox);(0,d.RF)(s,r)}return{xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:e}}(t,n.spatialReference.toJSON())}if(null==this._fullExtent&&"location"===n.geometryEncoding?.type){const{xField:t,yField:e}=n.geometryEncoding,s=(0,d.hZ)((0,d.vt)(),d.qv);for(const r of await this.getFileInfos())for(const n of r.file.rowGroups()){const r={stack:[],error:void 0,hasError:!1};try{const o=(0,i.mS)(r,n.columnDescriptorForAttribute(t),!1),a=(0,i.mS)(r,n.columnDescriptorForAttribute(e),!1),h=[o.minValue(),a.minValue(),o.maxValue(),a.maxValue()];(0,d.DC)(s,h),n.free()}catch(t){r.error=t,r.hasError=!0}finally{(0,i.hk)(r)}}this._fullExtent={xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:n.spatialReference?.toJSON()}}return{capabilities:this._capabilities,layerDefinition:{fields:n.fields?.map(t=>t.toJSON()),drawingInfo:(0,_.F0)(y),extent:this._fullExtent??void 0,geometryType:y,geometryEncoding:n.geometryEncoding?.toJSON(),displayOptimization:n.displayOptimization}}}destroy(){for(const t of this._fileInfos.values())t.then(t=>t.file.free);this._fileInfos.clear(),this._queue.destroy()}setCustomParameters(t){this._customParameters=t}getIndexMap(){return this._indexMap}async getFileId(t){const e=this._fileInfos.get(t);if(!e)throw new Error(`InternalError: File ${t} does not exist`);return(await e).id}async getFileInfo(t){const e=this._fileInfos.get(t);if(!e)throw new Error(`InternalError: File ${t} does not exist`);return e}async getFileInfos(){return Promise.all(Array.from(this._fileInfos.values()))}async getFileStatistics(){if(!this._fileInfos.size)return null;const t=(await this.getFileInfos()).reduce((t,e)=>t+e.file.byteLength(),0);return{featureCount:await this._getFeatureCount(),byteLength:t}}async updateFiles(t){const e=new Set(t);for(const[t,s]of this._fileInfos.entries())e.has(t)?e.delete(t):(s.then(t=>t.file.free()),this._fileInfos.delete(t));await Promise.all(Array.from(e.values()).map(t=>this._addFile(t)))}async queryFeatures(t,e){return this._validateQuery(t),function(t){return!!(t.objectIds?.length||t.outStatistics||t.orderByFields?.length||t.returnDistinctValues)}(t)||(t.resultRecordCount=t.resultRecordCount?Math.min(t.resultRecordCount,8e3):8e3,t.resultOffset=t.resultOffset??0),(t.outStatistics||t.returnDistinctValues)&&(t.returnGeometry=void 0),(await this._enqueueQuery(t,e)).createQueryResponse()}async queryFeatureCount(t,e){const s=await(0,m.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),q(s)?(s.outFields=void 0,s.returnGeometry=void 0,(await this._enqueueQuery(s,e)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(t,e){const s=await(0,m.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),q(s)?(s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,8e3):8e3,s.resultOffset=s.resultOffset??0,s.returnGeometry=void 0,s.outFields=void 0,(await this._enqueueQuery(s,e)).items.map(t=>t.getObjectId())):Array.from({length:await this._getFeatureCount()},(t,e)=>e)}async queryExtent(t,e){const s=await(0,m.T2)(t,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),this._fullExtent&&!q(s))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=(0,n.z)(this._metadata.spatialReference);s.returnGeometry=!0,s.outFields=void 0;const r=(0,d.hZ)((0,d.vt)(),d.qv),o=(0,d.vt)(),a=await this._enqueueQuery(s,e);let h=0;for(const t of a.items)t.getBounds(o)&&((0,d.RF)(r,o),h+=1);return{count:h,extent:(0,f.Wc)(r,i,s.outSR?(0,n.z)(s.outSR):i,i,!1)}}async queryStream(t,e,s){if(!s.signal)throw new Error("InternalError: AbortSignal must be passed");const i=await this.getFileInfo(t),r=(await(0,b.N)()).Query.new();"tile"===e.type&&(r.setExtent(e.extent),r.setQuantizationTransform(e.transform),r.setScale(e.scale)),r.setOutFields(e.outFields.filter(t=>null!=this._indexMap[t])),r.setOutSpatialReference(e.outSpatialReference.wkid),r.setReturnGeometry(!0),e.where&&await this._setWhereClause(r,i.file,e.where);const n=await i.file.executeQuery(r,s.signal),o=i.streamIdCounter++,a=(0,u.NY)(s.signal,t=>{const e=i.streams.get(o);null!=e&&(e.handle.remove(),i.streams.delete(o))});return i.streams.set(o,{stream:n,handle:a}),o}async getStreamNext(t,e,s){if(!s.signal)throw new Error("InternalError: AbortSignal must be passed");const i=await this.getFileInfo(t),r=i.streams.get(e);if(!r)return null;const n=await r.stream.next(s.signal);return null==n&&(r.handle.remove(),i.streams.delete(e)),n?.serialize().buffer}async createPatch(t,e,s,i,r){if(!r.signal)throw new Error("InternalError: AbortSignal must be passed");const n=await this.getFileInfo(t);return(await n.file.createChunkPatch(e,s,i,r.signal)).serialize().buffer}async _getFile(t){for(const e of await this.getFileInfos())if(e.id===t)return e.file;throw new Error(`InternalError: File ${t} does not exist`)}_addFile(t){const e=this._fileInfos.size;this._fileInfos.set(t,this._createFileInfo(t,e))}async _createFileInfo(t,e){return{id:e,file:await(0,F.DV)(t,{geometryInfo:this._geometryInfo,getCustomParameters:()=>this._customParameters}),streamIdCounter:0,streams:new Map}}async _getFeatureCount(){return(await this.getFileInfos()).reduce((t,e)=>t+e.file.numRows(),0)}_validateQuery(t){if(!this._capabilities.query.supportsStatistics&&t.outStatistics)throw new o.A("parquet:unsupported","Statistics queries are not supported",{query:t});if(!this._capabilities.query.supportsOrderBy&&t.orderByFields?.length)throw new o.A("parquet:unsupported","Queries using orderBy are not supported",{query:t});if(!this._capabilities.query.supportsDistinct&&t.returnDistinctValues)throw new o.A("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:t})}async _setWhereClause(t,e,s){const i=this._indexMap,r=this._fieldsIndex,n={getAttribute(t,s){const n=e.readAttribute(t.rowGroup,t.row,i[s]);if(null==n)return null;const o=r.get(s);return"esriFieldTypeString"===o.type||"esriFieldTypeDateOnly"===o.type||"esriFieldTypeTimeOnly"===o.type||"esriFieldTypeTimestampOffset"===o.type?E.decode(n):n}},a=await(0,c.GP)(s,this._fieldsIndex);if(!a.isStandardized)throw new o.A("sql-parse-error","expression is not standardized");t.setWhere(s),t.setWhereEvaluator((t,e)=>a.testFeatureCompiled({rowGroup:t,row:e},n,null)),t.setWhereFields(a.fieldNames)}async*_fetchChunks(t,e){const s=await(0,b.N)();for(const i of await this.getFileInfos()){const r=s.Query.new();r.setOutFields(t.fields),r.setReturnGeometry(t.returnGeometry),t.where&&await this._setWhereClause(r,i.file,t.where);const n=await i.file.executeQuery(r),o=[],a=n.next(e);for(let t=0;t<4;t++)o.push(n.next(e));let h=await a;for(;null!=h;){(0,u.Te)(e);const t=new O.s(this._metadata,this._indexMap,h,i.id),s=k([new C.j(t,null,0,!1)],this._queryEngineParams),r=o.shift();o.push(n.next(e)),yield s,h=await r}}}_enqueueQuery(t,e){return this._queue.push(t,e)}async _executeQuery(t,e){const s=await this._getReadParams(t);if(t.where=void 0,t.objectIds?.length){const s=new Map;for(const e of t.objectIds){const t=(0,g.wY)(e),i=(0,g.gE)(e);let r=s.get(t);r||(r=[],s.set(t,r)),r.push(i)}const i=[];for(const[r,n]of s.entries()){const s=await this._executeFileIdQuery(t,r,n,e);for(const t of s)i.push(t)}return new y.G(i,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:A,featureIdInfo:this._queryEngineParams.featureIdInfo})}let i=t.resultRecordCount??await this._getFeatureCount(),r=t.resultOffset??0;t.resultRecordCount=void 0,t.resultOffset=void 0;const n=[];for await(const o of this._fetchChunks(s,e)){const s=await o.executeQueryForOpaqueFeatures(t,e);if(s.length>r){const e=s.slice(r,Math.min(r+i,s.length));for(const t of e)n.push(t);if(r=0,i-=e.length,0===i)return new y.G(n,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:A,featureIdInfo:this._queryEngineParams.featureIdInfo})}else r-=s.length}return new y.G(n,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:A,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(t,e,s,i){const r=await this._getReadParams(t),n=(await(0,b.N)()).Query.new();n.setOutFields(r.fields),n.setReturnGeometry(r.returnGeometry),n.setIds(new Uint32Array(s));const o=await this._getFile(e),a=await o.executeQuery(n,i);let h=await a.next(i),u=0;const l=[];for(;null!=h;){const t=new O.s(this._metadata,this._indexMap,h,e),s=new C.j(t,null,u++,!1);l.push(s),h=await a.next(i)}return k(l,this._queryEngineParams).executeQueryForOpaqueFeatures(t,i)}async _getReadParams(t){const e=new Set;if(t.outStatistics)for(const s of t.outStatistics)null!=s.onStatisticField&&e.add(s.onStatisticField);if(t.outFields)for(const s of t.outFields)e.add(s);return{fields:(e.has("*")?this._fieldsIndex.fields.map(t=>t.name):Array.from(e)).filter(t=>null!=this._indexMap[t]),returnGeometry:!!t.returnGeometry||!!t.geometry,where:t.where}}}function q(t){for(const e in t){const s=e;switch(s){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"objectIds":case"historicMoment":case"where":return null!=t[s]}}return!1}function k(t,e){const s=new R.I;for(const e of t)s.insert(e);return new f.do({...e,featureStore:s})}function G(t){switch(t.length){case 4:return(0,d.Jt)((0,d.vt)(),t);case 6:return t;default:throw new o.A("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:t})}}function Q(t){const e=t?.featureCount;let s=!1;return null!=e&&e<(0,a.A)("parquetlayer-full-query-feature-count")&&(s=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,supportsStatisticsAggregatedIds:!1,supportsCacheHint:!1,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsOutDistance:!1,supportsDistinct:s,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:s,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:s,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},34582(t,e,s){s.d(e,{A:()=>a});var i=s(5482),r=s(69540),n=s(25482),o=s(91429);let a=class extends((0,r.OU)(n.o)){constructor(t){super(t),this.type="wkb",this.field=null}};(0,i.Cg)([(0,o.MZ)({type:["wkb"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:["counter-clockwise"],json:{write:!0}})],a.prototype,"orientation",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0),a=(0,i.Cg)([(0,o.$K)("esri.layers.support.GeometryEncodingWkb")],a)},42760(t,e,s){s.d(e,{Tw:()=>g,hG:()=>y,nc:()=>m,sA:()=>f,ye:()=>p}),s(7762);var i=s(49186),r=s(66552),n=s(16930),o=s(20437),a=s(30524),h=s(9075),u=s(34582),l=s(54625),c=s(63892);const p=new r.J({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"}),d=new Set(["uncompressed","snappy","gzip"]);function f(t){return p.toJSON(t)}function y(t){return p.fromJSON(t)}async function m(t,e={}){if(t.urls.length<1)throw new i.A("parquet:bad-input","At least one url must be specified",t);if(t.geometryType&&t.spatialReference&&t.geometryEncoding&&t.fields)return t;const s=await(0,c.DV)(t.urls.getItemAt(0),{getCustomParameters:()=>e.customParameters});for(const t of s.compressionCodecs())if(!d.has(t))throw new i.A("parquet:unsupported",`Compression codec ${t} is unsupported. Must be of type ${Array.from(d).join(",")}`);const r=(0,c.hD)(s),p={...t,file:s};if(null==p.fields&&(p.fields=s.fields(!1).map(t=>o.A.fromJSON({name:t.name,alias:t.name,type:t.type}))),null!=p.geometryEncoding){const t=p.geometryEncoding;switch(t.type){case"wkb":{const e=p.fields.find(e=>e.name===t.field);if(!e)throw new i.A("parquet:unsupported",`Geometry encoding references field ${t.field} which does not exist`);if("blob"!==e.type)throw new i.A("parquet:unsupported",`Invalid field type for geometry encoding. Found ${e.type} but expected 'blob'`);break}case"location":for(const e of[t.xField,t.yField])if(null!=e){const t=p.fields.find(t=>t.name===e);if(!t)throw new i.A("parquet:unsupported",`Geometry encoding references field ${e} which does not exist`);if(!(0,a.WA)(t))throw new i.A("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${t.type} but expected a numeric`)}}}null==p.geometryEncoding&&(p.geometryEncoding=function(t,e){if(null!=t){const e=t.primary_column,s=t.columns[e];return new u.A({field:e,orientation:"counterclockwise"===s.orientation?"counter-clockwise":null})}const s=e.filter(t=>(0,a.WA)(t)).map(t=>t.name),i=(0,l.i_)(s);return i.latitudeFieldName&&i.longitudeFieldName?new h.A({xField:i.longitudeFieldName,yField:i.latitudeFieldName}):null}(r,p.fields));const f=(0,c.Xj)(s);if(f&&(p.displayOptimization=f),p.geometryEncoding)switch(p.geometryEncoding.type){case"location":null==p.spatialReference&&(p.spatialReference=n.A.WGS84),null==p.geometryType&&(p.geometryType="point");break;case"wkb":{if(!r)return p;const t=r.primary_column,e=r.columns[t];if(p.geometryType||(p.geometryType=function(t){const{geometry_types:e}=t,s=new Set;for(const t of e){const e=_(t);e&&s.add(e)}if(s.size>1)throw new i.A("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:s});return 1===s.size?s.values().next().value:void 0}(e)),p.spatialReference||(p.spatialReference=function(t){const e=t.crs?.id?.code;return e&&"number"==typeof e?new n.A({wkid:e}):void 0}(e)),p.fields)for(const t of Object.keys(r.columns))p.fields=p.fields.filter(e=>e.name!==t)}}if(p.displayOptimization){const t=p.displayOptimization.index;if(!p.spatialReference&&t.wkid&&(p.spatialReference=new n.A({wkid:t.wkid})),!p.geometryType)switch(t.type){case"z":p.geometryType="point";break;case"xz":p.geometryType=t.geometryType}}return p}function _(t){switch(t){case"Point":return"point";case"Polygon":case"MultiPolygon":return"polygon";case"LineString":return"polyline";case"MultiPoint":return"multipoint";default:return null}}async function g(t,e){switch(t?.type){case"files":return t.urls.toArray();case"portal-item":return await t.portalItem.load(e),[w(t.portalItem)];default:return[]}}function w(t){const e=t.itemCdnUrl?`${t.itemCdnUrl}/data`:`${t.itemUrl}/data`;if(!e)throw new i.A("parquet-layer:missing-portal-item-id","Portal item data requires a portal item id",{portalItem:t});return e}},63892(t,e,s){s.d(e,{DV:()=>y,Xj:()=>_,hD:()=>m});var i=s(11254),r=s(49186),n=s(44208),o=s(563),a=s(84952),h=s(39412);const u="parquet.v1",l=new o.QueueProcessor({concurrency:12,process:async t=>{const{data:e}=await(0,i.A)(t.url,t.options);return e}}),c=t=>async function(e,s,i,r){const o=t?.(),a={url:e,options:{responseType:"array-buffer",query:o??{},cacheMode:"no-store",useQueue:!0,headers:{range:`bytes=${s}-${i}`}}};if(!(0,n.A)("parquetlayer-cache-enabled"))return l.push(a);const h=new URL(e);h.searchParams.append("range",`${s}-${i}`);try{const t=await caches.open(`${u}:${e}`),s=await t.match(h);if(s)return await s.arrayBuffer();const i=await l.push(a);return await t.put(h,new Response(i,{headers:{"Content-Type":"application/octet-stream","Content-Length":i.byteLength.toString()}})),i}catch(t){return l.push(a)}},p=t=>async function(e){if((0,a.w8)(e)){const{data:t}=await(0,i.A)(e,{responseType:"blob"});return t.size}const{data:s}=await(0,i.A)(e,{responseType:"native",method:"head",query:t?.()}),r=s.headers.get("Content-Length");if(null==r)throw new Error("Unable to parse content length");const o=parseInt(r,10);if(!(0,n.A)("parquetlayer-cache-enabled"))return o;try{const t=`${u}:${e}`,i=new URL(e);i.searchParams.append("metadata","true");let r=await caches.open(t);const n=s.headers.get("etag")??s.headers.get("Last-Modified");if(null==n)return await caches.delete(t),o;const a=await r.match(i),h=await(a?.json());h?.tag!==n&&(await caches.delete(t),r=await caches.open(t));const l=JSON.stringify({tag:n});await r.put(i,new Response(l,{headers:{"Content-Type":"application/json","Content-Length":l.length.toString()}}))}catch(t){}return o};function d(t,e){switch(e){case"esriGeometryPoint":return t.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return t.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return t.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return t.GeometryType.Multipoint;default:throw new r.A("parquet",`Found unexpected GeometryType: ${e}`)}}function f(t,e){const s=t.GeometryInfo.new();e.geometry&&s.setGeometry(function(t,e){const s=e.encoding,i=d(t,e.geometryType),r=e.spatialReference.wkid;if(null==r)throw new Error("InternalError: Wkid must be defined.");switch(s.type){case"wkb":return t.GeometryField.fromWkb(s.field,r,i);case"location":{const{yField:e,xField:n}=s;return t.GeometryField.fromLocation(e,n,r,i)}}}(t,e.geometry));const i=e.displayOptimization;if(i){const{index:e,parentColumn:r}=i,n=t=>null!=r?[r,t].join("."):t;if("z"===e.type){const i=t.DisplayOptimizationZBuilder.new();i.setCodeField(n(e.code)),i.setXColumn(n(e.xColumn)),i.setYColumn(n(e.yColumn)),i.setCooordinatePrecision(e.coordinatePrecision),i.setFullExtent(e.fullExtent),i.setSpatialReference(e.wkid,e.wkt),i.setHasZ(!!e.zColumn),i.setHasM(!!e.mColumn),s.setOptmizationZ(i)}if("xz"===e.type){const i=d(t,e.geometryType),r=t.DisplayOptimizationXZBuilder.new();r.setCodeField(n(e.code)),r.setEncoding(e.encoding),r.setFullExtent(e.fullExtent),r.setGeometryType(i),r.setSpatialReference(e.wkid,e.wkt),r.setMaxLevel(e.maxLevel),r.setHasZ(e.hasZ??!1),r.setHasM(e.hasM??!1);for(const s of e.levels??[]){const[e,i]=s.transform.translate,[o,a]=s.transform.scale,h=new Float64Array([e,i]),u=new Float64Array([o,a]),l=n(s.column);r.addLevel(t.MultiscaleGeometryField.new(s.level,s.scale,l,h,u))}s.setOptmizationXZ(r)}}return s}async function y(t,e={}){const s=await(0,h.N)(),i=c(e.getCustomParameters),n=p(e.getCustomParameters),o=e.geometryInfo?f(s,e.geometryInfo):null;try{return await s.ParquetFile.fromUrl(t,i,n,o)}catch(t){throw new r.A("parquet","Failed to parse file",{error:t})}}function m(t){const e=t.keyValueMetadata("geo");return null!=e?JSON.parse(e):null}function _(t){if(t.keyValueMetadata("esri"))throw new r.A("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const e=t.keyValueMetadata("geodisplay");if(null!=e)return JSON.parse(e);const s=t.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=s){const t=JSON.parse(s);for(const e of t.fields)if(null!=e.metadata&&"type"in e.metadata&&("xz"===e.metadata.type||"z"===e.metadata.type)){const t={parentColumn:e.name,index:e.metadata};if("xz"===t.index.type&&(t.index.geometryType=t.index.geometryType.toLowerCase(),"esri-pbf"===t.index.encoding&&(t.index.encoding="esriPBF"),"esriPBF"!==t.index.encoding))throw new r.A("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${t.index.encoding}`);return t}}return null}},93470(t,e,s){s.d(e,{Cb:()=>n,HW:()=>l,JR:()=>r,JZ:()=>h,WR:()=>a,b6:()=>c,fT:()=>i,nC:()=>u,yM:()=>o});const i=[252,146,31,255],r=[153,153,153,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},h={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},l={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[709,3090],{69540(e,t,i){i.d(t,{OU:()=>c,Pw:()=>h});var s=i(5482),n=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(88620),a=i(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const i=e;let n=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,n={},a=new Map;for(const t in i){const o=i[t],l=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==l&&0!==l&&5!==l&&4!==l)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,r.TU)(c,e),null!=c&&null==h)continue;0===l?a.set(t,h):n[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(n);if(a.size){const e=(0,l.oY)(u)?.store;if(e)for(const[t,i]of a)e.set(t,i,0)}return u}};return n=(0,s.Cg)([(0,a.$)("esri.core.Clonable")],n),n},h=c(n.A)},7762(e,t,i){i.d(t,{A:()=>k});var s,n=i(5482),r=i(98291),o=i(4576),l=i(65529),a=i(36563),u=i(4718),c=i(53966),h=i(93687),d=i(76030),p=i(56507),f=i(62788),g=i(10107),m=i(7695),y=i(64108),_=i(95488),v=i(12195);class b{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class w{constructor(e,t,i,s,n){this.target=e,this.added=t,this.removed=i,this.start=s,this.deleteCount=n}}const C=new h.A(()=>new b,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function M(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function A(e){return e?e instanceof L?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function S(e){if(e?.length)return e[0]}function I(e,t,i,s){const n=Math.min(e.length-i,t.length-s);let r=0;for(;r<n&&e[i+r]===t[s+r];)r++;return r}function T(e,t,i,s){t&&t.forEach((t,n,r)=>{e.push(t),T(e,i.call(s,t,n,r),i,s)})}const R=new Set,E=new Set,x=new Set,P=new Map;let z=0,L=s=class extends l.nJ{static ofType(e){if(!e)return s;if(P.has(e))return P.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const s=e.typeMap[i].prototype.declaredClass;t?t+=` | ${s}`:t=s}let i=class extends s{};return(0,n.Cg)([(0,m.u)({Type:e,ensureType:"function"==typeof e?(0,p.dp)(e):(0,p.aq)(e)})],i.prototype,"itemType",void 0),i=(0,n.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],i),P.set(e,i),i}static isCollection(e){return null!=e&&e instanceof s}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new _.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:z++})}normalizeCtorArgs(e){return e?(0,o.yc)(e)||e instanceof s?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?c.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,f.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,A(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,a.hA)();if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,a.hA)(()=>{i.removed=!0,e.splice(e.indexOf(i),1)})}return super.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,s=this.on(e,e=>{i()?.call(null,e),s.remove()});return s}add(e,t){if((0,f.gc)(this._observable),this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,f.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t);return this._splice(i,0,A(e)),this._emitAfterChanges(1),this}at(e){if((0,f.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];const e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.map(u.o8)})}concat(...e){(0,f.gc)(this._observable);const t=e.map(A);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const i=this._splice(0,this.length),s=i.length;for(let n=0;n<s;n++)e.call(t,i[n],n,i);this._emitAfterChanges(2)}destroyAll(){this.drain(M)}destroyMany(e){const t=this.removeMany(e);return t.forEach(M),t}every(e,t){return(0,f.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,f.gc)(this._observable);const i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,f.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.gc)(this._observable);const i=[];return T(i,this,e,t),new s(i)}forEach(e,t){return(0,f.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.gc)(this._observable),this._items[e]}getNextIndex(e){(0,f.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.gc)(this._observable);const i=this._items.map(e,t);return new s({items:i})}reorder(e,t=this.length-1){(0,f.gc)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(4))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=S(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,f.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;const t=S(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];const t=e instanceof s?e.toArray():e,i=this._items,n=[],r=t.length;for(let e=0;e<r;e++){const s=t[e],r=i.indexOf(s);if(r>-1){const s=1+I(t,i,e+1,r+1),o=this._splice(r,s);o&&o.length>0&&n.push.apply(n,o),e+=s-1}}return this._emitAfterChanges(2),n}reverse(){if((0,f.gc)(this._observable),this._emitBeforeChanges(4))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=S(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,f.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const s=(t?2:0)|(i.length?1:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(s),n}toArray(){return(0,f.gc)(this._observable),this._items.slice()}toJSON(e){return(0,f.gc)(this._observable),this.toArray().map(t=>(0,v.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,f.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,f.gc)(this._observable),this._items.toString()}unshift(...e){return(0,f.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const s=this._items,n=this.itemType;let r,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,d._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(o=s.splice(e,t),this.hasEventListener("before-remove")){const t=C.acquire();t.target=this,t.cancellable=!0;for(let i=0,n=o.length;i<n;i++)r=o[i],t.reset(r),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(i,1),s.splice(e,0,r),e+=1,i-=1,n-=1);C.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){const e=C.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let i=0;i<t;i++)e.reset(o[i]),this.emit("after-remove",e);C.release(e)}}if(i?.length){if(n){const e=[];for(const t of i){const i=n.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),o=e===this.length;if(t||r){const n=C.acquire();n.target=this,n.cancellable=!0;const l=C.acquire();l.target=this,l.cancellable=!1;for(const a of i)t?(n.reset(a),this.emit("before-add",n),n.defaultPrevented||(o?s.push(a):s.splice(e++,0,a),this._length=s.length,r&&(l.reset(a),this.emit("after-add",l)))):(o?s.push(a):s.splice(e++,0,a),this._length=s.length,l.reset(a),this.emit("after-add",l));C.release(l),C.release(n)}else{if(o)for(const e of i)s.push(e);else s.splice(e,0,...i);this._length=s.length}}if((i?.length||o?.length)&&this._notifyChangeEvent(i,o),this.hasEventListener("after-splice")){const s=new w(this,i,o,e,t);this.emit("after-splice",s)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=C.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,C.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=C.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),C.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;R.clear(),E.clear(),x.clear();for(const{added:t,removed:i}of e){if(t)if(0===x.size&&0===E.size)for(const e of t)R.add(e);else for(const e of t)E.has(e)?(x.add(e),E.delete(e)):x.has(e)||R.add(e);if(i)if(0===x.size&&0===R.size)for(const e of i)E.add(e);else for(const e of i)R.has(e)?R.delete(e):(x.delete(e),E.add(e))}const i=r.A.acquire();R.forEach(e=>{i.push(e)});const s=r.A.acquire();E.forEach(e=>{s.push(e)});const n=this._items,o=t.items,l=r.A.acquire();if(x.forEach(e=>{o.indexOf(e)!==n.indexOf(e)&&l.push(e)}),t.listeners&&(i.length||s.length||l.length)){const e={target:this,added:i,removed:s,moved:l},n=t.listeners.length;for(let i=0;i<n;i++){const s=t.listeners[i];s.removed||s.callback.call(this,e)}}r.A.release(i),r.A.release(s),r.A.release(l)}R.clear(),E.clear(),x.clear()}};(0,n.Cg)([(0,g.MZ)()],L.prototype,"_updating",void 0),(0,n.Cg)([(0,g.MZ)()],L.prototype,"_length",void 0),(0,n.Cg)([(0,g.MZ)()],L.prototype,"length",null),(0,n.Cg)([(0,g.MZ)()],L.prototype,"items",null),(0,n.Cg)([(0,g.MZ)({readOnly:!0})],L.prototype,"updating",null),L=s=(0,n.Cg)([(0,y.$)("esri.core.Collection")],L);const k=L},4902(e,t,i){i.d(t,{s:()=>o});var s=i(5482),n=i(64108);let r=0;const o=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+r++})}};return i=(0,s.Cg)([(0,n.$)("esri.core.Identifiable")],i),i};o(class{})},66344(e,t,i){i.d(t,{q:()=>l});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,n,o){t=e.id+t;const l=this._db.get(t);if(l&&(this._size-=l.size,e.size-=l.size,this._db.delete(t),l.entry!==i&&this._notifyRemove(t,l.entry,l.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return s||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);const a=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,n,a)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,this._checkSize()}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,s)=>{const n=e.lifetime;i[n]=(i[n]||0)+e.size,this._clients.forEach(i=>{const{id:n,name:r}=i;if(s.startsWith(n)){const i=t[r]||0;t[r]=i+e.size}})});const s={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[i]||0;t[i]=n,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(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,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){const n=this._clients.get(e.split(o)[0])?.removeFunc,r=n?.(t,s,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const s=t?.id;let n=!0;for(;n;){n=!1;for(const[r,l]of this._db)if(0===l.lifetime&&(!s||r.startsWith(s))){const s=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,l,s),i.size<=.9*e)return;n||=this._db.has(r)}}for(const[n,r]of this._db)if(!s||n.startsWith(s)){const s=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,r,s),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,1);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)}}new n(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class l{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new n(e,1),this._storage.register(this)}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(){}}},7695(e,t,i){function s(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>s})},60999(e,t,i){i.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>g,aD:()=>y,jJ:()=>u});var s=i(5482),n=i(69622),r=i(97768),o=i(17676),l=i(10107),a=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function c(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function f(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function g(e,t){return new m(e,t)}let m=class extends n.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,l.MZ)()],m.prototype,"value",null),(0,s.Cg)([(0,l.MZ)()],m.prototype,"error",null),(0,s.Cg)([(0,l.MZ)()],m.prototype,"finished",null),(0,s.Cg)([(0,l.MZ)()],m.prototype,"promise",void 0),(0,s.Cg)([(0,l.MZ)()],m.prototype,"_result",void 0),m=(0,s.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],m);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}}},36708(e,t,i){i.d(t,{C_:()=>d,OH:()=>g,Vh:()=>m,on:()=>h,pc:()=>y,wB:()=>a,z7:()=>u});var s=i(37955),n=i(36563),r=i(97768),o=i(17676),l=i(14012);function a(e,t,i={}){return c(e,t,i,p)}function u(e,t,i={}){return c(e,t,i,f)}function c(e,t,i={},s){let n=null;const o=i.once?(e,i)=>{s(e)&&((0,r.xt)(n),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(n=(0,l.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return n}function h(e,t,i,o={}){let l=null,u=null,c=null;function h(){l&&u&&(u.remove(),o.onListenerRemove?.(l),l=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(c),i(e)}const p=a(e,(e,i)=>{h(),(0,s.wb)(e)&&(l=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return c=(0,n.hA)(()=>{p.remove(),h()}),c}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let l=null;function a(){l=(0,r.xt)(l)}return new Promise((s,r)=>{l=(0,n.vE)([(0,o.u7)(i,()=>{a(),r((0,o.NK)())}),c(e,e=>{a(),s(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}i(80559);const g={sync:!0},m={initial:!0},y={sync:!0,initial:!0}},83027(e,t,i){i.d(t,{h:()=>s});const s=i(29953).ho},35982(e,t,i){i.d(t,{B:()=>c});var s=i(4576),n=i(71511),r=i(36563),o=i(53966),l=i(97768),a=i(17676),u=i(83027);class c{constructor(e,t,i,s,n={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,u.h)(e,{...n,schedule:s}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{n.hasInitialize&&e.invoke("initialize",{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i=new h(e,t);return this._listeners.push(i),this._connectListener(i),(0,r.hA)(()=>{(0,s.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,l.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,s){if(this._thread){const n=this._transferLists[e],r=n?n(t):[];return this._thread.invoke(e,t,{transferList:r,signal:i,jobPriority:s})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this.invokeMethod(e,t,i))):Promise.reject((0,a.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(d):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,a.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class h{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new n.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function d(){}},54239(e,t,i){i.d(t,{A:()=>m});var s,n=i(5482),r=i(4576),o=i(66552),l=i(25482),a=i(86211),u=i(67076),c=i(91429),h=i(43937),d=i(36005);const p=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=p.jsonValues.slice();(0,r.Xy)(f,"orthometric");const g=(0,o.O)()({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 m=s=class extends l.o{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?.messages&&i.messages.push(function(e,t){return new u.A("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?.messages&&i.messages.push(y(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,a.LA)(e)||g.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new s({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,a.k1)(t);return new s({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new s;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n.Cg)([(0,c.MZ)({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,n.Cg)([(0,h.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,n.Cg)([(0,d.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,n.Cg)([(0,c.MZ)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:{writer:g.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,n.Cg)([(0,d.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,n.Cg)([(0,d.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,n.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,n.Cg)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=s=(0,n.Cg)([(0,c.$K)("esri.geometry.HeightModelInfo")],m)},159(e,t,i){i.d(t,{A:()=>u});var s,n=i(5482),r=i(69540),o=i(25482),l=i(91429),a=i(99157);let u=s=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new s;for(let t=this.steps.length-1;t>=0;t--){const i=this.steps[t];e.steps.push(i.getInverse())}return e}};(0,n.Cg)([(0,l.MZ)({type:[a.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=s=(0,n.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,i){i.d(t,{A:()=>a});var s,n=i(5482),r=i(69540),o=i(25482),l=i(91429);let a=s=class extends((0,r.OU)(o.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new s({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,l.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,i)=>{t[i]=!e}}})],a.prototype,"isInverse",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkt",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkid",void 0),a=s=(0,n.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)},9762(e,t,i){i.r(t),i.d(t,{projectBuffer:()=>n});var s=i(49208);function n(e,t,i,n,r,o,l=Math.floor(e.length/3)){const a=(0,s.jd)(t,r);if(null==a)return!1;if(a===s.pO){if(e===n&&i===o)return!0;const t=i+3*l;for(let s=i,r=o;s<t;s++,r++)n[r]=e[s]??0;return!0}const u=i+3*l;for(let t=i,s=o;t<u;t+=3,s+=3)a(e,t,n,s);return!0}},49208(e,t,i){i.d(t,{Tp:()=>h,jd:()=>c,pO:()=>p,w5:()=>u});var s=i(34727),n=i(86211),r=i(73941),o=i(79258),l=i(34403),a=i(21325);const u={2:{5:p,7:null,9:null,10:p,1:w,6:null,8:null,0:null,3:g,11:m,2:p,4:I},5:{5:p,7:null,9:null,10:p,1:w,6:null,8:null,0:null,3:g,11:m,2:p,4:I},7:{5:null,7:p,9:null,10:p,1:null,6:b,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:p,10:p,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:f,7:null,9:null,10:f,1:function(e,t,i,s){const n=e[t]/z,r=P-2*Math.atan(Math.exp(-e[t+1]/z)),o=z+(e[t+2]??0),l=Math.cos(r)*o;i[s]=Math.cos(n)*l,i[s+1]=Math.sin(n)*l,i[s+2]=Math.sin(r)*o},6:null,8:null,0:null,3:p,11:function(e,t,i,s){f(e,t,i,s),m(i,s,i,s)},2:f,4:function(e,t,i,s){f(e,t,i,s),I(i,s,i,s)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,i,s){T(e,t,i,s),w(i,s,i,s)},6:null,8:null,0:null,3:function(e,t,i,s){T(e,t,i,s),g(i,s,i,s)},11:function(e,t,i,s){T(e,t,i,s),m(i,s,i,s)},2:T,4:p},1:{5:S,7:null,9:null,10:S,1:p,6:null,8:null,0:null,3:function(e,t,i,s){S(e,t,i,s),g(i,s,i,s)},11:function(e,t,i,s){S(e,t,i,s),m(i,s,i,s)},2:S,4:function(e,t,i,s){S(e,t,i,s),I(i,s,i,s)}},6:{5:null,7:A,9:null,10:A,1:null,6:p,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:M,10:M,1:null,6:null,8:p,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:p,3:null,11:null,2:null,4:null},10:{5:p,7:p,9:p,10:p,1:w,6:b,8:v,0:null,3:g,11:m,2:p,4:I},11:{5:y,7:null,9:null,10:y,1:function(e,t,i,s){y(e,t,i,s),w(i,s,i,s)},6:null,8:null,0:null,3:function(e,t,i,s){y(e,t,i,s),g(i,s,i,s)},11:p,2:y,4:function(e,t,i,s){y(e,t,i,s),I(i,s,i,s)}}};function c(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(R.source.spatialReference===e&&R.dest.spatialReference===t)return R;const i=d(e,R.source),s=d(t,R.dest);return 0===i&&0===s?(0,a.aI)(e,t)?R.projector=p:R.projector=null:R.projector=u[i][s],R}function d(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,a.oT)(e)?t.spatialReferenceId=2:(0,a.K8)(e)?t.spatialReferenceId=3:(0,a.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,r.q8)(e)?t.spatialReferenceId=7:(0,r.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function p(e,t,i,s){e!==i&&(i[s++]=e[t++],i[s++]=e[t++],i[s]=e[t]??0)}function f(e,t,i,s){i[s]=x*(e[t]/z),i[s+1]=x*(P-2*Math.atan(Math.exp(-e[t+1]/z))),i[s+2]=e[t+2]??0}function g(e,t,i,n){!function(e,t,i,n,r){const o=.4999999*Math.PI,l=(0,s.qE)(E*e[t+1],-o,o),a=Math.sin(l);i[n++]=E*e[t]*r.radius,i[n++]=r.halfSemiMajorAxis*Math.log((1+a)/(1-a)),i[n]=e[t+2]??0}(e,t,i,n,o.$O)}function m(e,t,i,s){i[s]=e[t]*L,i[s+1]=e[t+1]*L,i[s+2]=e[t+2]??0}function y(e,t,i,s){i[s]=e[t]*k,i[s+1]=e[t+1]*k,i[s+2]=e[t+2]??0}function _(e,t,i,s,n){const r=n+(e[t+2]??0),o=E*e[t],l=E*e[t+1],a=Math.cos(l)*r;i[s]=Math.cos(o)*a,i[s+1]=Math.sin(o)*a,i[s+2]=Math.sin(l)*r}function v(e,t,i,s){_(e,t,i,s,o.Sw.radius)}function b(e,t,i,s){_(e,t,i,s,o.sH.radius)}function w(e,t,i,s){_(e,t,i,s,o.$O.radius)}function C(e,t,i,n,r){const o=e[t],l=e[t+1],a=e[t+2]??0,u=Math.sqrt(o*o+l*l+a*a),c=(0,s.YN)(a/(0===u?1:u)),h=Math.atan2(l,o);i[n++]=x*h,i[n++]=x*c,i[n]=u-r}function M(e,t,i,s){C(e,t,i,s,o.Sw.radius)}function A(e,t,i,s){C(e,t,i,s,o.sH.radius)}function S(e,t,i,s){C(e,t,i,s,o.$O.radius)}function I(e,t,i,s){!function(e,t,i,s,n){const r=E*e[t],o=E*e[t+1],l=e[t+2]??0,a=Math.sin(o),u=Math.cos(o),c=n.radius/Math.sqrt(1-n.eccentricitySquared*a*a);i[s++]=(c+l)*u*Math.cos(r),i[s++]=(c+l)*u*Math.sin(r),i[s++]=(c*(1-n.eccentricitySquared)+l)*a}(e,t,i,s,o.$O)}function T(e,t,i,s){const n=l.TP,r=e[t],a=e[t+1],u=e[t+2]??0;let c,h,d,p,f,g,m,y,_,v,b,w,C,M,A,S,I,T,R,E,P;c=Math.abs(u),h=r*r+a*a,d=Math.sqrt(h),p=h+u*u,f=Math.sqrt(p),E=Math.atan2(a,r),g=u*u/p,m=h/p,M=n.a2/f,A=n.a3-n.a4/f,m>.3?(y=c/f*(1+m*(n.a1+M+g*A)/f),R=Math.asin(y),v=y*y,_=Math.sqrt(1-v)):(_=d/f*(1-g*(n.a5-M-m*A)/f),R=Math.acos(_),v=1-_*_,y=Math.sqrt(v)),b=1-o.$O.eccentricitySquared*v,w=o.$O.radius/Math.sqrt(b),C=n.a6*w,M=d-w*_,A=c-C*y,I=_*M+y*A,S=_*A-y*M,T=S/(C/b+I),R+=T,P=I+S*T/2,u<0&&(R=-R),i[s++]=x*E,i[s++]=x*R,i[s]=P}const R={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:p},E=(0,s.kU)(1),x=(0,s.KJ)(1),P=.5*Math.PI,z=o.$O.radius,L=z*Math.PI/180,k=180/(z*Math.PI)},91218(e,t,i){i.r(t),i.d(t,{canProjectWithoutEngine:()=>G,initializeProjection:()=>K,isEqualBaseGCS:()=>F,isLoaded:()=>z,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>k,load:()=>U,project:()=>j,projectAsync:()=>V,projectExtent:()=>ne,projectMany:()=>Z,projectMultipoint:()=>Q,projectOrLoad:()=>$,projectOrLoadMany:()=>q,projectPoint:()=>Y,projectPolygon:()=>ie,projectPolyline:()=>ee,projectWithoutEngine:()=>W,requiresLoad:()=>O,test:()=>B,tryProject:()=>D,unload:()=>N});var s=i(49186),n=i(17676),r=i(62788),o=i(95488),l=i(51850),a=i(21276),u=i(73941),c=i(5443),h=i(91075),d=i(48526),p=i(86738),f=i(39829),g=i(82799),m=i(16930),y=i(98764),_=i(159),v=i(9762),b=i(49208);function w(e,t,i,s,n,r){return C[0]=e,C[1]=t,C[2]=i,(0,v.projectBuffer)(C,s,0,n,r,0)}const C=(0,l.vt)();var M=i(60408),A=i(21325),S=i(52006);let I=null,T=null,R=null,E=null,x={};const P=new o.I;function z(){return!!(T?.isLoaded()&&R?.isLoaded()&&E?.isLoaded())}function L(){return!!z()||((0,r.gc)(P),U(),!1)}function k(e,t){return!e||!t||G(e,t)||L()}function O(e,t){return!G(e,t)&&!z()}async function U(e){null==I&&(I=Promise.all([i.e(3276).then(i.bind(i,83276)).then(e=>(T=e,T.load())),i.e(8377).then(i.bind(i,8377)).then(e=>(R=e,R.load())),i.e(2158).then(i.bind(i,12158)).then(e=>(E=e,E.load()))])),await I,(0,n.Te)(e),P.notify()}function j(e,t,i){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),Z(e,e[0].spatialReference,t,i)):((0,a.f)(e),Z([e],e.spatialReference,t,i)[0])}function Z(e,t,i,s){if(null==t||null==i)return e;if(G(t,i,s))return e.map(e=>W(e,t,i));if(null==s?.geographicTransformation&&(0,u.jA)(t))return Z(e.map(e=>W(e,t,m.A.WGS84)),m.A.WGS84,i,{zConversionDisabled:s?.zConversionDisabled});if(null==s?.geographicTransformation&&(0,u.jA)(i))return Z(e,t,m.A.WGS84).map(e=>W(e,m.A.WGS84,i));if(!z())throw new H;if(!s?.geographicTransformation)if(s?.extendedParams)s={...s,geographicTransformation:E.getTransformation(t,i,s.areaOfInterestExtent)||new _.A};else if(!s?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,i);let n=x[e];n||(n=E.getTransformation(t,i)||new _.A,x[e]=n),s={geographicTransformation:n,zConversionDisabled:s?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof h.A?T.executeMany(e,i,s):R.executeMany(e,i,s)}function D(e,t,i){try{return j(e,t,i)}catch(e){return null}}function $(e,t){const i=q([e],t);return null!=i.pending?{pending:i.pending,geometry:null}:null!=i.geometries?{pending:null,geometry:i.geometries[0]}:{pending:null,geometry:null}}function q(e,t,i){if(!z())for(const i of e)if(null!=i&&!(0,A.aI)(i.spatialReference,t)&&(0,A.fn)(i.spatialReference)&&(0,A.fn)(t)&&!G(i.spatialReference,t))return(0,r.gc)(P),{pending:U(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,A.aI)(e.spatialReference,t)?e:(0,A.fn)(e.spatialReference)&&(0,A.fn)(t)?j(e,t,i):null)}}class H extends s.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function N(){I=null,T=null,R=null,E=null,x={}}const B={get loadPromise(){return I}};async function V(e,t,i){if((0,n.Te)(i),!e)return e;const s=q(Array.isArray(e)?e:[e],t,i);if(s.pending)return await s.pending,(0,n.Te)(i),V(e,t,i);const r=s.geometries??[];return Array.isArray(e)?r:r[0]}function G(e,t,i){return!(i?.areaOfInterestExtent||i?.extendedParams||i?.geographicTransformation)&&(!!(0,A.aI)(e,t)||(0,A.fn)(e)&&(0,A.fn)(t)&&!!(0,b.jd)(e,t))}function F(e,t){if((0,A.aI)(e,t))return!0;if(!(0,A.fn)(e)||!(0,A.fn)(t))return!1;const i=(0,A.oT)(e)||(0,A.K8)(e)||(0,A.x1)(e),s=(0,A.oT)(t)||(0,A.K8)(t)||(0,A.x1)(t);return i&&s}async function K(e,t,i,s){if(z())return(0,n.NO)(s);if(Array.isArray(e)){for(const{source:t,dest:i,options:n}of e)if(t&&i&&!G(t,i,n))return U(s)}else if(e&&t&&!G(e,t,i))return U(s);return(0,n.NO)(s)}function W(e,t,i){return e?(0,M.fT)(e)?J(e,t,new p.A,i,0):(0,M.ZC)(e)?re(e,t,new c.A,i,0):(0,M.Bi)(e)?se(e,t,new f.A,i,0):(0,M.Rg)(e)?te(e,t,new g.A,i,0):(0,M.U9)(e)?X(e,t,new d.A,i,0):null:null}function Y(e,t,i=t.spatialReference,s=0){return null!=i&&null!=e.spatialReference&&null!=J(e,e.spatialReference,t,i,s)}function J(e,t,i,s,n){ue[0]=e.x,ue[1]=e.y;const r=e.z;return ue[2]=void 0!==r?r:n,(0,v.projectBuffer)(ue,t,0,ue,s,0)?(i.x=ue[0],i.y=ue[1],i.spatialReference=s,void 0!==r||(0,u.xP)(s)?(i.z=ue[2],i.hasZ=!0):(i.z=void 0,i.hasZ=!1),void 0===e.m?(i.m=void 0,i.hasM=!1):(i.m=e.m,i.hasM=!0),i):null}function Q(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=X(e,e.spatialReference,t,i,s)}function X(e,t,i,s,n){const{points:r,hasZ:o,hasM:l}=e,a=[],u=r.length,c=[];for(const e of r)c.push(e[0],e[1],o?e[2]:n);if(!(0,v.projectBuffer)(c,t,0,c,s,0,u))return null;const h=ae(o,s);for(let e=0;e<u;++e){const t=3*e,i=c[t],s=c[t+1];h&&l?a.push([i,s,c[t+2],r[e][3]]):h?a.push([i,s,c[t+2]]):l?a.push([i,s,r[e][2]]):a.push([i,s])}return i.points=a,i.spatialReference=s,i.hasZ=o,i.hasM=l,i}function ee(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=te(e,e.spatialReference,t,i,s)}function te(e,t,i,s,n){const{curvePaths:r,paths:o,hasZ:l,hasM:a}=e;if(!(r?le(r,l??!1,a??!1,t,i.curvePaths=[],s,n):oe(o,l??!1,a??!1,t,i.paths,s,n)))return null;const u=ae(l,s);return i.spatialReference=s,i.hasZ=u,i.hasM=a,i}function ie(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=se(e,e.spatialReference,t,i,s)}function se(e,t,i,s,n){const{curveRings:r,rings:o,hasZ:l,hasM:a}=e;return(r?le(r,l??!1,a??!1,t,i.curveRings=[],s,n):oe(o,l??!1,a??!1,t,i.rings,s,n))?(i.spatialReference=s,i.hasZ=ae(l,s),i.hasM=a,i):null}function ne(e,t,i=t.spatialReference,s=0){return null!=e.spatialReference&&null!=i&&null!=re(e,e.spatialReference,t,i,s)}function re(e,t,i,s,n){const{xmin:r,ymin:o,xmax:l,ymax:a,hasZ:u,hasM:c}=e;if(!w(r,o,u?e.zmin:n,t,ue,s))return null;const h=ae(u,s);return i.xmin=ue[0],i.ymin=ue[1],h&&(i.zmin=ue[2]),w(l,a,u?e.zmax:n,t,ue,s)?(i.xmax=ue[0],i.ymax=ue[1],h&&(i.zmax=ue[2]),c&&(i.mmin=e.mmin,i.mmax=e.mmax),i.spatialReference=s,i):null}function oe(e,t,i,s,n,r,o=0){const l=new Array;for(const i of e)for(const e of i)l.push(e[0],e[1],t?e[2]:o);if(!(0,v.projectBuffer)(l,s,0,l,r,0))return!1;let a=0;n.length=0;const u=t?3:2,c=ae(t,r);for(const t of e){const e=new Array;for(const s of t){const t=l.slice(a,a+=3);c||t.pop(),i&&t.push(s[u]),e.push(t)}n.push(e)}return!0}function le(e,t,i,s,n,r,o=0){const l=new Array;for(const i of e)for(const e of i){if((0,S.FG)(e))return!1;if((0,S.aO)(e)){const[i,s]=e.c;l.push(i[0],i[1],t?i[2]:o,s[0],s[1],o);continue}if((0,S.n1)(e)){const[i,s,n]=e.b;l.push(i[0],i[1],t?i[2]:o,s[0],s[1],o,n[0],n[1],o);continue}const i=e;l.push(i[0],i[1],t?i[2]:o)}if(!(0,v.projectBuffer)(l,s,0,l,r,0))return!1;let a=0;n.length=0;const u=t?3:2,c=ae(t,r);for(const t of e){const e=new Array;for(const s of t){const t=l.slice(a,a+=3);if(c||t.pop(),i&&t.push((0,S.yP)(s)[u]),(0,S.FG)(s))return!1;if((0,S.aO)(s)){const i=l[a++],s=l[a++];++a,e.push({c:[t,[i,s]]});continue}if((0,S.n1)(s)){const i=l[a++],s=l[a++];++a;const n=l[a++],r=l[a++];++a,e.push({b:[t,[i,s],[n,r]]});continue}e.push(t)}n.push(e)}return!0}function ae(e,t){return e||(0,u.xP)(t)||(0,A.aI)(t,y.Y0)}const ue=(0,l.vt)()},98764(e,t,i){i.d(t,{GD:()=>o,Y0:()=>u,lO:()=>c});var s=i(73941),n=i(16930),r=i(21325);const o=new n.A(s.fv),l=new n.A(s.FY),a=new n.A(s.LJ),u=new n.A(s.Ro);function c(e){const t=h.get(e);if(t)return t;let i=o;if(e)if(e===l)i=l;else if(e===a)i=a;else{const t=e.wkid,s=e.latestWkid;if(null!=t||null!=s)(0,r.tl)(t)||(0,r.tl)(s)?i=l:((0,r.ZL)(t)||(0,r.ZL)(s))&&(i=a);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===d?i=l:e===p&&(i=a)}}}return h.set(e,i),i}const h=new Map,d=l.wkt.toUpperCase(),p=a.wkt.toUpperCase()},34403(e,t,i){i.d(t,{TP:()=>o});var s=i(79258);Math.PI;const n=s.$O.radius,r=s.$O.eccentricitySquared,o={a1:n*r,a2:n*r*n*r,a3:n*r*r/2,a4:n*r*n*r*2.5,a5:n*r+n*r*r/2,a6:1-r};s.$O.radius,s.$O.flattening,s.Sw.radius,s.Sw.flattening,s.sH.radius,s.sH.flattening,s.sH.radius},38732(e,t,i){i.r(t),i.d(t,{default:()=>S});var s=i(5482),n=i(11254),r=i(49186),o=i(97768),l=i(25728),a=i(17676),u=i(84952),c=i(91429),h=i(54239),d=i(4146),p=i(89186),f=i(18768),g=i(34287),m=i(8303),y=i(10873),_=i(87378),v=i(35982);class b extends v.B{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&&(w.forEach((e,t)=>{e===this&&w.delete(t)}),this.destroy())}}const w=new Map;var C=i(36005);let M=class extends((0,p.f)((0,f.b)((0,g.q)((0,m.A)((0,l.M)(d.A)))))){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=w.get(e);return t||(null!=e?(t=new b(t=>e.immediate.schedule(t)),w.set(e,t)):(t=new b,w.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(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=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new r.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(a.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,i,s){const o=s?.signal,l={responseType:"array-buffer",signal:o,useQueue:s?.useQueue,priority:s?.priority},a={noDataValue:s?.noDataValue,returnFileInfo:!0};await this.load(),await this._fetchTileAvailability(e,t,i,s);const u=await(0,n.A)(this.getTileUrl(e,t,i),l),c=await this._lercDecoder.decode(u.data,a,o);if(!c)throw new r.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new _.A({values:c.pixelData,width:c.width,height:c.height,noDataValue:c.noDataValue})}getTileUrl(e,t,i){const s=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,n=(0,u.x0)({...this.parsedUrl.query,blankTile:!s&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${n?"?"+n:""}`}async queryElevation(e,t){const{query:s}=await i.e(91).then(i.bind(i,90091));return(0,a.Te)(t),s(this,e,t)}async createElevationSampler(e,t){const{createSampler:s}=await i.e(91).then(i.bind(i,90091));return(0,a.Te)(t),s(this,e,t)}_fetchTileAvailability(e,t,i,s){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,s):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,n.A)(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[A]}};(0,s.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,s.Cg)([(0,C.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,s.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,type:h.A})],M.prototype,"heightModelInfo",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,s.Cg)([(0,c.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,s.Cg)([(0,c.MZ)({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})],M.prototype,"minScale",void 0),(0,s.Cg)([(0,c.MZ)({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})],M.prototype,"maxScale",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,s.Cg)([(0,c.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,c.MZ)()],M.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,s.Cg)([(0,c.MZ)(y.OZ)],M.prototype,"url",void 0),(0,s.Cg)([(0,c.MZ)()],M.prototype,"version",void 0),(0,s.Cg)([(0,C.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,s.Cg)([(0,c.$K)("esri.layers.ElevationLayer")],M);const A=Symbol("default-fetch-tile");M.prototype.fetchTile[A]=!0;const S=M},4146(e,t,i){i.d(t,{A:()=>_});var s=i(5482),n=i(11254),r=i(49186),o=i(65529),l=i(4902),a=i(92474),u=i(53966),c=i(17676),h=i(84952),d=i(91429),p=i(5443),f=i(16930),g=i(92602),m=i(79677);let y=0,_=class extends((0,o.Zt)((0,l.s)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:s}=await Promise.all([i.e(812),i.e(5613),i.e(909)]).then(i.bind(i,45613));try{return await s(t)}catch(e){const i=t?.portalItem,s=i?.id||"unset",n=i?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+s+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(e,t){return Promise.reject(new r.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new r.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,s.Cg)([(0,d.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,s.Cg)([(0,d.MZ)({type:p.A})],_.prototype,"fullExtent",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,s.Cg)([(0,d.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,s.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,s.Cg)([(0,d.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,s.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,s.Cg)([(0,d.MZ)({type:f.A})],_.prototype,"spatialReference",void 0),(0,s.Cg)([(0,d.MZ)({type:String})],_.prototype,"title",void 0),(0,s.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,s.Cg)([(0,d.MZ)()],_.prototype,"url",void 0),(0,s.Cg)([(0,d.MZ)({type:m.A})],_.prototype,"visibilityTimeExtent",void 0),(0,s.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,s.Cg)([(0,d.$K)("esri.layers.Layer")],_)},18768(e,t,i){i.d(t,{b:()=>l});var s=i(5482),n=i(53966),r=i(91429),o=i(60694);const l=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,n.A.getLogger(this)))}};return(0,s.Cg)([(0,r.MZ)()],i.prototype,"title",null),(0,s.Cg)([(0,r.MZ)({type:String})],i.prototype,"url",null),i=(0,s.Cg)([(0,r.$K)("esri.layers.mixins.ArcGISService")],i),i}},8303(e,t,i){i.d(t,{A:()=>C});var s=i(5482),n=i(92602),r=i(70333),o=i(11254),l=i(60999),a=i(49186),u=i(36563),c=i(53966),h=i(97768),d=i(17676),p=i(84952),f=i(91429),g=i(77548),m=i(20655),y=i(80812),_=i(41318),v=i(10407),b=i(36005),w=i(43937);const C=e=>{const t=e;let C=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new y.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await i.e(1204).then(i.bind(i,41204));return(0,d.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:t}=await i.e(1204).then(i.bind(i,41204)),s=new AbortController,n=(0,u.rE)(s);return this.addHandles(n,"reloadFromPortal"),await t({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},{signal:s.signal})}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!r.id?.findCredential(this.url),n=e===i.id;if(n&&i.portal.user)return this._getUserPrivileges(i,s);let o,l;if(n)o=i.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,p.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(r.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,u=!1,c=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(n?await i.reload():(i=new y.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,s)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const i=(0,v.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?r.id?.findCredential(this.url):null;if(!t)return!0;const i=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=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=r.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const s=`${i.owningSystemUrl}/sharing/rest`,n=m.A.getDefault();if(n&&n.loaded&&(0,p.S8)(n.restUrl)===(0,p.S8)(s))return n.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,c=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?_.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return i&&s&&!(0,p.ut)(s.restUrl,i.restUrl)?(t.messages&&t.messages.push(new a.A("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,s.Cg)([(0,f.MZ)({type:y.default})],C.prototype,"portalItem",null),(0,s.Cg)([(0,b.w)("web-document","portalItem",["itemId"])],C.prototype,"readPortalItem",null),(0,s.Cg)([(0,w.K)("web-document","portalItem",{itemId:{type:String}})],C.prototype,"writePortalItem",null),(0,s.Cg)([(0,f.MZ)({clonable:!1})],C.prototype,"resourceReferences",void 0),(0,s.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasEditingPrivileges",void 0),(0,s.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasFullEditingPrivileges",void 0),(0,s.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasUpdateItemPrivileges",void 0),C=(0,s.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],C),C},M={credential:null,user:null}},87378(e,t,i){i.d(t,{A:()=>l});var s,n=i(34275),r=i(56507);const o=Symbol("ElevationTileDataClass");class l{static{s=o}constructor({values:e,width:t,height:i,noDataValue:r}){this[s]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,n.vZ)(e)?e:new Float32Array(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}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,s=-1/0,n=!0;for(const r of t)r===e?this._hasNoDataValues=!0:(i=r<i?r:i,s=r>s?r:s,n=!1);n?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=s>-3e38?s:0)}static{this.from=(0,r.qf)(l)}}},77548(e,t,i){i.d(t,{Gh:()=>z,tk:()=>T,BR:()=>I,p2:()=>A,qd:()=>R,wI:()=>S,G$:()=>x,$x:()=>E,Ov:()=>v,cM:()=>d,UC:()=>p,W_:()=>b,Qz:()=>f,OP:()=>P,TU:()=>_,F2:()=>g,XX:()=>y,Qi:()=>w,jy:()=>C});var s=i(70333),n=i(11254),r=i(7762),o=(i(84952),i(36563)),l=i(36708),a=i(4146);const u=new WeakMap;function c(e){return!e.destroyed&&(u.has(e)||e.addHandles([(0,l.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof a.A)&&("catalog-dynamic-group"===t.type||c(t))},t=>u.set(e,t),l.pc),(0,o.hA)(()=>u.delete(e))]),u.get(e))}function h(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function d(e){return h(e,"knowledge-graph")&&"layers"in e}function p(e){return h(e,"knowledge-graph-sublayer")}function f(e){return h(e,"link-chart")&&"layers"in e}function g(e){return h(e,"subtype-group")&&"sublayers"in e}function m(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}i(16215);const y={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function _(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function v(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function b(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function w(e){return null!=e&&"object"==typeof e&&"featureReduction"in e}function C(e){return function(e){return h(e,"catalog-footprint")}(e)||function(e){return h(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)||function(e){return h(e,"oriented-imagery")}(e)||function(e){return"subtype-sublayer"===e?.type}(e)}function M(e){const t=e?.type;return"binning"===t||"cluster"===t}function A(e,t){if(!C(e))return;const i=t?.graphic,s="featureReduction"in e?e.featureReduction:null;if(i){if(i.isAggregate){const e=i.origin;return e&&"featureReductionProvider"in e&&s?M(s)?s:null:void 0}return e}return t?.checkFeatureReduction&&s?M(s)?s:null:e}async function S(e,t){const i=s.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const r=e.toLowerCase().indexOf("/rest/services");if(-1===r)return null;const o=`${e.slice(0,r)}/rest/info`,l=null!=t?t.signal:null,{data:a}=await(0,n.A)(o,{query:{f:"json"},responseType:"json",signal:l});return a?.owningSystemUrl||null}function I(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function T(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function R(e){const t=new r.A;for(const i of e.allLayers.concat(e.allTables))c(i)||m(i)||("charts"in i&&t.push(i),"subtype-group"===i.type&&t.push(...i.sublayers));return t}function E(e,t){return null}function x(e){return null}function P(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function z(e,t){if(!t||!P(e))return;const i=(e.url,null);i&&(e.url=i)}},10407(e,t,i){i.d(t,{It:()=>p,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>l,bK:()=>a,mm:()=>d,sQ:()=>h});var s=i(91218),n=i(16930),r=i(28735);function o(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,d.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function c(e,t,i){i?o(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,r.ci)(e);const i=n.A.WGS84;return await(0,s.initializeProjection)(t,i),(0,s.project)(e,i)}(i)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:i,itemControl:s}=e,n=t.user?.privileges;let r=!n||n.includes("features:user:edit"),o=!!i&&!!n?.includes("features:user:fullEdit");const l="update"===s||"admin"===s;return l?o=r=!0:o&&(r=!0),{features:{edit:r,fullEdit:o},content:{updateItem:l}}}},73133(e,t,i){i.d(t,{j:()=>s});const s=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"})},16215(e,t,i){i.d(t,{S:()=>n,Y:()=>s});const s=Symbol("BasemapInstance");function n(e){return null!=e&&"object"==typeof e&&s in e}},79677(e,t,i){i.d(t,{A:()=>d});var s,n=i(5482),r=i(25482),o=i(88930),l=i(91429),a=i(98623),u=i(10184),c=i(36005),h=i(43937);let d=class extends r.o{static{s=this}static get allTime(){return p}static get empty(){return f}static fromArray(e){return new s({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}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(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({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,s=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===s&&i===n}expandTo(e,t=a.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,new u.A({value:1,unit:e}),t));let n=this.end;if(n){const i=(0,o.lL)(n,new u.A({value:1,unit:e}),t);n=n.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new s({start:i,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.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,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,l;return n>=t&&n<=i?o=n:t>=n&&t<=r&&(o=t),i>=n&&i<=r?l=i:r>=t&&r<=i&&(l=r),null==o||null==l||isNaN(o)||isNaN(l)?s.empty:new s({start:o===-1/0?null:new Date(o),end:l===1/0?null:new Date(l)})}offset(e,t,i=a.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const n=new s,{start:r,end:l}=this;return null!=r&&(n.start=(0,o.S1)(r,e,t,i)),null!=l&&(n.end=(0,o.S1)(l,e,t,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:i})}};(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n.Cg)([(0,c.w)("end")],d.prototype,"readEnd",null),(0,n.Cg)([(0,h.K)("end")],d.prototype,"writeEnd",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n.Cg)([(0,c.w)("start")],d.prototype,"readStart",null),(0,n.Cg)([(0,h.K)("start")],d.prototype,"writeStart",null),d=s=(0,n.Cg)([(0,l.$K)("esri.time.TimeExtent")],d);const p=new d,f=new d({start:void 0,end:void 0})},10184(e,t,i){i.d(t,{A:()=>c});var s=i(5482),n=i(69540),r=i(25482),o=i(88930),l=i(91429),a=i(73133),u=i(93223);let c=class extends((0,n.OU)(r.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,s.Cg)([(0,u.e)(a.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,s.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,s.Cg)([(0,l.$K)("esri.time.TimeInterval")],c)},78553(e,t,i){i.d(t,{D:()=>r,p:()=>n});var s=i(56507);function n(e){const t=(0,s.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function r(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9630],{68197(t,e,n){n.d(e,{A:()=>c});var r=n(40876),o=n(4576),i=n(34727),a=n(56507);function s(t){return(0,i.qE)((0,a.Vr)(t),0,255)}function u(t,e){const n=t.toString(16).padStart(2,"0");return e?n.slice(0,1):n}class c{static blendColors(t,e,n,r=new c){return r.r=Math.round(t.r+(e.r-t.r)*n),r.g=Math.round(t.g+(e.g-t.g)*n),r.b=Math.round(t.b+(e.b-t.b)*n),r.a=t.a+(e.a-t.a)*n,r._sanitize()}static fromRgb(t,e){const n=(0,r.lT)(t);return n?c.fromArray(n,e):null}static fromHex(t,e=new c){const n=(0,r.oW)(t);return n?c.fromArray(n,e):null}static fromArray(t,e=new c){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const n=(0,r.Eq)(t);return n?c.fromArray(n,e):null}static fromJSON(t){return null!=t?new c([t[0],t[1],t[2],(t[3]??255)/255]):void 0}toUnitRGB(){return[this.r/255,this.g/255,this.b/255]}toUnitRGBA(t){return t??=[0,0,0,0],t[0]=this.r/255,t[1]=this.g/255,t[2]=this.b/255,t[3]=null!=this.a?this.a:1,t}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){if("string"==typeof t)c.fromString(t,this);else if((0,o.yc)(t))c.fromArray(t,this);else{const e=t;this._set(e.r??0,e.g??0,e.b??0,e.a??1),t instanceof c||this._sanitize()}return this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,n=t?.digits??6,r=3===n||4===n,o=4===n||8===n,i=`#${u(this.r,r)}${u(this.g,r)}${u(this.b,r)}${o?u(Math.round(255*this.a),r):""}`;return e?i.toUpperCase():i}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=0){const e=s(this.r),n=s(this.g),r=s(this.b);return 0===t||1!==this.a?[e,n,r,s(255*this.a)]:[e,n,r]}clone(){return new c(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=(0,r.c1)(this.r),this.g=(0,r.c1)(this.g),this.b=(0,r.c1)(this.b),this.a=(0,r.G1)(this.a),this}_set(t,e,n,r){this.r=t,this.g=e,this.b=n,this.a=r}}c.prototype.declaredClass="esri.Color"},40876(t,e,n){n.d(e,{Eq:()=>d,G1:()=>b,TS:()=>i,Tf:()=>w,V6:()=>o,Vm:()=>g,ay:()=>u,c1:()=>m,c4:()=>a,j5:()=>c,lT:()=>f,oW:()=>l,xV:()=>M});const r={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(t){return!!r[t]||!!r[t.toLowerCase()]}function i(t){return r[t]??r[t.toLowerCase()]}function a(t){return[...i(t)]}function s(t,e,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?t+(e-t)*r:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function u(t,e,n,r=1){const o=(t%360+360)%360/360,i=n<=.5?n*(e+1):n+e-n*e,a=2*n-i;return[Math.round(255*s(a,i,o+1/3)),Math.round(255*s(a,i,o)),Math.round(255*s(a,i,o-1/3)),r]}function c(t){const e=t.length>5,n=e?8:4,r=(1<<n)-1,o=e?1:17,i=e?9===t.length:5===t.length;let a=Number("0x"+t.slice(1));if(isNaN(a))return null;const s=[0,0,0,1];let u;return i&&(u=a&r,a>>=n,s[3]=o*u/255),u=a&r,a>>=n,s[2]=o*u,u=a&r,a>>=n,s[1]=o*u,u=a&r,a>>=n,s[0]=o*u,s}function l(t){if(!t.startsWith("#")||isNaN(Number(`0x${t.slice(1)}`)))return null;switch(t.length){case 4:case 5:{const e=parseInt(t.slice(1,2),16),n=parseInt(t.slice(2,3),16),r=parseInt(t.slice(3,4),16),o=4===t.length?15:parseInt(t.slice(4),16);return[e+16*e,n+16*n,r+16*r,(o+16*o)/255]}case 7:case 9:return[parseInt(t.slice(1,3),16),parseInt(t.slice(3,5),16),parseInt(t.slice(5,7),16),(7===t.length?255:parseInt(t.slice(7),16))/255];default:return null}}function f(t){const e=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(e){const t=e[2].split(/\s*,\s*/),n=e[1];if("rgb"===n&&3===t.length||"rgba"===n&&4===t.length){if(t[0].endsWith("%")){const e=t.map(t=>2.56*parseFloat(t));return 4===t.length&&(e[3]=parseFloat(t[3])),h(e)}return h(t.map(t=>parseFloat(t)))}if("hsl"===n&&3===t.length||"hsla"===n&&4===t.length)return u(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3]??"1"))}return null}function h(t){return t[0]=m(t[0]),t[1]=m(t[1]),t[2]=m(t[2]),t[3]=4===t.length?b(t[3]):1,t}function d(t){let e=o(t)?i(t):null;return e??=f(t),e??=l(t),e}function g(t){const e=d(t);return null!=e?[e[0]/255,e[1]/255,e[2]/255,e[3]]:null}function b(t){return y(t,0,1)}function m(t){return Math.round(y(t,0,255))}function y(t,e,n){return t=Number(t),isNaN(t)?n:t<e?e:t>n?n:t}const w=2.2,p=1/w;function M(t){return t**p}},9093(t,e,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}n.d(e,{o8:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(t,e,n,r,o,i,a,s,u,c,l,f,h,d,g,b){return[t,e,n,r,o,i,a,s,u,c,l,f,h,d,g,b]}},Symbol.toStringTag,{value:"Module"}))},82534(t,e,n){function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}n.d(e,{o8:()=>o,vt:()=>r,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},48163(t,e,n){function r(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,e){return[t,e]}function a(){return i(1,1)}function s(){return i(1,0)}function u(){return i(0,1)}n.d(e,{Un:()=>c,fA:()=>i,o8:()=>o,vt:()=>r});const c=a(),l=s(),f=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:l,UNIT_Y:f,ZEROS:[0,0],clone:o,create:r,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){const n=Math.min(2,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:i,ones:a,unitX:s,unitY:u,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},35522(t,e,n){n.d(e,{$A:()=>I,Bw:()=>i,C:()=>a,Cc:()=>k,DI:()=>A,Il:()=>j,Io:()=>w,Ln:()=>y,Om:()=>U,Qr:()=>f,Re:()=>c,S8:()=>C,T9:()=>b,WQ:()=>u,Z0:()=>_,_S:()=>d,aI:()=>F,ei:()=>O,fw:()=>S,g7:()=>z,gL:()=>T,hG:()=>p,hZ:()=>s,hs:()=>m,jb:()=>L,jk:()=>g,lo:()=>D,lw:()=>l,m3:()=>M,oW:()=>q,t2:()=>E,tn:()=>h,uE:()=>R,xg:()=>V,ze:()=>v});var r=n(51850),o=n(34304);function i(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function s(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function c(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function f(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function g(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function b(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function m(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function w(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return Math.sqrt(n*n+r*r+o*o)}function p(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return n*n+r*r+o*o}function M(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function v(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function A(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function C(t,e){const n=e[0],r=e[1],o=e[2];let i=n*n+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i),t}function U(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function I(t,e,n){const r=e[0],o=e[1],i=e[2],a=n[0],s=n[1],u=n[2];return t[0]=o*u-i*s,t[1]=i*a-r*u,t[2]=r*s-o*a,t}function k(t,e,n,r){const o=e[0],i=e[1],a=e[2];return t[0]=o+r*(n[0]-o),t[1]=i+r*(n[1]-i),t[2]=a+r*(n[2]-a),t}function _(t,e,n){const r=e[0],o=e[1],i=e[2];return t[0]=n[0]*r+n[4]*o+n[8]*i+n[12],t[1]=n[1]*r+n[5]*o+n[9]*i+n[13],t[2]=n[2]*r+n[6]*o+n[10]*i+n[14],t}function O(t,e,n){const r=e[0],o=e[1],i=e[2];return t[0]=r*n[0]+o*n[3]+i*n[6],t[1]=r*n[1]+o*n[4]+i*n[7],t[2]=r*n[2]+o*n[5]+i*n[8],t}function T(t,e,n){return S(t,e,n[0],n[1],n[2],n[3])}function S(t,e,n,r,o,i){const a=e[0],s=e[1],u=e[2],c=r*u-o*s,l=o*a-n*u,f=n*s-r*a,h=r*f-o*l,d=o*c-n*f,g=n*l-r*c,b=2*i;return t[0]=a+c*b+2*h,t[1]=s+l*b+2*d,t[2]=u+f*b+2*g,t}function z(t,e){C(B,t),C(x,e);const n=U(B,x);return n>1?0:n<-1?Math.PI:Math.acos(n)}const B=(0,r.vt)(),x=(0,r.vt)();function E(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function F(t,e){if(t===e)return!0;const n=t[0],r=t[1],i=t[2],a=e[0],s=e[1],u=e[2],c=(0,o.FD)();return Math.abs(n-a)<=c*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-s)<=c*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-u)<=c*Math.max(1,Math.abs(i),Math.abs(u))}function q(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],i=n[2]-e[2];let a=r*r+o*o+i*i;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=o*a,t[2]=i*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const L=c,N=l,P=f,V=w,D=p,j=i,R=M;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:u,angle:z,bezier:function(t,e,n,r,o,i){const a=1-i,s=a*a,u=i*i,c=s*a,l=3*i*s,f=3*u*a,h=u*i;return t[0]=e[0]*c+n[0]*l+r[0]*f+o[0]*h,t[1]=e[1]*c+n[1]*l+r[1]*f+o[1]*h,t[2]=e[2]*c+n[2]*l+r[2]*f+o[2]*h,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:a,cross:I,crossAndNormalize:function(t,e,n){const r=e[0],o=e[1],i=e[2],a=n[0],s=n[1],u=n[2],c=o*u-i*s,l=i*a-r*u,f=r*s-o*a,h=Math.sqrt(c*c+l*l+f*f);return t[0]=c/h,t[1]=l/h,t[2]=f/h,t},direction:q,dist:V,distance:w,div:P,divide:f,dot:U,equals:F,exactEquals:E,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,o,i){const a=i*i,s=a*(2*i-3)+1,u=a*(i-2)+i,c=a*(i-1),l=a*(3-2*i);return t[0]=e[0]*s+n[0]*u+r[0]*c+o[0]*l,t[1]=e[1]*s+n[1]*u+r[1]*c+o[1]*l,t[2]=e[2]*s+n[2]*u+r[2]*c+o[2]*l,t},inverse:A,len:j,length:i,lerp:k,max:b,min:g,mul:N,multiply:l,negate:v,normalize:C,random:function(t,e=1){const n=o.Ov,r=2*n()*Math.PI,i=2*n()-1,a=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=i*e,t},rotateX:function(t,e,n,r){const o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},rotateY:function(t,e,n,r){const o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},rotateZ:function(t,e,n,r){const o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:m,scaleAndAdd:y,set:s,sign:d,sqrDist:D,sqrLen:R,squaredDistance:p,squaredLength:M,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:L,subtract:c,transformMat3:O,transformMat4:_,transformQuat:T,transformQuatValues:S},Symbol.toStringTag,{value:"Module"}))},27921(t,e,n){n.d(e,{$Q:()=>M,C:()=>s,Cr:()=>l,O_:()=>c,Qj:()=>u,T7:()=>w,Tj:()=>p,lU:()=>f,mN:()=>v,vE:()=>A,vt:()=>a});var r=n(34727),o=n(35522),i=n(51850);function a(t=C){return[t[0],t[1],t[2],t[3]]}function s(t,e){return function(t,e,n,r,o=a()){return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o}(e[0],e[1],e[2],e[3],t)}function u(t){return t}function c(t,e,n){const r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],o=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function l(t,e,n,r=a()){const o=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],u=t[0]-e[0],c=t[1]-e[1],l=t[2]-e[2],f=i*l-s*c,h=s*u-o*l,d=o*c-i*u,g=f*f+h*h+d*d,b=Math.abs(g-1)>1e-5&&g>1e-12?1/Math.sqrt(g):1;return r[0]=f*b,r[1]=h*b,r[2]=d*b,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function f(t,e,n,r=0,i=Math.floor(n*(1/3)),a=Math.floor(n*(2/3))){if(n<3)return!1;e(d,r);let s=i,u=!1;for(;s<n-1&&!u;)e(g,s),s++,u=!(0,o.t2)(d,g);if(!u)return!1;for(s=Math.max(s,a),u=!1;s<n&&!u;)e(b,s),s++,(0,o.Re)(m,d,g),(0,o.S8)(m,m),(0,o.Re)(y,g,b),(0,o.S8)(y,y),u=!(0,o.t2)(d,b)&&!(0,o.t2)(g,b)&&Math.abs((0,o.Om)(m,y))<h;return u?(l(d,g,b,t),!0):(0!==r||1!==i||2!==a)&&f(t,e,n,0,1,2)}n(78955),n(44280),n(32114),n(32728);const h=.99619469809,d=(0,i.vt)(),g=(0,i.vt)(),b=(0,i.vt)(),m=(0,i.vt)(),y=(0,i.vt)();function w(t,e,n){return function(t){return 0===t||1===t}(A(t,e.origin,e.vector,0,n))}function p(t,e){return v(t,e)>=0}function M(t,e){const n=(0,o.Om)(t,e.ray.direction),r=-v(t,e.ray.origin);if(r<0&&n>=0)return!1;if(n>-1e-6&&n<1e-6)return r>0;if((r<0||n<0)&&!(r<0&&n<0))return!0;const i=r/n;return n>0?i<e.c1&&(e.c1=i):i>e.c0&&(e.c0=i),e.c0<=e.c1}function v(t,e){return(0,o.Om)(t,e)+t[3]}function A(t,e,n,i,a){const s=(0,o.Om)(t,n),u=v(t,e);if(0===s)return u>=0?2:3;let c=-u/s;return 1&i&&(c=(0,r.qE)(c,0,1)),!(4&i)&&c<0||!(8&i)&&c>1?u>=0?2:3:((0,o.WQ)(a,e,(0,o.hs)(a,n,c)),u>=0?0:1)}const C=[0,0,1,0]},44280(t,e,n){n.d(e,{g7:()=>s,gr:()=>a});var r=n(34727),o=n(35522),i=n(51850);function a(t,e){return(0,o.Om)(t,e)/(0,o.Bw)(t)}function s(t,e){const n=(0,o.Om)(t,e)/((0,o.Bw)(t)*(0,o.Bw)(e));return-(0,r.XM)(n)}(0,i.vt)(),(0,i.vt)()},32114(t,e,n){n.d(e,{Rc:()=>d,J8:()=>g,rq:()=>f,Km:()=>h}),n(44208);var r=n(26390),o=n(29242),i=n(9093),a=n(82534),s=n(48163),u=n(51850),c=n(91829);class l{constructor(t){this._create=t,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new l(s.vt)}static createVec3f64(){return new l(u.vt)}static createVec4f64(){return new l(c.vt)}static createMat3f64(){return new l(o.vt)}static createMat4f64(){return new l(i.vt)}static createQuatf64(){return new l(a.vt)}get test(){}}l.createVec2f64();const f=l.createVec3f64(),h=l.createVec4f64(),d=(l.createMat3f64(),l.createMat4f64()),g=l.createQuatf64()},59418(t,e,n){n.d(e,{wH:()=>b,MA:()=>h,E5:()=>d,m0:()=>y});var r=n(49186),o=n(4718),i=n(53966),a=n(34275),s=n(37203);const u=()=>i.A.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function c(t,e,n){let o="",i=0;for(;i<n;){const a=t[e+i];if(a<128)o+=String.fromCharCode(a),i++;else if(a>=192&&a<224){if(i+1>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const s=(31&a)<<6|63&t[e+i+1];o+=String.fromCharCode(s),i+=2}else if(a>=224&&a<240){if(i+2>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(15&a)<<12|(63&t[e+i+1])<<6|63&t[e+i+2];o+=String.fromCharCode(s),i+=3}else{if(!(a>=240&&a<248))throw new r.A("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(7&a)<<18|(63&t[e+i+1])<<12|(63&t[e+i+2])<<6|63&t[e+i+3];if(s>=65536){const t=55296+(s-65536>>10),e=56320+(1023&s);o+=String.fromCharCode(t,e)}else o+=String.fromCharCode(s);i+=4}}}return o}function l(t,e){const n={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let o=0;o<e.length;o++){const i=e[o],a=i.valueType||i.type,s=p[a];n.fields[i.property]=s(t,r),r+=w[a].BYTES_PER_ELEMENT}return n.byteCount=r,n}function f(t,e,n){const o=[];let i,a,s=0;for(a=0;a<t;a+=1){if(i=e[a],i>0){if(o.push(c(n,s,i-1)),0!==n[s+i-1])throw new r.A("string-array-error","Invalid string array: missing null termination.")}else o.push(null);s+=i}return o}function h(t,e){return new(0,w[e.valueType])(t,e.byteOffset,e.count*e.valuesPerElement)}function d(t,e){if(!t)return null;const n=t[e];return(0,a.IY)(t)?n===a.PI?null:n:(0,a._G)(t)?n===a.h2?null:n:n!=n?null:n}function g(t,e,n){if(e!==t&&u().error(`Invalid ${n} buffer size\n expected: ${t}, actual: ${e})`),e<t)throw new r.A("buffer-too-small","Binary buffer is too small",{expectedSize:t,actualSize:e})}function b(t,e){const n=l(t,e&&e.header);let r=n.byteCount;const o={isDraco:!1,header:n,byteOffset:n.byteCount,byteCount:0,vertexAttributes:{}},i=n.fields,a=null!=i.vertexCount?i.vertexCount:i.count;for(const t of e.ordering){if(!e.vertexAttributes[t])continue;const n={...e.vertexAttributes[t],byteOffset:r,count:a},i=m[t]||"_"+t;o.vertexAttributes[i]=n,r+=v(n.valueType)*n.valuesPerElement*a}const s=i.faceCount;if(e.faces&&s){o.faces={};for(const t of e.ordering){if(!e.faces[t])continue;const n={...e.faces[t],byteOffset:r,count:s};o.faces[t]=n,r+=v(n.valueType)*n.valuesPerElement*s}}const u=i.featureCount;if(e.featureAttributes&&e.featureAttributeOrder&&u){o.featureAttributes={};for(const t of e.featureAttributeOrder){if(!e.featureAttributes[t])continue;const n={...e.featureAttributes[t],byteOffset:r,count:u};o.featureAttributes[t]=n,r+=("UInt64"===n.valueType?8:v(n.valueType))*n.valuesPerElement*u}}return g(r,t.byteLength,"geometry"),o.byteCount=r-o.byteOffset,o}const m={position:"position",normal:"normal",color:"color",uv0:"uv0",region:"uvRegion"};function y(t,e,n,i=!1){if("lepcc-rgb"===t.encoding)return i?(0,s.mb)(e):function(t){return Array.isArray(t)?t.length<a.y9?t:new Uint8Array(t):t.length<a.y9?Array.from(t):t}((0,s.mb)(e));if("lepcc-intensity"===t.encoding)return i?(0,s.Ax)(e):function(t){return Array.isArray(t)?t.length<a.y9?t:new Uint16Array(t):t.length<a.y9?Array.from(t):t}((0,s.Ax)(e));if(null!=t.encoding&&""!==t.encoding)throw new r.A("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");t["attributeByteCounts "]&&!t.attributeByteCounts&&(u().warn("Warning: Trailing space in 'attributeByteCounts '."),t.attributeByteCounts=t["attributeByteCounts "]),"ObjectIds"===t.ordering[0]&&t.hasOwnProperty("objectIds")&&(u().warn("Warning: Case error in objectIds"),t.ordering[0]="objectIds");const c=function(t,e,n){const i=null!=e.header?l(t,e.header):{byteOffset:0,byteCount:0,fields:{count:n}},a={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let s=i.byteCount;for(let t=0;t<e.ordering.length;t++){const n=e.ordering[t],u=(0,o.o8)(e[n]);if(u.count=i.fields.count??0,"String"===u.valueType){if(u.byteOffset=s,u.byteCount=i.fields[n+"ByteCount"],"UTF-8"!==u.encoding)throw new r.A("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new r.A("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!M(u.valueType))throw new r.A("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const t=v(u.valueType);s+=s%t!==0?t-s%t:0,u.byteOffset=s,u.byteCount=t*u.valuesPerElement*u.count}}s+=u.byteCount??0,a.entries[n]=u}return a.byteCount=s-a.byteOffset,a}(e,t,n);g(c.byteOffset+c.byteCount,e.byteLength,"attribute");const b=c.entries.attributeValues||c.entries.objectIds;if(b){if("String"===b.valueType){const t=c.entries.attributeByteCounts,n=h(e,t),r=function(t,e){return new Uint8Array(t,e.byteOffset,e.byteCount)}(e,b);return b.timeEncoding?function(t,e,n){return f(t,e,n).map(t=>{const e=t?Date.parse(t):null;return null==e||Number.isNaN(e)?null:e})}(t.count,n,r):f(t.count,n,r)}return i?h(e,b):function(t,e){const n=h(t,e);if(n.length>=a.y9)return n;const r=new Array;return n.forEach((t,e)=>r.push(d(n,e))),r}(e,b)}throw new r.A("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const w={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},p={Float32:(t,e)=>new DataView(t,0).getFloat32(e,!0),Float64:(t,e)=>new DataView(t,0).getFloat64(e,!0),UInt8:(t,e)=>new DataView(t,0).getUint8(e),Int8:(t,e)=>new DataView(t,0).getInt8(e),UInt16:(t,e)=>new DataView(t,0).getUint16(e,!0),Int16:(t,e)=>new DataView(t,0).getInt16(e,!0),UInt32:(t,e)=>new DataView(t,0).getUint32(e,!0),Int32:(t,e)=>new DataView(t,0).getInt32(e,!0)};function M(t){return w.hasOwnProperty(t)}function v(t){return M(t)?w[t].BYTES_PER_ELEMENT:0}},37203(t,e,n){n.d(e,{Ax:()=>d,Me:()=>s,mb:()=>f});var r=n(49186);const o=!0;function i(t,e,n){return{identifier:String.fromCharCode.apply(null,new Uint8Array(t,n+0,10)),version:e.getUint16(n+10,o),checksum:e.getUint32(n+12,o)}}function a(t,e){return{sizeLo:t.getUint32(e+0,o),sizeHi:t.getUint32(e+4,o),minX:t.getFloat64(e+8,o),minY:t.getFloat64(e+16,o),minZ:t.getFloat64(e+24,o),maxX:t.getFloat64(e+32,o),maxY:t.getFloat64(e+40,o),maxZ:t.getFloat64(e+48,o),errorX:t.getFloat64(e+56,o),errorY:t.getFloat64(e+64,o),errorZ:t.getFloat64(e+72,o),count:t.getUint32(e+80,o),reserved:t.getUint32(e+84,o)}}function s(t){const e=new DataView(t,0);let n=0;const{identifier:o,version:s}=i(t,e,n);if(n+=16,"LEPCC "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(s>1)throw new r.A("lepcc-decode-error","Unknown version");const c=a(e,n);if(n+=88,c.sizeHi*2**32+c.sizeLo!==t.byteLength)throw new r.A("lepcc-decode-error","Bad size");const l=new Float64Array(3*c.count),f=[],h=[],d=[],g=[];if(n=u(t,n,f),n=u(t,n,h),n=u(t,n,d),n=u(t,n,g),n!==t.byteLength)throw new r.A("lepcc-decode-error","Bad length");let b=0,m=0;for(let t=0;t<f.length;t++){m+=f[t];let e=0;for(let n=0;n<h[t];n++){e+=d[b];const t=g[b];l[3*b]=Math.min(c.maxX,c.minX+2*c.errorX*e),l[3*b+1]=Math.min(c.maxY,c.minY+2*c.errorY*m),l[3*b+2]=Math.min(c.maxZ,c.minZ+2*c.errorZ*t),b++}}return{errorX:c.errorX,errorY:c.errorY,errorZ:c.errorZ,result:l}}function u(t,e,n){const r=[];e=c(t,e,r);const o=[];for(let i=0;i<r.length;i++){o.length=0,e=c(t,e,o);for(let t=0;t<o.length;t++)n.push(o[t]+r[i])}return e}function c(t,e,n){const i=new DataView(t,e),a=i.getUint8(0),s=31&a,u=!!(32&a),c=(192&a)>>6;let l=0;if(0===c)l=i.getUint32(1,o),e+=5;else if(1===c)l=i.getUint16(1,o),e+=3;else{if(2!==c)throw new r.A("lepcc-decode-error","Bad count type");l=i.getUint8(1),e+=2}if(u)throw new r.A("lepcc-decode-error","LUT not implemented");const f=Math.ceil(l*s/8),h=new Uint8Array(t,e,f);let d=0,g=0,b=0;const m=-1>>>32-s;for(let t=0;t<l;t++){for(;g<s;)d|=h[b]<<g,g+=8,b+=1;n[t]=d&m,d>>>=s,g-=s,g+s>32&&(d|=h[b-1]>>8-g)}return e+b}function l(t,e){return{sizeLo:t.getUint32(e+0,o),sizeHi:t.getUint32(e+4,o),count:t.getUint32(e+8,o),colorMapCount:t.getUint16(e+12,o),lookupMethod:t.getUint8(e+14),compressionMethod:t.getUint8(e+15)}}function f(t){const e=new DataView(t,0);let n=0;const{identifier:o,version:a}=i(t,e,n);if(n+=16,"ClusterRGB"!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(a>1)throw new r.A("lepcc-decode-error","Unknown version");const s=l(e,n);if(n+=16,s.sizeHi*2**32+s.sizeLo!==t.byteLength)throw new r.A("lepcc-decode-error","Bad size");if((2===s.lookupMethod||1===s.lookupMethod)&&0===s.compressionMethod){if(3*s.colorMapCount+s.count+n!==t.byteLength||s.colorMapCount>256)throw new r.A("lepcc-decode-error","Bad count");const e=new Uint8Array(t,n,3*s.colorMapCount),o=new Uint8Array(t,n+3*s.colorMapCount,s.count),i=new Uint8Array(3*s.count);for(let t=0;t<s.count;t++){const n=o[t];i[3*t]=e[3*n],i[3*t+1]=e[3*n+1],i[3*t+2]=e[3*n+2]}return i}if(0===s.lookupMethod&&0===s.compressionMethod){if(3*s.count+n!==t.byteLength||0!==s.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");return new Uint8Array(t,n).slice()}if(s.lookupMethod<=2&&1===s.compressionMethod){if(n+3!==t.byteLength||1!==s.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");const o=e.getUint8(n),i=e.getUint8(n+1),a=e.getUint8(n+2),u=new Uint8Array(3*s.count);for(let t=0;t<s.count;t++)u[3*t]=o,u[3*t+1]=i,u[3*t+2]=a;return u}throw new r.A("lepcc-decode-error","Bad method "+s.lookupMethod+","+s.compressionMethod)}function h(t,e){return{sizeLo:t.getUint32(e+0,o),sizeHi:t.getUint32(e+4,o),count:t.getUint32(e+8,o),scaleFactor:t.getUint16(e+12,o),bitsPerPoint:t.getUint8(e+14),reserved:t.getUint8(e+15)}}function d(t){const e=new DataView(t,0);let n=0;const{identifier:o,version:a}=i(t,e,n);if(n+=16,"Intensity "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(a>1)throw new r.A("lepcc-decode-error","Unknown version");const s=h(e,n);if(n+=16,s.sizeHi*2**32+s.sizeLo!==t.byteLength)throw new r.A("lepcc-decode-error","Bad size");const u=new Uint16Array(s.count);if(8===s.bitsPerPoint){if(s.count+n!==t.byteLength)throw new r.A("lepcc-decode-error","Bad size");const e=new Uint8Array(t,n,s.count);for(let t=0;t<s.count;t++)u[t]=e[t]*s.scaleFactor}else if(16===s.bitsPerPoint){if(2*s.count+n!==t.byteLength)throw new r.A("lepcc-decode-error","Bad size");const e=new Uint16Array(t,n,s.count);for(let t=0;t<s.count;t++)u[t]=e[t]*s.scaleFactor}else{const e=[];if(c(t,n,e)!==t.byteLength)throw new r.A("lepcc-decode-error","Bad size");for(let t=0;t<s.count;t++)u[t]=e[t]*s.scaleFactor}return u}},32728(t,e,n){n.d(e,{YH:()=>s,hG:()=>i,nu:()=>u,wp:()=>a}),n(34727);var r=n(35522),o=n(51850);function i(t){const e=t[0]*t[0]+t[4]*t[4]+t[8]*t[8],n=t[1]*t[1]+t[5]*t[5]+t[9]*t[9],r=t[2]*t[2]+t[6]*t[6]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))}function a(t,e){const n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),o=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,o,i),t}function s(t,e,n){n=n||t;const o=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-o*e[0],t[1]-o*e[1],t[2]-o*e[2]),(0,r.S8)(n,n)}function u(t,e,n,i=(0,o.vt)()){const a=(0,r.Bw)(t),s=(0,r.Bw)(e),u=(0,r.Om)(t,e)/(a*s);if(u<.9999999999999999){const o=Math.acos(u),f=((1-n)*a+n*s)/Math.sin(o),h=f/a*Math.sin((1-n)*o),d=f/s*Math.sin(n*o);return(0,r.hs)(c,t,h),(0,r.hs)(l,e,d),(0,r.WQ)(i,c,l)}return(0,r.Cc)(i,t,e,n)}(0,o.vt)(),(0,o.vt)(),(0,o.vt)();const c=(0,o.vt)(),l=(0,o.vt)()}}]);