@arcgis/core 4.23.0-next.20220104 → 4.23.0-next.20220119

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 (534) hide show
  1. package/assets/components/assets/calcite-date-picker/nls/bg.json +31 -0
  2. package/assets/components/assets/calcite-icon/centerAlign16.json +1 -0
  3. package/assets/components/assets/calcite-icon/centerAlign24.json +1 -0
  4. package/assets/components/assets/calcite-icon/centerAlign32.json +1 -0
  5. package/assets/components/assets/calcite-icon/checkSquareF16.json +1 -0
  6. package/assets/components/assets/calcite-icon/checkSquareF24.json +1 -0
  7. package/assets/components/assets/calcite-icon/checkSquareF32.json +1 -0
  8. package/assets/components/assets/calcite-icon/convert16.json +1 -0
  9. package/assets/components/assets/calcite-icon/convert24.json +1 -0
  10. package/assets/components/assets/calcite-icon/convert32.json +1 -0
  11. package/assets/components/assets/calcite-icon/explore16.json +1 -0
  12. package/assets/components/assets/calcite-icon/explore24.json +1 -0
  13. package/assets/components/assets/calcite-icon/explore32.json +1 -0
  14. package/assets/components/assets/calcite-icon/formDropdown16.json +1 -0
  15. package/assets/components/assets/calcite-icon/formDropdown24.json +1 -0
  16. package/assets/components/assets/calcite-icon/formDropdown32.json +1 -0
  17. package/assets/components/assets/calcite-icon/language16.json +1 -0
  18. package/assets/components/assets/calcite-icon/language24.json +1 -0
  19. package/assets/components/assets/calcite-icon/language32.json +1 -0
  20. package/assets/components/assets/calcite-icon/languageTranslate16.json +1 -0
  21. package/assets/components/assets/calcite-icon/languageTranslate24.json +1 -0
  22. package/assets/components/assets/calcite-icon/languageTranslate32.json +1 -0
  23. package/assets/components/assets/calcite-icon/leftAlign16.json +1 -0
  24. package/assets/components/assets/calcite-icon/leftAlign24.json +1 -0
  25. package/assets/components/assets/calcite-icon/leftAlign32.json +1 -0
  26. package/assets/components/assets/calcite-icon/lineSolid4.json +1 -0
  27. package/assets/components/assets/calcite-icon/partlyCloudy16.json +1 -0
  28. package/assets/components/assets/calcite-icon/partlyCloudy24.json +1 -0
  29. package/assets/components/assets/calcite-icon/partlyCloudy32.json +1 -0
  30. package/assets/components/assets/calcite-icon/rightAlign16.json +1 -0
  31. package/assets/components/assets/calcite-icon/rightAlign24.json +1 -0
  32. package/assets/components/assets/calcite-icon/rightAlign32.json +1 -0
  33. package/assets/components/assets/calcite-icon/screenshotMode16.json +1 -0
  34. package/assets/components/assets/calcite-icon/screenshotMode24.json +1 -0
  35. package/assets/components/assets/calcite-icon/screenshotMode32.json +1 -0
  36. package/assets/components/assets/calcite-icon/squareF16.json +1 -0
  37. package/assets/components/assets/calcite-icon/squareF24.json +1 -0
  38. package/assets/components/assets/calcite-icon/squareF32.json +1 -0
  39. package/assets/components/assets/calcite-icon/terminal16.json +1 -0
  40. package/assets/components/assets/calcite-icon/terminal24.json +1 -0
  41. package/assets/components/assets/calcite-icon/terminal32.json +1 -0
  42. package/assets/components/assets/calcite-icon/touch16.json +1 -0
  43. package/assets/components/assets/calcite-icon/touch24.json +1 -0
  44. package/assets/components/assets/calcite-icon/touch32.json +1 -0
  45. package/assets/components/assets/calcite-icon/xHexagon16.json +1 -0
  46. package/assets/components/assets/calcite-icon/xHexagon24.json +1 -0
  47. package/assets/components/assets/calcite-icon/xHexagon32.json +1 -0
  48. package/assets/components/assets/calcite-icon/xHexagonF16.json +1 -0
  49. package/assets/components/assets/calcite-icon/xHexagonF24.json +1 -0
  50. package/assets/components/assets/calcite-icon/xHexagonF32.json +1 -0
  51. package/assets/components/assets/calcite-icon/xOctagonF16.json +1 -0
  52. package/assets/components/assets/calcite-icon/xOctagonF24.json +1 -0
  53. package/assets/components/assets/calcite-icon/xOctagonF32.json +1 -0
  54. package/assets/esri/core/workers/RemoteClient.js +1 -1
  55. package/assets/esri/core/workers/chunks/01ef8de7f76a8c61b464.js +1 -0
  56. package/assets/esri/core/workers/chunks/05db312a0ca6bd3f014a.js +1 -0
  57. package/assets/esri/core/workers/chunks/09da224052976e290828.js +1 -0
  58. package/assets/esri/core/workers/chunks/{2c9af2ebd72d9b55329b.js → 0f254c3e91e8fee55f28.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{ce5ca5e95b2378ec55b9.js → 1305ef8717da6e902a55.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{1a2e5b267a0cbf8553b7.js → 1b28042fdf3f4dbc8ea5.js} +1 -1
  61. package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +1 -0
  62. package/assets/esri/core/workers/chunks/21a77eed1a4ef5b0ff08.js +1 -0
  63. package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +1 -0
  64. package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +1 -0
  65. package/assets/esri/core/workers/chunks/{9c417740bf3707a0d465.js → 2c607d30ff8ca1b61286.js} +1 -1
  66. package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +1 -0
  67. package/assets/esri/core/workers/chunks/3564e14010953def6df9.js +1 -0
  68. package/assets/esri/core/workers/chunks/37a7bd30352b1309b8f8.js +1 -0
  69. package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +1 -0
  70. package/assets/esri/core/workers/chunks/{3d5169ea9810d10caf0d.js → 3a9740dccda6a733313c.js} +1 -1
  71. package/assets/esri/core/workers/chunks/403c7d64f12f00330d88.js +1 -0
  72. package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +1 -0
  73. package/assets/esri/core/workers/chunks/4409d77c9734de4e82a7.js +1 -0
  74. package/assets/esri/core/workers/chunks/{f52b6d5037e4205b035c.js → 47395d225229d237f0ac.js} +1 -1
  75. package/assets/esri/core/workers/chunks/4b69129c0557852d9b3d.js +1 -0
  76. package/assets/esri/core/workers/chunks/57c67e260267a1dbc5e3.js +1 -0
  77. package/assets/esri/core/workers/chunks/5ac4c1d54b94c7d87835.js +1 -0
  78. package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +1 -0
  79. package/assets/esri/core/workers/chunks/618076e6de605873e433.js +1 -0
  80. package/assets/esri/core/workers/chunks/{ba6fdaed6c315dc13981.js → 625d2663daa8e0cf64b0.js} +1 -1
  81. package/assets/esri/core/workers/chunks/631c5b514bb73782c570.js +1 -0
  82. package/assets/esri/core/workers/chunks/{3a2b2dc3e938d53faa30.js → 64276aacaafa4c8a15bd.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{75466e0c8c8da499b150.js → 662d13f68cf3ec92439b.js} +1 -1
  84. package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +1 -0
  85. package/assets/esri/core/workers/chunks/6c1e92ff4c732dfda756.js +1 -0
  86. package/assets/esri/core/workers/chunks/6cdfe175c965918b741b.js +1 -0
  87. package/assets/esri/core/workers/chunks/75d53b28afe732c459b2.js +1 -0
  88. package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.js +1 -0
  89. package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js → 7a8764ae8a0041e1151d.js} +2 -2
  90. package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js.LICENSE.txt → 7a8764ae8a0041e1151d.js.LICENSE.txt} +1 -1
  91. package/assets/esri/core/workers/chunks/7e596478507466953e65.js +1 -0
  92. package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.js +1 -0
  93. package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +1 -0
  94. package/assets/esri/core/workers/chunks/8cbb04a9065aa3756638.js +1 -0
  95. package/assets/esri/core/workers/chunks/{9846098704ee38bf6350.js → 8fdd5bca3716816d359b.js} +1 -1
  96. package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +1 -0
  97. package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +1 -0
  98. package/assets/esri/core/workers/chunks/9d77467aa71d345fc1b6.js +1 -0
  99. package/assets/esri/core/workers/chunks/{4beba242e7540ee3182b.js → 9d9dffc8884d66a258e4.js} +1 -1
  100. package/assets/esri/core/workers/chunks/9f8b7b6b4e95f9a794fc.js +1 -0
  101. package/assets/esri/core/workers/chunks/{a721342a32541717324d.js → a28b53c61bddefb6616e.js} +1 -1
  102. package/assets/esri/core/workers/chunks/{9b7c51ff3d2b42aa62f5.js → a7b1b75643ed31489495.js} +1 -1
  103. package/assets/esri/core/workers/chunks/a8b13fb804bb775e4967.js +1 -0
  104. package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +1 -0
  105. package/assets/esri/core/workers/chunks/a960074644c3722be71e.js +1 -0
  106. package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +1 -0
  107. package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +1 -0
  108. package/assets/esri/core/workers/chunks/b10fcbe1393c812fc219.js +1 -0
  109. package/assets/esri/core/workers/chunks/{2a39d520b192b8e552b5.js → b2ae5fc4f787ea568b88.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{b87bc1481a49b38109f4.js → b9c177524b3e7de1ffd1.js} +1 -1
  111. package/assets/esri/core/workers/chunks/b9de831ac379cf1d2969.js +1 -0
  112. package/assets/esri/core/workers/chunks/ba615f118a3a8970ef25.js +1 -0
  113. package/assets/esri/core/workers/chunks/{7c1b9ae141112a63b446.js → ba6654a885be4b7a43f0.js} +1 -1
  114. package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +1 -0
  115. package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +1 -0
  116. package/assets/esri/core/workers/chunks/c36f84daa7736878418d.js +1 -0
  117. package/assets/esri/core/workers/chunks/{b58eba403bd517a7bb15.js → c3eca92d02958732e141.js} +1 -1
  118. package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +1 -0
  119. package/assets/esri/core/workers/chunks/{b51261a9a9ab62388839.js → c8f976e53e232e8da9cc.js} +39 -29
  120. package/assets/esri/core/workers/chunks/cbb291412fd1a5261aa9.js +1 -0
  121. package/assets/esri/core/workers/chunks/d1454155ee1b8a421cbb.js +1 -0
  122. package/assets/esri/core/workers/chunks/{0cd583c3233573cb8468.js → d24c4fbc567486b1188f.js} +1 -1
  123. package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +1 -0
  124. package/assets/esri/core/workers/chunks/dd433c160f7a0c120b82.js +1 -0
  125. package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +1 -0
  126. package/assets/esri/core/workers/chunks/e2d68bcd2f99a65387bf.js +1 -0
  127. package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +1 -0
  128. package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +1 -0
  129. package/assets/esri/core/workers/chunks/{2f66fcb8670b108af549.js → ed0bcc66fb1e0ee75a4b.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{6deac533bb455be4004b.js → ef8b75b92cf549e0507e.js} +1 -1
  131. package/assets/esri/core/workers/chunks/f7fc4c993536e62f7f3e.js +1 -0
  132. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.svg +1 -0
  133. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.ttf +0 -0
  134. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.woff +0 -0
  135. package/assets/esri/themes/base/icons/selection.json +1 -1
  136. package/assets/esri/themes/base/icons/style.css +4 -0
  137. package/assets/esri/themes/base/icons/style.scss +6 -0
  138. package/assets/esri/themes/base/icons/variables.scss +1 -0
  139. package/assets/esri/themes/base/widgets/_Weather.scss +1 -1
  140. package/assets/esri/themes/dark/main.css +1 -1
  141. package/assets/esri/themes/dark-blue/main.css +1 -1
  142. package/assets/esri/themes/dark-green/main.css +1 -1
  143. package/assets/esri/themes/dark-purple/main.css +1 -1
  144. package/assets/esri/themes/dark-red/main.css +1 -1
  145. package/assets/esri/themes/light/main.css +1 -1
  146. package/assets/esri/themes/light/view.css +1 -1
  147. package/assets/esri/themes/light-blue/main.css +1 -1
  148. package/assets/esri/themes/light-green/main.css +1 -1
  149. package/assets/esri/themes/light-purple/main.css +1 -1
  150. package/assets/esri/themes/light-red/main.css +1 -1
  151. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  152. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  153. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  154. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  155. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  156. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  157. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  158. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  159. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  160. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  161. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  162. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  163. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  164. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  173. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  174. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  175. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  176. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  177. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  178. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  179. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  180. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  181. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  182. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  183. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  184. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  185. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  186. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  187. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  188. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  189. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  190. package/assets/esri/widgets/ElevationProfile/t9n/ElevationProfile_ja.json +1 -1
  191. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ar.json +1 -1
  192. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bg.json +1 -1
  193. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bs.json +1 -1
  194. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ca.json +1 -1
  195. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_cs.json +1 -1
  196. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_da.json +1 -1
  197. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_de.json +1 -1
  198. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_el.json +1 -1
  199. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_es.json +1 -1
  200. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_et.json +1 -1
  201. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fi.json +1 -1
  202. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fr.json +1 -1
  203. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_he.json +1 -1
  204. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hr.json +1 -1
  205. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hu.json +1 -1
  206. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_id.json +1 -1
  207. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_it.json +1 -1
  208. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ja.json +1 -1
  209. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ko.json +1 -1
  210. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lt.json +1 -1
  211. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lv.json +1 -1
  212. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nb.json +1 -1
  213. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nl.json +1 -1
  214. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pl.json +1 -1
  215. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-BR.json +1 -1
  216. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-PT.json +1 -1
  217. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ro.json +1 -1
  218. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ru.json +1 -1
  219. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sk.json +1 -1
  220. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sl.json +1 -1
  221. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sr.json +1 -1
  222. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sv.json +1 -1
  223. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_th.json +1 -1
  224. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_tr.json +1 -1
  225. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_uk.json +1 -1
  226. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_vi.json +1 -1
  227. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-CN.json +1 -1
  228. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-HK.json +1 -1
  229. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-TW.json +1 -1
  230. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  231. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  232. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  233. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  234. package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
  235. package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
  236. package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
  237. package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
  238. package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
  239. package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
  240. package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
  241. package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
  242. package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
  243. package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
  244. package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
  245. package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
  246. package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
  247. package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
  248. package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
  249. package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
  250. package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
  251. package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
  252. package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
  253. package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
  254. package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
  255. package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
  256. package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
  257. package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
  258. package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
  259. package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
  260. package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
  261. package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
  262. package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
  263. package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
  264. package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
  265. package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
  266. package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
  267. package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
  268. package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
  269. package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
  270. package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
  271. package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
  272. package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
  273. package/chunks/Clouds.glsl.js +14 -14
  274. package/chunks/DefaultMaterial.glsl.js +2 -2
  275. package/chunks/HUDMaterial.glsl.js +22 -21
  276. package/chunks/RibbonLine.glsl.js +10 -14
  277. package/chunks/persistableUrlUtils.js +1 -1
  278. package/chunks/vec32.js +1 -1
  279. package/chunks/vec42.js +1 -1
  280. package/core/urlUtils.js +1 -1
  281. package/form/elements/FieldElement.js +1 -1
  282. package/geometry/support/buffer/math/common.js +1 -1
  283. package/interfaces.d.ts +100 -57
  284. package/layers/FeatureLayer.js +1 -1
  285. package/layers/SubtypeGroupLayer.js +1 -1
  286. package/layers/VectorTileLayer.js +1 -1
  287. package/layers/WMSLayer.js +1 -1
  288. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  289. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  290. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  291. package/layers/mixins/ArcGISImageService.js +1 -1
  292. package/layers/mixins/OperationalLayer.js +1 -1
  293. package/layers/ogc/crsUtils.js +5 -0
  294. package/layers/support/RasterFunction.js +1 -1
  295. package/layers/support/capabilities.js +1 -1
  296. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  297. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  298. package/layers/support/vectorTileLayerLoader.js +1 -1
  299. package/layers/support/wmsUtils.js +1 -1
  300. package/layers/support/wmtsUtils.js +1 -1
  301. package/package.json +5 -5
  302. package/rasterRenderers.js +1 -1
  303. package/renderers/support/RasterSymbolizer.js +1 -1
  304. package/renderers/support/rasterRendererHelper.js +1 -1
  305. package/request.js +1 -1
  306. package/rest/print.js +1 -1
  307. package/rest/support/ImageIdentifyParameters.js +1 -1
  308. package/rest/support/StatisticDefinition.js +1 -1
  309. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  310. package/smartMapping/renderers/univariateColorSize.js +1 -1
  311. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  312. package/support/featureFlags.js +1 -1
  313. package/support/revision.js +1 -1
  314. package/symbols/ExtrudeSymbol3DLayer.js +1 -1
  315. package/symbols/Font.js +1 -1
  316. package/symbols/IconSymbol3DLayer.js +1 -1
  317. package/symbols/ObjectSymbol3DLayer.js +1 -1
  318. package/symbols/PathSymbol3DLayer.js +1 -1
  319. package/symbols/TextSymbol.js +1 -1
  320. package/symbols/TextSymbol3DLayer.js +1 -1
  321. package/symbols/support/Symbol3DHalo.js +1 -1
  322. package/symbols/support/Symbol3DMaterial.js +1 -1
  323. package/symbols/support/constants.js +5 -0
  324. package/symbols/support/utils.js +1 -1
  325. package/views/2d/engine/Stage.js +1 -1
  326. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  327. package/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js +1 -1
  328. package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
  329. package/views/2d/engine/vectorTiles/style/VectorTilesRequestManager.js +5 -0
  330. package/views/2d/engine/webgl/BitBlitRenderer.js +1 -1
  331. package/views/2d/engine/webgl/MaterialManager.js +1 -1
  332. package/views/2d/engine/webgl/alignmentUtils.js +1 -1
  333. package/views/2d/engine/webgl/effects/BlendEffect.js +1 -1
  334. package/views/2d/engine/webgl/materialKey/MaterialKey.js +1 -1
  335. package/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js +1 -1
  336. package/views/2d/engine/webgl/shaders/BlendPrograms.js +1 -1
  337. package/views/2d/engine/webgl/shaders/MaterialPrograms.js +1 -1
  338. package/views/2d/layers/BaseLayerView2D.js +1 -1
  339. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  340. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  341. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  342. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  343. package/views/2d/layers/LayerView2D.js +1 -1
  344. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  345. package/views/2d/layers/RouteLayerView2D.js +1 -1
  346. package/views/2d/layers/TileLayerView2D.js +1 -1
  347. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  348. package/views/2d/layers/WMSLayerView2D.js +1 -1
  349. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  350. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  351. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  352. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  353. package/views/2d/support/engineHelpers.js +1 -1
  354. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  355. package/views/3d/environment/CloudyWeather.js +1 -1
  356. package/views/3d/environment/Fog.js +1 -1
  357. package/views/3d/environment/FoggyWeather.js +1 -1
  358. package/views/3d/environment/NoiseTextureAtlas.js +1 -1
  359. package/views/3d/environment/RainyWeather.js +1 -1
  360. package/views/3d/environment/Stars.js +1 -1
  361. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  362. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  363. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  364. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  365. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  366. package/views/3d/layers/GraphicsView3D.js +1 -1
  367. package/views/3d/layers/I3SMeshView3D.js +1 -1
  368. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  369. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  370. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  371. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  372. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  373. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  374. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  375. package/views/3d/layers/SceneLayerView3D.js +1 -1
  376. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  377. package/views/3d/layers/WMSLayerView3D.js +1 -1
  378. package/views/3d/layers/WMTSLayerView3D.js +1 -1
  379. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  380. package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.js +1 -1
  381. package/views/3d/layers/graphics/Graphics3DGraphicLikeLayerView.js +1 -1
  382. package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
  383. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  384. package/views/3d/layers/graphics/Labeler.js +1 -1
  385. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  386. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  387. package/views/3d/state/controllers/RotateController.js +1 -1
  388. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  389. package/views/3d/state/controllers/global/ZoomController.js +1 -1
  390. package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
  391. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  392. package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
  393. package/views/3d/support/debugFlags.js +1 -1
  394. package/views/3d/support/sunUtils.js +1 -1
  395. package/views/3d/terrain/Overlay.js +1 -1
  396. package/views/3d/terrain/OverlayManager.js +1 -1
  397. package/views/3d/terrain/TerrainSurface.js +1 -1
  398. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +7 -1
  399. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +28 -24
  400. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +19 -14
  401. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  402. package/views/3d/webgl-engine/lib/InstanceParameters.js +5 -0
  403. package/views/3d/webgl-engine/lib/{localOrigin.js → LocalOriginFactory.js} +0 -0
  404. package/views/3d/webgl-engine/lib/Program.js +1 -1
  405. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  406. package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
  407. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  408. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  409. package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
  410. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  411. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  412. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  413. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  414. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  415. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  416. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  417. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  418. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  419. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  420. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  421. package/views/LayerViewManager.js +1 -1
  422. package/views/MapView.js +1 -1
  423. package/views/SceneView.js +1 -1
  424. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  425. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  426. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  427. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  428. package/views/layers/ImageryTileLayerView.js +1 -1
  429. package/views/layers/LayerView.js +1 -1
  430. package/views/layers/OGCFeatureLayerView.js +1 -1
  431. package/views/layers/RefreshableLayerView.js +1 -1
  432. package/views/overlay/ViewOverlay.js +1 -1
  433. package/views/support/DefaultsFromMap.js +1 -1
  434. package/views/support/WatchUpdatingTracking.js +1 -1
  435. package/views/support/imageReprojection.js +1 -1
  436. package/views/webgl/BufferObject.js +1 -1
  437. package/views/webgl/ContextState.js +1 -1
  438. package/views/webgl/FramebufferObject.js +1 -1
  439. package/views/webgl/Program.js +1 -1
  440. package/views/webgl/ProgramCache.js +1 -1
  441. package/views/webgl/ProgramTemplate.js +1 -1
  442. package/views/webgl/RenderingContext.js +1 -1
  443. package/views/webgl/ShaderTranspiler.js +1 -1
  444. package/views/webgl/UniformBufferLayout.js +5 -0
  445. package/views/webgl/UniformBufferObject.js +5 -0
  446. package/views/webgl/enums.js +1 -1
  447. package/views/webgl/rasterUtils.js +1 -1
  448. package/views/webgl/storageLayouts.js +5 -0
  449. package/views/webgl/testDoublePrecisionArithmetic.js +1 -1
  450. package/views/webgl/testFloatBufferBlend.js +1 -1
  451. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  452. package/views/webgl/testSamplerPrecision.js +1 -1
  453. package/views/webgl/tests/SimpleDraw.js +1 -1
  454. package/widgets/BasemapLayerList.js +1 -1
  455. package/widgets/BuildingExplorer/BuildingDisciplinesViewModel.js +1 -1
  456. package/widgets/Editor/BatchCreateWorkflow.js +1 -1
  457. package/widgets/Editor/CreateWorkflow.js +1 -1
  458. package/widgets/Editor/UpdateWorkflow.js +1 -1
  459. package/widgets/Editor/workflowUtils.js +1 -1
  460. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  461. package/widgets/ElevationProfile.js +1 -1
  462. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  463. package/widgets/Feature/FeatureMedia.js +1 -1
  464. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  465. package/widgets/FeatureForm/InputField.js +1 -1
  466. package/widgets/FeatureForm/InputFieldGroup.js +1 -1
  467. package/widgets/FeatureForm.js +1 -1
  468. package/widgets/FeatureTemplates.js +1 -1
  469. package/widgets/FloorFilter.js +1 -1
  470. package/widgets/LayerList/ListItemPanel.js +1 -1
  471. package/widgets/LayerList/support/layerListUtils.js +1 -1
  472. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  473. package/widgets/Popup.js +1 -1
  474. package/widgets/Print.js +1 -1
  475. package/widgets/Search.js +1 -1
  476. package/widgets/Sketch/SketchViewModel.js +1 -1
  477. package/widgets/Weather/CoverageSlider.js +5 -0
  478. package/widgets/Weather/WeatherViewModel.js +1 -1
  479. package/widgets/Weather/css.js +1 -1
  480. package/widgets/Weather.js +1 -1
  481. package/assets/esri/core/workers/chunks/0881ce46b10362861f87.js +0 -1
  482. package/assets/esri/core/workers/chunks/0c0a02770eeeb3e28ea1.js +0 -1
  483. package/assets/esri/core/workers/chunks/0d2effbd84a9482eb639.js +0 -1
  484. package/assets/esri/core/workers/chunks/0f04246c1b591a3ac74d.js +0 -1
  485. package/assets/esri/core/workers/chunks/1ac6be0dc25e16c75d06.js +0 -1
  486. package/assets/esri/core/workers/chunks/1f8110ea12d65ca94b55.js +0 -1
  487. package/assets/esri/core/workers/chunks/2025d0fd61a64876c81b.js +0 -1
  488. package/assets/esri/core/workers/chunks/241859d74c0daac62e11.js +0 -1
  489. package/assets/esri/core/workers/chunks/331be347c1b1ca0be2d2.js +0 -1
  490. package/assets/esri/core/workers/chunks/39af317388ecebb4387d.js +0 -1
  491. package/assets/esri/core/workers/chunks/39be2893a7dbdecfd65a.js +0 -1
  492. package/assets/esri/core/workers/chunks/3a20f66b0b7d08064e34.js +0 -1
  493. package/assets/esri/core/workers/chunks/445099d037affd139ed0.js +0 -1
  494. package/assets/esri/core/workers/chunks/45848fecec88ed2da33d.js +0 -1
  495. package/assets/esri/core/workers/chunks/48d3a3abc53abe6a4017.js +0 -1
  496. package/assets/esri/core/workers/chunks/5005b8c1fdd5cb9a4c19.js +0 -1
  497. package/assets/esri/core/workers/chunks/52e4c367c72ea7cc3457.js +0 -1
  498. package/assets/esri/core/workers/chunks/5d8170f6207dbeb4de1b.js +0 -1
  499. package/assets/esri/core/workers/chunks/642c38ac00a962f35d44.js +0 -1
  500. package/assets/esri/core/workers/chunks/64459604505647e9c714.js +0 -1
  501. package/assets/esri/core/workers/chunks/653d1550dd1a4867a9fc.js +0 -1
  502. package/assets/esri/core/workers/chunks/65f73fbbc3c7c60c6d3d.js +0 -1
  503. package/assets/esri/core/workers/chunks/6db7081d344bea26ef64.js +0 -1
  504. package/assets/esri/core/workers/chunks/6e13dab8ec43f7494297.js +0 -1
  505. package/assets/esri/core/workers/chunks/7bd4c3ee43fb038b88d8.js +0 -1
  506. package/assets/esri/core/workers/chunks/803de5097a8a2c4b58a8.js +0 -1
  507. package/assets/esri/core/workers/chunks/8298231a0fd0129b0d5c.js +0 -1
  508. package/assets/esri/core/workers/chunks/8500c6c011400af1b7bd.js +0 -1
  509. package/assets/esri/core/workers/chunks/8b322a2a47dfdbb59b45.js +0 -1
  510. package/assets/esri/core/workers/chunks/8f83bebef9174c3f15da.js +0 -1
  511. package/assets/esri/core/workers/chunks/904332faa22bc0e876cb.js +0 -1
  512. package/assets/esri/core/workers/chunks/950565d1e682fc4072e1.js +0 -1
  513. package/assets/esri/core/workers/chunks/a247ddd84245c81112c8.js +0 -1
  514. package/assets/esri/core/workers/chunks/a9ffa806df20130ecfb6.js +0 -1
  515. package/assets/esri/core/workers/chunks/af13e534e4160636bd3d.js +0 -1
  516. package/assets/esri/core/workers/chunks/b2f62234ebb8b6158baa.js +0 -1
  517. package/assets/esri/core/workers/chunks/b5bb7cfa26b1f0cec67a.js +0 -1
  518. package/assets/esri/core/workers/chunks/b8666d1a4e4fff7a4703.js +0 -1
  519. package/assets/esri/core/workers/chunks/bea1da9e3f878e0e2c83.js +0 -1
  520. package/assets/esri/core/workers/chunks/c1b6c31fa3ec1542f996.js +0 -1
  521. package/assets/esri/core/workers/chunks/c32a4fbdc87225f84019.js +0 -1
  522. package/assets/esri/core/workers/chunks/c67fea81f69a60c0eaef.js +0 -1
  523. package/assets/esri/core/workers/chunks/d336afd5890dcdbf5341.js +0 -1
  524. package/assets/esri/core/workers/chunks/da69e3e5949fe1716e34.js +0 -1
  525. package/assets/esri/core/workers/chunks/daa9c450b2e2a5371249.js +0 -1
  526. package/assets/esri/core/workers/chunks/dd63ba77b7e4c3c9c594.js +0 -1
  527. package/assets/esri/core/workers/chunks/dfa57982d28c9aeb97b9.js +0 -1
  528. package/assets/esri/core/workers/chunks/e01812116b27874948f0.js +0 -1
  529. package/assets/esri/core/workers/chunks/e5c9d8482b913cf3580a.js +0 -1
  530. package/assets/esri/core/workers/chunks/eeadd92f0bede9fc8745.js +0 -1
  531. package/assets/esri/core/workers/chunks/fbb67cb6224aed2cce16.js +0 -1
  532. package/assets/esri/core/workers/chunks/feeaf61424336e9eac88.js +0 -1
  533. package/assets/esri/core/workers/chunks/ff02295329a8986d0568.js +0 -1
  534. package/views/2d/engine/webgl/mesh/templates/meshUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/Renderer.js";import t from"../renderers/SimpleRenderer.js";import r from"../renderers/UniqueValueRenderer.js";import{read as i}from"../renderers/support/jsonUtils.js";import{rendererTypes as o,webSceneRendererTypes as s}from"../renderers/support/types.js";import n from"../request.js";import{symbolTypes as a,symbolTypesRenderer as l}from"../symbols.js";import p from"../core/Collection.js";import u from"../core/Error.js";import{HandleOwnerMixin as d}from"../core/HandleOwner.js";import y from"../core/Handles.js";import c from"../core/has.js";import{JSONMap as h}from"../core/jsonMap.js";import m from"../core/Logger.js";import{destroyMaybe as f,isSome as b,unwrapOr as g}from"../core/maybe.js";import{MultiOriginJSONMixin as v}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as w}from"../core/object.js";import{throwIfAbortError as S,throwIfAborted as I}from"../core/promiseUtils.js";import{parseWhereClause as F}from"../core/sql.js";import{urlToObject as j,join as E}from"../core/urlUtils.js";import{property as x}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as D}from"../core/accessorSupport/decorators/cast.js";import{reader as C}from"../core/accessorSupport/decorators/reader.js";import{subclass as M}from"../core/accessorSupport/decorators/subclass.js";import{writer as T}from"../core/accessorSupport/decorators/writer.js";import{createTypeReader as O}from"../core/accessorSupport/extensions/serializableProperty/reader.js";import R from"../form/FormTemplate.js";import A from"../geometry/Extent.js";import L from"../geometry/HeightModelInfo.js";import _ from"../geometry/SpatialReference.js";import P from"./Layer.js";import Q from"./graphics/sources/MemorySource.js";import{ArcGISService as q}from"./mixins/ArcGISService.js";import{BlendLayer as G}from"./mixins/BlendLayer.js";import{CustomParametersMixin as U}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as V}from"./mixins/OperationalLayer.js";import{PortalLayer as B}from"./mixins/PortalLayer.js";import{RefreshableLayer as z}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as N}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as W}from"./mixins/TemporalLayer.js";import{titleFromUrlAndName as k,parse as $,cleanTitle as Z,sanitizeUrlWithLayerId as J,writeUrlWithLayerId as H}from"./support/arcgisLayerUrl.js";import{elevationInfo as K,id as X,opacityDrawingInfo as Y,legendEnabled as ee,minScale as te,maxScale as re,screenSizePerspectiveEnabled as ie,url as oe}from"./support/commonProperties.js";import{FeatureIndex as se}from"./support/FeatureIndex.js";import{featureReductionProperty as ne}from"./support/featureReductionUtils.js";import{defineFieldProperties as ae}from"./support/fieldProperties.js";import{fixRendererFields as le,fixTimeInfoFields as pe}from"./support/fieldUtils.js";import ue from"./support/GeometryFieldsInfo.js";import de from"./support/LayerFloorInfo.js";import ye from"./support/Relationship.js";import ce from"./support/SubtypeSublayer.js";import he from"./support/TimeInfo.js";import{DataLayerSource as me}from"./support/source/DataLayerSource.js";import{loadStyleRenderer as fe}from"../renderers/support/styleUtils.js";import be from"../rest/support/AttachmentQuery.js";import ge from"../rest/support/FeatureSet.js";import ve from"../rest/support/Query.js";import we from"../rest/support/RelationshipQuery.js";const Se=new h({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),Ie={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},Fe="SubtypeGroupLayer",je=m.getLogger("esri.layers.SubtypeGroupLayer");function Ee(e){return e&&e instanceof p}function xe(e,t,r){return!!(e&&e.hasOwnProperty(t)?e[t]:r)}function De(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const Ce=ae();function Me(e,t,r){const i=!(null==r||!r.writeLayerSchema);return{enabled:i,ignoreOrigin:i}}let Te=class extends(G(W(N(z(q(V(B(v(U(d(P))))))))))){constructor(...e){super(...e),this._handles=new y,this.capabilities=null,this.charts=null,this.copyright=null,this.displayField=null,this.definitionExpression=null,this.dynamicDataSource=null,this.editFieldsInfo=null,this.editingEnabled=!0,this.editingInfo=null,this.elevationInfo=null,this.featureReduction=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.formTemplate=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.isTable=!1,this.layerId=void 0,this.legendEnabled=!0,this.minScale=0,this.maxScale=0,this.globalIdField=null,this.objectIdField=null,this.outFields=null,this.path=null,this.relationships=null,this.sourceJSON=null,this.returnM=void 0,this.returnZ=void 0,this.screenSizePerspectiveEnabled=!0,this.serviceDefinitionExpression=null,this.spatialReference=_.WGS84,this.subtypeField=null,this.sublayers=new(p.ofType(ce)),this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.trackIdField=null,this.type="subtype-group",this.typeIdField=null,this.indexes=new(p.ofType(se)),this.userIsAdmin=!1,this.version=void 0,this.visible=!0,this._handles.add(this.watch("sublayers",((e,t)=>this._handleSublayersChange(e,t)),!0))}destroy(){var e;null==(e=this.source)||e.destroy(),this._handles=f(this._handles)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=b(e)?e.signal:null;if(this.portalItem&&this.portalItem.loaded&&this.source)return void this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this._initLayerProperties(e))));const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(S).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new u("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,{attachment:this._readAttachmentCapabilities(t.attachmentProperties),data:this._readDataCapabilities(t),metadata:this._readMetadataCapabilities(t),operations:this._readOperationsCapabilities(t.capabilities||e,t),query:this._readQueryCapabilities(t),queryRelated:this._readQueryRelatedCapabilities(t),editing:this._readEditingCapabilities(t)}}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")||0)+1}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}readIsTable(e,t){return"Table"===(t=t&&t.layerDefinition||t).type||!t.geometryType}writeIsTable(e,t,r,i){null!=i&&i.writeLayerSchema&&w(r,e?"Table":"Feature Layer",t)}readMinScale(e,t){return t.effectiveMinScale||e||0}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const r of t.fields)if("esriFieldTypeGlobalID"===r.type)return r.name}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const r of t.fields)if("esriFieldTypeOID"===r.type)return r.name}get parsedUrl(){const e=this.url?j(this.url):null;return null!=e&&(null!=this.dynamicDataSource?e.path=E(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=E(e.path,this.layerId.toString()))),e}set renderer(e){le(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,o,s){const n=(o=o.layerDefinition||o).drawingInfo&&o.drawingInfo.renderer||void 0;if(n){const e=i(n,o,s)||void 0;return e||je.error("Failed to create renderer",{rendererDefinition:o.drawingInfo.renderer,layer:this,context:s}),e}if(o.defaultSymbol)return o.types&&o.types.length?new r({defaultSymbol:Oe(o.defaultSymbol,o,s),field:o.typeIdField,uniqueValueInfos:o.types.map((e=>({id:e.id,symbol:Oe(e.symbol,e,s)})))}):new t({symbol:Oe(o.defaultSymbol,o,s)})}set source(e){const t=this._get("source");t!==e&&(Ee(t)&&this._resetMemorySource(t),Ee(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof p?new Q({layer:this,items:e}):e:null}readSource(e,t){const r=ge.fromJSON(t.featureSet);return new Q({layer:this,items:r&&r.features||[]})}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readTitle(e,t){const r=t.layerDefinition&&t.layerDefinition.name||t.name,i=t.title||t.layerDefinition&&t.layerDefinition.title;if(r){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?k(this.url,r):r;let t=r;if(!t&&this.url){const e=$(this.url);b(e)&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),Z(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition&&t.layerDefinition.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}set url(e){const t=J({layer:this,url:e,nonStandardUrlAllowed:!0,logger:je});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){H(this,e,null,t,i)}readVersion(e,t){return t.currentVersion?t.currentVersion:t.hasOwnProperty("capabilities")||t.hasOwnProperty("drawingInfo")||t.hasOwnProperty("hasAttachments")||t.hasOwnProperty("htmlPopupType")||t.hasOwnProperty("relationships")||t.hasOwnProperty("timeInfo")||t.hasOwnProperty("typeIdField")||t.hasOwnProperty("types")?10:9.3}readVisible(e,t){return t.layerDefinition&&null!=t.layerDefinition.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}addAttachment(e,t){return this.load().then((()=>this._checkAttachmentSupport(e))).then((()=>{if(!("addAttachment"in this.source))throw new u(Fe,"Layer source does not support addAttachment capability");return this.source.addAttachment(e,t)}))}updateAttachment(e,t,r){return this.load().then((()=>this._checkAttachmentSupport(e))).then((()=>{if(!("updateAttachment"in this.source))throw new u(Fe,"Layer source does not support updateAttachment capability");return this.source.updateAttachment(e,t,r)}))}async applyEdits(e,t){const r=await import("./graphics/editingSupport.js");return await this.load(),r.applyEdits(this,this.source,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){if(this._hasMemorySource())return this.emit("graphics-source-create",{graphicsSource:this.source}),this.source.load({signal:e});const t=await import("./graphics/sources/FeatureLayerSource.js");I(e);const r=await new t.default({layer:this}).load({signal:e});return this.emit("graphics-source-create",{graphicsSource:r}),r}createQuery(){const e=new ve,t=this.get("capabilities.data"),r=this.sublayers.map((e=>e.subtypeCode));e.dynamicDataSource=this.dynamicDataSource,e.gdbVersion=this.gdbVersion,e.historicMoment=this.historicMoment,e.returnGeometry=!0,t&&(t.supportsZ&&null!=this.returnZ&&(e.returnZ=this.returnZ),t.supportsM&&null!=this.returnM&&(e.returnM=this.returnM)),e.outFields=["*"],e.where=`${this.subtypeField} IN (${r.join(",")})`,this.definitionExpression&&(e.where+=` AND (${this.definitionExpression})`);const{timeOffset:i,timeExtent:o}=this;return e.timeExtent=null!=i&&null!=o?o.offset(-i.value,i.unit):o||null,e.multipatchOption="multipatch"===this.geometryType?"xyFootprint":null,e}deleteAttachments(e,t){return this.load().then((()=>this._checkAttachmentSupport(e))).then((()=>{if(!("deleteAttachments"in this.source))throw new u(Fe,"Layer source does not support deleteAttachments capability");return this.source.deleteAttachments(e,t)}))}fetchRecomputedExtents(e){return this.load({signal:null==e?void 0:e.signal}).then((()=>{if(this.source.fetchRecomputedExtents)return this.source.fetchRecomputedExtents(e);throw new u(Fe,"Layer source does not support fetchUpdates capability")}))}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}queryAttachments(e,t){return e=be.from(e),this.load().then((()=>{if(!this.get("capabilities.data.supportsAttachment"))throw new u(Fe,"this layer doesn't support attachments");const{attachmentTypes:t,objectIds:r,globalIds:i,num:o,size:s,start:n,where:a}=e;if(!this.get("capabilities.operations.supportsQueryAttachments")){const l=r&&r.length>1,p=t&&t.length,d=i&&i.length,y=s&&s.length;if(l||p||d||y||o||n||a)throw new u(Fe,"when 'supportsQueryAttachments' is false, only objectIds of length 1 are supported",e)}if(!(r&&r.length||a))throw new u(Fe,"'objectIds' or 'where' are required to perform attachment query",e);if(!("queryAttachments"in this.source))throw new u(Fe,"Layer source does not support queryAttachments capability",e);return this.source.queryAttachments(e)}))}queryFeatures(e,t){const r=ve.from(e)||this.createQuery(),i=g(r.outFields,[]);return i.find((e=>e===this.subtypeField))||(i.push(this.subtypeField),r.outFields=i),this.load().then((()=>this.source.queryFeatures(r,t))).then((e=>{if(null!=e&&e.features)for(const t of e.features)t.layer=this._findSublayerForFeature(t),t.sourceLayer=this;return e}))}_findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.sublayers.find((e=>e.subtypeCode===r))}queryObjectIds(e,t){return this.load().then((()=>{if(this.source.queryObjectIds)return this.source.queryObjectIds(ve.from(e)||this.createQuery(),t);throw new u(Fe,"Layer source does not support queryObjectIds capability")}))}queryFeatureCount(e,t){return this.load().then((()=>{if(this.source.queryFeatureCount)return this.source.queryFeatureCount(ve.from(e)||this.createQuery(),t);throw new u(Fe,"Layer source does not support queryFeatureCount capability")}))}queryExtent(e,t){return this.load().then((()=>{if(this.source.queryExtent)return this.source.queryExtent(ve.from(e)||this.createQuery(),t);throw new u(Fe,"Layer source does not support queryExtent capability")}))}queryRelatedFeatures(e,t){return this.load().then((()=>{if("queryRelatedFeatures"in this.source)return this.source.queryRelatedFeatures(we.from(e),t);throw new u(Fe,"Layer source does not support queryRelatedFeatures capability")}))}queryRelatedFeaturesCount(e,t){return this.load().then((()=>{if("queryRelatedFeaturesCount"in this.source)return this.source.queryRelatedFeaturesCount(we.from(e),t);throw new u(Fe,"Layer source does not support queryRelatedFeaturesCount capability")}))}read(e,t){const r=e.featureCollection;if(r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&this.revert(["objectIdField","fields","timeInfo","spatialReference"],"service")}write(e,t){var r,i;const o=(t={...t,writeLayerSchema:null!=(r=null==(i=t)?void 0:i.writeLayerSchema)?r:this._hasMemorySource()}).origin,s=t.layerContainerType,n=t.messages;if(this.isTable){if("web-scene"===o||"web-map"===o&&"tables"!==s)return n&&n.push(new u("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Table source cannot be written to web scenes and web maps`,{layer:this})),null;if(this._hasMemorySource())return n&&n.push(new u("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using an in-memory Table source cannot be written to web scenes and web maps`,{layer:this})),null}else if(this.loaded&&"web-map"===o&&"tables"===s)return n&&n.push(new u("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a non-table source cannot be written to tables in web maps`,{layer:this})),null;return super.write(e,t)}_readEditingEnabled(e,t,r){var i;let o=null==(i=e.layerDefinition)?void 0:i.capabilities;return o?this._hasEditingCapability(o):(o=e.capabilities,!(t&&"web-map"===(null==r?void 0:r.origin)&&!this._hasMemorySource()&&o)||this._hasEditingCapability(o))}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){var o,s;const e=null!=(o=this.capabilities)&&null!=(s=o.operations)&&s.supportsSync?"Query,Sync":"Query";w("layerDefinition.capabilities",e,t),!r||null!=i&&i.writeLayerSchema||(t.capabilities=e)}}_checkAttachmentSupport(e){const{attributes:t}=e,{objectIdField:r}=this;return this.get("capabilities.data.supportsAttachment")?e?t?t[r]?void 0:Promise.reject(new u(Fe,`feature is missing the identifying attribute ${r}`)):Promise.reject(new u(Fe,"'attributes' are required on a feature to query attachments")):Promise.reject(new u(Fe,"A feature is required to add/delete/update attachments")):Promise.reject(new u(Fe,"this layer doesn't support attachments"))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstLayerId(e){return n(this.url,{query:{f:"json",...this.customParameters},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}))}async _initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",url:this.parsedUrl})),this._verifySource(),this._verifyFields(),le(this.renderer,this.fieldsIndex),pe(this.timeInfo,this.fieldsIndex),fe(this,{origin:"service"})}async hasDataChanged(){var e;if(null!=(e=this.source)&&e.refresh)try{var t;const{dataChanged:e,updates:r}=await(null==(t=this.source)?void 0:t.refresh());if(b(r)&&(this.sourceJSON={...this.sourceJSON,...r},this.read(r,{origin:"service",url:this.parsedUrl})),e)return!0}catch{}if(this.definitionExpression)try{return(await F(this.definitionExpression,this.fieldsIndex)).hasDateFunctions}catch{}return!1}_verifyFields(){const e=this.parsedUrl&&this.parsedUrl.path||"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields&&this.fields.some((function(e){return"geometry"===e.type}))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new u("feature-layer:mixed-source-and-url","SubtypeGroupLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new u("feature-layer:source-or-url-required","SubtypeGroupLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this._handles.add([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this._handles.remove("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}_readAttachmentCapabilities(e){const t={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1};return e&&Array.isArray(e)&&e.forEach((e=>{const r=Ie[e.name];r&&(t[r]=!!e.isEnabled)})),t}_readDataCapabilities(e){return{isVersioned:xe(e,"isDataVersioned",!1),supportsAttachment:xe(e,"hasAttachments",!1),supportsM:xe(e,"hasM",!1),supportsZ:xe(e,"hasZ",!1)}}_readMetadataCapabilities(e){return{supportsAdvancedFieldProperties:xe(e,"supportsFieldDescriptionProperty",!1)}}_readOperationsCapabilities(e,t){const r=e?e.toLowerCase().split(",").map((e=>e.trim())):[],i=-1!==r.indexOf("editing");let o=i&&-1!==r.indexOf("create"),s=i&&-1!==r.indexOf("delete"),n=i&&-1!==r.indexOf("update");const a=-1!==r.indexOf("changetracking");return i&&!(o||s||n)&&(o=s=n=!0),{supportsCalculate:xe(t,"supportsCalculate",!1),supportsTruncate:xe(t,"supportsTruncate",!1),supportsValidateSql:xe(t,"supportsValidateSql",!1),supportsAdd:o,supportsDelete:s,supportsEditing:i,supportsChangeTracking:a,supportsQuery:-1!==r.indexOf("query"),supportsQueryAttachments:xe(t.advancedQueryCapabilities,"supportsQueryAttachments",!1),supportsResizeAttachments:xe(t,"supportsAttachmentsResizing",!1),supportsSync:-1!==r.indexOf("sync"),supportsUpdate:n,supportsExceedsLimitStatistics:xe(t,"supportsExceedsLimitStatistics",!1)}}_readQueryCapabilities(e){var t;const r=e.advancedQueryCapabilities,i=e.ownershipBasedAccessControlForFeatures,o=e.archivingInfo,s=null==(t=this.url)?void 0:t.includes("MapServer"),n=!c("mapserver-pbf-enabled")&&s&&this.version<10.81,a=(e.supportedQueryFormats||"").split(",").reduce(((e,t)=>{const r=t.toLowerCase().trim();return r&&e.add(r),e}),new Set);return{supportsStatistics:xe(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:xe(r,"supportsPercentileStatistics",!1),supportsCentroid:xe(r,"supportsReturningGeometryCentroid",!1),supportsDistance:xe(r,"supportsQueryWithDistance",!1),supportsDistinct:xe(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:xe(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:xe(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:xe(r,"supportsHavingClause",!1),supportsOrderBy:xe(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:xe(r,"supportsPagination",!1),supportsQuantization:xe(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:xe(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:xe(e,"supportsReturningQueryGeometry",!1),supportsResultType:xe(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:xe(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:xe(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:xe(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:xe(r,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:xe(i,"allowOthersToQuery",!0),supportsHistoricMoment:xe(o,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:!n&&a.has("pbf"),supportsDisjointSpatialRelationship:xe(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:xe(r,"supportsQueryWithCacheHint",!1),maxRecordCountFactor:De(e,"maxRecordCountFactor",void 0),maxRecordCount:De(e,"maxRecordCount",void 0),standardMaxRecordCount:De(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:De(e,"tileMaxRecordCount",void 0)}}_readQueryRelatedCapabilities(e){const t=e.advancedQueryCapabilities,r=xe(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:xe(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r}}_readEditingCapabilities(e){const t=e.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:xe(e,"allowGeometryUpdates",!0),supportsGlobalId:xe(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:xe(e,"supportsReturnServiceEditsInSourceSpatialReference",!1),supportsRollbackOnFailure:xe(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:xe(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:xe(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:xe(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:xe(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:xe(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:xe(t,"allowOthersToUpdate",!0)}}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.handles.remove("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}};e([x({readOnly:!0,json:{read:!1}})],Te.prototype,"capabilities",void 0),e([C("service","capabilities",["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"])],Te.prototype,"readCapabilities",null),e([x({json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Te.prototype,"charts",void 0),e([x({readOnly:!0})],Te.prototype,"createQueryVersion",null),e([x({type:String,json:{read:{source:"layerDefinition.copyrightText"},origins:{service:{read:{source:"copyrightText"}}}}})],Te.prototype,"copyright",void 0),e([x({type:String,json:{read:{source:"layerDefinition.displayField"},origins:{service:{read:{source:"displayField"}}}}})],Te.prototype,"displayField",void 0),e([x({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Te.prototype,"definitionExpression",void 0),e([x({types:a,readOnly:!0})],Te.prototype,"defaultSymbol",void 0),e([x({type:me})],Te.prototype,"dynamicDataSource",void 0),e([x({readOnly:!0})],Te.prototype,"editFieldsInfo",void 0),e([x({type:Boolean})],Te.prototype,"editingEnabled",void 0),e([C(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Te.prototype,"readEditingEnabled",null),e([C("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Te.prototype,"readEditingEnabledFromWebMap",null),e([T(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Te.prototype,"writeEditingEnabled",null),e([T("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Te.prototype,"writeEditingEnabledToWebMap",null),e([x({readOnly:!0})],Te.prototype,"editingInfo",void 0),e([C("editingInfo")],Te.prototype,"readEditingInfo",null),e([x(K)],Te.prototype,"elevationInfo",void 0),e([x(ne)],Te.prototype,"featureReduction",void 0),e([x({...Ce.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{read:!0},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Me}}}}})],Te.prototype,"fields",void 0),e([x(Ce.fieldsIndex)],Te.prototype,"fieldsIndex",void 0),e([x({type:de,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"},origins:{"web-scene":{write:!1}}}})],Te.prototype,"floorInfo",void 0),e([x({type:R,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Te.prototype,"formTemplate",void 0),e([x({type:A,json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}})],Te.prototype,"fullExtent",void 0),e([x()],Te.prototype,"gdbVersion",void 0),e([x({readOnly:!0,type:ue,json:{read:{source:"geometryProperties"}}})],Te.prototype,"geometryFieldsInfo",void 0),e([x({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:Se.read},"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Me,writer(e,t,r){const i=e?Se.toJSON(e):null;i&&w(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:Se.read}}})],Te.prototype,"geometryType",void 0),e([x({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}})],Te.prototype,"hasM",void 0),e([x({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasZ"}}})],Te.prototype,"hasZ",void 0),e([x({readOnly:!0,type:L})],Te.prototype,"heightModelInfo",void 0),e([x({type:Date})],Te.prototype,"historicMoment",void 0),e([x(X)],Te.prototype,"id",void 0),e([x({readOnly:!0,json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Te.prototype,"isTable",void 0),e([C("service","isTable",["type","geometryType"]),C("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Te.prototype,"readIsTable",null),e([T("web-map","isTable")],Te.prototype,"writeIsTable",null),e([x(Y)],Te.prototype,"opacity",void 0),e([x({type:Number,json:{origins:{service:{read:{source:"id"}}},read:!1}})],Te.prototype,"layerId",void 0),e([x(ee)],Te.prototype,"legendEnabled",void 0),e([x({type:["show","hide"]})],Te.prototype,"listMode",void 0),e([x(te)],Te.prototype,"minScale",void 0),e([C("service","minScale",["minScale","effectiveMinScale"])],Te.prototype,"readMinScale",null),e([x(re)],Te.prototype,"maxScale",void 0),e([C("service","maxScale",["maxScale","effectiveMaxScale"])],Te.prototype,"readMaxScale",null),e([x({type:String})],Te.prototype,"globalIdField",void 0),e([C("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"]),C("service","globalIdField",["globalIdField","fields"])],Te.prototype,"readGlobalIdFieldFromService",null),e([x({type:String,json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Me}}}}})],Te.prototype,"objectIdField",void 0),e([C("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"]),C("service","objectIdField",["objectIdField","fields"])],Te.prototype,"readObjectIdFieldFromService",null),e([x({value:"ArcGISSubtypeGroupLayer",type:["ArcGISSubtypeGroupLayer"]})],Te.prototype,"operationalLayerType",void 0),e([x(Ce.outFields)],Te.prototype,"outFields",void 0),e([x({readOnly:!0})],Te.prototype,"parsedUrl",null),e([x({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Te.prototype,"path",void 0),e([x({type:[ye],readOnly:!0})],Te.prototype,"relationships",void 0),e([x({types:o,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:s,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,t,r)=>({ignoreOrigin:null==r?void 0:r.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:null==r?void 0:r.writeLayerSchema})}}})],Te.prototype,"renderer",null),e([C("service","renderer",["drawingInfo.renderer","defaultSymbol"]),C("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Te.prototype,"readRenderer",null),e([x()],Te.prototype,"sourceJSON",void 0),e([x({type:Boolean})],Te.prototype,"returnM",void 0),e([x({type:Boolean})],Te.prototype,"returnZ",void 0),e([x(ie)],Te.prototype,"screenSizePerspectiveEnabled",void 0),e([x()],Te.prototype,"source",null),e([D("source")],Te.prototype,"castSource",null),e([C("portal-item","source",["featureSet"]),C("web-map","source",["featureSet"])],Te.prototype,"readSource",null),e([x({readOnly:!0})],Te.prototype,"serviceDefinitionExpression",void 0),e([C("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],Te.prototype,"readServiceDefinitionExpression",null),e([x({type:_,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:{source:"layerDefinition.extent.spatialReference"}}})],Te.prototype,"spatialReference",void 0),e([x({type:String})],Te.prototype,"subtypeField",void 0),e([x({type:p.ofType(ce),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const o=e.map((e=>new ce({subtypeCode:e.code,renderer:i(t.drawingInfo.renderer,t,r),title:e.name})));return new(p.ofType(ce))(o)}}}}}})],Te.prototype,"sublayers",void 0),e([x({type:he})],Te.prototype,"timeInfo",void 0),e([x()],Te.prototype,"title",void 0),e([C("service","title",["name"]),C("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Te.prototype,"readTitle",null),e([C("web-map","title",["layerDefinition.name","title"])],Te.prototype,"readTitleFromWebMap",null),e([x({type:String})],Te.prototype,"sublayerTitleMode",void 0),e([x({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],Te.prototype,"trackIdField",void 0),e([x({json:{read:!1}})],Te.prototype,"type",void 0),e([x({type:String})],Te.prototype,"typeIdField",void 0),e([C("service","typeIdField"),C("typeIdField",["layerDefinition.typeIdField"])],Te.prototype,"readTypeIdField",null),e([x({readOnly:!0,json:{write:!1}})],Te.prototype,"serverGens",void 0),e([x({type:p.ofType(se),readOnly:!0})],Te.prototype,"indexes",void 0),e([x(oe)],Te.prototype,"url",null),e([T("url")],Te.prototype,"writeUrl",null),e([x({readOnly:!0})],Te.prototype,"userIsAdmin",void 0),e([x({json:{origins:{service:{read:!0}},read:!1}})],Te.prototype,"version",void 0),e([C("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],Te.prototype,"readVersion",null),e([x({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Te.prototype,"visible",void 0),e([C("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Te.prototype,"readVisible",null),Te=e([M("esri.layers.SubtypeGroupLayer")],Te);const Oe=O({types:l}),Re=Te;export{Re as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import"../renderers/ClassBreaksRenderer.js";import"../renderers/DictionaryRenderer.js";import"../renderers/DotDensityRenderer.js";import"../renderers/HeatmapRenderer.js";import"../renderers/Renderer.js";import t from"../renderers/SimpleRenderer.js";import r from"../renderers/UniqueValueRenderer.js";import{read as i}from"../renderers/support/jsonUtils.js";import{rendererTypes as o,webSceneRendererTypes as s}from"../renderers/support/types.js";import a from"../request.js";import{symbolTypes as n,symbolTypesRenderer as l}from"../symbols.js";import p from"../core/Collection.js";import u from"../core/Error.js";import{HandleOwnerMixin as d}from"../core/HandleOwner.js";import c from"../core/Handles.js";import y from"../core/has.js";import{JSONMap as h}from"../core/jsonMap.js";import m from"../core/Logger.js";import{destroyMaybe as f,isSome as b,unwrapOr as g}from"../core/maybe.js";import{MultiOriginJSONMixin as v}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as w}from"../core/object.js";import{throwIfAbortError as S,throwIfAborted as I}from"../core/promiseUtils.js";import{parseWhereClause as F}from"../core/sql.js";import{urlToObject as j,join as x}from"../core/urlUtils.js";import{property as E}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as D}from"../core/accessorSupport/decorators/cast.js";import{reader as C}from"../core/accessorSupport/decorators/reader.js";import{subclass as M}from"../core/accessorSupport/decorators/subclass.js";import{writer as A}from"../core/accessorSupport/decorators/writer.js";import{createTypeReader as T}from"../core/accessorSupport/extensions/serializableProperty/reader.js";import O from"../form/FormTemplate.js";import R from"../geometry/Extent.js";import L from"../geometry/HeightModelInfo.js";import _ from"../geometry/SpatialReference.js";import P from"./Layer.js";import Q from"./graphics/sources/MemorySource.js";import{ArcGISService as q}from"./mixins/ArcGISService.js";import{BlendLayer as G}from"./mixins/BlendLayer.js";import{CustomParametersMixin as U}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as V}from"./mixins/OperationalLayer.js";import{PortalLayer as B}from"./mixins/PortalLayer.js";import{RefreshableLayer as z}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as N}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as W}from"./mixins/TemporalLayer.js";import{titleFromUrlAndName as k,parse as $,cleanTitle as Z,sanitizeUrlWithLayerId as H,writeUrlWithLayerId as J}from"./support/arcgisLayerUrl.js";import{elevationInfo as K,id as X,opacityDrawingInfo as Y,legendEnabled as ee,minScale as te,maxScale as re,screenSizePerspectiveEnabled as ie,url as oe}from"./support/commonProperties.js";import{FeatureIndex as se}from"./support/FeatureIndex.js";import{featureReductionProperty as ae}from"./support/featureReductionUtils.js";import{defineFieldProperties as ne}from"./support/fieldProperties.js";import{fixRendererFields as le,fixTimeInfoFields as pe}from"./support/fieldUtils.js";import ue from"./support/GeometryFieldsInfo.js";import de from"./support/LayerFloorInfo.js";import ce from"./support/Relationship.js";import ye from"./support/SubtypeSublayer.js";import he from"./support/TimeInfo.js";import{DataLayerSource as me}from"./support/source/DataLayerSource.js";import{loadStyleRenderer as fe}from"../renderers/support/styleUtils.js";import be from"../rest/support/AttachmentQuery.js";import ge from"../rest/support/FeatureSet.js";import ve from"../rest/support/Query.js";import we from"../rest/support/RelationshipQuery.js";const Se=new h({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"}),Ie={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},Fe="SubtypeGroupLayer",je=m.getLogger("esri.layers.SubtypeGroupLayer");function xe(e){return e&&e instanceof p}function Ee(e,t,r){return!!(e&&e.hasOwnProperty(t)?e[t]:r)}function De(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}function Ce(e){var t;const r=null==e||null==(t=e.supportedSpatialAggregationStatistics)?void 0:t.map((e=>e.toLowerCase()));return{envelope:!(null==r||!r.includes("envelopeaggregate")),centroid:!(null==r||!r.includes("centroidaggregate")),convexHull:!(null==r||!r.includes("convexhullaggregate"))}}const Me=ne();function Ae(e,t,r){const i=!(null==r||!r.writeLayerSchema);return{enabled:i,ignoreOrigin:i}}let Te=class extends(G(W(N(z(q(V(B(v(U(d(P))))))))))){constructor(...e){super(...e),this._handles=new c,this.capabilities=null,this.charts=null,this.copyright=null,this.displayField=null,this.definitionExpression=null,this.dynamicDataSource=null,this.editFieldsInfo=null,this.editingEnabled=!0,this.editingInfo=null,this.elevationInfo=null,this.featureReduction=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.formTemplate=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.isTable=!1,this.layerId=void 0,this.legendEnabled=!0,this.minScale=0,this.maxScale=0,this.globalIdField=null,this.objectIdField=null,this.outFields=null,this.path=null,this.relationships=null,this.sourceJSON=null,this.returnM=void 0,this.returnZ=void 0,this.screenSizePerspectiveEnabled=!0,this.serviceDefinitionExpression=null,this.spatialReference=_.WGS84,this.subtypeField=null,this.sublayers=new(p.ofType(ye)),this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.trackIdField=null,this.type="subtype-group",this.typeIdField=null,this.indexes=new(p.ofType(se)),this.userIsAdmin=!1,this.version=void 0,this.visible=!0,this._handles.add(this.watch("sublayers",((e,t)=>this._handleSublayersChange(e,t)),!0))}destroy(){var e;null==(e=this.source)||e.destroy(),this._handles=f(this._handles)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=b(e)?e.signal:null;if(this.portalItem&&this.portalItem.loaded&&this.source)return void this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this._initLayerProperties(e))));const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(S).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new u("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,{attachment:this._readAttachmentCapabilities(t.attachmentProperties),data:this._readDataCapabilities(t),metadata:this._readMetadataCapabilities(t),operations:this._readOperationsCapabilities(t.capabilities||e,t),query:this._readQueryCapabilities(t),queryRelated:this._readQueryRelatedCapabilities(t),editing:this._readEditingCapabilities(t)}}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")||0)+1}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}readIsTable(e,t){return"Table"===(t=t&&t.layerDefinition||t).type||!t.geometryType}writeIsTable(e,t,r,i){null!=i&&i.writeLayerSchema&&w(r,e?"Table":"Feature Layer",t)}readMinScale(e,t){return t.effectiveMinScale||e||0}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const r of t.fields)if("esriFieldTypeGlobalID"===r.type)return r.name}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;if(t.fields)for(const r of t.fields)if("esriFieldTypeOID"===r.type)return r.name}get parsedUrl(){const e=this.url?j(this.url):null;return null!=e&&(null!=this.dynamicDataSource?e.path=x(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=x(e.path,this.layerId.toString()))),e}set renderer(e){le(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,o,s){const a=(o=o.layerDefinition||o).drawingInfo&&o.drawingInfo.renderer||void 0;if(a){const e=i(a,o,s)||void 0;return e||je.error("Failed to create renderer",{rendererDefinition:o.drawingInfo.renderer,layer:this,context:s}),e}if(o.defaultSymbol)return o.types&&o.types.length?new r({defaultSymbol:Oe(o.defaultSymbol,o,s),field:o.typeIdField,uniqueValueInfos:o.types.map((e=>({id:e.id,symbol:Oe(e.symbol,e,s)})))}):new t({symbol:Oe(o.defaultSymbol,o,s)})}set source(e){const t=this._get("source");t!==e&&(xe(t)&&this._resetMemorySource(t),xe(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof p?new Q({layer:this,items:e}):e:null}readSource(e,t){const r=ge.fromJSON(t.featureSet);return new Q({layer:this,items:r&&r.features||[]})}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readTitle(e,t){const r=t.layerDefinition&&t.layerDefinition.name||t.name,i=t.title||t.layerDefinition&&t.layerDefinition.title;if(r){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?k(this.url,r):r;let t=r;if(!t&&this.url){const e=$(this.url);b(e)&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),Z(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition&&t.layerDefinition.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}set url(e){const t=H({layer:this,url:e,nonStandardUrlAllowed:!0,logger:je});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){J(this,e,null,t,i)}readVersion(e,t){return t.currentVersion?t.currentVersion:t.hasOwnProperty("capabilities")||t.hasOwnProperty("drawingInfo")||t.hasOwnProperty("hasAttachments")||t.hasOwnProperty("htmlPopupType")||t.hasOwnProperty("relationships")||t.hasOwnProperty("timeInfo")||t.hasOwnProperty("typeIdField")||t.hasOwnProperty("types")?10:9.3}readVisible(e,t){return t.layerDefinition&&null!=t.layerDefinition.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}addAttachment(e,t){return this.load().then((()=>this._checkAttachmentSupport(e))).then((()=>{if(!("addAttachment"in this.source))throw new u(Fe,"Layer source does not support addAttachment capability");return this.source.addAttachment(e,t)}))}updateAttachment(e,t,r){return this.load().then((()=>this._checkAttachmentSupport(e))).then((()=>{if(!("updateAttachment"in this.source))throw new u(Fe,"Layer source does not support updateAttachment capability");return this.source.updateAttachment(e,t,r)}))}async applyEdits(e,t){const r=await import("./graphics/editingSupport.js");return await this.load(),r.applyEdits(this,this.source,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){if(this._hasMemorySource())return this.emit("graphics-source-create",{graphicsSource:this.source}),this.source.load({signal:e});const t=await import("./graphics/sources/FeatureLayerSource.js");I(e);const r=await new t.default({layer:this}).load({signal:e});return this.emit("graphics-source-create",{graphicsSource:r}),r}createQuery(){const e=new ve,t=this.get("capabilities.data"),r=this.sublayers.map((e=>e.subtypeCode));e.dynamicDataSource=this.dynamicDataSource,e.gdbVersion=this.gdbVersion,e.historicMoment=this.historicMoment,e.returnGeometry=!0,t&&(t.supportsZ&&null!=this.returnZ&&(e.returnZ=this.returnZ),t.supportsM&&null!=this.returnM&&(e.returnM=this.returnM)),e.outFields=["*"],e.where=`${this.subtypeField} IN (${r.join(",")})`,this.definitionExpression&&(e.where+=` AND (${this.definitionExpression})`);const{timeOffset:i,timeExtent:o}=this;return e.timeExtent=null!=i&&null!=o?o.offset(-i.value,i.unit):o||null,e.multipatchOption="multipatch"===this.geometryType?"xyFootprint":null,e}deleteAttachments(e,t){return this.load().then((()=>this._checkAttachmentSupport(e))).then((()=>{if(!("deleteAttachments"in this.source))throw new u(Fe,"Layer source does not support deleteAttachments capability");return this.source.deleteAttachments(e,t)}))}fetchRecomputedExtents(e){return this.load({signal:null==e?void 0:e.signal}).then((()=>{if(this.source.fetchRecomputedExtents)return this.source.fetchRecomputedExtents(e);throw new u(Fe,"Layer source does not support fetchUpdates capability")}))}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}queryAttachments(e,t){return e=be.from(e),this.load().then((()=>{if(!this.get("capabilities.data.supportsAttachment"))throw new u(Fe,"this layer doesn't support attachments");const{attachmentTypes:t,objectIds:r,globalIds:i,num:o,size:s,start:a,where:n}=e;if(!this.get("capabilities.operations.supportsQueryAttachments")){const l=r&&r.length>1,p=t&&t.length,d=i&&i.length,c=s&&s.length;if(l||p||d||c||o||a||n)throw new u(Fe,"when 'supportsQueryAttachments' is false, only objectIds of length 1 are supported",e)}if(!(r&&r.length||n))throw new u(Fe,"'objectIds' or 'where' are required to perform attachment query",e);if(!("queryAttachments"in this.source))throw new u(Fe,"Layer source does not support queryAttachments capability",e);return this.source.queryAttachments(e)}))}queryFeatures(e,t){const r=ve.from(e)||this.createQuery(),i=g(r.outFields,[]);return i.find((e=>e===this.subtypeField))||(i.push(this.subtypeField),r.outFields=i),this.load().then((()=>this.source.queryFeatures(r,t))).then((e=>{if(null!=e&&e.features)for(const t of e.features)t.layer=this._findSublayerForFeature(t),t.sourceLayer=this;return e}))}_findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),r=e.attributes[t.name];return this.sublayers.find((e=>e.subtypeCode===r))}queryObjectIds(e,t){return this.load().then((()=>{if(this.source.queryObjectIds)return this.source.queryObjectIds(ve.from(e)||this.createQuery(),t);throw new u(Fe,"Layer source does not support queryObjectIds capability")}))}queryFeatureCount(e,t){return this.load().then((()=>{if(this.source.queryFeatureCount)return this.source.queryFeatureCount(ve.from(e)||this.createQuery(),t);throw new u(Fe,"Layer source does not support queryFeatureCount capability")}))}queryExtent(e,t){return this.load().then((()=>{if(this.source.queryExtent)return this.source.queryExtent(ve.from(e)||this.createQuery(),t);throw new u(Fe,"Layer source does not support queryExtent capability")}))}queryRelatedFeatures(e,t){return this.load().then((()=>{if("queryRelatedFeatures"in this.source)return this.source.queryRelatedFeatures(we.from(e),t);throw new u(Fe,"Layer source does not support queryRelatedFeatures capability")}))}queryRelatedFeaturesCount(e,t){return this.load().then((()=>{if("queryRelatedFeaturesCount"in this.source)return this.source.queryRelatedFeaturesCount(we.from(e),t);throw new u(Fe,"Layer source does not support queryRelatedFeaturesCount capability")}))}read(e,t){const r=e.featureCollection;if(r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&this.revert(["objectIdField","fields","timeInfo","spatialReference"],"service")}write(e,t){var r,i;const o=(t={...t,writeLayerSchema:null!=(r=null==(i=t)?void 0:i.writeLayerSchema)?r:this._hasMemorySource()}).origin,s=t.layerContainerType,a=t.messages;if(this.isTable){if("web-scene"===o||"web-map"===o&&"tables"!==s)return a&&a.push(new u("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Table source cannot be written to web scenes and web maps`,{layer:this})),null;if(this._hasMemorySource())return a&&a.push(new u("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using an in-memory Table source cannot be written to web scenes and web maps`,{layer:this})),null}else if(this.loaded&&"web-map"===o&&"tables"===s)return a&&a.push(new u("layer:unsupported",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a non-table source cannot be written to tables in web maps`,{layer:this})),null;return super.write(e,t)}_readEditingEnabled(e,t,r){var i;let o=null==(i=e.layerDefinition)?void 0:i.capabilities;return o?this._hasEditingCapability(o):(o=e.capabilities,!(t&&"web-map"===(null==r?void 0:r.origin)&&!this._hasMemorySource()&&o)||this._hasEditingCapability(o))}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){var o,s;const e=null!=(o=this.capabilities)&&null!=(s=o.operations)&&s.supportsSync?"Query,Sync":"Query";w("layerDefinition.capabilities",e,t),!r||null!=i&&i.writeLayerSchema||(t.capabilities=e)}}_checkAttachmentSupport(e){const{attributes:t}=e,{objectIdField:r}=this;return this.get("capabilities.data.supportsAttachment")?e?t?t[r]?void 0:Promise.reject(new u(Fe,`feature is missing the identifying attribute ${r}`)):Promise.reject(new u(Fe,"'attributes' are required on a feature to query attachments")):Promise.reject(new u(Fe,"A feature is required to add/delete/update attachments")):Promise.reject(new u(Fe,"this layer doesn't support attachments"))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstLayerId(e){return a(this.url,{query:{f:"json",...this.customParameters},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}))}async _initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",url:this.parsedUrl})),this._verifySource(),this._verifyFields(),le(this.renderer,this.fieldsIndex),pe(this.timeInfo,this.fieldsIndex),fe(this,{origin:"service"})}async hasDataChanged(){var e;if(null!=(e=this.source)&&e.refresh)try{var t;const{dataChanged:e,updates:r}=await(null==(t=this.source)?void 0:t.refresh());if(b(r)&&(this.sourceJSON={...this.sourceJSON,...r},this.read(r,{origin:"service",url:this.parsedUrl})),e)return!0}catch{}if(this.definitionExpression)try{return(await F(this.definitionExpression,this.fieldsIndex)).hasDateFunctions}catch{}return!1}_verifyFields(){const e=this.parsedUrl&&this.parsedUrl.path||"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields&&this.fields.some((function(e){return"geometry"===e.type}))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new u("feature-layer:mixed-source-and-url","SubtypeGroupLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new u("feature-layer:source-or-url-required","SubtypeGroupLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this._handles.add([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this._handles.remove("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}_readAttachmentCapabilities(e){const t={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1};return e&&Array.isArray(e)&&e.forEach((e=>{const r=Ie[e.name];r&&(t[r]=!!e.isEnabled)})),t}_readDataCapabilities(e){return{isVersioned:Ee(e,"isDataVersioned",!1),supportsAttachment:Ee(e,"hasAttachments",!1),supportsM:Ee(e,"hasM",!1),supportsZ:Ee(e,"hasZ",!1)}}_readMetadataCapabilities(e){return{supportsAdvancedFieldProperties:Ee(e,"supportsFieldDescriptionProperty",!1)}}_readOperationsCapabilities(e,t){const r=e?e.toLowerCase().split(",").map((e=>e.trim())):[],i=-1!==r.indexOf("editing");let o=i&&-1!==r.indexOf("create"),s=i&&-1!==r.indexOf("delete"),a=i&&-1!==r.indexOf("update");const n=-1!==r.indexOf("changetracking");return i&&!(o||s||a)&&(o=s=a=!0),{supportsCalculate:Ee(t,"supportsCalculate",!1),supportsTruncate:Ee(t,"supportsTruncate",!1),supportsValidateSql:Ee(t,"supportsValidateSql",!1),supportsAdd:o,supportsDelete:s,supportsEditing:i,supportsChangeTracking:n,supportsQuery:-1!==r.indexOf("query"),supportsQueryAttachments:Ee(t.advancedQueryCapabilities,"supportsQueryAttachments",!1),supportsResizeAttachments:Ee(t,"supportsAttachmentsResizing",!1),supportsSync:-1!==r.indexOf("sync"),supportsUpdate:a,supportsExceedsLimitStatistics:Ee(t,"supportsExceedsLimitStatistics",!1)}}_readQueryCapabilities(e){var t;const r=e.advancedQueryCapabilities,i=e.ownershipBasedAccessControlForFeatures,o=e.archivingInfo,s=null==(t=this.url)?void 0:t.includes("MapServer"),a=!y("mapserver-pbf-enabled")&&s&&this.version<10.81,n=(e.supportedQueryFormats||"").split(",").reduce(((e,t)=>{const r=t.toLowerCase().trim();return r&&e.add(r),e}),new Set);return{supportsStatistics:Ee(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:Ee(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:Ee(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:Ce(r),supportsCentroid:Ee(r,"supportsReturningGeometryCentroid",!1),supportsDistance:Ee(r,"supportsQueryWithDistance",!1),supportsDistinct:Ee(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:Ee(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:Ee(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:Ee(r,"supportsHavingClause",!1),supportsOrderBy:Ee(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:Ee(r,"supportsPagination",!1),supportsQuantization:Ee(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:Ee(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:Ee(e,"supportsReturningQueryGeometry",!1),supportsResultType:Ee(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:Ee(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:Ee(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:Ee(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:Ee(r,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:Ee(i,"allowOthersToQuery",!0),supportsHistoricMoment:Ee(o,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:!a&&n.has("pbf"),supportsDisjointSpatialRelationship:Ee(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:Ee(r,"supportsQueryWithCacheHint",!1),maxRecordCountFactor:De(e,"maxRecordCountFactor",void 0),maxRecordCount:De(e,"maxRecordCount",void 0),standardMaxRecordCount:De(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:De(e,"tileMaxRecordCount",void 0)}}_readQueryRelatedCapabilities(e){const t=e.advancedQueryCapabilities,r=Ee(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:Ee(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r}}_readEditingCapabilities(e){const t=e.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:Ee(e,"allowGeometryUpdates",!0),supportsGlobalId:Ee(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:Ee(e,"supportsReturnServiceEditsInSourceSpatialReference",!1),supportsRollbackOnFailure:Ee(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:Ee(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:Ee(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:Ee(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:Ee(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:Ee(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:Ee(t,"allowOthersToUpdate",!0)}}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.handles.remove("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}};e([E({readOnly:!0,json:{read:!1}})],Te.prototype,"capabilities",void 0),e([C("service","capabilities",["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"])],Te.prototype,"readCapabilities",null),e([E({json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Te.prototype,"charts",void 0),e([E({readOnly:!0})],Te.prototype,"createQueryVersion",null),e([E({type:String,json:{read:{source:"layerDefinition.copyrightText"},origins:{service:{read:{source:"copyrightText"}}}}})],Te.prototype,"copyright",void 0),e([E({type:String,json:{read:{source:"layerDefinition.displayField"},origins:{service:{read:{source:"displayField"}}}}})],Te.prototype,"displayField",void 0),e([E({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Te.prototype,"definitionExpression",void 0),e([E({types:n,readOnly:!0})],Te.prototype,"defaultSymbol",void 0),e([E({type:me})],Te.prototype,"dynamicDataSource",void 0),e([E({readOnly:!0})],Te.prototype,"editFieldsInfo",void 0),e([E({type:Boolean})],Te.prototype,"editingEnabled",void 0),e([C(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Te.prototype,"readEditingEnabled",null),e([C("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Te.prototype,"readEditingEnabledFromWebMap",null),e([A(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Te.prototype,"writeEditingEnabled",null),e([A("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Te.prototype,"writeEditingEnabledToWebMap",null),e([E({readOnly:!0})],Te.prototype,"editingInfo",void 0),e([C("editingInfo")],Te.prototype,"readEditingInfo",null),e([E(K)],Te.prototype,"elevationInfo",void 0),e([E(ae)],Te.prototype,"featureReduction",void 0),e([E({...Me.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{read:!0},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Ae}}}}})],Te.prototype,"fields",void 0),e([E(Me.fieldsIndex)],Te.prototype,"fieldsIndex",void 0),e([E({type:de,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"},origins:{"web-scene":{write:!1}}}})],Te.prototype,"floorInfo",void 0),e([E({type:O,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Te.prototype,"formTemplate",void 0),e([E({type:R,json:{origins:{service:{read:{source:"extent"}}},read:{source:"layerDefinition.extent"}}})],Te.prototype,"fullExtent",void 0),e([E()],Te.prototype,"gdbVersion",void 0),e([E({readOnly:!0,type:ue,json:{read:{source:"geometryProperties"}}})],Te.prototype,"geometryFieldsInfo",void 0),e([E({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:Se.read},"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Ae,writer(e,t,r){const i=e?Se.toJSON(e):null;i&&w(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:Se.read}}})],Te.prototype,"geometryType",void 0),e([E({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasM"}}})],Te.prototype,"hasM",void 0),e([E({type:Boolean,json:{origins:{service:{read:!0}},read:{source:"layerDefinition.hasZ"}}})],Te.prototype,"hasZ",void 0),e([E({readOnly:!0,type:L})],Te.prototype,"heightModelInfo",void 0),e([E({type:Date})],Te.prototype,"historicMoment",void 0),e([E(X)],Te.prototype,"id",void 0),e([E({readOnly:!0,json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Te.prototype,"isTable",void 0),e([C("service","isTable",["type","geometryType"]),C("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Te.prototype,"readIsTable",null),e([A("web-map","isTable")],Te.prototype,"writeIsTable",null),e([E(Y)],Te.prototype,"opacity",void 0),e([E({type:Number,json:{origins:{service:{read:{source:"id"}}},read:!1}})],Te.prototype,"layerId",void 0),e([E(ee)],Te.prototype,"legendEnabled",void 0),e([E({type:["show","hide"]})],Te.prototype,"listMode",void 0),e([E(te)],Te.prototype,"minScale",void 0),e([C("service","minScale",["minScale","effectiveMinScale"])],Te.prototype,"readMinScale",null),e([E(re)],Te.prototype,"maxScale",void 0),e([C("service","maxScale",["maxScale","effectiveMaxScale"])],Te.prototype,"readMaxScale",null),e([E({type:String})],Te.prototype,"globalIdField",void 0),e([C("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"]),C("service","globalIdField",["globalIdField","fields"])],Te.prototype,"readGlobalIdFieldFromService",null),e([E({type:String,json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Ae}}}}})],Te.prototype,"objectIdField",void 0),e([C("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"]),C("service","objectIdField",["objectIdField","fields"])],Te.prototype,"readObjectIdFieldFromService",null),e([E({value:"ArcGISSubtypeGroupLayer",type:["ArcGISSubtypeGroupLayer"]})],Te.prototype,"operationalLayerType",void 0),e([E(Me.outFields)],Te.prototype,"outFields",void 0),e([E({readOnly:!0})],Te.prototype,"parsedUrl",null),e([E({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Te.prototype,"path",void 0),e([E({type:[ce],readOnly:!0})],Te.prototype,"relationships",void 0),e([E({types:o,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:s,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,t,r)=>({ignoreOrigin:null==r?void 0:r.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:null==r?void 0:r.writeLayerSchema})}}})],Te.prototype,"renderer",null),e([C("service","renderer",["drawingInfo.renderer","defaultSymbol"]),C("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Te.prototype,"readRenderer",null),e([E()],Te.prototype,"sourceJSON",void 0),e([E({type:Boolean})],Te.prototype,"returnM",void 0),e([E({type:Boolean})],Te.prototype,"returnZ",void 0),e([E(ie)],Te.prototype,"screenSizePerspectiveEnabled",void 0),e([E()],Te.prototype,"source",null),e([D("source")],Te.prototype,"castSource",null),e([C("portal-item","source",["featureSet"]),C("web-map","source",["featureSet"])],Te.prototype,"readSource",null),e([E({readOnly:!0})],Te.prototype,"serviceDefinitionExpression",void 0),e([C("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],Te.prototype,"readServiceDefinitionExpression",null),e([E({type:_,json:{origins:{service:{read:{source:"extent.spatialReference"}}},read:{source:"layerDefinition.extent.spatialReference"}}})],Te.prototype,"spatialReference",void 0),e([E({type:String})],Te.prototype,"subtypeField",void 0),e([E({type:p.ofType(ye),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,r)=>{const o=e.map((e=>new ye({subtypeCode:e.code,renderer:i(t.drawingInfo.renderer,t,r),title:e.name})));return new(p.ofType(ye))(o)}}}}}})],Te.prototype,"sublayers",void 0),e([E({type:he})],Te.prototype,"timeInfo",void 0),e([E()],Te.prototype,"title",void 0),e([C("service","title",["name"]),C("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Te.prototype,"readTitle",null),e([C("web-map","title",["layerDefinition.name","title"])],Te.prototype,"readTitleFromWebMap",null),e([E({type:String})],Te.prototype,"sublayerTitleMode",void 0),e([E({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],Te.prototype,"trackIdField",void 0),e([E({json:{read:!1}})],Te.prototype,"type",void 0),e([E({type:String})],Te.prototype,"typeIdField",void 0),e([C("service","typeIdField"),C("typeIdField",["layerDefinition.typeIdField"])],Te.prototype,"readTypeIdField",null),e([E({readOnly:!0,json:{write:!1}})],Te.prototype,"serverGens",void 0),e([E({type:p.ofType(se),readOnly:!0})],Te.prototype,"indexes",void 0),e([E(oe)],Te.prototype,"url",null),e([A("url")],Te.prototype,"writeUrl",null),e([E({readOnly:!0})],Te.prototype,"userIsAdmin",void 0),e([E({json:{origins:{service:{read:!0}},read:!1}})],Te.prototype,"version",void 0),e([C("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],Te.prototype,"readVersion",null),e([E({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Te.prototype,"visible",void 0),e([C("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Te.prototype,"readVisible",null),Te=e([M("esri.layers.SubtypeGroupLayer")],Te);const Oe=T({types:l}),Re=Te;export{Re 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.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import r from"../core/Error.js";import{clone as o}from"../core/lang.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s,createTask as l}from"../core/promiseUtils.js";import{urlToObject as a,addQueryParameters as n,isProtocolRelative as p,normalize as y}from"../core/urlUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import{reader as c}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as h}from"../core/accessorSupport/decorators/writer.js";import d from"../geometry/Extent.js";import f from"../geometry/SpatialReference.js";import S from"./Layer.js";import{APIKeyMixin as g}from"./mixins/APIKeyMixin.js";import{ArcGISCachedService as v}from"./mixins/ArcGISCachedService.js";import{ArcGISService as _}from"./mixins/ArcGISService.js";import{BlendLayer as j}from"./mixins/BlendLayer.js";import{CustomParametersMixin as b}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as I}from"./mixins/OperationalLayer.js";import{PortalLayer as T}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as w}from"./mixins/ScaleRangeLayer.js";import{checkWebPSupport as L}from"./support/imageUtils.js";import x from"./support/SpriteSource.js";import U from"./support/TileInfo.js";import{loadMetadata as O}from"./support/vectorTileLayerLoader.js";import{createForItem as P}from"../portal/support/jsonContext.js";import R from"../views/2d/engine/vectorTiles/SchemaHelper.js";import{areSchemasOverlapping as M,unionTileInfos as V}from"../views/2d/engine/vectorTiles/tileInfoUtils.js";import C from"../views/2d/engine/vectorTiles/style/StyleRepository.js";import{getWebGL1Capabilities as D}from"../views/webgl/capabilities.js";let k=class extends(j(w(v(_(I(T(b(g(i(S)))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.style=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.type="vector-tile",this.url=null,this.symbolCollisionBoxesVisible=!1,this.path=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const r=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(s).then((async()=>{if(!this.portalItem||!this.portalItem.id)return;const r=`${this.portalItem.itemUrl}/resources/styles/root.json`;(await t(r,{...e,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:r},P(this.portalItem))})).catch(s).then((()=>this._loadStyle(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e&&e.serviceUrl&&a(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?n(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){var e;return(null==(e=this.primarySource)?void 0:e.fullExtent)||null}get parsedUrl(){return this.serviceUrl?a(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo&&this.currentStyleInfo.serviceUrl||null}get spatialReference(){return this.tileInfo&&this.tileInfo.spatialReference||null}get styleUrl(){return this.currentStyleInfo&&this.currentStyleInfo.styleUrl||null}writeStyleUrl(e,t){e&&p(e)&&(e=`https:${e}`),t.styleUrl=e}get tileInfo(){var e;const t=[];for(const o in this.sourceNameToSource)t.push(this.sourceNameToSource[o]);let r=(null==(e=this.primarySource)?void 0:e.tileInfo)||new U;if(t.length>1)for(let o=0;o<t.length;o++)M(r,t[o].tileInfo)&&(r=V(r,t[o].tileInfo));return r}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}get compatibleTileInfo256(){return R.create256x256CompatibleTileInfo(this.tileInfo)}get compatibleTileInfo512(){return R.create512x512CompatibleTileInfo(this.tileInfo)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){var r;const o=D().maxTextureSize,i=null!=(r=this.currentStyleInfo)&&r.spriteUrl?n(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new x(i,e,o,this.currentStyleInfo.spriteFormat);await s.load(t),this._spriteSourceMap.set(e,s)}return Promise.resolve(this._spriteSourceMap.get(e))}async loadStyle(e,t){var r;const o=e||this.style||this.url;return this._loadingTask&&"string"==typeof o&&this.url===o||(null==(r=this._loadingTask)||r.abort(),this._loadingTask=l((e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(o,{signal:e}))),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return o(this.styleRepository.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const o=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||o})}getStyleLayer(e){return o(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return o(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return null!=t&&t.origin&&!this.styleUrl?(t.messages&&t.messages.push(new r("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await O(e,{...t,query:{...this.customParameters,token:this.apiKey}});if("webp"===r.spriteFormat){await L("lossy")||(r.spriteFormat="png")}this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new C(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),r=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!t)return;const o=t[2]&&t[2].toLowerCase();if(!o)return;const i=t[1]||"";for(const s of r)if(s.toLowerCase().includes(o))return y(`//static.arcgis.com/attribution/Vector${i}/${s}`)}async _loadStyle(e){var t,r;return null!=(t=null==(r=this._loadingTask)?void 0:r.promise)?t:this.loadStyle(null,e)}};e([u({readOnly:!0})],k.prototype,"attributionDataUrl",null),e([u({type:["show","hide"]})],k.prototype,"listMode",void 0),e([u({readOnly:!0,json:{read:!1}})],k.prototype,"capabilities",null),e([u({readOnly:!0})],k.prototype,"currentStyleInfo",void 0),e([u({json:{read:!1},readOnly:!0,type:d})],k.prototype,"fullExtent",null),e([u()],k.prototype,"style",void 0),e([u({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],k.prototype,"isReference",void 0),e([u({type:["VectorTileLayer"]})],k.prototype,"operationalLayerType",void 0),e([u({readOnly:!0})],k.prototype,"parsedUrl",null),e([u({readOnly:!0})],k.prototype,"serviceUrl",null),e([u({type:f,readOnly:!0})],k.prototype,"spatialReference",null),e([u({readOnly:!0})],k.prototype,"styleRepository",void 0),e([u({readOnly:!0})],k.prototype,"sourceNameToSource",void 0),e([u({readOnly:!0})],k.prototype,"primarySource",void 0),e([u({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],k.prototype,"styleUrl",null),e([h(["portal-item","web-document"],"styleUrl")],k.prototype,"writeStyleUrl",null),e([u({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:U})],k.prototype,"tileInfo",null),e([u({json:{read:!1},readOnly:!0,value:"vector-tile"})],k.prototype,"type",void 0),e([u({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],k.prototype,"url",void 0),e([u({readOnly:!0})],k.prototype,"version",void 0),e([c("version",["version","currentVersion"])],k.prototype,"readVersion",null),e([u({readOnly:!0})],k.prototype,"compatibleTileInfo256",null),e([u({readOnly:!0})],k.prototype,"compatibleTileInfo512",null),e([u({type:Boolean})],k.prototype,"symbolCollisionBoxesVisible",void 0),e([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],k.prototype,"path",void 0),k=e([m("esri.layers.VectorTileLayer")],k);const B=k;export{B as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../request.js";import r from"../core/Error.js";import{clone as o}from"../core/lang.js";import{MultiOriginJSONMixin as i}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as s,createTask as l}from"../core/promiseUtils.js";import{urlToObject as a,addQueryParameters as n,isProtocolRelative as p,normalize as y}from"../core/urlUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import"../core/accessorSupport/ensureType.js";import{reader as c}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{writer as h}from"../core/accessorSupport/decorators/writer.js";import d from"../geometry/Extent.js";import f from"../geometry/SpatialReference.js";import S from"./Layer.js";import{APIKeyMixin as g}from"./mixins/APIKeyMixin.js";import{ArcGISCachedService as v}from"./mixins/ArcGISCachedService.js";import{ArcGISService as j}from"./mixins/ArcGISService.js";import{BlendLayer as _}from"./mixins/BlendLayer.js";import{CustomParametersMixin as b}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as I}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as w}from"./mixins/ScaleRangeLayer.js";import{checkWebPSupport as L}from"./support/imageUtils.js";import x from"./support/SpriteSource.js";import O from"./support/TileInfo.js";import{loadMetadata as U}from"./support/vectorTileLayerLoader.js";import{createForItem as P}from"../portal/support/jsonContext.js";import R from"../views/2d/engine/vectorTiles/SchemaHelper.js";import{areSchemasOverlapping as M,unionTileInfos as V}from"../views/2d/engine/vectorTiles/tileInfoUtils.js";import C from"../views/2d/engine/vectorTiles/style/StyleRepository.js";import{getWebGL1Capabilities as D}from"../views/webgl/capabilities.js";let N=class extends(_(w(v(j(T(I(b(g(i(S)))))))))){constructor(...e){super(...e),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.style=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.type="vector-tile",this.url=null,this.symbolCollisionBoxesVisible=!1,this.path=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){if(this.sourceNameToSource)for(const e of Object.values(this.sourceNameToSource))null==e||e.destroy();this._spriteSourceMap.clear()}async prefetchResources(e){await this.loadSpriteSource(globalThis.devicePixelRatio||1,e)}load(e){const r=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},e).catch(s).then((async()=>{if(!this.portalItem||!this.portalItem.id)return;const r=`${this.portalItem.itemUrl}/resources/styles/root.json`;(await t(r,{...e,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:r},P(this.portalItem))})).catch(s).then((()=>this._loadStyle(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get attributionDataUrl(){const e=this.currentStyleInfo,t=e&&e.serviceUrl&&a(e.serviceUrl);if(!t)return null;const r=this._getDefaultAttribution(t.path);return r?n(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const e=this.primarySource;return e?e.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){var e;return(null==(e=this.primarySource)?void 0:e.fullExtent)||null}get parsedUrl(){return this.serviceUrl?a(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo&&this.currentStyleInfo.serviceUrl||null}get spatialReference(){return this.tileInfo&&this.tileInfo.spatialReference||null}get styleUrl(){return this.currentStyleInfo&&this.currentStyleInfo.styleUrl||null}writeStyleUrl(e,t){e&&p(e)&&(e=`https:${e}`),t.styleUrl=e}get tileInfo(){var e;const t=[];for(const o in this.sourceNameToSource)t.push(this.sourceNameToSource[o]);let r=(null==(e=this.primarySource)?void 0:e.tileInfo)||new O;if(t.length>1)for(let o=0;o<t.length;o++)M(r,t[o].tileInfo)&&(r=V(r,t[o].tileInfo));return r}readVersion(e,t){return t.version?parseFloat(t.version):parseFloat(t.currentVersion)}get compatibleTileInfo256(){return R.create256x256CompatibleTileInfo(this.tileInfo)}get compatibleTileInfo512(){return R.create512x512CompatibleTileInfo(this.tileInfo)}async loadSpriteSource(e=1,t){if(!this._spriteSourceMap.has(e)){var r;const o=D().maxTextureSize,i=null!=(r=this.currentStyleInfo)&&r.spriteUrl?n(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,s=new x(i,e,o,this.currentStyleInfo.spriteFormat);await s.load(t),this._spriteSourceMap.set(e,s)}return Promise.resolve(this._spriteSourceMap.get(e))}async loadStyle(e,t){var r;const o=e||this.style||this.url;return this._loadingTask&&"string"==typeof o&&this.url===o||(null==(r=this._loadingTask)||r.abort(),this._loadingTask=l((e=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(o,{signal:e}))),t)),this._loadingTask.promise}getStyleLayerId(e){return this.styleRepository.getStyleLayerId(e)}getStyleLayerIndex(e){return this.styleRepository.getStyleLayerIndex(e)}getPaintProperties(e){return o(this.styleRepository.getPaintProperties(e))}setPaintProperties(e,t){const r=this.styleRepository.isPainterDataDriven(e);this.styleRepository.setPaintProperties(e,t);const o=this.styleRepository.isPainterDataDriven(e);this.emit("paint-change",{layer:e,paint:t,isDataDriven:r||o})}getStyleLayer(e){return o(this.styleRepository.getStyleLayer(e))}setStyleLayer(e,t){this.styleRepository.setStyleLayer(e,t),this.emit("style-layer-change",{layer:e,index:t})}deleteStyleLayer(e){this.styleRepository.deleteStyleLayer(e),this.emit("delete-style-layer",{layer:e})}getLayoutProperties(e){return o(this.styleRepository.getLayoutProperties(e))}setLayoutProperties(e,t){this.styleRepository.setLayoutProperties(e,t),this.emit("layout-change",{layer:e,layout:t})}setStyleLayerVisibility(e,t){this.styleRepository.setStyleLayerVisibility(e,t),this.emit("style-layer-visibility-change",{layer:e,visibility:t})}getStyleLayerVisibility(e){return this.styleRepository.getStyleLayerVisibility(e)}write(e,t){return null!=t&&t.origin&&!this.styleUrl?(t.messages&&t.messages.push(new r("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(e,t)}getTileUrl(e,t,r){return null}async _getSourceAndStyle(e,t){if(!e)throw new Error("invalid style!");const r=await U(e,{...t,query:{...this.customParameters,token:this.apiKey}});if("webp"===r.spriteFormat){await L("lossy")||(r.spriteFormat="png")}this._set("currentStyleInfo",{...r}),"string"==typeof e?(this.url=e,this.style=null):(this.url=null,this.style=e),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new C(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(e){const t=e.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),r=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!t)return;const o=t[2]&&t[2].toLowerCase();if(!o)return;const i=t[1]||"";for(const s of r)if(s.toLowerCase().includes(o))return y(`//static.arcgis.com/attribution/Vector${i}/${s}`)}async _loadStyle(e){var t,r;return null!=(t=null==(r=this._loadingTask)?void 0:r.promise)?t:this.loadStyle(null,e)}};e([u({readOnly:!0})],N.prototype,"attributionDataUrl",null),e([u({type:["show","hide"]})],N.prototype,"listMode",void 0),e([u({readOnly:!0,json:{read:!1}})],N.prototype,"capabilities",null),e([u({readOnly:!0})],N.prototype,"currentStyleInfo",void 0),e([u({json:{read:!1},readOnly:!0,type:d})],N.prototype,"fullExtent",null),e([u()],N.prototype,"style",void 0),e([u({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],N.prototype,"isReference",void 0),e([u({type:["VectorTileLayer"]})],N.prototype,"operationalLayerType",void 0),e([u({readOnly:!0})],N.prototype,"parsedUrl",null),e([u({readOnly:!0})],N.prototype,"serviceUrl",null),e([u({type:f,readOnly:!0})],N.prototype,"spatialReference",null),e([u({readOnly:!0})],N.prototype,"styleRepository",void 0),e([u({readOnly:!0})],N.prototype,"sourceNameToSource",void 0),e([u({readOnly:!0})],N.prototype,"primarySource",void 0),e([u({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],N.prototype,"styleUrl",null),e([h(["portal-item","web-document"],"styleUrl")],N.prototype,"writeStyleUrl",null),e([u({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:O})],N.prototype,"tileInfo",null),e([u({json:{read:!1},readOnly:!0,value:"vector-tile"})],N.prototype,"type",void 0),e([u({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],N.prototype,"url",void 0),e([u({readOnly:!0})],N.prototype,"version",void 0),e([c("version",["version","currentVersion"])],N.prototype,"readVersion",null),e([u({readOnly:!0})],N.prototype,"compatibleTileInfo256",null),e([u({readOnly:!0})],N.prototype,"compatibleTileInfo512",null),e([u({type:Boolean})],N.prototype,"symbolCollisionBoxesVisible",void 0),e([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],N.prototype,"path",void 0),N=e([m("esri.layers.VectorTileLayer")],N);const k=N;export{k 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.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import r from"../config.js";import t from"../Graphic.js";import s from"../PopupTemplate.js";import o from"../request.js";import i from"../core/Collection.js";import a from"../core/CollectionFlattener.js";import{HandleOwnerMixin as n}from"../core/HandleOwner.js";import{JSONMap as l}from"../core/jsonMap.js";import{clone as p}from"../core/lang.js";import{isSome as m}from"../core/maybe.js";import{MultiOriginJSONMixin as u}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as y}from"../core/promiseUtils.js";import{addQueryParameters as c,Url as d}from"../core/urlUtils.js";import{property as f}from"../core/accessorSupport/decorators/property.js";import{Integer as h}from"../core/accessorSupport/ensureType.js";import{reader as g}from"../core/accessorSupport/decorators/reader.js";import{subclass as b}from"../core/accessorSupport/decorators/subclass.js";import{writer as w}from"../core/accessorSupport/decorators/writer.js";import{willPropertyWrite as x}from"../core/accessorSupport/write.js";import v from"../geometry/Extent.js";import j from"../geometry/SpatialReference.js";import{getScale as S}from"../geometry/support/scaleUtils.js";import{equals as I}from"../geometry/support/spatialReferenceUtils.js";import R from"./Layer.js";import{BlendLayer as E}from"./mixins/BlendLayer.js";import{OperationalLayer as U}from"./mixins/OperationalLayer.js";import{PortalLayer as O}from"./mixins/PortalLayer.js";import{RefreshableLayer as P}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as F}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as L}from"./mixins/TemporalLayer.js";import{isWmsServer as q}from"./support/arcgisLayerUrl.js";import{legendEnabled as M,url as T}from"./support/commonProperties.js";import{ExportWMSImageParameters as C}from"./support/ExportWMSImageParameters.js";import W from"./support/WMSSublayer.js";import{normalizeWKID as $,coordsReversedForWKID as N,toISOString as _,getPopupLayers as H,parseCapabilities as k}from"./support/wmsUtils.js";const A=new l({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});let B=class extends(n(E(L(P(F(U(O(u(R))))))))){constructor(...e){super(...e),this.allSublayers=new a({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormat=null,this.featureInfoUrl=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.url=null,this.version=null,this.watch("sublayers",((e,r)=>{if(r){for(const e of r)e.layer=null;this.handles.remove("wms-sublayer")}if(e){for(const r of e)r.parent=this,r.layer=this;this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"wms-sublayer")}}),!0)}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=m(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(y).then((()=>this._fetchService(r)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,r){const t=r.extent;return new v({xmin:t[0][0],ymin:t[0][1],xmax:t[1][0],ymax:t[1][1]})}writeFullExtent(e,r){r.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}readImageFormat(e,r){const t=r.supportedImageFormatTypes;return t&&t.indexOf("image/png")>-1?"image/png":t&&t[0]}readSpatialReferenceFromItemOrDocument(e,r){return new j(r.spatialReferences[0])}writeSpatialReferences(e,r){const t=this.spatialReference&&this.spatialReference.wkid;e&&t?(r.spatialReferences=e.filter((e=>e!==t)),r.spatialReferences.unshift(t)):r.spatialReferences=e}readSublayersFromItemOrMap(e,r,t){return G(r.layers,t,r.visibleLayers)}readSublayers(e,r,t){return G(r.layers,t)}writeSublayers(e,r,t,s){r.layers=[];const o=new Map,i=e.flatten((({sublayers:e})=>e&&e.toArray())).toArray();i.forEach((e=>{"number"==typeof e.parent.id&&(o.has(e.parent.id)?o.get(e.parent.id).push(e.id):o.set(e.parent.id,[e.id]))})),i.forEach((e=>{const t={sublayer:e,...s},i=e.write({parentLayerId:"number"==typeof e.parent.id?e.parent.id:-1},t);if(o.has(e.id)&&(i.sublayerIds=o.get(e.id)),!e.sublayers&&e.name){const s=e.write({},t);delete s.id,r.layers.push(s)}})),r.visibleLayers=i.filter((e=>e.visible&&!e.sublayers)).map((e=>e.name))}createExportImageParameters(e,r,t,s){const o=s&&s.pixelRatio||1,i=S({extent:e,width:r})*o,a=new C({layer:this,scale:i}),{xmin:n,ymin:l,xmax:p,ymax:m,spatialReference:u}=e,y=$(u,this.spatialReferences),c="1.3.0"===this.version&&N(y)?`${l},${n},${m},${p}`:`${n},${l},${p},${m}`,d=a.toJSON();return{bbox:c,["1.3.0"===this.version?"crs":"srs"]:isNaN(y)?void 0:"EPSG:"+y,...d}}async fetchImage(e,r,t,s){var i,a;const n=this.mapUrl,l=this.createExportImageParameters(e,r,t,s);if(!l.layers){const e=document.createElement("canvas");return e.width=r,e.height=t,e}const p=null==s||null==(i=s.timeExtent)?void 0:i.start,u=null==s||null==(a=s.timeExtent)?void 0:a.end,y=m(p)&&m(u)?p.getTime()===u.getTime()?_(p):`${_(p)}/${_(u)}`:void 0,c={responseType:"image",query:this._mixCustomParameters({width:r,height:t,...l,time:y,...this.refreshParameters}),signal:null==s?void 0:s.signal};return o(n,c).then((e=>e.data))}fetchFeatureInfo(e,r,o,i,a){const n=S({extent:e,width:r}),l=new C({layer:this,scale:n}),p=H(l.visibleSublayers);if(!this.featureInfoUrl||!p)return null;const m="1.3.0"===this.version?{I:i,J:a}:{x:i,y:a},u={query_layers:p,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:r,height:o,...m},y={...this.createExportImageParameters(e,r,o),...u},d=this._mixCustomParameters(y),f=c(this.featureInfoUrl,d),h=document.createElement("iframe");h.src=f,h.style.border="none",h.style.margin="0",h.style.width="100%",h.setAttribute("sandbox","");const g=new s({title:this.title,content:h});return new t({sourceLayer:this,popupTemplate:g})}findSublayerById(e){return this.allSublayers.find((r=>r.id===e))}findSublayerByName(e){return this.allSublayers.find((r=>r.name===e))}supportsSpatialReference(e){return q(this.url)||this.spatialReferences.some((r=>{const t=900913===r?j.WebMercator:new j({wkid:r});return I(t,e)}))}async _fetchService(e){if(!this.resourceInfo){this.parsedUrl.query&&this.parsedUrl.query.service&&(this.parsedUrl.query.SERVICE=this.parsedUrl.query.service,delete this.parsedUrl.query.service),this.parsedUrl.query&&this.parsedUrl.query.request&&(this.parsedUrl.query.REQUEST=this.parsedUrl.query.request,delete this.parsedUrl.query.request);const r=await o(this.parsedUrl.path,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...this.parsedUrl.query,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=k(r.data)}if(this.parsedUrl){const e=new d(this.parsedUrl.path);"https"!==e.scheme||e.port&&"443"!==e.port||-1!==r.request.httpsDomains.indexOf(e.host)||r.request.httpsDomains.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const r={...this.customParameters,...this.customLayerParameters};for(const t in r)e[t.toLowerCase()]=r[t];return e}};function D(e,r){return e.some((e=>{for(const t in e)if(x(e,t,null,r))return!0;return!1}))}function G(e,r,t){const s=new Map;e.every((e=>null==e.id))&&(e=p(e)).forEach(((e,r)=>e.id=r));for(const i of e){const e=new W;e.read(i,r),-1===(null==t?void 0:t.indexOf(e.name))&&(e.visible=!1),s.set(e.id,e)}const o=[];for(const a of e){const e=s.get(a.id);if(null!=a.parentLayerId&&a.parentLayerId>=0){const r=s.get(a.parentLayerId);r.sublayers||(r.sublayers=new i),r.sublayers.unshift(e)}else o.unshift(e)}return o}e([f({readOnly:!0})],B.prototype,"allSublayers",void 0),e([f({json:{type:Object,write:!0}})],B.prototype,"customParameters",void 0),e([f({json:{type:Object,write:!0}})],B.prototype,"customLayerParameters",void 0),e([f({type:String,json:{write:!0}})],B.prototype,"copyright",void 0),e([f()],B.prototype,"description",void 0),e([f({readOnly:!0})],B.prototype,"dimensions",void 0),e([f({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],B.prototype,"fullExtent",void 0),e([g(["web-document","portal-item"],"fullExtent",["extent"])],B.prototype,"readFullExtentFromItemOrMap",null),e([w(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],B.prototype,"writeFullExtent",null),e([f()],B.prototype,"fullExtents",void 0),e([f({type:String,json:{write:{ignoreOrigin:!0}}})],B.prototype,"featureInfoFormat",void 0),e([f({type:String,json:{write:{ignoreOrigin:!0}}})],B.prototype,"featureInfoUrl",void 0),e([f({type:String,json:{origins:{"web-document":{default:"image/png",type:A.jsonValues,read:{reader:A.read,source:"format"},write:{writer:A.write,target:"format"}}}}})],B.prototype,"imageFormat",void 0),e([g("imageFormat",["supportedImageFormatTypes"])],B.prototype,"readImageFormat",null),e([f({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],B.prototype,"imageMaxHeight",void 0),e([f({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],B.prototype,"imageMaxWidth",void 0),e([f()],B.prototype,"imageTransparency",void 0),e([f(M)],B.prototype,"legendEnabled",void 0),e([f({type:["show","hide","hide-children"]})],B.prototype,"listMode",void 0),e([f({type:String,json:{write:{ignoreOrigin:!0}}})],B.prototype,"mapUrl",void 0),e([f({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],B.prototype,"isReference",void 0),e([f({type:["WMS"]})],B.prototype,"operationalLayerType",void 0),e([f()],B.prototype,"resourceInfo",void 0),e([f({type:j,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],B.prototype,"spatialReference",void 0),e([g(["web-document","portal-item"],"spatialReference",["spatialReferences"])],B.prototype,"readSpatialReferenceFromItemOrDocument",null),e([f({type:[h],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],B.prototype,"spatialReferences",void 0),e([w(["web-document","portal-item"],"spatialReferences")],B.prototype,"writeSpatialReferences",null),e([f({type:i.ofType(W),json:{write:{target:"layers",overridePolicy(e,r,t){if(D(this.allSublayers,t))return{ignoreOrigin:!0}}}}})],B.prototype,"sublayers",void 0),e([g(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],B.prototype,"readSublayersFromItemOrMap",null),e([g("service","sublayers",["layers"])],B.prototype,"readSublayers",null),e([w("sublayers",{layers:{type:[W]},visibleLayers:{type:[String]}})],B.prototype,"writeSublayers",null),e([f({json:{read:!1},readOnly:!0,value:"wms"})],B.prototype,"type",void 0),e([f(T)],B.prototype,"url",void 0),e([f({type:String,json:{write:{ignoreOrigin:!0}}})],B.prototype,"version",void 0),B=e([b("esri.layers.WMSLayer")],B);const J=B;export{J as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import r from"../config.js";import t from"../Graphic.js";import s from"../PopupTemplate.js";import o from"../request.js";import i from"../core/Collection.js";import a from"../core/CollectionFlattener.js";import{HandleOwnerMixin as n}from"../core/HandleOwner.js";import{JSONMap as l}from"../core/jsonMap.js";import{clone as p}from"../core/lang.js";import{isSome as m}from"../core/maybe.js";import{MultiOriginJSONMixin as u}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as y}from"../core/promiseUtils.js";import{addQueryParameters as c,Url as d}from"../core/urlUtils.js";import{property as f}from"../core/accessorSupport/decorators/property.js";import{Integer as h}from"../core/accessorSupport/ensureType.js";import{reader as g}from"../core/accessorSupport/decorators/reader.js";import{subclass as b}from"../core/accessorSupport/decorators/subclass.js";import{writer as w}from"../core/accessorSupport/decorators/writer.js";import{willPropertyWrite as x}from"../core/accessorSupport/write.js";import v from"../geometry/Extent.js";import j from"../geometry/SpatialReference.js";import{getScale as S}from"../geometry/support/scaleUtils.js";import{equals as I}from"../geometry/support/spatialReferenceUtils.js";import R from"./Layer.js";import{BlendLayer as E}from"./mixins/BlendLayer.js";import{OperationalLayer as U}from"./mixins/OperationalLayer.js";import{PortalLayer as O}from"./mixins/PortalLayer.js";import{RefreshableLayer as P}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as F}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as L}from"./mixins/TemporalLayer.js";import{isAxesOrderReversedForWkid as q}from"./ogc/crsUtils.js";import{isWmsServer as M}from"./support/arcgisLayerUrl.js";import{legendEnabled as T,url as C}from"./support/commonProperties.js";import{ExportWMSImageParameters as W}from"./support/ExportWMSImageParameters.js";import $ from"./support/WMSSublayer.js";import{normalizeWKID as N,toISOString as _,getPopupLayers as H,parseCapabilities as k}from"./support/wmsUtils.js";const A=new l({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});let B=class extends(n(E(L(P(F(U(O(u(R))))))))){constructor(...e){super(...e),this.allSublayers=new a({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormat=null,this.featureInfoUrl=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.url=null,this.version=null,this.watch("sublayers",((e,r)=>{if(r){for(const e of r)e.layer=null;this.handles.remove("wms-sublayer")}if(e){for(const r of e)r.parent=this,r.layer=this;this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"wms-sublayer")}}),!0)}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=m(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(y).then((()=>this._fetchService(r)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,r){const t=r.extent;return new v({xmin:t[0][0],ymin:t[0][1],xmax:t[1][0],ymax:t[1][1]})}writeFullExtent(e,r){r.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}readImageFormat(e,r){const t=r.supportedImageFormatTypes;return t&&t.indexOf("image/png")>-1?"image/png":t&&t[0]}readSpatialReferenceFromItemOrDocument(e,r){return new j(r.spatialReferences[0])}writeSpatialReferences(e,r){const t=this.spatialReference&&this.spatialReference.wkid;e&&t?(r.spatialReferences=e.filter((e=>e!==t)),r.spatialReferences.unshift(t)):r.spatialReferences=e}readSublayersFromItemOrMap(e,r,t){return G(r.layers,t,r.visibleLayers)}readSublayers(e,r,t){return G(r.layers,t)}writeSublayers(e,r,t,s){r.layers=[];const o=new Map,i=e.flatten((({sublayers:e})=>e&&e.toArray())).toArray();i.forEach((e=>{"number"==typeof e.parent.id&&(o.has(e.parent.id)?o.get(e.parent.id).push(e.id):o.set(e.parent.id,[e.id]))})),i.forEach((e=>{const t={sublayer:e,...s},i=e.write({parentLayerId:"number"==typeof e.parent.id?e.parent.id:-1},t);if(o.has(e.id)&&(i.sublayerIds=o.get(e.id)),!e.sublayers&&e.name){const s=e.write({},t);delete s.id,r.layers.push(s)}})),r.visibleLayers=i.filter((e=>e.visible&&!e.sublayers)).map((e=>e.name))}createExportImageParameters(e,r,t,s){const o=s&&s.pixelRatio||1,i=S({extent:e,width:r})*o,a=new W({layer:this,scale:i}),{xmin:n,ymin:l,xmax:p,ymax:m,spatialReference:u}=e,y=N(u,this.spatialReferences),c="1.3.0"===this.version&&q(y)?`${l},${n},${m},${p}`:`${n},${l},${p},${m}`,d=a.toJSON();return{bbox:c,["1.3.0"===this.version?"crs":"srs"]:isNaN(y)?void 0:"EPSG:"+y,...d}}async fetchImage(e,r,t,s){var i,a;const n=this.mapUrl,l=this.createExportImageParameters(e,r,t,s);if(!l.layers){const e=document.createElement("canvas");return e.width=r,e.height=t,e}const p=null==s||null==(i=s.timeExtent)?void 0:i.start,u=null==s||null==(a=s.timeExtent)?void 0:a.end,y=m(p)&&m(u)?p.getTime()===u.getTime()?_(p):`${_(p)}/${_(u)}`:void 0,c={responseType:"image",query:this._mixCustomParameters({width:r,height:t,...l,time:y,...this.refreshParameters}),signal:null==s?void 0:s.signal};return o(n,c).then((e=>e.data))}fetchFeatureInfo(e,r,o,i,a){const n=S({extent:e,width:r}),l=new W({layer:this,scale:n}),p=H(l.visibleSublayers);if(!this.featureInfoUrl||!p)return null;const m="1.3.0"===this.version?{I:i,J:a}:{x:i,y:a},u={query_layers:p,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:r,height:o,...m},y={...this.createExportImageParameters(e,r,o),...u},d=this._mixCustomParameters(y),f=c(this.featureInfoUrl,d),h=document.createElement("iframe");h.src=f,h.style.border="none",h.style.margin="0",h.style.width="100%",h.setAttribute("sandbox","");const g=new s({title:this.title,content:h});return new t({sourceLayer:this,popupTemplate:g})}findSublayerById(e){return this.allSublayers.find((r=>r.id===e))}findSublayerByName(e){return this.allSublayers.find((r=>r.name===e))}supportsSpatialReference(e){return M(this.url)||this.spatialReferences.some((r=>{const t=900913===r?j.WebMercator:new j({wkid:r});return I(t,e)}))}async _fetchService(e){if(!this.resourceInfo){this.parsedUrl.query&&this.parsedUrl.query.service&&(this.parsedUrl.query.SERVICE=this.parsedUrl.query.service,delete this.parsedUrl.query.service),this.parsedUrl.query&&this.parsedUrl.query.request&&(this.parsedUrl.query.REQUEST=this.parsedUrl.query.request,delete this.parsedUrl.query.request);const r=await o(this.parsedUrl.path,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...this.parsedUrl.query,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=k(r.data)}if(this.parsedUrl){const e=new d(this.parsedUrl.path);"https"!==e.scheme||e.port&&"443"!==e.port||-1!==r.request.httpsDomains.indexOf(e.host)||r.request.httpsDomains.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const r={...this.customParameters,...this.customLayerParameters};for(const t in r)e[t.toLowerCase()]=r[t];return e}};function D(e,r){return e.some((e=>{for(const t in e)if(x(e,t,null,r))return!0;return!1}))}function G(e,r,t){const s=new Map;e.every((e=>null==e.id))&&(e=p(e)).forEach(((e,r)=>e.id=r));for(const i of e){const e=new $;e.read(i,r),-1===(null==t?void 0:t.indexOf(e.name))&&(e.visible=!1),s.set(e.id,e)}const o=[];for(const a of e){const e=s.get(a.id);if(null!=a.parentLayerId&&a.parentLayerId>=0){const r=s.get(a.parentLayerId);r.sublayers||(r.sublayers=new i),r.sublayers.unshift(e)}else o.unshift(e)}return o}e([f({readOnly:!0})],B.prototype,"allSublayers",void 0),e([f({json:{type:Object,write:!0}})],B.prototype,"customParameters",void 0),e([f({json:{type:Object,write:!0}})],B.prototype,"customLayerParameters",void 0),e([f({type:String,json:{write:!0}})],B.prototype,"copyright",void 0),e([f()],B.prototype,"description",void 0),e([f({readOnly:!0})],B.prototype,"dimensions",void 0),e([f({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],B.prototype,"fullExtent",void 0),e([g(["web-document","portal-item"],"fullExtent",["extent"])],B.prototype,"readFullExtentFromItemOrMap",null),e([w(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],B.prototype,"writeFullExtent",null),e([f()],B.prototype,"fullExtents",void 0),e([f({type:String,json:{write:{ignoreOrigin:!0}}})],B.prototype,"featureInfoFormat",void 0),e([f({type:String,json:{write:{ignoreOrigin:!0}}})],B.prototype,"featureInfoUrl",void 0),e([f({type:String,json:{origins:{"web-document":{default:"image/png",type:A.jsonValues,read:{reader:A.read,source:"format"},write:{writer:A.write,target:"format"}}}}})],B.prototype,"imageFormat",void 0),e([g("imageFormat",["supportedImageFormatTypes"])],B.prototype,"readImageFormat",null),e([f({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],B.prototype,"imageMaxHeight",void 0),e([f({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],B.prototype,"imageMaxWidth",void 0),e([f()],B.prototype,"imageTransparency",void 0),e([f(T)],B.prototype,"legendEnabled",void 0),e([f({type:["show","hide","hide-children"]})],B.prototype,"listMode",void 0),e([f({type:String,json:{write:{ignoreOrigin:!0}}})],B.prototype,"mapUrl",void 0),e([f({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],B.prototype,"isReference",void 0),e([f({type:["WMS"]})],B.prototype,"operationalLayerType",void 0),e([f()],B.prototype,"resourceInfo",void 0),e([f({type:j,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],B.prototype,"spatialReference",void 0),e([g(["web-document","portal-item"],"spatialReference",["spatialReferences"])],B.prototype,"readSpatialReferenceFromItemOrDocument",null),e([f({type:[h],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],B.prototype,"spatialReferences",void 0),e([w(["web-document","portal-item"],"spatialReferences")],B.prototype,"writeSpatialReferences",null),e([f({type:i.ofType($),json:{write:{target:"layers",overridePolicy(e,r,t){if(D(this.allSublayers,t))return{ignoreOrigin:!0}}}}})],B.prototype,"sublayers",void 0),e([g(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],B.prototype,"readSublayersFromItemOrMap",null),e([g("service","sublayers",["layers"])],B.prototype,"readSublayers",null),e([w("sublayers",{layers:{type:[$]},visibleLayers:{type:[String]}})],B.prototype,"writeSublayers",null),e([f({json:{read:!1},readOnly:!0,value:"wms"})],B.prototype,"type",void 0),e([f(C)],B.prototype,"url",void 0),e([f({type:String,json:{write:{ignoreOrigin:!0}}})],B.prototype,"version",void 0),B=e([b("esri.layers.WMSLayer")],B);const J=B;export{J 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.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import"../../../core/has.js";import s from"../../../core/Error.js";import a from"../../../core/Handles.js";import{clone as o}from"../../../core/lang.js";import n from"../../../core/Logger.js";import{isSome as l,destroyMaybe as h,removeMaybe as c,isNone as u}from"../../../core/maybe.js";import{EsriPromiseMixin as d}from"../../../core/Promise.js";import{isAbortError as m,eachAlways as p}from"../../../core/promiseUtils.js";import{whenOnce as f,init as y}from"../../../core/watchUtils.js";import{property as g}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as x}from"../../../core/accessorSupport/decorators/subclass.js";import{isHostedAgolService as F}from"../../support/arcgisLayerUrl.js";import{projectGeometry as v}from"../../../portal/support/geometryServiceUtils.js";import _ from"../../../rest/support/StatisticDefinition.js";import{FeatureTileFetcher3D as T}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as w}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import E from"../../../views/3d/support/debugFlags.js";import{WatchUpdatingTracking as C,WatchFlags as b}from"../../../views/support/WatchUpdatingTracking.js";const D=n.getLogger("esri.layers.graphics.controllers.FeatureTileController3D");let S=class extends(d(t)){constructor(e){super(e),this.type="feature-tile-3d",this.watchUpdatingTracking=new C,this.serviceDataExtent=null,this.serviceDataCount=N.NO_SERVICE_DATA_COUNT,this.vertexLimitExceeded=!1,this.displayFeatureLimit=null,this.suspended=!1,this.tileFetcher=null,this.handles=new a,this.fetchDataInfoPromise=null,this.fetchDataInfoAbortController=null,this.lifeCycleAbortController=new AbortController}set extent(e){if(e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void D.error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(t&&e&&t.equals(e))return;const i=e?e.clone():null;this._set("extent",i)}get updating(){return!!(l(this.tileFetcher)&&this.tileFetcher.updating||null!=this.fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles&&this.layerView.view.featureTiles.updating||this.watchUpdatingTracking&&this.watchUpdatingTracking.updating)}get updatingTotal(){return this.updating&&l(this.tileFetcher)?this.tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&l(this.tileFetcher)?this.tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&l(this.tileFetcher)?this.tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return l(this.tileFetcher)?this.tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(!l(this.tileFetcher)||!this.tileFetcher.maximumNumberOfFeaturesExceeded)}get maximumNumberOfFeatures(){return l(this.displayFeatureLimit)?this.displayFeatureLimit.maximumNumberOfFeatures:0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&(null==e?this._clearOverride("maximumNumberOfFeatures"):this._override("maximumNumberOfFeatures",e))}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get mode(){var e,t;const i=this.layerView.layer;if("feature"===i.type&&l(i.infoFor3D))return"snapshot";if(!1===(null==(e=this.layerView.view.qualitySettings)||null==(t=e.graphics3D)?void 0:t.snapshotAvailable)||this.serviceDataCount===N.NO_SERVICE_DATA_COUNT||this.vertexLimitExceeded)return"tiles";const r=this.layerView.view,s=r&&r.featureTiles,a=s&&s.tilingScheme;if(i&&i.minScale&&this.serviceDataExtent&&a){const e=this._approximateExtentSizeAtScale(i.minScale,a);if((this.serviceDataExtent.width/e+this.serviceDataExtent.height/e)/2>N.MAX_SNAPSHOT_MIN_SCALE_FACTOR)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&l(this.tileFetcher)&&this.tileFetcher.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){return"snapshot"===this.mode?new r([{id:"dummy-tile-full-extent",lij:[0,0,0]}]):this.layerView.view.featureTiles?this.layerView.view.featureTiles.tiles:new r}get test(){return{fetchDataInfoPromise:this.fetchDataInfoPromise,tileFetcher:this.tileFetcher}}initialize(){this.watchUpdatingTracking.add(this,"vertexLimitInfo",(()=>this.watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this.lifeCycleAbortController.signal)))),this.watchUpdatingTracking.add(this,"mode",(()=>this._modeChanged()),b.INIT),this.addResolvingPromise(Promise.resolve().then((()=>this._verifyCapabilities())).then((()=>this.watchUpdatingTracking.addPromise(this._fetchServiceDataInfo()))).then((()=>this._initializeTileFetcher())))}_verifyCapabilities(){const e=this.layerView.layer;if(!e.get("capabilities.operations.supportsQuery")&&"ogc-feature"!==e.type)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this.tileFetcher=h(this.tileFetcher),this.handles=h(this.handles),this.tilesHandle=c(this.tilesHandle),this.lifeCycleAbortController&&(this.lifeCycleAbortController.abort(),this.lifeCycleAbortController=null),this.watchUpdatingTracking.destroy(),this._set("watchUpdatingTracking",null)}suspend(){this.suspended||(this.suspended=!0,l(this.tileFetcher)&&this.tileFetcher.suspend())}resume(){this.suspended&&(this.suspended=!1,l(this.tileFetcher)&&this.tileFetcher.resume())}restart(){const e=()=>{l(this.tileFetcher)&&this.tileFetcher.restart()};this.watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){const e=()=>{l(this.tileFetcher)&&this.tileFetcher.refetch()};this.watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const t=f(e.featureTiles,"tilingScheme",this.lifeCycleAbortController.signal);this.watchUpdatingTracking.addPromise(t),t.then((()=>{const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new T({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this.tileFetcher=s,this.suspended?this.tileFetcher.suspend():this.tileFetcher.resume();const a=this.layerView.view.resourceController;a&&(this.handles.add(a.memoryController.events.on("quality-changed",(e=>{s.memoryFactor=e}))),this.tileFetcher.memoryFactor=a.memoryController.memoryFactor);const o="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;o&&this.handles.add(y(this.layerView.view,"qualitySettings.graphics3D."+o,(e=>{s.lodFactor=e||1})));const n=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},l=e=>s.useTileCount=e>this.maximumNumberOfFeatures;this.watchUpdatingTracking.add(r,"createQueryVersion",(()=>this._dataFilterChanged())),this.watchUpdatingTracking.add(t,"availableFields",((e,t)=>this._availableFieldsChanged(t,e))),this.watchUpdatingTracking.add(t,"requiredFields",((e,t)=>this._requiredFieldsChanged(t,e))),this.handles.add([r.on("apply-edits",(e=>this._applyEdits(e))),this.watch("extent",(e=>s.filterExtent=e),!0),this.watch("tileDescriptors",(e=>s.tileDescriptors=e),!0),y(this,"maximumNumberOfFeatures",n,!0),y(this,"serviceDataCount",l,!0),y(E,"FEATURE_TILE_FETCH_SHOW_TILES",(t=>{t&&s&&!s.debugger?(s.debugger=new w(s,e.featureTiles.tilingScheme.toTileInfo(),e),s.debugger.update()):!t&&this.tileFetcher&&s.debugger&&(s.debugger.destroy(),s.debugger=null)}))]),this.supportsExceedsLimitQuery||this.watchUpdatingTracking.add(this,"maxTotalSnapshotVertices",(()=>this.watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this.lifeCycleAbortController.signal))))})).catch((()=>{}))}_modeChanged(){switch(this.mode){case"tiles":this.tilesHandle||(this.tilesHandle=this.layerView.view.featureTiles.addClient());break;default:D.warn("Unhandled feature layer mode "+this.mode);case"snapshot":l(this.tilesHandle)&&(this.tilesHandle.remove(),this.tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this.refetch()}_applyEdits(e){u(this.tileFetcher)||this.tileFetcher.applyEdits(e).then((e=>{e&&(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this.watchUpdatingTracking.addPromise(this._updateServiceDataExtent(this.lifeCycleAbortController.signal))})).catch((e=>{if(!m(e))throw e}))}_availableFieldsChanged(e,t){l(this.tileFetcher)&&A(this.tileFetcher.availableFields,t)&&this.refetch()}_requiredFieldsChanged(e,t){l(this.tileFetcher)&&A(this.tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.outStatistics=[new _({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=e.createQuery();return t.outSpatialReference=this.layerView.view.spatialReference,e.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_fullExtentIsAccurate(){const e=this.layerView.layer;if(e.definitionExpression)return!1;switch(e.type){case"feature":return F(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){m(t)||this._set("serviceDataExtent",o(this.layerView.fullExtentInLocalViewSpatialReference))}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities.query.supportsExtent,s=o(t.fullExtentInLocalViewSpatialReference),a=i.fullExtent,n=this._fullExtentIsAccurate(),h=this.serviceDataCount;if(r&&h<=N.MAX_FEATURE_COUNT_FOR_EXTENT&&(!s||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:N.QUERY_EXTENT_TIMEOUT,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(l(a)){const r="portalItem"in i?i.portalItem:null,s=await v(a,t.view.spatialReference,r,e);this._set("serviceDataExtent",s)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t))return void this._set("serviceDataCount",N.NO_SERVICE_DATA_COUNT);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:N.QUERY_STATISTICS_TIMEOUT,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(m(r.error))throw r.error;this._set("serviceDataCount",N.NO_SERVICE_DATA_COUNT)}}get vertexLimitInfo(){if(u(this.displayFeatureLimit)||u(this.displayFeatureLimit.averageSymbolComplexity))return null;const{averageSymbolComplexity:e,maximumTotalNumberOfPrimitives:t}=this.displayFeatureLimit,{primitivesPerCoordinate:i,primitivesPerFeature:r}=e,s=this._get("vertexLimitInfo");return u(s)||s.maximumTotalNumberOfPrimitives!==t||s.primitivesPerCoordinate!==i||s.primitivesPerFeature!==r?{primitivesPerCoordinate:i,primitivesPerFeature:r,maximumTotalNumberOfPrimitives:t}:s}get supportsExceedsLimitQuery(){const e=this.layerView.layer;return e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateVertexLimitExceeded(e,t){const r=this.vertexLimitInfo;if(u(r))return void this._set("vertexLimitExceeded",!1);const s=r.primitivesPerFeature<=0,a=this.minimumNumberOfVerticesForGeometry>1;if(!s&&!a)return void this._set("vertexLimitExceeded",!1);const{primitivesPerFeature:o,primitivesPerCoordinate:n,maximumTotalNumberOfPrimitives:h}=r;let c;0!==o&&l(e)&&await e;const d=this.serviceDataCount,p=d!==N.NO_SERVICE_DATA_COUNT;if(c=p?Math.ceil((h-d*o)/(n||1)):Math.ceil(h/(n||1)),a&&(c=Math.min(c,U)),p&&this.minimumNumberOfVerticesForGeometry*d>c)return void this._set("vertexLimitExceeded",!0);if(!this.supportsExceedsLimitQuery)return void this._set("vertexLimitExceeded",this.maxTotalSnapshotVertices>c);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(c),{timeout:N.QUERY_STATISTICS_TIMEOUT,signal:t}));if(!1===f.ok){if(m(f.error))throw f.error;return void this._set("vertexLimitExceeded",!1)}const y=f.value.features[0];y&&y.attributes?this._set("vertexLimitExceeded",!!y.attributes.exceedslimit):this._set("vertexLimitExceeded",!1)}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo();let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=p([i,this._updateVertexLimitExceeded(i,t)]),s=r.then((()=>this._updateServiceDataExtent(t))).catch((e=>{m(e)||D.error("#fetchServiceDataInfo()",e)})).then((()=>{s===this.fetchDataInfoPromise&&(this.fetchDataInfoPromise=null,this.fetchDataInfoAbortController=null),e=null}));return e&&(this.fetchDataInfoPromise=s),this.fetchDataInfoAbortController=e,r.then((()=>{}),(()=>{}))}_cancelFetchServiceDataInfo(){const e=this.fetchDataInfoAbortController;e&&(this.fetchDataInfoAbortController=null,this.fetchDataInfoPromise=null,e.abort())}get debug(){return{storedFeatures:l(this.tileFetcher)?this.tileFetcher.storedFeatures:0,totalFeatures:l(this.tileFetcher)?this.tileFetcher.totalFeatures:0,totalVertices:l(this.tileFetcher)?this.tileFetcher.totalVertices:0}}};e([g({readOnly:!0})],S.prototype,"type",void 0),e([g({constructOnly:!0})],S.prototype,"graphics",void 0),e([g({constructOnly:!0})],S.prototype,"layerView",void 0),e([g({constructOnly:!0})],S.prototype,"context",void 0),e([g()],S.prototype,"extent",null),e([g()],S.prototype,"updating",null),e([g({readOnly:!0})],S.prototype,"watchUpdatingTracking",void 0),e([g()],S.prototype,"updatingTotal",null),e([g()],S.prototype,"updatingRemaining",null),e([g()],S.prototype,"expectedFeatureDiff",null),e([g()],S.prototype,"memoryForUnusedFeatures",null),e([g()],S.prototype,"maximumNumberOfFeaturesExceeded",null),e([g({readOnly:!0})],S.prototype,"serviceDataExtent",void 0),e([g({readOnly:!0})],S.prototype,"serviceDataCount",void 0),e([g({readOnly:!0})],S.prototype,"vertexLimitExceeded",void 0),e([g()],S.prototype,"displayFeatureLimit",void 0),e([g({type:Number})],S.prototype,"maximumNumberOfFeatures",null),e([g({readOnly:!0})],S.prototype,"mode",null),e([g({readOnly:!0})],S.prototype,"maxTotalSnapshotVertices",null),e([g({readOnly:!0,dependsOn:["mode"]})],S.prototype,"tileDescriptors",null),e([g()],S.prototype,"tileFetcher",void 0),e([g()],S.prototype,"fetchDataInfoPromise",void 0),e([g({readOnly:!0})],S.prototype,"vertexLimitInfo",null),S=e([x("esri.layers.graphics.controllers.FeatureTileController3D")],S);const O=1e4,I=12e3,V=1e4,U=5e6;function A(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}var N;!function(e){function t(){e.MAX_FEATURE_COUNT_FOR_EXTENT=O,e.QUERY_STATISTICS_TIMEOUT=I,e.QUERY_EXTENT_TIMEOUT=V}e.NO_SERVICE_DATA_COUNT=1/0,e.MAX_SNAPSHOT_MIN_SCALE_FACTOR=5,e.reset=t}(N||(N={})),N.reset();export{S as FeatureTileController3D,N as FeatureTileController3DConstants};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import"../../../core/has.js";import s from"../../../core/Error.js";import a from"../../../core/Handles.js";import{clone as o}from"../../../core/lang.js";import n from"../../../core/Logger.js";import{isSome as l,destroyMaybe as c,removeMaybe as h,isNone as u}from"../../../core/maybe.js";import{EsriPromiseMixin as d}from"../../../core/Promise.js";import{isAbortError as m,eachAlways as p}from"../../../core/promiseUtils.js";import{initial as f}from"../../../core/reactiveUtils.js";import{whenOnce as y,init as g}from"../../../core/watchUtils.js";import{property as x}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as F}from"../../../core/accessorSupport/decorators/subclass.js";import{isHostedAgolService as v}from"../../support/arcgisLayerUrl.js";import{projectGeometry as _}from"../../../portal/support/geometryServiceUtils.js";import T from"../../../rest/support/StatisticDefinition.js";import{FeatureTileFetcher3D as w}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as E}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import C from"../../../views/3d/support/debugFlags.js";import{WatchUpdatingTracking as b}from"../../../views/support/WatchUpdatingTracking.js";const D=n.getLogger("esri.layers.graphics.controllers.FeatureTileController3D");let S=class extends(d(t)){constructor(e){super(e),this.type="feature-tile-3d",this.watchUpdatingTracking=new b,this.serviceDataExtent=null,this.serviceDataCount=N.NO_SERVICE_DATA_COUNT,this.vertexLimitExceeded=!1,this.displayFeatureLimit=null,this.suspended=!1,this.tileFetcher=null,this.handles=new a,this.fetchDataInfoPromise=null,this.fetchDataInfoAbortController=null,this.lifeCycleAbortController=new AbortController}set extent(e){if(e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void D.error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(t&&e&&t.equals(e))return;const i=e?e.clone():null;this._set("extent",i)}get updating(){return!!(l(this.tileFetcher)&&this.tileFetcher.updating||null!=this.fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles&&this.layerView.view.featureTiles.updating||this.watchUpdatingTracking&&this.watchUpdatingTracking.updating)}get updatingTotal(){return this.updating&&l(this.tileFetcher)?this.tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&l(this.tileFetcher)?this.tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&l(this.tileFetcher)?this.tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return l(this.tileFetcher)?this.tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(!l(this.tileFetcher)||!this.tileFetcher.maximumNumberOfFeaturesExceeded)}get maximumNumberOfFeatures(){return l(this.displayFeatureLimit)?this.displayFeatureLimit.maximumNumberOfFeatures:0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&(null==e?this._clearOverride("maximumNumberOfFeatures"):this._override("maximumNumberOfFeatures",e))}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get mode(){var e,t;const i=this.layerView.layer;if("feature"===i.type&&l(i.infoFor3D))return"snapshot";if(!1===(null==(e=this.layerView.view.qualitySettings)||null==(t=e.graphics3D)?void 0:t.snapshotAvailable)||this.serviceDataCount===N.NO_SERVICE_DATA_COUNT||this.vertexLimitExceeded)return"tiles";const r=this.layerView.view,s=r&&r.featureTiles,a=s&&s.tilingScheme;if(i&&i.minScale&&this.serviceDataExtent&&a){const e=this._approximateExtentSizeAtScale(i.minScale,a);if((this.serviceDataExtent.width/e+this.serviceDataExtent.height/e)/2>N.MAX_SNAPSHOT_MIN_SCALE_FACTOR)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&l(this.tileFetcher)&&this.tileFetcher.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){return"snapshot"===this.mode?new r([{id:"dummy-tile-full-extent",lij:[0,0,0]}]):this.layerView.view.featureTiles?this.layerView.view.featureTiles.tiles:new r}get test(){return{fetchDataInfoPromise:this.fetchDataInfoPromise,tileFetcher:this.tileFetcher}}initialize(){this.watchUpdatingTracking.add((()=>this.vertexLimitInfo),(()=>this.watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this.lifeCycleAbortController.signal)))),this.watchUpdatingTracking.add((()=>this.mode),(()=>this._modeChanged()),f),this.addResolvingPromise(Promise.resolve().then((()=>this._verifyCapabilities())).then((()=>this.watchUpdatingTracking.addPromise(this._fetchServiceDataInfo()))).then((()=>this._initializeTileFetcher())))}_verifyCapabilities(){const e=this.layerView.layer;if(!e.get("capabilities.operations.supportsQuery")&&"ogc-feature"!==e.type)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this.tileFetcher=c(this.tileFetcher),this.handles=c(this.handles),this.tilesHandle=h(this.tilesHandle),this.lifeCycleAbortController&&(this.lifeCycleAbortController.abort(),this.lifeCycleAbortController=null),this.watchUpdatingTracking.destroy(),this._set("watchUpdatingTracking",null)}suspend(){this.suspended||(this.suspended=!0,l(this.tileFetcher)&&this.tileFetcher.suspend())}resume(){this.suspended&&(this.suspended=!1,l(this.tileFetcher)&&this.tileFetcher.resume())}restart(){const e=()=>{l(this.tileFetcher)&&this.tileFetcher.restart()};this.watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}refetch(){const e=()=>{l(this.tileFetcher)&&this.tileFetcher.refetch()};this.watchUpdatingTracking.addPromise(this._fetchServiceDataInfo().then(e,e))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const t=y(e.featureTiles,"tilingScheme",this.lifeCycleAbortController.signal);this.watchUpdatingTracking.addPromise(t),t.then((()=>{const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new w({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this.tileFetcher=s,this.suspended?this.tileFetcher.suspend():this.tileFetcher.resume();const a=this.layerView.view.resourceController;a&&(this.handles.add(a.memoryController.events.on("quality-changed",(e=>{s.memoryFactor=e}))),this.tileFetcher.memoryFactor=a.memoryController.memoryFactor);const o="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;o&&this.handles.add(g(this.layerView.view,"qualitySettings.graphics3D."+o,(e=>{s.lodFactor=e||1})));const n=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},l=e=>s.useTileCount=e>this.maximumNumberOfFeatures;"ogc-feature"!==r.type&&this.watchUpdatingTracking.add((()=>r.createQueryVersion),(()=>this._dataFilterChanged())),this.watchUpdatingTracking.add((()=>t.availableFields),((e,t)=>this._availableFieldsChanged(t,e))),this.watchUpdatingTracking.add((()=>t.requiredFields),((e,t)=>this._requiredFieldsChanged(t,e))),this.handles.add([r.on("apply-edits",(e=>this._applyEdits(e))),this.watch("extent",(e=>s.filterExtent=e),!0),this.watch("tileDescriptors",(e=>s.tileDescriptors=e),!0),g(this,"maximumNumberOfFeatures",n,!0),g(this,"serviceDataCount",l,!0),g(C,"FEATURE_TILE_FETCH_SHOW_TILES",(t=>{t&&s&&!s.debugger?(s.debugger=new E(s,e.featureTiles.tilingScheme.toTileInfo(),e),s.debugger.update()):!t&&this.tileFetcher&&s.debugger&&(s.debugger.destroy(),s.debugger=null)}))]),this.supportsExceedsLimitQuery||this.watchUpdatingTracking.add((()=>this.maxTotalSnapshotVertices),(()=>this.watchUpdatingTracking.addPromise(this._updateVertexLimitExceeded(null,this.lifeCycleAbortController.signal))))})).catch((()=>{}))}_modeChanged(){switch(this.mode){case"tiles":this.tilesHandle||(this.tilesHandle=this.layerView.view.featureTiles.addClient());break;default:D.warn("Unhandled feature layer mode "+this.mode);case"snapshot":l(this.tilesHandle)&&(this.tilesHandle.remove(),this.tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this.refetch()}_applyEdits(e){u(this.tileFetcher)||this.tileFetcher.applyEdits(e).then((e=>{e&&(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this.watchUpdatingTracking.addPromise(this._updateServiceDataExtent(this.lifeCycleAbortController.signal))})).catch((e=>{if(!m(e))throw e}))}_availableFieldsChanged(e,t){l(this.tileFetcher)&&A(this.tileFetcher.availableFields,t)&&this.refetch()}_requiredFieldsChanged(e,t){l(this.tileFetcher)&&A(this.tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.outStatistics=[new T({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=e.createQuery();return t.outSpatialReference=this.layerView.view.spatialReference,e.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_fullExtentIsAccurate(){const e=this.layerView.layer;if(e.definitionExpression)return!1;switch(e.type){case"feature":return v(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){m(t)||this._set("serviceDataExtent",o(this.layerView.fullExtentInLocalViewSpatialReference))}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities.query.supportsExtent,s=o(t.fullExtentInLocalViewSpatialReference),a=i.fullExtent,n=this._fullExtentIsAccurate(),c=this.serviceDataCount;if(r&&c<=N.MAX_FEATURE_COUNT_FOR_EXTENT&&(!s||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:N.QUERY_EXTENT_TIMEOUT,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(l(a)){const r="portalItem"in i?i.portalItem:null,s=await _(a,t.view.spatialReference,r,e);this._set("serviceDataExtent",s)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t))return void this._set("serviceDataCount",N.NO_SERVICE_DATA_COUNT);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:N.QUERY_STATISTICS_TIMEOUT,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(m(r.error))throw r.error;this._set("serviceDataCount",N.NO_SERVICE_DATA_COUNT)}}get vertexLimitInfo(){if(u(this.displayFeatureLimit)||u(this.displayFeatureLimit.averageSymbolComplexity))return null;const{averageSymbolComplexity:e,maximumTotalNumberOfPrimitives:t}=this.displayFeatureLimit,{primitivesPerCoordinate:i,primitivesPerFeature:r}=e,s=this._get("vertexLimitInfo");return u(s)||s.maximumTotalNumberOfPrimitives!==t||s.primitivesPerCoordinate!==i||s.primitivesPerFeature!==r?{primitivesPerCoordinate:i,primitivesPerFeature:r,maximumTotalNumberOfPrimitives:t}:s}get supportsExceedsLimitQuery(){const e=this.layerView.layer;return e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateVertexLimitExceeded(e,t){const r=this.vertexLimitInfo;if(u(r))return void this._set("vertexLimitExceeded",!1);const s=r.primitivesPerFeature<=0,a=this.minimumNumberOfVerticesForGeometry>1;if(!s&&!a)return void this._set("vertexLimitExceeded",!1);const{primitivesPerFeature:o,primitivesPerCoordinate:n,maximumTotalNumberOfPrimitives:c}=r;let h;0!==o&&l(e)&&await e;const d=this.serviceDataCount,p=d!==N.NO_SERVICE_DATA_COUNT;if(h=p?Math.ceil((c-d*o)/(n||1)):Math.ceil(c/(n||1)),a&&(h=Math.min(h,U)),p&&this.minimumNumberOfVerticesForGeometry*d>h)return void this._set("vertexLimitExceeded",!0);if(!this.supportsExceedsLimitQuery)return void this._set("vertexLimitExceeded",this.maxTotalSnapshotVertices>h);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(h),{timeout:N.QUERY_STATISTICS_TIMEOUT,signal:t}));if(!1===f.ok){if(m(f.error))throw f.error;return void this._set("vertexLimitExceeded",!1)}const y=f.value.features[0];y&&y.attributes?this._set("vertexLimitExceeded",!!y.attributes.exceedslimit):this._set("vertexLimitExceeded",!1)}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo();let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=p([i,this._updateVertexLimitExceeded(i,t)]),s=r.then((()=>this._updateServiceDataExtent(t))).catch((e=>{m(e)||D.error("#fetchServiceDataInfo()",e)})).then((()=>{s===this.fetchDataInfoPromise&&(this.fetchDataInfoPromise=null,this.fetchDataInfoAbortController=null),e=null}));return e&&(this.fetchDataInfoPromise=s),this.fetchDataInfoAbortController=e,r.then((()=>{}),(()=>{}))}_cancelFetchServiceDataInfo(){const e=this.fetchDataInfoAbortController;e&&(this.fetchDataInfoAbortController=null,this.fetchDataInfoPromise=null,e.abort())}get debug(){return{storedFeatures:l(this.tileFetcher)?this.tileFetcher.storedFeatures:0,totalFeatures:l(this.tileFetcher)?this.tileFetcher.totalFeatures:0,totalVertices:l(this.tileFetcher)?this.tileFetcher.totalVertices:0}}};e([x({readOnly:!0})],S.prototype,"type",void 0),e([x({constructOnly:!0})],S.prototype,"graphics",void 0),e([x({constructOnly:!0})],S.prototype,"layerView",void 0),e([x({constructOnly:!0})],S.prototype,"context",void 0),e([x()],S.prototype,"extent",null),e([x()],S.prototype,"updating",null),e([x({readOnly:!0})],S.prototype,"watchUpdatingTracking",void 0),e([x()],S.prototype,"updatingTotal",null),e([x()],S.prototype,"updatingRemaining",null),e([x()],S.prototype,"expectedFeatureDiff",null),e([x()],S.prototype,"memoryForUnusedFeatures",null),e([x()],S.prototype,"maximumNumberOfFeaturesExceeded",null),e([x({readOnly:!0})],S.prototype,"serviceDataExtent",void 0),e([x({readOnly:!0})],S.prototype,"serviceDataCount",void 0),e([x({readOnly:!0})],S.prototype,"vertexLimitExceeded",void 0),e([x()],S.prototype,"displayFeatureLimit",void 0),e([x({type:Number})],S.prototype,"maximumNumberOfFeatures",null),e([x({readOnly:!0})],S.prototype,"mode",null),e([x({readOnly:!0})],S.prototype,"maxTotalSnapshotVertices",null),e([x({readOnly:!0,dependsOn:["mode"]})],S.prototype,"tileDescriptors",null),e([x()],S.prototype,"tileFetcher",void 0),e([x()],S.prototype,"fetchDataInfoPromise",void 0),e([x({readOnly:!0})],S.prototype,"vertexLimitInfo",null),S=e([F("esri.layers.graphics.controllers.FeatureTileController3D")],S);const O=1e4,I=12e3,V=1e4,U=5e6;function A(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}var N;!function(e){function t(){e.MAX_FEATURE_COUNT_FOR_EXTENT=O,e.QUERY_STATISTICS_TIMEOUT=I,e.QUERY_EXTENT_TIMEOUT=V}e.NO_SERVICE_DATA_COUNT=1/0,e.MAX_SNAPSHOT_MIN_SCALE_FACTOR=5,e.reset=t}(N||(N={})),N.reset();export{S as FeatureTileController3D,N as FeatureTileController3DConstants};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- const t={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0};export{t as queryCapabilities};
5
+ const t={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0};export{t as queryCapabilities};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import t from"../../../core/Error.js";import s from"../../../core/Loadable.js";import{isSome as r,isNone as o}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{queryFeatureSetJSON as a,getSpatialReferenceWkid as n,getServerLandingPage as u,getServerConformance as l,getServerCollections as c,getServerOpenApi as d,getCollectionDefinition as m,crsDefault as y,crsPrefix as f}from"../../ogc/ogcFeatureUtils.js";import h from"../../../rest/support/FeatureSet.js";import g from"../../../geometry/SpatialReference.js";import{typeKebabDictionary as S}from"../../../geometry/support/typeUtils.js";let v=class extends s{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getFeatureDefinition(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:s,supportedCrs:r},layer:{apiKey:o,capabilities:i,customParameters:p}}=this;return{capabilities:i,collection:e,layerDefinition:t,queryParameters:{apiKey:o,customParameters:p},spatialReference:s,supportedCrs:r}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>h.fromJSON(e)))}queryFeaturesJSON(e,t={}){const s=this.getFeatureDefinition();return this.load(t).then((()=>a(s,e,t)))}queryObjectIds(e,t={}){return null}supportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator)||!!this.featureDefinition.supportedCrs[e.wkid]}_conformsToType(e,t){var s;const r=new RegExp(`^${t}$`,"i");return null!=(s=e.conformsTo.some((e=>r.test(e))))&&s}_getCapabilities(e,t){var s,o,i,p,a,n,u;const l=r(t)?null==(s=t.components)?void 0:s.parameters:null;return{attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1},query:{maxRecordCount:null!=(o=null!=(i=null==l||null==(p=l.limit)||null==(a=p.schema)?void 0:a.maximum)?i:null==l||null==(n=l.limitFeatures)||null==(u=n.schema)?void 0:u.maximum)?o:5e3,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1}}}_getExtent(e){var t;const s=null==(t=e.extent)?void 0:t.spatial;if(!s)return null;const r=s.bbox[0],o=4===r.length,i=r[0],p=r[1],a=o?void 0:r[2];return{xmin:i,ymin:p,xmax:o?r[2]:r[3],ymax:o?r[3]:r[4],zmin:a,zmax:o?void 0:r[5],spatialReference:g.WGS84.toJSON()}}_getStorageSpatialReference(e){var t;const s=null!=(t=e.storageCrs)?t:y,r=n(s);return o(r)?g.WGS84:new g({wkid:r})}_getSupportedSpatialReferences(e,t){var s;const r="#/crs",o=null!=(s=e.crs)?s:[y],i=o.includes(r)?o.filter((e=>e!==r)).concat(t.crs):o,p=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return i.filter((e=>!p.test(e)))}async _loadOGCServices(e,s){const o=r(s)?s.signal:null,{apiKey:i,collectionId:p,customParameters:a,fields:y,geometryType:h,hasZ:g,objectIdField:v,timeInfo:x,url:R}=e,w={fields:null==y?void 0:y.map((e=>e.toJSON())),geometryType:S.toJSON(h),hasZ:g,objectIdField:v,timeInfo:null==x?void 0:x.toJSON()},C={apiKey:i,customParameters:a,signal:o},j=await u(R,C),[O,F]=await Promise.all([l(j,C),c(j,C)]);if(!this._conformsToType(O,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new t("ogc-feature-layer:no-geojson-support","Server does not support geojson");const b=F.collections.find((e=>e.id===p));if(!b)throw new t("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const D=this._conformsToType(O,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await d(j,C):null,P=await m(b,w,C),T=this._getCapabilities(P.hasZ,D),_=this._getExtent(b),q=this._getStorageSpatialReference(b).toJSON(),E=this._getSupportedSpatialReferences(b,F),G=new RegExp(`^${f}`,"i"),I={};for(const t of E){const e=n(t);r(e)&&(I[e]||(I[e]=t.replace(G,"")))}P.extent=_,this.featureDefinition={capabilities:T,collection:b,layerDefinition:P,queryParameters:{},spatialReference:q,supportedCrs:I}}};e([i()],v.prototype,"featureDefinition",void 0),e([i({constructOnly:!0})],v.prototype,"layer",void 0),e([i()],v.prototype,"type",void 0),v=e([p("esri.layers.graphics.sources.OGCFeatureSource")],v);const x=v;export{v as OGCFeatureSource,x as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import e from"../../../core/Error.js";import s from"../../../core/Loadable.js";import{isSome as r,isNone as o}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{queryFeatureSetJSON as a,getSpatialReferenceWkid as n,getServerLandingPage as u,getServerConformance as l,getServerCollections as c,getServerOpenApi as d,getCollectionDefinition as m,crsDefault as y,crsPrefix as f}from"../../ogc/ogcFeatureUtils.js";import g from"../../../rest/support/FeatureSet.js";import h from"../../../geometry/SpatialReference.js";import{typeKebabDictionary as S}from"../../../geometry/support/typeUtils.js";let v=class extends s{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(t){return this.addResolvingPromise(this._loadOGCServices(this.layer,t)),this.when()}getFeatureDefinition(){const{featureDefinition:{collection:t,layerDefinition:e,spatialReference:s,supportedCrs:r},layer:{apiKey:o,capabilities:i,customParameters:p}}=this;return{capabilities:i,collection:t,layerDefinition:e,queryParameters:{apiKey:o,customParameters:p},spatialReference:s,supportedCrs:r}}queryExtent(t,e={}){return null}queryFeatureCount(t,e={}){return null}queryFeatures(t,e={}){return this.queryFeaturesJSON(t,e).then((t=>g.fromJSON(t)))}queryFeaturesJSON(t,e={}){const s=this.getFeatureDefinition();return this.load(e).then((()=>a(s,t,e)))}queryObjectIds(t,e={}){return null}supportsSpatialReference(t){return!(!t.isWGS84&&!t.isWebMercator)||!!this.featureDefinition.supportedCrs[t.wkid]}_conformsToType(t,e){var s;const r=new RegExp(`^${e}$`,"i");return null!=(s=t.conformsTo.some((t=>r.test(t))))&&s}_getCapabilities(t,e){var s,o,i,p,a,n,u;const l=r(e)?null==(s=e.components)?void 0:s.parameters:null;return{attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1},query:{maxRecordCount:null!=(o=null!=(i=null==l||null==(p=l.limit)||null==(a=p.schema)?void 0:a.maximum)?i:null==l||null==(n=l.limitFeatures)||null==(u=n.schema)?void 0:u.maximum)?o:5e3,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1}}}_getExtent(t){var e;const s=null==(e=t.extent)?void 0:e.spatial;if(!s)return null;const r=s.bbox[0],o=4===r.length,i=r[0],p=r[1],a=o?void 0:r[2];return{xmin:i,ymin:p,xmax:o?r[2]:r[3],ymax:o?r[3]:r[4],zmin:a,zmax:o?void 0:r[5],spatialReference:h.WGS84.toJSON()}}_getStorageSpatialReference(t){var e;const s=null!=(e=t.storageCrs)?e:y,r=n(s);return o(r)?h.WGS84:new h({wkid:r})}_getSupportedSpatialReferences(t,e){var s;const r="#/crs",o=null!=(s=t.crs)?s:[y],i=o.includes(r)?o.filter((t=>t!==r)).concat(e.crs):o,p=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return i.filter((t=>!p.test(t)))}async _loadOGCServices(t,s){const o=r(s)?s.signal:null,{apiKey:i,collectionId:p,customParameters:a,fields:y,geometryType:g,hasZ:h,objectIdField:v,timeInfo:x,url:R}=t,w={fields:null==y?void 0:y.map((t=>t.toJSON())),geometryType:S.toJSON(g),hasZ:h,objectIdField:v,timeInfo:null==x?void 0:x.toJSON()},C={apiKey:i,customParameters:a,signal:o},j=await u(R,C),[O,F]=await Promise.all([l(j,C),c(j,C)]);if(!this._conformsToType(O,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new e("ogc-feature-layer:no-geojson-support","Server does not support geojson");const b=F.collections.find((t=>t.id===p));if(!b)throw new e("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const D=this._conformsToType(O,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await d(j,C):null,P=await m(b,w,C),T=this._getCapabilities(P.hasZ,D),_=this._getExtent(b),q=this._getStorageSpatialReference(b).toJSON(),E=this._getSupportedSpatialReferences(b,F),G=new RegExp(`^${f}`,"i"),I={};for(const e of E){const t=n(e);r(t)&&(I[t]||(I[t]=e.replace(G,"")))}P.extent=_,this.featureDefinition={capabilities:T,collection:b,layerDefinition:P,queryParameters:{},spatialReference:q,supportedCrs:I}}};t([i()],v.prototype,"featureDefinition",void 0),t([i({constructOnly:!0})],v.prototype,"layer",void 0),t([i()],v.prototype,"type",void 0),v=t([p("esri.layers.graphics.sources.OGCFeatureSource")],v);const x=v;export{v as OGCFeatureSource,x as default};