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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  2. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  3. package/arcade/functions/string.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/0618fb0058f39ecd363f.js +1 -0
  6. package/assets/esri/core/workers/chunks/62d9d15f0d00a75da42c.js +1 -0
  7. package/assets/esri/core/workers/chunks/93ad67930aa7d4a4b0ac.js +1 -0
  8. package/assets/esri/core/workers/chunks/953407451813f406fdf1.js +1 -0
  9. package/assets/esri/core/workers/chunks/a507135977d83aea4421.js +1 -0
  10. package/assets/esri/core/workers/chunks/b91c155de9a89e4e6971.js +1 -0
  11. package/assets/esri/core/workers/chunks/cbe817e966b57599bafd.js +1 -0
  12. package/assets/esri/core/workers/chunks/d95ca50ca7af4c222036.js +1 -0
  13. package/assets/esri/core/workers/chunks/e1e0b3580e2c3098c9f4.js +1 -0
  14. package/assets/esri/core/workers/chunks/ef141014ed21a7fd1ff3.js.LICENSE.txt +1 -1
  15. package/assets/esri/t9n/common_ar.json +1 -1
  16. package/assets/esri/t9n/common_bg.json +1 -1
  17. package/assets/esri/t9n/common_bs.json +1 -1
  18. package/assets/esri/t9n/common_ca.json +1 -1
  19. package/assets/esri/t9n/common_cs.json +1 -1
  20. package/assets/esri/t9n/common_da.json +1 -1
  21. package/assets/esri/t9n/common_de.json +1 -1
  22. package/assets/esri/t9n/common_el.json +1 -1
  23. package/assets/esri/t9n/common_es.json +1 -1
  24. package/assets/esri/t9n/common_et.json +1 -1
  25. package/assets/esri/t9n/common_fi.json +1 -1
  26. package/assets/esri/t9n/common_fr.json +1 -1
  27. package/assets/esri/t9n/common_he.json +1 -1
  28. package/assets/esri/t9n/common_hr.json +1 -1
  29. package/assets/esri/t9n/common_hu.json +1 -1
  30. package/assets/esri/t9n/common_id.json +1 -1
  31. package/assets/esri/t9n/common_it.json +1 -1
  32. package/assets/esri/t9n/common_ja.json +1 -1
  33. package/assets/esri/t9n/common_ko.json +1 -1
  34. package/assets/esri/t9n/common_lt.json +1 -1
  35. package/assets/esri/t9n/common_lv.json +1 -1
  36. package/assets/esri/t9n/common_nb.json +1 -1
  37. package/assets/esri/t9n/common_nl.json +1 -1
  38. package/assets/esri/t9n/common_pl.json +1 -1
  39. package/assets/esri/t9n/common_pt-BR.json +1 -1
  40. package/assets/esri/t9n/common_pt-PT.json +1 -1
  41. package/assets/esri/t9n/common_ro.json +1 -1
  42. package/assets/esri/t9n/common_ru.json +1 -1
  43. package/assets/esri/t9n/common_sk.json +1 -1
  44. package/assets/esri/t9n/common_sl.json +1 -1
  45. package/assets/esri/t9n/common_sr.json +1 -1
  46. package/assets/esri/t9n/common_sv.json +1 -1
  47. package/assets/esri/t9n/common_th.json +1 -1
  48. package/assets/esri/t9n/common_tr.json +1 -1
  49. package/assets/esri/t9n/common_uk.json +1 -1
  50. package/assets/esri/t9n/common_vi.json +1 -1
  51. package/assets/esri/t9n/common_zh-CN.json +1 -1
  52. package/assets/esri/t9n/common_zh-HK.json +1 -1
  53. package/assets/esri/t9n/common_zh-TW.json +1 -1
  54. package/assets/esri/themes/base/_core.scss +2 -0
  55. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +198 -125
  56. package/assets/esri/themes/base/widgets/_Features.scss +57 -0
  57. package/assets/esri/themes/base/widgets/_Popup.scss +3 -0
  58. package/assets/esri/themes/dark/main.css +1 -1
  59. package/assets/esri/themes/light/main.css +1 -1
  60. package/assets/esri/themes/light/view.css +1 -1
  61. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery.json +1 -1
  62. package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_en.json +1 -1
  63. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
  64. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
  65. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
  66. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
  67. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
  68. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
  69. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
  70. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
  71. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
  72. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
  73. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
  74. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
  75. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
  76. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
  77. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
  78. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
  79. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
  80. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
  81. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
  82. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
  83. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
  84. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nb.json +1 -1
  85. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
  86. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
  87. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
  88. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
  89. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
  90. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
  91. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
  92. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
  93. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
  94. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
  95. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
  96. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
  97. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
  98. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
  99. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
  100. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
  101. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
  102. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  103. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  104. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  105. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  106. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  107. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  108. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  109. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  110. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  111. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  112. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  113. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  114. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  115. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  116. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  117. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  118. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  119. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  120. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  121. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  122. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  123. package/assets/esri/widgets/Directions/t9n/Directions_nb.json +1 -1
  124. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  125. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  126. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  127. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  128. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  129. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  130. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  131. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  132. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  133. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  134. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  135. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  136. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  137. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  138. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  139. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  140. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  141. package/assets/esri/widgets/Feature/t9n/Feature_ar.json +1 -1
  142. package/assets/esri/widgets/Feature/t9n/Feature_bg.json +1 -1
  143. package/assets/esri/widgets/Feature/t9n/Feature_bs.json +1 -1
  144. package/assets/esri/widgets/Feature/t9n/Feature_ca.json +1 -1
  145. package/assets/esri/widgets/Feature/t9n/Feature_cs.json +1 -1
  146. package/assets/esri/widgets/Feature/t9n/Feature_da.json +1 -1
  147. package/assets/esri/widgets/Feature/t9n/Feature_de.json +1 -1
  148. package/assets/esri/widgets/Feature/t9n/Feature_el.json +1 -1
  149. package/assets/esri/widgets/Feature/t9n/Feature_es.json +1 -1
  150. package/assets/esri/widgets/Feature/t9n/Feature_et.json +1 -1
  151. package/assets/esri/widgets/Feature/t9n/Feature_fi.json +1 -1
  152. package/assets/esri/widgets/Feature/t9n/Feature_fr.json +1 -1
  153. package/assets/esri/widgets/Feature/t9n/Feature_he.json +1 -1
  154. package/assets/esri/widgets/Feature/t9n/Feature_hr.json +1 -1
  155. package/assets/esri/widgets/Feature/t9n/Feature_hu.json +1 -1
  156. package/assets/esri/widgets/Feature/t9n/Feature_id.json +1 -1
  157. package/assets/esri/widgets/Feature/t9n/Feature_it.json +1 -1
  158. package/assets/esri/widgets/Feature/t9n/Feature_ja.json +1 -1
  159. package/assets/esri/widgets/Feature/t9n/Feature_ko.json +1 -1
  160. package/assets/esri/widgets/Feature/t9n/Feature_lt.json +1 -1
  161. package/assets/esri/widgets/Feature/t9n/Feature_lv.json +1 -1
  162. package/assets/esri/widgets/Feature/t9n/Feature_nb.json +1 -1
  163. package/assets/esri/widgets/Feature/t9n/Feature_nl.json +1 -1
  164. package/assets/esri/widgets/Feature/t9n/Feature_pl.json +1 -1
  165. package/assets/esri/widgets/Feature/t9n/Feature_pt-BR.json +1 -1
  166. package/assets/esri/widgets/Feature/t9n/Feature_pt-PT.json +1 -1
  167. package/assets/esri/widgets/Feature/t9n/Feature_ro.json +1 -1
  168. package/assets/esri/widgets/Feature/t9n/Feature_ru.json +1 -1
  169. package/assets/esri/widgets/Feature/t9n/Feature_sk.json +1 -1
  170. package/assets/esri/widgets/Feature/t9n/Feature_sl.json +1 -1
  171. package/assets/esri/widgets/Feature/t9n/Feature_sr.json +1 -1
  172. package/assets/esri/widgets/Feature/t9n/Feature_sv.json +1 -1
  173. package/assets/esri/widgets/Feature/t9n/Feature_th.json +1 -1
  174. package/assets/esri/widgets/Feature/t9n/Feature_tr.json +1 -1
  175. package/assets/esri/widgets/Feature/t9n/Feature_uk.json +1 -1
  176. package/assets/esri/widgets/Feature/t9n/Feature_vi.json +1 -1
  177. package/assets/esri/widgets/Feature/t9n/Feature_zh-CN.json +1 -1
  178. package/assets/esri/widgets/Feature/t9n/Feature_zh-HK.json +1 -1
  179. package/assets/esri/widgets/Feature/t9n/Feature_zh-TW.json +1 -1
  180. package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
  181. package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
  182. package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
  183. package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
  184. package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
  185. package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
  186. package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
  187. package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
  188. package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
  189. package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
  190. package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
  191. package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
  192. package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
  193. package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
  194. package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
  195. package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
  196. package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
  197. package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
  198. package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
  199. package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
  200. package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
  201. package/assets/esri/widgets/LayerList/t9n/LayerList_nb.json +1 -1
  202. package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
  203. package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
  204. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
  205. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
  206. package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
  207. package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
  208. package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
  209. package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
  210. package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
  211. package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
  212. package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
  213. package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
  214. package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
  215. package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
  216. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
  217. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
  218. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
  219. package/assets/esri/widgets/Slice/t9n/Slice_ar.json +1 -1
  220. package/assets/esri/widgets/Slice/t9n/Slice_bg.json +1 -1
  221. package/assets/esri/widgets/Slice/t9n/Slice_bs.json +1 -1
  222. package/assets/esri/widgets/Slice/t9n/Slice_ca.json +1 -1
  223. package/assets/esri/widgets/Slice/t9n/Slice_cs.json +1 -1
  224. package/assets/esri/widgets/Slice/t9n/Slice_da.json +1 -1
  225. package/assets/esri/widgets/Slice/t9n/Slice_de.json +1 -1
  226. package/assets/esri/widgets/Slice/t9n/Slice_el.json +1 -1
  227. package/assets/esri/widgets/Slice/t9n/Slice_es.json +1 -1
  228. package/assets/esri/widgets/Slice/t9n/Slice_et.json +1 -1
  229. package/assets/esri/widgets/Slice/t9n/Slice_fi.json +1 -1
  230. package/assets/esri/widgets/Slice/t9n/Slice_fr.json +1 -1
  231. package/assets/esri/widgets/Slice/t9n/Slice_he.json +1 -1
  232. package/assets/esri/widgets/Slice/t9n/Slice_hr.json +1 -1
  233. package/assets/esri/widgets/Slice/t9n/Slice_hu.json +1 -1
  234. package/assets/esri/widgets/Slice/t9n/Slice_id.json +1 -1
  235. package/assets/esri/widgets/Slice/t9n/Slice_it.json +1 -1
  236. package/assets/esri/widgets/Slice/t9n/Slice_ja.json +1 -1
  237. package/assets/esri/widgets/Slice/t9n/Slice_ko.json +1 -1
  238. package/assets/esri/widgets/Slice/t9n/Slice_lt.json +1 -1
  239. package/assets/esri/widgets/Slice/t9n/Slice_lv.json +1 -1
  240. package/assets/esri/widgets/Slice/t9n/Slice_nb.json +1 -1
  241. package/assets/esri/widgets/Slice/t9n/Slice_nl.json +1 -1
  242. package/assets/esri/widgets/Slice/t9n/Slice_pl.json +1 -1
  243. package/assets/esri/widgets/Slice/t9n/Slice_pt-BR.json +1 -1
  244. package/assets/esri/widgets/Slice/t9n/Slice_pt-PT.json +1 -1
  245. package/assets/esri/widgets/Slice/t9n/Slice_ro.json +1 -1
  246. package/assets/esri/widgets/Slice/t9n/Slice_ru.json +1 -1
  247. package/assets/esri/widgets/Slice/t9n/Slice_sk.json +1 -1
  248. package/assets/esri/widgets/Slice/t9n/Slice_sl.json +1 -1
  249. package/assets/esri/widgets/Slice/t9n/Slice_sr.json +1 -1
  250. package/assets/esri/widgets/Slice/t9n/Slice_sv.json +1 -1
  251. package/assets/esri/widgets/Slice/t9n/Slice_th.json +1 -1
  252. package/assets/esri/widgets/Slice/t9n/Slice_tr.json +1 -1
  253. package/assets/esri/widgets/Slice/t9n/Slice_uk.json +1 -1
  254. package/assets/esri/widgets/Slice/t9n/Slice_vi.json +1 -1
  255. package/assets/esri/widgets/Slice/t9n/Slice_zh-CN.json +1 -1
  256. package/assets/esri/widgets/Slice/t9n/Slice_zh-HK.json +1 -1
  257. package/assets/esri/widgets/Slice/t9n/Slice_zh-TW.json +1 -1
  258. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ar.json +1 -1
  259. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bg.json +1 -1
  260. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_bs.json +1 -1
  261. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ca.json +1 -1
  262. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_cs.json +1 -1
  263. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_da.json +1 -1
  264. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_de.json +1 -1
  265. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_el.json +1 -1
  266. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_es.json +1 -1
  267. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_et.json +1 -1
  268. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fi.json +1 -1
  269. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_fr.json +1 -1
  270. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_he.json +1 -1
  271. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hr.json +1 -1
  272. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_hu.json +1 -1
  273. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_id.json +1 -1
  274. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_it.json +1 -1
  275. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ja.json +1 -1
  276. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ko.json +1 -1
  277. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lt.json +1 -1
  278. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_lv.json +1 -1
  279. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nb.json +1 -1
  280. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_nl.json +1 -1
  281. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pl.json +1 -1
  282. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-BR.json +1 -1
  283. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_pt-PT.json +1 -1
  284. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ro.json +1 -1
  285. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_ru.json +1 -1
  286. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sk.json +1 -1
  287. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sl.json +1 -1
  288. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sr.json +1 -1
  289. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_sv.json +1 -1
  290. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_th.json +1 -1
  291. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_tr.json +1 -1
  292. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_uk.json +1 -1
  293. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_vi.json +1 -1
  294. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-CN.json +1 -1
  295. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-HK.json +1 -1
  296. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_zh-TW.json +1 -1
  297. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ar.json +1 -1
  298. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_bg.json +1 -1
  299. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_bs.json +1 -1
  300. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ca.json +1 -1
  301. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_cs.json +1 -1
  302. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_da.json +1 -1
  303. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_de.json +1 -1
  304. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_el.json +1 -1
  305. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_es.json +1 -1
  306. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_et.json +1 -1
  307. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_fi.json +1 -1
  308. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_fr.json +1 -1
  309. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_he.json +1 -1
  310. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_hr.json +1 -1
  311. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_hu.json +1 -1
  312. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_id.json +1 -1
  313. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_it.json +1 -1
  314. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ja.json +1 -1
  315. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ko.json +1 -1
  316. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_lt.json +1 -1
  317. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_lv.json +1 -1
  318. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_nb.json +1 -1
  319. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_nl.json +1 -1
  320. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_pl.json +1 -1
  321. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_pt-BR.json +1 -1
  322. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_pt-PT.json +1 -1
  323. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ro.json +1 -1
  324. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_ru.json +1 -1
  325. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_sk.json +1 -1
  326. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_sl.json +1 -1
  327. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_sr.json +1 -1
  328. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_sv.json +1 -1
  329. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_th.json +1 -1
  330. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_tr.json +1 -1
  331. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_uk.json +1 -1
  332. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_vi.json +1 -1
  333. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_zh-CN.json +1 -1
  334. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_zh-HK.json +1 -1
  335. package/assets/esri/widgets/support/SnappingControls/t9n/SnappingControls_zh-TW.json +1 -1
  336. package/chunks/languageUtils.js +1 -1
  337. package/core/ReactiveMap.js +5 -0
  338. package/core/ReactiveSet.js +5 -0
  339. package/geometry/support/meshUtils/External.js +1 -1
  340. package/interfaces.d.ts +86 -54
  341. package/layers/SceneLayer.js +1 -1
  342. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  343. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  344. package/layers/video/VideoEngine.js +1 -1
  345. package/package.json +2 -2
  346. package/support/basemapUtils.js +1 -1
  347. package/support/revision.js +1 -1
  348. package/symbols/cim/cimAnalyzer.js +1 -1
  349. package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
  350. package/views/2d/engine/webgl/brushes/WGLGeometryBrushFill.js +1 -1
  351. package/views/2d/engine/webgl/definitions.js +1 -1
  352. package/views/2d/engine/webgl/mesh/templates/WGLDynamicFillTemplate.js +1 -1
  353. package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
  354. package/views/2d/engine/webgl/painter/RenderPass.js +1 -1
  355. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  356. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  357. package/views/2d/layers/MediaLayerView2D.js +1 -1
  358. package/views/2d/layers/TileLayerView2D.js +1 -1
  359. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  360. package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
  361. package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
  362. package/views/PopupView.js +1 -1
  363. package/widgets/BasemapGallery/css.js +1 -1
  364. package/widgets/BasemapGallery.js +1 -1
  365. package/widgets/Feature/FeatureRelationship.js +1 -1
  366. package/widgets/Features/FeaturesViewModel.js +5 -0
  367. package/widgets/Features.js +5 -0
  368. package/widgets/Popup/actionUtils.js +1 -1
  369. package/widgets/Popup/actions.js +1 -1
  370. package/widgets/Popup.js +1 -1
  371. package/assets/esri/core/workers/chunks/08e1453cc3689a0094a6.js +0 -1
  372. package/assets/esri/core/workers/chunks/47f721daa1652124c066.js +0 -1
  373. package/assets/esri/core/workers/chunks/544dce9710638d126763.js +0 -1
  374. package/assets/esri/core/workers/chunks/630b3fca46208caf4190.js +0 -1
  375. package/assets/esri/core/workers/chunks/7e9b173a71beeba8b263.js +0 -1
  376. package/assets/esri/core/workers/chunks/b636581516f2e7342d29.js +0 -1
  377. package/assets/esri/core/workers/chunks/e7e7f6046cf1286365ca.js +0 -1
  378. package/assets/esri/core/workers/chunks/f17a7024dd49abeaa4f3.js +0 -1
  379. package/assets/esri/core/workers/chunks/f32836ee63bc55ea4338.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.27.0-next.20230515",
3
+ "version": "4.27.0-next.20230516",
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": [
@@ -29,7 +29,7 @@
29
29
  "@esri/calcite-colors": "~6.1.0",
30
30
  "@esri/calcite-components": "^1.3.1",
31
31
  "@popperjs/core": "~2.11.7",
32
- "focus-trap": "~7.4.0",
32
+ "focus-trap": "~7.4.1",
33
33
  "luxon": "~3.3.0",
34
34
  "sortablejs": "~1.15.0"
