@arcgis/core 4.27.0-next.20230515 → 4.27.0-next.20230516

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 (379) hide show
  1. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  2. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  3. package/arcade/functions/string.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/0618fb0058f39ecd363f.js +1 -0
  6. package/assets/esri/core/workers/chunks/62d9d15f0d00a75da42c.js +1 -0
  7. package/assets/esri/core/workers/chunks/93ad67930aa7d4a4b0ac.js +1 -0
  8. package/assets/esri/core/workers/chunks/953407451813f406fdf1.js +1 -0
  9. package/assets/esri/core/workers/chunks/a507135977d83aea4421.js +1 -0
  10. package/assets/esri/core/workers/chunks/b91c155de9a89e4e6971.js +1 -0
  11. package/assets/esri/core/workers/chunks/cbe817e966b57599bafd.js +1 -0
  12. package/assets/esri/core/workers/chunks/d95ca50ca7af4c222036.js +1 -0
  13. package/assets/esri/core/workers/chunks/e1e0b3580e2c3098c9f4.js +1 -0
  14. package/assets/esri/core/workers/chunks/ef141014ed21a7fd1ff3.js.LICENSE.txt +1 -1
  15. package/assets/esri/t9n/common_ar.json +1 -1
  16. package/assets/esri/t9n/common_bg.json +1 -1
  17. package/assets/esri/t9n/common_bs.json +1 -1
  18. package/assets/esri/t9n/common_ca.json +1 -1
  19. package/assets/esri/t9n/common_cs.json +1 -1
  20. package/assets/esri/t9n/common_da.json +1 -1
  21. package/assets/esri/t9n/common_de.json +1 -1
  22. package/assets/esri/t9n/common_el.json +1 -1
  23. package/assets/esri/t9n/common_es.json +1 -1
  24. package/assets/esri/t9n/common_et.json +1 -1
  25. package/assets/esri/t9n/common_fi.json +1 -1
  26. package/assets/esri/t9n/common_fr.json +1 -1
  27. package/assets/esri/t9n/common_he.json +1 -1
  28. package/assets/esri/t9n/common_hr.json +1 -1
  29. package/assets/esri/t9n/common_hu.json +1 -1
  30. package/assets/esri/t9n/common_id.json +1 -1
  31. package/assets/esri/t9n/common_it.json +1 -1
  32. package/assets/esri/t9n/common_ja.json +1 -1
  33. package/assets/esri/t9n/common_ko.json +1 -1
  34. package/assets/esri/t9n/common_lt.json +1 -1
  35. package/assets/esri/t9n/common_lv.json +1 -1
  36. package/assets/esri/t9n/common_nb.json +1 -1
  37. package/assets/esri/t9n/common_nl.json +1 -1
  38. package/assets/esri/t9n/common_pl.json +1 -1
  39. package/assets/esri/t9n/common_pt-BR.json +1 -1
  40. package/assets/esri/t9n/common_pt-PT.json +1 -1
  41. package/assets/esri/t9n/common_ro.json +1 -1
  42. package/assets/esri/t9n/common_ru.json +1 -1
  43. package/assets/esri/t9n/common_sk.json +1 -1
  44. package/assets/esri/t9n/common_sl.json +1 -1
  45. package/assets/esri/t9n/common_sr.json +1 -1
  46. package/assets/esri/t9n/common_sv.json +1 -1
  47. package/assets/esri/t9n/common_th.json +1 -1
  48. package/assets/esri/t9n/common_tr.json +1 -1
  49. package/assets/esri/t9n/common_uk.json +1 -1
  50. package/assets/esri/t9n/common_vi.json +1 -1
  51. package/assets/esri/t9n/common_zh-CN.json +1 -1
  52. package/assets/esri/t9n/common_zh-HK.json +1 -1
  53. package/assets/esri/t9n/common_zh-TW.json +1 -1
  54. package/assets/esri/themes/base/_core.scss +2 -0
  55. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +198 -125
  56. package/assets/esri/themes/base/widgets/_Features.scss +57 -0
  57. package/assets/esri/themes/base/widgets/_Popup.scss +3 -0
  58. package/assets/esri/themes/dark/main.css +1 -1
  59. package/assets/esri/themes/light/main.css +1 -1
  60. package/assets/esri/themes/light/view.css +1 -1
  61. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery.json +1 -1
  62. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_en.json +1 -1
  63. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
  64. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
  65. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
  66. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
  67. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
  68. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
  69. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
  70. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
  71. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
  72. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
  73. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
  74. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
  75. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
  76. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
  77. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
  78. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
  79. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
  80. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
  81. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
  82. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
  83. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
  84. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nb.json +1 -1
  85. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
  86. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
  87. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
  88. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
  89. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
  90. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
  91. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
  92. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
  93. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
  94. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
  95. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
  96. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
  97. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
  98. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
  99. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
  100. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
  101. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
  102. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  103. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  104. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  105. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  106. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  107. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  108. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  109. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  110. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  111. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  112. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  113. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  114. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  115. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  116. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  117. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  118. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  119. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  120. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  121. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  122. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  123. package/assets/esri/widgets/Directions/t9n/Directions_nb.json +1 -1
  124. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  125. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  126. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  127. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  128. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  129. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  130. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  131. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  132. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  133. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  134. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  135. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  136. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  137. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  138. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  139. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  140. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  141. package/assets/esri/widgets/Feature/t9n/Feature_ar.json +1 -1
  142. package/assets/esri/widgets/Feature/t9n/Feature_bg.json +1 -1
  143. package/assets/esri/widgets/Feature/t9n/Feature_bs.json +1 -1
  144. package/assets/esri/widgets/Feature/t9n/Feature_ca.json +1 -1
  145. package/assets/esri/widgets/Feature/t9n/Feature_cs.json +1 -1
  146. package/assets/esri/widgets/Feature/t9n/Feature_da.json +1 -1
  147. package/assets/esri/widgets/Feature/t9n/Feature_de.json +1 -1
  148. package/assets/esri/widgets/Feature/t9n/Feature_el.json +1 -1
  149. package/assets/esri/widgets/Feature/t9n/Feature_es.json +1 -1
  150. package/assets/esri/widgets/Feature/t9n/Feature_et.json +1 -1
  151. package/assets/esri/widgets/Feature/t9n/Feature_fi.json +1 -1
  152. package/assets/esri/widgets/Feature/t9n/Feature_fr.json +1 -1
  153. package/assets/esri/widgets/Feature/t9n/Feature_he.json +1 -1
  154. package/assets/esri/widgets/Feature/t9n/Feature_hr.json +1 -1
  155. package/assets/esri/widgets/Feature/t9n/Feature_hu.json +1 -1
  156. package/assets/esri/widgets/Feature/t9n/Feature_id.json +1 -1
  157. package/assets/esri/widgets/Feature/t9n/Feature_it.json +1 -1
  158. package/assets/esri/widgets/Feature/t9n/Feature_ja.json +1 -1
  159. package/assets/esri/widgets/Feature/t9n/Feature_ko.json +1 -1
  160. package/assets/esri/widgets/Feature/t9n/Feature_lt.json +1 -1
  161. package/assets/esri/widgets/Feature/t9n/Feature_lv.json +1 -1
  162. package/assets/esri/widgets/Feature/t9n/Feature_nb.json +1 -1
  163. package/assets/esri/widgets/Feature/t9n/Feature_nl.json +1 -1
  164. package/assets/esri/widgets/Feature/t9n/Feature_pl.json +1 -1
  165. package/assets/esri/widgets/Feature/t9n/Feature_pt-BR.json +1 -1
  166. package/assets/esri/widgets/Feature/t9n/Feature_pt-PT.json +1 -1
  167. package/assets/esri/widgets/Feature/t9n/Feature_ro.json +1 -1
  168. package/assets/esri/widgets/Feature/t9n/Feature_ru.json +1 -1
  169. package/assets/esri/widgets/Feature/t9n/Feature_sk.json +1 -1
  170. package/assets/esri/widgets/Feature/t9n/Feature_sl.json +1 -1
  171. package/assets/esri/widgets/Feature/t9n/Feature_sr.json +1 -1
  172. package/assets/esri/widgets/Feature/t9n/Feature_sv.json +1 -1
  173. package/assets/esri/widgets/Feature/t9n/Feature_th.json +1 -1
  174. package/assets/esri/widgets/Feature/t9n/Feature_tr.json +1 -1
  175. package/assets/esri/widgets/Feature/t9n/Feature_uk.json +1 -1
  176. package/assets/esri/widgets/Feature/t9n/Feature_vi.json +1 -1
  177. package/assets/esri/widgets/Feature/t9n/Feature_zh-CN.json +1 -1
  178. package/assets/esri/widgets/Feature/t9n/Feature_zh-HK.json +1 -1
  179. package/assets/esri/widgets/Feature/t9n/Feature_zh-TW.json +1 -1
  180. package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
  181. package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
  182. package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
  183. package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
  184. package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
  185. package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
  186. package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
  187. package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
  188. package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
  189. package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
  190. package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
  191. package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
  192. package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
  193. package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
  194. package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
  195. package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
  196. package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
  197. package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
  198. package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
  199. package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
  200. package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
  201. package/assets/esri/widgets/LayerList/t9n/LayerList_nb.json +1 -1
  202. package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
  203. package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
  204. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
  205. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
  206. package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
  207. package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
  208. package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
  209. package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
  210. package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
  211. package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
  212. package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
  213. package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
  214. package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
  215. package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
  216. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
  217. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
  218. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
  219. package/assets/esri/widgets/Slice/t9n/Slice_ar.json +1 -1
  220. package/assets/esri/widgets/Slice/t9n/Slice_bg.json +1 -1
  221. package/assets/esri/widgets/Slice/t9n/Slice_bs.json +1 -1
  222. package/assets/esri/widgets/Slice/t9n/Slice_ca.json +1 -1
  223. package/assets/esri/widgets/Slice/t9n/Slice_cs.json +1 -1
  224. package/assets/esri/widgets/Slice/t9n/Slice_da.json +1 -1
  225. package/assets/esri/widgets/Slice/t9n/Slice_de.json +1 -1
  226. package/assets/esri/widgets/Slice/t9n/Slice_el.json +1 -1
  227. package/assets/esri/widgets/Slice/t9n/Slice_es.json +1 -1
  228. package/assets/esri/widgets/Slice/t9n/Slice_et.json +1 -1
  229. package/assets/esri/widgets/Slice/t9n/Slice_fi.json +1 -1
  230. package/assets/esri/widgets/Slice/t9n/Slice_fr.json +1 -1
  231. package/assets/esri/widgets/Slice/t9n/Slice_he.json +1 -1
  232. package/assets/esri/widgets/Slice/t9n/Slice_hr.json +1 -1
  233. package/assets/esri/widgets/Slice/t9n/Slice_hu.json +1 -1
  234. package/assets/esri/widgets/Slice/t9n/Slice_id.json +1 -1
  235. package/assets/esri/widgets/Slice/t9n/Slice_it.json +1 -1
  236. package/assets/esri/widgets/Slice/t9n/Slice_ja.json +1 -1
  237. package/assets/esri/widgets/Slice/t9n/Slice_ko.json +1 -1
  238. package/assets/esri/widgets/Slice/t9n/Slice_lt.json +1 -1
  239. package/assets/esri/widgets/Slice/t9n/Slice_lv.json +1 -1
  240. package/assets/esri/widgets/Slice/t9n/Slice_nb.json +1 -1
  241. package/assets/esri/widgets/Slice/t9n/Slice_nl.json +1 -1
  242. package/assets/esri/widgets/Slice/t9n/Slice_pl.json +1 -1
  243. package/assets/esri/widgets/Slice/t9n/Slice_pt-BR.json +1 -1
  244. package/assets/esri/widgets/Slice/t9n/Slice_pt-PT.json +1 -1
  245. package/assets/esri/widgets/Slice/t9n/Slice_ro.json +1 -1
  246. package/assets/esri/widgets/Slice/t9n/Slice_ru.json +1 -1
  247. package/assets/esri/widgets/Slice/t9n/Slice_sk.json +1 -1
  248. package/assets/esri/widgets/Slice/t9n/Slice_sl.json +1 -1
  249. package/assets/esri/widgets/Slice/t9n/Slice_sr.json +1 -1
  250. package/assets/esri/widgets/Slice/t9n/Slice_sv.json +1 -1
  251. package/assets/esri/widgets/Slice/t9n/Slice_th.json +1 -1
  252. package/assets/esri/widgets/Slice/t9n/Slice_tr.json +1 -1
  253. package/assets/esri/widgets/Slice/t9n/Slice_uk.json +1 -1
  254. package/assets/esri/widgets/Slice/t9n/Slice_vi.json +1 -1
  255. package/assets/esri/widgets/Slice/t9n/Slice_zh-CN.json +1 -1
  256. package/assets/esri/widgets/Slice/t9n/Slice_zh-HK.json +1 -1
  257. package/assets/esri/widgets/Slice/t9n/Slice_zh-TW.json +1 -1
  258. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
  259. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
  260. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
  261. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
  262. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
  263. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
  264. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
  265. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
  266. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
  267. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
  268. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
  269. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
  270. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
  271. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
  272. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
  273. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
  274. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
  275. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
  276. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
  277. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
  278. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
  279. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
  280. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
  281. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
  282. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
  283. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
  284. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
  285. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
  286. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
  287. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
  288. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
  289. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
  290. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
  291. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
  292. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
  293. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
  294. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
  295. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
  296. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
  297. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ar.json +1 -1
  298. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_bg.json +1 -1
  299. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_bs.json +1 -1
  300. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ca.json +1 -1
  301. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_cs.json +1 -1
  302. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_da.json +1 -1
  303. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_de.json +1 -1
  304. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_el.json +1 -1
  305. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_es.json +1 -1
  306. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_et.json +1 -1
  307. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_fi.json +1 -1
  308. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_fr.json +1 -1
  309. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_he.json +1 -1
  310. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_hr.json +1 -1
  311. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_hu.json +1 -1
  312. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_id.json +1 -1
  313. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_it.json +1 -1
  314. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ja.json +1 -1
  315. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ko.json +1 -1
  316. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_lt.json +1 -1
  317. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_lv.json +1 -1
  318. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_nb.json +1 -1
  319. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_nl.json +1 -1
  320. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_pl.json +1 -1
  321. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_pt-BR.json +1 -1
  322. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_pt-PT.json +1 -1
  323. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ro.json +1 -1
  324. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ru.json +1 -1
  325. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_sk.json +1 -1
  326. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_sl.json +1 -1
  327. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_sr.json +1 -1
  328. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_sv.json +1 -1
  329. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_th.json +1 -1
  330. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_tr.json +1 -1
  331. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_uk.json +1 -1
  332. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_vi.json +1 -1
  333. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_zh-CN.json +1 -1
  334. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_zh-HK.json +1 -1
  335. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_zh-TW.json +1 -1
  336. package/chunks/languageUtils.js +1 -1
  337. package/core/ReactiveMap.js +5 -0
  338. package/core/ReactiveSet.js +5 -0
  339. package/geometry/support/meshUtils/External.js +1 -1
  340. package/interfaces.d.ts +86 -54
  341. package/layers/SceneLayer.js +1 -1
  342. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  343. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  344. package/layers/video/VideoEngine.js +1 -1
  345. package/package.json +2 -2
  346. package/support/basemapUtils.js +1 -1
  347. package/support/revision.js +1 -1
  348. package/symbols/cim/cimAnalyzer.js +1 -1
  349. package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
  350. package/views/2d/engine/webgl/brushes/WGLGeometryBrushFill.js +1 -1
  351. package/views/2d/engine/webgl/definitions.js +1 -1
  352. package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
  353. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  354. package/views/2d/engine/webgl/painter/RenderPass.js +1 -1
  355. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  356. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  357. package/views/2d/layers/MediaLayerView2D.js +1 -1
  358. package/views/2d/layers/TileLayerView2D.js +1 -1
  359. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  360. package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
  361. package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
  362. package/views/PopupView.js +1 -1
  363. package/widgets/BasemapGallery/css.js +1 -1
  364. package/widgets/BasemapGallery.js +1 -1
  365. package/widgets/Feature/FeatureRelationship.js +1 -1
  366. package/widgets/Features/FeaturesViewModel.js +5 -0
  367. package/widgets/Features.js +5 -0
  368. package/widgets/Popup/actionUtils.js +1 -1
  369. package/widgets/Popup/actions.js +1 -1
  370. package/widgets/Popup.js +1 -1
  371. package/assets/esri/core/workers/chunks/08e1453cc3689a0094a6.js +0 -1
  372. package/assets/esri/core/workers/chunks/47f721daa1652124c066.js +0 -1
  373. package/assets/esri/core/workers/chunks/544dce9710638d126763.js +0 -1
  374. package/assets/esri/core/workers/chunks/630b3fca46208caf4190.js +0 -1
  375. package/assets/esri/core/workers/chunks/7e9b173a71beeba8b263.js +0 -1
  376. package/assets/esri/core/workers/chunks/b636581516f2e7342d29.js +0 -1
  377. package/assets/esri/core/workers/chunks/e7e7f6046cf1286365ca.js +0 -1
  378. package/assets/esri/core/workers/chunks/f17a7024dd49abeaa4f3.js +0 -1
  379. package/assets/esri/core/workers/chunks/f32836ee63bc55ea4338.js +0 -1
