@arcgis/core 5.1.0-next.127 → 5.1.0-next.129

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 (658) hide show
  1. package/applications/Urban/editingSessionUtils.js +1 -1
  2. package/arcade/featureSetUtils.js +1 -1
  3. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  4. package/arcade/featureset/sources/FeatureLayerParquet.js +2 -0
  5. package/arcade/featureset/support/FeatureSet.js +1 -1
  6. package/arcade/featureset/support/shared.js +1 -1
  7. package/arcade.d.ts +2 -1
  8. package/arcgisGlobal.d.ts +3 -1
  9. package/assets/esri/core/t9n/Units_ar.json +1 -1
  10. package/assets/esri/core/t9n/Units_bg.json +1 -1
  11. package/assets/esri/core/t9n/Units_bs.json +1 -1
  12. package/assets/esri/core/t9n/Units_ca.json +1 -1
  13. package/assets/esri/core/t9n/Units_cs.json +1 -1
  14. package/assets/esri/core/t9n/Units_da.json +1 -1
  15. package/assets/esri/core/t9n/Units_de.json +1 -1
  16. package/assets/esri/core/t9n/Units_el.json +1 -1
  17. package/assets/esri/core/t9n/Units_es.json +1 -1
  18. package/assets/esri/core/t9n/Units_et.json +1 -1
  19. package/assets/esri/core/t9n/Units_fi.json +1 -1
  20. package/assets/esri/core/t9n/Units_fr.json +1 -1
  21. package/assets/esri/core/t9n/Units_he.json +1 -1
  22. package/assets/esri/core/t9n/Units_hr.json +1 -1
  23. package/assets/esri/core/t9n/Units_hu.json +1 -1
  24. package/assets/esri/core/t9n/Units_id.json +1 -1
  25. package/assets/esri/core/t9n/Units_it.json +1 -1
  26. package/assets/esri/core/t9n/Units_ja.json +1 -1
  27. package/assets/esri/core/t9n/Units_ko.json +1 -1
  28. package/assets/esri/core/t9n/Units_lt.json +1 -1
  29. package/assets/esri/core/t9n/Units_lv.json +1 -1
  30. package/assets/esri/core/t9n/Units_nl.json +1 -1
  31. package/assets/esri/core/t9n/Units_no.json +1 -1
  32. package/assets/esri/core/t9n/Units_pl.json +1 -1
  33. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  34. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  35. package/assets/esri/core/t9n/Units_ro.json +1 -1
  36. package/assets/esri/core/t9n/Units_ru.json +1 -1
  37. package/assets/esri/core/t9n/Units_sk.json +1 -1
  38. package/assets/esri/core/t9n/Units_sl.json +1 -1
  39. package/assets/esri/core/t9n/Units_sr.json +1 -1
  40. package/assets/esri/core/t9n/Units_sv.json +1 -1
  41. package/assets/esri/core/t9n/Units_th.json +1 -1
  42. package/assets/esri/core/t9n/Units_tr.json +1 -1
  43. package/assets/esri/core/t9n/Units_uk.json +1 -1
  44. package/assets/esri/core/t9n/Units_vi.json +1 -1
  45. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  46. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  47. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  48. package/assets/esri/core/workers/RemoteClient.js +1 -1
  49. package/assets/esri/core/workers/chunks/01ba5319cac3e0f14205.js +1 -0
  50. package/assets/esri/core/workers/chunks/0418b5c9d06f3585c035.js +2 -0
  51. package/assets/esri/core/workers/chunks/{b045bffb4f2eb9203183.js → 05e1f1628a3726eca03d.js} +1 -1
  52. package/assets/esri/core/workers/chunks/08dfe61c75f0032db4d4.js +1 -0
  53. package/assets/esri/core/workers/chunks/0b45d34938fa7862f746.js +1 -0
  54. package/assets/esri/core/workers/chunks/0e94786db78770868c63.js +2 -0
  55. package/assets/esri/core/workers/chunks/{81e3bd1a0634ddc2b833.js → 0f10d7d592c36ee2d1ea.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{38cfedce779dd75bd217.js → 10b668186063770d63bd.js} +1 -1
  57. package/assets/esri/core/workers/chunks/11c3b1e8ca21ad62fdd1.js +1 -0
  58. package/assets/esri/core/workers/chunks/152193072c9d3487b47a.js +1 -0
  59. package/assets/esri/core/workers/chunks/{c187bc997bad61b6c6e9.js → 18d1ac2165a84c42e98f.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{0b169bb1969f86232a1a.js → 1b03e10a6b721365acbb.js} +1 -1
  61. package/assets/esri/core/workers/chunks/1bd49e8d2657c72bf3f9.js +1 -0
  62. package/assets/esri/core/workers/chunks/1d2609ce6220b5af5526.js +1 -0
  63. package/assets/esri/core/workers/chunks/1d38b2fcd85ac9ebd7c6.js +1 -0
  64. package/assets/esri/core/workers/chunks/{c2cd80b712f29e8cbb8d.js → 1ff57bf19f021f5fd246.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{287f1441819c345f389e.js → 268243ee64d001009f78.js} +1 -1
  66. package/assets/esri/core/workers/chunks/26aa8190ac439f634c5b.js +1 -0
  67. package/assets/esri/core/workers/chunks/{73c355b895fd6a34fcb8.js → 2a8d791aef3123e6a3c4.js} +1 -1
  68. package/assets/esri/core/workers/chunks/2b781de7b467c61849b2.js +1 -0
  69. package/assets/esri/core/workers/chunks/{0e774f14ba274832f390.js → 2f5970e87e1e77f8362b.js} +1 -1
  70. package/assets/esri/core/workers/chunks/317bf48a4d513a9a2ff3.js +2 -0
  71. package/assets/esri/core/workers/chunks/33838536a7436b1d449e.js +1 -0
  72. package/assets/esri/core/workers/chunks/{03e93c18efc67a25ca63.js → 35c4037b8eea067d9638.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{640abe600fa069ed7640.js → 395736b49abaaa1c3405.js} +1 -1
  74. package/assets/esri/core/workers/chunks/39a10b2092a98083f4cf.js +1 -0
  75. package/assets/esri/core/workers/chunks/3b74749db78bcba2bc16.js +1 -0
  76. package/assets/esri/core/workers/chunks/3b9174de370b187a0985.js +1 -0
  77. package/assets/esri/core/workers/chunks/3bd32387af52fa48d747.js +1 -0
  78. package/assets/esri/core/workers/chunks/3d4ad7c728e02aa90551.js +1 -0
  79. package/assets/esri/core/workers/chunks/3d4bb539bf939fcdeef9.js +1 -0
  80. package/assets/esri/core/workers/chunks/3dc6e9494af16f7b8009.js +1 -0
  81. package/assets/esri/core/workers/chunks/{d36b407f5ad5eabac530.js → 4d43619c73721946441b.js} +29 -29
  82. package/assets/esri/core/workers/chunks/4e59e5a5d0ff887ff899.js +1 -0
  83. package/assets/esri/core/workers/chunks/4efef5fa8bf23aaf34cd.js +1 -0
  84. package/assets/esri/core/workers/chunks/511b9c12a7479d39dac0.js +1 -0
  85. package/assets/esri/core/workers/chunks/51a53011478e0cf96e0b.js +1 -0
  86. package/assets/esri/core/workers/chunks/5481af25fd46914498df.js +1 -0
  87. package/assets/esri/core/workers/chunks/599bd80379423c99799d.js +1 -0
  88. package/assets/esri/core/workers/chunks/609edb4da427ec37bcf7.js +1 -0
  89. package/assets/esri/core/workers/chunks/60d4a3f770bb1e01cd10.js +1 -0
  90. package/assets/esri/core/workers/chunks/65cc9a48ac95523f7aa8.js +1 -0
  91. package/assets/esri/core/workers/chunks/66392ff750c28064040a.js +1 -0
  92. package/assets/esri/core/workers/chunks/668d84dc512b3085a960.js +1 -0
  93. package/assets/esri/core/workers/chunks/68b77b36daae2b4b4237.js +1 -0
  94. package/assets/esri/core/workers/chunks/6a54dddafb6763bf287e.js +1 -0
  95. package/assets/esri/core/workers/chunks/{f0556a695d080454b8da.js → 6af021050d5d04be7a20.js} +1 -1
  96. package/assets/esri/core/workers/chunks/6f5a82388a5eb5fcf1b7.js +1 -0
  97. package/assets/esri/core/workers/chunks/70b5e0fce22122a7ccc2.js +1 -0
  98. package/assets/esri/core/workers/chunks/{8244b74e9c3a30d8d2f6.js → 7361ca78a605eda41a2f.js} +2 -2
  99. package/assets/esri/core/workers/chunks/73b0edabddbb72fe1104.js +1 -0
  100. package/assets/esri/core/workers/chunks/{8b0a01ebc86ab226f01f.js → 75b4c27ca02b124a713c.js} +1 -1
  101. package/assets/esri/core/workers/chunks/7a997ac153181a8f71ef.js +1 -0
  102. package/assets/esri/core/workers/chunks/7f849c8255140be6097f.js +1 -0
  103. package/assets/esri/core/workers/chunks/831455798b177678720c.js +1 -0
  104. package/assets/esri/core/workers/chunks/84a0bb53fcbd99b5aa0c.js +1 -0
  105. package/assets/esri/core/workers/chunks/{9331969046f2b277d620.js → 8a39dd585742960d3ca2.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{5cb1b950249d651f3837.js → 8dcb3e77f76d8396706b.js} +1 -1
  107. package/assets/esri/core/workers/chunks/8f25d91ea7b99597124e.js +1 -0
  108. package/assets/esri/core/workers/chunks/92341f36a8b15f34bcca.js +1 -0
  109. package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 993fee0e91303eb1f01f.js} +1 -1
  110. package/assets/esri/core/workers/chunks/9da1a514e042eb642d35.js +1 -0
  111. package/assets/esri/core/workers/chunks/9f93c29af2a18f7cb160.js +1 -0
  112. package/assets/esri/core/workers/chunks/{f25bb204cf6727f6fdef.js → a0876a52a3c2ad849370.js} +1 -1
  113. package/assets/esri/core/workers/chunks/a1509e2e7809b6754b4f.js +1 -0
  114. package/assets/esri/core/workers/chunks/a18cb809dd56c5537b3b.js +1 -0
  115. package/assets/esri/core/workers/chunks/{52175ff9e8c2c136f90a.js → a3ecde3794a7db3cf283.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{bfd1aef8ac795e1ce227.js → a892b3be70f482bef0ba.js} +1 -1
  117. package/assets/esri/core/workers/chunks/a8ef7acb6d3d1f45e14c.js +1 -0
  118. package/assets/esri/core/workers/chunks/{1436e378d975345686aa.js → aac27340f93ab69f3a9c.js} +1 -1
  119. package/assets/esri/core/workers/chunks/ac16016964be3b684e98.js +30 -0
  120. package/assets/esri/core/workers/chunks/ac7ecd90330090c90005.js +1 -0
  121. package/assets/esri/core/workers/chunks/b076e0ca68ea80bc2559.js +1 -0
  122. package/assets/esri/core/workers/chunks/b1524f23e6cee5301a14.js +1 -0
  123. package/assets/esri/core/workers/chunks/{c983e5ce0ff952b65d7f.js → b2b342b06d502fc61ea5.js} +1 -1
  124. package/assets/esri/core/workers/chunks/{b7e363c14919698f5b65.js → b5017e83a99a8051f212.js} +1 -1
  125. package/assets/esri/core/workers/chunks/b75a4753cea6544da8bb.js +1 -0
  126. package/assets/esri/core/workers/chunks/b775a0d8894930af4983.js +1 -0
  127. package/assets/esri/core/workers/chunks/bb012e02ae197bd1d9de.js +1 -0
  128. package/assets/esri/core/workers/chunks/bbcad2fde838819ffc7b.js +1 -0
  129. package/assets/esri/core/workers/chunks/bc893c95c0ab7d4bb91e.js +1 -0
  130. package/assets/esri/core/workers/chunks/be1d2c3a61e6447fbbc7.js +1 -0
  131. package/assets/esri/core/workers/chunks/bf67e0f6064fb9d94ac8.js +1 -0
  132. package/assets/esri/core/workers/chunks/{97a654e8054302582a3b.js → bfa6f4c08e7571bb1f37.js} +1 -1
  133. package/assets/esri/core/workers/chunks/c2cbc2a920e6e199533a.js +1 -0
  134. package/assets/esri/core/workers/chunks/c9057b0ad2c2bae4a8ce.js +1 -0
  135. package/assets/esri/core/workers/chunks/cf9a132c4c37e62de3d7.js +1 -0
  136. package/assets/esri/core/workers/chunks/d2e94ecf08a56dd43311.js +1 -0
  137. package/assets/esri/core/workers/chunks/{03354e9256b2f77fd4f2.js → d6145cd7e7c5346f62ec.js} +1 -1
  138. package/assets/esri/core/workers/chunks/d6911e9453532501f460.js +1 -0
  139. package/assets/esri/core/workers/chunks/{886ae23a1d8fa21e531f.js → d750e4abeb777caa8c36.js} +1 -1
  140. package/assets/esri/core/workers/chunks/d7acbc2ddff4cee8a465.js +30 -0
  141. package/assets/esri/core/workers/chunks/d8242cf6fec7c7bb614c.js +261 -0
  142. package/assets/esri/core/workers/chunks/{d97c0c18202b8c578f8c.js → e5471373f89fd7cb9844.js} +1 -1
  143. package/assets/esri/core/workers/chunks/e9acc05b0cf9e05f31a8.js +1 -0
  144. package/assets/esri/core/workers/chunks/e9cd84ad0054e9fea448.js +1 -0
  145. package/assets/esri/core/workers/chunks/f321eaf3390ab443b14c.js +1 -0
  146. package/assets/esri/core/workers/chunks/f64241d613f56fbcd981.js +30 -0
  147. package/assets/esri/core/workers/chunks/f955b35337a08f9f747d.js +1 -0
  148. package/assets/esri/core/workers/chunks/{f75295cdd5e84eb97d5a.js → f9d583785b3b09ace222.js} +1 -1
  149. package/assets/esri/core/workers/chunks/fc4641f3c93f43c8c193.js +2 -0
  150. package/assets/esri/core/workers/chunks/fc73de97c618ca11eacb.js +1 -0
  151. package/assets/esri/core/workers/chunks/fe6385115d76e16e8da0.js +1 -0
  152. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  153. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +62 -90
  154. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +0 -2
  155. package/assets/esri/themes/dark/main.css +1 -1
  156. package/assets/esri/themes/light/main.css +1 -1
  157. package/assets/esri/themes/light/view.css +1 -1
  158. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ar.json +1 -1
  159. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bg.json +1 -1
  160. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_bs.json +1 -1
  161. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ca.json +1 -1
  162. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_cs.json +1 -1
  163. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_da.json +1 -1
  164. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_de.json +1 -1
  165. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_el.json +1 -1
  166. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_es.json +1 -1
  167. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_et.json +1 -1
  168. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fi.json +1 -1
  169. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
  170. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_he.json +1 -1
  171. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hr.json +1 -1
  172. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_hu.json +1 -1
  173. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_id.json +1 -1
  174. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_it.json +1 -1
  175. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ja.json +1 -1
  176. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ko.json +1 -1
  177. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lt.json +1 -1
  178. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_lv.json +1 -1
  179. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_nl.json +1 -1
  180. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_no.json +1 -1
  181. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pl.json +1 -1
  182. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-BR.json +1 -1
  183. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_pt-PT.json +1 -1
  184. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ro.json +1 -1
  185. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_ru.json +1 -1
  186. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sk.json +1 -1
  187. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sl.json +1 -1
  188. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sr.json +1 -1
  189. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_sv.json +1 -1
  190. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_th.json +1 -1
  191. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_tr.json +1 -1
  192. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_uk.json +1 -1
  193. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_vi.json +1 -1
  194. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-CN.json +1 -1
  195. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-HK.json +1 -1
  196. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_zh-TW.json +1 -1
  197. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
  198. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
  199. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
  200. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
  201. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
  202. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
  203. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
  204. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
  205. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
  206. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
  207. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
  208. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
  209. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
  210. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
  211. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
  212. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
  213. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
  214. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
  215. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
  216. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
  217. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
  218. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
  219. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_no.json +1 -1
  220. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
  221. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
  222. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
  223. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
  224. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
  225. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
  226. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
  227. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
  228. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
  229. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
  230. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
  231. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
  232. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
  233. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
  234. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
  235. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
  236. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  237. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  238. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  239. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  240. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  241. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  242. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  243. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  244. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  245. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  246. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  247. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  248. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  249. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  250. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  251. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  252. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  253. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  254. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  255. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  256. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  257. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  258. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  259. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  260. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  261. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  262. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  263. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  264. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  265. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  266. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  267. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  268. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  269. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  270. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  271. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  272. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  273. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  274. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  275. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  276. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  277. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  278. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  279. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  280. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  281. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  282. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  283. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  284. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  285. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  286. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  287. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  288. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  289. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  290. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  291. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  292. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  293. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  294. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  295. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  296. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  297. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  298. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  299. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  300. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  301. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  302. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  303. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  304. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  305. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  306. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  307. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  308. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  309. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  310. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  311. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  312. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  313. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  314. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  315. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  316. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  317. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  318. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  319. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  320. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  321. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  322. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  323. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  324. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  325. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  326. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  327. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  328. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  329. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  330. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  331. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  332. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  333. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  334. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  335. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  336. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  337. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  338. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  339. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  340. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  341. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  342. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  343. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  344. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  345. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  346. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  347. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  348. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  349. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  350. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  351. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  352. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  353. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ar.json +1 -1
  354. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bg.json +1 -1
  355. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bs.json +1 -1
  356. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ca.json +1 -1
  357. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_cs.json +1 -1
  358. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_da.json +1 -1
  359. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_de.json +1 -1
  360. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_el.json +1 -1
  361. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_es.json +1 -1
  362. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_et.json +1 -1
  363. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fi.json +1 -1
  364. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fr.json +1 -1
  365. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_he.json +1 -1
  366. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hr.json +1 -1
  367. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hu.json +1 -1
  368. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_id.json +1 -1
  369. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_it.json +1 -1
  370. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ja.json +1 -1
  371. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ko.json +1 -1
  372. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lt.json +1 -1
  373. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lv.json +1 -1
  374. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_nl.json +1 -1
  375. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_no.json +1 -1
  376. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pl.json +1 -1
  377. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-BR.json +1 -1
  378. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-PT.json +1 -1
  379. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ro.json +1 -1
  380. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ru.json +1 -1
  381. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sk.json +1 -1
  382. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sl.json +1 -1
  383. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sr.json +1 -1
  384. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sv.json +1 -1
  385. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_th.json +1 -1
  386. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_tr.json +1 -1
  387. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_uk.json +1 -1
  388. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_vi.json +1 -1
  389. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-CN.json +1 -1
  390. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-HK.json +1 -1
  391. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-TW.json +1 -1
  392. package/chunks/ComponentShader.glsl.js +11 -11
  393. package/chunks/GaussianSplatComposition.glsl.js +1 -1
  394. package/chunks/GlobalIlluminationBlur.glsl.js +8 -8
  395. package/chunks/GlowComposition.glsl.js +1 -1
  396. package/chunks/OITBlend.glsl.js +1 -24
  397. package/chunks/OITBlendEmission.glsl.js +9 -9
  398. package/chunks/OITDimOpaque.glsl.js +3 -9
  399. package/chunks/bundle2.js +1 -1
  400. package/chunks/languageUtils.js +1 -1
  401. package/config.js +1 -1
  402. package/core/reactiveUtils.d.ts +410 -109
  403. package/core/screenUtils.js +1 -1
  404. package/editing/types.d.ts +2 -2
  405. package/form/elements/UtilityNetworkAssociationsElement.d.ts +0 -1
  406. package/geometry/support/aaBoundingRect.js +1 -1
  407. package/graphic/AnnotationFeatureGraphicOrigin.d.ts +5 -2
  408. package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
  409. package/graphic/DimensionFeatureGraphicOrigin.js +1 -1
  410. package/graphic/graphicOrigins.js +1 -1
  411. package/graphic/isAnnotationFeatureGraphicOrigin.d.ts +29 -0
  412. package/graphic/isAnnotationFeatureGraphicOrigin.js +2 -0
  413. package/graphic/isDimensionFeatureGraphicOrigin.d.ts +29 -0
  414. package/graphic/isDimensionFeatureGraphicOrigin.js +2 -0
  415. package/interfaces.d.ts +3 -3
  416. package/kernel.js +1 -1
  417. package/layers/AnnotationFeatureLayer.d.ts +73 -0
  418. package/layers/AnnotationFeatureLayer.js +1 -1
  419. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  420. package/layers/ParquetLayer.js +1 -1
  421. package/layers/graphics/applyEditsUtils.js +1 -1
  422. package/layers/graphics/data/QueryEngine.js +1 -1
  423. package/layers/graphics/sources/MemorySource.js +1 -1
  424. package/layers/graphics/sources/ParquetSource.js +1 -1
  425. package/layers/graphics/sources/parquet/ParquetFileStatistics.js +1 -1
  426. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  427. package/layers/graphics/sources/support/parquetIdUtils.js +1 -1
  428. package/layers/mixins/OperationalLayer.js +1 -1
  429. package/layers/support/{AnnotationSublayer.d.ts → AnnotationFeatureSublayer.d.ts} +12 -12
  430. package/layers/support/AnnotationFeatureSublayer.js +2 -0
  431. package/layers/support/ExportImageServiceParameters.js +1 -1
  432. package/layers/support/ParquetPortalItemData.js +1 -1
  433. package/layers/support/layerUtils.js +1 -1
  434. package/layers/support/layersMapping.js +1 -1
  435. package/layers/support/parquetUtils.js +1 -1
  436. package/package.json +4 -4
  437. package/popup/Feature.d.ts +57 -6
  438. package/popup/Features.d.ts +86 -7
  439. package/popup/content/UtilityNetworkAssociationsContent.d.ts +0 -1
  440. package/popup/support/UtilityNetworkAssociationType.d.ts +0 -1
  441. package/rest/print.js +1 -1
  442. package/smartMapping/renderers/location.js +1 -1
  443. package/smartMapping/renderers/predominance.js +1 -1
  444. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  445. package/smartMapping/renderers/support/rendererUtils.d.ts +3 -1
  446. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  447. package/support/revision.js +1 -1
  448. package/symbols/WebStyleSymbol.js +1 -1
  449. package/symbols/support/symbolUtils.js +1 -1
  450. package/symbols/support/webStyleSymbolCache.js +2 -0
  451. package/undoredo/support/ApplySet.js +1 -1
  452. package/undoredo/support/ApplySetItem.js +1 -1
  453. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  454. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  455. package/views/2d/engine/webgl/TextureManager.js +1 -1
  456. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  457. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  458. package/views/2d/engine/webgl/shaderGraph/techniques/animated/attributes.js +1 -1
  459. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  460. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  461. package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
  462. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  463. package/views/2d/layers/support/annodime/annotationGraphic.js +1 -1
  464. package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
  465. package/views/2d/layers/support/annodime/utils.js +1 -1
  466. package/views/2d/support/hitTestUtils.js +1 -1
  467. package/views/2d/unitBezier.js +1 -1
  468. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  469. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  470. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  471. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  472. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  473. package/views/3d/layers/graphics/SymbolComplexity.js +1 -1
  474. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  475. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  476. package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
  477. package/views/3d/support/QualityProfile.js +1 -1
  478. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  479. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  480. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  481. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
  482. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  483. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  484. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathEvaluate.glsl.js +14 -6
  485. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +2 -1
  486. package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +2 -2
  487. package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
  488. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js +6 -8
  489. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  490. package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +1 -1
  491. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  492. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  493. package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
  494. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  495. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  496. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  497. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  498. package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +1 -1
  499. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechnique.js +1 -1
  500. package/views/3d/webgl-engine/effects/transparency/OITBlendFragmentTechniqueConfiguration.js +2 -0
  501. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  502. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  503. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
  504. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
  505. package/views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js +2 -0
  506. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  507. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  508. package/views/3d/webgl-engine/lib/Material.js +1 -1
  509. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  510. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  511. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  512. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  513. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  514. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  515. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  516. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  517. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  518. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  519. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  520. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  521. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  522. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  523. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +1 -1
  524. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  525. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +9 -10
  526. package/views/3d/webgl-engine/shaders/alphaCutoff.glsl.js +1 -1
  527. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
  528. package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
  529. package/views/LinkChartView.d.ts +3 -1
  530. package/views/View2D.d.ts +5 -4
  531. package/views/draw/support/editingSessionUtils.js +1 -1
  532. package/webdoc/support/writeUtils.js +1 -1
  533. package/webscene/support/AlphaCutoff.js +1 -1
  534. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  535. package/widgets/BatchAttributeForm/attachmentUtils.d.ts +9 -0
  536. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  537. package/widgets/BatchAttributeForm/css.js +1 -1
  538. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +2 -2
  539. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  540. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  541. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  542. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  543. package/widgets/BatchAttributeForm/inputs/support/attachmentValidationCriteriaState.d.ts +1 -1
  544. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  545. package/widgets/BatchAttributeForm/types.d.ts +91 -5
  546. package/widgets/BatchAttributeForm.js +1 -1
  547. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  548. package/widgets/Editor/Edits.js +1 -1
  549. package/widgets/Editor/MergeFeaturesWorkflow.js +1 -1
  550. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  551. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  552. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  553. package/widgets/Editor/support/SketchController.js +1 -1
  554. package/widgets/Editor/workflowUtils.js +1 -1
  555. package/widgets/Editor.js +1 -1
  556. package/widgets/Feature/FeatureViewModel.d.ts +0 -1
  557. package/widgets/FeatureForm/UtilityNetworkAssociationInput.d.ts +0 -1
  558. package/widgets/Features/FeaturesViewModel.d.ts +0 -1
  559. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  560. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  561. package/widgets/OrientedImageryViewer.js +1 -1
  562. package/widgets/Print/PrintViewModel.d.ts +11 -1
  563. package/widgets/Print/PrintViewModel.js +1 -1
  564. package/widgets/Sketch/SketchViewModel.d.ts +10 -1
  565. package/widgets/Sketch/SketchViewModel.js +1 -1
  566. package/assets/components/assets/icon/orientedImageryFullSuperimpose16.json +0 -1
  567. package/assets/components/assets/icon/orientedImageryFullSuperimpose24.json +0 -1
  568. package/assets/components/assets/icon/orientedImageryFullSuperimpose32.json +0 -1
  569. package/assets/components/assets/icon/orientedImageryHalfSuperimpose16.json +0 -1
  570. package/assets/components/assets/icon/orientedImageryHalfSuperimpose24.json +0 -1
  571. package/assets/components/assets/icon/orientedImageryHalfSuperimpose32.json +0 -1
  572. package/assets/components/assets/icon/orientedImagerySceneOnly16.json +0 -1
  573. package/assets/components/assets/icon/orientedImagerySceneOnly24.json +0 -1
  574. package/assets/components/assets/icon/orientedImagerySceneOnly32.json +0 -1
  575. package/assets/components/assets/icon/parquetFeatureLayer16.json +0 -1
  576. package/assets/components/assets/icon/parquetFeatureLayer24.json +0 -1
  577. package/assets/components/assets/icon/parquetFeatureLayer32.json +0 -1
  578. package/assets/esri/core/workers/chunks/02a94efda13d9b683272.js +0 -1
  579. package/assets/esri/core/workers/chunks/0803f022b5191171bc9c.js +0 -1
  580. package/assets/esri/core/workers/chunks/0acf8df4e9556d05136c.js +0 -1
  581. package/assets/esri/core/workers/chunks/0ded58ccb83f624f1460.js +0 -1
  582. package/assets/esri/core/workers/chunks/152f1c08197955224ad3.js +0 -1
  583. package/assets/esri/core/workers/chunks/19dcae83be0fc0aced02.js +0 -1
  584. package/assets/esri/core/workers/chunks/1a95370ddc22729ab3c6.js +0 -1
  585. package/assets/esri/core/workers/chunks/23d50c4478f40a7d62bf.js +0 -1
  586. package/assets/esri/core/workers/chunks/2623cd08487fdc9a94f1.js +0 -1
  587. package/assets/esri/core/workers/chunks/2b00229c238aae70b948.js +0 -1
  588. package/assets/esri/core/workers/chunks/2b814bb51704a5b4fdc2.js +0 -30
  589. package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +0 -1
  590. package/assets/esri/core/workers/chunks/3172d7fc23787a287191.js +0 -1
  591. package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +0 -30
  592. package/assets/esri/core/workers/chunks/3bdef4b9f86711ae48b3.js +0 -2
  593. package/assets/esri/core/workers/chunks/426b8e1e2eef2460851d.js +0 -1
  594. package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +0 -1
  595. package/assets/esri/core/workers/chunks/4d09ef7c57ab7f9782fe.js +0 -1
  596. package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +0 -1
  597. package/assets/esri/core/workers/chunks/52afd43bbe23e358efb5.js +0 -1
  598. package/assets/esri/core/workers/chunks/59a60fa09b19a0b2f473.js +0 -1
  599. package/assets/esri/core/workers/chunks/59dafa1e1340ea4043e6.js +0 -1
  600. package/assets/esri/core/workers/chunks/6284eafe2c3b45a0e72a.js +0 -1
  601. package/assets/esri/core/workers/chunks/65f02eca694cc1c9f5a7.js +0 -1
  602. package/assets/esri/core/workers/chunks/6cab67fc7044ee9b863b.js +0 -1
  603. package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +0 -1
  604. package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +0 -1
  605. package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +0 -1
  606. package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +0 -1
  607. package/assets/esri/core/workers/chunks/6f7193b9ff5942c0d354.js +0 -1
  608. package/assets/esri/core/workers/chunks/70737052bab29fcaa120.js +0 -1
  609. package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +0 -1
  610. package/assets/esri/core/workers/chunks/7cadb872b9ca96eedca5.js +0 -1
  611. package/assets/esri/core/workers/chunks/8486ef6c7076baf0348b.js +0 -1
  612. package/assets/esri/core/workers/chunks/851705cf276eae8d4d37.js +0 -1
  613. package/assets/esri/core/workers/chunks/882ee7ed8a3a0215f9b9.js +0 -1
  614. package/assets/esri/core/workers/chunks/8c443c52c846a096a250.js +0 -1
  615. package/assets/esri/core/workers/chunks/972ba277a27704d28357.js +0 -1
  616. package/assets/esri/core/workers/chunks/97d2bdbea39cbcf8fd0f.js +0 -1
  617. package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +0 -1
  618. package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +0 -1
  619. package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +0 -1
  620. package/assets/esri/core/workers/chunks/a2d7e8147dee6642029a.js +0 -2
  621. package/assets/esri/core/workers/chunks/a643a4751bbf4430bde2.js +0 -262
  622. package/assets/esri/core/workers/chunks/a9003fe5975cd554ba24.js +0 -1
  623. package/assets/esri/core/workers/chunks/aa02458ceb839b555ee1.js +0 -1
  624. package/assets/esri/core/workers/chunks/ab62724b80b3c478a597.js +0 -1
  625. package/assets/esri/core/workers/chunks/b44cf254585210578eab.js +0 -1
  626. package/assets/esri/core/workers/chunks/b9935cc8e2bd4045058a.js +0 -1
  627. package/assets/esri/core/workers/chunks/c216cd5d6b5d4fe4bab3.js +0 -2
  628. package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +0 -1
  629. package/assets/esri/core/workers/chunks/c32430e99e8cd6e5f688.js +0 -1
  630. package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +0 -1
  631. package/assets/esri/core/workers/chunks/c80fc1b3048e8d58a1f8.js +0 -1
  632. package/assets/esri/core/workers/chunks/ca8c08659d82019d775d.js +0 -1
  633. package/assets/esri/core/workers/chunks/cf8ce21dc649021e97f6.js +0 -1
  634. package/assets/esri/core/workers/chunks/d1ccc5f2d8892328ab01.js +0 -2
  635. package/assets/esri/core/workers/chunks/d41caf20c26f80385265.js +0 -1
  636. package/assets/esri/core/workers/chunks/d52864823067e57a719a.js +0 -1
  637. package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +0 -1
  638. package/assets/esri/core/workers/chunks/d9d0a07245ee5117d2a0.js +0 -1
  639. package/assets/esri/core/workers/chunks/dd920a6f6422fa213eba.js +0 -1
  640. package/assets/esri/core/workers/chunks/df18b0a653b328d8d052.js +0 -1
  641. package/assets/esri/core/workers/chunks/e1505ec80b068011bdc5.js +0 -1
  642. package/assets/esri/core/workers/chunks/e16710ef178d64606a55.js +0 -1
  643. package/assets/esri/core/workers/chunks/e33d2ede6c9f1527d51b.js +0 -1
  644. package/assets/esri/core/workers/chunks/e5ef06c205d34df1e4bc.js +0 -1
  645. package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +0 -1
  646. package/assets/esri/core/workers/chunks/eabeaab5c4810f999a4d.js +0 -1
  647. package/assets/esri/core/workers/chunks/ec723f8777b935c5e81a.js +0 -1
  648. package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +0 -1
  649. package/assets/esri/core/workers/chunks/f622ae3887c85535e8ab.js +0 -30
  650. package/assets/esri/core/workers/chunks/fa3faec65882c5b6f1a0.js +0 -1
  651. package/layers/support/AnnotationSublayer.js +0 -2
  652. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechniqueConfiguration.js +0 -2
  653. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechniqueConfiguration.js +0 -2
  654. /package/assets/esri/core/workers/chunks/{3bdef4b9f86711ae48b3.js.LICENSE.txt → 0418b5c9d06f3585c035.js.LICENSE.txt} +0 -0
  655. /package/assets/esri/core/workers/chunks/{c216cd5d6b5d4fe4bab3.js.LICENSE.txt → 0e94786db78770868c63.js.LICENSE.txt} +0 -0
  656. /package/assets/esri/core/workers/chunks/{d1ccc5f2d8892328ab01.js.LICENSE.txt → 317bf48a4d513a9a2ff3.js.LICENSE.txt} +0 -0
  657. /package/assets/esri/core/workers/chunks/{8244b74e9c3a30d8d2f6.js.LICENSE.txt → 7361ca78a605eda41a2f.js.LICENSE.txt} +0 -0
  658. /package/assets/esri/core/workers/chunks/{a2d7e8147dee6642029a.js.LICENSE.txt → fc4641f3c93f43c8c193.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{indexOf as e,PositionHint as t}from"../../../core/arrayUtils.js";import{toConst as i}from"../../../core/compilerUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import{clone as s}from"../../../core/lang.js";import{removeMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{signalFromSignalOrOptions as l,throwIfAborted as o}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as u}from"../../../core/units.js";import{isSerializable as c}from"../../../core/support/jsonUtils.js";import{isLoaded as y}from"../../../geometry/projectionUtils.js";import{set as h,create as d,expandWithAABB as m,negativeInfinity as f}from"../../../geometry/support/aaBoundingBox.js";import{fromValues as p,create as x}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as g}from"../../../geometry/support/boundsUtils.js";import{isExtent as _,isPolygon as F}from"../../../geometry/support/jsonTypeUtils.js";import{fromJSON as w}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as Q}from"../../../geometry/support/normalizeUtils.js";import{equals as S,isValid as R}from"../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as I}from"../featureConversionUtils.js";import{getWhereClause as j}from"./attributeSupport.js";import{getGeometry as E,cleanFromGeometryEngine as b}from"./geometryUtils.js";import{checkProjectionSupport as T,project as A,projectMany as v}from"./projectionSupport.js";import{QueryEngineCache as G}from"./QueryEngineCache.js";import{queryCapabilities as k}from"./QueryEngineCapabilities.js";import{QueryEngineResult as C}from"./QueryEngineResult.js";import{queryEngineEmptyResult as O,normalizeAttributeBinsQuery as P,normalizeQueryLike as q,normalizeQuery as z}from"./queryUtils.js";import{validateAttributeBinsQuery as U,validateQuery as B,validateStatisticsQuery as M}from"./queryValidationUtils.js";import{getSpatialQueryOperator as H,canQueryWithRBush as Z}from"./spatialQuerySupport.js";import{getTimeExtent as J,getTimeOperator as L}from"./timeSupport.js";import N from"../../support/FieldsIndex.js";import{ImmediateTask as V}from"../../../views/support/Scheduler.js";const D="unsupported-query";class K{constructor(e,t=null,i,r,s){this.attributes=e,this.geometry=i,this.centroid=r,this.filterFlags=s,this.groupId=-1,this.displayId=t}}class W{constructor(e){this._changeHandle=null,this.capabilities={query:k},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new G,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=c(e.fieldsIndex)?e.fieldsIndex:N.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=V}destroy(){this._changeHandle=a(this._changeHandle),this._frameTask=a(this._frameTask),this._clearCache(),n(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=l(t);if(!this.timeInfo?.trackIdField)throw new r(D,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=l(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=l(t);return e=s(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),r)}async executeQueryForUniqueValues(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),r)}async executeQueryForClassBreaks(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),r)}async executeQueryForHistogram(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),r)}async executeQueryForSnapping(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=l(e);this._timeExtentPromise||=J(this.timeInfo,this.featureStore);const[i,r]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return o(t),{fullExtent:i,timeExtent:r}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(t){if(t!==O)throw t;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const r=i.size;if(!r)return{count:0,extent:null};const s=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:r,extent:s}}catch(i){if(i===O)return{count:0,extent:null};throw i}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,r=new Set;for(const e of i)r.add(t.featureAdapter.getObjectId(e));return r}catch(t){if(t===O)return new Set;throw t}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await P(e,this.definitionExpression,this.spatialReference),yield,e=await U(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==O)throw i;t=new C([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:r,field3:s,valueExpression:a}=t,n=yield*this._executeQueryForStatistics(e,{field:i,field2:r,field3:s,valueExpression:a});return yield,await n.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:r,returnEdge:a,vertexMode:n}=e;if(!a&&"none"===n)return{candidates:[]};let l=s(e.query);l=await q(l,this.definitionExpression,this.spatialReference),yield,l=await B(l,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const o=!S(i.spatialReference,this.spatialReference);o&&(await T(i.spatialReference,this.spatialReference),yield);const u="number"==typeof r?r:r.x,c="number"==typeof r?r:r.y,y={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},h=o?A(y,this.spatialReference):y;if(!h)return{candidates:[]};const d=(await Q(w(i),null,{signal:t}))[0];yield;const m=(await Q(w(h),null,{signal:t}))[0];if(yield,null==d||null==m)return{candidates:[]};const f=await this._searchFeatures(X(m.toJSON()));yield;const p=new C(f,l,this);this._executeObjectIdsQuery(p),yield,this._executeTimeQuery(p),yield,this._executeAttributesQuery(p),yield,yield*this._executeGeometryQueryForSnapping(p),yield;const x=d.toJSON(),g=o?A(x,this.spatialReference):x,_=o?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:r;return p.createSnappingResponse({...e,point:g,distance:_},l.returnZ,i.spatialReference)}async _getBounds(e,t,i){const r=h(d(),f);return await this.featureStore.forEachBounds(e,e=>m(r,e)),Y(r,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new C(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>i(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=s(e),e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),r}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:r}=e,s=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,n=null==s||S(s,a.spatialReference)?a:A(a,s);if(!n)return null;const l=i||r,o=R(t)&&!S(this.spatialReference,t)&&l?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(X(n));yield;if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const r=await H("esriSpatialRelDisjoint",n,this.geometryType);yield;const s=e=>!t.has(u.getObjectId(e))||r(u.getGeometry(e)),a=yield*this._runSpatialFilter(i,s);yield;const l=new C(a,e,this);return await o(l)}if(!c.length)return new C([],e,this);if(this._canExecuteSinglePass(n,e))return await o(new C(c,e,this));const y=await H("esriSpatialRelContains",n,this.geometryType);yield;const h=yield*this._runSpatialFilter(c,e=>y(u.getGeometry(e)));return yield,await o(new C(h,e,this))}async*_executeGeometryQuery(i,r){if(null!=r&&0===r.items.length)return r;const{geometry:s,outSR:a,returnGeometry:n,returnCentroid:l}=i,o=r?null:this._getCacheKey(i),u=o?this._cache.get(o):null;if(u)return new C(u,i,this);const c=R(a)&&!S(this.spatialReference,a),y=n||l,h=async e=>(c&&y&&await this._project(e,a),o&&this._cache.put(o,e.items),e),d=this.featureStore.featureSpatialReference,m=!s||null==d||S(d,s.spatialReference)?s:A(s,d);if(!m)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));yield;const f=this.featureAdapter;let p=await this._searchFeatures(X(s));yield;const x=i.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===x){if(!p.length)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));const e=new Set;for(const i of p)e.add(f.getObjectId(i));let t;null!=r?t=r.items:(yield,t=await this._getAllFeatures(),yield);const s=await H(x,m,this.geometryType);yield;const a=t=>!e.has(f.getObjectId(t))||s(f.getGeometry(t)),n=yield*this._runSpatialFilter(t,a);yield;const l=new C(n,i,this);return await h(l)}if(null!=r){const i=new t;p=p.filter(t=>e(r.items,t,r.items.length,i)>=0)}if(!p.length){const e=new C([],i,this);return o&&this._cache.put(o,e.items),e}if(this._canExecuteSinglePass(m,i))return await h(new C(p,i,this));const g=await H(x,m,this.geometryType);yield;const _=yield*this._runSpatialFilter(p,e=>g(f.getGeometry(e)));return yield,await h(new C(_,i,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const r of e.query.aggregateIds){this.aggregateAdapter.getFeatureObjectIds(r).forEach(e=>t.add(e))}const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=L(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=j(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const r=await H(i,t.geometry,this.geometryType);yield;const s=this.featureAdapter,a=e=>r(s.getGeometry(e)),n=yield*this._runSpatialFilter(e.items,a);e.items=n}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const r=new Array;for(const s of e)t(s)&&r.push(s),i.madeProgress(),i.done&&(i=yield);return r}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:r}=this.timeInfo,s=r||i,a=new Map,n=this.featureAdapter.getAttribute;for(const l of e.items){const e=n(l,t),i=n(l,s),r=a.get(e);(!r||i>n(r,s))&&a.set(e,l)}e.items=Array.from(a.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:r,returnCentroid:s,outSR:a,resultType:n,cacheHint:l}=e;if("tile"!==n&&!l)return null;const o=r||s;return R(a)&&!S(this.spatialReference,a)&&o?JSON.stringify([t,i,a]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return Z(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||S(this.spatialReference,t))return e;const r=this.featureAdapter,s=y()?await this._getFullExtent():void 0,a=await v(e.items.map(e=>E(this.geometryType,r.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:s});return e.items=i(a.map((t,i)=>r.cloneWithGeometry(e.items[i],I(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=s(e);try{e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await M(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),yield,r}catch(i){if(i!==O)throw i;return new C([],e,this)}}get test(){}}function X(e){if(Z(e)){if(_(e))return[p(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if(F(e))return e.rings.map(e=>p(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[g(x(),e)]}function Y(e,t,i,r,s){const a={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:b(r)};s&&isFinite(e[2])&&isFinite(e[5])&&(a.zmin=e[2],a.zmax=e[5],a.hasZ=!0);const n=A(a,t,i);if(n.spatialReference=b(i),n.xmax-n.xmin===0){const e=u(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin===0){const e=u(n.spatialReference);n.ymin-=e,n.ymax+=e}if(s&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin===0){const e=u(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}export{K as Feature,W as QueryEngine,Y as getQueryResultExtent};
2
+ import{indexOf as e,PositionHint as t}from"../../../core/arrayUtils.js";import{toConst as i}from"../../../core/compilerUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import{clone as s}from"../../../core/lang.js";import{removeMaybe as a,destroyMaybe as n}from"../../../core/maybe.js";import{signalFromSignalOrOptions as l,throwIfAborted as o}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as u}from"../../../core/units.js";import{isSerializable as c}from"../../../core/support/jsonUtils.js";import{isLoaded as y}from"../../../geometry/projectionUtils.js";import{set as h,create as d,expandWithAABB as m,negativeInfinity as f}from"../../../geometry/support/aaBoundingBox.js";import{fromValues as p,create as x}from"../../../geometry/support/aaBoundingRect.js";import{getBoundsXY as g}from"../../../geometry/support/boundsUtils.js";import{isExtent as _,isPolygon as F}from"../../../geometry/support/jsonTypeUtils.js";import{fromJSON as w}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as Q}from"../../../geometry/support/normalizeUtils.js";import{equals as S,isValid as R}from"../../../geometry/support/spatialReferenceUtils.js";import{convertFromGeometry as I}from"../featureConversionUtils.js";import{getWhereClause as j}from"./attributeSupport.js";import{getGeometry as E,cleanFromGeometryEngine as b}from"./geometryUtils.js";import{checkProjectionSupport as T,project as A,projectMany as v}from"./projectionSupport.js";import{QueryEngineCache as G}from"./QueryEngineCache.js";import{queryCapabilities as k}from"./QueryEngineCapabilities.js";import{QueryEngineResult as C}from"./QueryEngineResult.js";import{queryEngineEmptyResult as O,normalizeAttributeBinsQuery as P,normalizeQueryLike as q,normalizeQuery as z}from"./queryUtils.js";import{validateAttributeBinsQuery as U,validateQuery as B,validateStatisticsQuery as M}from"./queryValidationUtils.js";import{getSpatialQueryOperator as H,canQueryWithRBush as Z}from"./spatialQuerySupport.js";import{getTimeExtent as J,getTimeOperator as L}from"./timeSupport.js";import N from"../../support/FieldsIndex.js";import{ImmediateTask as V}from"../../../views/support/Scheduler.js";const D="unsupported-query";class K{constructor(e,t=null,i,r,s){this.attributes=e,this.geometry=i,this.centroid=r,this.filterFlags=s,this.groupId=-1,this.displayId=t}}class W{constructor(e){this._changeHandle=null,this.capabilities={query:k},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new G,this.timeInfo=e.timeInfo,this.featureIdInfo=e.featureIdInfo,this._changeHandle=this.featureStore.events.on("changed",()=>this._clearCache()),this.fieldsIndex=c(e.fieldsIndex)?e.fieldsIndex:N.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map(e=>e.name)):this.availableFields=new Set(e.availableFields.map(e=>this.fieldsIndex.get(e)?.name).filter(e=>null!=e)),e.scheduler&&e.priority?this._frameTask=e.scheduler.registerTask(e.priority):this._frameTask=V}destroy(){this._changeHandle=a(this._changeHandle),this._frameTask=a(this._frameTask),this._clearCache(),n(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}async executeQuery(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryFeatureSet(e),i)}async executeQueryForCount(e={},t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForCount(e),i)}async executeQueryForExtent(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForExtent(e),i)}async executeQueryForIds(e,t){return Array.from(await this.executeQueryForIdSet(e,t))}async executeQueryForIdSet(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForIdSet(e),i)}async executeQueryForLatestObservations(e,t){const i=l(t);if(!this.timeInfo?.trackIdField)throw new r(D,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});return await this._frameTask.scheduleGenerator(()=>this._executeQueryForLatestObservations(e),i)}async executeQueryForOpaqueFeatures(e,t){const i=l(t);return(await this._frameTask.scheduleGenerator(()=>this._executeQuery(e,{}),i)).items}async executeAttributeBinsQuery(e,t){const i=l(t);return e=s(e),await this._frameTask.scheduleGenerator(()=>this._executeAttributeBinsQuery(e),i)}async executeQueryForSummaryStatistics(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSummaryStatistics(e,t),r)}async executeQueryForUniqueValues(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForUniqueValues(e,t),r)}async executeQueryForClassBreaks(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForClassBreaks(e,t),r)}async executeQueryForHistogram(e={},t,i){const r=l(i);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForHistogram(e,t),r)}async executeQueryForSnapping(e,t){const i=l(t);return await this._frameTask.scheduleGenerator(()=>this._executeQueryForSnapping(e,i),i)}async fetchRecomputedExtents(e){const t=l(e);this._timeExtentPromise||=J(this.timeInfo,this.featureStore);const[i,r]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return o(t),{fullExtent:i,timeExtent:r}}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async*_executeQueryFeatureSet(e){try{const t=yield*this._executeQuery(e,{});return yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeQueryForCount(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null});return yield,t.createQueryResponseForCount()}catch(t){if(t!==O)throw t;return 0}}async*_executeQueryForExtent(e){const t=e.outSR;try{const i=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const r=i.size;if(!r)return{count:0,extent:null};const s=await this._getBounds(i.items,i.spatialReference,t??this.spatialReference);return yield,{count:r,extent:s}}catch(i){if(i===O)return{count:0,extent:null};throw i}}async*_executeQueryForIdSet(e){try{const t=yield*this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null});yield;const i=t.items,r=new Set;for(const e of i)r.add(t.featureAdapter.getObjectId(e));return r}catch(t){if(t===O)return new Set;throw t}}async*_executeQueryForLatestObservations(e){try{const t=yield*this._executeQuery(e,{});return yield,this._filterLatest(t),yield,await t.createQueryResponse()}catch(t){if(t!==O)throw t;return await new C([],e,this).createQueryResponse()}}async*_executeAttributeBinsQuery(e){let t;try{e=await P(e,this.definitionExpression,this.spatialReference),yield,e=await U(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield,t=yield*this._executeGeometryQuery(e,i),yield,this._executeAggregateIdsQuery(t),yield,this._executeObjectIdsQuery(t),yield,this._executeTimeQuery(t),yield,this._executeAttributesQuery(t),yield}catch(i){if(i!==O)throw i;t=new C([],e,this)}return await t.createQueryBinsResponse(e)}async*_executeQueryForSummaryStatistics(e={},t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createSummaryStatisticsResponse(t)}async*_executeQueryForUniqueValues(e={},t){const{field:i,field2:r,field3:s,valueExpression:a}=t,n=yield*this._executeQueryForStatistics(e,{field:i,field2:r,field3:s,valueExpression:a});return yield,await n.createUniqueValuesResponse(t)}async*_executeQueryForClassBreaks(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createClassBreaksResponse(t)}async*_executeQueryForHistogram(e,t){const{field:i,normalizationField:r,valueExpression:s}=t,a=yield*this._executeQueryForStatistics(e,{field:i,normalizationField:r,valueExpression:s});return yield,await a.createHistogramResponse(t)}async*_executeQueryForSnapping(e,t){const{point:i,distance:r,returnEdge:a,vertexMode:n}=e;if(!a&&"none"===n)return{candidates:[]};let l=s(e.query);l=await q(l,this.definitionExpression,this.spatialReference),yield,l=await B(l,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const o=!S(i.spatialReference,this.spatialReference);o&&(await T(i.spatialReference,this.spatialReference),yield);const u="number"==typeof r?r:r.x,c="number"==typeof r?r:r.y,y={xmin:i.x-u,xmax:i.x+u,ymin:i.y-c,ymax:i.y+c,spatialReference:i.spatialReference},h=o?A(y,this.spatialReference):y;if(!h)return{candidates:[]};const d=(await Q(w(i),null,{signal:t}))[0];yield;const m=(await Q(w(h),null,{signal:t}))[0];if(yield,null==d||null==m)return{candidates:[]};const f=await this._searchFeatures(X(m.toJSON()));yield;const p=new C(f,l,this);this._executeObjectIdsQuery(p),yield,this._executeTimeQuery(p),yield,this._executeAttributesQuery(p),yield,yield*this._executeGeometryQueryForSnapping(p),yield;const x=d.toJSON(),g=o?A(x,this.spatialReference):x,_=o?Math.max(h.xmax-h.xmin,h.ymax-h.ymin)/2:r;return p.createSnappingResponse({...e,point:g,distance:_},l.returnZ,i.spatialReference)}async _getBounds(e,t,i){const r=h(d(),f);return await this.featureStore.forEachBounds(e,e=>m(r,e)),Y(r,t,i,this.spatialReference,this.hasZ)}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then(e=>this._getBounds(e,this.spatialReference,this.spatialReference)),this._fullExtentPromise}async _getAllFeaturesQueryEngineResult(e){return new C(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach(t=>e.push(t)))().then(()=>i(e))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async*_executeQuery(e,t){e=s(e),e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await B(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield,e={...e,...t};const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),r}async*_executeSceneFilterQuery(e){if(null==e.sceneFilter)return null;const{outSR:t,returnGeometry:i,returnCentroid:r}=e,s=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,n=null==s||S(s,a.spatialReference)?a:A(a,s);if(!n)return null;const l=i||r,o=R(t)&&!S(this.spatialReference,t)&&l?async e=>this._project(e,t):e=>e;yield;const u=this.featureAdapter,c=await this._searchFeatures(X(n));yield;if("disjoint"===e.sceneFilter.spatialRelationship){if(!c.length)return null;const t=new Set;for(const e of c)t.add(u.getObjectId(e));const i=await this._getAllFeatures();yield;const r=await H("esriSpatialRelDisjoint",n,this.geometryType);yield;const s=e=>!t.has(u.getObjectId(e))||r(u.getGeometry(e)),a=yield*this._runSpatialFilter(i,s);yield;const l=new C(a,e,this);return await o(l)}if(!c.length)return new C([],e,this);if(this._canExecuteSinglePass(n,e))return await o(new C(c,e,this));const y=await H("esriSpatialRelContains",n,this.geometryType);yield;const h=yield*this._runSpatialFilter(c,e=>y(u.getGeometry(e)));return yield,await o(new C(h,e,this))}async*_executeGeometryQuery(i,r){if(null!=r&&0===r.items.length)return r;const{geometry:s,outSR:a,returnGeometry:n,returnCentroid:l}=i,o=r?null:this._getCacheKey(i),u=o?this._cache.get(o):null;if(u)return new C(u,i,this);const c=R(a)&&!S(this.spatialReference,a),y=n||l,h=async e=>(c&&y&&await this._project(e,a),o&&this._cache.put(o,e.items),e),d=this.featureStore.featureSpatialReference,m=!s||null==d||S(d,s.spatialReference)?s:A(s,d);if(!m)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));yield;const f=this.featureAdapter;let p=await this._searchFeatures(X(s));yield;const x=i.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===x){if(!p.length)return await h(null!=r?r:await this._getAllFeaturesQueryEngineResult(i));const e=new Set;for(const i of p)e.add(f.getObjectId(i));let t;null!=r?t=r.items:(yield,t=await this._getAllFeatures(),yield);const s=await H(x,m,this.geometryType);yield;const a=t=>!e.has(f.getObjectId(t))||s(f.getGeometry(t)),n=yield*this._runSpatialFilter(t,a);yield;const l=new C(n,i,this);return await h(l)}if(null!=r){const i=new t;p=p.filter(t=>e(r.items,t,r.items.length,i)>=0)}if(!p.length){const e=new C([],i,this);return o&&this._cache.put(o,e.items),e}if(this._canExecuteSinglePass(m,i))return await h(new C(p,i,this));const g=await H(x,m,this.geometryType);yield;const _=yield*this._runSpatialFilter(p,e=>g(f.getGeometry(e)));return yield,await h(new C(_,i,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const r of e.query.aggregateIds){this.aggregateAdapter.getFeatureObjectIds(r).forEach(e=>t.add(e))}const i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),i=this.featureAdapter.getObjectId;e.items=e.items.filter(e=>t.has(i(e)))}_executeTimeQuery(e){if(0===e.items.length)return;const t=L(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=j(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter(e=>t.testFeature(e,this.featureAdapter))}}async*_executeGeometryQueryForSnapping(e){const{query:t}=e,{spatialRel:i}=t;if(!e?.items?.length||!t.geometry||!i)return;const r=await H(i,t.geometry,this.geometryType);yield;const s=this.featureAdapter,a=e=>r(s.getGeometry(e)),n=yield*this._runSpatialFilter(e.items,a);e.items=n}*_runSpatialFilter(e,t){if(!t)return e;if(null==this._frameTask)return e.filter(e=>t(e));let i=yield;const r=new Array;for(const s of e)t(s)&&r.push(s),i.madeProgress(),i.done&&(i=yield);return r}_filterLatest(e){const{trackIdField:t,startTimeField:i,endTimeField:r}=this.timeInfo,s=r||i,a=new Map,n=this.featureAdapter.getAttribute;for(const l of e.items){const e=n(l,t),i=n(l,s),r=a.get(e);(!r||i>n(r,s))&&a.set(e,l)}e.items=Array.from(a.values())}_getCacheKey(e){const{geometry:t,spatialRel:i,returnGeometry:r,returnCentroid:s,outSR:a,resultType:n,cacheHint:l}=e;if("tile"!==n&&!l)return null;const o=r||s;return R(a)&&!S(this.spatialReference,a)&&o?JSON.stringify([t,i,a]):JSON.stringify([t,i])}_canExecuteSinglePass(e,t){const{spatialRel:i}=t;return Z(e)&&("esriSpatialRelEnvelopeIntersects"===i||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===i||"esriSpatialRelContains"===i))}async _project(e,t){if(!t||S(this.spatialReference,t))return e;const r=this.featureAdapter,s=y()?await this._getFullExtent():void 0,a=await v(e.items.map(e=>E(this.geometryType,r.getGeometry(e))),this.spatialReference,t,{areaOfInterestExtent:s});return e.items=i(a.map((t,i)=>r.cloneWithGeometry(e.items[i],I(t,this.hasZ,this.hasM),this.geometryType))),e}async _searchFeatures(e){const t=new Set;await Promise.all(e.map(e=>this.featureStore.forEachInBounds(e,e=>t.add(e))));const i=Array.from(t.values());return t.clear(),i}async*_executeQueryForStatistics(e,t){e=s(e);try{e=await z(e,this.definitionExpression,this.spatialReference),yield,e=await M(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference}),yield;const i=yield*this._executeSceneFilterQuery(e);yield;const r=yield*this._executeGeometryQuery(e,i);return yield,this._executeAggregateIdsQuery(r),yield,this._executeObjectIdsQuery(r),yield,this._executeTimeQuery(r),yield,this._executeAttributesQuery(r),yield,r}catch(i){if(i!==O)throw i;return new C([],e,this)}}get test(){}}function X(e){if(Z(e)){if(_(e))return[p(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if(F(e))return e.rings.map(e=>p(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1])))}return[g(x(),e)]}function Y(e,t,i,r,s){const a={xmin:e[0],ymin:e[1],xmax:e[3],ymax:e[4],spatialReference:b(r)};s&&isFinite(e[2])&&isFinite(e[5])&&(a.zmin=e[2],a.zmax=e[5],a.hasZ=!0);const n=A(a,t,i);if(n.spatialReference=b(i),n.xmax-n.xmin===0){const e=u(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin===0){const e=u(n.spatialReference);n.ymin-=e,n.ymax+=e}if(s&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin===0){const e=u(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}export{K as Feature,W as QueryEngine,X as getQueryBoundingRects,Y as getQueryResultExtent};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import r from"../../../core/Collection.js";import i from"../../../core/Error.js";import has from"../../../core/has.js";import{LoadableMixin as o}from"../../../core/Loadable.js";import s from"../../../core/Logger.js";import{EsriPromiseMixin as n}from"../../../core/Promise.js";import{open as a}from"../../../core/workers.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{ensureType as p}from"../../../core/accessorSupport/ensureType.js";import d from"../../../geometry/Extent.js";import c from"../../../geometry/Polygon.js";import{typeKebabDictionary as y}from"../../../geometry/support/typeUtils.js";import{createFeatureIdFromLayer as h}from"../data/createFeatureId.js";import{unapplyEditsZUnitScaling as m}from"../../../rest/query/operations/editsZScale.js";import{applyFeatureSetZUnitScaling as f}from"../../../rest/query/operations/queryZScale.js";import g from"../../../rest/support/FeatureSet.js";import{shared as _}from"../../../core/accessorSupport/decorators/shared.js";let F=0,T=class extends(o(n(r))){constructor(e){super(e),this._idToClientGeometry=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);f(e,this.layer.spatialReference,r);const i=g.fromJSON(r);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return i;const o=this.layer.objectIdField;for(const s of i.features){const e=s.attributes[o],t=this._idToClientGeometry.get(e);void 0!==t&&(s.geometry=t)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new i("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return f(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:d.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}async _applyEdits(e){if(!this._connection)throw new i("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=this.layer.uniqueIdFields;let o=null;const s=[],n=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const a=e=>r?.length&&"attributes"in e?h(e,this.layer):"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(o=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const i of e.deleteFeatures){const e=a(i);null!=e&&s.push(e)}const l=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures)for(const i of e.updateFeatures)if(n.push(this._serializeFeature(i)),l&&null!=i.geometry){const e=a(i);null!=e&&l.set(e,i)}m(o?o.features:null,n,this.layer.spatialReference);const{fullExtent:u,featureEditResults:p}=await this._connection.invoke("applyEdits",{adds:o?o.features:[],updates:n,deletes:s});return this.fullExtent=u,o&&o.finish(p.uidToObjectId),this._updateIdToClientGeometries(l,p),this._createEditsResult(p)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const r=[];for(const{geometry:i}of e)null==i||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGeometry(t)}for(const e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new i("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);i||null==o.geometry||(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const o=this;return{features:r,inferredGeometryType:i,finish(e){const r=o.sourceJSON.objectIdField;for(const i in e){const s=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===s?delete n.attributes[r]:n.attributes[r]=s,o._addIdToClientGeometry(n))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;const t=this.sourceJSON.objectIdField,r=e.attributes?.[t];null!=r&&this._idToClientGeometry.set(r,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(F++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;if(null==t)return null;if(this._geometryRequiresClientGraphicMapping(t)){return t.extent?c.fromExtent(t.extent):null}return t}async _startWorker(e){this._connection=await a("MemorySourceWorker",{strategy:has("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,objectIdField:i,hasM:o,hasZ:n,timeInfo:l,dateFieldsTimeZone:u}=this.layer,p="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const d=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",e=>{s.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()}));const{uniqueIdFields:c}=this.layer,h=c?.length?{type:c.length>1?"composite":"simple",fields:c.slice(),OIDFieldContainsHashValue:!(1===c?.length&&c.at(0)===this.layer.objectIdField)}:void 0,m={features:d.features,fields:t?.map(e=>e.toJSON()),geometryType:y.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&o,hasZ:"mesh"===this._layerOrSourceGeometryType||n,objectIdField:i,spatialReference:p?null:r&&r.toJSON(),timeInfo:l?.toJSON()??null,dateFieldsTimeZone:u,uniqueIdInfo:h},f=await this._connection.invoke("load",m,{signal:e});for(const a of f.warnings)s.getLogger(this.layer).warn("#load()",`${a.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:a});f.featureErrors.length&&s.getLogger(this.layer).error("#load()",`Failed to load ${f.featureErrors.length} features due to errors. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}').`,f.featureErrors.map(e=>"\n\n- "+e.error.description).join(""));const g=f.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(d.inferredGeometryType)&&(g.geometryType=y.toJSON(d.inferredGeometryType)),this.sourceJSON=g,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),d.finish(f.assignedObjectIds)}};e([_({Type:t,ensureType:p(t)})],T.prototype,"itemType",void 0),e([l()],T.prototype,"type",void 0),e([l({constructOnly:!0})],T.prototype,"layer",void 0),e([l({readOnly:!0})],T.prototype,"_workerGeometryType",null),e([l()],T.prototype,"sourceJSON",void 0),T=e([u("esri.layers.graphics.sources.MemorySource")],T);export{T as MemorySource};
2
+ import{__decorate as e}from"tslib";import t from"../../../Graphic.js";import r from"../../../core/Collection.js";import i from"../../../core/Error.js";import has from"../../../core/has.js";import{LoadableMixin as o}from"../../../core/Loadable.js";import s from"../../../core/Logger.js";import{EsriPromiseMixin as n}from"../../../core/Promise.js";import{open as a}from"../../../core/workers.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{ensureType as p}from"../../../core/accessorSupport/ensureType.js";import d from"../../../geometry/Extent.js";import c from"../../../geometry/Polygon.js";import{typeKebabDictionary as y}from"../../../geometry/support/typeUtils.js";import{createFeatureIdFromLayer as h}from"../data/createFeatureId.js";import{unapplyEditsZUnitScaling as m}from"../../../rest/query/operations/editsZScale.js";import{applyFeatureSetZUnitScaling as f}from"../../../rest/query/operations/queryZScale.js";import g from"../../../rest/support/FeatureSet.js";import{shared as _}from"../../../core/accessorSupport/decorators/shared.js";let F=0,T=class extends(o(n(r))){constructor(e){super(e),this._idToClientGeometry=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);f(e,this.layer.spatialReference,r);const i=g.fromJSON(r);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return i;const o=this.layer.objectIdField;for(const s of i.features){const e=s.attributes[o],t=this._idToClientGeometry.get(e);void 0!==t&&(s.geometry=t)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new i("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return f(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:d.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){await this.load();const r=await this._connection.invoke("queryAttributeBins",e?.toJSON(),t);return(await import("../../../rest/support/AttributeBinsFeatureSet.js")).default.fromJSON(r)}async _applyEdits(e){if(!this._connection)throw new i("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=this.layer.uniqueIdFields;let o=null;const s=[],n=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const a=e=>r?.length&&"attributes"in e?h(e,this.layer):"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(o=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const i of e.deleteFeatures){const e=a(i);null!=e&&s.push(e)}const l=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures)for(const i of e.updateFeatures)if(n.push(this._serializeFeature(i)),l&&null!=i.geometry){const e=a(i);null!=e&&l.set(e,i)}m(o?o.features:null,n,this.layer.spatialReference);const{fullExtent:u,featureEditResults:p}=await this._connection.invoke("applyEdits",{adds:o?o.features:[],updates:n,deletes:s});return this.fullExtent=u,o&&o.finish(p.uidToObjectId),this._updateIdToClientGeometries(l,p),this._createEditsResult(p)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const r=[];for(const{geometry:i}of e)null==i||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGeometry(t)}for(const e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new i("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);i||null==o.geometry||(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const o=this;return{features:r,inferredGeometryType:i,finish(e){const r=o.sourceJSON.objectIdField;for(const i in e){const s=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===s?delete n.attributes[r]:n.attributes[r]=s,o._addIdToClientGeometry(n))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;const t=this.sourceJSON.objectIdField,r=e.attributes?.[t];null!=r&&this._idToClientGeometry.set(r,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(F++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;if(null==t)return null;if(this._geometryRequiresClientGraphicMapping(t)){return t.extent?c.fromExtent(t.extent):null}return t}async _startWorker(e){this._connection=await a("MemorySourceWorker",{strategy:has("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,objectIdField:i,hasM:o,hasZ:n,timeInfo:l,dateFieldsTimeZone:u}=this.layer,p="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const d=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",e=>{s.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()}));const{uniqueIdFields:c}=this.layer,h=c?.length?{type:c.length>1?"composite":"simple",fields:c.slice(),OIDFieldContainsHashValue:!(1===c?.length&&c.at(0)===this.layer.objectIdField)}:void 0,m={features:d.features,fields:t?.map(e=>e.toJSON()),geometryType:y.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&o,hasZ:"mesh"===this._layerOrSourceGeometryType||n,objectIdField:i,spatialReference:p?null:r&&r.toJSON(),timeInfo:l?.toJSON()??null,dateFieldsTimeZone:u,uniqueIdInfo:h},f=await this._connection.invoke("load",m,{signal:e});for(const a of f.warnings)s.getLogger(this.layer).warn("#load()",`${a.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:a});f.featureErrors.length&&s.getLogger(this.layer).error("#load()",`Failed to load ${f.featureErrors.length} features due to errors. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}').`,f.featureErrors.map(e=>"\n\n- "+e.error.description).join(""));const g=f.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(d.inferredGeometryType)&&(g.geometryType=y.toJSON(d.inferredGeometryType)),this.sourceJSON=g,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),d.finish(f.assignedObjectIds)}};e([_({Type:t,ensureType:p(t)})],T.prototype,"itemType",void 0),e([l()],T.prototype,"type",void 0),e([l({constructOnly:!0})],T.prototype,"layer",void 0),e([l({readOnly:!0})],T.prototype,"_workerGeometryType",null),e([l()],T.prototype,"sourceJSON",void 0),T=e([u("esri.layers.graphics.sources.MemorySource")],T);export{T as MemorySource};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{Loadable as r}from"../../../core/Loadable.js";import s from"../../../core/Logger.js";import{throwIfAborted as o}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{open as a}from"../../../core/workers.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import{subclass as c}from"../../../core/accessorSupport/decorators/subclass.js";import l from"../../../geometry/Extent.js";import{createFileProviderSchema as u,toParquetJSONGeometryType as y}from"../../support/parquetUtils.js";import p from"../../../rest/support/FeatureSet.js";let m=class extends r{constructor(t){super(t),this.type="parquet"}load(t){const e=null!=t?t.signal:null;return this.addResolvingPromise(this._initialize(e)),this.addHandles([i(()=>this.layer.data,async t=>{t&&await this._proxy.updateFileProvider(await u(t))}),i(()=>this.layer.customParameters,t=>this._setCustomParameters(t))]),Promise.resolve(this)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeaturesJSON(t,e={}){return await this.load(e),this._proxy.queryFeatures(t.toJSON(),{signal:e?.signal})}async queryFeatures(t,e={}){const r=await this.queryFeaturesJSON(t,{signal:e?.signal});return p.fromJSON(r)}async queryObjectIds(t,e){return await this._proxy.queryObjectIds(t.toJSON(),{signal:e?.signal})}async queryFeatureCount(t,e){return this._proxy.queryFeatureCount(t.toJSON(),{signal:e?.signal})}async queryExtent(t,e){if(null==this.layer.geometryEncoding)return s.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const r=await this._proxy.queryExtent(t.toJSON(),{signal:e?.signal});return{count:r.count,extent:l.fromJSON(r.extent)}}async _initialize(t){if(!this.layer.data)throw new e("parquet:missing-data","A data source must be specified",this.layer);const r=await u(this.layer.data,{signal:t});o(t),this._connection=await a("ParquetSourceWorker",{strategy:"dedicated",signal:t,registryTarget:this}),o(t),this._proxy=this._connection.createInvokeProxy();const{layerDefinition:s,capabilities:i}=await this._proxy.load({provider:r,fields:this.layer.fields?.map(t=>t.toJSON()),geometryType:this.layer.geometryType?y(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters});o(t),this.sourceJSON=s,this.capabilities=i}_setCustomParameters(t){this._proxy.setCustomParameters(t).catch(()=>{s.getLogger(this).warn("Failed to update customParameters")})}};t([n()],m.prototype,"type",void 0),t([n({constructOnly:!0})],m.prototype,"layer",void 0),t([n()],m.prototype,"sourceJSON",void 0),t([n()],m.prototype,"capabilities",void 0),m=t([c("esri.layers.graphics.sources.ParquetSource")],m);export{m as ParquetSource};
2
+ import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{Loadable as r}from"../../../core/Loadable.js";import s from"../../../core/Logger.js";import{throwIfAborted as o}from"../../../core/promiseUtils.js";import{watch as a}from"../../../core/reactiveUtils.js";import{open as i}from"../../../core/workers.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import{subclass as u}from"../../../core/accessorSupport/decorators/subclass.js";import y from"../../../geometry/Extent.js";import{createFileProviderSchema as c,toParquetJSONGeometryType as l}from"../../support/parquetUtils.js";import p from"../../../rest/support/FeatureSet.js";let m=class extends r{constructor(t){super(t),this.type="parquet"}load(t){const e=null!=t?t.signal:null;return this.addResolvingPromise(this._initialize(e)),this.addHandles([a(()=>this.layer.data,async t=>{t&&await this._proxy.updateFileProvider(await c(t))}),a(()=>this.layer.customParameters,t=>this._setCustomParameters(t))]),Promise.resolve(this)}destroy(){this._connection?.destroy()}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeaturesJSON(t,e={}){return await this.load(e),this._proxy.queryFeatures(t.toJSON(),{signal:e?.signal})}async queryFeatures(t,e={}){const r=await this.queryFeaturesJSON(t,{signal:e?.signal});return p.fromJSON(r)}async queryObjectIds(t,e){return await this._proxy.queryObjectIds(t.toJSON(),{signal:e?.signal})}async queryFeatureCount(t,e){return this._proxy.queryFeatureCount(t.toJSON(),{signal:e?.signal})}async queryExtent(t,e){if(null==this.layer.geometryEncoding)return s.getLogger(this).warn("Tried to queryExtent, but source does not have a geometry. Returning null extent."),{count:0,extent:null};const r=await this._proxy.queryExtent(t.toJSON(),{signal:e?.signal});return{count:r.count,extent:y.fromJSON(r.extent)}}async _initialize(t){if(!this.layer.data)throw new e("parquet:missing-data","A data source must be specified",this.layer);const r=await c(this.layer.data,{signal:t});o(t),this._connection=await i("ParquetSourceWorker",{strategy:"dedicated",signal:t,registryTarget:this}),o(t),this._proxy=this._connection.createInvokeProxy();const{layerDefinition:s,capabilities:a}=await this._proxy.load({provider:r,fields:this.layer.fields?.map(t=>t.toJSON()),geometryType:this.layer.geometryType?l(this.layer.geometryType):null,spatialReference:this.layer.spatialReference?.toJSON(),geometryEncoding:this.layer.geometryEncoding?.toJSON(),displayOptimization:this.layer.displayOptimization,customParameters:this.layer.customParameters});o(t),this.sourceJSON=s,this.capabilities=a}_setCustomParameters(t){this._proxy.setCustomParameters(t).catch(()=>{s.getLogger(this).warn("Failed to update customParameters")})}_queryStream(t,e){return this._proxy.queryStream(t,e)}_getStreamNextFeatures(t,e){return this._proxy.getStreamNextFeatures(t,e)}};t([n()],m.prototype,"type",void 0),t([n({constructOnly:!0})],m.prototype,"layer",void 0),t([n()],m.prototype,"sourceJSON",void 0),t([n()],m.prototype,"capabilities",void 0),m=t([u("esri.layers.graphics.sources.ParquetSource")],m);export{m as ParquetSource};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- function n(n){const u=new Map;for(const o of n.files){const n=t(o);u.set(o.name,n)}return u}function t(n){const t=new Map;for(const u of n.statistics??[]){const n=u.column.at(-1);null!=n&&t.set(n,{minValue:u.minValue,maxValue:u.maxValue,nullCount:u.nullCount??0,distinctCount:u.distinctCount??null})}return new u(0,0,t)}class u{static fromFile(n){const t=n.numRows(),o=n.byteLength(),l=new Map;for(const u of n.getColumnDescriptors()){const n=u.minValue(),t=u.maxValue(),o=u.distinctCount(),s=u.nullCount();null!=n&&null!=t&&null!=o&&null!=s&&l.set(u.name(),{minValue:n,maxValue:t,distinctCount:o,nullCount:s}),u.free()}return new u(t,o,l)}constructor(n,t,u){this.rowCount=n,this.byteSize=t,this.statistics=u}}export{u as FileStatistics,t as parseFileStatistics,n as parseFileStatisticsMap};
2
+ function n(n){const u=new Map;for(const o of n.files){const n=t(o);u.set(o.name,n)}return u}function t(n){const t=new Map;for(const u of n.statistics??[]){const n=u.column.at(-1);null!=n&&t.set(n,{minValue:u.minValue,maxValue:u.maxValue,nullCount:u.nullCount??0,distinctCount:u.distinctCount??null})}return new u(0,0,t)}class u{static fromFile(n){const t=n.numRows(),o=n.byteLength(),l=new Map;for(const u of n.getColumnDescriptors()){const n=u.minValue(),t=u.maxValue(),o=u.distinctCount()??null,s=u.nullCount()??null;null!=n&&null!=t&&l.set(u.name(),{minValue:n,maxValue:t,distinctCount:o,nullCount:s}),u.free()}return new u(t,o,l)}constructor(n,t,u){this.rowCount=n,this.byteSize=t,this.statistics=u}}export{u as FileStatistics,t as parseFileStatistics,n as parseFileStatisticsMap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__addDisposableResource as e,__disposeResources as t}from"tslib";import{toConst as r}from"../../../../core/compilerUtils.js";import s from"../../../../core/Error.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{onAbortOrThrow as a,throwIfAborted as n}from"../../../../core/promiseUtils.js";import{QueueProcessor as o}from"../../../../core/QueueProcessor.js";import{parseWhereClause as u}from"../../../../core/sql.js";import l from"../../../../geometry/SpatialReference.js";import{set as p,create as c,expandWithAABB as d,expandWithRect as f,negativeInfinity as m}from"../../../../geometry/support/aaBoundingBox.js";import{getQueryResultExtent as h,QueryEngine as y}from"../../data/QueryEngine.js";import{queryBinsCapabilities as g,queryCapabilities as _}from"../../data/QueryEngineCapabilities.js";import{QueryEngineResult as w}from"../../data/QueryEngineResult.js";import{normalizeQueryLike as x}from"../../data/queryUtils.js";import{createFileProvider as I}from"../parquet/createFileProvider.js";import{createDrawingInfo as F}from"./clientSideDefaults.js";import{getParquetFileId as S,getParquetRowId as R}from"./parquetIdUtils.js";import q from"../../../support/Field.js";import v from"../../../support/FieldsIndex.js";import{fromParquetGeometryEncodingJSON as C}from"../../../support/parquetEncodingUtils.js";import{completeParquetLayerInfo as E,fromParquetJSONGeometryType as O,toParquetJSONGeometryType as b}from"../../../support/parquetUtils.js";import{loadParquetModule as P}from"../../../../libs/parquet/loadParquetModule.js";import{FeatureStoreQueryAdapter as Q}from"../../../../views/2d/layers/features/FeatureStoreQueryAdapter.js";import{FeatureSnapshotSourceChunk as T}from"../../../../views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js";import{FeatureSourceChunkStore as j}from"../../../../views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as N}from"../../../../views/2d/layers/features/support/FeatureMetadata.js";import{FeatureSetReaderParquet as A}from"../../../../views/2d/layers/features/support/FeatureSetReaderParquet.js";const M=new Q,B=4,G="__OBJECTID",D=new TextDecoder,z=8e3,k=8,V=2,W=20;class U{constructor(e,t){this._files=e,this._createFileStream=t,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(e){for(await this._fill(e);this._pending.size>0;){n(e),await this._fill(e);const t=await J(this._pending);if(this._pending.delete(t.read),this._resolvedCount++,null!=t.chunk)return t.chunk}return null}async _fill(e){for(this._removeDone();this._pending.size<k;){const t=this._getOrCreateNextStream(e);if(null==t)return;this._pending.add(t.read(e))}}_getOrCreateNextStream(e){const t=this._resolvedCount>=k?k:V;if(this._fileIndex<this._files.length&&this._streams.length<t){const t=this._files[this._fileIndex++],r=new Z(t.id,this._createFileStream(t,e));return this._streams.push(r),r}return this._getNextStream()}_getNextStream(){const e=this._streams.length;for(let t=0;t<e;t++){const r=(this._streamIndex+t)%e,s=this._streams[r];if(s.canRead)return this._streamIndex=(r+1)%e,s}return null}_removeDone(){let e=this._streamIndex;for(let t=this._streams.length-1;t>=0;t--)this._streams[t].done&&(this._streams.splice(t,1),t<e&&e--);this._streamIndex=this._streams.length>0?e%this._streams.length:0}}function J(e){return Promise.race(Array.from(e,async e=>({read:e,chunk:await e})))}class Z{constructor(e,t){this._fileId=e,this._stream=t,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&0===this._readCount}async read(e){this._readCount++;try{const t=await this._stream,r=await t.next(e);return null==r?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:r}}finally{this._readCount--}}}class L{constructor(){this._queue=new o({concurrency:B,process:(e,t)=>this._executeQuery(e,t)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={}}async load(e){const t=e.spatialReference?l.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new s("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");this._customParameters=e.customParameters,this._provider=I(e.provider,null,()=>this._customParameters);const r=await this._provider.getMetadata(),a=await E(r,{fields:e.fields?.map(e=>q.fromJSON(e)),geometryEncoding:e.geometryEncoding?C(e.geometryEncoding):null,geometryType:e.geometryType?O(e.geometryType):null,displayOptimization:e.displayOptimization,spatialReference:t});if(!a.fields)throw new s("parquet:unsupported","Fields must be defined");let n;if(a.spatialReference&&a.geometryType){if(!a.spatialReference)throw new s("parquet:unsupported","SpatialReference must be defined");if(!a.spatialReference.isGeographic&&!a.spatialReference.isWebMercator)throw new s("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");a.spatialReference.isGeographic&&!a.spatialReference.isWGS84&&(i.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:a.spatialReference}),a.spatialReference=l.WGS84),n={geometry:a.geometryEncoding?{geometryType:b(a.geometryType),spatialReference:a.spatialReference.toJSON(),encoding:a.geometryEncoding.toJSON()}:null,displayOptimization:a.displayOptimization}}this.setCustomParameters(e.customParameters),this._displayOptimization=a.displayOptimization,await this._provider.updateGeometryInfo(n),this._capabilities=ie(await this._getFileStatistics());const o=await this._provider.getFiles();if(!o.length)return{layerDefinition:{},capabilities:ie(null)};const u=await o[0].file;a.file=u;const{fields:p}=a;if(null==p)throw new s("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",p);p.push(new q({name:G,type:"oid",alias:G}));for(const s of p){const e=u.getColumnId(s.name);null!=e&&(this._indexMap[s.name]=e)}const c=new v(p.map(e=>e.toJSON()));this._fieldsIndex=c;const d=b(a.geometryType??"point");return this._metadata=N.createFeature({fieldsIndex:c.toJSON(),geometryType:d,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"rowId"},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:a.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:d,featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:a.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=r?.extent?r.extent:await this._tryDeriveParquetFullExtent(a),{capabilities:this._capabilities,layerDefinition:{fields:a.fields?.map(e=>e.toJSON()),drawingInfo:F(d),extent:this._fullExtent??void 0,geometryType:d,geometryEncoding:a.geometryEncoding?.toJSON(),displayOptimization:a.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(const{handle:e}of this._streams.values())e.remove();this._streams.clear()}setCustomParameters(e){this._customParameters=e}getIndexMap(){return this._indexMap}async updateFileProvider(e){this._provider=I(e,this._provider.getGeometryInfo(),()=>this._customParameters)}async queryFeatures(e,t){this._validateQuery(e),ae(e)||(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,z):z,e.resultOffset=e.resultOffset??0),(e.outStatistics||e.returnDistinctValues)&&(e.returnGeometry=void 0);return(await this._enqueueQuery(e,t)).createQueryResponse()}async queryFeatureCount(e,t){const r=await x(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),!H(r))return this._getFeatureCount();r.outFields=void 0,r.returnGeometry=void 0;return(await this._enqueueQuery(r,t)).createQueryResponseForCount()}async queryObjectIds(e,t){const r=await x(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),!H(r))return Array.from({length:await this._getFeatureCount()},(e,t)=>t);r.resultRecordCount=r.resultRecordCount?Math.min(r.resultRecordCount,8e3):8e3,r.resultOffset=r.resultOffset??0,r.returnGeometry=void 0,r.outFields=void 0;return(await this._enqueueQuery(r,t)).items.map(e=>e.getObjectId())}async queryExtent(e,t){const s=await x(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),this._fullExtent&&!H(s))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=r(this._metadata.spatialReference);s.returnGeometry=!0,s.outFields=void 0;const a=p(c(),m),n=c(),o=await this._enqueueQuery(s,t);let u=0;for(const r of o.items)r.getBounds(n)&&(d(a,n),u+=1);return{count:u,extent:h(a,i,s.outSR?r(s.outSR):i.toJSON(),i,!1)}}async queryStream(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const r=await this._getCandidateFiles(e),s=new U(r,async(t,r)=>{const s=await t.file,i=await this._createParquetQuery(s,e);return s.executeQuery(i,r)}),i=this._streamIdCounter++,n=a(t.signal,e=>{const t=this._streams.get(i);null!=t&&(t.handle.remove(),this._streams.delete(i))});return this._streams.set(i,{stream:s,handle:n}),i}async getStreamNext(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const r=this._streams.get(e);if(!r)return{result:null};const s=await r.stream.next(t.signal);if(null==s)return r.handle.remove(),this._streams.delete(e),{result:null};const i=s.chunk.serialize().buffer,a={fileId:s.fileId,buffer:i};return i instanceof ArrayBuffer?{result:a,transferList:[i]}:{result:a}}async createPatch(e,t,r,s,i){if(!i.signal)throw new Error("InternalError: AbortSignal must be passed");const a=await this._getFileInfoById(e),n=await a.file;return(await n.createChunkPatch(t,r,s,i.signal)).serialize().buffer}async _getCandidateFiles(e){const t=await this._provider.getFiles(),r=await this._getSpatialFilePruning(e);if(null==r)return t;const s=t.filter(e=>this._mayIncludeFileForSpatialPruning(e,r));return"xz"===r.type?$(s,r):s}async _getSpatialFilePruning(e){if("tile"!==e.type)return null;const t=this._displayOptimization,r=t?.index;if(null==r)return null;const s=e.outSpatialReference.wkid;if(null==r.wkid||null==s)return null;const i=r.wkid,a=await P();switch(r.type){case"xz":return{type:"xz",fieldName:r.code,intersects:(t,n)=>a.queryIntersectsXZStatistics(r.fullExtent,e.extent,s,i,W,t,n)};case"z":return{type:"xy",xFieldName:r.xColumn,yFieldName:r.yColumn,intersects:(t,r,n,o)=>a.queryIntersectsXYStatistics(e.extent,s,i,t,r,n,o)}}}_mayIncludeFileForSpatialPruning(e,t){switch(t.type){case"xz":{const r=X(e,t);return null==r||te(r,t)}case"xy":{const{xStatistics:r,yStatistics:s}=ee(e,t);return null==r||null==s||re(r,s,t)}}}async _tryDeriveParquetFullExtent(r){if(!r.spatialReference)return null;if(null==this._fullExtent&&"location"===r.geometryEncoding?.type){const i=await this._provider.getFiles(),{xField:a,yField:n}=r.geometryEncoding,o=p(c(),m);for(const r of i){const i=await r.file;for(const r of i.rowGroups()){const i={stack:[],error:void 0,hasError:!1};try{const t=e(i,r.columnDescriptorForAttribute(a),!1),s=e(i,r.columnDescriptorForAttribute(n),!1),u=[t.minValue(),s.minValue(),t.maxValue(),s.maxValue()];f(o,u),r.free()}catch(s){i.error=s,i.hasError=!0}finally{t(i)}}}return{xmin:o[0],ymin:o[1],xmax:o[3],ymax:o[4],spatialReference:r.spatialReference?.toJSON()}}return null}async _getFileInfoById(e){const t=await this._provider.getFiles();for(const r of t)if(r.id===e)return r;throw new Error(`InternalError: File ${e} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(e){return(await this._getFileInfoById(e)).file}async _createParquetQuery(e,t){const r=(await P()).Query.new();return"tile"===t.type&&(r.setExtent(t.extent),r.setQuantizationTransform(t.transform),r.setScale(t.scale)),r.setOutFields(t.outFields.filter(e=>null!=this._indexMap[e])),r.setOutSpatialReference(t.outSpatialReference.wkid),r.setReturnGeometry(t.returnGeometry),t.where&&await this._setWhereClause(r,e,t.where),r}async _getFeatureCount(){return(await this._provider.getFiles()).map(e=>e.statistics.rowCount).reduce((e,t)=>e+t,0)}async _getByteLength(){return(await this._provider.getFiles()).map(e=>e.statistics.byteSize).reduce((e,t)=>e+t,0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new s("parquet:unsupported","Statistics queries are not supported",{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new s("parquet:unsupported","Queries using orderBy are not supported",{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new s("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:e})}async _setWhereClause(e,t,r){const i=this._indexMap,a=this._fieldsIndex,n={getAttribute(e,r){const s=t.readAttribute(e.rowGroup,e.row,i[r]);if(null==s)return null;const n=a.get(r);return"esriFieldTypeString"===n.type||"esriFieldTypeDateOnly"===n.type||"esriFieldTypeTimeOnly"===n.type||"esriFieldTypeTimestampOffset"===n.type?D.decode(s):s}},o=await u(r,this._fieldsIndex);if(!o.isStandardized)throw new s("sql-parse-error","expression is not standardized");const l=(e,t)=>o.testFeatureCompiled({rowGroup:e,row:t},n,null);e.setWhere(r),e.setWhereEvaluator(l),e.setWhereFields(o.fieldNames)}async*_fetchChunks(e,t){const r=await P(),s=await this._provider.getFiles();for(const i of s){const s=await i.file,a=r.Query.new();a.setOutFields(e.fields),a.setReturnGeometry(e.returnGeometry),e.where&&await this._setWhereClause(a,s,e.where);const o=await s.executeQuery(a),u=[],l=o.next(t);for(let e=0;e<B;e++)u.push(o.next(t));let p=await l;for(;null!=p;){n(t);const e=new A(this._metadata,this._indexMap,p,i.id),r=Y([new T(e,null,0,!1)],this._queryEngineParams),s=u.shift();u.push(o.next(t)),yield r,p=await s}}}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){const r=await this._getReadParams(e);if(e.where=void 0,e.objectIds?.length){const r=new Map;for(const t of e.objectIds){const e=S(t),s=R(t);let i=r.get(e);i||(i=[],r.set(e,i)),i.push(s)}const s=[];for(const[i,a]of r.entries()){const r=await this._executeFileIdQuery(e,i,a,t);for(const e of r)s.push(e)}return new w(s,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:M,featureIdInfo:this._queryEngineParams.featureIdInfo})}let s=e.resultRecordCount??await this._getFeatureCount(),i=e.resultOffset??0;e.resultRecordCount=void 0,e.resultOffset=void 0;const a=[];for await(const n of this._fetchChunks(r,t)){const r=await n.executeQueryForOpaqueFeatures(e,t);if(r.length>i){const t=r.slice(i,Math.min(i+s,r.length));for(const e of t)a.push(e);if(i=0,s-=t.length,0===s)return new w(a,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:M,featureIdInfo:this._queryEngineParams.featureIdInfo})}else i-=r.length}return new w(a,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:M,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(e,t,r,s){const i=await this._getReadParams(e),a=(await P()).Query.new();a.setOutFields(i.fields),a.setReturnGeometry(i.returnGeometry),a.setIds(new Uint32Array(r));const n=await this._getFile(t),o=await n.executeQuery(a,s);let u=await o.next(s),l=0;const p=[];for(;null!=u;){const e=new A(this._metadata,this._indexMap,u,t),r=new T(e,null,l++,!1);p.push(r),u=await o.next(s)}return Y(p,this._queryEngineParams).executeQueryForOpaqueFeatures(e,s)}async _getReadParams(e){const t=new Set;if(e.outStatistics)for(const r of e.outStatistics)null!=r.onStatisticField&&t.add(r.onStatisticField);if(e.outFields)for(const r of e.outFields)t.add(r);return{fields:(t.has("*")?this._fieldsIndex.fields.map(e=>e.name):Array.from(t)).filter(e=>null!=this._indexMap[e]),returnGeometry:!!e.returnGeometry||!!e.geometry,where:e.where}}}function H(e){for(const t in e){const r=t;switch(r){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"objectIds":case"historicMoment":case"where":return null!=e[r]}}return!1}function Y(e,t){const r=new j;for(const s of e)r.insert(s);return new y({...t,featureStore:r})}function X(e,t){return e.statistics.statistics.get(t.fieldName)??null}function $(e,t){return e.slice().sort((e,r)=>{const s=K(e,t),i=K(r,t);return s===i?0:s<i?-1:1})}function K(e,t){const r=X(e,t);if(null==r)return Number.POSITIVE_INFINITY;const s=se(r.minValue),i=se(r.maxValue);return null==s||null==i||i<s?Number.POSITIVE_INFINITY:i-s}function ee(e,t){return{xStatistics:e.statistics.statistics.get(t.xFieldName)??null,yStatistics:e.statistics.statistics.get(t.yFieldName)??null}}function te(e,t){const r=se(e.minValue),s=se(e.maxValue);return null==r||null==s||t.intersects(r,s)}function re(e,t,r){const s=se(e.minValue),i=se(e.maxValue),a=se(t.minValue),n=se(t.maxValue);return null==s||null==i||null==a||null==n||r.intersects(s,i,a,n)}function se(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function ie(e){const t=e?.featureCount;let r=!1;return null!=t&&t<has("parquetlayer-full-query-feature-count")&&(r=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{..._,maxRecordCount:z,supportsDistinct:r,supportsOrderBy:r,supportsStatistics:r,supportsSpatialAggregationStatistics:r,supportedSpatialAggregationStatistics:{envelope:r,centroid:r,convexHull:r}},queryAttributeBins:r?g:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}function ae(e){return!!(e.objectIds?.length||e.outStatistics||e.orderByFields?.length||e.returnDistinctValues)}export{L as default};
2
+ import{__addDisposableResource as e,__disposeResources as t}from"tslib";import{toConst as r}from"../../../../core/compilerUtils.js";import s from"../../../../core/Error.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{onAbortOrThrow as a,throwIfAborted as n}from"../../../../core/promiseUtils.js";import{QueueProcessor as o}from"../../../../core/QueueProcessor.js";import{parseWhereClause as u}from"../../../../core/sql.js";import l from"../../../../geometry/SpatialReference.js";import{set as c,create as p,expandWithAABB as d,expandWithRect as f,negativeInfinity as m}from"../../../../geometry/support/aaBoundingBox.js";import{copy as y,negativeInfinity as h,create as g,expandWithRect as _}from"../../../../geometry/support/aaBoundingRect.js";import{isWebMercator as w,isWGS84 as x}from"../../../../geometry/support/spatialReferenceUtils.js";import{convertToGeometry as F}from"../../featureConversionUtils.js";import{getQueryResultExtent as S,getQueryBoundingRects as I,QueryEngine as v}from"../../data/QueryEngine.js";import{queryCapabilities as q}from"../../data/QueryEngineCapabilities.js";import{QueryEngineResult as R}from"../../data/QueryEngineResult.js";import{normalizeQueryLike as C}from"../../data/queryUtils.js";import{createFileProvider as b}from"../parquet/createFileProvider.js";import{createDrawingInfo as E}from"./clientSideDefaults.js";import{getParquetFileId as O,getParquetRowId as T,getParquetObjectId as P}from"./parquetIdUtils.js";import j from"../../../support/Field.js";import Q from"../../../support/FieldsIndex.js";import{isNumericField as N}from"../../../support/fieldUtils.js";import{fromParquetGeometryEncodingJSON as A}from"../../../support/parquetEncodingUtils.js";import{completeParquetLayerInfo as B,fromParquetJSONGeometryType as M,toParquetJSONGeometryType as D}from"../../../support/parquetUtils.js";import{loadParquetModule as G}from"../../../../libs/parquet/loadParquetModule.js";import{FeatureStoreQueryAdapter as z}from"../../../../views/2d/layers/features/FeatureStoreQueryAdapter.js";import{FeatureSnapshotSourceChunk as k}from"../../../../views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js";import{FeatureSourceChunkStore as V}from"../../../../views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js";import{FeatureMetadata as U}from"../../../../views/2d/layers/features/support/FeatureMetadata.js";import{FeatureSetReaderParquet as W}from"../../../../views/2d/layers/features/support/FeatureSetReaderParquet.js";const J=new z,Z=4,L="__OBJECTID",H=new TextDecoder,Y=8e3,X=2e7,$=8,K=2,ee=20;class te{constructor(e,t){this._files=e,this._createFileStream=t,this._fileIndex=0,this._streamIndex=0,this._streams=[],this._pending=new Set,this._resolvedCount=0}async next(e){for(await this._fill(e);this._pending.size>0;){n(e),await this._fill(e);const t=await re(this._pending);if(this._pending.delete(t.read),this._resolvedCount++,null!=t.chunk)return t.chunk}return null}async _fill(e){for(this._removeDone();this._pending.size<$;){const t=this._getOrCreateNextStream(e);if(null==t)return;this._pending.add(t.read(e))}}_getOrCreateNextStream(e){const t=this._resolvedCount>=$?$:K;if(this._fileIndex<this._files.length&&this._streams.length<t){const t=this._files[this._fileIndex++],r=new se(t.id,this._createFileStream(t,e));return this._streams.push(r),r}return this._getNextStream()}_getNextStream(){const e=this._streams.length;for(let t=0;t<e;t++){const r=(this._streamIndex+t)%e,s=this._streams[r];if(s.canRead)return this._streamIndex=(r+1)%e,s}return null}_removeDone(){let e=this._streamIndex;for(let t=this._streams.length-1;t>=0;t--)this._streams[t].done&&(this._streams.splice(t,1),t<e&&e--);this._streamIndex=this._streams.length>0?e%this._streams.length:0}}function re(e){return Promise.race(Array.from(e,async e=>({read:e,chunk:await e})))}class se{constructor(e,t){this._fileId=e,this._stream=t,this._readCount=0,this._reachedEnd=!1}get canRead(){return!this._reachedEnd}get done(){return this._reachedEnd&&0===this._readCount}async read(e){this._readCount++;try{const t=await this._stream,r=await t.next(e);return null==r?(this._reachedEnd=!0,null):{fileId:this._fileId,chunk:r}}finally{this._readCount--}}}class ie{constructor(){this._queue=new o({concurrency:Z,process:(e,t)=>this._executeQuery(e,t)}),this._streams=new Map,this._streamIdCounter=0,this._indexMap={}}async load(e){const t=e.spatialReference?l.fromJSON(e.spatialReference):void 0;if(t&&!t.isWGS84&&!t.isWebMercator)throw new s("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");this._customParameters=e.customParameters,this._provider=b(e.provider,null,()=>this._customParameters);const r=await this._provider.getMetadata(),a=await B(r,{fields:e.fields?.map(e=>j.fromJSON(e)),geometryEncoding:e.geometryEncoding?A(e.geometryEncoding):null,geometryType:e.geometryType?M(e.geometryType):null,displayOptimization:e.displayOptimization,spatialReference:t});if(!a.fields)throw new s("parquet:unsupported","Fields must be defined");let n;if(a.spatialReference&&a.geometryType){if(!a.spatialReference)throw new s("parquet:unsupported","SpatialReference must be defined");if(!a.spatialReference.isGeographic&&!a.spatialReference.isWebMercator)throw new s("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");a.spatialReference.isGeographic&&!a.spatialReference.isWGS84&&(i.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:a.spatialReference}),a.spatialReference=l.WGS84),n={geometry:a.geometryEncoding?{geometryType:D(a.geometryType),spatialReference:a.spatialReference.toJSON(),encoding:a.geometryEncoding.toJSON()}:null,displayOptimization:a.displayOptimization}}this.setCustomParameters(e.customParameters),this._displayOptimization=a.displayOptimization,await this._provider.updateGeometryInfo(n),this._capabilities=Fe(await this._getFileStatistics());const o=await this._provider.getFiles();if(!o.length)return{layerDefinition:{},capabilities:Fe(null)};const u=await o[0].file;a.file=u;const{fields:c}=a;if(null==c)throw new s("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",c);c.push(new j({name:L,type:"oid",alias:L}));for(const s of c){const e=u.getColumnId(s.name);null!=e&&(this._indexMap[s.name]=e)}const p=new Q(c.map(e=>e.toJSON()));this._fieldsIndex=p;const d=D(a.geometryType??"point");return this._metadata=U.createFeature({fieldsIndex:p.toJSON(),geometryType:d,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:L},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:a.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:d,featureIdInfo:{type:"object-id",fieldName:L},hasM:!1,hasZ:!1,spatialReference:a.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},this._fullExtent=r?.extent?r.extent:await this._tryDeriveParquetFullExtent(a),{capabilities:this._capabilities,layerDefinition:{fields:a.fields?.map(e=>e.toJSON()),drawingInfo:E(d),extent:this._fullExtent??void 0,geometryType:d,geometryEncoding:a.geometryEncoding?.toJSON(),displayOptimization:a.displayOptimization}}}destroy(){this._provider.destroy(),this._queue.destroy();for(const{handle:e}of this._streams.values())e.remove();this._streams.clear()}setCustomParameters(e){this._customParameters=e}getIndexMap(){return this._indexMap}async updateFileProvider(e){this._provider=b(e,this._provider.getGeometryInfo(),()=>this._customParameters)}async queryFeatures(e,t){if(this._validateQuery(e),Se(e)||(e.resultRecordCount=e.resultRecordCount?Math.min(e.resultRecordCount,Y):Y,e.resultOffset=e.resultOffset??0),e.outStatistics)return this._queryStatistics(e,t);e.returnDistinctValues&&(e.returnGeometry=void 0);return(await this._enqueueQuery(e,t)).createQueryResponse()}async queryFeatureCount(e,t){const r=await C(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),!ae(r))return this._getFeatureCount();r.outFields=void 0,r.returnGeometry=void 0;return(await this._enqueueQuery(r,t)).createQueryResponseForCount()}async queryObjectIds(e,t){const r=await C(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(r),!ae(r))return Array.from({length:await this._getFeatureCount()},(e,t)=>t);r.resultRecordCount=r.resultRecordCount?Math.min(r.resultRecordCount,8e3):8e3,r.resultOffset=r.resultOffset??0,r.returnGeometry=void 0,r.outFields=void 0;return(await this._enqueueQuery(r,t)).items.map(e=>e.getObjectId())}async queryAttributeBins(e,t={}){throw new s("parquet:unsupported","queryAttributeBins not supported.")}async queryExtent(e,t){const s=await C(e,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),this._fullExtent&&!ae(s))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=r(this._metadata.spatialReference);s.returnGeometry=!0,s.outFields=void 0;const a=c(p(),m),n=p(),o=await this._enqueueQuery(s,t);let u=0;for(const r of o.items)r.getBounds(n)&&(d(a,n),u+=1);return{count:u,extent:S(a,i,s.outSR?r(s.outSR):i.toJSON(),i,!1)}}async queryStream(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const r=await this._getCandidateFiles(e),s=new te(r,async(t,r)=>{const s=await t.file,i=await this._createParquetQuery(s,t.id,e);return s.executeQuery(i,r)}),i=this._streamIdCounter++,n=a(t.signal,e=>{const t=this._streams.get(i);null!=t&&(t.handle.remove(),this._streams.delete(i))});return this._streams.set(i,{stream:s,handle:n}),i}async getStreamNext(e,t){if(!t.signal)throw new Error("InternalError: AbortSignal must be passed");const r=this._streams.get(e);if(!r)return{result:null};const s=await r.stream.next(t.signal);if(null==s)return r.handle.remove(),this._streams.delete(e),{result:null};const i=s.chunk.serialize().buffer,a={fileId:s.fileId,buffer:i};return i instanceof ArrayBuffer?{result:a,transferList:[i]}:{result:a}}async getStreamNextFeatures(e,t){const{result:r}=await this.getStreamNext(e,t);if(null==r)return null;const s=(await G()).ParquetChunk.deserialize(new Uint8Array(r.buffer)),i=new W(this._metadata,this._indexMap,s,r.fileId),a=[];for(;i.next();){const e=F(i.readGeometryWorldSpace(),i.geometryType,i.hasZ,i.hasM),t=i.readAttributes();a.push({attributes:t,geometry:e})}return{features:a}}async createPatch(e,t,r,s,i){if(!i.signal)throw new Error("InternalError: AbortSignal must be passed");const a=await this._getFileInfoById(e),n=await a.file;return(await n.createChunkPatch(t,r,s,i.signal)).serialize().buffer}async _getCandidateFiles(e){const t=await this._provider.getFiles(),r=await this._getSpatialFilePruning(e);if(null==r)return t;const s=t.filter(e=>this._mayIncludeFileForSpatialPruning(e,r));return"xz"===r.type?ye(s,r):s}async _queryStatistics(e,t){const r=await C({...e},null,this._queryEngineParams.spatialReference);if(r.returnGeometry=void 0,ne(r,this._fieldsIndex)){const e=await this._getStatisticsFromFiles(r);if(e)return e}return(await this._enqueueQuery(r,t)).createQueryResponse()}async _getStatisticsFromFiles(e){const t=await this._provider.getFiles(),r={},s=[];for(const i of e.outStatistics??[]){const e=le(i,t);if(!e.available)return null;r[i.outStatisticFieldName]=e.value,s.push(ue(i,this._fieldsIndex))}return{fields:s,features:[{attributes:r}]}}async _getSpatialFilePruning(e){if("tile"!==e.type&&("arcade"!==e.type||null==e.extent))return null;const t=this._displayOptimization,r=t?.index;if(null==r)return null;const s=e.outSpatialReference.wkid;if(null==r.wkid||null==s)return null;const i=r.wkid,a=await G();switch(r.type){case"xz":return{type:"xz",fieldName:r.code,intersects:(t,n)=>a.queryIntersectsXZStatistics(r.fullExtent,e.extent,s,i,ee,t,n)};case"z":return{type:"xy",xFieldName:r.xColumn,yFieldName:r.yColumn,intersects:(t,r,n,o)=>a.queryIntersectsXYStatistics(e.extent,s,i,t,r,n,o)}}}_mayIncludeFileForSpatialPruning(e,t){switch(t.type){case"xz":{const r=me(e,t);return null==r||_e(r,t)}case"xy":{const{xStatistics:r,yStatistics:s}=ge(e,t);return null==r||null==s||we(r,s,t)}}}async _tryDeriveParquetFullExtent(r){if(!r.spatialReference)return null;if(null==this._fullExtent&&"location"===r.geometryEncoding?.type){const i=await this._provider.getFiles(),{xField:a,yField:n}=r.geometryEncoding,o=c(p(),m);for(const r of i){const i=await r.file;for(const r of i.rowGroups()){const i={stack:[],error:void 0,hasError:!1};try{const t=e(i,r.columnDescriptorForAttribute(a),!1),s=e(i,r.columnDescriptorForAttribute(n),!1),u=[t.minValue(),s.minValue(),t.maxValue(),s.maxValue()];f(o,u),r.free()}catch(s){i.error=s,i.hasError=!0}finally{t(i)}}}return{xmin:o[0],ymin:o[1],xmax:o[3],ymax:o[4],spatialReference:r.spatialReference?.toJSON()}}return null}async _getFileInfoById(e){const t=await this._provider.getFiles();for(const r of t)if(r.id===e)return r;throw new Error(`InternalError: File ${e} does not exist`)}async _getFileStatistics(){return{featureCount:await this._getFeatureCount(),byteLength:await this._getByteLength()}}async _getFile(e){return(await this._getFileInfoById(e)).file}async _createParquetQuery(e,t,r){const s=(await G()).Query.new();return"tile"===r.type?(s.setExtent(r.extent),s.setQuantizationTransform(r.transform),s.setScale(r.scale)):"arcade"===r.type&&null!=r.extent&&s.setExtent(r.extent),s.setOutFields(r.outFields.filter(e=>null!=this._indexMap[e])),s.setOutSpatialReference(r.outSpatialReference.wkid),s.setReturnGeometry(r.returnGeometry),r.where&&await this._setWhereClause(s,e,t,r.where),s}async _getFeatureCount(){return(await this._provider.getFiles()).map(e=>e.statistics.rowCount).reduce((e,t)=>e+t,0)}async _getByteLength(){return(await this._provider.getFiles()).map(e=>e.statistics.byteSize).reduce((e,t)=>e+t,0)}_validateQuery(e){if(!this._capabilities.query.supportsStatistics&&e.outStatistics)throw new s("parquet:unsupported","Statistics queries are not supported",{query:e});if(!this._capabilities.query.supportsOrderBy&&e.orderByFields?.length)throw new s("parquet:unsupported","Queries using orderBy are not supported",{query:e});if(!this._capabilities.query.supportsDistinct&&e.returnDistinctValues)throw new s("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:e})}async _setWhereClause(e,t,r,i){const a=this._indexMap,n=this._fieldsIndex,o={getAttribute(e,s){const i=a[s];if(null==i){const t=n.get(s);if("__OBJECTID"===t?.name){const t=e.row+e.rowGroupStart;return P(r,t)}return null}const o=t.readAttribute(e.rowGroup,e.row,i);if(null==o)return null;const u=n.get(s);return"esriFieldTypeString"===u.type||"esriFieldTypeDateOnly"===u.type||"esriFieldTypeTimeOnly"===u.type||"esriFieldTypeTimestampOffset"===u.type?H.decode(o):o}},l=await u(i,this._fieldsIndex);if(!l.isStandardized)throw new s("sql-parse-error","expression is not standardized");const c=(e,t,r)=>l.testFeatureCompiled({rowGroup:e,row:t,rowGroupStart:r},o,null),p=l.fieldNames.map(e=>n.get(e)).filter(e=>e&&null!=this._indexMap[e?.name]);e.setWhere(i),e.setWhereEvaluator(c),e.setWhereFields(p.map(e=>e.name))}async*_queryChunks(e,t){const r=await G(),s=await this._provider.getFiles(),i=await this._getRequiredFields(e);for(const a of s){const s=await a.file,o=r.Query.new();o.setOutFields(i),(e.geometry||e.returnGeometry)&&o.setReturnGeometry(!0);const u=e.geometry?.spatialReference??this._queryEngineParams.spatialReference,l=u.wkid;if(e.geometry&&(w(u)||x(u))){const t=y(g(),h);for(const r of I(e.geometry))_(t,r);o.setOutSpatialReference(l),o.setExtent({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]})}e.where&&await this._setWhereClause(o,s,a.id,e.where);const c=await s.executeQuery(o),p=[],d=c.next(t);for(let e=0;e<Z;e++)p.push(c.next(t));let f=await d;for(;null!=f;){n(t);const e=new W(this._metadata,this._indexMap,f,a.id),r=fe([new k(e,null,0,!1)],this._queryEngineParams),s=p.shift();p.push(c.next(t)),yield r,f=await s}}}_enqueueQuery(e,t){return this._queue.push(e,t)}async _executeQuery(e,t){if(e.objectIds?.length){const r=new Map;for(const t of e.objectIds){const e=O(t),s=T(t);let i=r.get(e);i||(i=[],r.set(e,i)),i.push(s)}const s=[];for(const[i,a]of r.entries()){const r=await this._executeFileIdQuery(e,i,a,t);for(const e of r)s.push(e)}return new R(s,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:J,featureIdInfo:this._queryEngineParams.featureIdInfo})}let r=e.resultRecordCount??await this._getFeatureCount(),i=e.resultOffset??0;if(r>X)throw new s("parquet:cannot-execute-query","Unable to execute query, dataset is too large.");const a={...e};e.where=void 0,e.resultRecordCount=void 0,e.resultOffset=void 0;const n=[];for await(const s of this._queryChunks(a,t)){const a=await s.executeQueryForOpaqueFeatures(e,t);if(a.length>i){const t=a.slice(i,Math.min(i+r,a.length));for(const e of t)n.push(e);if(i=0,r-=t.length,0===r)return new R(n,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:J,featureIdInfo:this._queryEngineParams.featureIdInfo})}else i-=a.length}return new R(n,e,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,hasM:!1,hasZ:!1,featureAdapter:J,featureIdInfo:this._queryEngineParams.featureIdInfo})}async _executeFileIdQuery(e,t,r,s){const i=await this._getRequiredFields(e),a=(await G()).Query.new();a.setOutFields(i),a.setReturnGeometry(!!e.returnGeometry),a.setIds(new Uint32Array(r));const n=await this._getFile(t),o=await n.executeQuery(a,s);let u=await o.next(s),l=0;const c=[];for(;null!=u;){const e=new W(this._metadata,this._indexMap,u,t),r=new k(e,null,l++,!1);c.push(r),u=await o.next(s)}return fe(c,this._queryEngineParams).executeQueryForOpaqueFeatures(e,s)}async _getRequiredFields(e){const t=new Set;if(e.outStatistics)for(const r of e.outStatistics)null!=r.onStatisticField&&t.add(r.onStatisticField);else if(e.outFields)for(const r of e.outFields)t.add(r);return(t.has("*")?this._fieldsIndex.fields.map(e=>e.name):Array.from(t)).filter(e=>null!=this._indexMap[e])}}function ae(e){for(const t in e){const r=t;switch(r){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"objectIds":case"historicMoment":case"where":return null!=e[r]}}return!1}function ne(e,t){return!!e.outStatistics?.length&&!ae(e)&&!e.groupByFieldsForStatistics?.length&&!e.orderByFields?.length&&!e.returnDistinctValues&&!e.returnAggIds&&e.outStatistics.every(e=>oe(e,t))}function oe(e,t){switch(e.statisticType){case"count":return"1"===e.onStatisticField||null!=t.get(e.onStatisticField);case"min":case"max":{const r=t.get(e.onStatisticField);return null!=r&&N(r)}default:return!1}}function ue(e,t){const r="exceedslimit"!==e.statisticType?t.get(e.onStatisticField):null,s="min"!==e.statisticType&&"max"!==e.statisticType||"esriFieldTypeDate"!==r?.type?"esriFieldTypeDouble":r.type;return{name:e.outStatisticFieldName,alias:e.outStatisticFieldName,type:s}}function le(e,t){switch(e.statisticType){case"count":return ce(e,t);case"min":return pe(e,t,Math.min);case"max":return pe(e,t,Math.max);default:return{available:!1,value:null}}}function ce(e,t){if("count"!==e.statisticType)return{available:!1,value:null};if("1"===e.onStatisticField)return{available:!0,value:t.reduce((e,t)=>e+t.statistics.rowCount,0)};let r=0;for(const s of t){const t=s.statistics.statistics.get(e.onStatisticField);if(null==t||null==t.nullCount)return{available:!1,value:null};r+=s.statistics.rowCount-t.nullCount}return{available:!0,value:r}}function pe(e,t,r){if("min"!==e.statisticType&&"max"!==e.statisticType)return{available:!1,value:null};let s=null;const i="min"===e.statisticType?"minValue":"maxValue";for(const a of t){const t=a.statistics.statistics.get(e.onStatisticField);if(null==t)return{available:!1,value:null};const n=de(t[i]);null!=n&&(s=null==s?n:r(s,n))}return{available:!0,value:s}}function de(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function fe(e,t){const r=new V;for(const s of e)r.insert(s);return new v({...t,featureStore:r})}function me(e,t){return e.statistics.statistics.get(t.fieldName)??null}function ye(e,t){return e.slice().sort((e,r)=>{const s=he(e,t),i=he(r,t);return s===i?0:s<i?-1:1})}function he(e,t){const r=me(e,t);if(null==r)return Number.POSITIVE_INFINITY;const s=xe(r.minValue),i=xe(r.maxValue);return null==s||null==i||i<s?Number.POSITIVE_INFINITY:i-s}function ge(e,t){return{xStatistics:e.statistics.statistics.get(t.xFieldName)??null,yStatistics:e.statistics.statistics.get(t.yFieldName)??null}}function _e(e,t){const r=xe(e.minValue),s=xe(e.maxValue);return null==r||null==s||t.intersects(r,s)}function we(e,t,r){const s=xe(e.minValue),i=xe(e.maxValue),a=xe(t.minValue),n=xe(t.maxValue);return null==s||null==i||null==a||null==n||r.intersects(s,i,a,n)}function xe(e){return"number"==typeof e&&Number.isFinite(e)?e:null}function Fe(e){const t=e?.featureCount;let r=!1;return null!=t&&t<has("parquetlayer-full-query-feature-count")&&(r=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{...q,maxRecordCount:Y,supportsOrderBy:r,supportsDistinct:!0,supportsStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1}},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}function Se(e){return!!(e.objectIds?.length||e.outStatistics||e.orderByFields?.length||e.returnDistinctValues)}export{ie as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- function n(n){return n>>>24&255}function r(n){return 16777215&n}function t(n,r){return n<<24|r}export{n as getParquetFileId,t as getParquetObjectId,r as getParquetRowId};
2
+ const n=2**32,t=2**16;function r(r){return Math.floor(r/n)%t}function o(t){return t%n}function u(t,r){return t*n+r}export{r as getParquetFileId,u as getParquetObjectId,o as getParquetRowId};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import r from"../../core/Error.js";import{isBlobProtocol as t}from"../../core/urlUtils.js";import{property as i,subclass as o}from"../../core/accessorSupport/decorators.js";import{Integer as s,Null as n}from"../../core/accessorSupport/ensureType.js";import{excludeTables as p}from"../../core/accessorSupport/layerContainerType.js";import{readLoadable as a}from"../../core/accessorSupport/read.js";import{willPropertyWrite as l}from"../../core/accessorSupport/write.js";import{listMode as y,opacity as m}from"../support/commonProperties.js";import{isLayerSupportedForWriteContext as u}from"../support/layersMapping.js";import d from"../../time/TimeExtent.js";import{addLayerUnsupportedError as c}from"../../webdoc/support/unsupportedErrors.js";import{reader as w}from"../../core/accessorSupport/decorators/reader.js";import{writer as b}from"../../core/accessorSupport/decorators/writer.js";const g=g=>{const T=g;let f=class extends T{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,r,t){return"Group Layer"===t?.portalItem?.type?void 0:e}writeListMode(e,r,t,i){(i&&"ground"===i.layerContainerType||e&&l(this,t,{},i))&&(r[t]=e)}writeOperationalLayerType(e,r,t){e&&(r[t]=e)}writeTitle(e,r){r.title=e??"Layer"}readVisibilityTimeExtent(e){return e?d.fromArray(e):null}writeVisibilityTimeExtent(e,t,i,o){e&&"tables"!==o.layerContainerType&&(e.isEmpty?o?.messages&&o.messages.push(new r("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[i]=e.toArray())}read(e,r){r&&(r.layer=this),a(this,e,r=>super.read(e,r),r)}write(e,i){if(!this.persistenceEnabled&&!i?.ignorePersistenceEnabled)return null;if(i?.origin){if(!u(i,this.operationalLayerType))return c(i,this),null}const o=super.write(e,{...i,layer:this}),s=!!i&&!!i.messages&&!!i.messages.filter(e=>e instanceof r&&"web-document-write:property-required"===e.name).length;return t(o?.url)?(i?.messages?.push(new r("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&s?null:o}beforeSave(){}};return e([i({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],f.prototype,"id",void 0),e([w("id",["id"])],f.prototype,"readId",null),e([i(y)],f.prototype,"listMode",void 0),e([b("listMode")],f.prototype,"writeListMode",null),e([i({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:p,isRequired:!0}}}}})],f.prototype,"operationalLayerType",void 0),e([b("operationalLayerType")],f.prototype,"writeOperationalLayerType",null),e([i(m)],f.prototype,"opacity",void 0),e([i({type:Boolean,readOnly:!1})],f.prototype,"persistenceEnabled",void 0),e([i({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],f.prototype,"title",void 0),e([b("title"),b(["web-scene"],"title")],f.prototype,"writeTitle",null),e([i({type:d,json:{origins:{"web-scene":{write:{layerContainerTypes:p}}}}})],f.prototype,"visibilityTimeExtent",void 0),e([w("visibilityTimeExtent")],f.prototype,"readVisibilityTimeExtent",null),e([b(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[s,n]]}})],f.prototype,"writeVisibilityTimeExtent",null),e([i({type:Boolean,json:{name:"visibility",write:{layerContainerTypes:p}}})],f.prototype,"visible",void 0),f=e([o("esri.layers.mixins.OperationalLayer")],f),f};export{g as OperationalLayer};
2
+ import{__decorate as e}from"tslib";import r from"../../core/Error.js";import{isBlobProtocol as t}from"../../core/urlUtils.js";import{property as i,subclass as o}from"../../core/accessorSupport/decorators.js";import{Integer as s,Null as n}from"../../core/accessorSupport/ensureType.js";import{excludeTables as p}from"../../core/accessorSupport/layerContainerType.js";import{readLoadable as a}from"../../core/accessorSupport/read.js";import{willPropertyWrite as l}from"../../core/accessorSupport/write.js";import{listMode as y,opacity as m}from"../support/commonProperties.js";import{isLayerSupportedForWriteContext as u}from"../support/layersMapping.js";import d from"../../time/TimeExtent.js";import{addLayerUnsupportedError as c}from"../../webdoc/support/unsupportedErrors.js";import{reader as w}from"../../core/accessorSupport/decorators/reader.js";import{writer as b}from"../../core/accessorSupport/decorators/writer.js";const g=g=>{const T=g;let f=class extends T{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,r,t){return"Group Layer"===t?.portalItem?.type?void 0:e}writeListMode(e,r,t,i){(i&&"ground"===i.layerContainerType||e&&l(this,t,{},i))&&(r[t]=e)}writeOperationalLayerType(e,r,t){e&&(r[t]=e)}writeTitle(e,r){r.title=e??"Layer"}readVisibilityTimeExtent(e){return e?d.fromArray(e):null}writeVisibilityTimeExtent(e,t,i,o){e&&"tables"!==o.layerContainerType&&(e.isEmpty?o?.messages&&o.messages.push(new r("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[i]=e.toArray())}read(e,r){r&&(r.layer=this),a(this,e,r=>super.read(e,r),r)}write(e,i){if(!this.persistenceEnabled&&!i?.ignorePersistenceEnabled)return null;if(i?.origin){if(!u(i,this.operationalLayerType,this.type))return c(i,this),null}const o=super.write(e,{...i,layer:this}),s=!!i&&!!i.messages&&!!i.messages.filter(e=>e instanceof r&&"web-document-write:property-required"===e.name).length;return t(o?.url)?(i?.messages?.push(new r("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&s?null:o}beforeSave(){}};return e([i({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],f.prototype,"id",void 0),e([w("id",["id"])],f.prototype,"readId",null),e([i(y)],f.prototype,"listMode",void 0),e([b("listMode")],f.prototype,"writeListMode",null),e([i({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:p,isRequired:!0}}}}})],f.prototype,"operationalLayerType",void 0),e([b("operationalLayerType")],f.prototype,"writeOperationalLayerType",null),e([i(m)],f.prototype,"opacity",void 0),e([i({type:Boolean,readOnly:!1})],f.prototype,"persistenceEnabled",void 0),e([i({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],f.prototype,"title",void 0),e([b("title"),b(["web-scene"],"title")],f.prototype,"writeTitle",null),e([i({type:d,json:{origins:{"web-scene":{write:{layerContainerTypes:p}}}}})],f.prototype,"visibilityTimeExtent",void 0),e([w("visibilityTimeExtent")],f.prototype,"readVisibilityTimeExtent",null),e([b(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[s,n]]}})],f.prototype,"writeVisibilityTimeExtent",null),e([i({type:Boolean,json:{name:"visibility",write:{layerContainerTypes:p}}})],f.prototype,"visible",void 0),f=e([o("esri.layers.mixins.OperationalLayer")],f),f};export{g as OperationalLayer};
@@ -3,24 +3,24 @@ import type { ClonableMixin } from "../../core/Clonable.js";
3
3
  import type { IdentifiableMixin, IdentifiableMixinProperties } from "../../core/Identifiable.js";
4
4
  import type { Loadable, LoadableMixinProperties } from "../../core/Loadable.js";
5
5
 
6
- export interface AnnotationSublayerProperties extends LoadableMixinProperties, IdentifiableMixinProperties, Partial<Pick<AnnotationSublayer, "parent" | "subtypeCode" | "title" | "visible">> {}
6
+ export interface AnnotationFeatureSublayerProperties extends LoadableMixinProperties, IdentifiableMixinProperties, Partial<Pick<AnnotationFeatureSublayer, "parent" | "subtypeCode" | "visible">> {}
7
7
 
8
8
  /**
9
- * Represents a sublayer in a [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/). Each AnnotationSublayer
9
+ * Represents a sublayer in a [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/). Each AnnotationFeatureSublayer
10
10
  * is not a standalone service, but rather each sublayer corresponds to one subtype in the source feature service.
11
11
  *
12
- * The AnnotationSublayers are identified by their unique [subtypeCode](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AnnotationSublayer/#subtypeCode). You can configure the properties of each sublayer while
12
+ * The AnnotationFeatureSublayers are identified by their unique [subtypeCode](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AnnotationFeatureSublayer/#subtypeCode). You can configure the visibility of each sublayer while
13
13
  * initializing the AnnotationFeatureLayer
14
14
  *
15
15
  * @since 5.1
16
- * @see [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/)
16
+ * @see [AnnotationFeatureLayer.sublayers](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/#sublayers)
17
17
  */
18
- export default class AnnotationSublayer extends AnnotationSublayerSuperclass {
19
- constructor(properties?: AnnotationSublayerProperties);
18
+ export default class AnnotationFeatureSublayer extends AnnotationFeatureSublayerSuperclass {
19
+ constructor(properties?: AnnotationFeatureSublayerProperties);
20
20
  /** The [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/) to which the sublayer belongs. */
21
21
  accessor parent: AnnotationFeatureLayer | null | undefined;
22
22
  /**
23
- * The unique identifier representing the [AnnotationSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AnnotationSublayer/)
23
+ * The unique identifier representing the [AnnotationFeatureSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/AnnotationFeatureSublayer/)
24
24
  * created from the [AnnotationFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/AnnotationFeatureLayer/).
25
25
  */
26
26
  accessor subtypeCode: number;
@@ -28,17 +28,17 @@ export default class AnnotationSublayer extends AnnotationSublayerSuperclass {
28
28
  * The title of the layer used to identify it in places such as the [layer list](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-layer-list/).
29
29
  * The title is set to the subtype description of the layer.
30
30
  */
31
- accessor title: string | null | undefined;
32
- get type(): "annotation-sublayer";
31
+ get title(): string | null | undefined;
32
+ get type(): "annotation-feature-sublayer";
33
33
  /**
34
- * Indicates if the layer is visible in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/). When `false`,
34
+ * Indicates if the sublayer is visible in the [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/). When `false`,
35
35
  * the annotations corresponding to this sublayer will not be visible in the view.
36
36
  *
37
37
  * @default true
38
38
  * @example
39
- * // The layer is no longer visible in the view
39
+ * // The sublayer is no longer visible in the view
40
40
  * layer.visible = false;
41
41
  */
42
42
  accessor visible: boolean;
43
43
  }
44
- declare const AnnotationSublayerSuperclass: typeof Loadable & typeof IdentifiableMixin & typeof ClonableMixin
44
+ declare const AnnotationFeatureSublayerSuperclass: typeof Loadable & typeof IdentifiableMixin & typeof ClonableMixin
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import{ClonableMixin as e}from"../../core/Clonable.js";import{IdentifiableMixin as o}from"../../core/Identifiable.js";import{Loadable as r}from"../../core/Loadable.js";import{property as i,subclass as p}from"../../core/accessorSupport/decorators.js";import s from"../../graphic/AnnotationFeatureGraphicOrigin.js";let a=class extends(e(o(r))){constructor(t){super(t),this.graphicOrigin=new s(this),this.parent=null,this.subtypeCode=null,this.type="annotation-feature-sublayer",this.visible=!0}get title(){return this.parent?.subtypes?.find(t=>t.code===this.subtypeCode)?.name??null}};t([i({readOnly:!0,clonable:!1})],a.prototype,"graphicOrigin",void 0),t([i({clonable:!1})],a.prototype,"parent",void 0),t([i({type:Number})],a.prototype,"subtypeCode",void 0),t([i({readOnly:!0})],a.prototype,"title",null),t([i({readOnly:!0})],a.prototype,"type",void 0),t([i({type:Boolean})],a.prototype,"visible",void 0),a=t([p("esri.layers.support.AnnotationFeatureSublayer")],a);export{a as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as r,subclass as o}from"../../core/accessorSupport/decorators.js";import{isSupportedRendererType as i,combineRenderingRules as n,convertRendererToRenderingRule as s}from"./imageryRendererUtils.js";import a from"./MosaicRule.js";import{interpolationKebab as p,noDataInterpretationKebab as l,pixelTypeKebabDict as c}from"./rasterEnums.js";import m from"./RasterFunction.js";import{writer as u}from"../../core/accessorSupport/decorators/writer.js";let y=class extends t{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){const e=this.layer.renderer?.type;return this.requestRawData||"vector-field"===e||"flow"===e?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new a({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.multidimensionalSubset?.areaOfInterest;return r&&(t=d(t,r)),this.requestRawData||!e.isRenderedFormat||e.pixelFilter||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:o}=t;if(e=e||t.rasterFunction,!o||!i(o))return e;return n(s(o,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map(({name:e})=>e),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e)}};function d(e,t){const r=new m({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}});return n(r,e)}e([r()],y.prototype,"layer",void 0),e([r()],y.prototype,"requestRawData",void 0),e([r({json:{write:!0}})],y.prototype,"adjustAspectRatio",null),e([u("adjustAspectRatio")],y.prototype,"writeAdjustAspectRatio",null),e([r({json:{write:!0}})],y.prototype,"bandIds",null),e([r({json:{write:!0}})],y.prototype,"compression",void 0),e([r({json:{write:!0}})],y.prototype,"compressionQuality",null),e([u("compressionQuality")],y.prototype,"writeCompressionQuality",null),e([r({json:{write:!0}})],y.prototype,"compressionTolerance",null),e([u("compressionTolerance")],y.prototype,"writeCompressionTolerance",null),e([r({json:{write:!0}})],y.prototype,"format",null),e([r({type:String,json:{read:{reader:p.read},write:{writer:p.write}}})],y.prototype,"interpolation",null),e([r({json:{write:!0}})],y.prototype,"noData",null),e([r({type:String,json:{read:{reader:l.read},write:{writer:l.write}}})],y.prototype,"noDataInterpretation",null),e([r({type:c.apiValues,json:{read:c.read,write:c.write}})],y.prototype,"pixelType",null),e([r({json:{write:!0}})],y.prototype,"lercVersion",void 0),e([u("lercVersion")],y.prototype,"writeLercVersion",null),e([r({type:Number})],y.prototype,"version",null),e([r({json:{write:!0}})],y.prototype,"mosaicRule",null),e([r({json:{write:!0,name:"renderingRule"}})],y.prototype,"rasterFunction",null),y=e([o("esri.layers.support.ExportImageServiceParameters")],y);export{y as ExportImageServiceParameters};
2
+ import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as r,subclass as o}from"../../core/accessorSupport/decorators.js";import{getPixelValueRange as i}from"../raster/formats/pixelRangeUtils.js";import{isSupportedRendererType as n,combineRenderingRules as s,convertRendererToRenderingRule as a}from"./imageryRendererUtils.js";import p from"./MosaicRule.js";import{interpolationKebab as l,noDataInterpretationKebab as c,pixelTypeKebabDict as m}from"./rasterEnums.js";import u from"./RasterFunction.js";import{writer as y}from"../../core/accessorSupport/decorators/writer.js";let d=class extends t{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){const e=this.layer.renderer?.type;return this.requestRawData||"vector-field"===e||"flow"===e?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new p({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t,rasterInfo:r}=e;t&&"lerc"===this.format&&1===r?.bandCount&&r.colormap&&(t=f(t,r.pixelType));const o=e.multidimensionalSubset?.areaOfInterest;return o&&(t=w(t,o)),this.requestRawData||!e.isRenderedFormat||e.pixelFilter||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:o}=t;if(e=e||t.rasterFunction,!o||!n(o))return e;return s(a(o,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map(({name:e})=>e),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e)}};function w(e,t){const r=new u({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}});return s(r,e)}function f(e,t){const[r,o]=i(t),n=new u({functionName:"Stretch",functionArguments:{StretchType:5,UseGamma:!1,Min:r,Max:o,Statistics:[[r,o,1,1]]}});return s(n,e)}e([r()],d.prototype,"layer",void 0),e([r()],d.prototype,"requestRawData",void 0),e([r({json:{write:!0}})],d.prototype,"adjustAspectRatio",null),e([y("adjustAspectRatio")],d.prototype,"writeAdjustAspectRatio",null),e([r({json:{write:!0}})],d.prototype,"bandIds",null),e([r({json:{write:!0}})],d.prototype,"compression",void 0),e([r({json:{write:!0}})],d.prototype,"compressionQuality",null),e([y("compressionQuality")],d.prototype,"writeCompressionQuality",null),e([r({json:{write:!0}})],d.prototype,"compressionTolerance",null),e([y("compressionTolerance")],d.prototype,"writeCompressionTolerance",null),e([r({json:{write:!0}})],d.prototype,"format",null),e([r({type:String,json:{read:{reader:l.read},write:{writer:l.write}}})],d.prototype,"interpolation",null),e([r({json:{write:!0}})],d.prototype,"noData",null),e([r({type:String,json:{read:{reader:c.read},write:{writer:c.write}}})],d.prototype,"noDataInterpretation",null),e([r({type:m.apiValues,json:{read:m.read,write:m.write}})],d.prototype,"pixelType",null),e([r({json:{write:!0}})],d.prototype,"lercVersion",void 0),e([y("lercVersion")],d.prototype,"writeLercVersion",null),e([r({type:Number})],d.prototype,"version",null),e([r({json:{write:!0}})],d.prototype,"mosaicRule",null),e([r({json:{write:!0,name:"renderingRule"}})],d.prototype,"rasterFunction",null),d=e([o("esri.layers.support.ExportImageServiceParameters")],d);export{d as ExportImageServiceParameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as r}from"tslib";import{Clonable as t}from"../../core/Clonable.js";import{JSONSupportMixin as o}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import s from"../../portal/PortalItem.js";import{reader as a}from"../../core/accessorSupport/decorators/reader.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";let m=class extends(o(t)){constructor(r){super(r),this.type="portal-item"}readPortalItem(r,t,o){if(t.itemId)return new s({id:t.itemId,portal:o?.portal})}writePortalItem(r,t){r?.id&&(t.itemId=r.id)}};r([e({type:["portal-item"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],m.prototype,"type",void 0),r([e({type:s,json:{write:{isRequired:!0}}})],m.prototype,"portalItem",void 0),r([a("portalItem",["itemId"])],m.prototype,"readPortalItem",null),r([i("portalItem",{itemId:{type:String}})],m.prototype,"writePortalItem",null),m=r([p("esri.layers.support.ParquetPortalItemData")],m);const l=m;export{l as default};
2
+ import{__decorate as r}from"tslib";import{Clonable as t}from"../../core/Clonable.js";import{JSONSupportMixin as o}from"../../core/JSONSupport.js";import{property as e}from"../../core/accessorSupport/decorators.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import a from"../../portal/PortalItem.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{writer as i}from"../../core/accessorSupport/decorators/writer.js";let m=class extends(o(t)){constructor(r){super(r),this.type="portal-item"}readPortalItem(r,t,o){if(t.itemId)return new a({id:t.itemId,portal:o?.portal})}writePortalItem(r,t){r?.id&&(t.itemId=r.id)}};r([e({type:["portal-item"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],m.prototype,"type",void 0),r([e({type:a,json:{write:{isRequired:!0}}})],m.prototype,"portalItem",void 0),r([s("portalItem",["itemId"])],m.prototype,"readPortalItem",null),r([i("portalItem",{itemId:{type:String}})],m.prototype,"writePortalItem",null),m=r([p("esri.layers.support.ParquetPortalItemData")],m);export{m as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{id as e}from"../../kernel.js";import t from"../../request.js";import n from"../../core/Collection.js";import"../../core/urlUtils.js";import{isLayerFromCatalog as r}from"../catalog/catalogUtils.js";import{isBasemap as i}from"../../support/userTypeGuards/isBasemap.js";function u(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function o(e){return w(e)||m(e)}function s(e){return u(e,"feature")}function a(e){return"gaussian-splat"===e?.type}function c(e){return u(e,"oriented-imagery")}function l(e){return u(e,"catalog-footprint")}function f(e){return u(e,"graphics")}function p(e){return u(e,"map-image")}function y(e){return u(e,"map-notes")&&"sublayers"in e}function g(e){return u(e,"knowledge-graph")&&"layers"in e}function d(e){return u(e,"knowledge-graph-sublayer")}function b(e){return u(e,"link-chart")&&"layers"in e}function m(e){return u(e,"scene")}function h(e){return u(e,"subtype-group")&&"sublayers"in e}function v(e){return"subtype-sublayer"===e?.type}function w(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function j(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function L(e){return"group"===e?.type}function S(e){const t=e.parent;return L(t)&&t.tables.includes(e)}const E={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function k(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function C(e){return"integrated-mesh"===e.type||"integrated-mesh-3dtiles"===e.type}function x(e){return"integrated-mesh-3dtiles"===e.type}function R(e){const t=e?.type;return"integrated-mesh-3dtiles"===t||"gaussian-splat"===t}function T(e){return"voxel"===e?.type}function U(e){return"imagery-tile"===e?.type}function M(e,t){return i(e?.parent)&&e.parent[t].includes(e)}function O(e){return M(e,"baseLayers")}function P(e){return M(e,"referenceLayers")}function B(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function I(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t||"annotation-feature"===t||"dimension-feature"===t)&&"feature-layer"===e?.source?.type}function q(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function F(e){return null!=e&&"object"==typeof e&&"featureReduction"in e}function J(e){return l(e)||s(e)&&q(e)||c(e)||v(e)}function N(e){const t=e?.type;return"binning"===t||"cluster"===t}function A(e,t){if(!J(e))return;const n=t?.graphic,r="featureReduction"in e?e.featureReduction:null;if(n){if(n.isAggregate){const e=n.origin;return e&&("featureReductionProvider"in e&&r)?N(r)?r:null:void 0}return e}return t?.checkFeatureReduction&&r?N(r)?r:null:e}function D(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)}),n.length>0)){let e;if(r){const t={};n.forEach(e=>{t[e[0]]=e[1]}),e=JSON.stringify(t)}else{const t=[];n.forEach(e=>{t.push(e[0]+":"+e[1])}),e=t.join(";")}return e}return null}function G(e){if(!e)return;const t=[];return e.forEach((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))}),t.length?"{"+t.join(",")+"}":void 0}function V(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function $(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const o=`${n.slice(0,u)}/rest/info`,s=null!=r?r.signal:null,{data:a}=await t(o,{query:{f:"json"},responseType:"json",signal:s});return a?.owningSystemUrl||null}function z(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function H(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function K(e){return z(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function Q(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}function W(e){return!!Q(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function X(e){if(!e)return[];return("subtypes"in e?e.subtypes:h(e.parent)?e.parent.subtypes:[])??[]}function Y(e){return("imagery"===e.type||"imagery-tile"===e.type)&&"flow"===e.renderer?.type}function Z(e){const t=new n;for(const n of e.allLayers.concat(e.allTables))r(n)||S(n)||"annotation-feature"===n.type||"dimension-feature"===n.type||("charts"in n&&t.push(n),"subtype-group"===n.type&&t.push(...n.sublayers));return t}function _(e,t){return null}function ee(e){return null}function te(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function ne(e,t){if(!t||!te(e))return;const n=_(e.url);n&&(e.url=n)}export{ne as applyPreferredHostToPortalItem,W as getEffectiveEditingEnabled,K as getEffectiveLayerCapabilities,A as getFieldConfigurationsContainer,Z as getLayersWithChartSupport,$ as getOwningPortalUrl,ee as getPreferredHost,_ as getPreferredUrl,X as getSubtypesFromLayer,V as getTileMaxtrixSetFromActiveLayer,R as is3DTilesLayer,O as isBaseLayer,o as isBasemap3DSupportedLayer,w as isBasemapSupportedTiledLayer,B as isFeatureCollectionLayer,s as isFeatureLayer,q as isFeatureServiceLayer,a as isGaussianSplatLayer,f as isGraphicsLayer,L as isGroupLayer,U as isImageryTileLayer,x as isIntegratedMesh3DTilesLayer,C as isIntegratedMeshLayer,g as isKnowledgeGraphLayer,d as isKnowledgeGraphSublayer,z as isLayerWithFeatureCapabilities,I as isLayerWithFeatureLayerSource,Y as isLayerWithFlowRenderer,b as isLinkChartLayer,p as isMapImageLayer,y as isMapNotesLayer,te as isPreferredUrlApplicable,P as isReferenceLayer,m as isSceneLayer,k as isSceneServiceLayer,h as isSubtypeGroupLayer,v as isSubtypeSublayer,H as isTable,j as isTiledLayer,T as isVoxelLayer,E as sceneServiceLayerTypeToClassName,D as serializeLayerDefinitions,G as serializeTimeOptions,F as supportsFeatureReduction,J as supportsFieldConfiguration};
2
+ import{id as e}from"../../kernel.js";import t from"../../request.js";import n from"../../core/Collection.js";import"../../core/urlUtils.js";import{isLayerFromCatalog as r}from"../catalog/catalogUtils.js";import{isBasemap as i}from"../../support/userTypeGuards/isBasemap.js";function u(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function o(e){return w(e)||m(e)}function s(e){return u(e,"feature")}function a(e){return"gaussian-splat"===e?.type}function c(e){return u(e,"oriented-imagery")}function l(e){return u(e,"catalog-footprint")}function f(e){return u(e,"graphics")}function p(e){return u(e,"map-image")}function y(e){return u(e,"map-notes")&&"sublayers"in e}function g(e){return u(e,"knowledge-graph")&&"layers"in e}function d(e){return u(e,"knowledge-graph-sublayer")}function b(e){return u(e,"link-chart")&&"layers"in e}function m(e){return u(e,"scene")}function h(e){return u(e,"subtype-group")&&"sublayers"in e}function v(e){return"subtype-sublayer"===e?.type}function w(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function j(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function L(e){return"group"===e?.type}function S(e){const t=e.parent;return L(t)&&t.tables.includes(e)}const E={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function k(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function C(e){return"integrated-mesh"===e.type||"integrated-mesh-3dtiles"===e.type}function x(e){return"integrated-mesh-3dtiles"===e.type}function R(e){const t=e?.type;return"integrated-mesh-3dtiles"===t||"gaussian-splat"===t}function T(e){return"voxel"===e?.type}function U(e){return"imagery-tile"===e?.type}function M(e,t){return i(e?.parent)&&e.parent[t].includes(e)}function O(e){return M(e,"baseLayers")}function P(e){return M(e,"referenceLayers")}function q(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function B(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t||"annotation-feature"===t||"dimension-feature"===t)&&"feature-layer"===e?.source?.type}function I(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function F(e){return null!=e&&"object"==typeof e&&"featureReduction"in e}function J(e){return l(e)||s(e)&&I(e)||c(e)||v(e)}function N(e){const t=e?.type;return"binning"===t||"cluster"===t}function A(e,t){if(!J(e))return;const n=t?.graphic,r="featureReduction"in e?e.featureReduction:null;if(n){if(n.isAggregate){const e=n.origin;return e&&("featureReductionProvider"in e&&r)?N(r)?r:null:void 0}return e}return t?.checkFeatureReduction&&r?N(r)?r:null:e}function D(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)}),n.length>0)){let e;if(r){const t={};n.forEach(e=>{t[e[0]]=e[1]}),e=JSON.stringify(t)}else{const t=[];n.forEach(e=>{t.push(e[0]+":"+e[1])}),e=t.join(";")}return e}return null}function G(e){if(!e)return;const t=[];return e.forEach((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))}),t.length?"{"+t.join(",")+"}":void 0}function V(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function $(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const o=`${n.slice(0,u)}/rest/info`,s=null!=r?r.signal:null,{data:a}=await t(o,{query:{f:"json"},responseType:"json",signal:s});return a?.owningSystemUrl||null}function z(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"parquet":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function H(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function K(e){return z(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function Q(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}function W(e){return!!Q(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function X(e){if(!e)return[];return("subtypes"in e?e.subtypes:h(e.parent)?e.parent.subtypes:[])??[]}function Y(e){return("imagery"===e.type||"imagery-tile"===e.type)&&"flow"===e.renderer?.type}function Z(e){const t=new n;for(const n of e.allLayers.concat(e.allTables))r(n)||S(n)||"annotation-feature"===n.type||"dimension-feature"===n.type||("charts"in n&&t.push(n),"subtype-group"===n.type&&t.push(...n.sublayers));return t}function _(e,t){return null}function ee(e){return null}function te(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function ne(e,t){if(!t||!te(e))return;const n=_(e.url);n&&(e.url=n)}export{ne as applyPreferredHostToPortalItem,W as getEffectiveEditingEnabled,K as getEffectiveLayerCapabilities,A as getFieldConfigurationsContainer,Z as getLayersWithChartSupport,$ as getOwningPortalUrl,ee as getPreferredHost,_ as getPreferredUrl,X as getSubtypesFromLayer,V as getTileMaxtrixSetFromActiveLayer,R as is3DTilesLayer,O as isBaseLayer,o as isBasemap3DSupportedLayer,w as isBasemapSupportedTiledLayer,q as isFeatureCollectionLayer,s as isFeatureLayer,I as isFeatureServiceLayer,a as isGaussianSplatLayer,f as isGraphicsLayer,L as isGroupLayer,U as isImageryTileLayer,x as isIntegratedMesh3DTilesLayer,C as isIntegratedMeshLayer,g as isKnowledgeGraphLayer,d as isKnowledgeGraphSublayer,z as isLayerWithFeatureCapabilities,B as isLayerWithFeatureLayerSource,Y as isLayerWithFlowRenderer,b as isLinkChartLayer,p as isMapImageLayer,y as isMapNotesLayer,te as isPreferredUrlApplicable,P as isReferenceLayer,m as isSceneLayer,k as isSceneServiceLayer,h as isSubtypeGroupLayer,v as isSubtypeSublayer,H as isTable,j as isTiledLayer,T as isVoxelLayer,E as sceneServiceLayerTypeToClassName,D as serializeLayerDefinitions,G as serializeTimeOptions,F as supportsFeatureReduction,J as supportsFieldConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"../../core/has.js";const e={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},r={ArcGISAnnotationLayer:"UnsupportedLayer",ArcGISDimensionLayer:"UnsupportedLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",get ParquetLayer(){return has("parquetlayer-persistence-enabled")?"ParquetLayer":"UnsupportedLayer"},SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},a={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},y={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},L={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},i={ArcGISTiledElevationServiceLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},t={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",GaussianSplatLayer:"GaussianSplatLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},n={ArcGISFeatureLayer:"FeatureLayer"},c={...r,LinkChartLayer:"LinkChartLayer"},s=e,S=a,l={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",BuildingSceneLayer:"BuildingSceneLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",MediaLayer:"MediaLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",SubtypeGroupLayer:"SubtypeGroupLayer",WCS:"WCSLayer"},o=a;function p(l){switch(l.origin){case"web-scene":switch(l.layerContainerType){case"basemap-base-layers":return y;case"basemap-ground-layers":return L;case"ground":return i;case"tables":return n;default:return t}case"link-chart":switch(l.layerContainerType){case"basemap-base-layers":return s;case"tables":return S;default:return c}default:switch(l.layerContainerType){case"basemap-base-layers":return e;case"tables":return a;case"ground":case"basemap-ground-layers":return;default:return r}}}function u(e,r){if(!r)return"UnknownLayer";if("DefaultTileLayer"===r){let r="UnknownLayer";if("web-scene"===e.origin)switch(e.layerContainerType){case"operational-layers":case"basemap-base-layers":r="TileLayer";break;case"ground":r="ElevationLayer"}else switch(e.layerContainerType){case"basemap-base-layers":case"operational-layers":r="TileLayer"}return r}return p(e)?.[r]??"UnknownLayer"}function I(e){if("portal-item"===e.origin)switch(e.layerContainerType){case"basemap-base-layers":case"ground":case"basemap-ground-layers":return;case"tables":return o;default:return l}return p(e)}function d(e,r){if(!e?.origin)return!1;switch(e.origin){case"web-map":case"link-chart":if("operational-layers"===e.layerContainerType)if("ArcGISDimensionLayer"===r)return!1;break;case"web-scene":if("operational-layers"===e.layerContainerType)if("ArcGISTiledElevationServiceLayer"===r)return!1}const a=I(e)?.[r];return null!=a&&"UnknownLayer"!==a&&"UnsupportedLayer"!==a}export{u as getLayerModuleForContextAndType,d as isLayerSupportedForWriteContext,p as layerTypeMapForReadContext};
2
+ import has from"../../core/has.js";const e={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},r={ArcGISAnnotationLayer:"AnnotationFeatureLayer",ArcGISDimensionLayer:"DimensionFeatureLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",get ParquetLayer(){return has("parquetlayer-persistence-enabled")?"ParquetLayer":"UnsupportedLayer"},SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},a={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},y={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},L={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},i={ArcGISTiledElevationServiceLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},t={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",GaussianSplatLayer:"GaussianSplatLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",Object3DTilesLayer:"UnsupportedLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},n={ArcGISFeatureLayer:"FeatureLayer"},c={...r,LinkChartLayer:"LinkChartLayer"},s=e,S=a,l={ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",BuildingSceneLayer:"BuildingSceneLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",MediaLayer:"MediaLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",SubtypeGroupLayer:"SubtypeGroupLayer",WCS:"WCSLayer"},o=a;function p(l){switch(l.origin){case"web-scene":switch(l.layerContainerType){case"basemap-base-layers":return y;case"basemap-ground-layers":return L;case"ground":return i;case"tables":return n;default:return t}case"link-chart":switch(l.layerContainerType){case"basemap-base-layers":return s;case"tables":return S;default:return c}default:switch(l.layerContainerType){case"basemap-base-layers":return e;case"tables":return a;case"ground":case"basemap-ground-layers":return;default:return r}}}function u(e,r){if(!r)return"UnknownLayer";if("DefaultTileLayer"===r){let r="UnknownLayer";if("web-scene"===e.origin)switch(e.layerContainerType){case"operational-layers":case"basemap-base-layers":r="TileLayer";break;case"ground":r="ElevationLayer"}else switch(e.layerContainerType){case"basemap-base-layers":case"operational-layers":r="TileLayer"}return r}return p(e)?.[r]??"UnknownLayer"}function I(e){if("portal-item"===e.origin)switch(e.layerContainerType){case"basemap-base-layers":case"ground":case"basemap-ground-layers":return;case"tables":return o;default:return l}return p(e)}function g(e,r,a){if(!e?.origin)return!1;switch(e.origin){case"web-map":case"link-chart":if("operational-layers"===e.layerContainerType)if("ArcGISDimensionLayer"===r)if("dimension-feature"!==a)return!1;break;case"web-scene":if("operational-layers"===e.layerContainerType)if("ArcGISTiledElevationServiceLayer"===r)return!1}const y=I(e)?.[r];return null!=y&&"UnknownLayer"!==y&&"UnsupportedLayer"!==y}export{u as getLayerModuleForContextAndType,g as isLayerSupportedForWriteContext,p as layerTypeMapForReadContext};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../core/Collection.js";import t from"../../core/Error.js";import{JSONMap as r}from"../../core/jsonMap.js";import o from"../../geometry/SpatialReference.js";import{createFileProvider as i}from"../graphics/sources/parquet/createFileProvider.js";import n from"./Field.js";import{isNumericField as a}from"./fieldUtils.js";import{fromParquetGeometryEncodingJSON as l}from"./parquetEncodingUtils.js";import s from"./ParquetFilesData.js";const p=new r({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"});function m(e){return p.toJSON(e)}function d(e){return p.fromJSON(e)}async function u(t,r={}){const o=Array.isArray(t)?new s({urls:new e(t)}):t,n=await y(o,r),a=i(n,null,()=>r.customParameters);return f(await a.getMetadata(),{data:o})}async function f(e,r){if(r.geometryType&&r.spatialReference&&r.geometryEncoding&&r.fields)return r;if(!e)throw new t("parquet:bad-input","No metadata found");const i={...r};if(null==i.fields&&(i.fields=e.fields.map(e=>n.fromJSON(e))),null!=i.geometryEncoding){const e=i.geometryEncoding;switch(e.type){case"wkb":{const r=i.fields.find(t=>t.name===e.field);if(!r)throw new t("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==r.type)throw new t("parquet:unsupported",`Invalid field type for geometry encoding. Found ${r.type} but expected 'blob'`);break}case"location":for(const r of[e.xField,e.yField])if(null!=r){const e=i.fields.find(e=>e.name===r);if(!e)throw new t("parquet:unsupported",`Geometry encoding references field ${r} which does not exist`);if(!a(e))throw new t("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}return null==i.geometryEncoding&&(i.geometryEncoding=e.geometryEncoding?l(e.geometryEncoding):null),i.fields=c(i.fields,e),e.displayOptimization&&(i.displayOptimization=e.displayOptimization),!i.geometryType&&e.geometryType&&(i.geometryType=d(e.geometryType)),!i.spatialReference&&e.spatialReference&&(i.spatialReference=o.fromJSON(e.spatialReference)),i}function c(e,t){const r=t.geoMetadata;if(null==r)return e;const o=new Set(Object.keys(r.columns));return e.filter(e=>!o.has(e.name))}async function y(e,r){switch(e.type){case"files":return{type:"urls",urls:e.urls.toArray()};case"portal-item":{const o=await e.portalItem.load(r);switch(o.type){case"Apache Parquet":return{type:"portal-parquet-file",itemUrl:o.itemUrl,itemCdnUrl:o.itemCdnUrl,modified:o.modified,size:o.size};case"Parquet layer":case"Parquet Layer":case"Parquet feature layer":case"Parquet Feature Layer":if(!o.url)throw new t("parquet:bad-item",`Item of type ${o.type} must have a url defined`,o);return{type:"portal-parquet-layer",itemUrl:o.itemUrl,itemCdnUrl:o.itemCdnUrl,itemMetadata:{modified:o.modified,url:o.url}};default:throw new t("parquet:bad-item",`Item of type ${o.type} is not supported`,o)}}}}export{f as completeParquetLayerInfo,y as createFileProviderSchema,d as fromParquetJSONGeometryType,u as getParquetLayerInfo,p as parquetGeometryTypeKebabDict,m as toParquetJSONGeometryType};
2
+ import e from"../../core/Collection.js";import t from"../../core/Error.js";import{JSONMap as r}from"../../core/jsonMap.js";import i from"../../geometry/SpatialReference.js";import{createFileProvider as o}from"../graphics/sources/parquet/createFileProvider.js";import n from"./Field.js";import{isNumericField as a}from"./fieldUtils.js";import{fromParquetGeometryEncodingJSON as l}from"./parquetEncodingUtils.js";import s from"./ParquetFilesData.js";const p=new r({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"});function m(e){return p.toJSON(e)}function d(e){return p.fromJSON(e)}async function u(t,r={}){const i=Array.isArray(t)?new s({urls:new e(t)}):t,n=await y(i,r),a=o(n,null,()=>r.customParameters);return f(await a.getMetadata(),{data:i})}async function f(e,r){if(r.geometryType&&r.spatialReference&&r.geometryEncoding&&r.fields)return r;if(!e)throw new t("parquet:bad-input","No metadata found");const o={...r};if(null==o.fields&&(o.fields=e.fields.map(e=>n.fromJSON(e))),null!=o.geometryEncoding){const e=o.geometryEncoding;switch(e.type){case"wkb":{const r=o.fields.find(t=>t.name===e.field);if(!r)throw new t("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==r.type)throw new t("parquet:unsupported",`Invalid field type for geometry encoding. Found ${r.type} but expected 'blob'`);break}case"location":for(const r of[e.xField,e.yField])if(null!=r){const e=o.fields.find(e=>e.name===r);if(!e)throw new t("parquet:unsupported",`Geometry encoding references field ${r} which does not exist`);if(!a(e))throw new t("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}return null==o.geometryEncoding&&(o.geometryEncoding=e.geometryEncoding?l(e.geometryEncoding):null),o.fields=c(o.fields,e),!o.displayOptimization&&e.displayOptimization&&(o.displayOptimization=e.displayOptimization),!o.geometryType&&e.geometryType&&(o.geometryType=d(e.geometryType)),!o.spatialReference&&e.spatialReference&&(o.spatialReference=i.fromJSON(e.spatialReference)),o}function c(e,t){const r=t.geoMetadata;if(null==r)return e;const i=new Set(Object.keys(r.columns));return e.filter(e=>!i.has(e.name))}async function y(e,r){switch(e.type){case"files":return{type:"urls",urls:e.urls.toArray()};case"portal-item":{const i=await e.portalItem.load(r);switch(i.type){case"Apache Parquet":return{type:"portal-parquet-file",itemUrl:i.itemUrl,itemCdnUrl:i.itemCdnUrl,modified:i.modified,size:i.size};case"Parquet layer":case"Parquet Layer":case"Parquet feature layer":case"Parquet Feature Layer":if(!i.url)throw new t("parquet:bad-item",`Item of type ${i.type} must have a url defined`,i);return{type:"portal-parquet-layer",itemUrl:i.itemUrl,itemCdnUrl:i.itemCdnUrl,itemMetadata:{modified:i.modified,url:i.url}};default:throw new t("parquet:bad-item",`Item of type ${i.type} is not supported`,i)}}}}export{f as completeParquetLayerInfo,y as createFileProviderSchema,d as fromParquetJSONGeometryType,u as getParquetLayerInfo,p as parquetGeometryTypeKebabDict,m as toParquetJSONGeometryType};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.1.0-next.127",
3
+ "version": "5.1.0-next.129",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -19,10 +19,10 @@
19
19
  "license": "SEE LICENSE IN LICENSE.md",
20
20
  "dependencies": {
21
21
  "@amcharts/amcharts5": "~5.18.0",
22
- "@arcgis/toolkit": "^5.1.0-next.129",
22
+ "@arcgis/toolkit": "^5.1.0-next.130",
23
23
  "@esri/arcgis-html-sanitizer": "~4.1.0",
24
- "@esri/calcite-components": "^5.1.1-next.3",
25
- "@vaadin/grid": "~25.1.3",
24
+ "@esri/calcite-components": "^5.1.1",
25
+ "@vaadin/grid": "~25.1.4",
26
26
  "@zip.js/zip.js": "~2.8.26",
27
27
  "luxon": "~3.7.2",
28
28
  "marked": "~18.0.5",