35
35
  },
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../Basemap.js";import r from"../config.js";import n from"../core/Collection.js";import a from"../core/Logger.js";import{Url as t,makeAbsolute as l,normalize as i}from"../core/urlUtils.js";import{ensureType as s}from"../core/accessorSupport/ensureType.js";import{esriBasemapDefinitions as u}from"./basemapDefinitions.js";const c=a.getLogger("esri.support.basemapUtils");function o(){return{}}function f(e){for(const r in e){const n=e[r];!1===n?.destroyed&&n.destroy(),delete e[r]}}function p(n,a){let t;if("string"==typeof n){if(!(n in u)){const e=Object.entries(u).filter((([e,n])=>r.apiKey&&!n.classic||!r.apiKey&&n.classic&&!n.deprecated)).map((([e])=>`"${e}"`)).join(", ");return c.warn(`Unable to find basemap definition for: ${n}. Try one of these: ${e}`),null}a&&(t=a[n]),t||(t=e.fromId(n),a&&(a[n]=t))}else t=s(e,n);return t?.destroyed&&(c.warn("The provided basemap is already destroyed",{basemap:t}),t=null),t}function y(e,r=null){const n=p(e);if(!n)return null;const a=n.clone();return r&&(a.baseLayers=g(a.baseLayers,r.baseLayers),a.referenceLayers=g(a.referenceLayers,r.referenceLayers)),a}let m;function d(e){if(m)return m(e);let r=null;const n=T(e),a=!n?.baseLayers.length;for(const t in u){const e=M(n,x(u[t]),{mustMatchReferences:a});if("equal"===e){r=t;break}"base-layers-equal"===e&&(r=t)}return r}function b(e){m=e}function L(e,r){if(e===r)return!0;return"equal"===M(T(e),T(r),{mustMatchReferences:!0})}function g(e,r){const a=new n;return e.forEach((e=>{const n=r.find((r=>$(w(e),w(r))))||e;a.includes(n)?a.push(e):a.push(n)})),a}function v(e){return!!e?.baseLayers.concat(e.referenceLayers).some(S)}function S(e){if(I(e.url))return!0;if("vector-tile"===e.type)for(const r in e.sourceNameToSource){const n=e.sourceNameToSource[r];if(I(n?.sourceUrl))return!0}return!1}function h(e,r){if(null==r||null==e)return{spatialReference:null,updating:!1};if("not-loaded"===r.loadStatus)return r.load(),{spatialReference:null,updating:!0};if(r.spatialReference)return{spatialReference:r.spatialReference,updating:!1};if(0===r.baseLayers.length)return{spatialReference:null,updating:!1};const n=r.baseLayers.getItemAt(0);switch(n.loadStatus){case"not-loaded":n.load();case"loading":return{spatialReference:null,updating:!0};case"failed":return{spatialReference:null,updating:!1}}const a=(("supportedSpatialReferences"in n?n.supportedSpatialReferences:null)||["tileInfo"in n?n.tileInfo?.spatialReference:n.spatialReference]).filter(Boolean),t=e.spatialReference;return t?{spatialReference:a.find((e=>t.equals(e)))??a[0]??null,updating:!1}:{spatialReference:a[0],updating:!1}}const R=/^(basemaps|ibasemaps).*-api\.arcgis\.com$/i;function I(e){if(!e)return!1;const r=new t(l(e));return!!r.authority&&R.test(r.authority)}function T(e){return e?!e.loaded&&e.resourceInfo?x(e.resourceInfo.data):{baseLayers:q(e.baseLayers),referenceLayers:q(e.referenceLayers)}:null}function q(e){return(n.isCollection(e)?e.toArray():e).map(w)}function w(e){return{type:e.type,url:A("urlTemplate"in e&&e.urlTemplate||e.url||"styleUrl"in e&&e.styleUrl||""),minScale:"minScale"in e&&null!=e.minScale?e.minScale:0,maxScale:"maxScale"in e&&null!=e.maxScale?e.maxScale:0,opacity:null!=e.opacity?e.opacity:1,visible:null==e.visible||!!e.visible,sublayers:"map-image"!==e.type&&"wms"!==e.type||null==e.sublayers?void 0:e.sublayers?.map((e=>({id:e.id,visible:e.visible}))),activeLayerId:"wmts"===e.type?e.activeLayer?.id:void 0}}function x(e){return e?{baseLayers:j((e.baseMapLayers??[]).filter((e=>!e.isReference))),referenceLayers:j((e.baseMapLayers??[]).filter((e=>e.isReference)))}:null}function j(e){return e.map((e=>U(e)))}function U(e){let r;switch(e.layerType){case"VectorTileLayer":r="vector-tile";break;case"ArcGISTiledMapServiceLayer":r="tile";break;default:r="unknown"}return{type:r,url:A(e.templateUrl||e.urlTemplate||e.styleUrl||e.url),minScale:null!=e.minScale?e.minScale:0,maxScale:null!=e.maxScale?e.maxScale:0,opacity:null!=e.opacity?e.opacity:1,visible:null==e.visibility||!!e.visibility,sublayers:void 0,activeLayerId:void 0}}function M(e,r,n){if(null!=e!=(null!=r))return"not-equal";if(!e||!r)return"equal";if(!k(e.baseLayers,r.baseLayers))return"not-equal";return k(e.referenceLayers,r.referenceLayers)?"equal":n.mustMatchReferences?"not-equal":"base-layers-equal"}function k(e,r){if(e.length!==r.length)return!1;for(let n=0;n<e.length;n++)if(!$(e[n],r[n]))return!1;return!0}function $(e,r){if(e.type!==r.type||"scene"===e.type||e.url!==r.url||e.minScale!==r.minScale||e.maxScale!==r.maxScale||e.visible!==r.visible||e.opacity!==r.opacity)return!1;if(null!=e.activeLayerId||null!=r.activeLayerId)return e.activeLayerId===r.activeLayerId;if(null!=e.sublayers||null!=r.sublayers){if(null==e.sublayers||null==r.sublayers||e.sublayers.length!==r.sublayers.length)return!1;for(let n=0;n<e.sublayers.length;n++){const a=e.sublayers.at(n),t=r.sublayers.at(n);if(a?.id!==t?.id||a?.visible!==t?.visible)return!1}}return!0}function A(e){return e?i(e).replace(/^\s*https?:/i,"").toLowerCase():""}export{y as clonePreservingTiledLayers,L as contentEquals,o as createCache,f as destroyCache,p as ensureType,h as findSpatialReference,d as getWellKnownBasemapId,v as hasDeveloperBasemapLayer,S as isDeveloperBasemapLayer,b as overrideGetWellKnownBasemapId};
5
+ import e from"../Basemap.js";import r from"../config.js";import n from"../core/Collection.js";import t from"../core/Logger.js";import{Url as a,makeAbsolute as l,normalize as i}from"../core/urlUtils.js";import{ensureType as s}from"../core/accessorSupport/ensureType.js";import{esriBasemapDefinitions as u}from"./basemapDefinitions.js";const c=t.getLogger("esri.support.basemapUtils");function o(){return{}}function f(e){for(const r in e){const n=e[r];!1===n?.destroyed&&n.destroy(),delete e[r]}}function p(n,t){let a;if("string"==typeof n){if(!(n in u)){const e=Object.entries(u).filter((([e,n])=>r.apiKey&&!n.classic||!r.apiKey&&n.classic&&!n.deprecated)).map((([e])=>`"${e}"`)).join(", ");return c.warn(`Unable to find basemap definition for: ${n}. Try one of these: ${e}`),null}t&&(a=t[n]),a||(a=e.fromId(n),t&&(t[n]=a))}else a=s(e,n);return a?.destroyed&&(c.warn("The provided basemap is already destroyed",{basemap:a}),a=null),a}function y(e){return"Web Scene"===e.portalItem?.type}function m(e,r=null){const n=p(e);if(!n)return null;const t=n.clone();return r&&(t.baseLayers=g(t.baseLayers,r.baseLayers),t.referenceLayers=g(t.referenceLayers,r.referenceLayers)),t}let d;function b(e){if(d)return d(e);let r=null;const n=q(e),t=!n?.baseLayers.length;for(const a in u){const e=k(n,j(u[a]),{mustMatchReferences:t});if("equal"===e){r=a;break}"base-layers-equal"===e&&(r=a)}return r}function L(e){d=e}function S(e,r){if(e===r)return!0;return"equal"===k(q(e),q(r),{mustMatchReferences:!0})}function g(e,r){const t=new n;return e.forEach((e=>{const n=r.find((r=>A(x(e),x(r))))||e;t.includes(n)?t.push(e):t.push(n)})),t}function v(e){return!!e?.baseLayers.concat(e.referenceLayers).some(h)}function h(e){if(T(e.url))return!0;if("vector-tile"===e.type)for(const r in e.sourceNameToSource){const n=e.sourceNameToSource[r];if(T(n?.sourceUrl))return!0}return!1}function R(e,r){if(null==r||null==e)return{spatialReference:null,updating:!1};if("not-loaded"===r.loadStatus)return r.load(),{spatialReference:null,updating:!0};if(r.spatialReference)return{spatialReference:r.spatialReference,updating:!1};if(0===r.baseLayers.length)return{spatialReference:null,updating:!1};const n=r.baseLayers.getItemAt(0);switch(n.loadStatus){case"not-loaded":n.load();case"loading":return{spatialReference:null,updating:!0};case"failed":return{spatialReference:null,updating:!1}}const t=(("supportedSpatialReferences"in n?n.supportedSpatialReferences:null)||["tileInfo"in n?n.tileInfo?.spatialReference:n.spatialReference]).filter(Boolean),a=e.spatialReference;return a?{spatialReference:t.find((e=>a.equals(e)))??t[0]??null,updating:!1}:{spatialReference:t[0],updating:!1}}const I=/^(basemaps|ibasemaps).*-api\.arcgis\.com$/i;function T(e){if(!e)return!1;const r=new a(l(e));return!!r.authority&&I.test(r.authority)}function q(e){return e?!e.loaded&&e.resourceInfo?j(e.resourceInfo.data):{baseLayers:w(e.baseLayers),referenceLayers:w(e.referenceLayers)}:null}function w(e){return(n.isCollection(e)?e.toArray():e).map(x)}function x(e){return{type:e.type,url:C("urlTemplate"in e&&e.urlTemplate||e.url||"styleUrl"in e&&e.styleUrl||""),minScale:"minScale"in e&&null!=e.minScale?e.minScale:0,maxScale:"maxScale"in e&&null!=e.maxScale?e.maxScale:0,opacity:null!=e.opacity?e.opacity:1,visible:null==e.visible||!!e.visible,sublayers:"map-image"!==e.type&&"wms"!==e.type||null==e.sublayers?void 0:e.sublayers?.map((e=>({id:e.id,visible:e.visible}))),activeLayerId:"wmts"===e.type?e.activeLayer?.id:void 0}}function j(e){return e?{baseLayers:U((e.baseMapLayers??[]).filter((e=>!e.isReference))),referenceLayers:U((e.baseMapLayers??[]).filter((e=>e.isReference)))}:null}function U(e){return e.map((e=>M(e)))}function M(e){let r;switch(e.layerType){case"VectorTileLayer":r="vector-tile";break;case"ArcGISTiledMapServiceLayer":r="tile";break;default:r="unknown"}return{type:r,url:C(e.templateUrl||e.urlTemplate||e.styleUrl||e.url),minScale:null!=e.minScale?e.minScale:0,maxScale:null!=e.maxScale?e.maxScale:0,opacity:null!=e.opacity?e.opacity:1,visible:null==e.visibility||!!e.visibility,sublayers:void 0,activeLayerId:void 0}}function k(e,r,n){if(null!=e!=(null!=r))return"not-equal";if(!e||!r)return"equal";if(!$(e.baseLayers,r.baseLayers))return"not-equal";return $(e.referenceLayers,r.referenceLayers)?"equal":n.mustMatchReferences?"not-equal":"base-layers-equal"}function $(e,r){if(e.length!==r.length)return!1;for(let n=0;n<e.length;n++)if(!A(e[n],r[n]))return!1;return!0}function A(e,r){if(e.type!==r.type||"scene"===e.type||e.url!==r.url||e.minScale!==r.minScale||e.maxScale!==r.maxScale||e.visible!==r.visible||e.opacity!==r.opacity)return!1;if(null!=e.activeLayerId||null!=r.activeLayerId)return e.activeLayerId===r.activeLayerId;if(null!=e.sublayers||null!=r.sublayers){if(null==e.sublayers||null==r.sublayers||e.sublayers.length!==r.sublayers.length)return!1;for(let n=0;n<e.sublayers.length;n++){const t=e.sublayers.at(n),a=r.sublayers.at(n);if(t?.id!==a?.id||t?.visible!==a?.visible)return!1}}return!0}function C(e){return e?i(e).replace(/^\s*https?:/i,"").toLowerCase():""}export{m as clonePreservingTiledLayers,S as contentEquals,o as createCache,f as destroyCache,p as ensureType,R as findSpatialReference,b as getWellKnownBasemapId,v as hasDeveloperBasemapLayer,y as isBasemap3D,h as isDeveloperBasemapLayer,L as overrideGetWellKnownBasemapId};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- const d="20230515",c="bdc1388d92624441081851986bd2ad63667ecef5";export{d as buildDate,c as commitHash};
5
+ const a="20230516",d="48b057d01a26a2a3f3b53c060b0d467d129add4a";export{a as buildDate,d as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../Color.js";import{getFontFamily as t}from"../../core/fontUtils.js";import{clone as i}from"../../core/lang.js";import r from"../../core/Logger.js";import{pt2px as o,px2pt as n}from"../../core/screenUtils.js";import{numericHash as a}from"../../core/string.js";import{createRendererExpression as s,ArcadeExpression as l}from"../../support/arcadeOnDemand.js";import{DEFAULT_PICTURE_FILL_HEIGHT as c,DEFAULT_HATCH_FILL_SEPARATION as m,DEFAULT_STROKE_WIDTH as f,DEFAULT_MARKER_SIZE as h,DEFAULT_TEXT_HEIGHT as p}from"./CIMSymbolDrawHelper.js";import{CIMSymbolHelper as u,OverrideHelper as y}from"./CIMSymbolHelper.js";import{Alignment as d,CapType as v,JoinType as _}from"./enums.js";import{quantizeIfNeeded as O}from"./quantizeTime.js";import{getExtent as S,getSDFMetrics as g}from"./SDFHelper.js";import{fromCIMColor as M,getTintColor as N,getValue as b,getFillColor as k,getStrokeColor as P,getStrokeWidth as z,fromCIMFontDecoration as C,fromCIMFontStyle as F,adjustTextCase as L,createLabelOverrideFunction as I,evaluateValueOrFunction as w,fromCIMHorizontalAlignment as x,fromCIMVerticalAlignment as A,isFeatureValueFn as R}from"./utils.js";import{CIMEffectHelper as X}from"./effects/CIMEffectHelper.js";import H from"../../views/2d/arcade/callExpressionWithFeature.js";import{RANDOM_INSIDE_POLYGON_TEXTURE_SIZE as J}from"../../views/2d/engine/webgl/definitions.js";import{getMaterialGroup as Y}from"../../views/2d/engine/webgl/grouping.js";const T=r.getLogger("esri.symbols.cim.cimAnalyzer");function E(e){switch(e){case"Butt":return v.BUTT;case"Square":return v.SQUARE;default:return v.ROUND}}function $(e){switch(e){case"Bevel":return _.BEVEL;case"Miter":return _.MITER;default:return _.ROUND}}function G(e){const t=e.markerPlacement;return t&&t.angleToLine?d.MAP:d.SCREEN}class j{constructor(e,t){this._cimLayers=[],this._poMap={},this._primitiveOverrides=[],this._resourceManager=e,this._info=t}async analyzeSymbolReference(e,t,i){if(this._cimLayers=i??[],!e)return this._cimLayers;if(e.primitiveOverrides){this._primitiveOverrides=e.primitiveOverrides,this._poMap={};const t=[],i=this._info;for(const e of this._primitiveOverrides){const r=e.valueExpressionInfo;if(r&&i){const o=r.expression,n=s(o,i.spatialReference,i.fields).then((t=>{null!=t&&this._setPoMap(e.primitiveName,e.propertyName,t)}));t.push(n)}else null!=e.value&&this._setPoMap(e.primitiveName,e.propertyName,e.value);t.length>0&&await Promise.all(t)}}const r=e.symbol,o=[];return u.fetchResources(r,this._resourceManager,o),o.length>0&&await Promise.all(o),this._analyzeSymbol(r,t),this._cimLayers}_analyzeSymbol(e,t){switch(e?.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this._analyzeMultiLayerSymbol(e,t,1,0,0,0)}}_analyzeMultiLayerSymbol(e,t,i,r,o,n){const a=e?.symbolLayers;if(!a)return;const s=e.effects;let l=d.SCREEN;const c=u.getSize(e)??0;"CIMPointSymbol"===e.type&&"Map"===e.angleAlignment&&(l=d.MAP);const m="CIMPolygonSymbol"===e.type;let f=a.length;for(;f--;){const h=a[f];if(!h||!1===h.enable)continue;let p;s&&s.length&&(p=[...s]);const u=h.effects;u&&u.length&&(s?p.push(...u):p=[...u]);const d=[];let v;y.findEffectOverrides(p,this._primitiveOverrides,d),v=d.length>0?this._createEffectsOverrideFunction(p,d):p;const _=[];switch(y.findApplicableOverrides(h,this._primitiveOverrides,_),h.type){case"CIMSolidFill":this._analyzeSolidFill(h,v);break;case"CIMPictureFill":this._analyzePictureFill(h,v);break;case"CIMHatchFill":this._analyzeHatchFill(h,v);break;case"CIMGradientFill":this._analyzeGradientFill(h,v);break;case"CIMSolidStroke":this._analyzeSolidStroke(h,v,m,c);break;case"CIMPictureStroke":this._analyzePictureStroke(h,v,m,c);break;case"CIMGradientStroke":this._analyzeGradientStroke(h,v,m,c);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":{"CIMLineSymbol"===e.type&&(l=G(h));const a=[],s=h.primitiveName;s&&a.push(s),this._analyzeMarker(h,v,null,a,l,c,1,t,i,r,o,n);break}default:T.error("Cannot analyze CIM layer",h.type)}}}_analyzeSolidFill(e,t){const i=e.primitiveName,r=M(e.color),[o,n]=this._analyzePrimitiveOverrides(i,t,null,null),s=a(JSON.stringify(e)+n).toString();this._cimLayers.push({type:"fill",templateHash:s,materialHash:o?()=>s:s,cim:e,materialOverrides:null,colorLocked:!!e.colorLocked,color:this._createOverrideFunction(i,"Color",r,U),height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,effects:t,applyRandomOffset:!1,sampleAlphaOnly:!0})}_analyzePictureFill(e,t){const i=e.primitiveName,r=N(e),[o,n]=this._analyzePrimitiveOverrides(i,t,null,null),s=a(JSON.stringify(e)+n).toString(),l=a(`${e.url}${JSON.stringify(e.colorSubstitutions)}`).toString(),m=b(e.height,c);let f=b(e.scaleX,1);if("width"in e&&"number"==typeof e.width){const t=e.width;let i=1;const r=this._resourceManager.getResource(e.url);null!=r&&(i=r.width/r.height),f/=i*(m/t)}this._cimLayers.push({type:"fill",templateHash:s,materialHash:o?()=>l:l,cim:e,materialOverrides:null,colorLocked:!!e.colorLocked,effects:t,color:this._createOverrideFunction(i,"TintColor",r,U),height:this._createOverrideFunction(i,"Height",m),scaleX:this._createOverrideFunction(i,"ScaleX",f),angle:this._createOverrideFunction(i,"Rotation",b(e.rotation)),offsetX:this._createOverrideFunction(i,"OffsetX",b(e.offsetX)),offsetY:this._createOverrideFunction(i,"OffsetY",b(e.offsetY)),url:e.url,applyRandomOffset:!1,sampleAlphaOnly:!1})}_analyzeHatchFill(e,t){const i=e.primitiveName,r=this._analyzeMaterialOverrides(i,["Rotation","OffsetX","OffsetY"]);let[o,n]=this._analyzePrimitiveOverrides(i,t,null,null);const s=a(JSON.stringify(e)+n).toString(),l=a(`${e.separation}${JSON.stringify(e.lineSymbol)}`).toString();let c={r:255,g:255,b:255,a:1},f=!1;const h=e.lineSymbol?.symbolLayers?.find((e=>"CIMSolidStroke"===e.type&&null!=this._poMap[e.primitiveName]?.Color));if(h){c=M(h.color),c=this._createOverrideFunction(h.primitiveName,"Color",c,U);const e="function"==typeof c;o=o||e,f=null!=h.color||e}this._cimLayers.push({type:"fill",templateHash:s,materialHash:o&&r?this._createMaterialHashFunction(l,r):l,cim:e,materialOverrides:r,colorLocked:!!e.colorLocked,effects:t,color:c,height:this._createOverrideFunction(i,"Separation",b(e.separation,m)),scaleX:1,angle:this._createOverrideFunction(i,"Rotation",b(e.rotation)),offsetX:this._createOverrideFunction(i,"OffsetX",b(e.offsetX)),offsetY:this._createOverrideFunction(i,"OffsetY",b(e.offsetY)),applyRandomOffset:!1,sampleAlphaOnly:!0,hasUnresolvedReplacementColor:!f})}_analyzeGradientFill(e,t){const i=e.primitiveName,[r,o]=this._analyzePrimitiveOverrides(i,t,null,null),n=a(JSON.stringify(e)+o).toString();this._cimLayers.push({type:"fill",templateHash:n,materialHash:r?()=>n:n,cim:e,materialOverrides:null,colorLocked:!!e.colorLocked,effects:t,color:{r:128,g:128,b:128,a:1},height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,applyRandomOffset:!1,sampleAlphaOnly:!1})}_analyzeSolidStroke(e,t,i,r){const o=e.primitiveName,n=M(e.color),s=b(e.width,f),l=E(e.capStyle),c=$(e.joinStyle),m=e.miterLimit,[h,p]=this._analyzePrimitiveOverrides(o,t,null,null),u=a(JSON.stringify(e)+p).toString();let y,d;if(t&&t instanceof Array&&t.length>0){const e=t[t.length-1];if("CIMGeometricEffectDashes"===e.type&&"NoConstraint"===e.lineDashEnding&&null===e.offsetAlongLine){const e=(t=[...t]).pop();y=e.dashTemplate,d=e.scaleDash}}this._cimLayers.push({type:"line",templateHash:u,materialHash:h?()=>u:u,cim:e,materialOverrides:null,isOutline:i,colorLocked:!!e.colorLocked,effects:t,color:this._createOverrideFunction(o,"Color",n,U),width:this._createOverrideFunction(o,"Width",s),cap:this._createOverrideFunction(o,"CapStyle",l),join:this._createOverrideFunction(o,"JoinStyle",c),miterLimit:m&&this._createOverrideFunction(o,"MiterLimit",m),referenceWidth:r,zOrder:D(e.name),dashTemplate:y,scaleDash:d,sampleAlphaOnly:!0})}_analyzePictureStroke(e,t,i,r){const o=a(`${e.url}${JSON.stringify(e.colorSubstitutions)}`).toString(),n=e.primitiveName,s=N(e),l=b(e.width,f),c=E(e.capStyle),m=$(e.joinStyle),h=e.miterLimit,[p,u]=this._analyzePrimitiveOverrides(n,t,null,null),y=a(JSON.stringify(e)+u).toString();this._cimLayers.push({type:"line",templateHash:y,materialHash:p?()=>o:o,cim:e,materialOverrides:null,isOutline:i,colorLocked:!!e.colorLocked,effects:t,color:this._createOverrideFunction(n,"TintColor",s,U),width:this._createOverrideFunction(n,"Width",l),cap:this._createOverrideFunction(n,"CapStyle",c),join:this._createOverrideFunction(n,"JoinStyle",m),miterLimit:h&&this._createOverrideFunction(n,"MiterLimit",h),referenceWidth:r,zOrder:D(e.name),dashTemplate:null,scaleDash:!1,url:e.url,sampleAlphaOnly:!1})}_analyzeGradientStroke(e,t,i,r){const o=e.primitiveName,n=b(e.width,f),s=E(e.capStyle),l=$(e.joinStyle),c=e.miterLimit,[m,h]=this._analyzePrimitiveOverrides(o,t,null,null),p=a(JSON.stringify(e)+h).toString();this._cimLayers.push({type:"line",templateHash:p,materialHash:m?()=>p:p,cim:e,materialOverrides:null,isOutline:i,colorLocked:!!e.colorLocked,effects:t,color:{r:128,g:128,b:128,a:1},width:this._createOverrideFunction(o,"Width",n),cap:this._createOverrideFunction(o,"CapStyle",s),join:this._createOverrideFunction(o,"JoinStyle",l),miterLimit:c&&this._createOverrideFunction(o,"MiterLimit",c),referenceWidth:r,zOrder:D(e.name),dashTemplate:null,scaleDash:!1,sampleAlphaOnly:!1})}_analyzeMarker(e,t,i,r,o,n,a,s,l,c,m,f){if(this._analyzeMarkerInsidePolygon(e,t))return;const p=b(e.size,h),u=b(e.rotation),y=b(e.offsetX),d=b(e.offsetY);let v=this._createOverrideFunction(e.primitiveName,"Size",p),_=this._createOverrideFunction(e.primitiveName,"Rotation",u),O=this._createOverrideFunction(e.primitiveName,"OffsetX",y),S=this._createOverrideFunction(e.primitiveName,"OffsetY",d);v=this._transformSize(v,a),_=this._transformRotation(_,!!e.rotateClockwise,c);const g=this._transformOffsetX(O,S,c,a,m),M=this._transformOffsetY(O,S,c,a,f);switch(O=g,S=M,e.type){case"CIMPictureMarker":this._analyzePictureMarker(e,t,i,r,o,n,v,_,O,S);break;case"CIMVectorMarker":this._analyzeVectorMarker(e,t,i,r,o,n,a,s,v,_,O,S)}}_analyzeMarkerInsidePolygon(e,t){const{markerPlacement:i,type:r}=e;if(!i||"CIMMarkerPlacementInsidePolygon"!==i.type)return!1;if("CIMVectorMarker"===r||"CIMPictureMarker"===r){const o=e.primitiveName;if(o){const[e,i]=this._analyzePrimitiveOverrides([o],t,null,null);if(e)return!1}const n=i.primitiveName;if(n){const[e,i]=this._analyzePrimitiveOverrides([n],t,null,null);if(e)return!1}if("CIMVectorMarker"===r){const{markerGraphics:t}=e;if(t)for(const e of t){const{symbol:t}=e;if("CIMPolygonSymbol"===t?.type&&t.symbolLayers){const{symbolLayers:e}=t;for(const t of e)if("CIMSolidStroke"===t.type)return!1}}}else{const{animatedSymbolProperties:t}=e;if(t)return!1}}const o=i,s=Math.abs(o.stepX),l=Math.abs(o.stepY);if(0===s||0===l)return!0;const c=["Rotation","OffsetX","OffsetY"],m=this._primitiveOverrides.filter((t=>t.primitiveName!==e.primitiveName||!c.includes(t.propertyName))),f="url"in e&&"string"==typeof e.url?e.url:void 0,[h,p]=this._analyzePrimitiveOverrides(o.primitiveName,t,null,null),u=a(JSON.stringify(e)+p).toString();let y,d,v=null;if("Random"===i.gridType){const e=n(J),t=Math.max(Math.floor(e/s),1),i=Math.max(Math.floor(e/l),1);y=l*i,v=e=>e?e*i:0;d=t*s/y}else i.shiftOddRows?(y=2*l,v=e=>e?2*e:0,d=s/l*.5):(y=l,v=null,d=s/l);const _=N(e);return this._cimLayers.push({type:"fill",templateHash:u,materialHash:h?this._createMaterialHashFunction(u,m):u,cim:e,materialOverrides:m,colorLocked:!!e.colorLocked,effects:t,color:this._createOverrideFunction(o.primitiveName,"TintColor",_,U),height:this._createOverrideFunction(o.primitiveName,"StepY",y,v),scaleX:d,angle:this._createOverrideFunction(o.primitiveName,"GridAngle",o.gridAngle),offsetX:this._createOverrideFunction(o.primitiveName,"OffsetX",b(o.offsetX)),offsetY:this._createOverrideFunction(o.primitiveName,"OffsetY",b(o.offsetY)),url:f,applyRandomOffset:"Random"===i.gridType,sampleAlphaOnly:!f,hasUnresolvedReplacementColor:!0}),!0}_analyzePictureMarker(e,t,i,r,o,n,s,l,c,m){let f=b(e.scaleX,1);const h=N(e),p=a(`${e.url}${JSON.stringify(e.colorSubstitutions)}${JSON.stringify(e.animatedSymbolProperties)}`).toString();i||(i=this._createMarkerPlacementOverrideFunction(e.markerPlacement));const u=this._createAnimatedSymbolPropertiesOverrideFunction(e.animatedSymbolProperties),[y,d]=this._analyzePrimitiveOverrides(r,t,i,u),v=a(JSON.stringify(e)+d).toString(),_=e.anchorPoint??{x:0,y:0};if("width"in e&&"number"==typeof e.width){const t=e.width;let i=1;const r=this._resourceManager.getResource(e.url);null!=r&&(i=r.width/r.height);f/=i*(b(e.size)/t)}function O(e,t){return null!=u?w(u,e,t):null}const S=e.animatedSymbolProperties&&!0===e.animatedSymbolProperties.randomizeStartTime?(e,t,i,r)=>{const o=Y(r??0),n=O(e,t);return p+`-MATERIALGROUP(${o})`+`-ASP(${JSON.stringify(n)})`}:y?(e,t)=>{const i=O(e,t);return p+`-ASP(${JSON.stringify(i)})`}:p;this._cimLayers.push({type:"marker",templateHash:v,materialHash:S,cim:e,materialOverrides:null,colorLocked:!!e.colorLocked,effects:t,scaleSymbolsProportionally:!1,alignment:o,size:s,scaleX:this._createOverrideFunction(e.primitiveName,"ScaleX",f),rotation:l,offsetX:c,offsetY:m,color:this._createOverrideFunction(e.primitiveName,"TintColor",h,U),anchorPoint:{x:_.x,y:_.y},isAbsoluteAnchorPoint:"Relative"!==e.anchorPointUnits,outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,frameHeight:0,rotateClockwise:!1,referenceSize:n,sizeRatio:1,markerPlacement:i,url:e.url,animatedSymbolProperties:u})}_analyzeVectorMarker(e,t,i,r,o,n,a,s,l,c,m,f){const h=e.markerGraphics;if(!h)return;let p,u=0,y=1;e.scaleSymbolsProportionally&&(p=e.frame,p&&(u=p.ymax-p.ymin,y=this._transformSize(l,1/u))),y=this._transformSize(y,a),i||(i=this._createMarkerPlacementOverrideFunction(e.markerPlacement));for(const d of h)if(d){const a=d.symbol;if(!a)continue;const h=d.primitiveName;h&&r.push(h);let v=m,_=f;if(("CIMPointSymbol"===a.type||"CIMTextSymbol"===a.type)&&p){let t=0,i=0;const r=d.geometry;"x"in r&&"y"in r&&(t+=r.x-.5*(p.xmin+p.xmax),i+=r.y-.5*(p.ymin+p.ymax));const o=e.anchorPoint;o&&("Absolute"===e.anchorPointUnits?(t-=o.x,i-=o.y):p&&(t-=(p.xmax-p.xmin)*o.x,i-=(p.ymax-p.ymin)*o.y)),v=this._transformOffsetX(t,i,c,y,m),_=this._transformOffsetY(t,i,c,y,f)}switch(a.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":s?this._analyzeMultiLayerGraphicNonSDF(e,t,i,null,d,r,o,n,u):this._analyzeMultiLayerGraphic(e,t,i,null,d,r,o,n,u,y,l,c,v,_);break;case"CIMTextSymbol":this._analyzeTextGraphic(e,t,i,d,r,o,n,u,y,l,c,v,_)}h&&r.pop()}}_analyzeMultiLayerGraphic(e,t,i,r,o,n,s,l,c,m,f,h,p,u){const y=o.symbol,d=y.symbolLayers;if(!d)return;let v=d.length;if(B(d))return void this._analyzeCompositeMarkerGraphic(e,t,i,r,o,d,n,s,l,c,f,h,p,u);const _=this._resourceManager.geometryEngine,O=X.applyEffects(y.effects,o.geometry,_);if(O)for(;v--;){const y=d[v];if(!y||!1===y.enable)continue;const N=y.primitiveName;switch(N&&n.push(N),y.type){case"CIMSolidFill":case"CIMSolidStroke":{const m=X.applyEffects(y.effects,O,_),d=S(m);if(!d)continue;const v="Relative"!==e.anchorPointUnits,[b,C,F]=g(d,e.frame,e.size,e.anchorPoint,v),L="CIMSolidFill"===y.type,I={type:"sdf",geom:m,asFill:L},w=y.path,x=M(L?k(y):P(y)),A=L?{r:0,g:0,b:0,a:0}:M(P(y)),H=z(y)??0;if(!L&&!H)break;let J=!1,Y="";for(const e of this._primitiveOverrides)n.includes(e.primitiveName)&&(null!=e.value?Y+=`-${e.primitiveName}-${e.propertyName}-${JSON.stringify(e.value)}`:e.valueExpressionInfo&&(J=!0));(null!=t&&"function"==typeof t||null!=i&&"function"==typeof i)&&(J=!0),(R(f)||R(h)||R(p)||R(u))&&(J=!0);const T=JSON.stringify({...e,markerGraphics:null}),E=a(JSON.stringify(I)+w).toString(),$=a(JSON.stringify(o)+JSON.stringify(y)+T+Y).toString();this._cimLayers.push({type:"marker",templateHash:$,materialHash:J?()=>E:E,cim:I,materialOverrides:null,colorLocked:!!e.colorLocked,effects:t,scaleSymbolsProportionally:!!e.scaleSymbolsProportionally,alignment:s,anchorPoint:{x:C,y:F},isAbsoluteAnchorPoint:v,size:f,rotation:h,offsetX:p,offsetY:u,scaleX:1,frameHeight:c,rotateClockwise:!1,referenceSize:l,sizeRatio:b,color:this._createOverrideFunction(N,"Color",x,U),outlineColor:this._createOverrideFunction(N,"Color",A,U),outlineWidth:this._createOverrideFunction(N,"Width",H),markerPlacement:i,animatedSymbolProperties:r,path:w});break}case"CIMVectorMarker":y.markerPlacement?this._analyzeMultiLayerGraphicNonSDF(e,t,i,r,o,n,s,l,c):this._analyzeMarker(y,t,i,n,s,l,m,!1,f,h,p,u);break;default:this._analyzeMultiLayerGraphicNonSDF(e,t,i,r,o,n,s,l,c)}N&&n.pop()}}_analyzeTextGraphic(e,i,r,o,n,s,l,c,m,h,u,d,v){const _=[];y.findApplicableOverrides(o,this._primitiveOverrides,_);const O=o.geometry;if(!("x"in O)||!("y"in O))return;const S=o.symbol,g=C(S),N=F(S.fontStyleName),R=t(S.fontFamilyName);S.font={family:R,decoration:g,...N};let X=b(S.height,p),H=b(S.angle),J=b(S.offsetX),Y=b(S.offsetY);X=this._transformSize(X,m),H=this._transformRotation(H,!1,u);const T=this._transformOffsetX(J,Y,u,m,d),E=this._transformOffsetY(J,Y,u,m,v);J=T,Y=E;const $=M(k(S));let G=M(P(S)),j=z(S)??0;j||(G=M(k(S.haloSymbol)),j=b(S.haloSize)),j=this._transformSize(j,m);let D=null,U=null,W=0;if(S.callout&&"CIMBackgroundCallout"===S.callout.type){const e=S.callout;if(e.backgroundSymbol){const t=e.backgroundSymbol.symbolLayers;if(t)for(const e of t)"CIMSolidFill"===e.type?D=M(e.color):"CIMSolidStroke"===e.type&&(U=M(e.color),W=b(e.width,f))}}const[V,B]=this._analyzePrimitiveOverrides(n,i,r,null),q=JSON.stringify(e.effects)+Number(e.colorLocked).toString()+JSON.stringify(e.anchorPoint)+e.anchorPointUnits+JSON.stringify(e.markerPlacement)+e.size.toString(),K=a(JSON.stringify(o)+q+B).toString();let Q=this._createOverrideFunction(o.primitiveName,"TextString",o.textString??"",L,S.textCase);if(null==Q)return;const{fontStyleName:Z}=S,ee=R+(Z?"-"+Z.toLowerCase():"-regular"),te=ee;"string"==typeof Q&&Q.includes("[")&&S.fieldMap&&(Q=I(S.fieldMap,Q,S.textCase)),this._cimLayers.push({type:"text",templateHash:K,materialHash:V||"function"==typeof Q||/\[(.*?)\]/.test(Q)?(e,t,i)=>te+"-"+w(Q,e,t,i):te+"-"+a(Q),cim:S,materialOverrides:null,colorLocked:!!e.colorLocked,effects:i,alignment:s,anchorPoint:{x:0,y:0},isAbsoluteAnchorPoint:"Relative"!==e.anchorPointUnits,fontName:ee,decoration:g,weight:N.weight,style:N.style,size:X,angle:H,offsetX:J,offsetY:Y,horizontalAlignment:x(S.horizontalAlignment),verticalAlignment:A(S.verticalAlignment),text:Q,color:$,outlineColor:G,outlineSize:j,backgroundColor:D,borderLineColor:U,borderLineWidth:W,referenceSize:l,sizeRatio:1,markerPlacement:r})}_analyzeMultiLayerGraphicNonSDF(e,t,i,r,n,s,l,c,m){const f=this._buildSimpleMarker(e,n),p=e.primitiveName,y=this._analyzeMaterialOverrides(p,["Rotation","OffsetX","OffsetY"]),[d,v]=this._analyzePrimitiveOverrides(s,null,null,null),[_,O,S]=u.getTextureAnchor(f,this._resourceManager),g=b(e.rotation),M=b(e.offsetX),N=b(e.offsetY),k=a(JSON.stringify(f)+v).toString(),P=y&&y.length>0||null!=t&&"function"==typeof t;this._cimLayers.push({type:"marker",templateHash:k,materialHash:P&&y?this._createMaterialHashFunction(k,y):k,cim:f,materialOverrides:y,colorLocked:!!e.colorLocked,effects:t,scaleSymbolsProportionally:!!e.scaleSymbolsProportionally,alignment:l,anchorPoint:{x:_,y:O},isAbsoluteAnchorPoint:!1,size:b(e.size,h),rotation:this._createOverrideFunction(p,"Rotation",g),offsetX:this._createOverrideFunction(p,"OffsetX",M),offsetY:this._createOverrideFunction(p,"OffsetY",N),color:{r:255,g:255,b:255,a:1},outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,scaleX:1,frameHeight:m,rotateClockwise:!!e.rotateClockwise,referenceSize:c,sizeRatio:S/o(e.size),markerPlacement:i,animatedSymbolProperties:r,avoidSDFRasterization:!0})}_buildSimpleMarker(e,t){return{type:e.type,enable:!0,name:e.name,colorLocked:e.colorLocked,primitiveName:e.primitiveName,anchorPoint:e.anchorPoint,anchorPointUnits:e.anchorPointUnits,offsetX:0,offsetY:0,rotateClockwise:e.rotateClockwise,rotation:0,size:e.size,billboardMode3D:e.billboardMode3D,depth3D:e.depth3D,frame:e.frame,markerGraphics:[t],scaleSymbolsProportionally:e.scaleSymbolsProportionally,respectFrame:e.respectFrame,clippingPath:e.clippingPath}}_analyzeCompositeMarkerGraphic(e,t,i,r,o,n,s,l,c,m,h,p,u,y){const d=o.geometry,v=n[0],_=n[1],O=S(d);if(!O)return;const N="Relative"!==e.anchorPointUnits,[k,P,z]=g(O,e.frame,e.size,e.anchorPoint,N),C={type:"sdf",geom:d,asFill:!0},F=_.path,L=_.primitiveName,I=v.primitiveName,w=M(_.color),x=M(v.color),A=b(v.width,f);let X=!1,H="";for(const a of this._primitiveOverrides)(a.primitiveName===L||a.primitiveName===I||s.includes(a.primitiveName))&&(null!=a.value?H+=`-${a.primitiveName}-${a.propertyName}-${JSON.stringify(a.value)}`:a.valueExpressionInfo&&(X=!0));null!=i&&"function"==typeof i&&(X=!0),(R(h)||R(p)||R(u)||R(y))&&(X=!0);const J=JSON.stringify({...e,markerGraphics:null}),Y=a(JSON.stringify(C)+F).toString(),T=a(JSON.stringify(o)+JSON.stringify(_)+JSON.stringify(v)+J+H).toString();this._cimLayers.push({type:"marker",templateHash:T,materialHash:X?()=>Y:Y,cim:C,materialOverrides:null,colorLocked:!!e.colorLocked,effects:t,scaleSymbolsProportionally:!!e.scaleSymbolsProportionally,alignment:l,anchorPoint:{x:P,y:z},isAbsoluteAnchorPoint:N,size:h,rotation:p,offsetX:u,offsetY:y,scaleX:1,frameHeight:m,rotateClockwise:!1,referenceSize:c,sizeRatio:k,color:this._createOverrideFunction(L,"Color",w,U),outlineColor:this._createOverrideFunction(I,"Color",x,U),outlineWidth:this._createOverrideFunction(I,"Width",A),markerPlacement:i,path:F,animatedSymbolProperties:r})}_createMaterialHashFunction(e,t){const i=this._info?.geometryType;if(i){const e=this._poMap;for(const r of t){if(r.valueExpressionInfo){const t=e[r.primitiveName]&&e[r.primitiveName][r.propertyName];t instanceof l&&(r.fn=(e,r,o)=>H(t,e,{$view:o},i,r))}}}return(i,r,o)=>{for(const e of t)e.fn&&(e.value=e.fn(i,r,o));return a(e+y.buildOverrideKey(t)).toString()}}_setPoMap(e,t,i){let r;this._poMap[e]?r=this._poMap[e]:(r={},this._poMap[e]=r),r[t]=i}_createOverrideFunction(e,t,i,r,o){if(null==e)return i;const n=this._poMap[e];if(null==n)return i;const a=n[t];if("string"==typeof a||"number"==typeof a||a instanceof Array)return r?r.call(null,a,o):a;const s=this._info?.geometryType;return null!=a&&a instanceof l&&null!=s?(e,t,n)=>{let l=H(a,e,{$view:n},s,t);return null!==l&&r&&(l=r.call(null,l,o)),null!==l?l:i}:i}_createEffectsOverrideFunction(e,t){const r=this._poMap,o=this._info?.geometryType;for(const i of t){if(i.valueExpressionInfo&&o){const e=r[i.primitiveName]&&r[i.primitiveName][i.propertyName];e instanceof l&&(i.fn=(t,i,r)=>H(e,t,{$view:r},o,i))}}return(r,o,n)=>{for(const e of t)e.fn&&(e.value=e.fn(r,o,n));const a=[];for(let s of e){const e=s?.primitiveName;if(e){let r=!1;for(const o of t)if(o.primitiveName===e){const e=W(o.propertyName);null!=o.value&&o.value!==s[e]&&(r||(s=i(s),r=!0),s[e]=o.value)}}a.push(s)}return a}}_createMarkerPlacementOverrideFunction(e){const t=[];if(y.findApplicableOverrides(e,this._primitiveOverrides,t),null==e||0===t.length)return e;const r=this._poMap,o=this._info?.geometryType;for(const i of t){if(i.valueExpressionInfo&&o){const e=r[i.primitiveName]&&r[i.primitiveName][i.propertyName];e instanceof l&&(i.fn=(t,i,r)=>H(e,t,{$view:r},o,i))}}return(r,o,n)=>{for(const e of t)e.fn&&(e.value=e.fn(r,o,n));const a=i(e),s=e.primitiveName;for(const e of t)if(e.primitiveName===s){const t=W(e.propertyName);null!=e.value&&e.value!==a[t]&&(a[t]=e.value)}return a}}_createAnimatedSymbolPropertiesOverrideFunction(e){const t=[];if(y.findApplicableOverrides(e,this._primitiveOverrides,t),null==e||0===t.length)return e;const r=this._info?.geometryType;if(r){const e=this._poMap;for(const i of t){if(i.valueExpressionInfo){const t=e[i.primitiveName]&&e[i.primitiveName][i.propertyName];t instanceof l&&(i.fn=(e,i,o)=>H(t,e,{$view:o},r,i))}}}return(r,o,n)=>{for(const e of t)e.fn&&(e.value=e.fn(r,o,n));const a=i(e),s=e.primitiveName;for(const e of t)if(e.primitiveName===s){const t=W(e.propertyName);if(null!=e.value){const i=O(e.value,e.propertyName);i!==a[t]&&(a[t]=i)}}return a}}_analyzePrimitiveOverrides(e,t,i,r){let o=!1,n="";"string"==typeof e&&(e=[e]);for(const a of this._primitiveOverrides)e?.includes(a.primitiveName)&&(null!=a.value?n+=`-${a.primitiveName}-${a.propertyName}-${JSON.stringify(a.value)}`:a.valueExpressionInfo&&(o=!0));return null!=t&&"function"==typeof t&&(o=!0),null!=i&&"function"==typeof i&&(o=!0),null!=r&&"function"==typeof r&&(o=!0),[o,n]}_analyzeMaterialOverrides(e,t){return this._primitiveOverrides.filter((i=>i.primitiveName!==e||!t.includes(i.propertyName)))}_transformSize(e,t){return R(e)||R(t)?(i,r,o)=>(R(e)?e(i,r,o):e)*(R(t)?t(i,r,o):t):e*t}_transformRotation(e,t,i){return R(e)||R(i)?(r,o,n)=>{const a=R(e)?e(r,o,n):e,s=R(i)?i(r,o,n):i;return t?s-a:s+a}:t?i-e:i+e}_transformOffsetX(e,t,i,r,o){if(!(R(e)||R(t)||R(i)||R(r)||R(o))){const n=i*Math.PI/180;if(n){const i=Math.cos(n),a=Math.sin(n);return(i*e-a*t)*r+o}return e*r+o}return(n,a,s)=>{let l=R(i)?i(n,a,s):i;const c=R(r)?r(n,a,s):r,m=R(e)?e(n,a,s):e,f=R(o)?o(n,a,s):o;if(l){l*=Math.PI/180;return(Math.cos(l)*m-Math.sin(l)*(R(t)?t(n,a,s):t))*c+f}return m*c+f}}_transformOffsetY(e,t,i,r,o){if(!(R(e)||R(t)||R(i)||R(r)||R(o))){const n=i*Math.PI/180;if(n){const i=Math.cos(n);return(Math.sin(n)*e+i*t)*r+o}return t*r+o}return(n,a,s)=>{let l=R(i)?i(n,a,s):i;const c=R(r)?r(n,a,s):r,m=R(t)?t(n,a,s):t,f=R(o)?o(n,a,s):o;if(l){l*=Math.PI/180;const t=Math.cos(l);return(Math.sin(l)*(R(e)?e(n,a,s):e)+t*m)*c+f}return m*c+f}}}function D(e){if(e&&0===e.indexOf("Level_")){const t=parseInt(e.substr(6),10);if(!isNaN(t))return t}return 0}function U(t){if(!t||0===t.length)return null;const i=new e(t).toRgba();return{r:i[0],g:i[1],b:i[2],a:i[3]}}function W(e){return e?e.charAt(0).toLowerCase()+e.substr(1):e}function V(e,t){if(!t||0===t.length)return e;const r=i(e);return y.applyOverrides(r,t),r}const B=e=>e&&2===e.length&&e[0].enable&&e[1].enable&&"CIMSolidStroke"===e[0].type&&"CIMSolidFill"===e[1].type&&!e[0].effects&&!e[1].effects;export{j as CIMAnalyzer,V as analyzeCIMResource};
5
+ import e from"../../Color.js";import{getFontFamily as t}from"../../core/fontUtils.js";import{clone as i}from"../../core/lang.js";import r from"../../core/Logger.js";import{pt2px as o,px2pt as n}from"../../core/screenUtils.js";import{numericHash as a}from"../../core/string.js";import{createRendererExpression as s,ArcadeExpression as l}from"../../support/arcadeOnDemand.js";import{DEFAULT_PICTURE_FILL_HEIGHT as c,DEFAULT_HATCH_FILL_SEPARATION as m,DEFAULT_STROKE_WIDTH as f,DEFAULT_MARKER_SIZE as p,DEFAULT_TEXT_HEIGHT as h}from"./CIMSymbolDrawHelper.js";import{CIMSymbolHelper as u,OverrideHelper as y}from"./CIMSymbolHelper.js";import{Alignment as d,CapType as v,JoinType as _}from"./enums.js";import{quantizeIfNeeded as S}from"./quantizeTime.js";import{getExtent as O,getSDFMetrics as g}from"./SDFHelper.js";import{fromCIMColor as M,getTintColor as b,getValue as N,getFillColor as k,getStrokeColor as P,getStrokeWidth as z,fromCIMFontDecoration as C,fromCIMFontStyle as L,adjustTextCase as F,createLabelOverrideFunction as I,evaluateValueOrFunction as w,fromCIMHorizontalAlignment as x,fromCIMVerticalAlignment as A,isFeatureValueFn as R}from"./utils.js";import{CIMEffectHelper as X}from"./effects/CIMEffectHelper.js";import H from"../../views/2d/arcade/callExpressionWithFeature.js";import{RANDOM_INSIDE_POLYGON_TEXTURE_SIZE as J}from"../../views/2d/engine/webgl/definitions.js";import{getMaterialGroup as Y}from"../../views/2d/engine/webgl/grouping.js";const E=r.getLogger("esri.symbols.cim.cimAnalyzer");function T(e){switch(e){case"Butt":return v.BUTT;case"Square":return v.SQUARE;default:return v.ROUND}}function $(e){switch(e){case"Bevel":return _.BEVEL;case"Miter":return _.MITER;default:return _.ROUND}}function j(e){const t=e.markerPlacement;return t&&t.angleToLine?d.MAP:d.SCREEN}class G{constructor(e,t){this._cimLayers=[],this._poMap={},this._primitiveOverrides=[],this._resourceManager=e,this._info=t}async analyzeSymbolReference(e,t,i){if(this._cimLayers=i??[],!e)return this._cimLayers;if(e.primitiveOverrides){this._primitiveOverrides=e.primitiveOverrides,this._poMap={};const t=[],i=this._info;for(const e of this._primitiveOverrides){const r=e.valueExpressionInfo;if(r&&i){const o=r.expression,n=s(o,i.spatialReference,i.fields).then((t=>{null!=t&&this._setPoMap(e.primitiveName,e.propertyName,t)}));t.push(n)}else null!=e.value&&this._setPoMap(e.primitiveName,e.propertyName,e.value);t.length>0&&await Promise.all(t)}}const r=e.symbol,o=[];return u.fetchResources(r,this._resourceManager,o),o.length>0&&await Promise.all(o),this._analyzeSymbol(r,t),this._cimLayers}_analyzeSymbol(e,t){switch(e?.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this._analyzeMultiLayerSymbol(e,t,1,0,0,0)}}_analyzeMultiLayerSymbol(e,t,i,r,o,n){const a=e?.symbolLayers;if(!a)return;const s=e.effects;let l=d.SCREEN;const c=u.getSize(e)??0;"CIMPointSymbol"===e.type&&"Map"===e.angleAlignment&&(l=d.MAP);const m="CIMPolygonSymbol"===e.type;let f=a.length;for(;f--;){const p=a[f];if(!p||!1===p.enable)continue;let h;s&&s.length&&(h=[...s]);const u=p.effects;u&&u.length&&(s?h.push(...u):h=[...u]);const d=[];let v;y.findEffectOverrides(h,this._primitiveOverrides,d),v=d.length>0?this._createEffectsOverrideFunction(h,d):h;const _=[];switch(y.findApplicableOverrides(p,this._primitiveOverrides,_),p.type){case"CIMSolidFill":this._analyzeSolidFill(p,v);break;case"CIMPictureFill":this._analyzePictureFill(p,v);break;case"CIMHatchFill":this._analyzeHatchFill(p,v);break;case"CIMGradientFill":this._analyzeGradientFill(p,v);break;case"CIMSolidStroke":this._analyzeSolidStroke(p,v,m,c);break;case"CIMPictureStroke":this._analyzePictureStroke(p,v,m,c);break;case"CIMGradientStroke":this._analyzeGradientStroke(p,v,m,c);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":{"CIMLineSymbol"===e.type&&(l=j(p));const a=[],s=p.primitiveName;s&&a.push(s),this._analyzeMarker(p,v,null,a,l,c,1,t,i,r,o,n);break}default:E.error("Cannot analyze CIM layer",p.type)}}}_analyzeSolidFill(e,t){const i=e.primitiveName,r=M(e.color),[o,n]=this._analyzePrimitiveOverrides(i,t,null,null),s=a(JSON.stringify(e)+n).toString();this._cimLayers.push({type:"fill",templateHash:s,materialHash:o?()=>s:s,cim:e,materialOverrides:null,colorLocked:!!e.colorLocked,color:this._createOverrideFunction(i,"Color",r,U),height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,effects:t,applyRandomOffset:!1,sampleAlphaOnly:!0})}_analyzePictureFill(e,t){const i=e.primitiveName,r=b(e),[o,n]=this._analyzePrimitiveOverrides(i,t,null,null),s=a(JSON.stringify(e)+n).toString(),l=a(`${e.url}${JSON.stringify(e.colorSubstitutions)}`).toString(),m=N(e.height,c);let f=N(e.scaleX,1);if("width"in e&&"number"==typeof e.width){const t=e.width;let i=1;const r=this._resourceManager.getResource(e.url);null!=r&&(i=r.width/r.height),f/=i*(m/t)}this._cimLayers.push({type:"fill",templateHash:s,materialHash:o?()=>l:l,cim:e,materialOverrides:null,colorLocked:!!e.colorLocked,effects:t,color:this._createOverrideFunction(i,"TintColor",r,U),height:this._createOverrideFunction(i,"Height",m),scaleX:this._createOverrideFunction(i,"ScaleX",f),angle:this._createOverrideFunction(i,"Rotation",N(e.rotation)),offsetX:this._createOverrideFunction(i,"OffsetX",N(e.offsetX)),offsetY:this._createOverrideFunction(i,"OffsetY",N(e.offsetY)),url:e.url,applyRandomOffset:!1,sampleAlphaOnly:!1})}_analyzeHatchFill(e,t){const i=e.primitiveName,r=this._analyzeMaterialOverrides(i,["Rotation","OffsetX","OffsetY"]);let[o,n]=this._analyzePrimitiveOverrides(i,t,null,null);const s=a(JSON.stringify(e)+n).toString(),l=a(`${e.separation}${JSON.stringify(e.lineSymbol)}`).toString();let c={r:255,g:255,b:255,a:1},f=!1;const p=e.lineSymbol?.symbolLayers?.find((e=>"CIMSolidStroke"===e.type&&null!=this._poMap[e.primitiveName]?.Color));if(p){c=M(p.color),c=this._createOverrideFunction(p.primitiveName,"Color",c,U);const e="function"==typeof c;o=o||e,f=null!=p.color||e}this._cimLayers.push({type:"fill",templateHash:s,materialHash:o&&r?this._createMaterialHashFunction(l,r):l,cim:e,materialOverrides:r,colorLocked:!!e.colorLocked,effects:t,color:c,height:this._createOverrideFunction(i,"Separation",N(e.separation,m)),scaleX:1,angle:this._createOverrideFunction(i,"Rotation",N(e.rotation)),offsetX:this._createOverrideFunction(i,"OffsetX",N(e.offsetX)),offsetY:this._createOverrideFunction(i,"OffsetY",N(e.offsetY)),applyRandomOffset:!1,sampleAlphaOnly:!0,hasUnresolvedReplacementColor:!f})}_analyzeGradientFill(e,t){const i=e.primitiveName,[r,o]=this._analyzePrimitiveOverrides(i,t,null,null),n=a(JSON.stringify(e)+o).toString();this._cimLayers.push({type:"fill",templateHash:n,materialHash:r?()=>n:n,cim:e,materialOverrides:null,colorLocked:!!e.colorLocked,effects:t,color:{r:128,g:128,b:128,a:1},height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,applyRandomOffset:!1,sampleAlphaOnly:!1})}_analyzeSolidStroke(e,t,i,r){const o=e.primitiveName,n=M(e.color),s=N(e.width,f),l=T(e.capStyle),c=$(e.joinStyle),m=e.miterLimit,[p,h]=this._analyzePrimitiveOverrides(o,t,null,null),u=a(JSON.stringify(e)+h).toString();let y,d;if(t&&t instanceof Array&&t.length>0){const e=t[t.length-1];if("CIMGeometricEffectDashes"===e.type&&"NoConstraint"===e.lineDashEnding&&null===e.offsetAlongLine){const e=(t=[...t]).pop();y=e.dashTemplate,d=e.scaleDash}}this._cimLayers.push({type:"line",templateHash:u,materialHash:p?()=>u:u,cim:e,materialOverrides:null,isOutline:i,colorLocked:!!e.colorLocked,effects:t,color:this._createOverrideFunction(o,"Color",n,U),width:this._createOverrideFunction(o,"Width",s),cap:this._createOverrideFunction(o,"CapStyle",l),join:this._createOverrideFunction(o,"JoinStyle",c),miterLimit:m&&this._createOverrideFunction(o,"MiterLimit",m),referenceWidth:r,zOrder:D(e.name),dashTemplate:y,scaleDash:d,sampleAlphaOnly:!0})}_analyzePictureStroke(e,t,i,r){const o=a(`${e.url}${JSON.stringify(e.colorSubstitutions)}`).toString(),n=e.primitiveName,s=b(e),l=N(e.width,f),c=T(e.capStyle),m=$(e.joinStyle),p=e.miterLimit,[h,u]=this._analyzePrimitiveOverrides(n,t,null,null),y=a(JSON.stringify(e)+u).toString();this._cimLayers.push({type:"line",templateHash:y,materialHash:h?()=>o:o,cim:e,materialOverrides:null,isOutline:i,colorLocked:!!e.colorLocked,effects:t,color:this._createOverrideFunction(n,"TintColor",s,U),width:this._createOverrideFunction(n,"Width",l),cap:this._createOverrideFunction(n,"CapStyle",c),join:this._createOverrideFunction(n,"JoinStyle",m),miterLimit:p&&this._createOverrideFunction(n,"MiterLimit",p),referenceWidth:r,zOrder:D(e.name),dashTemplate:null,scaleDash:!1,url:e.url,sampleAlphaOnly:!1})}_analyzeGradientStroke(e,t,i,r){const o=e.primitiveName,n=N(e.width,f),s=T(e.capStyle),l=$(e.joinStyle),c=e.miterLimit,[m,p]=this._analyzePrimitiveOverrides(o,t,null,null),h=a(JSON.stringify(e)+p).toString();this._cimLayers.push({type:"line",templateHash:h,materialHash:m?()=>h:h,cim:e,materialOverrides:null,isOutline:i,colorLocked:!!e.colorLocked,effects:t,color:{r:128,g:128,b:128,a:1},width:this._createOverrideFunction(o,"Width",n),cap:this._createOverrideFunction(o,"CapStyle",s),join:this._createOverrideFunction(o,"JoinStyle",l),miterLimit:c&&this._createOverrideFunction(o,"MiterLimit",c),referenceWidth:r,zOrder:D(e.name),dashTemplate:null,scaleDash:!1,sampleAlphaOnly:!1})}_analyzeMarker(e,t,i,r,o,n,a,s,l,c,m,f){if(this._analyzeMarkerInsidePolygon(e,t))return;const h=N(e.size,p),u=N(e.rotation),y=N(e.offsetX),d=N(e.offsetY);let v=this._createOverrideFunction(e.primitiveName,"Size",h),_=this._createOverrideFunction(e.primitiveName,"Rotation",u),S=this._createOverrideFunction(e.primitiveName,"OffsetX",y),O=this._createOverrideFunction(e.primitiveName,"OffsetY",d);v=this._transformSize(v,a),_=this._transformRotation(_,!!e.rotateClockwise,c);const g=this._transformOffsetX(S,O,c,a,m),M=this._transformOffsetY(S,O,c,a,f);switch(S=g,O=M,e.type){case"CIMPictureMarker":this._analyzePictureMarker(e,t,i,r,o,n,v,_,S,O);break;case"CIMVectorMarker":this._analyzeVectorMarker(e,t,i,r,o,n,a,s,v,_,S,O)}}_analyzeMarkerInsidePolygon(e,t){const{markerPlacement:i,type:r}=e;if(!i||"CIMMarkerPlacementInsidePolygon"!==i.type)return!1;if("CIMVectorMarker"===r||"CIMPictureMarker"===r){const o=e.primitiveName;if(o){const[e,i]=this._analyzePrimitiveOverrides([o],t,null,null);if(e)return!1}const n=i.primitiveName;if(n){const[e,i]=this._analyzePrimitiveOverrides([n],t,null,null);if(e)return!1}if("CIMVectorMarker"===r){const{markerGraphics:t}=e;if(t)for(const e of t){const{symbol:t}=e;if("CIMPolygonSymbol"===t?.type&&t.symbolLayers){const{symbolLayers:e}=t;for(const t of e)if("CIMSolidStroke"===t.type)return!1}}}else{const{animatedSymbolProperties:t}=e;if(t)return!1}}const o=i,s=Math.abs(o.stepX),l=Math.abs(o.stepY);if(0===s||0===l)return!0;const c=["Rotation","OffsetX","OffsetY"],m=this._primitiveOverrides.filter((t=>t.primitiveName!==e.primitiveName||!c.includes(t.propertyName))),f="url"in e&&"string"==typeof e.url?e.url:void 0,p=a(JSON.stringify(e)).toString();let h,u,y=null;if("Random"===i.gridType){const e=n(J),t=Math.max(Math.floor(e/s),1),i=Math.max(Math.floor(e/l),1);h=l*i,y=e=>e?e*i:0;u=t*s/h}else i.shiftOddRows?(h=2*l,y=e=>e?2*e:0,u=s/l*.5):(h=l,y=null,u=s/l);const d=b(e);return this._cimLayers.push({type:"fill",templateHash:p,materialHash:p,cim:e,materialOverrides:m,colorLocked:!!e.colorLocked,effects:t,color:d,height:this._createOverrideFunction(o.primitiveName,"StepY",h,y),scaleX:u,angle:o.gridAngle,offsetX:N(o.offsetX),offsetY:N(o.offsetY),url:f,applyRandomOffset:"Random"===i.gridType,sampleAlphaOnly:!f,hasUnresolvedReplacementColor:!0}),!0}_analyzePictureMarker(e,t,i,r,o,n,s,l,c,m){let f=N(e.scaleX,1);const p=b(e),h=a(`${e.url}${JSON.stringify(e.colorSubstitutions)}${JSON.stringify(e.animatedSymbolProperties)}`).toString();i||(i=this._createMarkerPlacementOverrideFunction(e.markerPlacement));const u=this._createAnimatedSymbolPropertiesOverrideFunction(e.animatedSymbolProperties),[y,d]=this._analyzePrimitiveOverrides(r,t,i,u),v=a(JSON.stringify(e)+d).toString(),_=e.anchorPoint??{x:0,y:0};if("width"in e&&"number"==typeof e.width){const t=e.width;let i=1;const r=this._resourceManager.getResource(e.url);null!=r&&(i=r.width/r.height);f/=i*(N(e.size)/t)}function S(e,t){return null!=u?w(u,e,t):null}const O=e.animatedSymbolProperties&&!0===e.animatedSymbolProperties.randomizeStartTime?(e,t,i,r)=>{const o=Y(r??0),n=S(e,t);return h+`-MATERIALGROUP(${o})`+`-ASP(${JSON.stringify(n)})`}:y?(e,t)=>{const i=S(e,t);return h+`-ASP(${JSON.stringify(i)})`}:h;this._cimLayers.push({type:"marker",templateHash:v,materialHash:O,cim:e,materialOverrides:null,colorLocked:!!e.colorLocked,effects:t,scaleSymbolsProportionally:!1,alignment:o,size:s,scaleX:this._createOverrideFunction(e.primitiveName,"ScaleX",f),rotation:l,offsetX:c,offsetY:m,color:this._createOverrideFunction(e.primitiveName,"TintColor",p,U),anchorPoint:{x:_.x,y:_.y},isAbsoluteAnchorPoint:"Relative"!==e.anchorPointUnits,outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,frameHeight:0,rotateClockwise:!1,referenceSize:n,sizeRatio:1,markerPlacement:i,url:e.url,animatedSymbolProperties:u})}_analyzeVectorMarker(e,t,i,r,o,n,a,s,l,c,m,f){const p=e.markerGraphics;if(!p)return;let h,u=0,y=1;e.scaleSymbolsProportionally&&(h=e.frame,h&&(u=h.ymax-h.ymin,y=this._transformSize(l,1/u))),y=this._transformSize(y,a),i||(i=this._createMarkerPlacementOverrideFunction(e.markerPlacement));for(const d of p)if(d){const a=d.symbol;if(!a)continue;const p=d.primitiveName;p&&r.push(p);let v=m,_=f;if(("CIMPointSymbol"===a.type||"CIMTextSymbol"===a.type)&&h){let t=0,i=0;const r=d.geometry;"x"in r&&"y"in r&&(t+=r.x-.5*(h.xmin+h.xmax),i+=r.y-.5*(h.ymin+h.ymax));const o=e.anchorPoint;o&&("Absolute"===e.anchorPointUnits?(t-=o.x,i-=o.y):h&&(t-=(h.xmax-h.xmin)*o.x,i-=(h.ymax-h.ymin)*o.y)),v=this._transformOffsetX(t,i,c,y,m),_=this._transformOffsetY(t,i,c,y,f)}switch(a.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":s?this._analyzeMultiLayerGraphicNonSDF(e,t,i,null,d,r,o,n,u):this._analyzeMultiLayerGraphic(e,t,i,null,d,r,o,n,u,y,l,c,v,_);break;case"CIMTextSymbol":this._analyzeTextGraphic(e,t,i,d,r,o,n,u,y,l,c,v,_)}p&&r.pop()}}_analyzeMultiLayerGraphic(e,t,i,r,o,n,s,l,c,m,f,p,h,u){const y=o.symbol,d=y.symbolLayers;if(!d)return;let v=d.length;if(B(d))return void this._analyzeCompositeMarkerGraphic(e,t,i,r,o,d,n,s,l,c,f,p,h,u);const _=this._resourceManager.geometryEngine,S=X.applyEffects(y.effects,o.geometry,_);if(S)for(;v--;){const y=d[v];if(!y||!1===y.enable)continue;const b=y.primitiveName;switch(b&&n.push(b),y.type){case"CIMSolidFill":case"CIMSolidStroke":{const m=X.applyEffects(y.effects,S,_),d=O(m);if(!d)continue;const v="Relative"!==e.anchorPointUnits,[N,C,L]=g(d,e.frame,e.size,e.anchorPoint,v),F="CIMSolidFill"===y.type,I={type:"sdf",geom:m,asFill:F},w=y.path,x=M(F?k(y):P(y)),A=F?{r:0,g:0,b:0,a:0}:M(P(y)),H=z(y)??0;if(!F&&!H)break;let J=!1,Y="";for(const e of this._primitiveOverrides)n.includes(e.primitiveName)&&(null!=e.value?Y+=`-${e.primitiveName}-${e.propertyName}-${JSON.stringify(e.value)}`:e.valueExpressionInfo&&(J=!0));(null!=t&&"function"==typeof t||null!=i&&"function"==typeof i)&&(J=!0),(R(f)||R(p)||R(h)||R(u))&&(J=!0);const E=JSON.stringify({...e,markerGraphics:null}),T=a(JSON.stringify(I)+w).toString(),$=a(JSON.stringify(o)+JSON.stringify(y)+E+Y).toString();this._cimLayers.push({type:"marker",templateHash:$,materialHash:J?()=>T:T,cim:I,materialOverrides:null,colorLocked:!!e.colorLocked,effects:t,scaleSymbolsProportionally:!!e.scaleSymbolsProportionally,alignment:s,anchorPoint:{x:C,y:L},isAbsoluteAnchorPoint:v,size:f,rotation:p,offsetX:h,offsetY:u,scaleX:1,frameHeight:c,rotateClockwise:!1,referenceSize:l,sizeRatio:N,color:this._createOverrideFunction(b,"Color",x,U),outlineColor:this._createOverrideFunction(b,"Color",A,U),outlineWidth:this._createOverrideFunction(b,"Width",H),markerPlacement:i,animatedSymbolProperties:r,path:w});break}case"CIMVectorMarker":y.markerPlacement?this._analyzeMultiLayerGraphicNonSDF(e,t,i,r,o,n,s,l,c):this._analyzeMarker(y,t,i,n,s,l,m,!1,f,p,h,u);break;default:this._analyzeMultiLayerGraphicNonSDF(e,t,i,r,o,n,s,l,c)}b&&n.pop()}}_analyzeTextGraphic(e,i,r,o,n,s,l,c,m,p,u,d,v){const _=[];y.findApplicableOverrides(o,this._primitiveOverrides,_);const S=o.geometry;if(!("x"in S)||!("y"in S))return;const O=o.symbol,g=C(O),b=L(O.fontStyleName),R=t(O.fontFamilyName);O.font={family:R,decoration:g,...b};let X=N(O.height,h),H=N(O.angle),J=N(O.offsetX),Y=N(O.offsetY);X=this._transformSize(X,m),H=this._transformRotation(H,!1,u);const E=this._transformOffsetX(J,Y,u,m,d),T=this._transformOffsetY(J,Y,u,m,v);J=E,Y=T;const $=M(k(O));let j=M(P(O)),G=z(O)??0;G||(j=M(k(O.haloSymbol)),G=N(O.haloSize)),G=this._transformSize(G,m);let D=null,U=null,W=0;if(O.callout&&"CIMBackgroundCallout"===O.callout.type){const e=O.callout;if(e.backgroundSymbol){const t=e.backgroundSymbol.symbolLayers;if(t)for(const e of t)"CIMSolidFill"===e.type?D=M(e.color):"CIMSolidStroke"===e.type&&(U=M(e.color),W=N(e.width,f))}}const[V,B]=this._analyzePrimitiveOverrides(n,i,r,null),q=JSON.stringify(e.effects)+Number(e.colorLocked).toString()+JSON.stringify(e.anchorPoint)+e.anchorPointUnits+JSON.stringify(e.markerPlacement)+e.size.toString(),K=a(JSON.stringify(o)+q+B).toString();let Q=this._createOverrideFunction(o.primitiveName,"TextString",o.textString??"",F,O.textCase);if(null==Q)return;const{fontStyleName:Z}=O,ee=R+(Z?"-"+Z.toLowerCase():"-regular"),te=ee;"string"==typeof Q&&Q.includes("[")&&O.fieldMap&&(Q=I(O.fieldMap,Q,O.textCase)),this._cimLayers.push({type:"text",templateHash:K,materialHash:V||"function"==typeof Q||/\[(.*?)\]/.test(Q)?(e,t,i)=>te+"-"+w(Q,e,t,i):te+"-"+a(Q),cim:O,materialOverrides:null,colorLocked:!!e.colorLocked,effects:i,alignment:s,anchorPoint:{x:0,y:0},isAbsoluteAnchorPoint:"Relative"!==e.anchorPointUnits,fontName:ee,decoration:g,weight:b.weight,style:b.style,size:X,angle:H,offsetX:J,offsetY:Y,horizontalAlignment:x(O.horizontalAlignment),verticalAlignment:A(O.verticalAlignment),text:Q,color:$,outlineColor:j,outlineSize:G,backgroundColor:D,borderLineColor:U,borderLineWidth:W,referenceSize:l,sizeRatio:1,markerPlacement:r})}_analyzeMultiLayerGraphicNonSDF(e,t,i,r,n,s,l,c,m){const f=this._buildSimpleMarker(e,n),h=e.primitiveName,y=this._analyzeMaterialOverrides(h,["Rotation","OffsetX","OffsetY"]),[d,v]=this._analyzePrimitiveOverrides(s,null,null,null),[_,S,O]=u.getTextureAnchor(f,this._resourceManager),g=N(e.rotation),M=N(e.offsetX),b=N(e.offsetY),k=a(JSON.stringify(f)+v).toString(),P=y&&y.length>0||null!=t&&"function"==typeof t;this._cimLayers.push({type:"marker",templateHash:k,materialHash:P&&y?this._createMaterialHashFunction(k,y):k,cim:f,materialOverrides:y,colorLocked:!!e.colorLocked,effects:t,scaleSymbolsProportionally:!!e.scaleSymbolsProportionally,alignment:l,anchorPoint:{x:_,y:S},isAbsoluteAnchorPoint:!1,size:N(e.size,p),rotation:this._createOverrideFunction(h,"Rotation",g),offsetX:this._createOverrideFunction(h,"OffsetX",M),offsetY:this._createOverrideFunction(h,"OffsetY",b),color:{r:255,g:255,b:255,a:1},outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,scaleX:1,frameHeight:m,rotateClockwise:!!e.rotateClockwise,referenceSize:c,sizeRatio:O/o(e.size),markerPlacement:i,animatedSymbolProperties:r,avoidSDFRasterization:!0})}_buildSimpleMarker(e,t){return{type:e.type,enable:!0,name:e.name,colorLocked:e.colorLocked,primitiveName:e.primitiveName,anchorPoint:e.anchorPoint,anchorPointUnits:e.anchorPointUnits,offsetX:0,offsetY:0,rotateClockwise:e.rotateClockwise,rotation:0,size:e.size,billboardMode3D:e.billboardMode3D,depth3D:e.depth3D,frame:e.frame,markerGraphics:[t],scaleSymbolsProportionally:e.scaleSymbolsProportionally,respectFrame:e.respectFrame,clippingPath:e.clippingPath}}_analyzeCompositeMarkerGraphic(e,t,i,r,o,n,s,l,c,m,p,h,u,y){const d=o.geometry,v=n[0],_=n[1],S=O(d);if(!S)return;const b="Relative"!==e.anchorPointUnits,[k,P,z]=g(S,e.frame,e.size,e.anchorPoint,b),C={type:"sdf",geom:d,asFill:!0},L=_.path,F=_.primitiveName,I=v.primitiveName,w=M(_.color),x=M(v.color),A=N(v.width,f);let X=!1,H="";for(const a of this._primitiveOverrides)(a.primitiveName===F||a.primitiveName===I||s.includes(a.primitiveName))&&(null!=a.value?H+=`-${a.primitiveName}-${a.propertyName}-${JSON.stringify(a.value)}`:a.valueExpressionInfo&&(X=!0));null!=i&&"function"==typeof i&&(X=!0),(R(p)||R(h)||R(u)||R(y))&&(X=!0);const J=JSON.stringify({...e,markerGraphics:null}),Y=a(JSON.stringify(C)+L).toString(),E=a(JSON.stringify(o)+JSON.stringify(_)+JSON.stringify(v)+J+H).toString();this._cimLayers.push({type:"marker",templateHash:E,materialHash:X?()=>Y:Y,cim:C,materialOverrides:null,colorLocked:!!e.colorLocked,effects:t,scaleSymbolsProportionally:!!e.scaleSymbolsProportionally,alignment:l,anchorPoint:{x:P,y:z},isAbsoluteAnchorPoint:b,size:p,rotation:h,offsetX:u,offsetY:y,scaleX:1,frameHeight:m,rotateClockwise:!1,referenceSize:c,sizeRatio:k,color:this._createOverrideFunction(F,"Color",w,U),outlineColor:this._createOverrideFunction(I,"Color",x,U),outlineWidth:this._createOverrideFunction(I,"Width",A),markerPlacement:i,path:L,animatedSymbolProperties:r})}_createMaterialHashFunction(e,t){const i=this._info?.geometryType;if(i){const e=this._poMap;for(const r of t){if(r.valueExpressionInfo){const t=e[r.primitiveName]&&e[r.primitiveName][r.propertyName];t instanceof l&&(r.fn=(e,r,o)=>H(t,e,{$view:o},i,r))}}}return(i,r,o)=>{for(const e of t)e.fn&&(e.value=e.fn(i,r,o));return a(e+y.buildOverrideKey(t)).toString()}}_setPoMap(e,t,i){let r;this._poMap[e]?r=this._poMap[e]:(r={},this._poMap[e]=r),r[t]=i}_createOverrideFunction(e,t,i,r,o){if(null==e)return i;const n=this._poMap[e];if(null==n)return i;const a=n[t];if("string"==typeof a||"number"==typeof a||a instanceof Array)return r?r.call(null,a,o):a;const s=this._info?.geometryType;return null!=a&&a instanceof l&&null!=s?(e,t,n)=>{let l=H(a,e,{$view:n},s,t);return null!==l&&r&&(l=r.call(null,l,o)),null!==l?l:i}:i}_createEffectsOverrideFunction(e,t){const r=this._poMap,o=this._info?.geometryType;for(const i of t){if(i.valueExpressionInfo&&o){const e=r[i.primitiveName]&&r[i.primitiveName][i.propertyName];e instanceof l&&(i.fn=(t,i,r)=>H(e,t,{$view:r},o,i))}}return(r,o,n)=>{for(const e of t)e.fn&&(e.value=e.fn(r,o,n));const a=[];for(let s of e){const e=s?.primitiveName;if(e){let r=!1;for(const o of t)if(o.primitiveName===e){const e=W(o.propertyName);null!=o.value&&o.value!==s[e]&&(r||(s=i(s),r=!0),s[e]=o.value)}}a.push(s)}return a}}_createMarkerPlacementOverrideFunction(e){const t=[];if(y.findApplicableOverrides(e,this._primitiveOverrides,t),null==e||0===t.length)return e;const r=this._poMap,o=this._info?.geometryType;for(const i of t){if(i.valueExpressionInfo&&o){const e=r[i.primitiveName]&&r[i.primitiveName][i.propertyName];e instanceof l&&(i.fn=(t,i,r)=>H(e,t,{$view:r},o,i))}}return(r,o,n)=>{for(const e of t)e.fn&&(e.value=e.fn(r,o,n));const a=i(e),s=e.primitiveName;for(const e of t)if(e.primitiveName===s){const t=W(e.propertyName);null!=e.value&&e.value!==a[t]&&(a[t]=e.value)}return a}}_createAnimatedSymbolPropertiesOverrideFunction(e){const t=[];if(y.findApplicableOverrides(e,this._primitiveOverrides,t),null==e||0===t.length)return e;const r=this._info?.geometryType;if(r){const e=this._poMap;for(const i of t){if(i.valueExpressionInfo){const t=e[i.primitiveName]&&e[i.primitiveName][i.propertyName];t instanceof l&&(i.fn=(e,i,o)=>H(t,e,{$view:o},r,i))}}}return(r,o,n)=>{for(const e of t)e.fn&&(e.value=e.fn(r,o,n));const a=i(e),s=e.primitiveName;for(const e of t)if(e.primitiveName===s){const t=W(e.propertyName);if(null!=e.value){const i=S(e.value,e.propertyName);i!==a[t]&&(a[t]=i)}}return a}}_analyzePrimitiveOverrides(e,t,i,r){let o=!1,n="";"string"==typeof e&&(e=[e]);for(const a of this._primitiveOverrides)e?.includes(a.primitiveName)&&(null!=a.value?n+=`-${a.primitiveName}-${a.propertyName}-${JSON.stringify(a.value)}`:a.valueExpressionInfo&&(o=!0));return null!=t&&"function"==typeof t&&(o=!0),null!=i&&"function"==typeof i&&(o=!0),null!=r&&"function"==typeof r&&(o=!0),[o,n]}_analyzeMaterialOverrides(e,t){return this._primitiveOverrides.filter((i=>i.primitiveName!==e||!t.includes(i.propertyName)))}_transformSize(e,t){return R(e)||R(t)?(i,r,o)=>(R(e)?e(i,r,o):e)*(R(t)?t(i,r,o):t):e*t}_transformRotation(e,t,i){return R(e)||R(i)?(r,o,n)=>{const a=R(e)?e(r,o,n):e,s=R(i)?i(r,o,n):i;return t?s-a:s+a}:t?i-e:i+e}_transformOffsetX(e,t,i,r,o){if(!(R(e)||R(t)||R(i)||R(r)||R(o))){const n=i*Math.PI/180;if(n){const i=Math.cos(n),a=Math.sin(n);return(i*e-a*t)*r+o}return e*r+o}return(n,a,s)=>{let l=R(i)?i(n,a,s):i;const c=R(r)?r(n,a,s):r,m=R(e)?e(n,a,s):e,f=R(o)?o(n,a,s):o;if(l){l*=Math.PI/180;return(Math.cos(l)*m-Math.sin(l)*(R(t)?t(n,a,s):t))*c+f}return m*c+f}}_transformOffsetY(e,t,i,r,o){if(!(R(e)||R(t)||R(i)||R(r)||R(o))){const n=i*Math.PI/180;if(n){const i=Math.cos(n);return(Math.sin(n)*e+i*t)*r+o}return t*r+o}return(n,a,s)=>{let l=R(i)?i(n,a,s):i;const c=R(r)?r(n,a,s):r,m=R(t)?t(n,a,s):t,f=R(o)?o(n,a,s):o;if(l){l*=Math.PI/180;const t=Math.cos(l);return(Math.sin(l)*(R(e)?e(n,a,s):e)+t*m)*c+f}return m*c+f}}}function D(e){if(e&&0===e.indexOf("Level_")){const t=parseInt(e.substr(6),10);if(!isNaN(t))return t}return 0}function U(t){if(!t||0===t.length)return null;const i=new e(t).toRgba();return{r:i[0],g:i[1],b:i[2],a:i[3]}}function W(e){return e?e.charAt(0).toLowerCase()+e.substr(1):e}function V(e,t){if(!t||0===t.length)return e;const r=i(e);return y.applyOverrides(r,t),r}const B=e=>e&&2===e.length&&e[0].enable&&e[1].enable&&"CIMSolidStroke"===e[0].type&&"CIMSolidFill"===e[1].type&&!e[0].effects&&!e[1].effects;export{G as CIMAnalyzer,V as analyzeCIMResource};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../core/RandomLCG.js";import{Placement as s}from"../CIMPlacements.js";import{PlacementGridType as i}from"../enums.js";const e=512,h=10,n=24,_=1e-6;class r{static local(){return null===r.instance&&(r.instance=new r),r.instance}execute(t,s,i,e,h){return new o(t,s,i,e,h)}}r.instance=null;class o{constructor(h,n,_,r,o){if(this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,this._currentX=0,this._currentY=0,this._accelerationMap=null,this._testInsidePolygon=!1,this._verticalSubdivision=!0,this._stepX=Math.abs(n.stepX??16)*_,this._stepY=Math.abs(n.stepY??16)*_,0!==this._stepX&&0!==this._stepY){if(this._gridType=n.gridType??i.Fixed,this._gridType===i.Random){const s=n.seed??13,i=1;this._randomLCG=new t(s*i),this._randomness=(n.randomness??100)/100,this._gridAngle=0,this._shiftOddRows=!1,this._cosAngle=1,this._sinAngle=0,this._offsetX=0,this._offsetY=0,this._buildRandomValues()}else{if(this._randomness=0,this._gridAngle=n.gridAngle??0,this._shiftOddRows=n.shiftOddRows??!1,this._offsetX=(n.offsetX??0)*_,this._offsetY=(n.offsetY??0)*_,this._cosAngle=Math.cos(this._gridAngle/180*Math.PI),this._sinAngle=-Math.sin(this._gridAngle/180*Math.PI),this._stepX)if(this._offsetX<0)for(;this._offsetX<-.5*this._stepX;)this._offsetX+=this._stepX;else for(;this._offsetX>=.5*this._stepX;)this._offsetX-=this._stepX;if(this._stepY)if(this._offsetY<0)for(;this._offsetY<-.5*this._stepY;)this._offsetY+=this._stepY;else for(;this._offsetY>=.5*this._stepY;)this._offsetY-=this._stepY}if(this._graphicOriginX=0,this._graphicOriginY=0,null!=r){const[t,s,i]=r.split("/"),h=parseFloat(s),n=parseFloat(i);this._graphicOriginX=-n*e,this._graphicOriginY=h*e,this._testInsidePolygon=!0}this._internalPlacement=new s,this._calculateMinMax(h),this._geometryCursor=h}}next(){return this._geometryCursor?this._nextInside():null}_buildRandomValues(){if(!o._randValues){o._randValues=[];for(let t=0;t<n;t++)for(let s=0;s<n;s++)o._randValues.push(this._randomLCG.getFloat()),o._randValues.push(this._randomLCG.getFloat())}}_calculateMinMax(t){let s,i,h,n,_,r,o,a,l,f,c,u,M,g;this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,o=a=M=c=Number.MAX_VALUE,l=f=g=u=-Number.MAX_VALUE;const p=1!==this._cosAngle;for(t.reset();t.nextPath();)for(;t.nextPoint();)r=t.x,_=t.y,s=r-this._graphicOriginX-this._offsetX,i=_-this._graphicOriginY-this._offsetY,p?(h=this._cosAngle*s-this._sinAngle*i,n=this._sinAngle*s+this._cosAngle*i):(h=s,n=i),o=Math.min(o,h),l=Math.max(l,h),a=Math.min(a,n),f=Math.max(f,n),c=Math.min(c,_),u=Math.max(u,_),M=Math.min(M,r),g=Math.max(g,r);c=c!==Number.MAX_VALUE?c:-e-this._stepY,u=u!==-Number.MAX_VALUE?u:this._stepY,M=M!==Number.MAX_VALUE?M:-this._stepX,g=g!==-Number.MAX_VALUE?g:e+this._stepX;const d=u-c,m=g-M;if(this._verticalSubdivision=d>=m,this._polygonMin=this._verticalSubdivision?c:M,this._testInsidePolygon){let t=0-this._graphicOriginX-this._offsetX-this._stepX,s=e-this._graphicOriginX-this._offsetX+this._stepX,i=-e-this._graphicOriginY-this._offsetY-this._stepY,h=0-this._graphicOriginY-this._offsetY+this._stepY;if(p){const e=[[t,i],[t,h],[s,i],[s,h]];t=i=Number.MAX_VALUE,s=h=-Number.MAX_VALUE;for(const n of e){const e=this._cosAngle*n[0]-this._sinAngle*n[1],_=this._sinAngle*n[0]+this._cosAngle*n[1];t=Math.min(t,e),s=Math.max(s,e),i=Math.min(i,_),h=Math.max(h,_)}}o=o!==Number.MAX_VALUE?Math.max(o,t):t,a=a!==Number.MAX_VALUE?Math.max(a,i):i,l=l!==-Number.MAX_VALUE?Math.min(l,s):s,f=f!==-Number.MAX_VALUE?Math.min(f,h):h}this._xMin=Math.round(o/this._stepX),this._xMax=Math.round(l/this._stepX),this._yMin=Math.round(a/this._stepY),this._yMax=Math.round(f/this._stepY),this._currentX=this._xMax+1,this._currentY=this._yMin-1,this._buildAccelerationMap(t,M,g,c,u)}_buildAccelerationMap(t,s,i,n,_){t.reset();const r=new Map,o=this._verticalSubdivision,a=o?_-n:i-s;let f=Math.ceil(a/h);if(f<=1)return;const c=Math.floor(a/f);let u,M,g,p,d,m,X,x,A,Y,y;for(f++,this._delta=c,o?(A=-e-this._stepY,Y=this._stepY,y=n):(A=-this._stepX,Y=e+this._stepX,y=s);t.nextPath();)if(!(t.numPoints<2)&&t.nextPoint())for(u=t.x,M=t.y;t.nextPoint();u=g,M=p){if(g=t.x,p=t.y,o){if(M===p||M<A&&p<A||M>Y&&p>Y)continue;d=Math.min(M,p),m=Math.max(M,p)}else{if(u===g||u<A&&g<A||u>Y&&g>Y)continue;d=Math.min(u,g),m=Math.max(u,g)}for(;d<m;)X=Math.floor((d-y)/c),l(X,u,M,g,p,r),d+=c;x=Math.floor((m-y)/c),x>X&&l(x,u,M,g,p,r)}this._accelerationMap=r}_nextInside(){for(;;){if(this._currentX>this._xMax){if(this._currentY++,this._currentY>this._yMax)return null;this._currentX=this._xMin,this._shiftOddRows&&this._currentY%2&&this._currentX--}let t=this._currentX*this._stepX+this._offsetX;this._shiftOddRows&&this._currentY%2&&(t+=.5*this._stepX);const s=this._currentY*this._stepY+this._offsetY;let e,h;if(this._currentX++,this._gridType===i.Random){const i=(this._currentX%n+n)%n,_=(this._currentY%n+n)%n;e=this._graphicOriginX+t+this._stepX*this._randomness*(.5-o._randValues[_*n+i])*2/3,h=this._graphicOriginY+s+this._stepY*this._randomness*(.5-o._randValues[_*n+i+1])*2/3}else e=this._graphicOriginX+this._cosAngle*t+this._sinAngle*s,h=this._graphicOriginY-this._sinAngle*t+this._cosAngle*s;if(!this._testInsidePolygon||this._isInsidePolygon(e,h,this._geometryCursor))return this._internalPlacement.setTranslate(e,h),this._internalPlacement}}_isInsidePolygon(t,s,i){if(null==this._accelerationMap)return a(t,s,i);t+=_,s+=_;const e=this._verticalSubdivision,h=e?s:t,n=Math.floor((h-this._polygonMin)/this._delta),r=this._accelerationMap.get(n);if(!r)return!1;let o,l,f,c=0;for(const _ of r){if(o=_[0],l=_[1],e){if(o[1]>s==l[1]>s)continue;f=(l[0]-o[0])*(s-o[1])-(l[1]-o[1])*(t-o[0])}else{if(o[0]>t==l[0]>t)continue;f=(l[1]-o[1])*(t-o[0])-(l[0]-o[0])*(s-o[1])}f>0?c++:c--}return 0!==c}}function a(t,s,i){let e,h,n,r,o=0;for(t+=_,s+=_,i.reset();i.nextPath();)if(i.nextPoint())for(e=i.x,h=i.y;i.nextPoint();e=n,h=r){if(n=i.x,r=i.y,h>s==r>s)continue;(n-e)*(s-h)-(r-h)*(t-e)>0?o++:o--}return 0!==o}function l(t,s,i,e,h,n){let _=n.get(t);_||(_=[],n.set(t,_)),_.push([[s,i],[e,h]])}export{r as PlacementInsidePolygon};
5
+ import t from"../../../core/RandomLCG.js";import{Placement as s}from"../CIMPlacements.js";import{PlacementGridType as i}from"../enums.js";const e=512,h=10,n=24,_=1e-6;class r{static local(){return null===r.instance&&(r.instance=new r),r.instance}execute(t,s,i,e,h){return new o(t,s,i,e,h)}}r.instance=null;class o{constructor(h,n,_,r,o){if(this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,this._currentX=0,this._currentY=0,this._accelerationMap=null,this._testInsidePolygon=!1,this._verticalSubdivision=!0,this._stepX=Math.abs(n.stepX??16)*_,this._stepY=Math.abs(n.stepY??16)*_,this._stepX=Math.round(128*this._stepX)/128,this._stepY=Math.round(128*this._stepY)/128,0!==this._stepX&&0!==this._stepY){if(this._gridType=n.gridType??i.Fixed,this._gridType===i.Random){const s=n.seed??13,i=1;this._randomLCG=new t(s*i),this._randomness=(n.randomness??100)/100,this._gridAngle=0,this._shiftOddRows=!1,this._cosAngle=1,this._sinAngle=0,this._offsetX=0,this._offsetY=0,this._buildRandomValues()}else{if(this._randomness=0,this._gridAngle=n.gridAngle??0,this._shiftOddRows=n.shiftOddRows??!1,this._offsetX=(n.offsetX??0)*_,this._offsetY=(n.offsetY??0)*_,this._cosAngle=Math.cos(this._gridAngle/180*Math.PI),this._sinAngle=-Math.sin(this._gridAngle/180*Math.PI),this._stepX)if(this._offsetX<0)for(;this._offsetX<-.5*this._stepX;)this._offsetX+=this._stepX;else for(;this._offsetX>=.5*this._stepX;)this._offsetX-=this._stepX;if(this._stepY)if(this._offsetY<0)for(;this._offsetY<-.5*this._stepY;)this._offsetY+=this._stepY;else for(;this._offsetY>=.5*this._stepY;)this._offsetY-=this._stepY}if(this._graphicOriginX=0,this._graphicOriginY=0,null!=r){const[t,s,i,h]=r.split("/"),n=parseFloat(t),_=parseFloat(s),o=parseFloat(i),a=parseFloat(h);this._graphicOriginX=-(a*2**n+o)*e,this._graphicOriginY=_*e,this._testInsidePolygon=!0}this._internalPlacement=new s,this._calculateMinMax(h),this._geometryCursor=h}}next(){return this._geometryCursor?this._nextInside():null}_buildRandomValues(){if(!o._randValues){o._randValues=[];for(let t=0;t<n;t++)for(let s=0;s<n;s++)o._randValues.push(this._randomLCG.getFloat()),o._randValues.push(this._randomLCG.getFloat())}}_calculateMinMax(t){let s,i,h,n,_,r,o,a,l,f,c,u,p,M;this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,o=a=p=c=Number.MAX_VALUE,l=f=M=u=-Number.MAX_VALUE;const g=1!==this._cosAngle;for(t.reset();t.nextPath();)for(;t.nextPoint();)r=t.x,_=t.y,s=r-this._graphicOriginX-this._offsetX,i=_-this._graphicOriginY-this._offsetY,g?(h=this._cosAngle*s-this._sinAngle*i,n=this._sinAngle*s+this._cosAngle*i):(h=s,n=i),o=Math.min(o,h),l=Math.max(l,h),a=Math.min(a,n),f=Math.max(f,n),c=Math.min(c,_),u=Math.max(u,_),p=Math.min(p,r),M=Math.max(M,r);c=c!==Number.MAX_VALUE?c:-e-this._stepY,u=u!==-Number.MAX_VALUE?u:this._stepY,p=p!==Number.MAX_VALUE?p:-this._stepX,M=M!==-Number.MAX_VALUE?M:e+this._stepX;const d=u-c,m=M-p;if(this._verticalSubdivision=d>=m,this._polygonMin=this._verticalSubdivision?c:p,this._testInsidePolygon){let t=0-this._graphicOriginX-this._offsetX-this._stepX,s=e-this._graphicOriginX-this._offsetX+this._stepX,i=-e-this._graphicOriginY-this._offsetY-this._stepY,h=0-this._graphicOriginY-this._offsetY+this._stepY;if(g){const e=[[t,i],[t,h],[s,i],[s,h]];t=i=Number.MAX_VALUE,s=h=-Number.MAX_VALUE;for(const n of e){const e=this._cosAngle*n[0]-this._sinAngle*n[1],_=this._sinAngle*n[0]+this._cosAngle*n[1];t=Math.min(t,e),s=Math.max(s,e),i=Math.min(i,_),h=Math.max(h,_)}}o=o!==Number.MAX_VALUE?Math.max(o,t):t,a=a!==Number.MAX_VALUE?Math.max(a,i):i,l=l!==-Number.MAX_VALUE?Math.min(l,s):s,f=f!==-Number.MAX_VALUE?Math.min(f,h):h}this._xMin=Math.round(o/this._stepX),this._xMax=Math.round(l/this._stepX),this._yMin=Math.round(a/this._stepY),this._yMax=Math.round(f/this._stepY),this._currentX=this._xMax+1,this._currentY=this._yMin-1,this._buildAccelerationMap(t,p,M,c,u)}_buildAccelerationMap(t,s,i,n,_){t.reset();const r=new Map,o=this._verticalSubdivision,a=o?_-n:i-s;let f=Math.ceil(a/h);if(f<=1)return;const c=Math.floor(a/f);let u,p,M,g,d,m,X,x,A,Y,y;for(f++,this._delta=c,o?(A=-e-this._stepY,Y=this._stepY,y=n):(A=-this._stepX,Y=e+this._stepX,y=s);t.nextPath();)if(!(t.numPoints<2)&&t.nextPoint())for(u=t.x,p=t.y;t.nextPoint();u=M,p=g){if(M=t.x,g=t.y,o){if(p===g||p<A&&g<A||p>Y&&g>Y)continue;d=Math.min(p,g),m=Math.max(p,g)}else{if(u===M||u<A&&M<A||u>Y&&M>Y)continue;d=Math.min(u,M),m=Math.max(u,M)}for(;d<m;)X=Math.floor((d-y)/c),l(X,u,p,M,g,r),d+=c;x=Math.floor((m-y)/c),x>X&&l(x,u,p,M,g,r)}this._accelerationMap=r}_nextInside(){for(;;){if(this._currentX>this._xMax){if(this._currentY++,this._currentY>this._yMax)return null;this._currentX=this._xMin,this._shiftOddRows&&this._currentY%2&&this._currentX--}let t=this._currentX*this._stepX+this._offsetX;this._shiftOddRows&&this._currentY%2&&(t+=.5*this._stepX);const s=this._currentY*this._stepY+this._offsetY;let e,h;if(this._currentX++,this._gridType===i.Random){const i=(this._currentX%n+n)%n,_=(this._currentY%n+n)%n;e=this._graphicOriginX+t+this._stepX*this._randomness*(.5-o._randValues[_*n+i])*2/3,h=this._graphicOriginY+s+this._stepY*this._randomness*(.5-o._randValues[_*n+i+1])*2/3}else e=this._graphicOriginX+this._cosAngle*t+this._sinAngle*s,h=this._graphicOriginY-this._sinAngle*t+this._cosAngle*s;if(!this._testInsidePolygon||this._isInsidePolygon(e,h,this._geometryCursor))return this._internalPlacement.setTranslate(e,h),this._internalPlacement}}_isInsidePolygon(t,s,i){if(null==this._accelerationMap)return a(t,s,i);t+=_,s+=_;const e=this._verticalSubdivision,h=e?s:t,n=Math.floor((h-this._polygonMin)/this._delta),r=this._accelerationMap.get(n);if(!r)return!1;let o,l,f,c=0;for(const _ of r){if(o=_[0],l=_[1],e){if(o[1]>s==l[1]>s)continue;f=(l[0]-o[0])*(s-o[1])-(l[1]-o[1])*(t-o[0])}else{if(o[0]>t==l[0]>t)continue;f=(l[1]-o[1])*(t-o[0])-(l[0]-o[0])*(s-o[1])}f>0?c++:c--}return 0!==c}}function a(t,s,i){let e,h,n,r,o=0;for(t+=_,s+=_,i.reset();i.nextPath();)if(i.nextPoint())for(e=i.x,h=i.y;i.nextPoint();e=n,h=r){if(n=i.x,r=i.y,h>s==r>s)continue;(n-e)*(s-h)-(r-h)*(t-e)>0?o++:o--}return 0!==o}function l(t,s,i,e,h,n){let _=n.get(t);_||(_=[],n.set(t,_)),_.push([[s,i],[e,h]])}export{r as PlacementInsidePolygon};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{WGLGeometryType as e,WGLSymbologyType as t}from"../enums.js";import{createProgramDescriptor as o}from"../Utils.js";import r from"./WGLGeometryBrush.js";import{FillMaterialKey as a}from"../materialKey/MaterialKey.js";import{getTechniqueFromMaterialKey as n}from"../techniques/utils.js";import{PrimitiveType as i,DataType as s}from"../../../../webgl/enums.js";const l=16777216;function m(e){const o={geometry:[{location:0,name:"a_pos",count:2,type:s.SHORT},{location:1,name:"a_id",count:3,type:s.UNSIGNED_BYTE},{location:2,name:"a_bitset",count:1,type:s.UNSIGNED_BYTE},{location:3,name:"a_color",count:4,type:s.UNSIGNED_BYTE,normalized:!0},{location:4,name:"a_aux1",count:4,type:s.UNSIGNED_SHORT},{location:5,name:"a_aux2",count:4,type:s.SHORT},{location:6,name:"a_aux3",count:4,type:s.UNSIGNED_BYTE},{location:7,name:"a_zoomRange",count:2,type:s.UNSIGNED_SHORT}]};switch(e.symbologyType){case t.SIMPLE:case t.OUTLINE_FILL_SIMPLE:o.geometry.splice(7,1),o.geometry.splice(4,1)}return{shader:"materials/fill",vertexLayout:o}}class u extends r{dispose(){}getGeometryType(){return e.FILL}supportsSymbology(e){return e!==t.DOT_DENSITY}drawGeometry(e,t,r,s){const{context:u,painter:c,rendererInfo:y,requiredLevel:p,passOptions:_,requestRender:d,allowDelayedRender:f}=e,E=a.load(r.materialKey),S=n(E.data),g=null!=_&&"hittest"===_.type,N=c.materialManager,{shader:T,vertexLayout:I,hittestAttributes:U}=S.programSpec??m(E);let x=i.TRIANGLES,L=o(E.data,I);g&&(L=this._getTriangleDesc(r.materialKey,L,U),x=i.POINTS);const{attributes:h,bufferLayouts:G}=L,O=N.getMaterialProgram(e,E,T,h,s);if(f&&null!=d&&!O.compiled)return void d();if(u.useProgram(O),this._setSharedUniforms(O,e,t),O.setUniform2f("u_tileOffset",512*t.key.col%l,512*t.key.row%l),E.textureBinding){c.textureManager.bindTextures(u,O,E);const e=1/2**(p-t.key.level);O.setUniform1f("u_zoomFactor",e)}const D=1/e.pixelRatio;O.setUniform1f("u_blur",D),O.setUniform1f("u_antialiasing",D),this._setSizeVVUniforms(E,O,y,t),this._setColorAndOpacityVVUniforms(E,O,y);const b=r.target.getVAO(u,G,h,g);let R=r.indexCount,w=r.indexFrom*Uint32Array.BYTES_PER_ELEMENT;g&&(R/=3,w/=3),u.bindVAO(b),this._drawFills(e,t,O,x,R,w)}_drawFills(e,t,o,r,a,n){e.context.drawElements(r,a,s.UNSIGNED_INT,n)}}export{u as default};
5
+ import{MAX_REPRESENTABLE_INT as e,TILE_SIZE as t}from"../definitions.js";import{WGLGeometryType as o,WGLSymbologyType as r}from"../enums.js";import{createProgramDescriptor as a}from"../Utils.js";import i from"./WGLGeometryBrush.js";import{FillMaterialKey as n}from"../materialKey/MaterialKey.js";import{getTechniqueFromMaterialKey as s}from"../techniques/utils.js";import{PrimitiveType as l,DataType as m}from"../../../../webgl/enums.js";function u(e){const t={geometry:[{location:0,name:"a_pos",count:2,type:m.SHORT},{location:1,name:"a_id",count:3,type:m.UNSIGNED_BYTE},{location:2,name:"a_bitset",count:1,type:m.UNSIGNED_BYTE},{location:3,name:"a_color",count:4,type:m.UNSIGNED_BYTE,normalized:!0},{location:4,name:"a_aux1",count:4,type:m.UNSIGNED_SHORT},{location:5,name:"a_aux2",count:4,type:m.SHORT},{location:6,name:"a_aux3",count:4,type:m.UNSIGNED_BYTE},{location:7,name:"a_zoomRange",count:2,type:m.UNSIGNED_SHORT}]};switch(e.symbologyType){case r.SIMPLE:case r.OUTLINE_FILL_SIMPLE:t.geometry.splice(7,1),t.geometry.splice(4,1)}return{shader:"materials/fill",vertexLayout:t}}class c extends i{dispose(){}getGeometryType(){return o.FILL}supportsSymbology(e){return e!==r.DOT_DENSITY}drawGeometry(o,r,i,m){const{context:c,painter:f,rendererInfo:p,requiredLevel:y,passOptions:_,requestRender:d,allowDelayedRender:E}=o,g=n.load(i.materialKey),N=s(g.data),S=null!=_&&"hittest"===_.type,T=f.materialManager,{shader:I,vertexLayout:U,hittestAttributes:x}=N.programSpec??u(g);let h=l.TRIANGLES,L=a(g.data,U);S&&(L=this._getTriangleDesc(i.materialKey,L,x),h=l.POINTS);const{attributes:O,bufferLayouts:G}=L,D=T.getMaterialProgram(o,g,I,O,m);if(E&&null!=d&&!D.compiled)return void d();c.useProgram(D),this._setSharedUniforms(D,o,r);const{row:b,col:R}=r.key,M=R*t,w=b*t;if(D.setUniform2f("u_tileOffset",M%e,w%e),D.setUniform2f("u_maxIntNumOfCrossing",Math.floor(M/e),Math.floor(w/e)),g.textureBinding){f.textureManager.bindTextures(c,D,g);const e=1/2**(y-r.key.level);D.setUniform1f("u_zoomFactor",e)}const j=1/o.pixelRatio;D.setUniform1f("u_blur",j),D.setUniform1f("u_antialiasing",j),this._setSizeVVUniforms(g,D,p,r),this._setColorAndOpacityVVUniforms(g,D,p);const B=i.target.getVAO(c,G,O,S);let A=i.indexCount,F=i.indexFrom*Uint32Array.BYTES_PER_ELEMENT;S&&(A/=3,F/=3),c.bindVAO(B),this._drawFills(o,r,D,h,A,F)}_drawFills(e,t,o,r,a,i){e.context.drawElements(r,a,m.UNSIGNED_INT,i)}}export{c as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- const t=8,e=t-2,c=1e-30,h=64,i=4294967295,o=512,a=256,d=256/360,n=!1,p=128,r=8,s=10,f=29,g=1,l=16,m=16,v=o/p,w=8,x=50,b=10,j=24,k=8,q={metrics:{width:15,height:17,left:0,top:-7,advance:14}},u=1024,y=0,z=0,A=0,B=1,C=2,D=3,E=4,F=5,G=6,H=12,I=5,J=6,K=5,L=6,M=0,N=1,O=2,P=3,Q=3,R=4,S=2,T=1,U=2,V=4,W=!1,X=1.05,Y=3,Z=5,$=6,_=1.15,tt=2,et=2,ct=128-2*et,ht=8,it=500,ot=4,at=128,dt=10,nt=1024,pt=2,rt=0,st=1,ft=4,gt=8,lt=16,mt=4,vt=1,wt=4,xt=8,bt=128,jt=4,kt=2;export{d as ANGLE_FACTOR_256,N as ATTRIBUTE_DATA_ANIMATION,Q as ATTRIBUTE_DATA_DD0,R as ATTRIBUTE_DATA_DD1,M as ATTRIBUTE_DATA_FILTER_FLAGS,O as ATTRIBUTE_DATA_GPGPU,P as ATTRIBUTE_DATA_VV,u as ATTRIBUTE_STORE_TEXTURE_SIZE,q as AVERAGE_GLYPH_MOSAIC_ITEM,xt as BITSET_FILL_HAS_UNRESOLVED_REPLACEMENT_COLOR,wt as BITSET_FILL_RANDOM_PATTERN_OFFSET,lt as BITSET_GENERIC_CONSIDER_ALPHA_ONLY,pt as BITSET_GENERIC_LOCK_COLOR,mt as BITSET_LINE_SCALE_DASH,st as BITSET_MARKER_ALIGNMENT_MAP,rt as BITSET_MARKER_ALIGNMENT_SCREEN,ft as BITSET_MARKER_OUTLINE_ALLOW_COLOR_OVERRIDE,gt as BITSET_MARKER_SCALE_SYMBOLS_PROPORTIONALLY,vt as BITSET_TYPE_FILL_OUTLINE,at as BUFFER_DATA_MINIMUM_SIZE,ot as BUFFER_DATA_POOL_SIZE,s as CHART_MAX_FIELDS,m as COLLISION_BOX_PADDING,p as COLLISION_BUCKET_SIZE,l as COLLISION_EARLY_REJECT_BUCKET_SIZE,g as COLLISION_MAX_ZOOM_DELTA,w as COLLISION_PLACEMENT_PADDING,v as COLLISION_TILE_BOX_SIZE,n as DEBUG_LABELS,ht as DISPLAY_RECORD_INT_PER_ELEMENT,r as DOT_DENSITY_MAX_FIELDS,V as EFFECT_FLAG_0,W as ENABLE_EARLY_LABEL_DISCARD,h as EXTRUDE_SCALE,U as FILTER_FLAG_0,j as GLYPH_SIZE,b as HEURISTIC_GLYPHS_PER_FEATURE,x as HEURISTIC_GLYPHS_PER_LINE,T as HIGHLIGHT_FLAG,Y as HITTEST_RADIUS,f as MAGIC_LABEL_LINE_HEIGHT,S as MAX_FILTERS,tt as MAX_GPU_UPLOADS_PER_FRAME,dt as MIN_MAX_ZOOM_PRECISION_FACTOR,c as NAN_MAGIC_NUMBER,it as PATCH_PIXEL_BUFFER_ALLOC_SIZE,kt as PATTERN_FILL_RASTERIZATION_SCALE,i as PICTURE_FILL_COLOR,nt as RANDOM_INSIDE_POLYGON_TEXTURE_SIZE,a as RASTER_TILE_SIZE,ct as SDF_TEXTURE_SIZE,et as SPRITE_PADDING,B as TEXTURE_BINDING_ATTRIBUTE_DATA_0,C as TEXTURE_BINDING_ATTRIBUTE_DATA_1,D as TEXTURE_BINDING_ATTRIBUTE_DATA_2,E as TEXTURE_BINDING_ATTRIBUTE_DATA_3,F as TEXTURE_BINDING_ATTRIBUTE_DATA_4,G as TEXTURE_BINDING_ATTRIBUTE_DATA_5,A as TEXTURE_BINDING_BITMAP,z as TEXTURE_BINDING_GLYPH_ATLAS,H as TEXTURE_BINDING_GPGPU,I as TEXTURE_BINDING_HIGHLIGHT_0,J as TEXTURE_BINDING_HIGHLIGHT_1,K as TEXTURE_BINDING_RENDERER_0,L as TEXTURE_BINDING_RENDERER_1,y as TEXTURE_BINDING_SPRITE_ATLAS,jt as TEXTURE_UPLOAD_MANAGER_BUDGET,bt as TEXTURE_UPLOAD_MANAGER_CHUNK_SIZE,k as TEXT_PLACEMENT_PADDING,X as THIN_LINE_HALF_WIDTH_THRESHOLD,o as TILE_SIZE,_ as VTL_HIGH_RES_CUTOFF,$ as VTL_TEXTURE_BINDING_UNIT_GLYPHS,Z as VTL_TEXTURE_BINDING_UNIT_SPRITES,e as WEBGL_MAX_INNER_STOPS,t as WEBGL_MAX_STOPS};
5
+ import has from"../../../../core/has.js";const e=8,r=e-2,t=1e-30,o=64,a=4294967295,c=512,d=256,f=256/360,h=128,i=511,m=16777216,s=!1,p=128,l=8,n=10,w=29,x=1,g=16,j=16,k=c/p,u=8,v=50,y=10,b=24,q=8,z={metrics:{width:15,height:17,left:0,top:-7,advance:14}},A=1024,B=0,C=0,D=0,E=1,F=2,G=3,H=4,I=5,J=6,K=12,L=5,M=6,N=5,O=6,P=0,Q=1,R=2,S=3,T=3,U=4,V=2,W=1,X=2,Y=4,Z=!1,$=1.05,_=has("featurelayer-force-marker-text-draw-order")?.5:3,ee=5,re=6,te=1.15,oe=2,ae=2,ce=128-2*ae,de=8,fe=500,he=4,ie=128,me=10,se=1024,pe=2,le=0,ne=1,we=4,xe=8,ge=16,je=4,ke=1,ue=4,ve=8,ye=32,be=64,qe=128,ze=4,Ae=2;export{f as ANGLE_FACTOR_256,Q as ATTRIBUTE_DATA_ANIMATION,T as ATTRIBUTE_DATA_DD0,U as ATTRIBUTE_DATA_DD1,P as ATTRIBUTE_DATA_FILTER_FLAGS,R as ATTRIBUTE_DATA_GPGPU,S as ATTRIBUTE_DATA_VV,A as ATTRIBUTE_STORE_TEXTURE_SIZE,z as AVERAGE_GLYPH_MOSAIC_ITEM,ye as BITSET_FILL_HAS_PATTERN_HEIGHT_PRECISION_FACTOR,be as BITSET_FILL_HAS_PATTERN_WIDTH_PRECISION_FACTOR,ve as BITSET_FILL_HAS_UNRESOLVED_REPLACEMENT_COLOR,ue as BITSET_FILL_RANDOM_PATTERN_OFFSET,ge as BITSET_GENERIC_CONSIDER_ALPHA_ONLY,pe as BITSET_GENERIC_LOCK_COLOR,je as BITSET_LINE_SCALE_DASH,ne as BITSET_MARKER_ALIGNMENT_MAP,le as BITSET_MARKER_ALIGNMENT_SCREEN,we as BITSET_MARKER_OUTLINE_ALLOW_COLOR_OVERRIDE,xe as BITSET_MARKER_SCALE_SYMBOLS_PROPORTIONALLY,ke as BITSET_TYPE_FILL_OUTLINE,ie as BUFFER_DATA_MINIMUM_SIZE,he as BUFFER_DATA_POOL_SIZE,n as CHART_MAX_FIELDS,j as COLLISION_BOX_PADDING,p as COLLISION_BUCKET_SIZE,g as COLLISION_EARLY_REJECT_BUCKET_SIZE,x as COLLISION_MAX_ZOOM_DELTA,u as COLLISION_PLACEMENT_PADDING,k as COLLISION_TILE_BOX_SIZE,h as COMPRESSION_FACTOR_FOR_U16,s as DEBUG_LABELS,de as DISPLAY_RECORD_INT_PER_ELEMENT,l as DOT_DENSITY_MAX_FIELDS,Y as EFFECT_FLAG_0,Z as ENABLE_EARLY_LABEL_DISCARD,o as EXTRUDE_SCALE,X as FILTER_FLAG_0,b as GLYPH_SIZE,y as HEURISTIC_GLYPHS_PER_FEATURE,v as HEURISTIC_GLYPHS_PER_LINE,W as HIGHLIGHT_FLAG,_ as HITTEST_RADIUS,w as MAGIC_LABEL_LINE_HEIGHT,V as MAX_FILTERS,oe as MAX_GPU_UPLOADS_PER_FRAME,m as MAX_REPRESENTABLE_INT,i as MAX_SIZE_FOR_U16_COMPRESSION,me as MIN_MAX_ZOOM_PRECISION_FACTOR,t as NAN_MAGIC_NUMBER,fe as PATCH_PIXEL_BUFFER_ALLOC_SIZE,Ae as PATTERN_FILL_RASTERIZATION_SCALE,a as PICTURE_FILL_COLOR,se as RANDOM_INSIDE_POLYGON_TEXTURE_SIZE,d as RASTER_TILE_SIZE,ce as SDF_TEXTURE_SIZE,ae as SPRITE_PADDING,E as TEXTURE_BINDING_ATTRIBUTE_DATA_0,F as TEXTURE_BINDING_ATTRIBUTE_DATA_1,G as TEXTURE_BINDING_ATTRIBUTE_DATA_2,H as TEXTURE_BINDING_ATTRIBUTE_DATA_3,I as TEXTURE_BINDING_ATTRIBUTE_DATA_4,J as TEXTURE_BINDING_ATTRIBUTE_DATA_5,D as TEXTURE_BINDING_BITMAP,C as TEXTURE_BINDING_GLYPH_ATLAS,K as TEXTURE_BINDING_GPGPU,L as TEXTURE_BINDING_HIGHLIGHT_0,M as TEXTURE_BINDING_HIGHLIGHT_1,N as TEXTURE_BINDING_RENDERER_0,O as TEXTURE_BINDING_RENDERER_1,B as TEXTURE_BINDING_SPRITE_ATLAS,ze as TEXTURE_UPLOAD_MANAGER_BUDGET,qe as TEXTURE_UPLOAD_MANAGER_CHUNK_SIZE,q as TEXT_PLACEMENT_PADDING,$ as THIN_LINE_HALF_WIDTH_THRESHOLD,c as TILE_SIZE,te as VTL_HIGH_RES_CUTOFF,re as VTL_TEXTURE_BINDING_UNIT_GLYPHS,ee as VTL_TEXTURE_BINDING_UNIT_SPRITES,r as WEBGL_MAX_INNER_STOPS,e as WEBGL_MAX_STOPS};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{pt2px as t}from"../../../../../../core/screenUtils.js";import{isFeatureValueFn as e}from"../../../../../../symbols/cim/utils.js";import{premultiplyAlphaRGBA as s}from"../../color.js";import{BITSET_GENERIC_LOCK_COLOR as i,BITSET_FILL_RANDOM_PATTERN_OFFSET as o,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as r,BITSET_FILL_HAS_UNRESOLVED_REPLACEMENT_COLOR as a,SPRITE_PADDING as l,MIN_MAX_ZOOM_PRECISION_FACTOR as n}from"../../definitions.js";import{degToByte as c}from"../../GeometryUtils.js";import{i1616to32 as h,i8888to32 as f}from"../../number.js";import{FillMaterialKey as m}from"../../materialKey/MaterialKey.js";import{getMinMaxZoom as p}from"./util.js";import _ from"./WGLBaseFillTemplate.js";import y from"./WGLDynamicMeshTemplate.js";import{ok as d}from"../../util/Result.js";const u=128;class M extends(_(y)){constructor(l,f,m){if(super(l),this._minMaxZoom=h(Math.round(f*n),Math.round(m*n)),e(l.color)){const t=(t,e,i)=>{const o=l.color(t,e,i);return o&&s(o)||0};this._dynamicPropertyMap.set("fillColor",t)}else{const t=l.color;this.fillColor=t&&s(t)||0}const p="CIMMarkerPlacementInsidePolygon"===l.cim.placement?.type&&l.cim.placement.shiftOddRows?2:1,_=l.height;if(e(_)){const t=(t,e,s)=>_(t,e,s)*p;this._dynamicPropertyMap.set("_height",t)}else this._height=(_||0)*p;const y=l.offsetX;if(e(y)){const e=(e,s,i)=>t(y(e,s,i));this._dynamicPropertyMap.set("_offsetX",e)}else this._offsetX=t(y||0);const d=l.offsetY;if(e(d)){const e=(e,s,i)=>t(-d(e,s,i));this._dynamicPropertyMap.set("_offsetY",e)}else this._offsetY=t(-d||0);const u=l.scaleX;e(u)?this._dynamicPropertyMap.set("_scaleX",u):this._scaleX=u||1;const M=l.angle;if(e(M)){const t=(t,e,s)=>c(M(t,e,s));this._dynamicPropertyMap.set("_angle",t)}else this._angle=c(M)||0;if(null!=l.effects){const t=l.effects;e(t)?this._dynamicPropertyMap.set("_effects",t):this._effects=t}this._cimFillLayer=l,this._bitset=(l.colorLocked?i:0)|(l.applyRandomOffset?o:0)|(l.sampleAlphaOnly?r:0)|(l.hasUnresolvedReplacementColor?a:0),this._fillMaterialKey=l.materialKey}static fromCIMFill(t,e){const[s,i]=p(t.scaleInfo,e);return new M(t,s,i)}bindFeature(e,s,i){const o=e.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,e)=>{this[e]=t(o,s,i)}));const r=m.load(this._fillMaterialKey),a=this._materialCache,n=(0,this._cimFillLayer.materialHash)(o,s,i),c=a.get(n);let p=null;if(c&&d(c.spriteMosaicItem)&&(p=c.spriteMosaicItem),p){const{rect:e,width:s,height:i}=p,o=e.x+l,a=e.y+l,n=o+s,c=a+i;let m=Math.round(t(this._height));m<=0&&(m=c-a);let _=Math.round(t(this._height/i*s||0));_<=0&&(_=n-o);const y=this._scaleX,d=1;this.tl=h(o,a),this.br=h(n,c),this.aux21=h(_,m),this.aux22=h(this._offsetX,this._offsetY),this.aux3=f(y*u,d*u,this._angle,0),r.sdf=p.sdf,r.pattern=!0,r.textureBinding=p.textureBinding}else this.tl=0,this.br=0,this.aux21=0,this.aux22=0,this.aux3=0,r.sdf=!1,r.pattern=!1,r.textureBinding=0;this._materialKey=r.data}}export{M as default};
5
+ import{pt2px as t}from"../../../../../../core/screenUtils.js";import{isFeatureValueFn as e}from"../../../../../../symbols/cim/utils.js";import{premultiplyAlphaRGBA as s}from"../../color.js";import{BITSET_GENERIC_LOCK_COLOR as i,BITSET_FILL_RANDOM_PATTERN_OFFSET as o,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as r,BITSET_FILL_HAS_UNRESOLVED_REPLACEMENT_COLOR as a,SPRITE_PADDING as l,MAX_SIZE_FOR_U16_COMPRESSION as h,COMPRESSION_FACTOR_FOR_U16 as n,BITSET_FILL_HAS_PATTERN_HEIGHT_PRECISION_FACTOR as c,BITSET_FILL_HAS_PATTERN_WIDTH_PRECISION_FACTOR as f,MIN_MAX_ZOOM_PRECISION_FACTOR as m}from"../../definitions.js";import{degToByte as p}from"../../GeometryUtils.js";import{i1616to32 as _,i8888to32 as y}from"../../number.js";import{FillMaterialKey as d}from"../../materialKey/MaterialKey.js";import{getMinMaxZoom as u}from"./util.js";import M from"./WGLBaseFillTemplate.js";import g from"./WGLDynamicMeshTemplate.js";import{ok as x}from"../../util/Result.js";class j extends(M(g)){constructor(l,h,n){if(super(l),this._minMaxZoom=_(Math.round(h*m),Math.round(n*m)),e(l.color)){const t=(t,e,i)=>{const o=l.color(t,e,i);return o&&s(o)||0};this._dynamicPropertyMap.set("fillColor",t)}else{const t=l.color;this.fillColor=t&&s(t)||0}const c="CIMMarkerPlacementInsidePolygon"===l.cim.placement?.type&&l.cim.placement.shiftOddRows?2:1,f=l.height;if(e(f)){const t=(t,e,s)=>f(t,e,s)*c;this._dynamicPropertyMap.set("_height",t)}else this._height=(f||0)*c;const y=l.offsetX;if(e(y)){const e=(e,s,i)=>t(y(e,s,i));this._dynamicPropertyMap.set("_offsetX",e)}else this._offsetX=t(y||0);const d=l.offsetY;if(e(d)){const e=(e,s,i)=>t(-d(e,s,i));this._dynamicPropertyMap.set("_offsetY",e)}else this._offsetY=t(-d||0);const u=l.scaleX;e(u)?this._dynamicPropertyMap.set("_scaleX",u):this._scaleX=u||1;const M=l.angle;if(e(M)){const t=(t,e,s)=>p(M(t,e,s));this._dynamicPropertyMap.set("_angle",t)}else this._angle=p(M)||0;if(null!=l.effects){const t=l.effects;e(t)?this._dynamicPropertyMap.set("_effects",t):this._effects=t}this._cimFillLayer=l,this._bitset=(l.colorLocked?i:0)|(l.applyRandomOffset?o:0)|(l.sampleAlphaOnly?r:0)|(l.hasUnresolvedReplacementColor?a:0),this._fillMaterialKey=l.materialKey}static fromCIMFill(t,e){const[s,i]=u(t.scaleInfo,e);return new j(t,s,i)}bindFeature(e,s,i){const o=e.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,e)=>{this[e]=t(o,s,i)}));const r=d.load(this._fillMaterialKey),a=this._materialCache,m=(0,this._cimFillLayer.materialHash)(o,s,i),p=a.get(m);let u=null;if(p&&x(p.spriteMosaicItem)&&(u=p.spriteMosaicItem),u){const{rect:e,width:s,height:i}=u,o=e.x+l,a=e.y+l,m=o+s,p=a+i;let d=t(this._height);d<=0&&(d=p-a),d<h&&(d*=n,this._bitset|=c),d=Math.round(d);let M=t(this._height/i*s);M<=0&&(M=m-o),M<h&&(M*=n,this._bitset|=f),M=Math.round(M);const g=this._scaleX,x=1;this.tl=_(o,a),this.br=_(m,p),this.aux21=_(M,d),this.aux22=_(this._offsetX,this._offsetY),this.aux3=y(g*n,x*n,this._angle,0),r.sdf=u.sdf,r.pattern=!0,r.textureBinding=u.textureBinding}else this.tl=0,this.br=0,this.aux21=0,this.aux22=0,this.aux3=0,r.sdf=!1,r.pattern=!1,r.textureBinding=0;this._materialKey=r.data}}export{j as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{pt2px as t}from"../../../../../../core/screenUtils.js";import{premultiplyAlphaRGBAArray as e,premultiplyAlphaRGBA as i}from"../../color.js";import{BITSET_GENERIC_LOCK_COLOR as l,BITSET_FILL_RANDOM_PATTERN_OFFSET as o,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as r,BITSET_FILL_HAS_UNRESOLVED_REPLACEMENT_COLOR as s,SPRITE_PADDING as a,MIN_MAX_ZOOM_PRECISION_FACTOR as n,PICTURE_FILL_COLOR as m}from"../../definitions.js";import{degToByte as f}from"../../GeometryUtils.js";import{i1616to32 as c,i8888to32 as h}from"../../number.js";import{FillMaterialKey as d}from"../../materialKey/MaterialKey.js";import{getMinMaxZoom as u,DEFAULT_MIN_ZOOM as p,DEFAULT_MAX_ZOOM as y}from"./util.js";import x from"./WGLBaseFillTemplate.js";import M from"./WGLMeshTemplate.js";const j=128;class w extends(x(M)){constructor(t,e,i,l,o,r,s,a,m,f,u,p,y,x,M,j){super(),this._effects=x||void 0;const w=d.load(t);e&&(w.sdf=e.sdf,w.pattern=!0,w.textureBinding=e.textureBinding),this.fillColor=i,this.tl=l,this.br=o,this.aux21=c(r,s),this.aux22=c(a,m),this.aux3=h(f,u,p,0),this._bitset=y,this._minMaxZoom=c(Math.round(M*n),Math.round(j*n)),this._materialKey=w.data}static fromCIMFill(e,n,m){const h=e.color,d=h&&i(h)||0,p=e.materialKey,[y,x]=u(e.scaleInfo,m),M=(e.colorLocked?l:0)|(e.applyRandomOffset?o:0)|(e.sampleAlphaOnly?r:0)|(e.hasUnresolvedReplacementColor?s:0);if(!n)return new w(p,null,d,0,0,0,0,0,0,0,0,0,M,e.effects,y,x);const{rect:g,width:F,height:K}=n,_=e.scaleX||1,b=g.x+a,L=g.y+a,C=b+F,T=L+K,A=t(e.height);let B=_*A;"CIMHatchFill"===e.cim.type&&(B*=F/K);let G=Math.round(A);G<=0&&(G=T-L);let I=Math.round(B);I<=0&&(I=C-b);const R=t(e.offsetX||0),S=t(-e.offsetY||0),U=c(b,L),v=c(C,T);return new w(p,n,d,U,v,I,G,R,S,j,j,f(e.angle),M,e.effects,y,x)}static fromSimpleFill(t,i,o=!1){const{color:r}=t,s=r&&"esriSFSNull"!==t.style&&e(r)||0,n=o?l:0,m=t.materialKey;let f;if(i){const{rect:t,width:e,height:l,pixelRatio:o}=i,r=t.x+a,h=t.y+a,d=r+e,u=h+l,x=c(r,h),M=c(d,u);f=new w(m,i,s,x,M,e/o,l/o,0,0,j,j,0,n,null,p,y)}else f=new w(m,null,s,0,0,0,0,0,0,0,0,0,n,null,p,y);return f._maybeAddLineTemplate(t),f}static fromPictureFill(e,i,o=!1){const r=m,{rect:s,width:n,height:f}=i,h=s.x+a,d=s.y+a,u=h+n,x=d+f,M=c(h,d),g=c(u,x),F=Math.round(t(e.width)),K=Math.round(t(e.height)),_=t(e.xoffset),b=t(-e.yoffset),L=e.materialKey,C=o?l:0,T=new w(L,i,r,M,g,F,K,_,b,j*e.xscale,j*e.yscale,0,C,null,p,y);return T._maybeAddLineTemplate(e),T}}export{w as default};
5
+ import{pt2px as t}from"../../../../../../core/screenUtils.js";import{premultiplyAlphaRGBAArray as e,premultiplyAlphaRGBA as l}from"../../color.js";import{BITSET_GENERIC_LOCK_COLOR as o,BITSET_FILL_RANDOM_PATTERN_OFFSET as r,BITSET_GENERIC_CONSIDER_ALPHA_ONLY as i,BITSET_FILL_HAS_UNRESOLVED_REPLACEMENT_COLOR as s,SPRITE_PADDING as a,MAX_SIZE_FOR_U16_COMPRESSION as n,COMPRESSION_FACTOR_FOR_U16 as m,BITSET_FILL_HAS_PATTERN_HEIGHT_PRECISION_FACTOR as c,BITSET_FILL_HAS_PATTERN_WIDTH_PRECISION_FACTOR as f,MIN_MAX_ZOOM_PRECISION_FACTOR as h,PICTURE_FILL_COLOR as d}from"../../definitions.js";import{degToByte as u}from"../../GeometryUtils.js";import{i1616to32 as p,i8888to32 as y}from"../../number.js";import{FillMaterialKey as x}from"../../materialKey/MaterialKey.js";import{getMinMaxZoom as M,DEFAULT_MIN_ZOOM as j,DEFAULT_MAX_ZOOM as w}from"./util.js";import g from"./WGLBaseFillTemplate.js";import F from"./WGLMeshTemplate.js";class K extends(g(F)){constructor(t,e,l,o,r,i,s,a,n,m,c,f,d,u,M,j){super(),this._effects=u||void 0;const w=x.load(t);e&&(w.sdf=e.sdf,w.pattern=!0,w.textureBinding=e.textureBinding),this.fillColor=l,this.tl=o,this.br=r,this.aux21=p(i,s),this.aux22=p(a,n),this.aux3=y(m,c,f,0),this._bitset=d,this._minMaxZoom=p(Math.round(M*h),Math.round(j*h)),this._materialKey=w.data}static fromCIMFill(e,h,d){const y=e.color,x=y&&l(y)||0,j=e.materialKey,[w,g]=M(e.scaleInfo,d);let F=(e.colorLocked?o:0)|(e.applyRandomOffset?r:0)|(e.sampleAlphaOnly?i:0)|(e.hasUnresolvedReplacementColor?s:0);if(!h)return new K(j,null,x,0,0,0,0,0,0,0,0,0,F,e.effects,w,g);const{rect:_,width:b,height:L}=h,C=e.scaleX||1,T=_.x+a,A=_.y+a,B=T+b,G=A+L,I=t(e.height);let R=C*I;"CIMHatchFill"===e.cim.type&&(R*=b/L);let S=I;S<=0&&(S=G-A),S<n&&(S*=m,F|=c),S=Math.round(S);let U=R;U<=0&&(U=B-T),U<n&&(U*=m,F|=f),U=Math.round(U);const v=t(e.offsetX||0),O=t(-e.offsetY||0),W=p(T,A),X=p(B,G);return new K(j,h,x,W,X,U,S,v,O,m,m,u(e.angle),F,e.effects,w,g)}static fromSimpleFill(t,l,r=!1){const{color:i}=t,s=i&&"esriSFSNull"!==t.style&&e(i)||0;let h=r?o:0;const d=t.materialKey;let u;if(l){const{rect:t,width:e,height:o,pixelRatio:r}=l,i=t.x+a,y=t.y+a,x=i+e,M=y+o,g=p(i,y),F=p(x,M);let _=e/r;_<n&&(_*=m,h|=f),_=Math.round(_);let b=o/r;b<n&&(b*=m,h|=c),b=Math.round(b),u=new K(d,l,s,g,F,_,b,0,0,m,m,0,h,null,j,w)}else u=new K(d,null,s,0,0,0,0,0,0,0,0,0,h,null,j,w);return u._maybeAddLineTemplate(t),u}static fromPictureFill(e,l,r=!1){const i=d,{rect:s,width:h,height:u}=l,y=s.x+a,x=s.y+a,M=y+h,g=x+u,F=p(y,x),_=p(M,g);let b=r?o:0,L=t(e.width);L<n&&(L*=m,b|=f),L=Math.round(L);let C=t(e.height);C<n&&(C*=m,b|=c),C=Math.round(C);const T=t(e.xoffset),A=t(-e.yoffset),B=e.materialKey,G=new K(B,l,i,F,_,L,C,T,A,m*e.xscale,m*e.yscale,0,b,null,j,w);return G._maybeAddLineTemplate(e),G}}export{K as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.27/esri/copyright.txt for details.
4
4
  */
5
- import{isArrayLike as e}from"../../../../../core/arrayUtils.js";import{WGLDrawPhase as t,WGLGeometryType as r,WGLSymbologyType as s}from"../enums.js";import{CompareFunction as n}from"../../../../webgl/enums.js";class o{constructor(e,r){this.brushes=e,this.name=r.name,this.drawPhase=r.drawPhase||t.MAP,this._targetFn=r.target,this.effects=r.effects||[],this.enableDefaultDraw=r.enableDefaultDraw??(()=>!0),this.forceDrawByDisplayOrder=!!r.forceDrawByDisplayOrder}render(e){const{context:t,profiler:r}=e,s=this._targetFn(),n=this.drawPhase&e.drawPhase;if(r.recordPassStart(this.name),n){this.enableDefaultDraw()&&this._doRender(e,s),r.recordPassEnd();for(const r of this.effects){if(!r.enable())continue;const n=r.apply,o=r.args&&r.args(),a=t.getViewport(),i=t.getBoundFramebufferObject(),f=e.passOptions;this._bindEffect(e,n,o),this._doRender(e,s,n.defines),this._drawAndUnbindEffect(e,n,a,i,f,o)}}}_doRender(e,t,o){if(null==t)return;const{profiler:a,context:i}=e;if(this.forceDrawByDisplayOrder){for(const r of this.brushes){if(a.recordBrushStart(r.name),null!=r.brushEffect){const s=i.getViewport(),n=i.getBoundFramebufferObject(),a=e.passOptions;this._bindEffect(e,r.brushEffect),this._drawWithBrush(r,e,t,o),this._drawAndUnbindEffect(e,r.brushEffect,s,n,a)}else this._drawWithBrush(r,e,t,o);a.recordBrushEnd()}const f=t,c=e;c.attributeView.bindTextures(e.context);for(const e of f){if(!e.visible)continue;e.commit(c),c.context.setStencilFunction(n.EQUAL,e.stencilRef,255);const t=e.getGeometry(r.MARKER),a=e.getGeometry(r.TEXT);if(null!=t&&t.records&&null!=a&&a.records){const n=new Map,i=t.records.getCursor();for(;i.next();)n.set(i.id,[i.getDrawInfo(t,r.MARKER)]);const f=a.records.getCursor();for(;f.next();){const e=n.get(f.id),t=f.getDrawInfo(a,r.TEXT);e?e.push(t):n.set(f.id,[t])}for(const t of n.values())for(const r of t){const t=c.painter.getBrush(r.geometryType,s.DEFAULT);t.prepareState(c,o),t.drawGeometry(c,e,r,o)}}else if(t){const n=c.painter.getBrush(r.MARKER,s.DEFAULT);n.prepareState(c,o),t.forEachCommand((t=>{n.drawGeometry(c,e,t,o)}))}else if(a){const t=c.painter.getBrush(r.TEXT,s.DEFAULT);t.prepareState(c,o),a.forEachCommand((r=>{t.drawGeometry(c,e,r,o)}))}}}else for(const r of this.brushes){if(a.recordBrushStart(r.name),null!=r.brushEffect){const s=i.getViewport(),n=i.getBoundFramebufferObject(),a=e.passOptions;this._bindEffect(e,r.brushEffect),this._drawWithBrush(r,e,t,o),this._drawAndUnbindEffect(e,r.brushEffect,s,n,a)}else this._drawWithBrush(r,e,t,o);a.recordBrushEnd()}}_drawWithBrush(t,r,s,n){e(s)?(t.prepareState(r,n),t.drawMany(r,s,n)):s.visible&&(t.prepareState(r,n),t.draw(r,s,n))}_bindEffect(e,t,r){const{profiler:s}=e;s.recordPassStart(this.name+"."+t.name),t.bind(e,r);const n=t.createOptions(e,r);e.passOptions=n}_drawAndUnbindEffect(e,t,r,s,n,o){const{profiler:a,context:i}=e;e.passOptions=n,a.recordBrushStart(t.name),t.draw(e,o),t.unbind(e,o),i.bindFramebuffer(s);const{x:f,y:c,width:d,height:h}=r;i.setViewport(f,c,d,h),a.recordBrushEnd(),a.recordPassEnd()}}export{o as default};
5
+ import{isArrayLike as e}from"../../../../../core/arrayUtils.js";import{WGLDrawPhase as t,WGLGeometryType as r,WGLSymbologyType as s}from"../enums.js";import{CompareFunction as n}from"../../../../webgl/enums.js";class o{constructor(e,r){this.brushes=e,this.name=r.name,this.drawPhase=r.drawPhase||t.MAP,this._targetFn=r.target,this.effects=r.effects||[],this.enableDefaultDraw=r.enableDefaultDraw??(()=>!0),this.forceDrawByDisplayOrder=!!r.forceDrawByDisplayOrder}render(e){const{context:t,profiler:r}=e,s=this._targetFn(),n=this.drawPhase&e.drawPhase;if(r.recordPassStart(this.name),n){this.enableDefaultDraw()&&this._doRender(e,s),r.recordPassEnd();for(const r of this.effects){if(!r.enable())continue;const n=r.apply,o=r.args&&r.args(),a=t.getViewport(),i=t.getBoundFramebufferObject(),f=e.passOptions;this._bindEffect(e,n,o),this._doRender(e,s,n.defines),this._drawAndUnbindEffect(e,n,a,i,f,o)}}}_doRender(e,t,o){if(null==t)return;const{profiler:a,context:i}=e;if(this.forceDrawByDisplayOrder){for(const r of this.brushes){if(a.recordBrushStart(r.name),null!=r.brushEffect){const s=i.getViewport(),n=i.getBoundFramebufferObject(),a=e.passOptions;this._bindEffect(e,r.brushEffect),this._drawWithBrush(r,e,t,o),this._drawAndUnbindEffect(e,r.brushEffect,s,n,a)}else this._drawWithBrush(r,e,t,o);a.recordBrushEnd()}const f=t,c=e;c.attributeView.bindTextures(e.context);for(const e of f){if(!e.visible)continue;e.commit(c),c.context.setStencilFunction(n.EQUAL,e.stencilRef,255);const t=e.getGeometry(r.MARKER),a=e.getGeometry(r.TEXT);if(null!=t&&t.records&&null!=a&&a.records){const n=new Map,i=t.records.getCursor();for(;i.next();)n.set(i.id,[i.getDrawInfo(t,r.MARKER)]);const f=a.records.getCursor();for(;f.next();){const e=n.get(f.id),t=f.getDrawInfo(a,r.TEXT);e?e.push(t):n.set(f.id,[t])}const d=Array.from(n.entries()).sort((([e,t],[r,s])=>r-e));for(const[t,r]of d)for(const n of r){const t=c.painter.getBrush(n.geometryType,s.DEFAULT);t.prepareState(c,o),t.drawGeometry(c,e,n,o)}}else if(t){const n=c.painter.getBrush(r.MARKER,s.DEFAULT);n.prepareState(c,o),t.forEachCommand((t=>{n.drawGeometry(c,e,t,o)}))}else if(a){const t=c.painter.getBrush(r.TEXT,s.DEFAULT);t.prepareState(c,o),a.forEachCommand((r=>{t.drawGeometry(c,e,r,o)}))}}}else for(const r of this.brushes){if(a.recordBrushStart(r.name),null!=r.brushEffect){const s=i.getViewport(),n=i.getBoundFramebufferObject(),a=e.passOptions;this._bindEffect(e,r.brushEffect),this._drawWithBrush(r,e,t,o),this._drawAndUnbindEffect(e,r.brushEffect,s,n,a)}else this._drawWithBrush(r,e,t,o);a.recordBrushEnd()}}_drawWithBrush(t,r,s,n){e(s)?(t.prepareState(r,n),t.drawMany(r,s,n)):s.visible&&(t.prepareState(r,n),t.draw(r,s,n))}_bindEffect(e,t,r){const{profiler:s}=e;s.recordPassStart(this.name+"."+t.name),t.bind(e,r);const n=t.createOptions(e,r);e.passOptions=n}_drawAndUnbindEffect(e,t,r,s,n,o){const{profiler:a,context:i}=e;e.passOptions=n,a.recordBrushStart(t.name),t.draw(e,o),t.unbind(e,o),i.bindFramebuffer(s);const{x:f,y:c,width:d,height:h}=r;i.setViewport(f,c,d,h),a.recordBrushEnd(),a.recordPassEnd()}}export{o as default};