package/interfaces.d.ts CHANGED
@@ -22070,9 +22070,6 @@ declare namespace __esri {
22070
22070
  | "long"
22071
22071
  | "string"
22072
22072
  | "date"
22073
- | "date-only"
22074
- | "time-only"
22075
- | "timestamp-offset"
22076
22073
  | "oid"
22077
22074
  | "geometry"
22078
22075
  | "blob"
@@ -22189,9 +22186,6 @@ declare namespace __esri {
22189
22186
  | "long"
22190
22187
  | "string"
22191
22188
  | "date"
22192
- | "date-only"
22193
- | "time-only"
22194
- | "timestamp-offset"
22195
22189
  | "oid"
22196
22190
  | "geometry"
22197
22191
  | "blob"
@@ -46139,11 +46133,29 @@ declare namespace __esri {
46139
46133
  }
46140
46134
 
46141
46135
  /**
46142
- * to-doc
46136
+ * Find [places](/documentation/mapping-apis-and-services/places/) within a search distance of a geographic point or within an extent, or find more information about specific places.
46143
46137
  *
46144
46138
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html)
46145
46139
  */
46146
46140
  interface places {
46141
+ /**
46142
+ * Get place details, including name, address, description, and other attributes.
46143
+ *
46144
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#fetchPlace)
46145
+ */
46146
+ fetchPlace(params: FetchPlaceParameters, requestOptions?: any): Promise<any>;
46147
+ /**
46148
+ * A nearby search that finds places within a given radius of a location.
46149
+ *
46150
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#queryPlacesNearPoint)
46151
+ */
46152
+ queryPlacesNearPoint(params: PlacesQueryParameters, requestOptions?: any): Promise<PlacesQueryResult>;
46153
+ /**
46154
+ * A search that finds places within a given extent.
46155
+ *
46156
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#queryPlacesWithinExtent)
46157
+ */
46158
+ queryPlacesWithinExtent(params: PlacesQueryParameters, requestOptions?: any): Promise<PlacesQueryResult>;
46147
46159
  }
46148
46160
 
46149
46161
  export const places: places;
@@ -48986,19 +48998,19 @@ declare namespace __esri {
48986
48998
 
48987
48999
  export class FetchPlaceParameters extends PlacesParameters {
48988
49000
  /**
48989
- * to-doc valud required
49001
+ * The Id of the place that you want to fetch additional details.
48990
49002
  *
48991
49003
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FetchPlaceParameters.html#placeId)
48992
49004
  */
48993
49005
  placeId: string;
48994
49006
  /**
48995
- * to-doc value required
49007
+ * The array of fields that define the attributes to return for a place.
48996
49008
  *
48997
49009
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FetchPlaceParameters.html#requestedFields)
48998
49010
  */
48999
49011
  requestedFields: string[];
49000
49012
  /**
49001
- * to-doc
49013
+ * The following properties define the parameters for the [fetchPlace()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#fetchPlace) method pointing to a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FetchPlaceParameters.html#url) that represents a places service.
49002
49014
  *
49003
49015
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FetchPlaceParameters.html)
49004
49016
  */
@@ -49010,13 +49022,13 @@ declare namespace __esri {
49010
49022
 
49011
49023
  interface FetchPlaceParametersProperties extends PlacesParametersProperties {
49012
49024
  /**
49013
- * to-doc valud required
49025
+ * The Id of the place that you want to fetch additional details.
49014
49026
  *
49015
49027
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FetchPlaceParameters.html#placeId)
49016
49028
  */
49017
49029
  placeId?: string;
49018
49030
  /**
49019
- * to-doc value required
49031
+ * The array of fields that define the attributes to return for a place.
49020
49032
  *
49021
49033
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FetchPlaceParameters.html#requestedFields)
49022
49034
  */
@@ -51952,37 +51964,37 @@ declare namespace __esri {
51952
51964
 
51953
51965
  export class PlaceResult extends Accessor {
51954
51966
  /**
51955
- * to-doc
51967
+ * An arrary of category objects for a place.
51956
51968
  *
51957
51969
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#categories)
51958
51970
  */
51959
- categories: any;
51971
+ categories: Category[];
51960
51972
  /**
51961
- * to-doc only set/valid/used when returned from `queryPlacesNearPoint`
51973
+ * The distance, in meters, from the place to the search point.
51962
51974
  *
51963
51975
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#distance)
51964
51976
  */
51965
51977
  distance: number;
51966
51978
  /**
51967
- * to-doc
51979
+ * A location defined by X and Y coordinates in WGS84.
51968
51980
  *
51969
51981
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#location)
51970
51982
  */
51971
51983
  location: Point;
51972
51984
  /**
51973
- * to-doc
51985
+ * The name of the place, or point of interest.
51974
51986
  *
51975
51987
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#name)
51976
51988
  */
51977
51989
  name: string;
51978
51990
  /**
51979
- * to-doc
51991
+ * The unique Id of this place.
51980
51992
  *
51981
51993
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#placeId)
51982
51994
  */
51983
51995
  placeId: string;
51984
51996
  /**
51985
- * to-doc
51997
+ * The `PlaceResult` object includes a single place that satisfies the search and either: the distance from the [search point](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#point) in meters, or falls within the [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#extent) of the search.
51986
51998
  *
51987
51999
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html)
51988
52000
  */
@@ -51994,46 +52006,66 @@ declare namespace __esri {
51994
52006
 
51995
52007
  interface PlaceResultProperties {
51996
52008
  /**
51997
- * to-doc
52009
+ * An arrary of category objects for a place.
51998
52010
  *
51999
52011
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#categories)
52000
52012
  */
52001
- categories?: any;
52013
+ categories?: Category[];
52002
52014
  /**
52003
- * to-doc only set/valid/used when returned from `queryPlacesNearPoint`
52015
+ * The distance, in meters, from the place to the search point.
52004
52016
  *
52005
52017
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#distance)
52006
52018
  */
52007
52019
  distance?: number;
52008
52020
  /**
52009
- * to-doc
52021
+ * A location defined by X and Y coordinates in WGS84.
52010
52022
  *
52011
52023
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#location)
52012
52024
  */
52013
52025
  location?: PointProperties;
52014
52026
  /**
52015
- * to-doc
52027
+ * The name of the place, or point of interest.
52016
52028
  *
52017
52029
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#name)
52018
52030
  */
52019
52031
  name?: string;
52020
52032
  /**
52021
- * to-doc
52033
+ * The unique Id of this place.
52022
52034
  *
52023
52035
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#placeId)
52024
52036
  */
52025
52037
  placeId?: string;
52026
52038
  }
52027
52039
 
52040
+ /**
52041
+ * Each category object has a categoryId and a label.
52042
+ *
52043
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#Category)
52044
+ */
52045
+ export interface Category {
52046
+ /**
52047
+ * The Id of the category of the place.
52048
+ *
52049
+ * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlaceResult.html#Category)
52050
+ */
52051
+ categoryId: number;
52052
+ /**
52053
+ * The name of the the category.
52054
+ *
52055
+ * [Read more...](global.html)
52056
+ */
52057
+ label: string;
52058
+ }
52059
+
52028
52060
  export class PlacesParameters extends Accessor {
52029
52061
  /**
52030
- * to-doc
52062
+ * An authorization string used to access a resource or service.
52031
52063
  *
52032
52064
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesParameters.html#apiKey)
52033
52065
  */
52034
52066
  apiKey: string;
52035
52067
  /**
52036
- * to-doc
52068
+ * URL to the places service.
52037
52069
  *
52038
52070
  * @default "https://places-api.arcgis.com/arcgis/rest/services/places-service/v1"
52039
52071
  *
@@ -52041,7 +52073,7 @@ declare namespace __esri {
52041
52073
  */
52042
52074
  url: string;
52043
52075
  /**
52044
- * to-doc
52076
+ * The following properties define common properties for use with [places](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html).
52045
52077
  *
52046
52078
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesParameters.html)
52047
52079
  */
@@ -52053,13 +52085,13 @@ declare namespace __esri {
52053
52085
 
52054
52086
  interface PlacesParametersProperties {
52055
52087
  /**
52056
- * to-doc
52088
+ * An authorization string used to access a resource or service.
52057
52089
  *
52058
52090
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesParameters.html#apiKey)
52059
52091
  */
52060
52092
  apiKey?: string;
52061
52093
  /**
52062
- * to-doc
52094
+ * URL to the places service.
52063
52095
  *
52064
52096
  * @default "https://places-api.arcgis.com/arcgis/rest/services/places-service/v1"
52065
52097
  *
@@ -52070,19 +52102,19 @@ declare namespace __esri {
52070
52102
 
52071
52103
  export class PlacesQueryParameters extends PlacesParameters {
52072
52104
  /**
52073
- * to-doc
52105
+ * Filters places to those that match the category Ids.
52074
52106
  *
52075
52107
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#categoryIds)
52076
52108
  */
52077
52109
  categoryIds: string[];
52078
52110
  /**
52079
- * to-doc required when calling `places.queryPlacesWithinExtent`
52111
+ * The extent of the bounding box to be searched inside.
52080
52112
  *
52081
52113
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#extent)
52082
52114
  */
52083
52115
  extent: Extent;
52084
52116
  /**
52085
- * to-doc
52117
+ * Request results starting from the given offset.
52086
52118
  *
52087
52119
  * @default 0
52088
52120
  *
@@ -52090,7 +52122,7 @@ declare namespace __esri {
52090
52122
  */
52091
52123
  offset: number;
52092
52124
  /**
52093
- * to-doc
52125
+ * The number of places that should be sent in the response for a single request.
52094
52126
  *
52095
52127
  * @default 10
52096
52128
  *
@@ -52098,13 +52130,13 @@ declare namespace __esri {
52098
52130
  */
52099
52131
  pageSize: number;
52100
52132
  /**
52101
- * to-doc required when calling `places.queryPlacesNearPoint`
52133
+ * A location defined by X and Y coordinates.
52102
52134
  *
52103
52135
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#point)
52104
52136
  */
52105
52137
  point: Point;
52106
52138
  /**
52107
- * to-doc only used when calling `places.queryPlacesNearPoint`
52139
+ * The radius in meters to search for places, measured from the supplied [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#point).
52108
52140
  *
52109
52141
  * @default 1000
52110
52142
  *
@@ -52112,13 +52144,13 @@ declare namespace __esri {
52112
52144
  */
52113
52145
  radius: number;
52114
52146
  /**
52115
- * to-doc
52147
+ * Free search text for places against names, categories, etc.
52116
52148
  *
52117
52149
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#searchText)
52118
52150
  */
52119
52151
  searchText: string;
52120
52152
  /**
52121
- * to-doc
52153
+ * The following properties define the parameters for the [queryPlacesNearPoint()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#queryPlacesNearPoint) and [queryPlacesWithinExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#queryPlacesWithinExtent) methods pointing to a [url](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#url) that represents a places service.
52122
52154
  *
52123
52155
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html)
52124
52156
  */
@@ -52136,19 +52168,19 @@ declare namespace __esri {
52136
52168
 
52137
52169
  interface PlacesQueryParametersProperties extends PlacesParametersProperties {
52138
52170
  /**
52139
- * to-doc
52171
+ * Filters places to those that match the category Ids.
52140
52172
  *
52141
52173
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#categoryIds)
52142
52174
  */
52143
52175
  categoryIds?: string[];
52144
52176
  /**
52145
- * to-doc required when calling `places.queryPlacesWithinExtent`
52177
+ * The extent of the bounding box to be searched inside.
52146
52178
  *
52147
52179
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#extent)
52148
52180
  */
52149
52181
  extent?: ExtentProperties;
52150
52182
  /**
52151
- * to-doc
52183
+ * Request results starting from the given offset.
52152
52184
  *
52153
52185
  * @default 0
52154
52186
  *
@@ -52156,7 +52188,7 @@ declare namespace __esri {
52156
52188
  */
52157
52189
  offset?: number;
52158
52190
  /**
52159
- * to-doc
52191
+ * The number of places that should be sent in the response for a single request.
52160
52192
  *
52161
52193
  * @default 10
52162
52194
  *
@@ -52164,13 +52196,13 @@ declare namespace __esri {
52164
52196
  */
52165
52197
  pageSize?: number;
52166
52198
  /**
52167
- * to-doc required when calling `places.queryPlacesNearPoint`
52199
+ * A location defined by X and Y coordinates.
52168
52200
  *
52169
52201
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#point)
52170
52202
  */
52171
52203
  point?: PointProperties;
52172
52204
  /**
52173
- * to-doc only used when calling `places.queryPlacesNearPoint`
52205
+ * The radius in meters to search for places, measured from the supplied [point](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#point).
52174
52206
  *
52175
52207
  * @default 1000
52176
52208
  *
@@ -52178,7 +52210,7 @@ declare namespace __esri {
52178
52210
  */
52179
52211
  radius?: number;
52180
52212
  /**
52181
- * to-doc
52213
+ * Free search text for places against names, categories, etc.
52182
52214
  *
52183
52215
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryParameters.html#searchText)
52184
52216
  */
@@ -52187,31 +52219,31 @@ declare namespace __esri {
52187
52219
 
52188
52220
  export class PlacesQueryResult extends Accessor {
52189
52221
  /**
52190
- * to-doc
52222
+ * Property indicating whether the query resulted in more than **200** places.
52191
52223
  *
52192
52224
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryResult.html#maxResultsExceeded)
52193
52225
  */
52194
52226
  maxResultsExceeded: boolean;
52195
52227
  /**
52196
- * to-doc
52228
+ * The query parameters for the next set of results.
52197
52229
  *
52198
52230
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryResult.html#nextQueryParams)
52199
52231
  */
52200
52232
  nextQueryParams: PlacesQueryParameters;
52201
52233
  /**
52202
- * to-doc
52234
+ * The query parameters for the previous set of results.
52203
52235
  *
52204
52236
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryResult.html#previousQueryParams)
52205
52237
  */
52206
52238
  previousQueryParams: PlacesQueryParameters;
52207
52239
  /**
52208
- * to-doc
52240
+ * An array of results from searching for places using the [queryPlacesNearPoint()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#queryPlacesNearPoint) and [queryPlacesWithinExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#queryPlacesWithinExtent) methods.
52209
52241
  *
52210
52242
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryResult.html#results)
52211
52243
  */
52212
52244
  results: PlaceResult[];
52213
52245
  /**
52214
- * to-doc
52246
+ * The `PlacesQueryResult` object includes the results from the [queryPlacesNearPoint()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#queryPlacesNearPoint) and [queryPlacesWithinExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#queryPlacesWithinExtent) methods.
52215
52247
  *
52216
52248
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryResult.html)
52217
52249
  */
@@ -52223,25 +52255,25 @@ declare namespace __esri {
52223
52255
 
52224
52256
  interface PlacesQueryResultProperties {
52225
52257
  /**
52226
- * to-doc
52258
+ * Property indicating whether the query resulted in more than **200** places.
52227
52259
  *
52228
52260
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryResult.html#maxResultsExceeded)
52229
52261
  */
52230
52262
  maxResultsExceeded?: boolean;
52231
52263
  /**
52232
- * to-doc
52264
+ * The query parameters for the next set of results.
52233
52265
  *
52234
52266
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryResult.html#nextQueryParams)
52235
52267
  */
52236
52268
  nextQueryParams?: PlacesQueryParametersProperties;
52237
52269
  /**
52238
- * to-doc
52270
+ * The query parameters for the previous set of results.
52239
52271
  *
52240
52272
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryResult.html#previousQueryParams)
52241
52273
  */
52242
52274
  previousQueryParams?: PlacesQueryParametersProperties;
52243
52275
  /**
52244
- * to-doc
52276
+ * An array of results from searching for places using the [queryPlacesNearPoint()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#queryPlacesNearPoint) and [queryPlacesWithinExtent()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-places.html#queryPlacesWithinExtent) methods.
52245
52277
  *
52246
52278
  * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-PlacesQueryResult.html#results)
52247
52279
  */
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as o}from"../renderers/support/types.js";import i from"../request.js";import{ClonableMixin as s}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import p from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as c}from"../core/urlUtils.js";import{property as f}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{getProperties as h}from"../core/accessorSupport/utils.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as v}from"../core/accessorSupport/PropertyOrigin.js";import b from"./Layer.js";import{APIKeyMixin as I}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{EditBusLayer as j}from"./mixins/EditBusLayer.js";import{OperationalLayer as L}from"./mixins/OperationalLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as O,SaveOperationType as _}from"./mixins/SceneService.js";import{zeroCapabilities as T}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as A,legendEnabled as P,popupEnabled as x,screenSizePerspectiveEnabled as D}from"./support/commonProperties.js";import{FeatureReduction as U}from"./support/FeatureReduction.js";import R from"./support/FeatureReductionSelection.js";import{FetchAssociatedFeatureLayer as q}from"./support/FetchAssociatedFeatureLayer.js";import{defineFieldProperties as Q}from"./support/fieldProperties.js";import C from"./support/FieldsIndex.js";import{fixRendererFields as N,unpackFieldNames as G}from"./support/fieldUtils.js";import{I3SNodePageDefinition as k,I3SMaterialDefinition as V,I3STextureSetDefinition as K,I3SGeometryDefinition as M}from"./support/I3SLayerDefinitions.js";import $ from"./support/LabelClass.js";import{reader as W}from"./support/labelingInfo.js";import z from"./support/LayerFloorInfo.js";import{RangeInfo as B}from"./support/RangeInfo.js";import H from"./support/SceneFilter.js";import{loadStyleRenderer as Z}from"../renderers/support/styleUtils.js";import J from"../rest/support/Query.js";import{sceneLayerEditingEnabled as X}from"../support/featureFlags.js";import{createPopupTemplate as Y}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as ee}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as te,getFetchPopupTemplate as re}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as oe}from"../webdoc/support/opacityUtils.js";const ie=["3DObject","Point"],se=Q();let ae=class extends(j(O(w(L(F(S(l(I(s(b)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new C(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:k.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get geometryType(){return pe[this.profile]||"mesh"}set renderer(e){N(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){const e=this.associatedLayer?.capabilities??T,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:o,supportsUploadWithItemId:i,supportsGeometryUpdate:s,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:n,supportsM:p,isVersioned:l,supportsAttachment:d},operations:{supportsEditing:y,supportsAdd:u,supportsUpdate:c,supportsDelete:f,supportsQuery:h,supportsQueryAttachments:m}}=e,g=e.operations.supportsChangeTracking,v=!!this.associatedLayer?.infoFor3D&&X();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:o,supportsGeometryUpdate:v&&s,supportsUploadWithItemId:i},data:{supportsAttachment:d,supportsZ:n,supportsM:p,isVersioned:l},operations:{supportsQuery:h,supportsQueryAttachments:m,supportsEditing:y&&g,supportsAdd:v&&u&&g,supportsDelete:v&&f&&g,supportsUpdate:c&&g}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&ne[r]?ne[r]:(p.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>Z(this,{origin:"service"},t))).then((()=>N(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&await this.load()}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){p.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new J;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryCachedAttributes(e,t){const r=G(this.fieldsIndex,await te(this,re(this)));return ee(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const o=await this.queryCachedAttributes(e,[r]);if(!o||0===o.length)throw new n("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new t;return i.attributes=o[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(p.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return Y(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new n("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new n("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const o of this.statisticsInfo)if(o.name===r.name){const e=c(this.parsedUrl.path,o.href);return i(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new n("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(_.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(_.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");if(await this.load(),!this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!ie.includes(e.layerType))throw new n("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new n("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new n("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,o=!1;if(null==e)r=!0,o=!0;else{const i=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,o=i;break;case"vertex-reference-frame":r=!0,o=!i;break;default:r=!1}}if(!r)throw new n("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!o)throw new n("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new n("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),o={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=o}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=h(this);for(let r=0;r<e.length;r++){const o=e[r],i=this.originIdOf(o),s=this.associatedLayer.originIdOf(o);i<s&&(s===v.SERVICE||s===v.PORTAL_ITEM)&&t.setAtOrigin(o,this.associatedLayer[o],s)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new q(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(r){y(r)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?p.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):p.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;e&&("mesh-pyramids"===this.profile&&"relative-to-scene"===e.mode&&p.getLogger(this).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&p.getLogger(this).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};e([f({types:{key:"type",base:U,typeMap:{selection:R}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ae.prototype,"featureReduction",void 0),e([f({type:[B],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ae.prototype,"rangeInfos",void 0),e([f({json:{read:!1}})],ae.prototype,"associatedLayer",void 0),e([f({type:["show","hide"]})],ae.prototype,"listMode",void 0),e([f({type:["ArcGISSceneServiceLayer"]})],ae.prototype,"operationalLayerType",void 0),e([f({json:{read:!1},readOnly:!0})],ae.prototype,"type",void 0),e([f({...se.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"fields",void 0),e([f()],ae.prototype,"types",null),e([f()],ae.prototype,"typeIdField",null),e([f()],ae.prototype,"templates",null),e([f()],ae.prototype,"formTemplate",null),e([f({readOnly:!0})],ae.prototype,"fieldsIndex",null),e([f({type:z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ae.prototype,"floorInfo",void 0),e([f(se.outFields)],ae.prototype,"outFields",void 0),e([f({type:k,readOnly:!0,json:{read:!1}})],ae.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],ae.prototype,"readNodePages",null),e([f({type:[V],readOnly:!0})],ae.prototype,"materialDefinitions",void 0),e([f({type:[K],readOnly:!0})],ae.prototype,"textureSetDefinitions",void 0),e([f({type:[M],readOnly:!0})],ae.prototype,"geometryDefinitions",void 0),e([f({readOnly:!0})],ae.prototype,"serviceUpdateTimeStamp",void 0),e([f({readOnly:!0})],ae.prototype,"attributeStorageInfo",void 0),e([f({readOnly:!0})],ae.prototype,"statisticsInfo",void 0),e([f({type:a.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ae.prototype,"excludeObjectIds",void 0),e([f({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ae.prototype,"definitionExpression",void 0),e([f({type:H,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ae.prototype,"filter",void 0),e([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ae.prototype,"path",void 0),e([f(E)],ae.prototype,"elevationInfo",null),e([f({type:String})],ae.prototype,"geometryType",null),e([f(A)],ae.prototype,"labelsVisible",void 0),e([f({type:[$],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:W},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W},write:!0}})],ae.prototype,"labelingInfo",void 0),e([f(P)],ae.prototype,"legendEnabled",void 0),e([f({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?oe(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ae.prototype,"opacity",void 0),e([f({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"priority",void 0),e([f({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"semantic",void 0),e([f({types:o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ae.prototype,"renderer",null),e([f({json:{read:!1}})],ae.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],ae.prototype,"readCachedDrawingInfo",null),e([f({readOnly:!0,json:{read:!1}})],ae.prototype,"capabilities",null),e([f({type:Boolean,json:{read:!1}})],ae.prototype,"editingEnabled",null),e([f({readOnly:!0,json:{write:!1,read:!1}})],ae.prototype,"infoFor3D",null),e([f(x)],ae.prototype,"popupEnabled",void 0),e([f({type:r,json:{name:"popupInfo",write:!0}})],ae.prototype,"popupTemplate",void 0),e([f({readOnly:!0,json:{read:!1}})],ae.prototype,"defaultPopupTemplate",null),e([f({type:String,json:{read:!1}})],ae.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],ae.prototype,"readObjectIdField",null),e([f({type:String,json:{read:!1}})],ae.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],ae.prototype,"readGlobalIdField",null),e([f({readOnly:!0,type:String,json:{read:!1}})],ae.prototype,"displayField",null),e([f({type:String,json:{read:!1}})],ae.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],ae.prototype,"readProfile",null),e([f({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ae.prototype,"normalReferenceFrame",void 0),e([f(D)],ae.prototype,"screenSizePerspectiveEnabled",void 0),ae=e([g("esri.layers.SceneLayer")],ae);const ne={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},pe={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},le=ae;export{le as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Graphic.js";import r from"../PopupTemplate.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/PieChartRenderer.js";import"../renderers/Renderer.js";import"../renderers/SimpleRenderer.js";import"../renderers/UniqueValueRenderer.js";import"../renderers/support/jsonUtils.js";import{webSceneRendererTypes as i}from"../renderers/support/types.js";import o from"../request.js";import{ClonableMixin as s}from"../core/Clonable.js";import a from"../core/Collection.js";import n from"../core/Error.js";import p from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as d,isAbortError as y}from"../core/promiseUtils.js";import{whenOnce as u}from"../core/reactiveUtils.js";import{join as c}from"../core/urlUtils.js";import{property as f}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import"../core/arrayUtils.js";import"../core/has.js";import{getProperties as h}from"../core/accessorSupport/utils.js";import{reader as m}from"../core/accessorSupport/decorators/reader.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{OriginId as v}from"../core/accessorSupport/PropertyOrigin.js";import b from"./Layer.js";import{APIKeyMixin as I}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{EditBusLayer as j}from"./mixins/EditBusLayer.js";import{OperationalLayer as L}from"./mixins/OperationalLayer.js";import{PortalLayer as F}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as S}from"./mixins/ScaleRangeLayer.js";import{SceneService as O,SaveOperationType as _}from"./mixins/SceneService.js";import{zeroCapabilities as T}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as A,legendEnabled as P,popupEnabled as x,screenSizePerspectiveEnabled as D}from"./support/commonProperties.js";import{FeatureReduction as U}from"./support/FeatureReduction.js";import R from"./support/FeatureReductionSelection.js";import{FetchAssociatedFeatureLayer as q}from"./support/FetchAssociatedFeatureLayer.js";import{defineFieldProperties as Q}from"./support/fieldProperties.js";import C from"./support/FieldsIndex.js";import{fixRendererFields as N,unpackFieldNames as G}from"./support/fieldUtils.js";import{I3SNodePageDefinition as k,I3SMaterialDefinition as V,I3STextureSetDefinition as K,I3SGeometryDefinition as M}from"./support/I3SLayerDefinitions.js";import $ from"./support/LabelClass.js";import{reader as W}from"./support/labelingInfo.js";import z from"./support/LayerFloorInfo.js";import{RangeInfo as B}from"./support/RangeInfo.js";import H from"./support/SceneFilter.js";import{loadStyleRenderer as Z}from"../renderers/support/styleUtils.js";import J from"../rest/support/Query.js";import{sceneLayerEditingEnabled as X}from"../support/featureFlags.js";import{createPopupTemplate as Y}from"../support/popupUtils.js";import{queryAttributesFromCachedAttributesId as ee}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as te,getFetchPopupTemplate as re}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as ie}from"../webdoc/support/opacityUtils.js";const oe=["3DObject","Point"],se=Q();let ae=class extends(j(O(w(L(F(S(l(I(s(b)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new a,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new C(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:k.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get geometryType(){return pe[this.profile]||"mesh"}set renderer(e){N(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){const e=this.associatedLayer?.capabilities??T,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:i,supportsUploadWithItemId:o,supportsGeometryUpdate:s,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:n,supportsM:p,isVersioned:l,supportsAttachment:d},operations:{supportsEditing:y,supportsAdd:u,supportsUpdate:c,supportsDelete:f,supportsQuery:h,supportsQueryAttachments:m}}=e,g=e.operations.supportsChangeTracking,v=!!this.associatedLayer?.infoFor3D&&X();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:i,supportsGeometryUpdate:v&&s,supportsUploadWithItemId:o},data:{supportsAttachment:d,supportsZ:n,supportsM:p,isVersioned:l},operations:{supportsQuery:h,supportsQueryAttachments:m,supportsEditing:y&&g,supportsAdd:v&&u&&g,supportsDelete:v&&f&&g,supportsUpdate:c&&g}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&ne[r]?ne[r]:(p.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>Z(this,{origin:"service"},t))).then((()=>N(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){p.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new J;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryCachedAttributes(e,t){const r=G(this.fieldsIndex,await te(this,re(this)));return ee(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,r){const i=await this.queryCachedAttributes(e,[r]);if(!i||0===i.length)throw new n("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const o=new t;return o.attributes=i[0],o.layer=this,o.sourceLayer=this,o}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(p.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return Y(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new n("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new n("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new n("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new n("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const i of this.statisticsInfo)if(i.name===r.name){const e=c(this.parsedUrl.path,i.href);return o(e,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new n("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(_.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(_.SAVE,e)}async applyEdits(e,t){const{applyEdits:r}=await import("./graphics/editingSupport.js");if(await this.load(),!this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),r(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new n(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!oe.includes(e.layerType))throw new n("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new n("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new n("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});function t(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const o=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=o;break;case"vertex-reference-frame":r=!0,i=!o;break;default:r=!1}}if(!r)throw new n("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new n("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}t(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new n("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=h(this);for(let r=0;r<e.length;r++){const i=e[r],o=this.originIdOf(i),s=this.associatedLayer.originIdOf(i);o<s&&(s===v.SERVICE||s===v.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],s)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new q(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(r){y(r)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await u((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?p.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):p.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;e&&("mesh-pyramids"===this.profile&&"relative-to-scene"===e.mode&&p.getLogger(this).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&p.getLogger(this).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};e([f({types:{key:"type",base:U,typeMap:{selection:R}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ae.prototype,"featureReduction",void 0),e([f({type:[B],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ae.prototype,"rangeInfos",void 0),e([f({json:{read:!1}})],ae.prototype,"associatedLayer",void 0),e([f({type:["show","hide"]})],ae.prototype,"listMode",void 0),e([f({type:["ArcGISSceneServiceLayer"]})],ae.prototype,"operationalLayerType",void 0),e([f({json:{read:!1},readOnly:!0})],ae.prototype,"type",void 0),e([f({...se.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"fields",void 0),e([f()],ae.prototype,"types",null),e([f()],ae.prototype,"typeIdField",null),e([f()],ae.prototype,"templates",null),e([f()],ae.prototype,"formTemplate",null),e([f({readOnly:!0})],ae.prototype,"fieldsIndex",null),e([f({type:z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ae.prototype,"floorInfo",void 0),e([f(se.outFields)],ae.prototype,"outFields",void 0),e([f({type:k,readOnly:!0,json:{read:!1}})],ae.prototype,"nodePages",void 0),e([m("service","nodePages",["nodePages","pointNodePages"])],ae.prototype,"readNodePages",null),e([f({type:[V],readOnly:!0})],ae.prototype,"materialDefinitions",void 0),e([f({type:[K],readOnly:!0})],ae.prototype,"textureSetDefinitions",void 0),e([f({type:[M],readOnly:!0})],ae.prototype,"geometryDefinitions",void 0),e([f({readOnly:!0})],ae.prototype,"serviceUpdateTimeStamp",void 0),e([f({readOnly:!0})],ae.prototype,"attributeStorageInfo",void 0),e([f({readOnly:!0})],ae.prototype,"statisticsInfo",void 0),e([f({type:a.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ae.prototype,"excludeObjectIds",void 0),e([f({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ae.prototype,"definitionExpression",void 0),e([f({type:H,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ae.prototype,"filter",void 0),e([f({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ae.prototype,"path",void 0),e([f(E)],ae.prototype,"elevationInfo",null),e([f({type:String})],ae.prototype,"geometryType",null),e([f(A)],ae.prototype,"labelsVisible",void 0),e([f({type:[$],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:W},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W},write:!0}})],ae.prototype,"labelingInfo",void 0),e([f(P)],ae.prototype,"legendEnabled",void 0),e([f({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?ie(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ae.prototype,"opacity",void 0),e([f({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"priority",void 0),e([f({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ae.prototype,"semantic",void 0),e([f({types:i,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ae.prototype,"renderer",null),e([f({json:{read:!1}})],ae.prototype,"cachedDrawingInfo",void 0),e([m("service","cachedDrawingInfo")],ae.prototype,"readCachedDrawingInfo",null),e([f({readOnly:!0,json:{read:!1}})],ae.prototype,"capabilities",null),e([f({type:Boolean,json:{read:!1}})],ae.prototype,"editingEnabled",null),e([f({readOnly:!0,json:{write:!1,read:!1}})],ae.prototype,"infoFor3D",null),e([f(x)],ae.prototype,"popupEnabled",void 0),e([f({type:r,json:{name:"popupInfo",write:!0}})],ae.prototype,"popupTemplate",void 0),e([f({readOnly:!0,json:{read:!1}})],ae.prototype,"defaultPopupTemplate",null),e([f({type:String,json:{read:!1}})],ae.prototype,"objectIdField",void 0),e([m("service","objectIdField",["objectIdField","fields"])],ae.prototype,"readObjectIdField",null),e([f({type:String,json:{read:!1}})],ae.prototype,"globalIdField",void 0),e([m("service","globalIdField",["globalIdField","fields"])],ae.prototype,"readGlobalIdField",null),e([f({readOnly:!0,type:String,json:{read:!1}})],ae.prototype,"displayField",null),e([f({type:String,json:{read:!1}})],ae.prototype,"profile",void 0),e([m("service","profile",["store.profile"])],ae.prototype,"readProfile",null),e([f({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ae.prototype,"normalReferenceFrame",void 0),e([f(D)],ae.prototype,"screenSizePerspectiveEnabled",void 0),ae=e([g("esri.layers.SceneLayer")],ae);const ne={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},pe={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},le=ae;export{le as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import t from"../../../Graphic.js";import{id as s}from"../../../kernel.js";import r from"../../../request.js";import a from"../../../TimeExtent.js";import{isSome as i}from"../../../core/arrayUtils.js";import o from"../../../core/Error.js";import has from"../../../core/has.js";import{JSONMap as n}from"../../../core/jsonMap.js";import u from"../../../core/Loadable.js";import l from"../../../core/Logger.js";import{setDeepValue as d}from"../../../core/object.js";import{debounce as c,after as p}from"../../../core/promiseUtils.js";import{join as h,parseData as y}from"../../../core/urlUtils.js";import{generateBracedUUID as m}from"../../../core/uuid.js";import{property as g}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as f}from"../../../core/accessorSupport/decorators/subclass.js";import R from"../../../geometry/Extent.js";import{initializeProjection as b,project as F}from"../../../geometry/projection.js";import{fromJSON as S}from"../../../geometry/support/jsonUtils.js";import{isFeatureIdentifierArrayWithGlobalId as E,isFeatureIdentifierArrayWithObjectId as q}from"../editingSupport.js";import{createDrawingInfo as w}from"./support/clientSideDefaults.js";import _ from"./support/QueryTask.js";import{isHostedAgolService as O}from"../../support/arcgisLayerUrl.js";import{getAssetMapTable as I}from"../../support/infoFor3D.js";import{executeQueryJSON as A}from"../../../rest/query/executeQueryJSON.js";import{unapplyEditsZUnitScaling as j}from"../../../rest/query/operations/editsZScale.js";import T from"../../../rest/support/Query.js";import x from"../../../geometry/SpatialReference.js";const N=new n({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),J=new Set(["Feature Layer","Table"]),v=new n({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let k=class extends u{constructor(){super(...arguments),this.type="feature-layer",this.refresh=c((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=null!=e?e.signal:null,s=this.layer.sourceJSON;return this.addResolvingPromise(this._fetchService(s,t)),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:s,infoFor3D:r,gdbVersion:a,spatialReference:i,fieldsIndex:o}=this.layer,n=has("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==r,u=e?.operations?.supportsQueryAttachments??!1;return new _({url:t.path,pbfSupported:n,fieldsIndex:o,infoFor3D:r,dynamicDataSource:s,gdbVersion:a,sourceSpatialReference:i,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const s=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+s+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{const e=await r(a,{body:o});return this._createFeatureEditResult(e.data.addAttachmentResult)}catch(n){throw this._createAttachmentErrorResult(s,n)}}async updateAttachment(e,t,s){await this.load();const a=e.attributes[this.layer.objectIdField],i=this.layer.parsedUrl.path+"/"+a+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),n=this._getFormDataForAttachment(s,o.query);try{const e=await r(i,{body:n});return this._createFeatureEditResult(e.data.updateAttachmentResult)}catch(u){throw this._createAttachmentErrorResult(a,u)}}async applyEdits(e,t){await this.load();const{layer:a}=this,o=a.infoFor3D,n=null!=o,u=n||(t?.globalIdUsed??!1),l=e.addFeatures?.map((e=>this._getFeatureJSON(e,o)))??[],d=(await Promise.all(l)).filter(i),c=e.updateFeatures?.map((e=>this._getFeatureJSON(e,o)))??[],p=(await Promise.all(c)).filter(i),h=this._getFeatureIds(e.deleteFeatures,u);j(d,p,a.spatialReference);const y=await this._getAttachmentEditsJSON(e),m=n?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,g=a.capabilities.editing.supportsAsyncApplyEdits&&null!=m&&(0!==m.adds.length||0!==m.updates.length),f={gdbVersion:t?.gdbVersion||a.gdbVersion,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,sessionId:t?.sessionId,async:g};t?.returnServiceEditsOption?(f.edits=JSON.stringify([{id:a.layerId,adds:d,updates:p,deletes:h,attachments:y,assetMaps:m}]),f.returnServiceEditsOption=N.toJSON(t?.returnServiceEditsOption),f.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(f.adds=d.length?JSON.stringify(d):null,f.updates=p.length?JSON.stringify(p):null,f.deletes=h.length?u?JSON.stringify(h):h.join(","):null,f.attachments=y&&JSON.stringify(y),f.assetMaps=null!=m?JSON.stringify(m):void 0);const R=this._getLayerRequestOptions({method:"post",query:f}),b=t?.returnServiceEditsOption?a.url:a.parsedUrl.path,F=g?await this._asyncApplyEdits(b+"/applyEdits",R):await r(b+"/applyEdits",R);if(!a.capabilities.operations?.supportsEditing&&a.effectiveCapabilities?.operations?.supportsEditing){const e=s?.findCredential(a.url);await(e?.refreshToken())}return this._createEditsResult(F)}async deleteAttachments(e,t){await this.load();const s=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await r(a,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(i){throw this._createAttachmentErrorResult(s,i)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:s,url:i}=this.layer,{data:o}=await r(`${i}/${s}`,t),{id:n,extent:u,fullExtent:l,timeExtent:d}=o,c=u||l;return{id:n,fullExtent:c&&R.fromJSON(c),timeExtent:d&&a.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const s=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,s)}async queryFeatures(e,t){return await this.load(),this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!O(this.layer.url))return"unavailable";const e=h(this.layer.url,"status"),t=await r(e,{query:{f:"json"}});return v.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:s}=await import("./support/uploadAssets.js");return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const s=(await r(e,t)).data.statusUrl;for(;;){const e=(await r(s,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return r(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await p(M)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const{data:s}=await r(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:has("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:t}));e=s}this.sourceJSON=this._patchServiceJSON(e);const s=e.type;if(!J.has(s))throw new o("feature-layer-source:unsupported-type",`Source type "${s}" is not supported`)}_patchServiceJSON(e){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=w(e.geometryType).renderer;d("drawingInfo.renderer",t,e)}return"esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),e}async _getFeatureJSON(e,t){const{geometry:s}=e,r={...e.attributes};if(null!=t&&null!=e.geometry&&"mesh"===e.geometry.type){const{transformFieldRoles:s}=t,{origin:a,spatialReference:i,transform:o}=e.geometry,n=this.layer.spatialReference;await b(i,n);const u=F(a,n);if(r[s.originX]=u.x,r[s.originY]=u.y,r[s.originZ]=u.z,null!=o){const{translation:e,scale:t,rotation:a}=o;r[s.translationX]=e[0],r[s.translationY]=-e[2],r[s.translationZ]=e[1],r[s.scaleX]=t[0],r[s.scaleY]=t[1],r[s.scaleZ]=t[2],r[s.rotationX]=a[0],r[s.rotationY]=a[2],r[s.rotationZ]=a[1],r[s.rotationDeg]=a[3]}return{geometry:null,attributes:r}}return null==s?{attributes:r}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:r}}async _getAttachmentEditsJSON(e){const t=await Promise.all((e.addAttachments??[]).map((e=>this._getAttachmentEditJSON(e)))),s=await Promise.all((e.updateAttachments??[]).map((e=>this._getAttachmentEditJSON(e)))),r=e.deleteAttachments??[];return t.length||s.length||r.length?{adds:t,updates:s,deletes:[...r]}:null}async _getAttachmentEditJSON(e){const{feature:t,attachment:s}=e,{globalId:r,name:a,contentType:i,data:o,uploadId:n}=s,u={globalId:r,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(t&&(u.parentGlobalId="attributes"in t?t.attributes&&t.attributes[this.layer.globalIdField]:t.globalId),n)u.uploadId=n;else if(o){const e=await y(o);e&&(u.contentType=e.mediaType,u.data=e.data),o instanceof File&&(u.name=o.name)}return a&&(u.name=a),i&&(u.contentType=i),u}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const s=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const r=s.map((e=>e.geometry));return await this.uploadAssets(r),{adds:this._getAssetMapEditsJSON(s),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,s=this.layer.globalIdField,r=this.layer.parsedUrl,a=(e,s,r)=>{1===e.parts.length?t.push({globalId:m(),parentGlobalId:s,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:r}):l.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)};for(const i of e){const e=i.geometry,{metadata:t}=e,o=t.getExternalSourcesOnService(r),n=i.getAttribute(s);if(0===o.length){l.getLogger(this).error(`Skipping feature ${n}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=o[0],{transform:d}=e,c=!d||!d.geographic?["PROJECT_VERTICES"]:[];u.forEach((e=>a(e,n,c)))}return t}_getFeatureIds(e,t){if(!e||0===e.length)return[];if(t&&E(e))return e.map((e=>e.globalId));if(q(e))return e.map((e=>e.objectId));const{layer:s}=this,r=t?s.globalIdField:s.objectIdField;return r?e.map((e=>e.getAttribute(r))):[]}_createEditsResult(e){const t=e.data,{layerId:s}=this.layer,r=[];let a=null;if(Array.isArray(t))for(const u of t)r.push({id:u.id,editedFeatures:u.editedFeatures}),u.id===s&&(a={addResults:u.addResults??[],updateResults:u.updateResults??[],deleteResults:u.deleteResults??[],attachments:u.attachments,editMoment:u.editMoment});else a=t;const i=a?.assetMaps;if(i){for(const e of i.addResults)e.success||l.getLogger(this).error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of i.updateResults)e.success||l.getLogger(this).error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const o=a?.attachments,n={addFeatureResults:a?.addResults?.map(this._createFeatureEditResult,this)??[],updateFeatureResults:a?.updateResults?.map(this._createFeatureEditResult,this)??[],deleteFeatureResults:a?.deleteResults?.map(this._createFeatureEditResult,this)??[],addAttachmentResults:o&&o.addResults?o.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:o&&o.updateResults?o.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:o&&o.deleteResults?o.deleteResults.map(this._createFeatureEditResult,this):[]};if(a?.editMoment&&(n.editMoment=a.editMoment),r.length>0){n.editedFeatureResults=[];for(const e of r){const{editedFeatures:t}=e,s=t?.spatialReference?new x(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:{adds:t?.adds?.map((e=>this._createEditedFeature(e,s)))||[],updates:t?.updates?.map((e=>({original:this._createEditedFeature(e[0],s),current:this._createEditedFeature(e[1],s)})))||[],deletes:t?.deletes?.map((e=>this._createEditedFeature(e,s)))||[],spatialReference:s}})}}return n}_createEditedFeature(e,s){return new t({attributes:e.attributes,geometry:S({...e.geometry,spatialReference:s})})}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new o("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_createAttachmentErrorResult(e,t){const s=t.details.messages&&t.details.messages[0]||t.message,r=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new o("feature-layer-source:attachment-failure",s,{code:r})}}_getFormDataForAttachment(e,t){const s=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(s)for(const r in t){const e=t[r];null!=e&&(s.set?s.set(r,e):s.append(r,e))}return s}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:s,dynamicDataSource:r}=this.layer;return{...e,query:{gdbVersion:s,layer:r?JSON.stringify({source:r}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:s,infoFor3D:r,parsedUrl:a}=t;if(null==r||null==s)return e;const o=I(r);if(null==o)return e;const n=h(a.path,`../${o.id}`),u=e.map((e=>e.getAttribute(s))).filter(i);if(0===u.length)return e;const{assetMapFieldRoles:{parentGlobalId:l,assetHash:d}}=r,c=new T;c.where=`${l} IN (${u.map((e=>`'${e}'`))})`,c.outFields=[d,l],c.returnGeometry=!1;const p=await A(n,c),{features:y}=p;return 0===y.length?e:e.filter((e=>{const t=e.getAttribute(s);if(!t)return!0;const{metadata:r}=e.geometry,i=y.filter((e=>e.getAttribute(l)===t));if(0===i.length)return!0;const o=i.map((e=>e.getAttribute(d)));return r.getExternalSourcesOnService(a).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>o.every((t=>e!==t))))}))}};e([g()],k.prototype,"type",void 0),e([g({constructOnly:!0})],k.prototype,"layer",void 0),e([g({readOnly:!0})],k.prototype,"queryTask",null),k=e([f("esri.layers.graphics.sources.FeatureLayerSource")],k);const M=1e3,U=k;export{U as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import t from"../../../Graphic.js";import{id as s}from"../../../kernel.js";import r from"../../../request.js";import a from"../../../TimeExtent.js";import{isSome as i}from"../../../core/arrayUtils.js";import o from"../../../core/Error.js";import has from"../../../core/has.js";import{JSONMap as n}from"../../../core/jsonMap.js";import u from"../../../core/Loadable.js";import l from"../../../core/Logger.js";import{setDeepValue as d}from"../../../core/object.js";import{debounce as c,after as p}from"../../../core/promiseUtils.js";import{join as h,parseData as y}from"../../../core/urlUtils.js";import{generateBracedUUID as m}from"../../../core/uuid.js";import{property as g}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as f}from"../../../core/accessorSupport/decorators/subclass.js";import R from"../../../geometry/Extent.js";import{initializeProjection as b,project as F}from"../../../geometry/projection.js";import{fromJSON as S}from"../../../geometry/support/jsonUtils.js";import{isOriginalExternal as E}from"../../../geometry/support/meshUtils/External.js";import{isFeatureIdentifierArrayWithGlobalId as q,isFeatureIdentifierArrayWithObjectId as w}from"../editingSupport.js";import{createDrawingInfo as _}from"./support/clientSideDefaults.js";import O from"./support/QueryTask.js";import{isHostedAgolService as I}from"../../support/arcgisLayerUrl.js";import{getAssetMapTable as A}from"../../support/infoFor3D.js";import{executeQueryJSON as j}from"../../../rest/query/executeQueryJSON.js";import{unapplyEditsZUnitScaling as T}from"../../../rest/query/operations/editsZScale.js";import x from"../../../rest/support/Query.js";import N from"../../../geometry/SpatialReference.js";const J=new n({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),v=new Set(["Feature Layer","Table"]),k=new n({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let M=class extends u{constructor(){super(...arguments),this.type="feature-layer",this.refresh=c((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=null!=e?e.signal:null,s=this.layer.sourceJSON;return this.addResolvingPromise(this._fetchService(s,t)),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:s,infoFor3D:r,gdbVersion:a,spatialReference:i,fieldsIndex:o}=this.layer,n=has("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==r,u=e?.operations?.supportsQueryAttachments??!1;return new O({url:t.path,pbfSupported:n,fieldsIndex:o,infoFor3D:r,dynamicDataSource:s,gdbVersion:a,sourceSpatialReference:i,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const s=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+s+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{const e=await r(a,{body:o});return this._createFeatureEditResult(e.data.addAttachmentResult)}catch(n){throw this._createAttachmentErrorResult(s,n)}}async updateAttachment(e,t,s){await this.load();const a=e.attributes[this.layer.objectIdField],i=this.layer.parsedUrl.path+"/"+a+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),n=this._getFormDataForAttachment(s,o.query);try{const e=await r(i,{body:n});return this._createFeatureEditResult(e.data.updateAttachmentResult)}catch(u){throw this._createAttachmentErrorResult(a,u)}}async applyEdits(e,t){await this.load();const{layer:a}=this,o=a.infoFor3D,n=null!=o,u=n||(t?.globalIdUsed??!1),l=e.addFeatures?.map((e=>this._getFeatureJSON(e,o)))??[],d=(await Promise.all(l)).filter(i),c=e.updateFeatures?.map((e=>this._getFeatureJSON(e,o)))??[],p=(await Promise.all(c)).filter(i),h=this._getFeatureIds(e.deleteFeatures,u);T(d,p,a.spatialReference);const y=await this._getAttachmentEditsJSON(e),m=n?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,g=a.capabilities.editing.supportsAsyncApplyEdits&&null!=m&&(0!==m.adds.length||0!==m.updates.length),f={gdbVersion:t?.gdbVersion||a.gdbVersion,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,sessionId:t?.sessionId,async:g};t?.returnServiceEditsOption?(f.edits=JSON.stringify([{id:a.layerId,adds:d,updates:p,deletes:h,attachments:y,assetMaps:m}]),f.returnServiceEditsOption=J.toJSON(t?.returnServiceEditsOption),f.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(f.adds=d.length?JSON.stringify(d):null,f.updates=p.length?JSON.stringify(p):null,f.deletes=h.length?u?JSON.stringify(h):h.join(","):null,f.attachments=y&&JSON.stringify(y),f.assetMaps=null!=m?JSON.stringify(m):void 0);const R=this._getLayerRequestOptions({method:"post",query:f}),b=t?.returnServiceEditsOption?a.url:a.parsedUrl.path,F=g?await this._asyncApplyEdits(b+"/applyEdits",R):await r(b+"/applyEdits",R);if(!a.capabilities.operations?.supportsEditing&&a.effectiveCapabilities?.operations?.supportsEditing){const e=s?.findCredential(a.url);await(e?.refreshToken())}return this._createEditsResult(F)}async deleteAttachments(e,t){await this.load();const s=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await r(a,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(i){throw this._createAttachmentErrorResult(s,i)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:s,url:i}=this.layer,{data:o}=await r(`${i}/${s}`,t),{id:n,extent:u,fullExtent:l,timeExtent:d}=o,c=u||l;return{id:n,fullExtent:c&&R.fromJSON(c),timeExtent:d&&a.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const s=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,s)}async queryFeatures(e,t){return await this.load(),this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!I(this.layer.url))return"unavailable";const e=h(this.layer.url,"status"),t=await r(e,{query:{f:"json"}});return k.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:s}=await import("./support/uploadAssets.js");return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const s=(await r(e,t)).data.statusUrl;for(;;){const e=(await r(s,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return r(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await p(U)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const{data:s}=await r(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:has("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:t}));e=s}this.sourceJSON=this._patchServiceJSON(e);const s=e.type;if(!v.has(s))throw new o("feature-layer-source:unsupported-type",`Source type "${s}" is not supported`)}_patchServiceJSON(e){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=_(e.geometryType).renderer;d("drawingInfo.renderer",t,e)}return"esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),e}async _getFeatureJSON(e,t){const{geometry:s}=e,r={...e.attributes};if(null!=t&&null!=e.geometry&&"mesh"===e.geometry.type){const{transformFieldRoles:s}=t,{origin:a,spatialReference:i,transform:o}=e.geometry,n=this.layer.spatialReference;await b(i,n);const u=F(a,n);if(r[s.originX]=u.x,r[s.originY]=u.y,r[s.originZ]=u.z,null!=o){const{translation:e,scale:t,rotation:a}=o;r[s.translationX]=e[0],r[s.translationY]=-e[2],r[s.translationZ]=e[1],r[s.scaleX]=t[0],r[s.scaleY]=t[1],r[s.scaleZ]=t[2],r[s.rotationX]=a[0],r[s.rotationY]=a[2],r[s.rotationZ]=a[1],r[s.rotationDeg]=a[3]}return{geometry:null,attributes:r}}return null==s?{attributes:r}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:r}}async _getAttachmentEditsJSON(e){const t=await Promise.all((e.addAttachments??[]).map((e=>this._getAttachmentEditJSON(e)))),s=await Promise.all((e.updateAttachments??[]).map((e=>this._getAttachmentEditJSON(e)))),r=e.deleteAttachments??[];return t.length||s.length||r.length?{adds:t,updates:s,deletes:[...r]}:null}async _getAttachmentEditJSON(e){const{feature:t,attachment:s}=e,{globalId:r,name:a,contentType:i,data:o,uploadId:n}=s,u={globalId:r,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(t&&(u.parentGlobalId="attributes"in t?t.attributes&&t.attributes[this.layer.globalIdField]:t.globalId),n)u.uploadId=n;else if(o){const e=await y(o);e&&(u.contentType=e.mediaType,u.data=e.data),o instanceof File&&(u.name=o.name)}return a&&(u.name=a),i&&(u.contentType=i),u}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const s=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const r=s.map((e=>e.geometry));return await this.uploadAssets(r),{adds:this._getAssetMapEditsJSON(s),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,s=this.layer.globalIdField,r=this.layer.parsedUrl;for(const a of e){const e=a.geometry,{metadata:i}=e,o=i.getExternalSourcesOnService(r),n=a.getAttribute(s);if(0===o.length){l.getLogger(this).error(`Skipping feature ${n}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=o.find(E)??o[0],{transform:d}=e,c=!d||!d.geographic?["PROJECT_VERTICES"]:[];for(const s of u)1===s.parts.length?t.push({globalId:m(),parentGlobalId:n,assetName:s.assetName,assetHash:s.parts[0].partHash,flags:c}):l.getLogger(this).error(`Skipping asset ${s.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_getFeatureIds(e,t){if(!e||0===e.length)return[];if(t&&q(e))return e.map((e=>e.globalId));if(w(e))return e.map((e=>e.objectId));const{layer:s}=this,r=t?s.globalIdField:s.objectIdField;return r?e.map((e=>e.getAttribute(r))):[]}_createEditsResult(e){const t=e.data,{layerId:s}=this.layer,r=[];let a=null;if(Array.isArray(t))for(const u of t)r.push({id:u.id,editedFeatures:u.editedFeatures}),u.id===s&&(a={addResults:u.addResults??[],updateResults:u.updateResults??[],deleteResults:u.deleteResults??[],attachments:u.attachments,editMoment:u.editMoment});else a=t;const i=a?.assetMaps;if(i){for(const e of i.addResults)e.success||l.getLogger(this).error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of i.updateResults)e.success||l.getLogger(this).error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const o=a?.attachments,n={addFeatureResults:a?.addResults?.map(this._createFeatureEditResult,this)??[],updateFeatureResults:a?.updateResults?.map(this._createFeatureEditResult,this)??[],deleteFeatureResults:a?.deleteResults?.map(this._createFeatureEditResult,this)??[],addAttachmentResults:o&&o.addResults?o.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:o&&o.updateResults?o.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:o&&o.deleteResults?o.deleteResults.map(this._createFeatureEditResult,this):[]};if(a?.editMoment&&(n.editMoment=a.editMoment),r.length>0){n.editedFeatureResults=[];for(const e of r){const{editedFeatures:t}=e,s=t?.spatialReference?new N(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:{adds:t?.adds?.map((e=>this._createEditedFeature(e,s)))||[],updates:t?.updates?.map((e=>({original:this._createEditedFeature(e[0],s),current:this._createEditedFeature(e[1],s)})))||[],deletes:t?.deletes?.map((e=>this._createEditedFeature(e,s)))||[],spatialReference:s}})}}return n}_createEditedFeature(e,s){return new t({attributes:e.attributes,geometry:S({...e.geometry,spatialReference:s})})}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new o("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_createAttachmentErrorResult(e,t){const s=t.details.messages&&t.details.messages[0]||t.message,r=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new o("feature-layer-source:attachment-failure",s,{code:r})}}_getFormDataForAttachment(e,t){const s=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(s)for(const r in t){const e=t[r];null!=e&&(s.set?s.set(r,e):s.append(r,e))}return s}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:s,dynamicDataSource:r}=this.layer;return{...e,query:{gdbVersion:s,layer:r?JSON.stringify({source:r}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:s,infoFor3D:r,parsedUrl:a}=t;if(null==r||null==s)return e;const o=A(r);if(null==o)return e;const n=h(a.path,`../${o.id}`),u=e.map((e=>e.getAttribute(s))).filter(i);if(0===u.length)return e;const{assetMapFieldRoles:{parentGlobalId:l,assetHash:d}}=r,c=new x;c.where=`${l} IN (${u.map((e=>`'${e}'`))})`,c.outFields=[d,l],c.returnGeometry=!1;const p=await j(n,c),{features:y}=p;return 0===y.length?e:e.filter((e=>{const t=e.getAttribute(s);if(!t)return!0;const{metadata:r}=e.geometry,i=y.filter((e=>e.getAttribute(l)===t));if(0===i.length)return!0;const o=i.map((e=>e.getAttribute(d)));return r.getExternalSourcesOnService(a).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>o.every((t=>e!==t))))}))}};e([g()],M.prototype,"type",void 0),e([g({constructOnly:!0})],M.prototype,"layer",void 0),e([g({readOnly:!0})],M.prototype,"queryTask",null),M=e([f("esri.layers.graphics.sources.FeatureLayerSource")],M);const U=1e3,Q=M;export{Q as default};