@arcgis/core 4.28.0-rc.0 → 4.28.0-rc.1

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 (441) hide show
  1. package/assets/components/assets/icon/addConstant16.json +1 -0
  2. package/assets/components/assets/icon/addConstant24.json +1 -0
  3. package/assets/components/assets/icon/addConstant32.json +1 -0
  4. package/assets/components/assets/icon/addRasterVariable16.json +1 -0
  5. package/assets/components/assets/icon/addRasterVariable24.json +1 -0
  6. package/assets/components/assets/icon/addRasterVariable32.json +1 -0
  7. package/assets/components/assets/icon/addRasters16.json +1 -0
  8. package/assets/components/assets/icon/addRasters24.json +1 -0
  9. package/assets/components/assets/icon/addRasters32.json +1 -0
  10. package/assets/components/assets/icon/alertOffCircle16F.json +1 -0
  11. package/assets/components/assets/icon/alertOffCircle24F.json +1 -0
  12. package/assets/components/assets/icon/alertOffCircle32F.json +1 -0
  13. package/assets/components/assets/icon/boxChartSeries16.json +1 -0
  14. package/assets/components/assets/icon/boxChartSeries24.json +1 -0
  15. package/assets/components/assets/icon/boxChartSeries32.json +1 -0
  16. package/assets/components/assets/icon/breakRecurrence16.json +1 -0
  17. package/assets/components/assets/icon/breakRecurrence24.json +1 -0
  18. package/assets/components/assets/icon/breakRecurrence32.json +1 -0
  19. package/assets/components/assets/icon/bulletPoint16.json +1 -1
  20. package/assets/components/assets/icon/bulletPoint24.json +1 -1
  21. package/assets/components/assets/icon/bulletPoint32.json +1 -1
  22. package/assets/components/assets/icon/bulletPointLarge16.json +1 -0
  23. package/assets/components/assets/icon/bulletPointLarge24.json +1 -0
  24. package/assets/components/assets/icon/bulletPointLarge32.json +1 -0
  25. package/assets/components/assets/icon/chevronEnd16.json +1 -0
  26. package/assets/components/assets/icon/chevronEnd24.json +1 -0
  27. package/assets/components/assets/icon/chevronEnd32.json +1 -0
  28. package/assets/components/assets/icon/chevronStart16.json +1 -0
  29. package/assets/components/assets/icon/chevronStart24.json +1 -0
  30. package/assets/components/assets/icon/chevronStart32.json +1 -0
  31. package/assets/components/assets/icon/configureGridUnit16.json +1 -0
  32. package/assets/components/assets/icon/configureGridUnit24.json +1 -0
  33. package/assets/components/assets/icon/configureGridUnit32.json +1 -0
  34. package/assets/components/assets/icon/dimensionsUnit16.json +1 -0
  35. package/assets/components/assets/icon/dimensionsUnit24.json +1 -0
  36. package/assets/components/assets/icon/dimensionsUnit32.json +1 -0
  37. package/assets/components/assets/icon/dimensionsWall16.json +1 -0
  38. package/assets/components/assets/icon/dimensionsWall24.json +1 -0
  39. package/assets/components/assets/icon/dimensionsWall32.json +1 -0
  40. package/assets/components/assets/icon/flipVertical16.json +1 -0
  41. package/assets/components/assets/icon/flipVertical24.json +1 -0
  42. package/assets/components/assets/icon/flipVertical32.json +1 -0
  43. package/assets/components/assets/icon/imageCollectionExplorer16.json +1 -0
  44. package/assets/components/assets/icon/imageCollectionExplorer24.json +1 -0
  45. package/assets/components/assets/icon/imageCollectionExplorer32.json +1 -0
  46. package/assets/components/assets/icon/imageMagnifyingGlass16.json +1 -0
  47. package/assets/components/assets/icon/imageMagnifyingGlass24.json +1 -0
  48. package/assets/components/assets/icon/imageMagnifyingGlass32.json +1 -0
  49. package/assets/components/assets/icon/launch216.json +1 -0
  50. package/assets/components/assets/icon/launch224.json +1 -0
  51. package/assets/components/assets/icon/launch232.json +1 -0
  52. package/assets/components/assets/icon/mergeDetails16.json +1 -0
  53. package/assets/components/assets/icon/mergeDetails24.json +1 -0
  54. package/assets/components/assets/icon/mergeDetails32.json +1 -0
  55. package/assets/components/assets/icon/mergeUnits16.json +1 -0
  56. package/assets/components/assets/icon/mergeUnits24.json +1 -0
  57. package/assets/components/assets/icon/mergeUnits32.json +1 -0
  58. package/assets/components/assets/icon/minusCircle16F.json +1 -0
  59. package/assets/components/assets/icon/minusCircle24F.json +1 -0
  60. package/assets/components/assets/icon/minusCircle32F.json +1 -0
  61. package/assets/components/assets/icon/polygonSelect16.json +1 -0
  62. package/assets/components/assets/icon/polygonSelect24.json +1 -0
  63. package/assets/components/assets/icon/polygonSelect32.json +1 -0
  64. package/assets/components/assets/icon/projectMission16.json +1 -0
  65. package/assets/components/assets/icon/projectMission24.json +1 -0
  66. package/assets/components/assets/icon/projectMission32.json +1 -0
  67. package/assets/components/assets/icon/projectTemplate16.json +1 -0
  68. package/assets/components/assets/icon/projectTemplate24.json +1 -0
  69. package/assets/components/assets/icon/projectTemplate32.json +1 -0
  70. package/assets/components/assets/icon/properties16.json +1 -0
  71. package/assets/components/assets/icon/properties24.json +1 -0
  72. package/assets/components/assets/icon/properties32.json +1 -0
  73. package/assets/components/assets/icon/saveAs16.json +1 -0
  74. package/assets/components/assets/icon/saveAs24.json +1 -0
  75. package/assets/components/assets/icon/saveAs32.json +1 -0
  76. package/assets/components/assets/icon/splitUnits16.json +1 -0
  77. package/assets/components/assets/icon/splitUnits24.json +1 -0
  78. package/assets/components/assets/icon/splitUnits32.json +1 -0
  79. package/assets/components/assets/icon/storage16.json +1 -0
  80. package/assets/components/assets/icon/storage24.json +1 -0
  81. package/assets/components/assets/icon/storage32.json +1 -0
  82. package/assets/components/assets/panel/t9n/messages.json +3 -1
  83. package/assets/components/assets/panel/t9n/messages_ar.json +3 -1
  84. package/assets/components/assets/panel/t9n/messages_bg.json +3 -1
  85. package/assets/components/assets/panel/t9n/messages_bs.json +3 -1
  86. package/assets/components/assets/panel/t9n/messages_ca.json +3 -1
  87. package/assets/components/assets/panel/t9n/messages_cs.json +3 -1
  88. package/assets/components/assets/panel/t9n/messages_da.json +3 -1
  89. package/assets/components/assets/panel/t9n/messages_de.json +3 -1
  90. package/assets/components/assets/panel/t9n/messages_el.json +3 -1
  91. package/assets/components/assets/panel/t9n/messages_en.json +3 -1
  92. package/assets/components/assets/panel/t9n/messages_es.json +3 -1
  93. package/assets/components/assets/panel/t9n/messages_et.json +3 -1
  94. package/assets/components/assets/panel/t9n/messages_fi.json +3 -1
  95. package/assets/components/assets/panel/t9n/messages_fr.json +3 -1
  96. package/assets/components/assets/panel/t9n/messages_he.json +3 -1
  97. package/assets/components/assets/panel/t9n/messages_hr.json +3 -1
  98. package/assets/components/assets/panel/t9n/messages_hu.json +3 -1
  99. package/assets/components/assets/panel/t9n/messages_id.json +3 -1
  100. package/assets/components/assets/panel/t9n/messages_it.json +3 -1
  101. package/assets/components/assets/panel/t9n/messages_ja.json +3 -1
  102. package/assets/components/assets/panel/t9n/messages_ko.json +3 -1
  103. package/assets/components/assets/panel/t9n/messages_lt.json +3 -1
  104. package/assets/components/assets/panel/t9n/messages_lv.json +3 -1
  105. package/assets/components/assets/panel/t9n/messages_nl.json +3 -1
  106. package/assets/components/assets/panel/t9n/messages_no.json +3 -1
  107. package/assets/components/assets/panel/t9n/messages_pl.json +3 -1
  108. package/assets/components/assets/panel/t9n/messages_pt-BR.json +3 -1
  109. package/assets/components/assets/panel/t9n/messages_pt-PT.json +3 -1
  110. package/assets/components/assets/panel/t9n/messages_ro.json +3 -1
  111. package/assets/components/assets/panel/t9n/messages_ru.json +3 -1
  112. package/assets/components/assets/panel/t9n/messages_sk.json +3 -1
  113. package/assets/components/assets/panel/t9n/messages_sl.json +3 -1
  114. package/assets/components/assets/panel/t9n/messages_sr.json +3 -1
  115. package/assets/components/assets/panel/t9n/messages_sv.json +3 -1
  116. package/assets/components/assets/panel/t9n/messages_th.json +3 -1
  117. package/assets/components/assets/panel/t9n/messages_tr.json +3 -1
  118. package/assets/components/assets/panel/t9n/messages_uk.json +3 -1
  119. package/assets/components/assets/panel/t9n/messages_vi.json +3 -1
  120. package/assets/components/assets/panel/t9n/messages_zh-CN.json +3 -1
  121. package/assets/components/assets/panel/t9n/messages_zh-HK.json +3 -1
  122. package/assets/components/assets/panel/t9n/messages_zh-TW.json +3 -1
  123. package/assets/components/assets/table/t9n/messages_ar.json +5 -5
  124. package/assets/components/assets/table/t9n/messages_bg.json +5 -5
  125. package/assets/components/assets/table/t9n/messages_bs.json +5 -5
  126. package/assets/components/assets/table/t9n/messages_ca.json +5 -5
  127. package/assets/components/assets/table/t9n/messages_cs.json +5 -5
  128. package/assets/components/assets/table/t9n/messages_da.json +5 -5
  129. package/assets/components/assets/table/t9n/messages_de.json +5 -5
  130. package/assets/components/assets/table/t9n/messages_el.json +5 -5
  131. package/assets/components/assets/table/t9n/messages_es.json +5 -5
  132. package/assets/components/assets/table/t9n/messages_et.json +5 -5
  133. package/assets/components/assets/table/t9n/messages_fi.json +5 -5
  134. package/assets/components/assets/table/t9n/messages_fr.json +4 -4
  135. package/assets/components/assets/table/t9n/messages_he.json +5 -5
  136. package/assets/components/assets/table/t9n/messages_hr.json +5 -5
  137. package/assets/components/assets/table/t9n/messages_hu.json +5 -5
  138. package/assets/components/assets/table/t9n/messages_id.json +5 -5
  139. package/assets/components/assets/table/t9n/messages_it.json +5 -5
  140. package/assets/components/assets/table/t9n/messages_ja.json +5 -5
  141. package/assets/components/assets/table/t9n/messages_ko.json +5 -5
  142. package/assets/components/assets/table/t9n/messages_lt.json +5 -5
  143. package/assets/components/assets/table/t9n/messages_lv.json +5 -5
  144. package/assets/components/assets/table/t9n/messages_nl.json +5 -5
  145. package/assets/components/assets/table/t9n/messages_no.json +5 -5
  146. package/assets/components/assets/table/t9n/messages_pl.json +5 -5
  147. package/assets/components/assets/table/t9n/messages_pt-BR.json +5 -5
  148. package/assets/components/assets/table/t9n/messages_pt-PT.json +5 -5
  149. package/assets/components/assets/table/t9n/messages_ro.json +5 -5
  150. package/assets/components/assets/table/t9n/messages_ru.json +5 -5
  151. package/assets/components/assets/table/t9n/messages_sk.json +5 -5
  152. package/assets/components/assets/table/t9n/messages_sl.json +5 -5
  153. package/assets/components/assets/table/t9n/messages_sr.json +5 -5
  154. package/assets/components/assets/table/t9n/messages_sv.json +5 -5
  155. package/assets/components/assets/table/t9n/messages_th.json +5 -5
  156. package/assets/components/assets/table/t9n/messages_tr.json +5 -5
  157. package/assets/components/assets/table/t9n/messages_uk.json +5 -5
  158. package/assets/components/assets/table/t9n/messages_vi.json +5 -5
  159. package/assets/components/assets/table/t9n/messages_zh-CN.json +5 -5
  160. package/assets/components/assets/table/t9n/messages_zh-HK.json +5 -5
  161. package/assets/components/assets/table/t9n/messages_zh-TW.json +5 -5
  162. package/assets/components/assets/table-cell/t9n/messages_ar.json +5 -5
  163. package/assets/components/assets/table-cell/t9n/messages_bg.json +5 -5
  164. package/assets/components/assets/table-cell/t9n/messages_bs.json +5 -5
  165. package/assets/components/assets/table-cell/t9n/messages_ca.json +5 -5
  166. package/assets/components/assets/table-cell/t9n/messages_cs.json +5 -5
  167. package/assets/components/assets/table-cell/t9n/messages_da.json +5 -5
  168. package/assets/components/assets/table-cell/t9n/messages_de.json +5 -5
  169. package/assets/components/assets/table-cell/t9n/messages_el.json +5 -5
  170. package/assets/components/assets/table-cell/t9n/messages_es.json +5 -5
  171. package/assets/components/assets/table-cell/t9n/messages_et.json +5 -5
  172. package/assets/components/assets/table-cell/t9n/messages_fi.json +5 -5
  173. package/assets/components/assets/table-cell/t9n/messages_fr.json +5 -5
  174. package/assets/components/assets/table-cell/t9n/messages_he.json +5 -5
  175. package/assets/components/assets/table-cell/t9n/messages_hr.json +5 -5
  176. package/assets/components/assets/table-cell/t9n/messages_hu.json +5 -5
  177. package/assets/components/assets/table-cell/t9n/messages_id.json +5 -5
  178. package/assets/components/assets/table-cell/t9n/messages_it.json +5 -5
  179. package/assets/components/assets/table-cell/t9n/messages_ja.json +5 -5
  180. package/assets/components/assets/table-cell/t9n/messages_ko.json +5 -5
  181. package/assets/components/assets/table-cell/t9n/messages_lt.json +5 -5
  182. package/assets/components/assets/table-cell/t9n/messages_lv.json +5 -5
  183. package/assets/components/assets/table-cell/t9n/messages_nl.json +5 -5
  184. package/assets/components/assets/table-cell/t9n/messages_no.json +5 -5
  185. package/assets/components/assets/table-cell/t9n/messages_pl.json +5 -5
  186. package/assets/components/assets/table-cell/t9n/messages_pt-BR.json +5 -5
  187. package/assets/components/assets/table-cell/t9n/messages_pt-PT.json +5 -5
  188. package/assets/components/assets/table-cell/t9n/messages_ro.json +5 -5
  189. package/assets/components/assets/table-cell/t9n/messages_ru.json +5 -5
  190. package/assets/components/assets/table-cell/t9n/messages_sk.json +5 -5
  191. package/assets/components/assets/table-cell/t9n/messages_sl.json +5 -5
  192. package/assets/components/assets/table-cell/t9n/messages_sr.json +5 -5
  193. package/assets/components/assets/table-cell/t9n/messages_sv.json +5 -5
  194. package/assets/components/assets/table-cell/t9n/messages_th.json +5 -5
  195. package/assets/components/assets/table-cell/t9n/messages_tr.json +5 -5
  196. package/assets/components/assets/table-cell/t9n/messages_uk.json +5 -5
  197. package/assets/components/assets/table-cell/t9n/messages_vi.json +5 -5
  198. package/assets/components/assets/table-cell/t9n/messages_zh-CN.json +5 -5
  199. package/assets/components/assets/table-cell/t9n/messages_zh-HK.json +5 -5
  200. package/assets/components/assets/table-cell/t9n/messages_zh-TW.json +5 -5
  201. package/assets/components/assets/table-header/t9n/messages_ar.json +6 -6
  202. package/assets/components/assets/table-header/t9n/messages_bg.json +6 -6
  203. package/assets/components/assets/table-header/t9n/messages_bs.json +6 -6
  204. package/assets/components/assets/table-header/t9n/messages_ca.json +6 -6
  205. package/assets/components/assets/table-header/t9n/messages_cs.json +6 -6
  206. package/assets/components/assets/table-header/t9n/messages_da.json +6 -6
  207. package/assets/components/assets/table-header/t9n/messages_de.json +6 -6
  208. package/assets/components/assets/table-header/t9n/messages_el.json +6 -6
  209. package/assets/components/assets/table-header/t9n/messages_es.json +6 -6
  210. package/assets/components/assets/table-header/t9n/messages_et.json +6 -6
  211. package/assets/components/assets/table-header/t9n/messages_fi.json +6 -6
  212. package/assets/components/assets/table-header/t9n/messages_fr.json +6 -6
  213. package/assets/components/assets/table-header/t9n/messages_he.json +6 -6
  214. package/assets/components/assets/table-header/t9n/messages_hr.json +6 -6
  215. package/assets/components/assets/table-header/t9n/messages_hu.json +6 -6
  216. package/assets/components/assets/table-header/t9n/messages_id.json +6 -6
  217. package/assets/components/assets/table-header/t9n/messages_it.json +6 -6
  218. package/assets/components/assets/table-header/t9n/messages_ja.json +6 -6
  219. package/assets/components/assets/table-header/t9n/messages_ko.json +6 -6
  220. package/assets/components/assets/table-header/t9n/messages_lt.json +6 -6
  221. package/assets/components/assets/table-header/t9n/messages_lv.json +6 -6
  222. package/assets/components/assets/table-header/t9n/messages_nl.json +6 -6
  223. package/assets/components/assets/table-header/t9n/messages_no.json +6 -6
  224. package/assets/components/assets/table-header/t9n/messages_pl.json +6 -6
  225. package/assets/components/assets/table-header/t9n/messages_pt-BR.json +6 -6
  226. package/assets/components/assets/table-header/t9n/messages_pt-PT.json +6 -6
  227. package/assets/components/assets/table-header/t9n/messages_ro.json +6 -6
  228. package/assets/components/assets/table-header/t9n/messages_ru.json +6 -6
  229. package/assets/components/assets/table-header/t9n/messages_sk.json +6 -6
  230. package/assets/components/assets/table-header/t9n/messages_sl.json +6 -6
  231. package/assets/components/assets/table-header/t9n/messages_sr.json +6 -6
  232. package/assets/components/assets/table-header/t9n/messages_sv.json +6 -6
  233. package/assets/components/assets/table-header/t9n/messages_th.json +6 -6
  234. package/assets/components/assets/table-header/t9n/messages_tr.json +6 -6
  235. package/assets/components/assets/table-header/t9n/messages_uk.json +6 -6
  236. package/assets/components/assets/table-header/t9n/messages_vi.json +6 -6
  237. package/assets/components/assets/table-header/t9n/messages_zh-CN.json +6 -6
  238. package/assets/components/assets/table-header/t9n/messages_zh-HK.json +6 -6
  239. package/assets/components/assets/table-header/t9n/messages_zh-TW.json +6 -6
  240. package/assets/components/assets/time-picker/t9n/messages_ar.json +3 -0
  241. package/assets/components/assets/time-picker/t9n/messages_bg.json +3 -0
  242. package/assets/components/assets/time-picker/t9n/messages_bs.json +3 -0
  243. package/assets/components/assets/time-picker/t9n/messages_ca.json +3 -0
  244. package/assets/components/assets/time-picker/t9n/messages_cs.json +3 -0
  245. package/assets/components/assets/time-picker/t9n/messages_da.json +3 -0
  246. package/assets/components/assets/time-picker/t9n/messages_de.json +3 -0
  247. package/assets/components/assets/time-picker/t9n/messages_el.json +3 -0
  248. package/assets/components/assets/time-picker/t9n/messages_es.json +3 -0
  249. package/assets/components/assets/time-picker/t9n/messages_et.json +3 -0
  250. package/assets/components/assets/time-picker/t9n/messages_fi.json +3 -0
  251. package/assets/components/assets/time-picker/t9n/messages_fr.json +3 -0
  252. package/assets/components/assets/time-picker/t9n/messages_he.json +3 -0
  253. package/assets/components/assets/time-picker/t9n/messages_hr.json +3 -0
  254. package/assets/components/assets/time-picker/t9n/messages_hu.json +3 -0
  255. package/assets/components/assets/time-picker/t9n/messages_id.json +3 -0
  256. package/assets/components/assets/time-picker/t9n/messages_it.json +3 -0
  257. package/assets/components/assets/time-picker/t9n/messages_ja.json +3 -0
  258. package/assets/components/assets/time-picker/t9n/messages_ko.json +3 -0
  259. package/assets/components/assets/time-picker/t9n/messages_lt.json +3 -0
  260. package/assets/components/assets/time-picker/t9n/messages_lv.json +3 -0
  261. package/assets/components/assets/time-picker/t9n/messages_nl.json +3 -0
  262. package/assets/components/assets/time-picker/t9n/messages_no.json +3 -0
  263. package/assets/components/assets/time-picker/t9n/messages_pl.json +3 -0
  264. package/assets/components/assets/time-picker/t9n/messages_pt-BR.json +3 -0
  265. package/assets/components/assets/time-picker/t9n/messages_pt-PT.json +3 -0
  266. package/assets/components/assets/time-picker/t9n/messages_ro.json +3 -0
  267. package/assets/components/assets/time-picker/t9n/messages_ru.json +3 -0
  268. package/assets/components/assets/time-picker/t9n/messages_sk.json +3 -0
  269. package/assets/components/assets/time-picker/t9n/messages_sl.json +3 -0
  270. package/assets/components/assets/time-picker/t9n/messages_sr.json +3 -0
  271. package/assets/components/assets/time-picker/t9n/messages_sv.json +3 -0
  272. package/assets/components/assets/time-picker/t9n/messages_th.json +3 -0
  273. package/assets/components/assets/time-picker/t9n/messages_tr.json +3 -0
  274. package/assets/components/assets/time-picker/t9n/messages_uk.json +3 -0
  275. package/assets/components/assets/time-picker/t9n/messages_vi.json +3 -0
  276. package/assets/components/assets/time-picker/t9n/messages_zh-CN.json +3 -0
  277. package/assets/components/assets/time-picker/t9n/messages_zh-HK.json +3 -0
  278. package/assets/components/assets/time-picker/t9n/messages_zh-TW.json +3 -0
  279. package/assets/esri/core/workers/RemoteClient.js +1 -1
  280. package/assets/esri/core/workers/chunks/{02120d192eafd7612475.js → 0036b6df93a17e57e3b9.js} +1 -1
  281. package/assets/esri/core/workers/chunks/09886c56427c4b3f18b5.js +1 -0
  282. package/assets/esri/core/workers/chunks/{24a0cf405195421c0d06.js → 1461910bd37aea28948b.js} +1 -1
  283. package/assets/esri/core/workers/chunks/{d60d5f006375f7fcc88c.js → 16d45f439b89da3ec835.js} +1 -1
  284. package/assets/esri/core/workers/chunks/1ef3533abdd937ae2794.js +1 -0
  285. package/assets/esri/core/workers/chunks/31cb4c73764555b40328.js +1 -0
  286. package/assets/esri/core/workers/chunks/{40633064c290dc2af9ea.js → 369f2ef414498c17a05a.js} +1 -1
  287. package/assets/esri/core/workers/chunks/435f04e3964b1c6d4880.js +1 -0
  288. package/assets/esri/core/workers/chunks/4781e2011a32d7724889.js +1 -0
  289. package/assets/esri/core/workers/chunks/{18ab9cc85a1a7988fdfd.js → 4c3345ffbe79ee0167fb.js} +1 -1
  290. package/assets/esri/core/workers/chunks/4e60ac00b15b34a3b5f5.js +1 -0
  291. package/assets/esri/core/workers/chunks/505132c47dbdf5fdeacc.js +1 -0
  292. package/assets/esri/core/workers/chunks/{a5a7bbdd8298016535bc.js → 7f6840c53a456524b74c.js} +1 -1
  293. package/assets/esri/core/workers/chunks/{36ab90fb34b9716a9983.js → 8634d6a62f4de973e39b.js} +1 -1
  294. package/assets/esri/core/workers/chunks/a9a0194120ec65a00f6d.js +1 -0
  295. package/assets/esri/core/workers/chunks/adf6bcf2447c95aeb440.js +1 -0
  296. package/assets/esri/core/workers/chunks/aeb3efa91165dd3d2493.js.LICENSE.txt +1 -1
  297. package/assets/esri/core/workers/chunks/b3243695e0edfcbca276.js +1 -0
  298. package/assets/esri/core/workers/chunks/{e8c7cc974420c0b92d0e.js → b98a2191cb997d632438.js} +1 -1
  299. package/assets/esri/core/workers/chunks/c0061d993e1ede22b1dc.js +1 -0
  300. package/assets/esri/core/workers/chunks/{f2718e260f594537f7fd.js → c2be3b9aa28e454cf931.js} +1 -1
  301. package/assets/esri/core/workers/chunks/c4df42fe859a9115a6e4.js +1 -0
  302. package/assets/esri/core/workers/chunks/{52cef7cd3aaaa4f45c94.js → c607fe4df3ca054f9aa8.js} +1 -1
  303. package/assets/esri/core/workers/chunks/{e93442c6d92229f3a4b0.js → ca023e409bb7de9a69ab.js} +1 -1
  304. package/assets/esri/core/workers/chunks/{8f3680fee85a05839489.js → e52b9e423c0ba4134309.js} +1 -1
  305. package/assets/esri/core/workers/chunks/{c92e75b79aff7b505b31.js → e53df0f018a82e3a35bd.js} +1 -1
  306. package/assets/esri/core/workers/chunks/ea953f5a0a975f7bd7b9.js +1 -0
  307. package/assets/esri/core/workers/chunks/f183a4b52095e4c498b4.js +1 -0
  308. package/assets/esri/core/workers/chunks/{8e4c4ba900a90373217f.js → f221b9c6ae6c7eb4ca01.js} +1 -1
  309. package/assets/esri/core/workers/chunks/{0beebbb0c6dad0e742d7.js → f72a5af2a7ca1536f10a.js} +1 -1
  310. package/assets/esri/core/workers/chunks/{adfbc168be8c49b51e1b.js → f99deed4120f605b6cd6.js} +1 -1
  311. package/assets/esri/t9n/common.json +1 -1
  312. package/assets/esri/t9n/common_ar.json +1 -1
  313. package/assets/esri/t9n/common_bg.json +1 -1
  314. package/assets/esri/t9n/common_bs.json +1 -1
  315. package/assets/esri/t9n/common_ca.json +1 -1
  316. package/assets/esri/t9n/common_cs.json +1 -1
  317. package/assets/esri/t9n/common_da.json +1 -1
  318. package/assets/esri/t9n/common_de.json +1 -1
  319. package/assets/esri/t9n/common_el.json +1 -1
  320. package/assets/esri/t9n/common_en.json +1 -1
  321. package/assets/esri/t9n/common_es.json +1 -1
  322. package/assets/esri/t9n/common_et.json +1 -1
  323. package/assets/esri/t9n/common_fi.json +1 -1
  324. package/assets/esri/t9n/common_fr.json +1 -1
  325. package/assets/esri/t9n/common_he.json +1 -1
  326. package/assets/esri/t9n/common_hr.json +1 -1
  327. package/assets/esri/t9n/common_hu.json +1 -1
  328. package/assets/esri/t9n/common_id.json +1 -1
  329. package/assets/esri/t9n/common_it.json +1 -1
  330. package/assets/esri/t9n/common_ja.json +1 -1
  331. package/assets/esri/t9n/common_ko.json +1 -1
  332. package/assets/esri/t9n/common_lt.json +1 -1
  333. package/assets/esri/t9n/common_lv.json +1 -1
  334. package/assets/esri/t9n/common_nb.json +1 -1
  335. package/assets/esri/t9n/common_nl.json +1 -1
  336. package/assets/esri/t9n/common_pl.json +1 -1
  337. package/assets/esri/t9n/common_pt-BR.json +1 -1
  338. package/assets/esri/t9n/common_pt-PT.json +1 -1
  339. package/assets/esri/t9n/common_ro.json +1 -1
  340. package/assets/esri/t9n/common_ru.json +1 -1
  341. package/assets/esri/t9n/common_sk.json +1 -1
  342. package/assets/esri/t9n/common_sl.json +1 -1
  343. package/assets/esri/t9n/common_sr.json +1 -1
  344. package/assets/esri/t9n/common_sv.json +1 -1
  345. package/assets/esri/t9n/common_th.json +1 -1
  346. package/assets/esri/t9n/common_tr.json +1 -1
  347. package/assets/esri/t9n/common_uk.json +1 -1
  348. package/assets/esri/t9n/common_vi.json +1 -1
  349. package/assets/esri/t9n/common_zh-CN.json +1 -1
  350. package/assets/esri/t9n/common_zh-HK.json +1 -1
  351. package/assets/esri/t9n/common_zh-TW.json +1 -1
  352. package/assets/esri/themes/base/widgets/_FeatureForm.scss +10 -14
  353. package/assets/esri/themes/dark/main.css +1 -1
  354. package/assets/esri/themes/light/main.css +1 -1
  355. package/assets/esri/themes/light/view.css +1 -1
  356. package/chunks/ComponentShader.glsl.js +27 -27
  357. package/core/sql/WhereClauseCache.js +1 -1
  358. package/geometry/support/meshUtils/loadExternal.js +1 -1
  359. package/interfaces.d.ts +3 -19
  360. package/kernel.js +1 -1
  361. package/layers/graphics/data/AttributesBuilder.js +1 -1
  362. package/layers/graphics/data/FeatureStore.js +1 -1
  363. package/layers/graphics/data/QueryEngine.js +1 -1
  364. package/layers/graphics/data/QueryEngineResult.js +1 -1
  365. package/layers/graphics/data/attributeSupport.js +1 -1
  366. package/layers/graphics/data/geometryUtils.js +5 -0
  367. package/layers/graphics/data/queryUtils.js +5 -0
  368. package/layers/graphics/data/queryValidationUtils.js +5 -0
  369. package/layers/graphics/data/spatialQuerySupport.js +1 -1
  370. package/layers/support/fieldProperties.js +1 -1
  371. package/layers/support/rasterFormats/Lerc.js +1 -1
  372. package/layers/support/rasterFormats/RasterCodec.js +1 -1
  373. package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
  374. package/package.json +2 -2
  375. package/support/revision.js +1 -1
  376. package/symbols/cim/CIMSymbolHelper.js +1 -1
  377. package/views/2d/engine/BitmapContainer.js +1 -1
  378. package/views/2d/engine/BitmapTile.js +1 -1
  379. package/views/2d/engine/Container.js +1 -1
  380. package/views/2d/engine/DisplayObject.js +1 -1
  381. package/views/2d/engine/FeatureContainer.js +1 -1
  382. package/views/2d/engine/Stage.js +1 -1
  383. package/views/2d/engine/flow/FlowContainer.js +1 -1
  384. package/views/2d/engine/imagery/RasterVFContainer.js +1 -1
  385. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  386. package/views/2d/engine/webgl/Painter.js +1 -1
  387. package/views/2d/engine/webgl/TileContainer.js +1 -1
  388. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  389. package/views/2d/layers/GroupLayerView2D.js +1 -1
  390. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  391. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  392. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  393. package/views/2d/layers/features/support/FeatureFilter.js +1 -1
  394. package/views/3d/glTF/internal/Resource.js +1 -1
  395. package/views/3d/layers/I3SMeshView3D.js +1 -1
  396. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  397. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  398. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  399. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  400. package/views/3d/webgl-engine/collections/Component/Material/shader/VertexDiscardByOpacity.glsl.js +1 -1
  401. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +54 -33
  402. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +1 -2
  403. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  404. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  405. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  406. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  407. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  408. package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
  409. package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
  410. package/views/DOMContainer.js +1 -1
  411. package/views/interactive/SegmentLabels.js +1 -1
  412. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  413. package/webdoc/webdocLoadUtils.js +1 -1
  414. package/widgets/Editor/EditorViewModel.js +1 -1
  415. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  416. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  417. package/widgets/FeatureForm/InputBase.js +1 -1
  418. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  419. package/widgets/FeatureForm/css.js +1 -1
  420. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  421. package/widgets/FeatureForm.js +1 -1
  422. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  423. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  424. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  425. package/assets/esri/core/workers/chunks/112e89da628bdea5355c.js +0 -1
  426. package/assets/esri/core/workers/chunks/1856d16d738f44f58084.js +0 -1
  427. package/assets/esri/core/workers/chunks/1a36703ebe934749646e.js +0 -1
  428. package/assets/esri/core/workers/chunks/3e40c8402ff7a8fe48b9.js +0 -1
  429. package/assets/esri/core/workers/chunks/3ea0b872436fce84b927.js +0 -1
  430. package/assets/esri/core/workers/chunks/42ec4c80b0c2944cd65c.js +0 -1
  431. package/assets/esri/core/workers/chunks/6b1856303d1562f05100.js +0 -1
  432. package/assets/esri/core/workers/chunks/784ffd52315a4d55d683.js +0 -1
  433. package/assets/esri/core/workers/chunks/97aecf210938015cc7a3.js +0 -1
  434. package/assets/esri/core/workers/chunks/b4f31d291c05b5f8ddac.js +0 -1
  435. package/assets/esri/core/workers/chunks/b99bc08a01e9250b0a31.js +0 -1
  436. package/assets/esri/core/workers/chunks/dca925a0d73f967f6897.js +0 -1
  437. package/assets/esri/core/workers/chunks/e8688b6cc3b3c1010b43.js +0 -1
  438. package/assets/esri/core/workers/chunks/eda86faa708cfe4c9f9a.js +0 -1
  439. package/layers/graphics/data/utils.js +0 -5
  440. package/views/2d/engine/webgl/GroupContainer.js +0 -5
  441. package/views/3d/analysis/DimensionAnalysisView3D.d.ts +0 -4
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[951],{22303:(t,e,i)=>{i.d(e,{Z:()=>f});var s,r,n=i(35270),o=i(22021),a=i(75215);function l(t){return(0,o.uZ)((0,a.vU)(t),0,255)}function h(t,e,i){return t=Number(t),isNaN(t)?i:t<e?e:t>i?i:t}function c(t,e){const i=t.toString(16).padStart(2,"0");return e?i.substring(0,1):i}class u{static blendColors(t,e,i,s=new u){return s.r=Math.round(t.r+(e.r-t.r)*i),s.g=Math.round(t.g+(e.g-t.g)*i),s.b=Math.round(t.b+(e.b-t.b)*i),s.a=t.a+(e.a-t.a)*i,s._sanitize()}static fromRgb(t,e){const i=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(i){const t=i[2].split(/\s*,\s*/),s=i[1];if("rgb"===s&&3===t.length||"rgba"===s&&4===t.length){const i=t[0];if("%"===i.charAt(i.length-1)){const i=t.map((t=>2.56*parseFloat(t)));return 4===t.length&&(i[3]=parseFloat(t[3])),u.fromArray(i,e)}return u.fromArray(t.map((t=>parseFloat(t))),e)}if("hsl"===s&&3===t.length||"hsla"===s&&4===t.length)return u.fromArray((0,n.B7)(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3])),e)}return null}static fromHex(t,e=new u){if("#"!==t[0]||isNaN(Number(`0x${t.substring(1)}`)))return null;switch(t.length){case 4:case 5:{const i=parseInt(t.substring(1,2),16),s=parseInt(t.substring(2,3),16),r=parseInt(t.substring(3,4),16),n=5===t.length?15:parseInt(t.substring(4),16);return u.fromArray([i+16*i,s+16*s,r+16*r,(n+16*n)/255],e)}case 7:case 9:{const i=parseInt(t.substring(1,3),16),s=parseInt(t.substring(3,5),16),r=parseInt(t.substring(5,7),16),n=7===t.length?255:parseInt(t.substring(7),16);return u.fromArray([i,s,r,n/255],e)}default:return null}}static fromArray(t,e=new u){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const i=(0,n.St)(t)?(0,n.h$)(t):null;return i&&u.fromArray(i,e)||u.fromRgb(t,e)||u.fromHex(t,e)}static fromJSON(t){return null!=t?new u([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?u.fromString(t,this):Array.isArray(t)?u.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof u||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,i=t?.digits??6,s=3===i||4===i,r=4===i||8===i,n=`#${c(this.r,s)}${c(this.g,s)}${c(this.b,s)}${r?c(Math.round(255*this.a),s):""}`;return e?n.toUpperCase():n}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=u.AlphaMode.ALWAYS){const e=l(this.r),i=l(this.g),s=l(this.b);return t===u.AlphaMode.ALWAYS||1!==this.a?[e,i,s,l(255*this.a)]:[e,i,s]}clone(){return new u(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=Math.round(h(this.r,0,255)),this.g=Math.round(h(this.g,0,255)),this.b=Math.round(h(this.b,0,255)),this.a=h(this.a,0,1),this}_set(t,e,i,s){this.r=t,this.g=e,this.b=i,this.a=s}}u.prototype.declaredClass="esri.Color",s=u||(u={}),(r=s.AlphaMode||(s.AlphaMode={}))[r.ALWAYS=0]="ALWAYS",r[r.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const f=u},45699:(t,e,i)=>{i.d(e,{b:()=>l,c:()=>r,m:()=>n,r:()=>o,t:()=>a});var s=i(46851);function r(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function n(t,e,i){const s=e[0],r=e[1],n=e[2],o=e[3],a=e[4],l=e[5],h=i[0],c=i[1],u=i[2],f=i[3],_=i[4],m=i[5];return t[0]=s*h+n*c,t[1]=r*h+o*c,t[2]=s*u+n*f,t[3]=r*u+o*f,t[4]=s*_+n*m+a,t[5]=r*_+o*m+l,t}function o(t,e,i){const s=e[0],r=e[1],n=e[2],o=e[3],a=e[4],l=e[5],h=Math.sin(i),c=Math.cos(i);return t[0]=s*c+n*h,t[1]=r*c+o*h,t[2]=s*-h+n*c,t[3]=r*-h+o*c,t[4]=a,t[5]=l,t}function a(t,e,i){const s=e[0],r=e[1],n=e[2],o=e[3],a=e[4],l=e[5],h=i[0],c=i[1];return t[0]=s,t[1]=r,t[2]=n,t[3]=o,t[4]=s*h+n*c+a,t[5]=r*h+o*c+l,t}function l(t,e){const i=Math.sin(e),s=Math.cos(e);return t[0]=s,t[1]=i,t[2]=-i,t[3]=s,t[4]=0,t[5]=0,t}function h(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t[2]=e[2]-i[2],t[3]=e[3]-i[3],t[4]=e[4]-i[4],t[5]=e[5]-i[5],t}const c=n,u=h;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t[2]=e[2]+i[2],t[3]=e[3]+i[3],t[4]=e[4]+i[4],t[5]=e[5]+i[5],t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},determinant:function(t){return t[0]*t[3]-t[1]*t[2]},equals:function(t,e){const i=t[0],r=t[1],n=t[2],o=t[3],a=t[4],l=t[5],h=e[0],c=e[1],u=e[2],f=e[3],_=e[4],m=e[5],d=(0,s.g)();return Math.abs(i-h)<=d*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(r-c)<=d*Math.max(1,Math.abs(r),Math.abs(c))&&Math.abs(n-u)<=d*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(o-f)<=d*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(a-_)<=d*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(l-m)<=d*Math.max(1,Math.abs(l),Math.abs(m))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+1)},fromRotation:l,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=e[1],t[4]=0,t[5]=0,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=e[0],t[5]=e[1],t},identity:r,invert:function(t,e){const i=e[0],s=e[1],r=e[2],n=e[3],o=e[4],a=e[5];let l=i*n-s*r;return l?(l=1/l,t[0]=n*l,t[1]=-s*l,t[2]=-r*l,t[3]=i*l,t[4]=(r*a-n*o)*l,t[5]=(s*o-i*a)*l,t):null},mul:c,multiply:n,multiplyScalar:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*i,t[5]=e[5]*i,t},multiplyScalarAndAdd:function(t,e,i,s){return t[0]=e[0]+i[0]*s,t[1]=e[1]+i[1]*s,t[2]=e[2]+i[2]*s,t[3]=e[3]+i[3]*s,t[4]=e[4]+i[4]*s,t[5]=e[5]+i[5]*s,t},rotate:o,scale:function(t,e,i){const s=e[0],r=e[1],n=e[2],o=e[3],a=e[4],l=e[5],h=i[0],c=i[1];return t[0]=s*h,t[1]=r*h,t[2]=n*c,t[3]=o*c,t[4]=a,t[5]=l,t},set:function(t,e,i,s,r,n,o){return t[0]=e,t[1]=i,t[2]=s,t[3]=r,t[4]=n,t[5]=o,t},str:function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},sub:u,subtract:h,translate:a},Symbol.toStringTag,{value:"Module"}))},21106:(t,e,i)=>{function s(){const t=new Float32Array(6);return t[0]=1,t[3]=1,t}function r(t,e,i,s){const r=e[s],n=e[s+1];t[s]=i[0]*r+i[2]*n+i[4],t[s+1]=i[1]*r+i[3]*n+i[5]}function n(t,e,i,s=0,n=0,o=2){const a=n||e.length/o;for(let n=s;n<a;n++)r(t,e,i,n*o)}i.d(e,{c:()=>s,t:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){const e=new Float32Array(6);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},create:s,createView:function(t,e){return new Float32Array(t,e,6)},fromValues:function(t,e,i,s,r,n){const o=new Float32Array(6);return o[0]=t,o[1]=e,o[2]=i,o[3]=s,o[4]=r,o[5]=n,o},transform:r,transformMany:n},Symbol.toStringTag,{value:"Module"}))},4307:(t,e,i)=>{i.d(e,{d:()=>l,l:()=>f,r:()=>m,s:()=>r,t:()=>_});var s=i(46851);function r(t,e,i){return t[0]=e,t[1]=i,t}function n(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function o(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t}function a(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t}function l(t,e){const i=e[0]-t[0],s=e[1]-t[1];return Math.sqrt(i*i+s*s)}function h(t,e){const i=e[0]-t[0],s=e[1]-t[1];return i*i+s*s}function c(t){const e=t[0],i=t[1];return Math.sqrt(e*e+i*i)}function u(t){const e=t[0],i=t[1];return e*e+i*i}function f(t,e,i,s){const r=e[0],n=e[1];return t[0]=r+s*(i[0]-r),t[1]=n+s*(i[1]-n),t}function _(t,e,i){const s=e[0],r=e[1];return t[0]=i[0]*s+i[2]*r+i[4],t[1]=i[1]*s+i[3]*r+i[5],t}function m(t,e,i,s){const r=e[0]-i[0],n=e[1]-i[1],o=Math.sin(s),a=Math.cos(s);return t[0]=r*a-n*o+i[0],t[1]=r*o+n*a+i[1],t}const d=c,p=n,y=o,g=a,x=l,M=h,b=u;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},angle:function(t,e){const i=t[0],s=t[1],r=e[0],n=e[1];let o=i*i+s*s;o>0&&(o=1/Math.sqrt(o));let a=r*r+n*n;a>0&&(a=1/Math.sqrt(a));const l=(i*r+s*n)*o*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},cross:function(t,e,i){const s=e[0]*i[1]-e[1]*i[0];return t[0]=t[1]=0,t[2]=s,t},dist:x,distance:l,div:g,divide:a,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const i=t[0],r=t[1],n=e[0],o=e[1],a=(0,s.g)();return Math.abs(i-n)<=a*Math.max(1,Math.abs(i),Math.abs(n))&&Math.abs(r-o)<=a*Math.max(1,Math.abs(r),Math.abs(o))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:d,length:c,lerp:f,max:function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},min:function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},mul:y,multiply:o,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:function(t,e){const i=e[0],s=e[1];let r=i*i+s*s;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},projectAndScale:function(t,e,i,s,r){let n=e[0]-i[0],o=e[1]-i[1];const a=(s[0]*n+s[1]*o)*(r-1);return n=s[0]*a,o=s[1]*a,t[0]=e[0]+n,t[1]=e[1]+o,t},random:function(t,e){e=e||1;const i=2*(0,s.R)()*Math.PI;return t[0]=Math.cos(i)*e,t[1]=Math.sin(i)*e,t},rotate:m,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},scaleAndAdd:function(t,e,i,s){return t[0]=e[0]+i[0]*s,t[1]=e[1]+i[1]*s,t},set:r,sqrDist:M,sqrLen:b,squaredDistance:h,squaredLength:u,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:p,subtract:n,transformMat2:function(t,e,i){const s=e[0],r=e[1];return t[0]=i[0]*s+i[2]*r,t[1]=i[1]*s+i[3]*r,t},transformMat2d:_,transformMat3:function(t,e,i){const s=e[0],r=e[1];return t[0]=i[0]*s+i[3]*r+i[6],t[1]=i[1]*s+i[4]*r+i[7],t},transformMat4:function(t,e,i){const s=e[0],r=e[1];return t[0]=i[0]*s+i[4]*r+i[12],t[1]=i[1]*s+i[5]*r+i[13],t}},Symbol.toStringTag,{value:"Module"}))},1265:(t,e,i)=>{function s(){return new Float32Array(2)}function r(t,e){const i=new Float32Array(2);return i[0]=t,i[1]=e,i}function n(){return s()}function o(){return r(1,1)}function a(){return r(1,0)}function l(){return r(0,1)}i.d(e,{O:()=>c,Z:()=>h,c:()=>s,f:()=>r});const h=n(),c=o(),u=a(),f=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:f,ZEROS:h,clone:function(t){const e=new Float32Array(2);return e[0]=t[0],e[1]=t[1],e},create:s,createView:function(t,e){return new Float32Array(t,e,2)},fromValues:r,ones:o,unitX:a,unitY:l,zeros:n},Symbol.toStringTag,{value:"Module"}))},83798:(t,e,i)=>{i.d(e,{E:()=>r});const s=new(i(79087).Z);function r(t){if(null==t)return["",!1];if(!s.hasBidiChar(t))return[t,!1];let e;return e="rtl"===s.checkContextual(t)?"IDNNN":"ICNNN",[s.bidiTransform(t,e,"VLYSN"),!0]}},60800:(t,e,i)=>{i.d(e,{BN:()=>r,em:()=>s}),i(68773);const s="arial-unicode-ms";function r(t){if(!t)return s;const e=t.toLowerCase().split(" ").join("-");switch(e){case"serif":return"noto-serif";case"sans-serif":return"arial-unicode-ms";case"monospace":return"ubuntu-mono";case"fantasy":return"cabin-sketch";case"cursive":return"redressed";default:return e}}new Map,new Set},62357:(t,e,i)=>{i.d(e,{F2:()=>o,Wz:()=>a,t_:()=>l,vW:()=>h});const s=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,r="screenUtils.toPt: input not recognized!",n=96;function o(t){return t?t/72*n:0}function a(t){return t?72*t/n:0}function l(t){if("string"==typeof t){const e=t.match(s);if(e){const i=Number(e[1]),s=e[3]&&e[3].toLowerCase(),r="-"===t.charAt(0),n="px"===s?a(i):i;return r?-n:n}return console.warn(r),null}return t}function h(t=0,e=0){return{x:t,y:e}}},59255:(t,e,i)=>{var s,r,n;i.d(e,{E9:()=>o,I6:()=>h,Vl:()=>s,bN:()=>l}),(n=s||(s={}))[n.Unknown=0]="Unknown",n[n.Point=1]="Point",n[n.LineString=2]="LineString",n[n.Polygon=3]="Polygon";class o{constructor(t,e){this.x=t,this.y=e}clone(){return new o(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){this.x=t,this.y=e}normalize(){const t=this.x,e=this.y,i=Math.sqrt(t*t+e*e);this.x/=i,this.y/=i}rightPerpendicular(){const t=this.x;this.x=this.y,this.y=-t}move(t,e){this.x+=t,this.y+=e}assign(t){this.x=t.x,this.y=t.y}assignAdd(t,e){this.x=t.x+e.x,this.y=t.y+e.y}assignSub(t,e){this.x=t.x-e.x,this.y=t.y-e.y}rotate(t,e){const i=this.x,s=this.y;this.x=i*t-s*e,this.y=i*e+s*t}scale(t){this.x*=t,this.y*=t}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}static distance(t,e){const i=e.x-t.x,s=e.y-t.y;return Math.sqrt(i*i+s*s)}static add(t,e){return new o(t.x+e.x,t.y+e.y)}static sub(t,e){return new o(t.x-e.x,t.y-e.y)}}class a{constructor(t,e,i){this.ratio=t,this.x=e,this.y=i}}class l{constructor(t,e,i,s=8,r=8){this._lines=[],this._starts=[],this.validateTessellation=!0,this._pixelRatio=s,this._pixelMargin=r,this._tileSize=512*s,this._dz=t,this._yPos=e,this._xPos=i}setPixelMargin(t){t!==this._pixelMargin&&(this._pixelMargin=t,this.setExtent(this._extent))}setExtent(t){this._extent=t,this._finalRatio=this._tileSize/t*(1<<this._dz);let e=this._pixelRatio*this._pixelMargin;e/=this._finalRatio;const i=t>>this._dz;e>i&&(e=i),this._margin=e,this._xmin=i*this._xPos-e,this._ymin=i*this._yPos-e,this._xmax=this._xmin+i+2*e,this._ymax=this._ymin+i+2*e}reset(t){this._type=t,this._lines=[],this._starts=[],this._line=null,this._start=0}moveTo(t,e){this._pushLine(),this._prevIsIn=this._isIn(t,e),this._moveTo(t,e,this._prevIsIn),this._prevPt=new o(t,e),this._firstPt=new o(t,e),this._dist=0}lineTo(t,e){const i=this._isIn(t,e),s=new o(t,e),r=o.distance(this._prevPt,s);let n,l,h,c,u,f,_,m;if(i)this._prevIsIn?this._lineTo(t,e,!0):(n=this._prevPt,l=s,h=this._intersect(l,n),this._start=this._dist+r*(1-this._r),this._lineTo(h.x,h.y,!0),this._lineTo(l.x,l.y,!0));else if(this._prevIsIn)l=this._prevPt,n=s,h=this._intersect(l,n),this._lineTo(h.x,h.y,!0),this._lineTo(n.x,n.y,!1);else{const t=this._prevPt,e=s;if(t.x<=this._xmin&&e.x<=this._xmin||t.x>=this._xmax&&e.x>=this._xmax||t.y<=this._ymin&&e.y<=this._ymin||t.y>=this._ymax&&e.y>=this._ymax)this._lineTo(e.x,e.y,!1);else{const i=[];if((t.x<this._xmin&&e.x>this._xmin||t.x>this._xmin&&e.x<this._xmin)&&(c=(this._xmin-t.x)/(e.x-t.x),m=t.y+c*(e.y-t.y),m<=this._ymin?f=!1:m>=this._ymax?f=!0:i.push(new a(c,this._xmin,m))),(t.x<this._xmax&&e.x>this._xmax||t.x>this._xmax&&e.x<this._xmax)&&(c=(this._xmax-t.x)/(e.x-t.x),m=t.y+c*(e.y-t.y),m<=this._ymin?f=!1:m>=this._ymax?f=!0:i.push(new a(c,this._xmax,m))),(t.y<this._ymin&&e.y>this._ymin||t.y>this._ymin&&e.y<this._ymin)&&(c=(this._ymin-t.y)/(e.y-t.y),_=t.x+c*(e.x-t.x),_<=this._xmin?u=!1:_>=this._xmax?u=!0:i.push(new a(c,_,this._ymin))),(t.y<this._ymax&&e.y>this._ymax||t.y>this._ymax&&e.y<this._ymax)&&(c=(this._ymax-t.y)/(e.y-t.y),_=t.x+c*(e.x-t.x),_<=this._xmin?u=!1:_>=this._xmax?u=!0:i.push(new a(c,_,this._ymax))),0===i.length)u?f?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):f?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(i.length>1&&i[0].ratio>i[1].ratio)this._start=this._dist+r*i[1].ratio,this._lineTo(i[1].x,i[1].y,!0),this._lineTo(i[0].x,i[0].y,!0);else{this._start=this._dist+r*i[0].ratio;for(let t=0;t<i.length;t++)this._lineTo(i[t].x,i[t].y,!0)}this._lineTo(e.x,e.y,!1)}}this._dist+=r,this._prevIsIn=i,this._prevPt=s}close(){if(this._line.length>2){const t=this._firstPt,e=this._prevPt;t.x===e.x&&t.y===e.y||this.lineTo(t.x,t.y);const i=this._line;let s=i.length;for(;s>=4&&(i[0].x===i[1].x&&i[0].x===i[s-2].x||i[0].y===i[1].y&&i[0].y===i[s-2].y);)i.pop(),i[0].x=i[s-2].x,i[0].y=i[s-2].y,--s}}result(t=!0){return this._pushLine(),0===this._lines.length?null:(this._type===s.Polygon&&t&&c.simplify(this._tileSize,this._margin*this._finalRatio,this._lines),this._lines)}resultWithStarts(){if(this._type!==s.LineString)throw new Error("Only valid for lines");this._pushLine();const t=this._lines,e=t.length;if(0===e)return null;const i=[];for(let s=0;s<e;s++)i.push({line:t[s],start:this._starts[s]||0});return i}_isIn(t,e){return t>=this._xmin&&t<=this._xmax&&e>=this._ymin&&e<=this._ymax}_intersect(t,e){let i,s,r;if(e.x>=this._xmin&&e.x<=this._xmax)s=e.y<=this._ymin?this._ymin:this._ymax,r=(s-t.y)/(e.y-t.y),i=t.x+r*(e.x-t.x);else if(e.y>=this._ymin&&e.y<=this._ymax)i=e.x<=this._xmin?this._xmin:this._xmax,r=(i-t.x)/(e.x-t.x),s=t.y+r*(e.y-t.y);else{s=e.y<=this._ymin?this._ymin:this._ymax,i=e.x<=this._xmin?this._xmin:this._xmax;const n=(i-t.x)/(e.x-t.x),o=(s-t.y)/(e.y-t.y);n<o?(r=n,s=t.y+n*(e.y-t.y)):(r=o,i=t.x+o*(e.x-t.x))}return this._r=r,new o(i,s)}_pushLine(){this._line&&(this._type===s.Point?this._line.length>0&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===s.LineString?this._line.length>1&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===s.Polygon&&this._line.length>3&&(this._lines.push(this._line),this._starts.push(this._start))),this._line=[],this._start=0}_moveTo(t,e,i){this._type!==s.Polygon?i&&(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new o(t,e))):(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.push(new o(t,e)),this._isH=!1,this._isV=!1)}_lineTo(t,e,i){let r,n;if(this._type!==s.Polygon)if(i){if(t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line.length>0&&(r=this._line[this._line.length-1],r.equals(t,e)))return;this._line.push(new o(t,e))}else this._line&&this._line.length>0&&this._pushLine();else if(i||(t<this._xmin&&(t=this._xmin),t>this._xmax&&(t=this._xmax),e<this._ymin&&(e=this._ymin),e>this._ymax&&(e=this._ymax)),t=Math.round((t-(this._xmin+this._margin))*this._finalRatio),e=Math.round((e-(this._ymin+this._margin))*this._finalRatio),this._line&&this._line.length>0){r=this._line[this._line.length-1];const i=r.x===t,s=r.y===e;if(i&&s)return;this._isH&&i||this._isV&&s?(r.x=t,r.y=e,n=this._line[this._line.length-2],n.x===t&&n.y===e?(this._line.pop(),this._line.length<=1?(this._isH=!1,this._isV=!1):(n=this._line[this._line.length-2],this._isH=n.x===t,this._isV=n.y===e)):(this._isH=n.x===t,this._isV=n.y===e)):(this._line.push(new o(t,e)),this._isH=i,this._isV=s)}else this._line.push(new o(t,e))}}class h{setExtent(t){this._ratio=4096===t?1:4096/t}get validateTessellation(){return this._ratio<1}reset(t){this._lines=[],this._line=null}moveTo(t,e){this._line&&this._lines.push(this._line),this._line=[];const i=this._ratio;this._line.push(new o(t*i,e*i))}lineTo(t,e){const i=this._ratio;this._line.push(new o(t*i,e*i))}close(){const t=this._line;t&&!t[0].isEqual(t[t.length-1])&&t.push(t[0])}result(){return this._line&&this._lines.push(this._line),0===this._lines.length?null:this._lines}}!function(t){t[t.sideLeft=0]="sideLeft",t[t.sideRight=1]="sideRight",t[t.sideTop=2]="sideTop",t[t.sideBottom=3]="sideBottom"}(r||(r={}));class c{static simplify(t,e,i){if(!i)return;const s=-e,n=t+e,o=-e,a=t+e,l=[],h=[],u=i.length;for(let t=0;t<u;++t){const e=i[t];if(!e||e.length<2)continue;let c,u=e[0];const f=e.length;for(let i=1;i<f;++i)c=e[i],u.x===c.x&&(u.x<=s&&(u.y>c.y?(l.push(t),l.push(i),l.push(r.sideLeft),l.push(-1)):(h.push(t),h.push(i),h.push(r.sideLeft),h.push(-1))),u.x>=n&&(u.y<c.y?(l.push(t),l.push(i),l.push(r.sideRight),l.push(-1)):(h.push(t),h.push(i),h.push(r.sideRight),h.push(-1)))),u.y===c.y&&(u.y<=o&&(u.x<c.x?(l.push(t),l.push(i),l.push(r.sideTop),l.push(-1)):(h.push(t),h.push(i),h.push(r.sideTop),h.push(-1))),u.y>=a&&(u.x>c.x?(l.push(t),l.push(i),l.push(r.sideBottom),l.push(-1)):(h.push(t),h.push(i),h.push(r.sideBottom),h.push(-1)))),u=c}if(0===l.length||0===h.length)return;c.fillParent(i,h,l),c.fillParent(i,l,h);const f=[];c.calcDeltas(f,h,l),c.calcDeltas(f,l,h),c.addDeltas(f,i)}static fillParent(t,e,i){const s=i.length,n=e.length;for(let o=0;o<n;o+=4){const n=e[o],a=e[o+1],l=e[o+2],h=t[n][a-1],c=t[n][a];let f=8092,_=-1;for(let e=0;e<s;e+=4){if(i[e+2]!==l)continue;const s=i[e],n=i[e+1],o=t[s][n-1],a=t[s][n];switch(l){case r.sideLeft:case r.sideRight:if(u(h.y,o.y,a.y)&&u(c.y,o.y,a.y)){const t=Math.abs(a.y-o.y);t<f&&(f=t,_=e)}break;case r.sideTop:case r.sideBottom:if(u(h.x,o.x,a.x)&&u(c.x,o.x,a.x)){const t=Math.abs(a.x-o.x);t<f&&(f=t,_=e)}}}e[o+3]=_}}static calcDeltas(t,e,i){const s=e.length;for(let r=0;r<s;r+=4){const s=[],n=c.calcDelta(r,e,i,s);t.push(e[r]),t.push(e[r+1]),t.push(e[r+2]),t.push(n)}}static calcDelta(t,e,i,s){const r=e[t+3];if(-1===r)return 0;const n=s.length;return n>1&&s[n-2]===r?0:(s.push(r),c.calcDelta(r,i,e,s)+1)}static addDeltas(t,e){const i=t.length;let s=0;for(let e=0;e<i;e+=4){const i=t[e+3];i>s&&(s=i)}for(let n=0;n<i;n+=4){const i=e[t[n]],o=t[n+1],a=s-t[n+3];switch(t[n+2]){case r.sideLeft:i[o-1].x-=a,i[o].x-=a,1===o&&(i[i.length-1].x-=a),o===i.length-1&&(i[0].x-=a);break;case r.sideRight:i[o-1].x+=a,i[o].x+=a,1===o&&(i[i.length-1].x+=a),o===i.length-1&&(i[0].x+=a);break;case r.sideTop:i[o-1].y-=a,i[o].y-=a,1===o&&(i[i.length-1].y-=a),o===i.length-1&&(i[0].y-=a);break;case r.sideBottom:i[o-1].y+=a,i[o].y+=a,1===o&&(i[i.length-1].y+=a),o===i.length-1&&(i[0].y+=a)}}}}const u=(t,e,i)=>t>=e&&t<=i||t>=i&&t<=e},31134:(t,e,i)=>{i.d(e,{Z:()=>f});var s,r=i(43697),n=i(96674),o=i(62357),a=i(5600),l=i(90578),h=(i(67676),i(80442),i(52011)),c=i(61565);let u=s=class extends n.wq{constructor(t){super(t),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(t){return(0,o.t_)(t)}clone(){return new s({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};(0,r._)([(0,a.Cb)({type:c.JT,json:{default:"none",write:!0}})],u.prototype,"decoration",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],u.prototype,"family",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:{overridePolicy:(t,e,i)=>({enabled:!i||!i.textSymbol3D})}}})],u.prototype,"size",void 0),(0,r._)([(0,l.p)("size")],u.prototype,"castSize",null),(0,r._)([(0,a.Cb)({type:c.g6,json:{default:"normal",write:!0}})],u.prototype,"style",void 0),(0,r._)([(0,a.Cb)({type:c.vC,json:{default:"normal",write:!0}})],u.prototype,"weight",void 0),u=s=(0,r._)([(0,h.j)("esri.symbols.Font")],u);const f=u},21793:(t,e,i)=>{i.d(e,{L:()=>l,z:()=>a});var s=i(58835),r=i(59255);const n=512;let o;class a{constructor(t){this._geometry=t}next(){const t=this._geometry;return this._geometry=null,t}}function l(t,e){o||(o=new r.bN(0,0,0,1));const i="esriGeometryPolygon"===t.geometryType,a=i?r.Vl.Polygon:r.Vl.LineString,l=i?3:2;let h,c;for(o.reset(a),o.setPixelMargin(e+1),o.setExtent(n);t.nextPath();)if(!(t.pathSize<l)){for(t.nextPoint(),h=t.x,c=-t.y,o.moveTo(h,c);t.nextPoint();)h=t.x,c=-t.y,o.lineTo(h,c);i&&o.close()}const u=o.result(!1);if(u){const e=s.z.createEmptyOptimizedCIM(t.geometryType);for(const t of u){e.startPath();for(const i of t)e.pushXY(i.x,-i.y)}return e.reset(),e}return null}},26145:(t,e,i)=>{i.d(e,{h:()=>Mt,W:()=>bt});class s{static local(){return null===s.instance&&(s.instance=new s),s.instance}execute(t,e,i,s,n){return new r(t,e,i)}}s.instance=null;class r{constructor(t,e,i){this._inputGeometries=t,this._angleTolerance=void 0!==e.angleTolerance?e.angleTolerance:120,this._maxCosAngle=Math.cos((1-Math.abs(this._angleTolerance)/180)*Math.PI)}next(){let t=this._inputGeometries.next();for(;t;){if("esriGeometryPolygon"===t.geometryType)this._isClosed=!0;else if("esriGeometryPolyline"===t.geometryType)this._isClosed=!1;else{if("esriGeometryEnvelope"!==t.geometryType){t=this._inputGeometries.next();continue}if(this._maxCosAngle)return t;this._isClosed=!0}for(;t.nextPath();)this._processPath(t);return t.reset(),t}return null}_processPath(t){if(t.nextPoint()){const e=t.x,i=t.y;let s=e,r=i,n=t.pathSize,o=0,a=0,l=0,h=0,c=0,u=0;this._isClosed&&++n;for(let f=1;t.nextPoint()||f<n;++f){let _,m;this._isClosed&&f===n-1?(_=e,m=i):(_=t.x,m=t.y);const d=_-s,p=m-r,y=Math.sqrt(d*d+p*p);f>1&&y>0&&l>0&&(o*d+a*p)/y/l<=this._maxCosAngle&&t.setControlPointAt(f-1),1===f&&(h=d,c=p,u=y),y>0&&(s=_,r=m,o=d,a=p,l=y)}this._isClosed&&l>0&&u>0&&(o*h+a*c)/u/l<=this._maxCosAngle&&t.setControlPointAt(0)}}}var n=i(58835),o=i(95961),a=i(31936);function l(t,e){t[4]=e}class h{constructor(t,e=!0,i=!0,s=0){this.isClosed=!1,this.geometryCursor=null,this.geometryCursor=!e&&"esriGeometryPolygon"===t.geometryType||!i&&"esriGeometryPolyline"===t.geometryType?null:t,this.geomUnitsPerPoint=s,this.iteratePath=!1,this.internalPlacement=new a.u}next(){if(!this.geometryCursor)return null;for(;this.iteratePath||this.geometryCursor.nextPath();){this.geometryCursor.seekPathStart();const t=this.processPath(this.geometryCursor);if(t)return t}return this.geometryCursor=null,null}}class c{constructor(t,e,i,s=0){this.isClosed=!1,this.inputGeometries=t,this.acceptPolygon=e,this.acceptPolyline=i,this.geomUnitsPerPoint=s,this.iteratePath=!1,this.multiPathCursor=null}next(){for(;;){if(!this.multiPathCursor){let t=this.inputGeometries.next();for(;t&&(this.isClosed=this.acceptPolygon&&"esriGeometryPolygon"===t.geometryType||"esriGeometryEnvelope"===t.geometryType,this.multiPathCursor=t,!this.multiPathCursor);)t=this.inputGeometries.next();if(!this.multiPathCursor)return null}for(;this.iteratePath||this.multiPathCursor.nextPath();){this.multiPathCursor.seekPathStart();const t=this.processPath(this.multiPathCursor);if(t)return t}this.multiPathCursor=null}}}var u=i(95648);const f=.03;class _{constructor(t=0,e=!1){}isEmpty(t){if(!t.nextPoint())return!0;let e,i,s,r;for(e=t.x,i=t.y;t.nextPoint();e=i,i=r)if(s=t.x,r=t.y,s!==e||r!==i)return t.seekPathStart(),!1;return t.seekPathStart(),!0}normalize(t){const e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);0!==e&&(t[0]/=e,t[1]/=e)}getLength(t,e,i,s){const r=i-t,n=s-e;return Math.sqrt(r*r+n*n)}getSegLength(t){const[[e,i],[s,r]]=t;return this.getLength(e,i,s,r)}getCoord2D(t,e,i,s,r){return[t+(i-t)*r,e+(s-e)*r]}getSegCoord2D(t,e){const[[i,s],[r,n]]=t;return this.getCoord2D(i,s,r,n,e)}getAngle(t,e,i,s,r){const n=i-t,o=s-e;return Math.atan2(o,n)}getAngleCS(t,e,i,s,r){const n=i-t,o=s-e,a=Math.sqrt(n*n+o*o);return a>0?[n/a,o/a]:[1,0]}getSegAngleCS(t,e){const[[i,s],[r,n]]=t;return this.getAngleCS(i,s,r,n,e)}cut(t,e,i,s,r,n){return[r<=0?[t,e]:this.getCoord2D(t,e,i,s,r),n>=1?[i,s]:this.getCoord2D(t,e,i,s,n)]}getSubCurve(t,e,i){const s=n.z.createEmptyOptimizedCIM("esriGeometryPolyline");return this.appendSubCurve(s,t,e,i)?s:null}appendSubCurve(t,e,i,s){t.startPath(),e.seekPathStart();let r=0,n=!0;if(!e.nextPoint())return!1;let o=e.x,a=e.y;for(;e.nextPoint();){const l=this.getLength(o,a,e.x,e.y);if(0!==l){if(n){if(r+l>i){const h=(i-r)/l;let c=1,u=!1;r+l>=s&&(c=(s-r)/l,u=!0);const f=this.cut(o,a,e.x,e.y,h,c);if(f&&t.pushPoints(f),u)break;n=!1}}else{if(r+l>s){const i=this.cut(o,a,e.x,e.y,0,(s-r)/l);i&&t.pushPoint(i[1]);break}t.pushXY(e.x,e.y)}r+=l,o=e.x,a=e.y}else o=e.x,a=e.y}return!0}getCIMPointAlong(t,e){if(!t.nextPoint())return null;let i,s,r,n,o=0;for(i=t.x,s=t.y;t.nextPoint();i=r,s=n){r=t.x,n=t.y;const a=this.getLength(i,s,r,n);if(0!==a){if(o+a>e){const t=(e-o)/a;return this.getCoord2D(i,s,r,n,t)}o+=a}}return null}offset(t,e,i,s,r){if(!t||t.length<2)return null;let n=0,o=t[n++],a=n;for(;n<t.length;){const e=t[n];e[0]===o[0]&&e[1]===o[1]||(n!==a&&(t[a]=t[n]),o=t[a++]),n++}const l=t[0][0]===t[a-1][0]&&t[0][1]===t[a-1][1];if(l&&--a,a<(l?3:2))return null;const h=[];o=l?t[a-1]:null;let c=t[0];for(let r=0;r<a;r++){const n=r===a-1?l?t[0]:null:t[r+1];if(o)if(n){const t=[n[0]-c[0],n[1]-c[1]];this.normalize(t);const r=[c[0]-o[0],c[1]-o[1]];this.normalize(r);const a=r[0]*t[1]-r[1]*t[0],l=r[0]*t[0]+r[1]*t[1];if(0===a&&1===l){c=n;continue}if(a>=0==e<=0){if(l<1){const i=[t[0]-r[0],t[1]-r[1]];this.normalize(i);const n=Math.sqrt((1+l)/2);if(n>1/s){const t=-Math.abs(e)/n;h.push([c[0]-i[0]*t,c[1]-i[1]*t])}}}else switch(i){case u.id.Mitered:{const i=Math.sqrt((1+l)/2);if(i>0&&1/i<s){const s=[t[0]-r[0],t[1]-r[1]];this.normalize(s);const n=Math.abs(e)/i;h.push([c[0]-s[0]*n,c[1]-s[1]*n]);break}}case u.id.Bevelled:h.push([c[0]+r[1]*e,c[1]-r[0]*e]),h.push([c[0]+t[1]*e,c[1]-t[0]*e]);break;case u.id.Rounded:if(l<1){h.push([c[0]+r[1]*e,c[1]-r[0]*e]);const i=Math.floor(2.5*(1-l));if(i>0){const s=1/i;let n=s;for(let o=1;o<i;o++,n+=s){const i=[r[1]*(1-n)+t[1]*n,-r[0]*(1-n)-t[0]*n];this.normalize(i),h.push([c[0]+i[0]*e,c[1]+i[1]*e])}}h.push([c[0]+t[1]*e,c[1]-t[0]*e])}break;case u.id.Square:default:if(a<0)h.push([c[0]+(r[1]+r[0])*e,c[1]+(r[1]-r[0])*e]),h.push([c[0]+(t[1]-t[0])*e,c[1]-(t[0]+t[1])*e]);else{const i=Math.sqrt((1+Math.abs(l))/2),s=[t[0]-r[0],t[1]-r[1]];this.normalize(s);const n=e/i;h.push([c[0]-s[0]*n,c[1]-s[1]*n])}}}else{const t=[c[0]-o[0],c[1]-o[1]];this.normalize(t),h.push([c[0]+t[1]*e,c[1]-t[0]*e])}else{const t=[n[0]-c[0],n[1]-c[1]];this.normalize(t),h.push([c[0]+t[1]*e,c[1]-t[0]*e])}o=c,c=n}return h.length<(l?3:2)?null:(l&&h.push([h[0][0],h[0][1]]),h)}}const m=1.7320508075688772,d=u.TF.OpenEnded;class p{static local(){return null===p.instance&&(p.instance=new p),p.instance}execute(t,e,i,s,r){return new y(t,e,i)}}p.instance=null;class y extends c{constructor(t,e,i){super(t,!1,!0),this._curveHelper=new _,this._width=(void 0!==e.width?e.width:5)*i,this._arrowType=void 0!==e.geometricEffectArrowType?e.geometricEffectArrowType:void 0!==e.arrowType?e.arrowType:d,this._offsetFlattenError=f*i}processPath(t){const e=n.z.createEmptyOptimizedCIM(t.geometryType);switch(this._arrowType){case u.TF.OpenEnded:default:this._constructSimpleArrow(e,t,!0);break;case u.TF.Block:this._constructSimpleArrow(e,t,!1);break;case u.TF.Crossed:this._constructCrossedArrow(e,t)}return e}_constructSimpleArrow(t,e,i){const s=e.pathLength();let r=this._width;s<2*r&&(r=s/2);const n=this._curveHelper.getSubCurve(e,0,s-r);if(!n||!n.nextPath())return;n.seekPathStart();const a=r/2;if(this._curveHelper.isEmpty(n))return;const l=(0,o.l)(n),h=this._constructOffset(l,-a);if(!h)return;const c=this._constructOffset(l,a);if(!c)return;const u=this._constructArrowBasePoint(h,-a/2);if(!u)return;const f=this._constructArrowBasePoint(c,a/2);if(!f)return;e.seekInPath(e.pathSize-1);const _=[e.x,e.y];t.pushPath(c),t.nextPath(),t.nextPoint(),t.setControlPoint(),t.pushPoint(f),t.nextPoint(),t.setControlPoint(),t.pushPoint(_),t.nextPoint(),t.setControlPoint(),t.pushPoint(u),t.nextPoint(),t.setControlPoint(),t.pushPoints(h.reverse()),t.setControlPoint(),i||(t.setControlPointAt(0),t.setControlPointAt(t.pathSize-1),t.pushPoint(c[0])),t.reset()}_constructCrossedArrow(t,e){const i=e.pathLength();let s=this._width;i<s*(1+m+1)&&(s=i/(1+m+1)),e.seekPathStart();const r=this._curveHelper.getSubCurve(e,0,i-s*(1+m));if(!r)return;r.nextPath();const n=s/2;if(this._curveHelper.isEmpty(r))return;const a=(0,o.l)(r),l=this._constructOffset(a,n);if(!l)return;const h=this._constructOffset(a,-n);if(!h)return;const c=this._curveHelper.getSubCurve(e,0,i-s);if(!c)return;if(c.nextPath(),this._curveHelper.isEmpty(c))return;const u=(0,o.l)(c),f=this._constructOffset(u,n);if(!f)return;const _=this._constructOffset(u,-n);if(!_)return;const d=f[f.length-1],p=this._constructArrowBasePoint(f,n/2);if(!p)return;const y=_[_.length-1],g=this._constructArrowBasePoint(_,-n/2);if(!g)return;e.seekInPath(e.pathSize-1);const x=[e.x,e.y];t.pushPath(l),t.nextPath(),t.nextPoint(),t.setControlPoint(),t.pushPoint(y),t.nextPoint(),t.setControlPoint(),t.pushPoint(g),t.nextPoint(),t.setControlPoint(),t.pushPoint(x),t.nextPoint(),t.setControlPoint(),t.pushPoint(p),t.nextPoint(),t.setControlPoint(),t.pushPoint(d),t.nextPoint(),t.setControlPoint(),t.pushPoints(h.reverse()),t.nextPoint(),t.setControlPoint(),t.reset()}_constructOffset(t,e){return this._curveHelper.offset(t,e,u.id.Rounded,4,this._offsetFlattenError)}_constructArrowBasePoint(t,e){if(!t||t.length<2)return null;const i=t[t.length-2],s=t[t.length-1],r=[s[0]-i[0],s[1]-i[1]];return this._curveHelper.normalize(r),[s[0]+r[1]*e,s[1]-r[0]*e]}}i(66577);var g,x=i(21793),M=i(82971);class b{static local(){return null===b.instance&&(b.instance=new b),b.instance}execute(t,e,i,s,r,n){return new v(t,e,i,s,r,n)}}b.instance=null;class v{constructor(t,e,i,s,r,n){this._inputGeometries=t,this._tileKey=s,this._geometryEngine=r,this._curveHelper=new _,this._size=(void 0!==e.size?e.size:1)*i,this._maxInflateSize=n*i,this._offsetFlattenError=f*i}next(){let t;for(;t=this._inputGeometries.next();){if(0===this._size)return t;if("esriGeometryEnvelope"===t.geometryType)if(this._size>0){const e=n.z.createEmptyOptimizedCIM(t.geometryType),i=(0,o.M)(t)[0],s=this._curveHelper.offset(i,this._size,u.id.Rounded,4,this._offsetFlattenError);if(s)return e.pushPath(s),e}else if(this._size<0){const e=t.asJSON();if(Math.min(e.xmax-e.xmin,e.ymax-e.ymin)+2*this._size>0)return n.z.fromJSONCIM({xmin:e.xmin-this._size,xmax:e.xmax+this._size,ymin:e.ymin-this._size,ymax:e.ymax+this._size})}const e=this._geometryEngine;if(null==e)return null;const i=this._tileKey?(0,x.L)(t,this._maxInflateSize):t;if(!i)continue;const s=e.buffer(M.Z.WebMercator,i.asJSON(),this._size,1);return s?n.z.fromJSONCIM(s):null}return null}}class S{static local(){return null===S.instance&&(S.instance=new S),S.instance}execute(t,e,i,s,r){return new P(t,e,i)}}S.instance=null;class P{constructor(t,e,i){this._defaultPointSize=20,this._inputGeometries=t,this._geomUnitsPerPoint=i,this._rule=e.rule??u.Em.FullGeometry,this._defaultSize=this._defaultPointSize*i}next(){let t;for(;t=this._inputGeometries.next();){const e=this._processGeom((0,o.M)(t));if(e&&e.length)return n.z.fromJSONCIM({paths:e})}return null}_clone(t){return[t[0],t[1]]}_mid(t,e){return[(t[0]+e[0])/2,(t[1]+e[1])/2]}_mix(t,e,i,s){return[t[0]*e+i[0]*s,t[1]*e+i[1]*s]}_add(t,e){return[t[0]+e[0],t[1]+e[1]]}_add2(t,e,i){return[t[0]+e,t[1]+i]}_sub(t,e){return[t[0]-e[0],t[1]-e[1]]}_dist(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}_norm(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}_normalize(t,e=1){const i=e/this._norm(t);t[0]*=i,t[1]*=i}_leftPerpendicular(t){const e=-t[1],i=t[0];t[0]=e,t[1]=i}_leftPerp(t){return[-t[1],t[0]]}_rightPerpendicular(t){const e=t[1],i=-t[0];t[0]=e,t[1]=i}_rightPerp(t){return[t[1],-t[0]]}_dotProduct(t,e){return t[0]*e[0]+t[1]*e[1]}_crossProduct(t,e){return t[0]*e[1]-t[1]*e[0]}_rotateDirect(t,e,i){const s=t[0]*e-t[1]*i,r=t[0]*i+t[1]*e;t[0]=s,t[1]=r}_makeCtrlPt(t){const e=[t[0],t[1]];return l(e,1),e}_addAngledTicks(t,e,i,s){const r=this._sub(i,e);this._normalize(r);const n=this._crossProduct(r,this._sub(s,e));let o;o=n>0?this._rightPerp(r):this._leftPerp(r);const a=Math.abs(n)/2,l=[];l.push([e[0]+(o[0]-r[0])*a,e[1]+(o[1]-r[1])*a]),l.push(e),l.push(i),l.push([i[0]+(o[0]+r[0])*a,i[1]+(o[1]+r[1])*a]),t.push(l)}_addBezier2(t,e,i,s,r){if(0==r--)return void t.push(s);const n=this._mid(e,i),o=this._mid(i,s),a=this._mid(n,o);this._addBezier2(t,e,n,a,r),this._addBezier2(t,a,o,s,r)}_addBezier3(t,e,i,s,r,n){if(0==n--)return void t.push(r);const o=this._mid(e,i),a=this._mid(i,s),l=this._mid(s,r),h=this._mid(o,a),c=this._mid(a,l),u=this._mid(h,c);this._addBezier3(t,e,o,h,u,n),this._addBezier3(t,u,c,l,r,n)}_add90DegArc(t,e,i,s,r){const n=r??this._crossProduct(this._sub(i,e),this._sub(s,e))>0,o=this._mid(e,i),a=this._sub(o,e);n?this._leftPerpendicular(a):this._rightPerpendicular(a),o[0]+=a[0],o[1]+=a[1],this._addBezier3(t,e,this._mix(e,.33333,o,.66667),this._mix(i,.33333,o,.66667),i,4)}_addArrow(t,e,i){const s=e[0],r=e[1],n=e[e.length-1],o=this._sub(s,r);this._normalize(o);const a=this._crossProduct(o,this._sub(n,r)),l=.5*a,h=this._leftPerp(o),c=[n[0]-h[0]*a,n[1]-h[1]*a],u=e.length-1,f=[];f.push(i?[-h[0],-h[1]]:h);let _=[-o[0],-o[1]];for(let t=1;t<u-1;t++){const i=this._sub(e[t+1],e[t]);this._normalize(i);const s=this._dotProduct(i,_),r=this._crossProduct(i,_),n=Math.sqrt((1+s)/2),o=this._sub(i,_);this._normalize(o),o[0]/=n,o[1]/=n,f.push(r<0?[-o[0],-o[1]]:o),_=i}f.push(this._rightPerp(_));for(let i=f.length-1;i>0;i--)t.push([e[i][0]+f[i][0]*l,e[i][1]+f[i][1]*l]);t.push([c[0]+f[0][0]*l,c[1]+f[0][1]*l]),t.push([c[0]+f[0][0]*a,c[1]+f[0][1]*a]),t.push(s),t.push([c[0]-f[0][0]*a,c[1]-f[0][1]*a]),t.push([c[0]-f[0][0]*l,c[1]-f[0][1]*l]);for(let i=1;i<f.length;i++)t.push([e[i][0]-f[i][0]*l,e[i][1]-f[i][1]*l])}_cp2(t,e,i){return t.length>=2?t[1]:this._add2(t[0],e*this._defaultSize,i*this._defaultSize)}_cp3(t,e,i,s){if(t.length>=3)return t[2];const r=this._mix(t[0],1-i,e,i),n=this._sub(e,t[0]);return this._normalize(n),this._rightPerpendicular(n),[r[0]+n[0]*s*this._defaultSize,r[1]+n[1]*s*this._defaultSize]}_arrowPath(t){if(t.length>2)return t;const e=t[0],i=this._cp2(t,-4,0),s=this._sub(e,i);this._normalize(s);const r=this._rightPerp(s);return[e,i,[e[0]+(r[0]-s[0])*this._defaultSize,e[1]+(r[1]-s[1])*this._defaultSize]]}_arrowLastSeg(t){const e=t[0],i=this._cp2(t,-4,0);let s;if(t.length>=3)s=t[t.length-1];else{const t=this._sub(e,i);this._normalize(t);const r=this._rightPerp(t);s=[e[0]+(r[0]-t[0])*this._defaultSize,e[1]+(r[1]-t[1])*this._defaultSize]}return[i,s]}_processGeom(t){if(!t)return null;const e=[];for(const i of t){if(!i||0===i.length)continue;const t=i.length;let s=i[0];switch(this._rule){case u.Em.PerpendicularFromFirstSegment:{const t=this._cp2(i,0,-1),r=this._cp3(i,t,.5,4),n=[];n.push(r),n.push(this._mid(s,t)),e.push(n);break}case u.Em.ReversedFirstSegment:{const t=this._cp2(i,0,-1);e.push([t,s]);break}case u.Em.PerpendicularToSecondSegment:{const t=this._cp2(i,-4,1),r=this._cp3(i,t,.882353,-1.94),n=[];n.push(this._mid(t,r)),n.push(s),e.push(n);break}case u.Em.SecondSegmentWithTicks:{const t=this._cp2(i,-4,1),r=this._cp3(i,t,.882353,-1.94),n=this._sub(r,t);let o;o=this._crossProduct(n,this._sub(s,t))>0?this._rightPerp(o):this._leftPerp(n);const a=[];a.push([t[0]+(o[0]-n[0])/3,t[1]+(o[1]-n[1])/3]),a.push(t),a.push(r),a.push([r[0]+(o[0]+n[0])/3,r[1]+(o[1]+n[1])/3]),e.push(a);break}case u.Em.DoublePerpendicular:{const t=this._cp2(i,0,-1),r=this._cp3(i,t,.5,3),n=this._mid(s,t),o=this._sub(n,r);this._normalize(o);const a=this._crossProduct(o,this._sub(s,r));this._leftPerpendicular(o);const l=[];l.push(s),l.push([r[0]+o[0]*a,r[1]+o[1]*a]),e.push(l);const h=[];h.push([r[0]-o[0]*a,r[1]-o[1]*a]),h.push(t),e.push(h);break}case u.Em.OppositeToFirstSegment:{const t=this._cp2(i,0,-1),r=this._cp3(i,t,.5,3),n=this._mid(s,t),o=this._sub(n,r);this._normalize(o);const a=this._crossProduct(o,this._sub(s,r));this._leftPerpendicular(o);const l=[];l.push([r[0]+o[0]*a,r[1]+o[1]*a]),l.push([r[0]-o[0]*a,r[1]-o[1]*a]),e.push(l);break}case u.Em.TriplePerpendicular:{const t=this._cp2(i,0,-1),r=this._cp3(i,t,.5,4),n=this._mid(s,t),o=this._sub(n,r);this._normalize(o);const a=this._crossProduct(o,this._sub(s,r));this._leftPerpendicular(o);const l=[];l.push([r[0]+o[0]*a*.8,r[1]+o[1]*a*.8]),l.push([n[0]+.8*(s[0]-n[0]),n[1]+.8*(s[1]-n[1])]),e.push(l),e.push([r,n]);const h=[];h.push([r[0]-o[0]*a*.8,r[1]-o[1]*a*.8]),h.push([n[0]+.8*(t[0]-n[0]),n[1]+.8*(t[1]-n[1])]),e.push(h);break}case u.Em.HalfCircleFirstSegment:{const t=this._cp2(i,0,-1),r=this._cp3(i,t,.5,4),n=this._mid(s,t);let o=this._sub(t,s);const a=Math.cos(Math.PI/18),l=Math.sin(Math.PI/18),h=Math.sqrt((1+a)/2),c=Math.sqrt((1-a)/2),u=[];let f;this._crossProduct(o,this._sub(r,s))>0?(u.push(s),o=this._sub(s,n),f=t):(u.push(t),o=this._sub(t,n),f=s),this._rotateDirect(o,h,c),o[0]/=h,o[1]/=h;for(let t=1;t<=18;t++)u.push(this._add(n,o)),this._rotateDirect(o,a,l);u.push(f),e.push(u);break}case u.Em.HalfCircleSecondSegment:{const t=this._cp2(i,0,-1),r=this._cp3(i,t,1,-1);let n=this._sub(s,t);this._normalize(n);const o=this._crossProduct(n,this._sub(r,t))/2;this._leftPerpendicular(n);const a=[t[0]+n[0]*o,t[1]+n[1]*o];n=this._sub(t,a);const l=Math.cos(Math.PI/18);let h=Math.sin(Math.PI/18);o>0&&(h=-h);const c=[t];for(let t=1;t<=18;t++)this._rotateDirect(n,l,h),c.push(this._add(a,n));e.push(c);break}case u.Em.HalfCircleExtended:{const r=this._cp2(i,0,-2),n=this._cp3(i,r,1,-1);let o;if(t>=4)o=i[3];else{const t=this._sub(s,r);o=this._add(n,t)}const a=this._dist(r,n)/2/.75,l=this._sub(r,s);this._normalize(l,a);const h=this._sub(n,o);this._normalize(h,a);const c=[o,n];e.push(c);const u=[this._clone(n)];this._addBezier3(u,n,this._add(n,h),this._add(r,l),r,4),u.push(s),e.push(u);break}case u.Em.OpenCircle:{const t=this._cp2(i,-2,0),r=this._sub(t,s),n=Math.cos(Math.PI/18),o=-Math.sin(Math.PI/18),a=[t];for(let t=1;t<=33;t++)this._rotateDirect(r,n,o),a.push(this._add(s,r));e.push(a);break}case u.Em.CoverageEdgesWithTicks:{const r=this._cp2(i,0,-1);let n,o;if(t>=3)n=i[2];else{const t=this._sub(r,s),e=this._leftPerp(t);n=[s[0]+e[0]-.25*t[0],s[1]+e[1]-.25*t[1]]}if(t>=4)o=i[3];else{const t=this._mid(s,r),e=this._sub(s,r);this._normalize(e),this._leftPerpendicular(e);const i=this._crossProduct(e,this._sub(n,t));this._rightPerpendicular(e),o=[n[0]+e[0]*i*2,n[1]+e[1]*i*2]}const a=this._sub(r,s);let l,h;l=this._crossProduct(a,this._sub(n,s))>0?this._rightPerp(a):this._leftPerp(a),h=[],h.push(n),h.push(s),h.push([s[0]+(l[0]-a[0])/3,s[1]+(l[1]-a[1])/3]),e.push(h),l=this._crossProduct(a,this._sub(o,r))>0?this._rightPerp(l):this._leftPerp(a),h=[],h.push([r[0]+(l[0]+a[0])/3,r[1]+(l[1]+a[1])/3]),h.push(r),h.push(o),e.push(h);break}case u.Em.GapExtentWithDoubleTicks:{const r=this._cp2(i,0,2),n=this._cp3(i,r,0,1);let o;if(t>=4)o=i[3];else{const t=this._sub(r,s);o=this._add(n,t)}this._addAngledTicks(e,s,r,this._mid(n,o)),this._addAngledTicks(e,n,o,this._mid(s,r));break}case u.Em.GapExtentMidline:{const r=this._cp2(i,2,0),n=this._cp3(i,r,0,1);let o;if(t>=4)o=i[3];else{const t=this._sub(r,s);o=this._add(n,t)}const a=[];a.push(this._mid(s,n)),a.push(this._mid(r,o)),e.push(a);break}case u.Em.Chevron:{const r=this._cp2(i,-1,-1);let n;if(t>=3)n=i[2];else{const t=this._sub(r,s);this._leftPerpendicular(t),n=this._add(s,t)}e.push([r,this._makeCtrlPt(s),n]);break}case u.Em.PerpendicularWithArc:{const t=this._cp2(i,0,-2),r=this._cp3(i,t,.5,-1);let n=this._sub(t,s);const o=this._norm(n);n[0]/=o,n[1]/=o;const a=this._crossProduct(n,this._sub(r,s));let l=this._dotProduct(n,this._sub(r,s));l<.05*o?l=.05*o:l>.95*o&&(l=.95*o);const h=[s[0]+n[0]*l,s[1]+n[1]*l];this._leftPerpendicular(n);let c=[];c.push([h[0]-n[0]*a,h[1]-n[1]*a]),c.push([h[0]+n[0]*a,h[1]+n[1]*a]),e.push(c);const u=[t[0]+n[0]*a,t[1]+n[1]*a];n=this._sub(t,u);const f=Math.cos(Math.PI/18);let _=Math.sin(Math.PI/18);a<0&&(_=-_),c=[s,t];for(let t=1;t<=9;t++)this._rotateDirect(n,f,_),c.push(this._add(u,n));e.push(c);break}case u.Em.ClosedHalfCircle:{const t=this._cp2(i,2,0),r=this._mid(s,t),n=this._sub(t,r),o=Math.cos(Math.PI/18),a=Math.sin(Math.PI/18),l=[s,t];for(let t=1;t<=18;t++)this._rotateDirect(n,o,a),l.push(this._add(r,n));e.push(l);break}case u.Em.TripleParallelExtended:{const t=this._cp2(i,0,-2),r=this._cp3(i,t,1,-2),n=this._mid(s,t),o=this._sub(r,t);this._normalize(o);const a=Math.abs(this._crossProduct(o,this._sub(n,t)))/2,h=this._dist(t,r),c=[t,s];c.push([s[0]+o[0]*h*.5,s[1]+o[1]*h*.5]),e.push(c);const u=[];u.push([n[0]-o[0]*a,n[1]-o[1]*a]),u.push([n[0]+o[0]*h*.375,n[1]+o[1]*h*.375]),l(u[u.length-1],1),u.push([n[0]+o[0]*h*.75,n[1]+o[1]*h*.75]),e.push(u);const f=[t,r];e.push(f);break}case u.Em.ParallelWithTicks:{const t=this._cp2(i,3,0),r=this._cp3(i,t,.5,-1),n=this._sub(r,t);this._normalize(n);const o=this._crossProduct(n,this._sub(r,s));this._leftPerpendicular(n),this._addAngledTicks(e,s,t,r),this._addAngledTicks(e,this._mix(s,1,n,o),this._mix(t,1,n,o),this._mid(s,t));break}case u.Em.Parallel:{const t=this._cp2(i,3,0),r=this._cp3(i,t,.5,-1),n=this._sub(t,s);this._normalize(n);const o=this._leftPerp(n),a=this._crossProduct(n,this._sub(r,s));let l=[s,t];e.push(l),l=[],l.push([s[0]+o[0]*a,s[1]+o[1]*a]),l.push([t[0]+o[0]*a,t[1]+o[1]*a]),e.push(l);break}case u.Em.PerpendicularToFirstSegment:{const t=this._cp2(i,3,0),r=this._cp3(i,t,.5,-1),n=this._mid(s,t),o=this._sub(t,s);this._normalize(o);const a=this._crossProduct(o,this._sub(r,s));this._leftPerpendicular(o);const l=[];l.push([n[0]-o[0]*a*.25,n[1]-o[1]*a*.25]),l.push([n[0]+o[0]*a*1.25,n[1]+o[1]*a*1.25]),e.push(l);break}case u.Em.ParallelOffset:{const t=this._cp2(i,3,0),r=this._cp3(i,t,.5,-1),n=this._sub(t,s);this._normalize(n);const o=this._crossProduct(n,this._sub(r,s));this._leftPerpendicular(n);const a=[];a.push([s[0]-n[0]*o,s[1]-n[1]*o]),a.push([t[0]-n[0]*o,t[1]-n[1]*o]),e.push(a);const l=[];l.push([s[0]+n[0]*o,s[1]+n[1]*o]),l.push([t[0]+n[0]*o,t[1]+n[1]*o]),e.push(l);break}case u.Em.OffsetOpposite:{const t=this._cp2(i,3,0),r=this._cp3(i,t,.5,-1),n=this._sub(t,s);this._normalize(n);const o=this._crossProduct(n,this._sub(r,s));this._leftPerpendicular(n);const a=[];a.push([s[0]-n[0]*o,s[1]-n[1]*o]),a.push([t[0]-n[0]*o,t[1]-n[1]*o]),e.push(a);break}case u.Em.OffsetSame:{const t=this._cp2(i,3,0),r=this._cp3(i,t,.5,-1),n=this._sub(t,s);this._normalize(n);const o=this._crossProduct(n,this._sub(r,s));this._leftPerpendicular(n);const a=[];a.push([s[0]+n[0]*o,s[1]+n[1]*o]),a.push([t[0]+n[0]*o,t[1]+n[1]*o]),e.push(a);break}case u.Em.CircleWithArc:{let r=this._cp2(i,3,0);const n=this._cp3(i,r,.5,-1);let o,a;if(t>=4)o=i[3],a=this._crossProduct(this._sub(o,r),this._sub(n,r))>0;else{o=r,a=this._crossProduct(this._sub(o,s),this._sub(n,s))>0;const t=24*this._geomUnitsPerPoint,e=this._sub(o,s);this._normalize(e,t);const i=Math.sqrt(2)/2;this._rotateDirect(e,i,a?i:-i),r=this._add(s,e)}const h=this._sub(r,s),c=Math.cos(Math.PI/18),u=Math.sin(Math.PI/18),f=[r];for(let t=1;t<=36;t++)this._rotateDirect(h,c,u),f.push(this._add(s,h));this._add90DegArc(f,r,o,n,a),l(f[f.length-8],1),e.push(f);break}case u.Em.DoubleJog:{let r,n,o=this._cp2(i,-3,1);if(r=t>=3?i[2]:this._add(s,this._sub(s,o)),t>=4)n=i[3];else{const t=s;s=o,n=r;const e=this._dist(s,t),i=this._dist(n,t);let a=30*this._geomUnitsPerPoint;.5*e<a&&(a=.5*e),.5*i<a&&(a=.5*i),o=this._mix(s,a/e,t,(e-a)/e),r=this._mix(n,a/i,t,(i-a)/i)}const a=this._mid(s,o),l=this._mid(n,r),h=this._dist(s,o),c=this._dist(r,n);let u=Math.min(h,c)/8;u=Math.min(u,24*this._geomUnitsPerPoint);const f=Math.cos(Math.PI/4);let _=this._sub(s,o);this._normalize(_,u),this._crossProduct(_,this._sub(n,o))>0?this._rotateDirect(_,f,-f):this._rotateDirect(_,f,f);let m=[];m.push(o),m.push(this._add(a,_)),m.push(this._sub(a,_)),m.push(s),e.push(m),_=this._sub(n,r),this._normalize(_,u),this._crossProduct(_,this._sub(s,r))<0?this._rotateDirect(_,f,f):this._rotateDirect(_,f,-f),m=[],m.push(r),m.push(this._add(l,_)),m.push(this._sub(l,_)),m.push(n),e.push(m);break}case u.Em.PerpendicularOffset:{const t=this._cp2(i,-4,1),r=this._cp3(i,t,.882353,-1.94),n=this._sub(r,t);this._crossProduct(n,this._sub(s,t))>0?this._rightPerpendicular(n):this._leftPerpendicular(n);const o=[n[0]/8,n[1]/8],a=this._sub(this._mid(t,r),o);e.push([a,s]);break}case u.Em.LineExcludingLastSegment:{const t=this._arrowPath(i),s=[];let r=t.length-2;for(;r--;)s.push(t[r]);e.push(s);break}case u.Em.MultivertexArrow:{const t=this._arrowPath(i),s=[];this._addArrow(s,t,!1),e.push(s);break}case u.Em.CrossedArrow:{const t=this._arrowPath(i),s=[];this._addArrow(s,t,!0),e.push(s);break}case u.Em.ChevronArrow:{const[t,r]=this._arrowLastSeg(i),n=10*this._geomUnitsPerPoint,o=this._sub(s,t);this._normalize(o);const a=this._crossProduct(o,this._sub(r,t)),l=this._leftPerp(o),h=[r[0]-l[0]*a*2,r[1]-l[1]*a*2],c=[];c.push([r[0]+o[0]*n,r[1]+o[1]*n]),c.push(s),c.push([h[0]+o[0]*n,h[1]+o[1]*n]),e.push(c);break}case u.Em.ChevronArrowOffset:{const[t,r]=this._arrowLastSeg(i),n=this._sub(s,t);this._normalize(n);const o=this._crossProduct(n,this._sub(r,t));this._leftPerpendicular(n);const a=[r[0]-n[0]*o,r[1]-n[1]*o],l=[];l.push([a[0]+n[0]*o*.5,a[1]+n[1]*o*.5]),l.push(this._mid(a,s)),l.push([a[0]-n[0]*o*.5,a[1]-n[1]*o*.5]),e.push(l);break}case u.Em.PartialFirstSegment:{const[t,r]=this._arrowLastSeg(i),n=this._sub(s,t);this._normalize(n);const o=this._crossProduct(n,this._sub(r,t));this._leftPerpendicular(n);const a=[r[0]-n[0]*o,r[1]-n[1]*o];e.push([t,a]);break}case u.Em.Arch:{const t=this._cp2(i,0,-1),r=this._cp3(i,t,.5,1),n=this._sub(s,t),o=this._mix(r,1,n,.55),a=this._mix(r,1,n,-.55),l=[s];this._addBezier2(l,s,o,r,4),this._addBezier2(l,r,a,t,4),e.push(l);break}case u.Em.CurvedParallelTicks:{const t=this._cp2(i,-4,1),r=this._cp3(i,t,.882353,-1.94),n=this._sub(r,t);this._crossProduct(n,this._sub(s,t))>0?this._rightPerpendicular(n):this._leftPerpendicular(n);const o=[n[0]/8,n[1]/8],a=this._sub(this._mid(t,r),o),l=this._sub(this._mix(t,.75,r,.25),o),h=this._sub(this._mix(t,.25,r,.75),o),c=[t];this._addBezier2(c,t,l,a,3),this._addBezier2(c,a,h,r,3),e.push(c);for(let t=0;t<8;t++){const i=c[2*t+1],s=[this._clone(i)];s.push(this._add(i,[n[0]/4,n[1]/4])),e.push(s)}break}case u.Em.Arc90Degrees:{const t=this._cp2(i,0,-1),r=this._cp3(i,t,.5,1),n=[t];this._add90DegArc(n,t,s,r),e.push(n);break}case u.Em.FullGeometry:default:e.push(i)}}return e}}class w{static local(){return null===w.instance&&(w.instance=new w),w.instance}execute(t,e,i,s,r){return new C(t,e,i)}}w.instance=null;class C extends c{constructor(t,e,i){super(t,!0,!0),this._curveHelper=new _,this._beginCut=(void 0!==e.beginCut?e.beginCut:1)*i,this._endCut=(void 0!==e.endCut?e.endCut:1)*i,this._middleCut=(void 0!==e.middleCut?e.middleCut:0)*i,this._invert=void 0!==e.invert&&e.invert,this._beginCut<0&&(this._beginCut=0),this._endCut<0&&(this._endCut=0),this._middleCut<0&&(this._middleCut=0)}processPath(t){const{_beginCut:e,_endCut:i,_middleCut:s}=this,r=t.pathLength(),o=n.z.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._invert){if(0!==e||0!==i||0!==s)if(e+i+s>=r)for(o.startPath();t.nextPoint();)o.pushXY(t.x,t.y);else this._curveHelper.appendSubCurve(o,t,0,e),this._curveHelper.appendSubCurve(o,t,.5*(r-s),.5*(r+s)),this._curveHelper.appendSubCurve(o,t,r-i,i)}else if(0===e&&0===i&&0===s)for(o.startPath();t.nextPoint();)o.pushXY(t.x,t.y);else e+i+s<r&&(0===s?this._curveHelper.appendSubCurve(o,t,e,r-i):(this._curveHelper.appendSubCurve(o,t,e,.5*(r-s)),this._curveHelper.appendSubCurve(o,t,.5*(r+s),r-i)));return 0===o.totalSize?null:o}}class L{constructor(){this._values=[],this.extPtGap=0,this.ctrlPtGap=0,this._length=0,this._currentValue=0}isEmpty(){return 0===this._values.length}size(){return this._values.length}init(t,e,i=!0){if(this._setEmpty(),!t||0===t.length)return!1;for(let e=0;e<t.length;e++){let s=Math.abs(t[e]);i&&s<1e-7&&(s=1e-7),this._values.push(s),this._length+=s}return e&&1&t.length&&(this._length*=2),0!==this._length&&(this.ctrlPtGap=this.extPtGap=0,this._currentValue=-1,!0)}scale(t){const e=this._values?this._values.length:0;for(let i=0;i<e;++i)this._values[i]*=t;this._length*=t,this.extPtGap*=t,this.ctrlPtGap*=t}addValue(t){this._length+=t,this._values.push(t)}firstValue(){return this._values[0]}lastValue(){return this._values[this._values.length-1]}nextValue(){return this._currentValue++,this._currentValue===this._values.length&&(this._currentValue=0),this._values[this._currentValue]}reset(){this._currentValue=-1}length(){return this._length}_setEmpty(){this.extPtGap=this.ctrlPtGap=this._length=0,this._currentValue=-1,this._values.length=0}}class k{constructor(){this.pt=null,this.ca=0,this.sa=0}}!function(t){t[t.FAIL=0]="FAIL",t[t.END=1]="END",t[t.CONTINUE=2]="CONTINUE"}(g||(g={}));class I{constructor(){this.reset()}reset(){this.segment=null,this.segmentLength=0,this.abscissa=0,this.isPathEnd=!1,this.isPartEnd=!1}isValid(){return null!==this.segment}copyTo(t){t.segment=this.segment,t.segmentLength=this.segmentLength,t.abscissa=this.abscissa,t.isPathEnd=this.isPathEnd,t.isPartEnd=this.isPartEnd}}class z extends _{constructor(t=0,e=!1){super(t,e),this._tolerance=f,this._currentPosition=new I}updateTolerance(t){this._tolerance=f*t}init(t,e,i=!0){return i?(this._patternLength=e.length(),this._partExtPtGap=e.extPtGap,this._partCtrlPtGap=e.ctrlPtGap):(this._patternLength=0,this._partExtPtGap=0,this._partCtrlPtGap=0),this._currentPosition.reset(),this._partSegCount=0,this._pathCursor=t,this._seg=-1,this._setPosAtNextPart()}curPositionIsValid(){return this._currentPosition.isValid()}nextPosition(t,e=g.FAIL){const i=new I;return!!this._nextPosition(t,i,null,e)&&(i.copyTo(this._currentPosition),!0)}curPointAndAngle(t){t.pt=this._getPoint(this._currentPosition);const[e,i]=this._getAngleCS(this._currentPosition);t.ca=e,t.sa=i}nextPointAndAngle(t,e,i=g.FAIL){const s=new I;if(!this._nextPosition(t,s,null,i))return!1;s.copyTo(this._currentPosition),e.pt=this._getPoint(s);const[r,n]=this._getAngleCS(s);return e.ca=r,e.sa=n,!0}nextCurve(t){if(0===t)return null;const e=n.z.createEmptyOptimizedCIM("esriGeometryPolyline");e.startPath(),e.nextPath();const i=new I;return this._nextPosition(t,i,e,g.END)?(i.copyTo(this._currentPosition),e):null}isPathEnd(){return this._currentPosition.isPathEnd}getPathEnd(){return this._currentPosition.segment[1]}getPt(t){return this._pathCursor.seekInPath(t),[this._pathCursor.x,this._pathCursor.y]}getSeg(t){return[this.getPt(t),this.getPt(t+1)]}_nextPosition(t,e,i,s){if(this._currentPosition.isPathEnd)return!1;let r=this._currentPosition.abscissa;for(this._currentPosition.segmentLength>0&&(r/=this._currentPosition.segmentLength),this._currentPosition.copyTo(e);e.abscissa+t*this._partLengthRatio>e.segmentLength+this._tolerance;){if(i){if(0===i.pathSize)if(0===r){const t=e.segment[0];i.pushXY(t[0],t[1])}else i.pushPoint(this.getSegCoord2D(e.segment,r));const t=e.segment[1];i.pushXY(t[0],t[1])}if(r=0,t-=(e.segmentLength-e.abscissa)/this._partLengthRatio,this._partSegCount)e.segment=this._nextSegment(),e.segmentLength=this.getSegLength(e.segment),e.abscissa=0,this._partSegCount--;else{if(!this._setPosAtNextPart())return s!==g.FAIL&&(e.segmentLength=this.getSegLength(e.segment),e.isPartEnd=!0,s===g.END?(e.abscissa=e.segmentLength,e.isPathEnd=!0):e.abscissa=e.segmentLength+t,!0);this._currentPosition.copyTo(e)}}if(e.abscissa+=t*this._partLengthRatio,i){0===i.pathSize&&(0===r?i.pushPoint(e.segment[0]):i.pushPoint(this.getSegCoord2D(e.segment,r)));const t=e.abscissa/e.segmentLength;1===t?i.pushPoint(e.segment[1]):i.pushPoint(this.getSegCoord2D(e.segment,t))}return this._partSegCount||Math.abs(e.abscissa-e.segmentLength)<this._tolerance&&(e.isPathEnd=this._partIsLast,e.isPartEnd=!0),!0}_getPoint(t){const e=t.segmentLength<=0?0:t.abscissa/t.segmentLength;return this.getSegCoord2D(this._currentPosition.segment,e)}_getAngleCS(t){const e=t.segmentLength<=0?0:t.abscissa/t.segmentLength;return this.getSegAngleCS(this._currentPosition.segment,e)}_setPosAtNextPart(){for(;this._partSegCount;)this._hasNextSegment()&&this._nextSegment(),this._partSegCount--;if(!this._hasNextSegment())return!1;for(this._partLength=0,this._partIsLast=!0,this._partSegCount=0;this._hasNextSegment();)if(this._partLength+=this.getSegLength(this._nextSegment()),this._partSegCount++,this._pathCursor.getControlPointAt(this._getEndPointIndex())){this._partIsLast=!this._hasNextSegment();break}let t=this._partSegCount;for(;t;)this._previousSegment(),--t;this._currentPosition.segment=this._nextSegment(),this._currentPosition.segmentLength=this.getSegLength(this._currentPosition.segment),this._currentPosition.abscissa=0,this._currentPosition.isPathEnd=this._currentPosition.isPartEnd=!1,--this._partSegCount;const e=this._getStartPointIndex();this._ctrlPtBegin=this._pathCursor.getControlPointAt(e);let i=e+this._partSegCount+1;if(i>=this._pathCursor.pathSize&&(i=0),this._ctrlPtEnd=this._pathCursor.getControlPointAt(i),this._patternLength>0){const t=this._ctrlPtBegin?this._partCtrlPtGap:this._partExtPtGap,e=this._ctrlPtEnd?this._partCtrlPtGap:this._partExtPtGap;let i=Math.round((this._partLength-(t+e))/this._patternLength);i<=0&&(i=t+e>0?0:1),this._partLengthRatio=this._partLength/(t+e+i*this._patternLength),this._partLengthRatio<.01&&(this._partLengthRatio=1)}else this._partLengthRatio=1;return!0}_hasNextSegment(){return this._seg<this._pathCursor.pathSize-2}_previousSegment(){return this.getSeg(--this._seg)}_nextSegment(){return this.getSeg(++this._seg)}_getStartPointIndex(){return this._seg}_getEndPointIndex(){return this._seg+1}}class T{static local(){return null===T.instance&&(T.instance=new T),T.instance}execute(t,e,i,s,r){return new O(t,e,i)}}T.instance=null;class O extends c{constructor(t,e,i){super(t,!0,!0),this._firstCurve=null,this._walker=new z,this._walker.updateTolerance(i),this._endings=e.lineDashEnding,this._customDashPos=-(e.offsetAlongLine??0)*i,this._offsetAtEnd=(e.customEndingOffset??0)*i,this._pattern=new L,this._pattern.init(e.dashTemplate,!0),this._pattern.scale(i)}processPath(t){if(0===this._pattern.length()){this.iteratePath=!1;const e=(0,o.l)(t);return n.z.fromJSONCIM({paths:[e]})}if(!this.iteratePath){let e=!0;switch(this._endings){case u.sj.HalfPattern:case u.sj.HalfGap:default:this._pattern.extPtGap=0;break;case u.sj.FullPattern:this.isClosed||(this._pattern.extPtGap=.5*this._pattern.firstValue());break;case u.sj.FullGap:this.isClosed||(this._pattern.extPtGap=.5*this._pattern.lastValue());break;case u.sj.NoConstraint:this.isClosed||(e=!1);break;case u.sj.Custom:this.isClosed||(this._pattern.extPtGap=.5*this._offsetAtEnd)}const i=t.pathLength();if(this._pattern.isEmpty()||i<.1*this._pattern.length()){const e=(0,o.l)(t);return n.z.fromJSONCIM({paths:[e]})}if(!this._walker.init(t,this._pattern,e)){const e=(0,o.l)(t);return n.z.fromJSONCIM({paths:[e]})}}let e;if(this.iteratePath)e=this._pattern.nextValue();else{let t;switch(this._endings){case u.sj.HalfPattern:default:t=.5*this._pattern.firstValue();break;case u.sj.HalfGap:t=.5*-this._pattern.lastValue();break;case u.sj.FullGap:t=-this._pattern.lastValue();break;case u.sj.FullPattern:t=0;break;case u.sj.NoConstraint:case u.sj.Custom:t=-this._customDashPos}let i=t/this._pattern.length();i-=Math.floor(i),t=i*this._pattern.length(),this._pattern.reset(),e=this._pattern.nextValue();let s=!1;for(;t>=e;)t-=e,e=this._pattern.nextValue(),s=!s;e-=t,s?(this._walker.nextPosition(e),e=this._pattern.nextValue()):this.isClosed&&(this._firstCurve=this._walker.nextCurve(e),e=this._pattern.nextValue(),this._walker.nextPosition(e),e=this._pattern.nextValue())}let i=this._walker.nextCurve(e);if(i)if(this._walker.isPathEnd()){if(this.iteratePath=!1,this._firstCurve){for(this._firstCurve.nextPath();this._firstCurve.nextPoint();)i.pushXY(this._firstCurve.x,this._firstCurve.y);this._firstCurve=null}}else e=this._pattern.nextValue(),!this._walker.nextPosition(e)||this._walker.isPathEnd()?(this.iteratePath=!1,this._firstCurve&&(i=this._firstCurve,this._firstCurve=null)):this.iteratePath=!0;else this.iteratePath=!1,i=this._firstCurve,this._firstCurve=null;return i?.reset(),i}}class A{static local(){return null===A.instance&&(A.instance=new A),A.instance}execute(t,e,i,s,r,n){return new E(t,e,i,s,r,n)}}A.instance=null;class E{constructor(t,e,i,s,r,n){switch(this._inputGeometries=t,this._tileKey=s,this._geometryEngine=r,this._maxInflateSize=n*i,this._width=(void 0!==e.width?e.width:2)*i,e.method){case u.$y.Mitered:case u.$y.Bevelled:case u.$y.Rounded:case u.$y.TrueBuffer:case u.$y.Square:}this._option=e.option}next(){let t;for(;t=this._inputGeometries.next();){if("esriGeometryEnvelope"===t.geometryType&&this._width>0){const e=t.asJSON();return Math.min(e.xmax-e.xmin,e.ymax-e.ymin)-2*this._width<0?t:n.z.fromJSONCIM({paths:[[[e.xmin+this._width,e.ymin+this._width],[e.xmax-this._width,e.ymin+this._width],[e.xmax-this._width,e.ymax-this._width],[e.xmin+this._width,e.ymax-this._width],[e.xmin+this._width,e.ymin+this._width]],[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]})}if("esriGeometryPolygon"===t.geometryType){if(0===this._width)return t.clone();const e=this._geometryEngine;if(null==e)return null;const i=this._tileKey?(0,x.L)(t,this._maxInflateSize):t.clone();if(!i)continue;const s=e.buffer(M.Z.WebMercator,i.asJSON(),-this._width,1);if(s)for(const t of s.rings)t&&i.pushPath(t.reverse());return i}}return null}}class F{static local(){return null===F.instance&&(F.instance=new F),F.instance}execute(t,e,i,s,r){return new N(t,e,i)}}F.instance=null;class N extends c{constructor(t,e,i){super(t,!1,!0),this._curveHelper=new _,this._length=(void 0!==e.length?e.length:20)*i,this._angle=void 0!==e.angle?e.angle:225,this._position=void 0!==e.position?e.position:50,this._length<0&&(this._length=-this._length),this._position<20&&(this._position=20),this._position>80&&(this._position=80),this._mirror=!1}processPath(t){const e=n.z.createEmptyOptimizedCIM("esriGeometryPolyline");if(this._curveHelper.isEmpty(t))return null;t.seekInPath(0);const i=t.x,s=t.y;t.seekInPath(t.pathSize-1);const r=t.x,o=t.y,a=[r-i,o-s];this._curveHelper.normalize(a);const l=i+(r-i)*this._position/100,h=s+(o-s)*this._position/100,c=Math.cos((90-this._angle)/180*Math.PI);let u=Math.sin((90-this._angle)/180*Math.PI);this._mirror&&(u=-u),this._mirror=!this._mirror;const f=[l-this._length/2*c,h-this._length/2*u],_=[l+this._length/2*c,h+this._length/2*u];return e.pushPath([[i,s],f,_,[r,o]]),e}}class R{static local(){return null===R.instance&&(R.instance=new R),R.instance}execute(t,e,i,s,r){return new W(t,e,i)}}R.instance=null;class W{constructor(t,e,i){this._inputGeometries=t,this._offsetX=void 0!==e.offsetX?e.offsetX*i:0,this._offsetY=void 0!==e.offsetY?e.offsetY*i:0}next(){let t=this._inputGeometries.next();for(;t;){if(t.totalSize>0)return this._move(t.clone(),this._offsetX,this._offsetY);t=this._inputGeometries.next()}return null}_move(t,e,i){for(;t.nextPath();)for(;t.nextPoint();)t.x=t.x+e,t.y=t.y+i;return t.reset(),t}}var V=i(33955);class G{static local(){return null===G.instance&&(G.instance=new G),G.instance}execute(t,e,i,s,r,n){return new D(t,e,i,s,r,n)}}G.instance=null;class D{constructor(t,e,i,s,r,n){this._inputGeometries=t,this._tileKey=s,this._geometryEngine=r,this._curveHelper=new _,this._offset=(e.offset??1)*i,this._method=e.method,this._maxInflateSize=n*i,this._option=e.option,this._offsetFlattenError=f*i}next(){let t;for(;t=this._inputGeometries.next();){if(0===this._offset)return t.clone();if("esriGeometryEnvelope"===t.geometryType){if(this._method===u.id.Rounded&&this._offset>0){const e=(0,o.l)(t),i=this._curveHelper.offset(e,-this._offset,this._method,4,this._offsetFlattenError);if(i){const e=n.z.createEmptyOptimizedCIM(t.geometryType);return e.pushPath(i),e}return null}const e=t.asJSON();if((0,V.YX)(e)&&Math.min(e.xmax-e.xmin,e.ymax-e.ymin)+2*this._offset>0)return n.z.fromJSONCIM({xmin:e.xmin-this._offset,xmax:e.xmax+this._offset,ymin:e.ymin-this._offset,ymax:e.ymax+this._offset})}const e=this._geometryEngine;if(null==e)continue;const i=this._tileKey?(0,x.L)(t,this._maxInflateSize):t.clone();if(!i)continue;const s=e.offset(M.Z.WebMercator,i.asJSON(),-this._offset,1,this._method,4,this._offsetFlattenError);return s?n.z.fromJSONCIM(s):null}return null}}class B{static local(){return null===B.instance&&(B.instance=new B),B.instance}execute(t,e,i,s,r){return new X(t,e,i)}}B.instance=null;class X{constructor(t,e,i){this._inputGeometries=t,this._reverse=void 0===e.reverse||e.reverse}next(){let t=this._inputGeometries.next();for(;t;){if(!this._reverse)return t;if("esriGeometryPolyline"===t.geometryType)return U(t.clone());t=this._inputGeometries.next()}return null}}function U(t){for(;t.nextPath();)for(let e=0;e<t.pathSize/2;e++){t.seekInPath(e);const i=t.x,s=t.y;t.seekInPath(t.pathSize-e-1);const r=t.x,n=t.y;t.x=i,t.y=s,t.seekInPath(e),t.x=r,t.y=n}return t.reset(),t}var H=i(20322);class J{static local(){return null===J.instance&&(J.instance=new J),J.instance}execute(t,e,i,s,r){return new Y(t,e,i)}}J.instance=null;class Y{constructor(t,e,i){this._inputGeometries=t,this._rotateAngle=void 0!==e.angle?e.angle*Math.PI/180:0}next(){let t=this._inputGeometries.next();for(;t;){if(0===this._rotateAngle||"esriGeometryPoint"===t.geometryType)return t;if(t.totalSize>0){const e=(0,H.Cs)(t),i=(e[2]+e[0])/2,s=(e[3]+e[1])/2;return t.reset(),this._rotate(t.clone(),i,s)}t=this._inputGeometries.next()}return null}_rotate(t,e,i){const s=Math.cos(this._rotateAngle),r=Math.sin(this._rotateAngle);for(;t.nextPath();)for(;t.nextPoint();){const n=t.x-e,o=t.y-i;t.x=e+n*s-o*r,t.y=i+n*r+o*s}return t.reset(),t}}class Z{static local(){return null===Z.instance&&(Z.instance=new Z),Z.instance}execute(t,e,i,s,r){return new K(t,e,i)}}Z.instance=null;class K{constructor(t,e,i){this._inputGeometries=t,this._xFactor=void 0!==e.XScaleFactor?e.XScaleFactor:1.15,this._yFactor=void 0!==e.YScaleFactor?e.YScaleFactor:1.15}next(){const t=this._inputGeometries.next();if(t){if(1===this._xFactor&&1===this._yFactor)return t;if("esriGeometryPoint"===t.geometryType)return t;if(t.totalSize>0){const e=(0,H.Cs)(t),i=(e[2]+e[0])/2,s=(e[3]+e[1])/2;return t.reset(),this._scaleCursor(t.clone(),i,s)}}return null}_scaleCursor(t,e,i){for(;t.nextPath();)for(;t.nextPoint();)t.x=e+(t.x-e)*this._xFactor,t.y=i+(t.y-i)*this._yFactor;return t.reset(),t}}class q{static local(){return null===q.instance&&(q.instance=new q),q.instance}execute(t,e,i,s,r){return new $(t,e,i)}}q.instance=null;class ${constructor(t,e,i){this._inputGeometries=t,this._height=(void 0!==e.amplitude?e.amplitude:2)*i,this._period=(void 0!==e.period?e.period:3)*i,this._style=e.waveform,this._height<=0&&(this._height=Math.abs(this._height)),this._period<=0&&(this._period=Math.abs(this._period)),this._pattern=new L,this._pattern.addValue(this._period),this._pattern.addValue(this._period),this._walker=new z,this._walker.updateTolerance(i)}next(){let t=this._inputGeometries.next();for(;t;){if(0===this._height||0===this._period)return t;const e=this._processGeom(t);if(e)return e;t=this._inputGeometries.next()}return null}_processGeom(t){const e=n.z.createEmptyOptimizedCIM(t.geometryType);for(;t.nextPath();){e.startPath();const i=t.pathLength();if(this._walker.init(t,this._pattern))switch(this._style){case u.zQ.Sinus:default:this._constructCurve(e,i,!1);break;case u.zQ.Square:this._constructSquare(e,i);break;case u.zQ.Triangle:this._constructTriangle(e,i);break;case u.zQ.Random:this._constructCurve(e,i,!0)}else for(;t.nextPoint();)e.pushXY(t.x,t.y)}return e}_constructCurve(t,e,i){let s=Math.round(e/this._period);0===s&&(s=1);const r=16*s+1,n=e/s,o=this._period/16,a=1/r,l=2*Math.PI*e/n,h=2*Math.PI*Math.random(),c=2*Math.PI*Math.random(),u=2*Math.PI*Math.random(),f=.75-Math.random()/2,_=.75-Math.random()/2,m=new k;this._walker.curPointAndAngle(m),t.pushPoint(m.pt);let d=0;for(;;){if(!this._walker.nextPointAndAngle(o,m)){t.pushPoint(this._walker.getPathEnd());break}{const e=d;let s;if(d+=a,i){const t=this._height/2*(1+.3*Math.sin(f*l*e+h));s=t*Math.sin(l*e+c),s+=t*Math.sin(_*l*e+u),s/=2}else s=.5*this._height*Math.sin(.5*l*e);t.pushXY(m.pt[0]-s*m.sa,m.pt[1]+s*m.ca)}}}_constructSquare(t,e){Math.round(e/this._period);let i=!0;for(;;){let e=!1;if(this._walker.curPositionIsValid()){const s=new k;this._walker.curPointAndAngle(s);const r=new k;if(this._walker.nextPointAndAngle(this._period,r)){const n=new k;this._walker.nextPointAndAngle(this._period,n)&&(i?(t.pushPoint(s.pt),i=!1):t.pushPoint(s.pt),t.pushXY(s.pt[0]-this._height/2*s.sa,s.pt[1]+this._height/2*s.ca),t.pushXY(r.pt[0]-this._height/2*r.sa,r.pt[1]+this._height/2*r.ca),t.pushXY(r.pt[0]+this._height/2*r.sa,r.pt[1]-this._height/2*r.ca),t.pushXY(n.pt[0]+this._height/2*n.sa,n.pt[1]-this._height/2*n.ca),e=!0)}}if(!e){t.pushPoint(this._walker.getPathEnd());break}}}_constructTriangle(t,e){Math.round(e/this._period);let i=!0;for(;;){let e=!1;if(this._walker.curPositionIsValid()){const s=new k;this._walker.curPointAndAngle(s);const r=new k;if(this._walker.nextPointAndAngle(this._period/2,r)){const n=new k;this._walker.nextPointAndAngle(this._period,n)&&(this._walker.nextPosition(this._period/2)&&(i?(t.pushPoint(s.pt),i=!1):t.pushPoint(s.pt),t.pushXY(r.pt[0]-this._height/2*r.sa,r.pt[1]+this._height/2*r.ca),t.pushXY(n.pt[0]+this._height/2*n.sa,n.pt[1]-this._height/2*n.ca)),e=!0)}}if(!e){t.pushPoint(this._walker.getPathEnd());break}}}}class j{static local(){return null===j.instance&&(j.instance=new j),j.instance}execute(t,e,i,s,r){return new Q(t,e,i)}}j.instance=null;class Q extends h{constructor(t,e,i){super(t),this._geometryWalker=new z,this._geometryWalker.updateTolerance(i),this._angleToLine=e.angleToLine??!0,this._offset=(e.offset?e.offset:0)*i,this._originalEndings=e.endings,this._offsetAtEnd=(e.customEndingOffset?e.customEndingOffset:0)*i,this._position=-(e.offsetAlongLine?e.offsetAlongLine:0)*i,this._pattern=new L,this._pattern.init(e.placementTemplate,!1),this._pattern.scale(i),this._endings=this._originalEndings}processPath(t){if(this._pattern.isEmpty())return null;let e;if(this.iteratePath)e=this._pattern.nextValue();else{this._originalEndings===u.JS.WithFullGap&&this.isClosed?this._endings=u.JS.WithMarkers:this._endings=this._originalEndings,this._pattern.extPtGap=0;let i,s=!0;switch(this._endings){case u.JS.NoConstraint:i=-this._position,i=this._adjustPosition(i),s=!1;break;case u.JS.WithHalfGap:default:i=-this._pattern.lastValue()/2;break;case u.JS.WithFullGap:i=-this._pattern.lastValue(),this._pattern.extPtGap=this._pattern.lastValue();break;case u.JS.WithMarkers:i=0;break;case u.JS.Custom:i=-this._position,i=this._adjustPosition(i),this._pattern.extPtGap=.5*this._offsetAtEnd}if(!this._geometryWalker.init(t,this._pattern,s))return null;this._pattern.reset();let r=0;for(;i>r;)i-=r,r=this._pattern.nextValue();r-=i,e=r,this.iteratePath=!0}const i=new k;return this._geometryWalker.nextPointAndAngle(e,i)?this._endings===u.JS.WithFullGap&&this._geometryWalker.isPathEnd()?(this.iteratePath=!1,null):this._endings===u.JS.WithMarkers&&this._geometryWalker.isPathEnd()&&(this.iteratePath=!1,this.isClosed)?null:(this.internalPlacement.setTranslate(i.pt[0]-this._offset*i.sa,i.pt[1]+this._offset*i.ca),this._angleToLine&&this.internalPlacement.setRotateCS(i.ca,i.sa),this.internalPlacement):(this.iteratePath=!1,null)}_adjustPosition(t){let e=t/this._pattern.length();return e-=Math.floor(e),e*this._pattern.length()}}class tt{static local(){return null===tt.instance&&(tt.instance=new tt),tt.instance}execute(t,e,i,s,r){return new et(t,e,i)}}tt.instance=null;class et extends h{constructor(t,e,i){super(t,!1,!0),this._curveHelper=new _,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*i:0,this._type=e.extremityPlacement,this._position=void 0!==e.offsetAlongLine?e.offsetAlongLine*i:0,this._beginProcessed=!1}processPath(t){let e;switch(this._type){case u.Tx.Both:default:this._beginProcessed?(e=this._atExtremities(t,this._position,!1),this._beginProcessed=!1,this.iteratePath=!1):(e=this._atExtremities(t,this._position,!0),this._beginProcessed=!0,this.iteratePath=!0);break;case u.Tx.JustBegin:e=this._atExtremities(t,this._position,!0);break;case u.Tx.JustEnd:e=this._atExtremities(t,this._position,!1);case u.Tx.None:}return e}_atExtremities(t,e,i){if(i||t.seekPathEnd(),i?t.nextPoint():t.prevPoint()){let s=0,[r,n]=[0,0],[o,a]=[t.x,t.y];for(;i?t.nextPoint():t.prevPoint();){r=o,n=a,o=t.x,a=t.y;const i=this._curveHelper.getLength(r,n,o,a);if(s+i>e){const t=(e-s)/i,[l,h]=this._curveHelper.getAngleCS(r,n,o,a,t),c=this._curveHelper.getCoord2D(r,n,o,a,t);return this.internalPlacement.setTranslate(c[0]-this._offset*h,c[1]+this._offset*l),this._angleToLine&&this.internalPlacement.setRotateCS(-l,-h),this.internalPlacement}s+=i}}return null}}class it{static local(){return null===it.instance&&(it.instance=new it),it.instance}execute(t,e,i,s,r){return new st(t,e,i)}}it.instance=null;class st extends h{constructor(t,e,i){super(t),this._walker=new z,this._walker.updateTolerance(i),this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*i:0,this._beginGap=void 0!==e.beginPosition?e.beginPosition*i:0,this._endGap=void 0!==e.endPosition?e.endPosition*i:0,this._flipFirst=void 0===e.flipFirst||e.flipFirst,this._pattern=new L,this._pattern.init(e.positionArray,!1,!1),this._subPathLen=0,this._posCount=this._pattern.size(),this._isFirst=!0,this._prevPos=0}processPath(t){if(this._pattern.isEmpty())return null;let e;if(this.iteratePath){const t=this._pattern.nextValue()*this._subPathLen,i=this._beginGap+t;e=i-this._prevPos,this._prevPos=i}else{if(this._posCount=this._pattern.size(),this._isFirst=!0,this._prevPos=0,this._subPathLen=t.pathLength()-this._beginGap-this._endGap,this._subPathLen<0)return this.iteratePath=!1,null;if(!this._walker.init(t,this._pattern,!1))return null;this._pattern.reset();const i=this._pattern.nextValue()*this._subPathLen,s=this._beginGap+i;e=s-this._prevPos,this._prevPos=s,this.iteratePath=!0}const i=new k;if(!this._walker.nextPointAndAngle(e,i,g.END))return this.iteratePath=!1,null;this.internalPlacement.setTranslate(i.pt[0]-this._offset*i.sa,i.pt[1]+this._offset*i.ca);const s=this._isFirst&&this._flipFirst;let r,n;return this._angleToLine?(r=i.ca,n=i.sa):(r=1,n=0),s&&(r=-r,n=-n),this.internalPlacement.setRotateCS(r,n),this._isFirst=!1,this._posCount--,0===this._posCount&&(this.iteratePath=!1),this.internalPlacement}}var rt=i(77734);const nt=512,ot=24,at=1e-6;class lt{static local(){return null===lt.instance&&(lt.instance=new lt),lt.instance}execute(t,e,i,s,r){return new ht(t,e,i,s,r)}}lt.instance=null;class ht{constructor(t,e,i,s,r){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(e.stepX??16)*i,this._stepY=Math.abs(e.stepY??16)*i,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=e.gridType??u.bj.Fixed,this._gridType===u.bj.Random){const t=e.seed??13,i=1;this._randomLCG=new rt.Z(t*i),this._randomness=(e.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=e.gridAngle??0,this._shiftOddRows=e.shiftOddRows??!1,this._offsetX=(e.offsetX??0)*i,this._offsetY=(e.offsetY??0)*i,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!=s){const[t,e,i,r]=s.split("/"),n=parseFloat(t),o=parseFloat(e),a=parseFloat(i),l=parseFloat(r);this._graphicOriginX=-(l*2**n+a)*nt,this._graphicOriginY=o*nt,this._testInsidePolygon=!0}this._internalPlacement=new a.u,this._calculateMinMax(t),this._geometryCursor=t}}next(){return this._geometryCursor?this._nextInside():null}_buildRandomValues(){if(!ht._randValues){ht._randValues=[];for(let t=0;t<ot;t++)for(let t=0;t<ot;t++)ht._randValues.push(this._randomLCG.getFloat()),ht._randValues.push(this._randomLCG.getFloat())}}_calculateMinMax(t){let e,i,s,r,n,o,a,l,h,c,u,f,_,m;this._xMin=0,this._xMax=0,this._yMin=0,this._yMax=0,a=l=_=u=Number.MAX_VALUE,h=c=m=f=-Number.MAX_VALUE;const d=1!==this._cosAngle;for(t.reset();t.nextPath();)for(;t.nextPoint();)o=t.x,n=t.y,e=o-this._graphicOriginX-this._offsetX,i=n-this._graphicOriginY-this._offsetY,d?(s=this._cosAngle*e-this._sinAngle*i,r=this._sinAngle*e+this._cosAngle*i):(s=e,r=i),a=Math.min(a,s),h=Math.max(h,s),l=Math.min(l,r),c=Math.max(c,r),u=Math.min(u,n),f=Math.max(f,n),_=Math.min(_,o),m=Math.max(m,o);u=u!==Number.MAX_VALUE?u:-512-this._stepY,f=f!==-Number.MAX_VALUE?f:this._stepY,_=_!==Number.MAX_VALUE?_:-this._stepX,m=m!==-Number.MAX_VALUE?m:nt+this._stepX;const p=f-u,y=m-_;if(this._verticalSubdivision=p>=y,this._polygonMin=this._verticalSubdivision?u:_,this._testInsidePolygon){let t=0-this._graphicOriginX-this._offsetX-this._stepX,e=nt-this._graphicOriginX-this._offsetX+this._stepX,i=-512-this._graphicOriginY-this._offsetY-this._stepY,s=0-this._graphicOriginY-this._offsetY+this._stepY;if(d){const r=[[t,i],[t,s],[e,i],[e,s]];t=i=Number.MAX_VALUE,e=s=-Number.MAX_VALUE;for(const n of r){const r=this._cosAngle*n[0]-this._sinAngle*n[1],o=this._sinAngle*n[0]+this._cosAngle*n[1];t=Math.min(t,r),e=Math.max(e,r),i=Math.min(i,o),s=Math.max(s,o)}}a=a!==Number.MAX_VALUE?Math.max(a,t):t,l=l!==Number.MAX_VALUE?Math.max(l,i):i,h=h!==-Number.MAX_VALUE?Math.min(h,e):e,c=c!==-Number.MAX_VALUE?Math.min(c,s):s}this._xMin=Math.round(a/this._stepX),this._xMax=Math.round(h/this._stepX),this._yMin=Math.round(l/this._stepY),this._yMax=Math.round(c/this._stepY),this._currentX=this._xMax+1,this._currentY=this._yMin-1,this._buildAccelerationMap(t,_,m,u,f)}_buildAccelerationMap(t,e,i,s,r){t.reset();const n=new Map,o=this._verticalSubdivision,a=o?r-s:i-e;let l=Math.ceil(a/10);if(l<=1)return;const h=Math.floor(a/l);let c,u,f,_,m,d,p,y,g,x,M;for(l++,this._delta=h,o?(g=-512-this._stepY,x=this._stepY,M=s):(g=-this._stepX,x=nt+this._stepX,M=e);t.nextPath();)if(!(t.pathSize<2)&&t.nextPoint())for(c=t.x,u=t.y;t.nextPoint();c=f,u=_){if(f=t.x,_=t.y,o){if(u===_||u<g&&_<g||u>x&&_>x)continue;m=Math.min(u,_),d=Math.max(u,_)}else{if(c===f||c<g&&f<g||c>x&&f>x)continue;m=Math.min(c,f),d=Math.max(c,f)}for(;m<d;)p=Math.floor((m-M)/h),ct(p,c,u,f,_,n),m+=h;y=Math.floor((d-M)/h),y>p&&ct(y,c,u,f,_,n)}this._accelerationMap=n}_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 e=this._currentY*this._stepY+this._offsetY;let i,s;if(this._currentX++,this._gridType===u.bj.Random){const r=(this._currentX%ot+ot)%ot,n=(this._currentY%ot+ot)%ot;i=this._graphicOriginX+t+this._stepX*this._randomness*(.5-ht._randValues[n*ot+r])*2/3,s=this._graphicOriginY+e+this._stepY*this._randomness*(.5-ht._randValues[n*ot+r+1])*2/3}else i=this._graphicOriginX+this._cosAngle*t+this._sinAngle*e,s=this._graphicOriginY-this._sinAngle*t+this._cosAngle*e;if(!this._testInsidePolygon||this._isInsidePolygon(i,s,this._geometryCursor))return this._internalPlacement.setTranslate(i,s),this._internalPlacement}}_isInsidePolygon(t,e,i){if(null==this._accelerationMap)return function(t,e,i){let s,r,n,o,a=0;for(t+=at,e+=at,i.reset();i.nextPath();)if(i.nextPoint())for(s=i.x,r=i.y;i.nextPoint();s=n,r=o)n=i.x,o=i.y,r>e!=o>e&&((n-s)*(e-r)-(o-r)*(t-s)>0?a++:a--);return 0!==a}(t,e,i);t+=at,e+=at;const s=this._verticalSubdivision,r=s?e:t,n=Math.floor((r-this._polygonMin)/this._delta),o=this._accelerationMap.get(n);if(!o)return!1;let a,l,h,c=0;for(const i of o){if(a=i[0],l=i[1],s){if(a[1]>e==l[1]>e)continue;h=(l[0]-a[0])*(e-a[1])-(l[1]-a[1])*(t-a[0])}else{if(a[0]>t==l[0]>t)continue;h=(l[1]-a[1])*(t-a[0])-(l[0]-a[0])*(e-a[1])}h>0?c++:c--}return 0!==c}}function ct(t,e,i,s,r,n){let o=n.get(t);o||(o=[],n.set(t,o)),o.push([[e,i],[s,r]])}class ut{static local(){return null===ut.instance&&(ut.instance=new ut),ut.instance}execute(t,e,i,s,r){return new ft(t,e,i)}}ut.instance=null;class ft extends h{constructor(t,e,i){super(t),this._curveHelper=new _,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*i:0,this._relativeTo=e.relativeTo,this._position=void 0!==e.startPointOffset?e.startPointOffset*i:0,this._epsilon=.001*i}processPath(t){const e=this._position;if(this._relativeTo===u.CS.SegmentMidpoint){if(this.iteratePath||(this.iteratePath=!0),t.nextPoint()){let[e,i]=[t.x,t.y],[s,r]=[0,0];for(;t.nextPoint();){s=t.x,r=t.y;const n=this._curveHelper.getLength(e,i,s,r);if(n<this._epsilon){e=s,i=r;continue}const o=.5+this._position/n,[a,l]=this._curveHelper.getAngleCS(e,i,s,r,o),h=this._curveHelper.getCoord2D(e,i,s,r,o);return this.internalPlacement.setTranslate(h[0]-this._offset*l,h[1]+this._offset*a),this._angleToLine&&this.internalPlacement.setRotateCS(a,l),this.internalPlacement}}return this.iteratePath=!1,null}const i=this._relativeTo===u.CS.LineEnd;return this.onLine(t,e,i)}onLine(t,e,i){let s,r=!1;switch(this._relativeTo){case u.CS.LineMiddle:default:t.seekPathStart(),s=t.pathLength()/2+e;break;case u.CS.LineBeginning:s=e;break;case u.CS.LineEnd:s=e,r=!0}i?t.seekPathEnd():t.seekPathStart();let n=0;if(i?t.prevPoint():t.nextPoint()){let[e,o]=[t.x,t.y],[a,l]=[0,0];for(;i?t.prevPoint():t.nextPoint();){a=t.x,l=t.y;const i=this._curveHelper.getLength(e,o,a,l);if(n+i>s){const t=(s-n)/i,[h,c]=this._curveHelper.getAngleCS(e,o,a,l,t),u=this._curveHelper.getCoord2D(e,o,a,l,t),f=r?-this._offset:this._offset;return this.internalPlacement.setTranslate(u[0]-f*c,u[1]+f*h),this._angleToLine&&(r?this.internalPlacement.setRotateCS(-h,-c):this.internalPlacement.setRotateCS(h,c)),this.internalPlacement}e=a,o=l,n+=i}}return null}}class _t{static local(){return null===_t.instance&&(_t.instance=new _t),_t.instance}execute(t,e,i,s,r){return new mt(t,e,i)}}_t.instance=null;class mt extends h{constructor(t,e,i){super(t),this._curveHelper=new _,this._angleToLine=void 0===e.angleToLine||e.angleToLine,this._offset=void 0!==e.offset?e.offset*i:0,this._endPoints=void 0===e.placeOnEndPoints||e.placeOnEndPoints,this._controlPoints=void 0===e.placeOnControlPoints||e.placeOnControlPoints,this._regularVertices=void 0===e.placeOnRegularVertices||e.placeOnRegularVertices,this._tags=[],this._tagIterator=0}processPath(t){if(this.iteratePath||(this._preparePath(t),this.iteratePath=!0),this._tagIterator>=this._tags.length)return this._tags.length=0,this._tagIterator=0,this.iteratePath=!1,null;const e=this._tags[this._tagIterator];this._angleToLine&&this.internalPlacement.setRotate(e[2]);let i=e[0],s=e[1];if(0!==this._offset){const t=Math.cos(e[2]),r=Math.sin(e[2]);i-=this._offset*r,s+=this._offset*t}return this.internalPlacement.setTranslate(i,s),this._tagIterator++,this.internalPlacement}_preparePath(t){this._tags.length=0,this._tagIterator=0,t.seekPathStart();const e=t.isClosed();let i=0,s=!1,r=0,n=0;if(t.seekPathStart(),t.nextPoint()){let o=t.x,a=t.y,l=t.getControlPoint(),h=!0,c=t.nextPoint();for(;c;){const u=t.x,f=t.y,_=t.getControlPoint();(this._angleToLine||0!==this._offset)&&(r=this._curveHelper.getAngle(o,a,u,f,0)),h?(h=!1,e?(i=r,s=l):(this._endPoints||this._controlPoints&&l)&&this._tags.push([o,a,r])):l?this._controlPoints&&this._tags.push([o,a,dt(n,r)]):this._regularVertices&&this._tags.push([o,a,dt(n,r)]),(this._angleToLine||0!==this._offset)&&(n=this._curveHelper.getAngle(o,a,u,f,1)),c=t.nextPoint(),c||(e?_||s?this._controlPoints&&this._tags.push([u,f,dt(n,i)]):this._regularVertices&&this._tags.push([u,f,dt(n,i)]):(this._endPoints||this._controlPoints&&_)&&this._tags.push([u,f,n])),o=u,a=f,l=_}}this._tagIterator=0}}function dt(t,e){const i=Math.PI;for(;Math.abs(e-t)>i+2e-15;)e-t>i?e-=2*i:e+=2*i;return(t+e)/2}var pt=i(35308),yt=i(32724);class gt{static local(){return null===gt.instance&&(gt.instance=new gt),gt.instance}execute(t,e,i,s,r){return new xt(t,e,i)}}gt.instance=null;class xt{constructor(t,e,i){this._geometryCursor=t,this._offsetX=void 0!==e.offsetX?e.offsetX*i:0,this._offsetY=void 0!==e.offsetY?e.offsetY*i:0,this._method=void 0!==e.method?e.method:u.Lh.OnPolygon,this._internalPlacement=new a.u}next(){const t=this._geometryCursor;return this._geometryCursor=null,t?this._polygonCenter(t):null}_polygonCenter(t){let e=!1;switch(this._method){case u.Lh.CenterOfMass:{const i=(0,pt.NA)(t);i&&(this._internalPlacement.setTranslate(i[0]+this._offsetX,i[1]+this._offsetY),e=!0)}break;case u.Lh.BoundingBoxCenter:{const i=(0,H.Cs)(t);i&&(this._internalPlacement.setTranslate((i[2]+i[0])/2+this._offsetX,(i[3]+i[1])/2+this._offsetY),e=!0)}break;case u.Lh.OnPolygon:default:{const i=(0,yt.r)(t);null!==i&&(this._internalPlacement.setTranslate(i[0]+this._offsetX,i[1]+this._offsetY),e=!0)}}return e?this._internalPlacement:null}}function Mt(t){if(!t)return null;switch(t.type){case"CIMGeometricEffectAddControlPoints":return s.local();case"CIMGeometricEffectArrow":return p.local();case"CIMGeometricEffectBuffer":return b.local();case"CIMGeometricEffectControlMeasureLine":return S.local();case"CIMGeometricEffectCut":return w.local();case"CIMGeometricEffectDashes":return T.local();case"CIMGeometricEffectDonut":return A.local();case"CIMGeometricEffectJog":return F.local();case"CIMGeometricEffectMove":return R.local();case"CIMGeometricEffectOffset":return G.local();case"CIMGeometricEffectReverse":return B.local();case"CIMGeometricEffectRotate":return J.local();case"CIMGeometricEffectScale":return Z.local();case"CIMGeometricEffectWave":return q.local()}return null}function bt(t){if(!t)return null;switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":return j.local();case"CIMMarkerPlacementAtExtremities":return tt.local();case"CIMMarkerPlacementAtRatioPositions":return it.local();case"CIMMarkerPlacementInsidePolygon":return lt.local();case"CIMMarkerPlacementOnLine":return ut.local();case"CIMMarkerPlacementOnVertices":return _t.local();case"CIMMarkerPlacementPolygonCenter":return gt.local()}return null}},31936:(t,e,i)=>{i.d(e,{u:()=>s});class s{constructor(){this.setIdentity()}getAngle(){return(null==this.rz||0===this.rz&&1!==this.rzCos&&0!==this.rzSin)&&(this.rz=Math.atan2(this.rzSin,this.rzCos)),this.rz}setIdentity(){this.tx=0,this.ty=0,this.tz=0,this.s=1,this.rx=0,this.ry=0,this.rz=0,this.rzCos=1,this.rzSin=0}setTranslate(t,e){this.tx=t,this.ty=e}setTranslateZ(t){this.tz=t}setRotateCS(t,e){this.rz=void 0,this.rzCos=t,this.rzSin=e}setRotate(t){this.rz=t,this.rzCos=void 0,this.rzSin=void 0}setRotateY(t){this.ry=t}setScale(t){this.s=t}setMeasure(t){this.m=t}}},40685:(t,e,i)=>{i.d(e,{cD:()=>E,uQ:()=>A,zA:()=>T,rC:()=>I,w7:()=>L,v$:()=>k,KM:()=>C,zV:()=>z}),i(83798);var s=i(60800),r=i(22974),n=i(92604),o=i(71143),a=i(62357),l=i(58835),h=i(24470),c=i(20322),u=i(35308),f=i(33955),_=i(21793);class m{applyColorSubstituition(t,e){if(!e)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:i,height:s}=t,r=this._rasterizationCanvas,n=r.getContext("2d",{willReadFrequently:!0});t!==r&&(r.width=i,r.height=s,n.drawImage(t,0,0,i,s));const o=n.getImageData(0,0,i,s).data;if(e)for(const t of e)if(t&&t.oldColor&&4===t.oldColor.length&&t.newColor&&4===t.newColor.length){const[e,i,s,r]=t.oldColor,[n,a,l,h]=t.newColor;if(e===n&&i===a&&s===l&&r===h)continue;for(let t=0;t<o.length;t+=4)e===o[t]&&i===o[t+1]&&s===o[t+2]&&r===o[t+3]&&(o[t]=n,o[t+1]=a,o[t+2]=l,o[t+3]=h)}const a=new ImageData(o,i,s);return n.putImageData(a,0,0),r}tintImageData(t,e){if(!e||e.length<4)return t;this._rasterizationCanvas||(this._rasterizationCanvas=document.createElement("canvas"));const{width:i,height:s}=t,r=this._rasterizationCanvas,n=r.getContext("2d",{willReadFrequently:!0});t!==r&&(r.width=i,r.height=s,n.drawImage(t,0,0,i,s));const o=n.getImageData(0,0,i,s),a=new Uint8Array(o.data),l=[e[0]/255,e[1]/255,e[2]/255,e[3]/255];for(let t=0;t<a.length;t+=4)a[t]*=l[0],a[t+1]*=l[1],a[t+2]*=l[2],a[t+3]*=l[3];const h=new ImageData(new Uint8ClampedArray(a.buffer),i,s);return n.putImageData(h,0,0),r}}var d=i(26145),p=i(31936),y=i(95648);function g(t){const e=t.getFrame(0);if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement)return e;const i=document.createElement("canvas");i.width=t.width,i.height=t.height;const s=i.getContext("2d");return e instanceof ImageData?s.putImageData(e,0,0):s.drawImage(e,0,0),i}class x{constructor(t=0,e=0,i=0,s=0){this.x=t,this.y=e,this.width=i,this.height=s}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}var M=i(61565);function b(t){return`rgba(${t.slice(0,3).toString()},${t[3]})`}class v{constructor(t){t&&(this._textRasterizationCanvas=t)}rasterizeText(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const i=this._textRasterizationCanvas,s=i.getContext("2d");this._setFontProperties(s,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const{decoration:r,weight:n}=e.font;this._lineThroughWidthOffset=r&&"line-through"===r?.1*this._lineHeight:0;const o=null!=e.backgroundColor||null!=e.borderLine,l=o?M.c9:0,h=this._computeTextWidth(s,e)+2*l,c=this._lineHeight*this._textLines.length+2*l;if(i.width=h+2*this._lineThroughWidthOffset,i.height=c,0===i.width||0===i.height)return i.width=i.height=1,{size:[0,0],image:new Uint32Array(0),sdf:!1,simplePattern:!1,anchorX:0,anchorY:0,canvas:i};this._renderedLineHeight=Math.round(this._lineHeight*e.pixelRatio),this._renderedHaloSize=(0,a.F2)(e.halo.size)*e.pixelRatio,this._renderedWidth=h*e.pixelRatio,this._renderedHeight=c*e.pixelRatio,this._lineThroughWidthOffset*=e.pixelRatio;const u=e.color??[0,0,0,0],f=e.halo&&e.halo.color?e.halo.color:[0,0,0,0];this._fillStyle=b(u),this._haloStyle=`rgb(${f.slice(0,3).toString()})`;const _=this._renderedLineHeight,m=this._renderedHaloSize;s.save(),s.clearRect(0,0,i.width,i.height),this._setFontProperties(s,e);const d=l*e.pixelRatio,p=function(t,e){return"center"===t?.5*e:"right"===t?e:0}(s.textAlign,this._renderedWidth-2*d)+m+d,y=m+d,g=m>0;let x=this._lineThroughWidthOffset,v=0;if(o){s.save();const t=e.backgroundColor??[0,0,0,0],r=e.borderLine?.color??[0,0,0,0],n=2*(0,a.F2)(e.borderLine?.size??0);s.fillStyle=b(t),s.strokeStyle=b(r),s.lineWidth=n,s.fillRect(0,0,i.width,i.height),s.strokeRect(0,0,i.width,i.height),s.restore()}g&&this._renderHalo(s,p,y,x,v,e),v+=y,x+=p;for(const t of this._textLines)g?(s.globalCompositeOperation="destination-out",s.fillStyle="rgb(0, 0, 0)",s.fillText(t,x,v),s.globalCompositeOperation="source-over",s.fillStyle=this._fillStyle,s.fillText(t,x,v)):(s.fillStyle=this._fillStyle,s.fillText(t,x,v)),r&&"none"!==r&&this._renderDecoration(s,x,v,r,n),v+=_;s.restore();const S=this._renderedWidth+2*this._lineThroughWidthOffset,P=this._renderedHeight,w=s.getImageData(0,0,S,P),C=new Uint8Array(w.data);if(e.premultiplyColors){let t;for(let e=0;e<C.length;e+=4)t=C[e+3]/255,C[e]=C[e]*t,C[e+1]=C[e+1]*t,C[e+2]=C[e+2]*t}let L,k;switch(e.horizontalAlignment){case"left":L=-.5;break;case"right":L=.5;break;default:L=0}switch(e.verticalAlignment){case"bottom":k=-.5;break;case"top":k=.5;break;default:k=0}return{size:[S,P],image:new Uint32Array(C.buffer),sdf:!1,simplePattern:!1,anchorX:L,anchorY:k,canvas:i}}_renderHalo(t,e,i,s,r,n){const o=this._renderedWidth,a=this._renderedHeight;this._haloRasterizationCanvas||(this._haloRasterizationCanvas=document.createElement("canvas")),this._haloRasterizationCanvas.width=o,this._haloRasterizationCanvas.height=a;const l=this._haloRasterizationCanvas,h=l.getContext("2d");h.clearRect(0,0,o,a),this._setFontProperties(h,n);const{decoration:c,weight:u}=n.font;h.fillStyle=this._haloStyle,h.strokeStyle=this._haloStyle,h.lineJoin="round",this._renderHaloNative(h,e,i,c,u),t.globalAlpha=this._parameters.halo.color[3],t.drawImage(l,0,0,o,a,s,r,o,a),t.globalAlpha=1}_renderHaloNative(t,e,i,s,r){const n=this._renderedLineHeight,o=this._renderedHaloSize;for(const a of this._textLines){const l=2*o,h=5,c=.1;for(let n=0;n<h;n++){const o=(1-(h-1)*c+n*c)*l;t.lineWidth=o,t.strokeText(a,e,i),s&&"none"!==s&&this._renderDecoration(t,e,i,s,r,o)}i+=n}}_setFontProperties(t,e){const i=Math.max(e.size,.5),s=e.font,r=`${s.style} ${s.weight} ${(0,a.F2)(i*e.pixelRatio).toFixed(1)}px ${s.family}, sans-serif`;let n;switch(t.font=r,t.textBaseline="top",e.horizontalAlignment){case"left":default:n="left";break;case"right":n="right";break;case"center":n="center"}t.textAlign=n}computeTextSize(t,e){this._textRasterizationCanvas||(this._textRasterizationCanvas=document.createElement("canvas"));const i=this._textRasterizationCanvas,s=i.getContext("2d");this._setFontProperties(s,e),this._parameters=e,this._textLines=t.split(/\r?\n/),this._lineHeight=this._computeLineHeight();const r=this._computeTextWidth(s,e),n=this._lineHeight*this._textLines.length;return i.width=r,i.height=n,[r*e.pixelRatio,n*e.pixelRatio]}_computeTextWidth(t,e){let i=0;for(const e of this._textLines)i=Math.max(i,t.measureText(e).width);const s=e.font;return("italic"===s.style||"oblique"===s.style||"string"==typeof s.weight&&("bold"===s.weight||"bolder"===s.weight)||"number"==typeof s.weight&&s.weight>600)&&(i+=.3*t.measureText("w").width),i+=2*(0,a.F2)(this._parameters.halo.size),Math.round(i)}_computeLineHeight(){let t=1.275*this._parameters.size;const e=this._parameters.font.decoration;return e&&"underline"===e&&(t*=1.3),Math.round(t+2*(0,a.F2)(this._parameters.halo.size))}_renderDecoration(t,e,i,s,r,n){const o=.9*this._lineHeight,a="bold"===r?.06:"bolder"===r?.09:.04;switch(t.textAlign){case"center":e-=this._renderedWidth/2;break;case"right":e-=this._renderedWidth}const l=t.textBaseline;if("underline"===s)switch(l){case"top":i+=o;break;case"middle":i+=o/2}else if("line-through"===s)switch(l){case"top":i+=o/1.5;break;case"middle":i+=o/3}const h=n?1.5*n:Math.ceil(o*a);t.save(),t.beginPath(),t.strokeStyle=t.fillStyle,t.lineWidth=h,t.moveTo(e-this._lineThroughWidthOffset,i),t.lineTo(e+this._renderedWidth+2*this._lineThroughWidthOffset,i),t.stroke(),t.restore()}}var S=i(72233);i(30729),i(16534),i(58195);const P=Math.PI/180,w=n.Z.getLogger("esri.symbols.cim.CIMSymbolDrawHelper"),C=4,L=10,k=10,I=4,z=10;class T{constructor(t){this._t=t}static createIdentity(){return new T([1,0,0,0,1,0])}clone(){const t=this._t;return new T(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new T([t,0,0,0,e,0])}scale(t,e){const i=this._t;return i[0]*=t,i[1]*=t,i[2]*=t,i[3]*=e,i[4]*=e,i[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new T([0,0,t,0,0,e])}translate(t,e){const i=this._t;return i[2]+=t,i[5]+=e,this}static createRotate(t){const e=Math.cos(t),i=Math.sin(t);return new T([e,-i,0,i,e,0])}rotate(t){return T.multiply(this,T.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],i=Math.sqrt(t*t+e*e);return[t/i,e/i]}static multiply(t,e,i){const s=t._t,r=e._t,n=s[0]*r[0]+s[3]*r[1],o=s[1]*r[0]+s[4]*r[1],a=s[2]*r[0]+s[5]*r[1]+r[2],l=s[0]*r[3]+s[3]*r[4],h=s[1]*r[3]+s[4]*r[4],c=s[2]*r[3]+s[5]*r[4]+r[5],u=i._t;return u[0]=n,u[1]=o,u[2]=a,u[3]=l,u[4]=h,u[5]=c,i}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new T([0,0,0,0,0,0]);e=1/e;const i=(t[1]*t[5]-t[2]*t[4])*e,s=(t[2]*t[3]-t[0]*t[5])*e,r=t[4]*e,n=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new T([r,n,i,o,a,s])}}class O{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._geomUnitsPerPoint=1,this._placementPool=new o.Z(p.u,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||T.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1)}setTransform(t,e){this._transfos=[t||T.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e){const i=e?t.scaleRatio():1;T.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*i)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1)}drawSymbol(t,e,i){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,i)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const i=t.symbolLayers;if(!i)return;const s=t.effects;if(s&&s.length>0){const t=this.executeEffects(s,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(i,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(i,e)}executeEffects(t,e){const i=this._resourceManager.geometryEngine;let s=new _.z(l.z.fromJSONCIM(e));for(const e of t){const t=(0,d.h)(e);t&&(s=t.execute(s,e,this.geomUnitsPerPoint(),null,i))}return s}drawSymbolLayers(t,e){let i=t.length;for(;i--;){const s=t[i];if(!s||!1===s.enable)continue;const r=s.effects;if(r&&r.length>0){const t=this.executeEffects(r,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(s,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(s,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const i=this._buildHatchPolyline(e,t,this.geomUnitsPerPoint());i&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,i),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const i=t.markerPlacement;if(i){const s=(0,d.W)(i);if(s){const r="CIMMarkerPlacementInsidePolygon"===i.type||"CIMMarkerPlacementPolygonCenter"===i.type&&i.clipAtBoundary;r&&this.pushClipPath(e);const n=s.execute(l.z.fromJSONCIM(e),i,this.geomUnitsPerPoint(),null,this._resourceManager.geometryEngine);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}r&&this.popClipPath()}}else{const i=this._placementPool.acquire();if((0,f.wp)(e))i.tx=e.x,i.ty=e.y,this.drawMarker(t,i);else if((0,f.oU)(e)){const s=(0,u.tO)(e);s&&([i.tx,i.ty]=s,this.drawMarker(t,i))}else for(const s of e.points)if(i.tx=s[0],i.ty=s[1],this.drawMarker(t,i),this._earlyReturn)break;this._placementPool.release(i)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const i=this._resourceManager.getResource(t.url),s=(0,S.NA)(t.size,L);if(null==i||s<=0)return;const r=i.width,n=i.height;if(!r||!n)return;const o=r/n,a=(0,S.NA)(t.scaleX,1),l=T.createIdentity(),h=t.anchorPoint;if(h){let e=h.x,i=h.y;"Absolute"!==t.anchorPointUnits&&(e*=s*o*a,i*=s),l.translate(-e,-i)}let c=(0,S.NA)(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&l.rotate(c*P);let u=(0,S.NA)(t.offsetX),f=(0,S.NA)(t.offsetY);if(u||f){if(this._mapRotation){const t=P*this._mapRotation,e=Math.cos(t),i=Math.sin(t),s=u*i+f*e;u=u*e-f*i,f=s}l.translate(u,f)}const _=this.geomUnitsPerPoint();1!==_&&l.scale(_,_);const m=e.getAngle();m&&l.rotate(m),l.translate(e.tx,e.ty),this.push(l,!1),this.drawImage(t,s),this.pop()}drawVectorMarker(t,e){if(!t)return;const i=t.markerGraphics;if(!i)return;const s=(0,S.NA)(t.size,L),r=t.frame,n=r?r.ymax-r.ymin:0,o=s&&n?s/n:1,a=T.createIdentity();r&&a.translate(.5*-(r.xmax+r.xmin),.5*-(r.ymax+r.ymin));const l=t.anchorPoint;if(l){let e=l.x,i=l.y;"Absolute"!==t.anchorPointUnits?r&&(e*=r.xmax-r.xmin,i*=r.ymax-r.ymin):(e/=o,i/=o),a.translate(-e,-i)}1!==o&&a.scale(o,o);let h=(0,S.NA)(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&a.rotate(h*P);let c=(0,S.NA)(t.offsetX),u=(0,S.NA)(t.offsetY);if(c||u){if(this._mapRotation){const t=P*this._mapRotation,e=Math.cos(t),i=Math.sin(t),s=c*i+u*e;c=c*e-u*i,u=s}a.translate(c,u)}const f=this.geomUnitsPerPoint();1!==f&&a.scale(f,f);const _=e.getAngle();_&&a.rotate(_),a.translate(e.tx,e.ty),this.push(a,t.scaleSymbolsProportionally);for(const t of i)if(t?.symbol&&t.geometry||w.error("Invalid marker graphic",t),this.drawSymbol(t.symbol,t.geometry,t.textString),this._earlyReturn)break;this.pop()}drawTextSymbol(t,e,i){if(!t)return;if(!(0,f.wp)(e))return;if((0,S.NA)(t.height,z)<=0)return;const s=T.createIdentity();let r=(0,S.NA)(t.angle);r=-r,r&&s.rotate(r*P);const n=(0,S.NA)(t.offsetX),o=(0,S.NA)(t.offsetY);(n||o)&&s.translate(n,o);const a=this.geomUnitsPerPoint();1!==a&&s.scale(a,a),s.translate(e.x,e.y),this.push(s,!1),this.drawText(t,i),this.pop()}_buildHatchPolyline(t,e,i){let s=(0,S.NA)(t.separation,I)*i,r=(0,S.NA)(t.rotation);if(0===s)return null;s<0&&(s=-s);let n=0;const o=.5*s;for(;n>o;)n-=s;for(;n<-o;)n+=s;const a=(0,h.Ue)();(0,c.$P)(a,e),a[0]-=o,a[1]-=o,a[2]+=o,a[3]+=o;const l=[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]]];for(;r>180;)r-=180;for(;r<0;)r+=180;const u=Math.cos(r*P),f=Math.sin(r*P),_=-s*f,m=s*u;let d,p,y,g;n=(0,S.NA)(t.offsetX)*i*f-(0,S.NA)(t.offsetY)*i*u,d=y=Number.MAX_VALUE,p=g=-Number.MAX_VALUE;for(const t of l){const e=t[0],i=t[1],s=u*e+f*i,r=-f*e+u*i;d=Math.min(d,s),y=Math.min(y,r),p=Math.max(p,s),g=Math.max(g,r)}y=Math.floor(y/s)*s;let x=u*d-f*y-_*n/s,M=f*d+u*y-m*n/s,b=u*p-f*y-_*n/s,v=f*p+u*y-m*n/s;const w=1+Math.round((g-y)/s),C=[];for(let t=0;t<w;t++)x+=_,M+=m,b+=_,v+=m,C.push([[x,M],[b,v]]);return{paths:C}}}class A extends O{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new x(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return(0,h.al)(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if((0,f.oU)(t))this._processPath(t.rings,0);else if((0,f.l9)(t))this._processPath(t.paths,0);else if((0,f.YX)(t)){const e=N(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,i){if(!t||this._clipCount>0)return;const s=.5*this.transformSize((0,S.NA)(i,C));if((0,f.oU)(t))this._processPath(t.rings,s);else if((0,f.l9)(t))this._processPath(t.paths,s);else if((0,f.YX)(t)){const e=N(t);e&&this._processPath(e.rings,s)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){(0,f.oU)(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:i}=t,s=(0,S.NA)(t.scaleX,1);let r=s*e,n=e;const o=this._resourceManager.getResource(i);e||null==o||(r=s*o.width,n=o.height),this._merge(this.transformPt([-r/2,-n/2]),0),this._merge(this.transformPt([-r/2,n/2]),0),this._merge(this.transformPt([r/2,-n/2]),0),this._merge(this.transformPt([r/2,n/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new v);const i=R(t),[s,r]=this._textRasterizer.computeTextSize(e,i);let n=0;switch(t.horizontalAlignment){case"Left":n=s/2;break;case"Right":n=-s/2}let o=0;switch(t.verticalAlignment){case"Bottom":o=r/2;break;case"Top":o=-r/2;break;case"Baseline":o=r/6}this._merge(this.transformPt([-s/2+n,-r/2+o]),0),this._merge(this.transformPt([-s/2+n,r/2+o]),0),this._merge(this.transformPt([s/2+n,-r/2+o]),0),this._merge(this.transformPt([s/2+n,r/2+o]),0)}_processPath(t,e){if(t)for(const i of t){const t=i?i.length:0;if(t>1){this._merge(this.transformPt(i[0]),e);for(let s=1;s<t;s++)this._merge(this.transformPt(i[s]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class E extends O{constructor(t,e,i,s){super(e,i),this._applyAdditionalRenderProps=s,this._colorSubstitutionHelper=new m,this._ctx=t}drawSolidFill(t,e){if(!t)return;if((0,f.oU)(t))this._buildPath(t.rings,!0);else if((0,f.l9)(t))this._buildPath(t.paths,!0);else if((0,f.YX)(t))this._buildPath(N(t).rings,!0);else{if(!(0,f.aW)(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const i=this._ctx;i.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",i.fill("evenodd")}drawSolidStroke(t,e,i,s,r,n){if(!t||!e||0===i)return;if((0,f.oU)(t))this._buildPath(t.rings,!0);else if((0,f.l9)(t))this._buildPath(t.paths,!1);else{if(!(0,f.YX)(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(N(t).rings,!0)}const o=this._ctx;o.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",o.lineWidth=Math.max(this.transformSize(i),.5),this._setCapStyle(s),this._setJoinStyle(r),o.miterLimit=n,o.stroke()}pushClipPath(t){if(this._ctx.save(),(0,f.oU)(t))this._buildPath(t.rings,!0);else if((0,f.l9)(t))this._buildPath(t.paths,!0);else{if(!(0,f.YX)(t))return;this._buildPath(N(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:i,url:s,tintColor:r}=t,n=(0,S.NA)(t.scaleX,1),o=this._resourceManager.getResource(s);if(null==o)return;let a=e*(o.width/o.height),l=e;e||(a=o.width,l=o.height);const h=(0,S.TB)(s)||"src"in o&&(0,S.TB)(o.src);let c="getFrame"in o?g(o):o;i&&(c=this._colorSubstitutionHelper.applyColorSubstituition(c,i)),this._applyAdditionalRenderProps&&!h&&r&&(c=this._colorSubstitutionHelper.tintImageData(c,r));const u=this.transformPt([0,0]),[f,_]=this.getTransformAngle(),m=this.transformSize(1),d=this._ctx;d.save(),d.setTransform({m11:n*m*f,m12:n*m*_,m21:-m*_,m22:m*f,m41:u[0],m42:u[1]}),d.drawImage(c,-a/2,-l/2,a,l),d.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new v);const i=R(t);i.size*=this.transformSize((0,a.Wz)(1));const s=this._textRasterizer.rasterizeText(e,i);if(!s)return;const{size:r,anchorX:n,anchorY:o,canvas:l}=s,h=r[0]*(n+.5),c=r[1]*(o-.5),u=this._ctx,f=this.transformPt([0,0]),[_,m]=this.getTransformAngle();u.save(),u.setTransform({m11:1*_,m12:1*m,m21:-1*m,m22:1*_,m41:f[0]-1*h,m42:f[1]+1*c}),u.drawImage(l,0,0),u.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:i,height:s,offsetX:r,offsetY:n,rotation:o,scaleX:a,tintColor:l,url:h}=e;const c=this._resourceManager.getResource(h);if(null==c)return;if((0,f.oU)(t))this._buildPath(t.rings,!0);else if((0,f.l9)(t))this._buildPath(t.paths,!0);else if((0,f.YX)(t))this._buildPath(N(t).rings,!0);else{if(!(0,f.aW)(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const u=this._ctx,_=(0,S.TB)(h)||"src"in c&&(0,S.TB)(c.src);let m,d="getFrame"in c?g(c):c;if(i&&(d=this._colorSubstitutionHelper.applyColorSubstituition(d,i)),this._applyAdditionalRenderProps){_||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),m=u.createPattern(d,"repeat");const t=this.transformSize(1);o||(o=0),r?r*=t:r=0,n?n*=t:n=0,s&&(s*=t);const e=s?s/c.height:1,i=a&&s?a*s/c.width:1;if(0!==o||1!==e||1!==i||0!==r||0!==n){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(r,n).scaleSelf(i,e,1),m.setTransform(t)}}else m=u.createPattern(d,"repeat");u.save(),u.fillStyle=m,u.fill("evenodd"),u.restore()}drawPictureStroke(t,e){if(!t)return;let{colorSubstitutions:i,capStyle:s,joinStyle:n,miterLimit:o,tintColor:l,url:h,width:c}=e;const u=this._resourceManager.getResource(h);if(null==u)return;let _;if((0,f.oU)(t))_=t.rings;else if((0,f.l9)(t))_=t.paths;else{if(!(0,f.YX)(t))return(0,f.aW)(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;_=N(t).rings}c||(c=u.width);const m=(0,S.TB)(h)||"src"in u&&(0,S.TB)(u.src);let d="getFrame"in u?g(u):u;i&&(d=this._colorSubstitutionHelper.applyColorSubstituition(d,i)),this._applyAdditionalRenderProps&&(m||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)));const p=Math.max(this.transformSize((0,a.F2)(c)),.5),y=p/d.width,x=this._ctx,M=x.createPattern(d,"repeat-y");let b,v;x.save(),this._setCapStyle(s),this._setJoinStyle(n),void 0!==o&&(x.miterLimit=o),x.lineWidth=p;for(let t of _)if(t=(0,r.d9)(t),V(t),t&&!(t.length<=1)){b=this.transformPt(t[0]);for(let e=1;e<t.length;e++){v=this.transformPt(t[e]);const i=F(b,v),s=new DOMMatrix;s.translateSelf(0,b[1]-p/2).scaleSelf(y,y,1).rotateSelf(0,0,90-i),M.setTransform(s),x.strokeStyle=M,x.beginPath(),x.moveTo(b[0],b[1]),x.lineTo(v[0],v[1]),x.stroke(),b=v}}x.restore()}_buildPath(t,e){const i=this._ctx;if(i.beginPath(),t)for(const s of t){const t=s?s.length:0;if(t>1){let r=this.transformPt(s[0]);i.moveTo(r[0],r[1]);for(let e=1;e<t;e++)r=this.transformPt(s[e]),i.lineTo(r[0],r[1]);e&&i.closePath()}}}_setCapStyle(t){switch(t){case y.kP.Butt:this._ctx.lineCap="butt";break;case y.kP.Round:this._ctx.lineCap="round";break;case y.kP.Square:this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case y.r4.Bevel:this._ctx.lineJoin="bevel";break;case y.r4.Round:this._ctx.lineJoin="round";break;case y.r4.Miter:this._ctx.lineJoin="miter"}}}function F(t,e){const i=e[0]-t[0],s=e[1]-t[1];return 180/Math.PI*Math.atan2(s,i)}const N=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null;function R(t,e=1){const i=(0,S.BX)(t),r=(0,S.wi)(t.fontStyleName),n=t.fontFamilyName??s.em,{weight:o,style:a}=r,l=e*(t.height||5),h=(0,S.X_)(t.horizontalAlignment),c=(0,S.FG)(t.verticalAlignment),u=(0,S.W7)(t),f=(0,S.W7)(t.haloSymbol),_=f?e*(0|t.haloSize):0,m="CIMBackgroundCallout"===t.callout?.type?t.callout.backgroundSymbol:null,d=(0,S.W7)(m),p=(0,S.F)(m),y=(0,S.$Z)(m);return{color:u,size:l,horizontalAlignment:h,verticalAlignment:c,font:{family:n,style:(0,S.pJ)(a),weight:(0,S.On)(o),decoration:i},halo:{size:_||0,color:f,style:a},backgroundColor:d,borderLine:null!=p&&null!=y?{size:p,color:y}:null,pixelRatio:1,premultiplyColors:!0}}const W=1e-4;function V(t){let e,i,s,r,n,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],i=t[a][1]-o[1],r=0!==e?i/e:Math.PI/2,void 0!==s&&r-s<=W?(t.splice(a-1,1),o=n):(n=o,o=t[a],a++),s=r}},54432:(t,e,i)=>{i.d(e,{B$:()=>P,E0:()=>w,Tg:()=>S});var s=i(22303),r=i(83798),n=i(22974),o=i(92604),a=i(77734),l=i(62357),h=(i(24470),i(20322),i(59266)),c=i(31134),u=i(31936),f=i(40685),_=i(95648),m=i(72233),d=i(74465),p=(i(31363),i(16534));i(58195);const y=Math.PI,g=y/2,x=(Math.PI,96/72),M=o.Z.getLogger("esri.symbols.cim.CIMSymbolHelper");function b(t,e,i){switch(e.type){case"CIMSymbolReference":return b(t,e.symbol,i);case"CIMPointSymbol":null==i&&(i={x:0,y:0}),t.drawSymbol(e,i);break;case"CIMLineSymbol":null==i&&(i={paths:[[[0,0],[10,0]]]}),t.drawSymbol(e,i);break;case"CIMPolygonSymbol":null==i&&(i={rings:[[[0,0],[0,10],[10,10],[10,0],[0,0]]]}),t.drawSymbol(e,i);break;case"CIMTextSymbol":{const i={x:0,y:0};t.drawSymbol(e,i);break}case"CIMVectorMarker":{const i=new u.u;t.drawMarker(e,i);break}}return t.envelope()}function v(t){if(!t)return 0;switch(t.type){case"CIMGeometricEffectArrow":return Math.abs(.5*t.width);case"CIMGeometricEffectBuffer":return Math.abs(t.size);case"CIMGeometricEffectExtension":case"CIMGeometricEffectRadial":return Math.abs(t.length);case"CIMGeometricEffectJog":return Math.abs(.5*t.length);case"CIMGeometricEffectMove":return Math.max(Math.abs((0,m.NA)(t.offsetX)),Math.abs((0,m.NA)(t.offsetY)));case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":return Math.abs(t.offset);case"CIMGeometricEffectRegularPolygon":return Math.abs(t.radius);case"CIMGeometricEffectRotate":case"CIMGeometricEffectScale":default:return 0;case"CIMGeometricEffectTaperedPolygon":return.5*Math.max(Math.abs(t.fromWidth),Math.abs(t.toWidth));case"CIMGeometricEffectWave":return Math.abs(t.amplitude);case"CIMGeometricEffectDonut":return Math.abs(t.width)}}function S(t){if(!t)return 0;let e=0;for(const i of t)e+=v(i);return e}class P{static getEnvelope(t,e,i){if(!t)return null;const s=new f.uQ(i);if(Array.isArray(t)){let i;for(const r of t)i?i.union(b(s,r,e)):i=b(s,r,e);return i}return b(s,t,e)}static getTextureAnchor(t,e){const i=this.getEnvelope(t,null,e);if(!i)return[0,0,0];const s=(i.x+.5*i.width)*x,r=(i.y+.5*i.height)*x,n=i.width*x+2,o=i.height*x+2;return[-s/n,-r/o,o]}static rasterize(t,e,i,s,r=!0){const n=i||this.getEnvelope(e,null,s);if(!n)return[null,0,0,0,0];const o=(n.x+.5*n.width)*x,a=(n.y+.5*n.height)*x;t.width=n.width*x,t.height=n.height*x,i||(t.width+=2,t.height+=2);const l=t.getContext("2d"),h=f.zA.createScale(x,-x);h.translate(.5*t.width-o,.5*t.height+a);const c=new f.cD(l,s,h);switch(e.type){case"CIMPointSymbol":{const t={type:"point",x:0,y:0};c.drawSymbol(e,t);break}case"CIMVectorMarker":{const t=new u.u;c.drawMarker(e,t);break}}const _=l.getImageData(0,0,t.width,t.height),m=new Uint8Array(_.data);if(r){let t;for(let e=0;e<m.length;e+=4)t=m[e+3]/255,m[e]=m[e]*t,m[e+1]=m[e+1]*t,m[e+2]=m[e+2]*t}return[m,t.width,t.height,-o/t.width,-a/t.height]}static fromTextSymbol(t){const{angle:e,color:i,font:s,haloColor:n,haloSize:o,horizontalAlignment:a,kerning:l,text:h,verticalAlignment:c,xoffset:u,yoffset:f,backgroundColor:d,borderLineColor:p,borderLineSize:y}=t;let g,x,M,b,v,S;s&&(g=s.family,x=s.style,M=s.weight,b=s.size,v=s.decoration);let P=!1;return h&&(P=(0,r.E)(h)[1]),(d||y)&&(S={type:"CIMBackgroundCallout",margin:null,backgroundSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",color:z(d)},{type:"CIMSolidStroke",color:z(p),width:y}]},accentBarSymbol:null,gap:null,leaderLineSymbol:null,lineStyle:null}),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,anchorPointUnits:"Relative",dominantSizeAxis3D:"Y",size:10,billboardMode3D:"FaceNearPlane",frame:{xmin:-5,ymin:-5,xmax:5,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{x:0,y:0},symbol:{type:"CIMTextSymbol",angle:e,blockProgression:_.zV.BTT,depth3D:1,extrapolateBaselines:!0,fontEffects:_.eZ.Normal,fontEncoding:_.DD.Unicode,fontFamilyName:g||"Arial",fontStyleName:T(x,M),fontType:_.Ky.Unspecified,haloSize:o,height:b,hinting:_.Dd.Default,horizontalAlignment:k(a??"center"),kerning:l,letterWidth:100,ligatures:!0,lineGapType:"Multiple",offsetX:(0,m.NA)(u),offsetY:(0,m.NA)(f),strikethrough:"line-through"===v,underline:"underline"===v,symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:z(i)}]},haloSymbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:z(n)}]},shadowColor:[0,0,0,255],shadowOffsetX:1,shadowOffsetY:1,textCase:"Normal",textDirection:P?_.UX.RTL:_.UX.LTR,verticalAlignment:I(c??"baseline"),verticalGlyphOrientation:_.RS.Right,wordSpacing:100,billboardMode3D:_.UR.FaceNearPlane,callout:S},textString:h}],scaleSymbolsProportionally:!0,respectFrame:!0}],scaleX:1,angleAlignment:"Display"}}static fromPictureFillSymbol(t){const{height:e,outline:i,width:s,xoffset:r,xscale:n,yoffset:o,yscale:a}=t,l=[],h={type:"CIMPolygonSymbol",symbolLayers:l};if(i){const t=V(i);t&&l.push(t)}let c=t.url;"esriPFS"===t.type&&t.imageData&&(c=t.imageData);const u="angle"in t?t.angle??0:0,f=(s??0)*(n||1),d=(e??0)*(a||1);return l.push({type:"CIMPictureFill",invertBackfaceTexture:!1,scaleX:1,textureFilter:_.Qb.Picture,tintColor:null,url:c,height:d,width:f,offsetX:(0,m.NA)(r),offsetY:(0,m.NA)(o),rotation:(0,m.NA)(-u),colorSubstitutions:null}),h}static fromSimpleFillSymbol(t){const{color:e,style:i,outline:s}=t,r=[],o={type:"CIMPolygonSymbol",symbolLayers:r};if(s){const t=V(s);t&&r.push(t)}if(i&&"solid"!==i&&"none"!==i&&"esriSFSSolid"!==i&&"esriSFSNull"!==i){const t={type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",color:z(e),capStyle:_.kP.Butt,joinStyle:_.r4.Miter,width:.75}]};let s=0;const o=(0,l.Wz)(N(i)?8:10);switch(i){case"vertical":case"esriSFSVertical":s=90;break;case"forward-diagonal":case"esriSFSForwardDiagonal":case"diagonal-cross":case"esriSFSDiagonalCross":s=-45;break;case"backward-diagonal":case"esriSFSBackwardDiagonal":s=45;break;case"cross":case"esriSFSCross":s=0}r.push({type:"CIMHatchFill",lineSymbol:t,offsetX:0,offsetY:0,rotation:s,separation:o}),"cross"===i||"esriSFSCross"===i?r.push({type:"CIMHatchFill",lineSymbol:(0,n.d9)(t),offsetX:0,offsetY:0,rotation:90,separation:o}):"diagonal-cross"!==i&&"esriSFSDiagonalCross"!==i||r.push({type:"CIMHatchFill",lineSymbol:(0,n.d9)(t),offsetX:0,offsetY:0,rotation:45,separation:o})}else!i||"solid"!==i&&"esriSFSSolid"!==i||r.push({type:"CIMSolidFill",enable:!0,color:z(e)});return o}static fromSimpleLineSymbol(t){const{cap:e,color:i,join:s,marker:r,miterLimit:n,style:o,width:a}=t;let l=null;"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(l=[{type:"CIMGeometricEffectDashes",dashTemplate:E(o,e),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]);const h=[];if(r){let t;switch(r.placement){case"begin-end":t=_.Tx.Both;break;case"begin":t=_.Tx.JustBegin;break;case"end":t=_.Tx.JustEnd;break;default:t=_.Tx.None}const e=P.fromSimpleMarker(r,a,i).symbolLayers[0];e.markerPlacement={type:"CIMMarkerPlacementAtExtremities",angleToLine:!0,offset:0,extremityPlacement:t,offsetAlongLine:0},h.push(e)}return h.push({type:"CIMSolidStroke",color:"none"!==o&&"esriSLSNull"!==o?z(i):[0,0,0,0],capStyle:C(e),joinStyle:L(s),miterLimit:n,width:a,effects:l}),{type:"CIMLineSymbol",symbolLayers:h}}static fromPictureMarker(t){const{angle:e,height:i,width:s,xoffset:r,yoffset:n}=t;let o=t.url;return"esriPMS"===t.type&&t.imageData&&(o=t.imageData),{type:"CIMPointSymbol",symbolLayers:[{type:"CIMPictureMarker",invertBackfaceTexture:!1,scaleX:1,textureFilter:_.Qb.Picture,tintColor:null,url:o,size:i,width:s,offsetX:(0,m.NA)(r),offsetY:(0,m.NA)(n),rotation:(0,m.NA)(-e)}]}}static fromSimpleMarker(t,e,i){const{style:s}=t,r=t.color??i;if("path"===s){const e=[];if("outline"in t&&t.outline){const i=t.outline;e.push({type:"CIMSolidStroke",enable:!0,width:(0,l.F2)(Math.round((0,l.Wz)(i.width))),color:z(i.color),path:t.path})}e.push({type:"CIMSolidFill",enable:!0,color:z(r),path:t.path});const[i,s]=F("square");return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,m.NA)(-t.angle),size:(0,m.NA)(t.size||6),offsetX:(0,m.NA)(t.xoffset),offsetY:(0,m.NA)(t.yoffset),frame:i,markerGraphics:[{type:"CIMMarkerGraphic",geometry:s,symbol:{type:"CIMPolygonSymbol",symbolLayers:e}}]}]}}const n=[];let o,a;if("outline"in t&&t.outline){const e=t.outline,i="solid"!==e.style&&"esriSLSSolid"!==e.style&&"none"!==e.style;[o,a]=i?F(s,t.size):F(s);const r=i?[{type:"CIMGeometricEffectAddControlPoints"},{type:"CIMGeometricEffectDashes",dashTemplate:E(e.style,null),lineDashEnding:_.sj.FullGap,controlPointEnding:_.sj.FullPattern}]:void 0;n.push({type:"CIMSolidStroke",enable:!0,width:null!=e.width&&e.width>.667?(0,l.F2)(Math.round((0,l.Wz)(e.width))):e.width,color:z(e.color),effects:r})}else!e||"line-marker"!==t.type||"cross"!==t.style&&"x"!==t.style?[o,a]=F(s):([o,a]=F(s),n.push({type:"CIMSolidStroke",enable:!0,width:e,color:z(r)}));n.push({type:"CIMSolidFill",enable:!0,color:z(r)});const h={type:"CIMPolygonSymbol",symbolLayers:n};return{type:"CIMPointSymbol",symbolLayers:[{type:"CIMVectorMarker",enable:!0,rotation:(0,m.NA)(-t.angle),size:(0,m.NA)(t.size||6*e),offsetX:(0,m.NA)(t.xoffset),offsetY:(0,m.NA)(t.yoffset),frame:o,markerGraphics:[{type:"CIMMarkerGraphic",geometry:a,symbol:h}]}]}}static fromCIMHatchFill(t,e){const i=e*(t.separation??f.rC),s=i/2,r=(0,n.d9)(t.lineSymbol);r.symbolLayers?.forEach((t=>{switch(t.type){case"CIMSolidStroke":null!=t.width&&(t.width*=e),t.effects?.forEach((t=>{"CIMGeometricEffectDashes"===t.type&&(t.dashTemplate=t.dashTemplate.map((t=>t*e)))}));break;case"CIMVectorMarker":{null!=t.size&&(t.size*=e);const i=t.markerPlacement;null!=i&&"placementTemplate"in i&&(i.placementTemplate=i.placementTemplate.map((t=>t*e)));break}}}));let o=this._getLineSymbolPeriod(r)||4;for(;o<4;)o*=2;const a=o/2;return{type:"CIMVectorMarker",frame:{xmin:-a,xmax:a,ymin:-s,ymax:s},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{paths:[[[-a,0],[a,0]]]},symbol:r}],size:i}}static fetchResources(t,e,i){if(t&&e)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":{const s=t.symbolLayers;if(!s)return;for(const t of s)switch(W(t,e,i),t.type){case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":case"CIMPictureStroke":case"CIMGradientStroke":case"CIMCharacterMarker":case"CIMPictureMarker":"url"in t&&t.url&&i.push(e.fetchResource(t.url,null));break;case"CIMVectorMarker":{const s=t.markerGraphics;if(!s)continue;for(const t of s)if(t){const s=t.symbol;s&&P.fetchResources(s,e,i)}}}break}}}static fetchFonts(t,e,i){if(t&&e)if("symbolLayers"in t&&t.symbolLayers){for(const s of t.symbolLayers)if("CIMVectorMarker"===s.type&&s.markerGraphics)for(const t of s.markerGraphics)t?.symbol&&P.fetchFonts(t.symbol,e,i)}else if("CIMTextSymbol"===t.type){const{fontFamilyName:s,fontStyleName:r}=t;if(!s||"calcitewebcoreicons"===s.toLowerCase())return;const{style:n,weight:o}=(0,m.wi)(r),a=(0,m.BX)(t),l=new c.Z({family:s,style:n,weight:o,decoration:a});i.push(e.loadFont(l).catch((()=>{M.error(`Unsupported font ${s} in CIM symbol`)})))}}static _getLineSymbolPeriod(t){if(t){const e=this._getEffectsRepeat(t.effects);if(e)return e;if(t.symbolLayers)for(const e of t.symbolLayers)if(e){const t=this._getEffectsRepeat(e.effects);if(t)return t;switch(e.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=this._getPlacementRepeat(e.markerPlacement);if(t)return t}}}}return 0}static _getEffectsRepeat(t){if(t)for(const e of t)if(e)switch(e.type){case"CIMGeometricEffectDashes":{const t=e.dashTemplate;if(t&&t.length){let e=0;for(const i of t)e+=i;return 1&t.length&&(e*=2),e}break}case"CIMGeometricEffectWave":return e.period;default:M.error(`unsupported geometric effect type ${e.type}`)}return 0}static _getPlacementRepeat(t){if(t)switch(t.type){case"CIMMarkerPlacementAlongLineSameSize":case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineVariableSize":{const e=t.placementTemplate;if(e&&e.length){let t=0;for(const i of e)t+=+i;return 1&e.length&&(t*=2),t}break}}return 0}static fromCIMInsidePolygon(t){const e=t.markerPlacement,i={...t};i.markerPlacement=null,i.anchorPoint=null;const s=Math.abs(e.stepX),r=Math.abs(e.stepY),n=(e.randomness??100)/100;let o,h,c,u;if("Random"===e.gridType){const t=(0,l.Wz)(p.KA),i=Math.max(Math.floor(t/s),1),f=Math.max(Math.floor(t/r),1);o=i*s/2,h=f*r/2,c=2*h;const _=new a.Z(e.seed),m=n*s/1.5,d=n*r/1.5;u=[];for(let t=0;t<i;t++)for(let e=0;e<f;e++){const i=t*s-o+m*(.5-_.getFloat()),n=e*r-h+d*(.5-_.getFloat());u.push({x:i,y:n}),0===t&&u.push({x:i+2*o,y:n}),0===e&&u.push({x:i,y:n+2*h})}}else!0===e.shiftOddRows?(o=s/2,h=r,c=2*r,u=[{x:-o,y:0},{x:o,y:0},{x:0,y:h},{x:0,y:-h}]):(o=s/2,h=r/2,c=r,u=[{x:-s,y:0},{x:0,y:-r},{x:-s,y:-r},{x:0,y:0},{x:s,y:0},{x:0,y:r},{x:s,y:r},{x:-s,y:r},{x:s,y:-r}]);return{type:"CIMVectorMarker",frame:{xmin:-o,xmax:o,ymin:-h,ymax:h},markerGraphics:u.map((t=>({type:"CIMMarkerGraphic",geometry:t,symbol:{type:"CIMPointSymbol",symbolLayers:[i]}}))),size:c}}static getSize(t){if(t)switch(t.type){case"CIMTextSymbol":return t.height;case"CIMPointSymbol":{let e=0;if(t.symbolLayers)for(const i of t.symbolLayers)if(i)switch(i.type){case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":{const t=i.size;null!=t&&t>e&&(e=t);break}}return e}case"CIMLineSymbol":case"CIMPolygonSymbol":{let e=0;if(t.symbolLayers)for(const i of t.symbolLayers)if(i)switch(i.type){case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":{const t=i.width;null!=t&&t>e&&(e=t);break}case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":case"CIMObjectMarker3D":case"CIMglTFMarker3D":if(i.markerPlacement&&(0,m.gJ)(i.markerPlacement)){const t=i.size;null!=t&&t>e&&(e=t)}}return e}}}static getMarkerScaleRatio(t){if(t&&"CIMVectorMarker"===t.type&&!1!==t.scaleSymbolsProportionally&&t.frame&&null!=t.size){const e=t.frame.ymax-t.frame.ymin;return t.size/e}return 1}}class w{static findApplicableOverrides(t,e,i){if(t&&e){if(t.primitiveName){let s=!1;for(const e of i)if(e.primitiveName===t.primitiveName){s=!0;break}if(!s)for(const s of e)s.primitiveName===t.primitiveName&&i.push(s)}switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":if(t.effects)for(const s of t.effects)w.findApplicableOverrides(s,e,i);if(t.symbolLayers)for(const s of t.symbolLayers)w.findApplicableOverrides(s,e,i);break;case"CIMTextSymbol":break;case"CIMSolidStroke":case"CIMPictureStroke":case"CIMGradientStroke":case"CIMSolidFill":case"CIMPictureFill":case"CIMHatchFill":case"CIMGradientFill":case"CIMVectorMarker":case"CIMCharacterMarker":case"CIMPictureMarker":if(t.effects)for(const s of t.effects)w.findApplicableOverrides(s,e,i);if(t.markerPlacement&&w.findApplicableOverrides(t.markerPlacement,e,i),"CIMVectorMarker"===t.type){if(t.markerGraphics)for(const s of t.markerGraphics)w.findApplicableOverrides(s,e,i),w.findApplicableOverrides(s.symbol,e,i)}else"CIMCharacterMarker"===t.type?w.findApplicableOverrides(t.symbol,e,i):"CIMHatchFill"===t.type?w.findApplicableOverrides(t.lineSymbol,e,i):"CIMPictureMarker"===t.type&&w.findApplicableOverrides(t.animatedSymbolProperties,e,i)}}}static findEffectOverrides(t,e,i){if(!e||!t)return;const s=t.length;for(let r=0;r<s;r++){const s=t[r],n=s?.primitiveName;if(n){let t=!1;for(const e of i)if(e.primitiveName===n){t=!0;break}if(!t)for(const t of e)t.primitiveName===n&&i.push(t)}}}static async resolveSymbolOverrides(t,e,i,s,r,o,a){if(!t?.symbol)return null;let{symbol:l,primitiveOverrides:h}=t;const c=!!h;if(!c&&!s)return l;l=(0,n.d9)(l);let u=!0;if(e||(e={attributes:{}},u=!1),c){if(u||(h=h.filter((t=>!t.valueExpressionInfo?.expression.includes("$feature")))),a||(h=h.filter((t=>!t.valueExpressionInfo?.expression.includes("$view")))),h.length>0){const t=(0,m.Qf)(e.attributes);await w.evaluateOverrides(h,e,{spatialReference:i,fields:t,geometryType:r},o,a)}w.applyOverrides(l,h)}return s&&w.applyDictionaryTextOverrides(l,e,s),l}static async evaluateOverrides(t,e,i,s,r){if(!e)return;let n;for(const o of t){const t=o.valueExpressionInfo;if(t&&i?.geometryType){n||(n=[]),o.value=void 0;const a=(0,h.Yi)(t.expression,i.spatialReference,i.fields).then((t=>{o.value=(0,d.Z)(t,e,{$view:r},i.geometryType,s)}));n.push(a)}}void 0!==n&&n.length>0&&await Promise.all(n)}static applyDictionaryTextOverrides(t,e,i,s="Normal"){if(t?.type)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":case"CIMTextSymbol":{const r=t.symbolLayers;if(!r)return;for(const n of r)n&&"CIMVectorMarker"===n.type&&w.applyDictionaryTextOverrides(n,e,i,"CIMTextSymbol"===t.type?t.textCase:s)}break;case"CIMVectorMarker":{const s=t.markerGraphics;if(!s)return;for(const t of s)t&&w.applyDictionaryTextOverrides(t,e,i)}break;case"CIMMarkerGraphic":{const r=t.textString;if(r&&r.includes("[")){const n=(0,m.H1)(r,i);t.textString=(0,m.E_)(e,n,s)}}}}static applyOverrides(t,e,i,s){if(t.primitiveName)for(const r of e)if(r.primitiveName===t.primitiveName){const e=R(r.propertyName);if(s&&s.push({cim:t,nocapPropertyName:e,value:t[e]}),r.expression&&(r.value=w.toValue(r.propertyName,r.expression)),i){let e=!1;for(const s of i)s.primitiveName===t.primitiveName&&(e=!0);e||i.push(r)}null!=r.value&&(t[e]=r.value)}switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":if(t.effects)for(const r of t.effects)w.applyOverrides(r,e,i,s);if(t.symbolLayers)for(const r of t.symbolLayers)w.applyOverrides(r,e,i,s);break;case"CIMTextSymbol":break;case"CIMSolidStroke":case"CIMSolidFill":case"CIMVectorMarker":if(t.effects)for(const r of t.effects)w.applyOverrides(r,e,i,s);if("CIMVectorMarker"===t.type&&t.markerGraphics)for(const r of t.markerGraphics)w.applyOverrides(r,e,i,s),w.applyOverrides(r.symbol,e,i,s)}}static restoreOverrides(t){for(const e of t)e.cim[e.nocapPropertyName]=e.value}static buildOverrideKey(t){let e="";for(const i of t)void 0!==i.value&&(e+=`${i.primitiveName}${i.propertyName}${JSON.stringify(i.value)}`);return e}static toValue(t,e){if("DashTemplate"===t)return e.split(" ").map((t=>Number(t)));if("Color"===t){const t=new s.Z(e).toRgba();return t[3]*=255,t}return e}}const C=t=>{if(!t)return _.kP.Butt;switch(t){case"butt":return _.kP.Butt;case"square":return _.kP.Square;case"round":return _.kP.Round}},L=t=>{if(!t)return _.r4.Miter;switch(t){case"miter":return _.r4.Miter;case"round":return _.r4.Round;case"bevel":return _.r4.Bevel}},k=t=>{if(null==t)return"Center";switch(t){case"left":return"Left";case"right":return"Right";case"center":return"Center"}},I=t=>{if(null==t)return"Center";switch(t){case"baseline":return"Baseline";case"top":return"Top";case"middle":return"Center";case"bottom":return"Bottom"}},z=t=>{if(!t)return[0,0,0,0];const{r:e,g:i,b:s,a:r}=t;return[e,i,s,255*r]},T=(t,e)=>{const i=O(e),s=A(t);return i&&s?`${i}-${s}`:`${i}${s}`},O=t=>{if(!t)return"";switch(t.toLowerCase()){case"bold":case"bolder":return"bold"}return""},A=t=>{if(!t)return"";switch(t.toLowerCase()){case"italic":case"oblique":return"italic"}return""},E=(t,e)=>{const i="butt"===e;switch(t){case"dash":case"esriSLSDash":return i?[4,3]:[3,4];case"dash-dot":case"esriSLSDashDot":return i?[4,3,1,3]:[3,4,0,4];case"dot":case"esriSLSDot":return i?[1,3]:[0,4];case"long-dash":case"esriSLSLongDash":return i?[8,3]:[7,4];case"long-dash-dot":case"esriSLSLongDashDot":return i?[8,3,1,3]:[7,4,0,4];case"long-dash-dot-dot":case"esriSLSDashDotDot":return i?[8,3,1,3,1,3]:[7,4,0,4,0,4];case"short-dash":case"esriSLSShortDash":return i?[4,1]:[3,2];case"short-dash-dot":case"esriSLSShortDashDot":return i?[4,1,1,1]:[3,2,0,2];case"short-dash-dot-dot":case"esriSLSShortDashDotDot":return i?[4,1,1,1,1,1]:[3,2,0,2,0,2];case"short-dot":case"esriSLSShortDot":return i?[1,1]:[0,2];case"solid":case"esriSLSSolid":case"none":return M.error("Unexpected: style does not require rasterization"),[0,0];default:return M.error(`Tried to rasterize SLS, but found an unexpected style: ${t}!`),[0,0]}},F=(t,e=100)=>{const i=e/2;let s,r;const n=t;if("circle"===n||"esriSMSCircle"===n){const t=.25;let e=Math.acos(1-t/i),n=Math.ceil(y/e/4);0===n&&(n=1),e=g/n,n*=4;const o=[];o.push([i,0]);for(let t=1;t<n;t++)o.push([i*Math.cos(t*e),-i*Math.sin(t*e)]);o.push([i,0]),s={rings:[o]},r={xmin:-i,ymin:-i,xmax:i,ymax:i}}else if("cross"===n||"esriSMSCross"===n){const t=0;s={rings:[[[t,i],[t,t],[i,t],[i,-t],[t,-t],[t,-i],[-t,-i],[-t,-t],[-i,-t],[-i,t],[-t,t],[-t,i],[t,i]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i}}else if("diamond"===n||"esriSMSDiamond"===n)s={rings:[[[-i,0],[0,i],[i,0],[0,-i],[-i,0]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i};else if("square"===n||"esriSMSSquare"===n)s={rings:[[[-i,-i],[-i,i],[i,i],[i,-i],[-i,-i]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i};else if("x"===n||"esriSMSX"===n){const t=0;s={rings:[[[0,t],[i-t,i],[i,i-t],[t,0],[i,t-i],[i-t,-i],[0,-t],[t-i,-i],[-i,t-i],[-t,0],[-i,i-t],[t-i,i],[0,t]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i}}else if("triangle"===n||"esriSMSTriangle"===n){const t=.5773502691896257*e,i=-t,n=2/3*e,o=n-e;s={rings:[[[i,o],[0,n],[t,o],[i,o]]]},r={xmin:i,ymin:o,xmax:t,ymax:n}}else"arrow"===n&&(s={rings:[[[-50,50],[50,0],[-50,-50],[-33,-20],[-33,20],[-50,50]]]},r={xmin:-i,ymin:-i,xmax:i,ymax:i});return[r,s]},N=t=>"vertical"===t||"horizontal"===t||"cross"===t||"esriSFSCross"===t||"esriSFSVertical"===t||"esriSFSHorizontal"===t,R=t=>t?t.charAt(0).toLowerCase()+t.substr(1):t;function W(t,e,i){t.effects&&null==e.geometryEngine&&(e.geometryEnginePromise?i.push(e.geometryEnginePromise):(0,m.Cc)(t.effects)&&(e.geometryEnginePromise=(0,m.RI)(),i.push(e.geometryEnginePromise),e.geometryEnginePromise.then((t=>e.geometryEngine=t))))}function V(t){if(!t)return null;let e=null;const{cap:i,color:s,join:r,miterLimit:n,style:o,width:a}=t;return"solid"!==o&&"none"!==o&&"esriSLSSolid"!==o&&"esriSLSNull"!==o&&(e=[{type:"CIMGeometricEffectDashes",dashTemplate:E(o,i),lineDashEnding:"NoConstraint",scaleDash:!0,offsetAlongLine:null}]),{type:"CIMSolidStroke",color:"esriSLSNull"!==o&&"none"!==o?z(s):[0,0,0,0],capStyle:C(i),joinStyle:L(r),miterLimit:n,width:a,effects:e}}},72233:(t,e,i)=>{function s(t){return"function"==typeof t}function r(t,e,i,r){return s(t)?t(e,i,r):t}i.d(e,{$Z:()=>v,BX:()=>M,Cc:()=>d,E_:()=>l,F:()=>S,FG:()=>w,H1:()=>a,NA:()=>_,NO:()=>u,On:()=>g,QI:()=>c,Qf:()=>C,Qs:()=>h,RI:()=>p,TB:()=>L,W7:()=>b,X_:()=>P,cO:()=>m,gJ:()=>f,hf:()=>r,pJ:()=>y,wO:()=>s,wi:()=>x});const n=" /-,\n";function o(t){let e=t.length;for(;e--;)if(!n.includes(t.charAt(e)))return!1;return!0}function a(t,e){const i=[];let s=0,r=-1;do{if(r=t.indexOf("[",s),r>=s){if(r>s){const e=t.substr(s,r-s);i.push([e,null,o(e)])}if(s=r+1,r=t.indexOf("]",s),r>=s){if(r>s){const n=e[t.substr(s,r-s)];n&&i.push([null,n,!1])}s=r+1}}}while(-1!==r);if(s<t.length-1){const e=t.substr(s);i.push([e,null,o(e)])}return i}function l(t,e,i){let s="",r=null;for(const i of e){const[e,n,o]=i;if(e)o?r=e:(r&&(s+=r,r=null),s+=e);else{const e=t.attributes[n];e&&(r&&(s+=r,r=null),s+=e)}}return c(s,i)}function h(t,e,i){const s=a(e,t);return t=>l(t,s,i)}function c(t,e){switch("string"!=typeof t&&(t=String(t)),e){case"LowerCase":return t.toLowerCase();case"Allcaps":return t.toUpperCase();default:return t}}function u(t){return t?{r:t[0],g:t[1],b:t[2],a:t[3]/255}:{r:0,g:0,b:0,a:0}}function f(t){return null!=t&&("CIMMarkerPlacementAlongLineRandomSize"===t.type||"CIMMarkerPlacementAlongLineSameSize"===t.type||"CIMMarkerPlacementAlongLineVariableSize"===t.type||"CIMMarkerPlacementAtExtremities"===t.type||"CIMMarkerPlacementAtMeasuredUnits"===t.type||"CIMMarkerPlacementAtRatioPositions"===t.type||"CIMMarkerPlacementOnLine"===t.type||"CIMMarkerPlacementOnVertices"===t.type)}const _=(t,e=0)=>null==t||isNaN(t)?e:t,m=t=>t.tintColor?u(t.tintColor):{r:255,g:255,b:255,a:1},d=t=>{if(!t)return!1;for(const e of t)switch(e.type){case"CIMGeometricEffectBuffer":case"CIMGeometricEffectOffset":case"CIMGeometricEffectDonut":return!0}return!1};function p(){return Promise.all([i.e(5837),i.e(247)]).then(i.bind(i,30247))}function y(t){if(!t)return"normal";switch(t.toLowerCase()){case"italic":return"italic";case"oblique":return"oblique";default:return"normal"}}function g(t){if(!t)return"normal";switch(t.toLowerCase()){case"bold":return"bold";case"bolder":return"bolder";case"lighter":return"lighter";default:return"normal"}}function x(t){let e="normal",i="normal";if(t){const s=t.toLowerCase();s.includes("italic")?e="italic":s.includes("oblique")&&(e="oblique"),s.includes("bold")?i="bold":s.includes("light")&&(i="lighter")}return{style:e,weight:i}}function M(t){return t.underline?"underline":t.strikethrough?"line-through":"none"}function b(t){if(!t)return null;switch(t.type){case"CIMPolygonSymbol":if(t.symbolLayers)for(const e of t.symbolLayers){const t=b(e);if(null!=t)return t}break;case"CIMTextSymbol":return b(t.symbol);case"CIMSolidFill":return t.color}}function v(t){if(t)switch(t.type){case"CIMPolygonSymbol":case"CIMLineSymbol":{const e=t.symbolLayers;if(e)for(const t of e){const e=v(t);if(null!=e)return e}break}case"CIMTextSymbol":return v(t.symbol);case"CIMSolidStroke":return t.color}}function S(t){if(t)switch(t.type){case"CIMPolygonSymbol":case"CIMLineSymbol":if(t.symbolLayers)for(const e of t.symbolLayers){const t=S(e);if(void 0!==t)return t}break;case"CIMTextSymbol":return S(t.symbol);case"CIMSolidStroke":case"CIMGradientStroke":case"CIMPictureStroke":return t.width}}function P(t){switch(t){case"Left":default:return"left";case"Right":return"right";case"Center":case"Justify":return"center"}}function w(t){switch(t){case"Top":default:return"top";case"Center":return"middle";case"Baseline":return"baseline";case"Bottom":return"bottom"}}function C(t){return(t?Object.keys(t):[]).map((e=>({name:e,alias:e,type:"string"==typeof t[e]?"esriFieldTypeString":"esriFieldTypeDouble"})))}const L=t=>t.includes("data:image/svg+xml")},61565:(t,e,i)=>{i.d(e,{Ck:()=>l,JT:()=>n,Nj:()=>c,c9:()=>u,g6:()=>o,vC:()=>a,x0:()=>h});var s=i(22021),r=i(75215);const n=["none","underline","line-through"],o=["normal","italic","oblique"],a=["normal","lighter","bold","bolder"],l={type:Number,cast:t=>{const e=(0,r.q9)(t);return 0===e?1:(0,s.uZ)(e,.1,4)},nonNullable:!0},h={type:["left","right","center"],nonNullable:!0},c={type:["baseline","top","middle","bottom"],nonNullable:!0},u=8},74465:(t,e,i)=>{i.d(e,{Z:()=>o});var s=i(20102),r=i(92604),n=i(82397);function o(t,e,i,s,n){if(null==t)return null;const o=t.referencesGeometry()&&n?l(e,s,n):e,a=t.repurposeFeature(o);try{return t.evaluate({...i,$feature:a},t.services)}catch(t){return r.Z.getLogger("esri.views.2d.support.arcadeOnDemand").warn("Feature arcade evaluation failed:",t),null}}const a=new Map;function l(t,e,i){const{transform:o,hasZ:l,hasM:h}=i;a.has(e)||a.set(e,function(t){const e={};switch(t){case"esriGeometryPoint":return(t,i,s,r)=>(0,n.U1)(i,e,t,s,r);case"esriGeometryPolygon":return(t,i,s,r)=>(0,n.Ie)(i,e,t,s,r);case"esriGeometryPolyline":return(t,i,s,r)=>(0,n.G6)(i,e,t,s,r);case"esriGeometryMultipoint":return(t,i,s,r)=>(0,n.J9)(i,e,t,s,r);default:return r.Z.getLogger("esri.views.2d.support.arcadeOnDemand").error(new s.Z("mapview-arcade",`Unable to handle geometryType: ${t}`)),t=>t}}(e));const c=a.get(e)(t.geometry,o,l,h);return{...t,geometry:c}}},31363:(t,e,i)=>{i.d(e,{DQ:()=>h,FM:()=>s,Or:()=>c,RD:()=>r,k3:()=>u,nF:()=>a,sX:()=>f,yF:()=>n});const s=Number.POSITIVE_INFINITY,r=Math.PI,n=2*r,o=128/r,a=r/180,l=1/Math.LN2;function h(t,e){return(t%=e)>=0?t:t+e}function c(t){return h(t*o,256)}function u(t){return Math.log(t)*l}function f(t,e,i){return t*(1-i)+e*i}},30729:(t,e,i)=>{var s,r;function n(t){switch(t){case"left":return s.Left;case"right":return s.Right;case"center":return s.Center}}function o(t){switch(t){case"top":return r.Top;case"middle":return r.Center;case"baseline":return r.Baseline;case"bottom":return r.Bottom}}function a(t){switch(t){case"above-left":case"esriServerPointLabelPlacementAboveLeft":return[s.Right,r.Bottom];case"above-center":case"above-along":case"esriServerPointLabelPlacementAboveCenter":case"esriServerLinePlacementAboveAlong":return[s.Center,r.Bottom];case"above-right":case"esriServerPointLabelPlacementAboveRight":return[s.Left,r.Bottom];case"center-left":case"esriServerPointLabelPlacementCenterLeft":return[s.Right,r.Center];case"center-center":case"center-along":case"esriServerPointLabelPlacementCenterCenter":case"esriServerLinePlacementCenterAlong":case"always-horizontal":case"esriServerPolygonPlacementAlwaysHorizontal":return[s.Center,r.Center];case"center-right":case"esriServerPointLabelPlacementCenterRight":return[s.Left,r.Center];case"below-left":case"esriServerPointLabelPlacementBelowLeft":return[s.Right,r.Top];case"below-center":case"below-along":case"esriServerPointLabelPlacementBelowCenter":case"esriServerLinePlacementBelowAlong":return[s.Center,r.Top];case"below-right":case"esriServerPointLabelPlacementBelowRight":return[s.Left,r.Top];default:return console.debug(`Found invalid placement type ${t}`),[s.Center,r.Center]}}function l(t){switch(t){case s.Right:return-1;case s.Center:return 0;case s.Left:return 1;default:return console.debug(`Found invalid horizontal alignment ${t}`),0}}function h(t){switch(t){case r.Top:return 1;case r.Center:return 0;case r.Bottom:case r.Baseline:return-1;default:return console.debug(`Found invalid vertical alignment ${t}`),0}}function c(t){switch(t){case"left":return s.Left;case"right":return s.Right;case"center":return s.Center}}function u(t){switch(t){case"above-along":case"below-along":case"center-along":case"esriServerLinePlacementAboveAlong":case"esriServerLinePlacementBelowAlong":case"esriServerLinePlacementCenterAlong":return!0;default:return!1}}i.d(e,{Hd:()=>c,NS:()=>u,TR:()=>r,b7:()=>o,g:()=>l,kH:()=>n,qv:()=>a,tf:()=>h}),function(t){t[t.Left=-1]="Left",t[t.Center=0]="Center",t[t.Right=1]="Right"}(s||(s={})),function(t){t[t.Top=1]="Top",t[t.Center=0]="Center",t[t.Bottom=-1]="Bottom",t[t.Baseline=2]="Baseline"}(r||(r={}))},63523:(t,e,i)=>{i.d(e,{CA:()=>h,Gq:()=>b,Xp:()=>l,a:()=>x,dk:()=>y,hF:()=>u,jj:()=>c,jy:()=>a,m2:()=>f,mE:()=>g,qr:()=>M});var s=i(20102),r=i(30729),n=i(66039);const o=Object.keys(n.mD).filter((t=>"number"==typeof n.mD[t])).reduce(((t,e)=>({...t,[e]:n.mD[e]})),{});function a(t){return t===n.mD.OUTLINE_FILL||t===n.mD.OUTLINE_FILL_SIMPLE}function l(t){return function(t){return t===n.mD.SIMPLE||t===n.mD.OUTLINE_FILL_SIMPLE}(t.symbologyType)}function h(t){return a(t.symbologyType)}function c(t,e){switch(t){case n.LW.FILL:return y.from(e);case n.LW.LINE:return x.from(e);case n.LW.MARKER:return g.from(e);case n.LW.TEXT:return M.from(e);case n.LW.LABEL:return b.from(e);default:throw new Error(`Unable to createMaterialKey for unknown geometryType ${t}`)}}function u(t){switch(f.load(t).geometryType){case n.LW.MARKER:return new g(t);case n.LW.FILL:return new y(t);case n.LW.LINE:return new x(t);case n.LW.TEXT:return new M(t);case n.LW.LABEL:return new b(t)}}class f{static load(t){const e=this.shared;return e.data=t,e}constructor(t){this._data=0,this._data=t}set data(t){this._data=t??0}get data(){return this._data}get geometryType(){return this.bits(8,11)}set geometryType(t){this.setBits(t,8,11)}get mapAligned(){return!!this.bit(20)}set mapAligned(t){this.setBit(20,t)}get sdf(){return!!this.bit(11)}set sdf(t){this.setBit(11,t??!1)}get pattern(){return!!this.bit(12)}set pattern(t){this.setBit(12,t)}get textureBinding(){return this.bits(0,8)}set textureBinding(t){this.setBits(t,0,8)}get symbologyType(){return this.bits(21,26)}set symbologyType(t){this.setBits(t,21,26)}get geometryTypeString(){switch(this.geometryType){case n.LW.FILL:return"fill";case n.LW.MARKER:return"marker";case n.LW.LINE:return"line";case n.LW.TEXT:return"text";case n.LW.LABEL:return"label";default:throw new s.Z(`Unable to handle unknown geometryType: ${this.geometryType}`)}}setBit(t,e){const i=1<<t;e?this._data|=i:this._data&=~i}bit(t){return(this._data&1<<t)>>t}setBits(t,e,i){for(let s=e,r=0;s<i;s++,r++)this.setBit(s,0!=(t&1<<r))}bits(t,e){let i=0;for(let s=t,r=0;s<e;s++,r++)i|=this.bit(s)<<r;return i}hasVV(){return!1}setVV(t,e){}getVariation(){return{mapAligned:this.mapAligned,pattern:this.pattern,sdf:this.sdf,symbologyType:{value:n.mD[this.symbologyType],options:o,namespace:"SYMBOLOGY_TYPE"}}}getVariationHash(){return this._data&~(7&this.textureBinding)}}f.shared=new f(0);const _=t=>class extends t{get vvSizeMinMaxValue(){return 0!==this.bit(16)}set vvSizeMinMaxValue(t){this.setBit(16,t)}get vvSizeScaleStops(){return 0!==this.bit(17)}set vvSizeScaleStops(t){this.setBit(17,t)}get vvSizeFieldStops(){return 0!==this.bit(18)}set vvSizeFieldStops(t){this.setBit(18,t)}get vvSizeUnitValue(){return 0!==this.bit(19)}set vvSizeUnitValue(t){this.setBit(19,t)}hasSizeVV(){return this.vvSizeMinMaxValue||this.vvSizeScaleStops||this.vvSizeFieldStops||this.vvSizeUnitValue}hasVV(){return super.hasVV()||this.hasSizeVV()}setVV(t,e){super.setVV(t,e);const i=function(t,e,i){const s=n.X.SIZE_FIELD_STOPS|n.X.SIZE_MINMAX_VALUE|n.X.SIZE_SCALE_STOPS|n.X.SIZE_UNIT_VALUE,r=(e&(n.mf.FIELD_TARGETS_OUTLINE|n.mf.MINMAX_TARGETS_OUTLINE|n.mf.SCALE_TARGETS_OUTLINE|n.mf.UNIT_TARGETS_OUTLINE))>>>4;return t===n.LW.LINE&&i.isOutline||t===n.LW.FILL&&a(i.symbologyType)?s&r:s&~r}(this.geometryType,t,e)&t;this.vvSizeMinMaxValue=!!(i&n.X.SIZE_MINMAX_VALUE),this.vvSizeFieldStops=!!(i&n.X.SIZE_FIELD_STOPS),this.vvSizeUnitValue=!!(i&n.X.SIZE_UNIT_VALUE),this.vvSizeScaleStops=!!(i&n.X.SIZE_SCALE_STOPS)}},m=t=>class extends t{get vvRotation(){return 0!==this.bit(15)}set vvRotation(t){this.setBit(15,t)}hasVV(){return super.hasVV()||this.vvRotation}setVV(t,e){super.setVV(t,e),this.vvRotation=!e.isOutline&&!!(t&n.X.ROTATION)}},d=t=>class extends t{get vvColor(){return 0!==this.bit(13)}set vvColor(t){this.setBit(13,t)}hasVV(){return super.hasVV()||this.vvColor}setVV(t,e){super.setVV(t,e),this.vvColor=!e.isOutline&&!!(t&n.X.COLOR)}},p=t=>class extends t{get vvOpacity(){return 0!==this.bit(14)}set vvOpacity(t){this.setBit(14,t)}hasVV(){return super.hasVV()||this.vvOpacity}setVV(t,e){super.setVV(t,e),this.vvOpacity=!e.isOutline&&!!(t&n.X.OPACITY)}};class y extends(d(p(_(f)))){static load(t){const e=this.shared;return e.data=t,e}static from(t){const{symbologyType:e,vvFlags:i}=t,s=this.load(0);return s.geometryType=n.LW.FILL,s.symbologyType=e,e!==n.mD.DOT_DENSITY&&s.setVV(i,t),s.data}getVariation(){return{...super.getVariation(),vvColor:this.vvColor,vvOpacity:this.vvOpacity,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}y.shared=new y(0);class g extends(d(p(m(_(f))))){static load(t){const e=this.shared;return e.data=t,e}static from(t){const{symbologyType:e,vvFlags:i}=t,s=this.load(0);return s.geometryType=n.LW.MARKER,s.symbologyType=e,e!==n.mD.HEATMAP&&s.setVV(i,t),s.data}getVariation(){return{...super.getVariation(),vvColor:this.vvColor,vvRotation:this.vvRotation,vvOpacity:this.vvOpacity,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}g.shared=new g(0);class x extends(d(p(_(f)))){static load(t){const e=this.shared;return e.data=t,e}static from(t){const e=this.load(0);return e.geometryType=n.LW.LINE,e.symbologyType=t.symbologyType,e.setVV(t.vvFlags,t),e.data}getVariation(){return{...super.getVariation(),vvColor:this.vvColor,vvOpacity:this.vvOpacity,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}x.shared=new x(0);class M extends(d(p(m(_(f))))){static load(t){const e=this.shared;return e.data=t,e}static from(t){const e=this.load(0);return e.geometryType=n.LW.TEXT,e.symbologyType=t.symbologyType,e.setVV(t.vvFlags,t),e.data}getVariation(){return{...super.getVariation(),vvColor:this.vvColor,vvOpacity:this.vvOpacity,vvRotation:this.vvRotation,vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}M.shared=new M(0);class b extends(_(f)){static load(t){const e=this.shared;return e.data=t,e}static from(t){const e=this.load(0);return e.geometryType=n.LW.LABEL,e.symbologyType=t.symbologyType,e.setVV(t.vvFlags,t),e.mapAligned=(0,r.NS)(t.placement),e.data}getVariation(){return{...super.getVariation(),vvSizeFieldStops:this.vvSizeFieldStops,vvSizeMinMaxValue:this.vvSizeMinMaxValue,vvSizeScaleStops:this.vvSizeScaleStops,vvSizeUnitValue:this.vvSizeUnitValue}}}b.shared=new b(0)},58195:(t,e,i)=>{i.d(e,{Nr:()=>w});var s=i(62357),r=i(45699),n=i(21106),o=i(4307),a=i(1265),l=i(30729),h=i(12142),c=i(87893);class u{constructor(t,e,i,s){this.center=(0,a.f)(t,e),this.centerT=(0,a.c)(),this.halfWidth=i/2,this.halfHeight=s/2,this.width=i,this.height=s}get x(){return this.center[0]}get y(){return this.center[1]}get blX(){return this.center[0]+this.halfWidth}get blY(){return this.center[1]+this.halfHeight}get trX(){return this.center[0]-this.halfWidth}get trY(){return this.center[1]-this.halfHeight}get xmin(){return this.x-this.halfWidth}get xmax(){return this.x+this.halfWidth}get ymin(){return this.y-this.halfHeight}get ymax(){return this.y+this.halfHeight}set x(t){this.center[0]=t}set y(t){this.center[1]=t}clone(){return new u(this.x,this.y,this.width,this.height)}serialize(t){return t.writeF32(this.center[0]),t.writeF32(this.center[1]),t.push(this.width),t.push(this.height),t}findCollisionDelta(t,e=4){const i=Math.abs(t.centerT[0]-this.centerT[0]),s=Math.abs(t.centerT[1]-this.centerT[1]),r=(t.halfWidth+this.halfWidth+e)/i,n=(t.halfHeight+this.halfHeight+e)/s,o=Math.min(r,n);return Math.log2(o)}extend(t){const e=Math.min(this.xmin,t.xmin),i=Math.min(this.ymin,t.ymin),s=Math.max(this.xmax,t.xmax)-e,r=Math.max(this.ymax,t.ymax)-i,n=e+s/2,o=i+r/2;this.width=s,this.height=r,this.halfWidth=s/2,this.halfHeight=r/2,this.x=n,this.y=o}static deserialize(t){const e=t.readF32(),i=t.readF32(),s=t.readInt32(),r=t.readInt32();return new u(e,i,s,r)}}const f=26,_=4,m=f+_,d=f-6,p=3,y=Math.PI/180;class g{constructor(t,e,i,s){this._rotationT=(0,n.c)(),this._xBounds=0,this._yBounds=0,this.minZoom=0,this.maxZoom=255,this._bounds=null;const r=i.rect,o=new Float32Array(8);t*=s,e*=s;const a=i.code?r.width*s:i.metrics.width,l=i.code?r.height*s:i.metrics.height;this.width=a,this.height=l,o[0]=t,o[1]=e,o[2]=t+a,o[3]=e,o[4]=t,o[5]=e+l,o[6]=t+a,o[7]=e+l,this._data=o,this._setTextureCoords(r),this._scale=s,this._mosaic=i,this.x=t,this.y=e,this.maxOffset=Math.max(t+a,e+l)}get mosaic(){return this._mosaic}set angle(t){this._angle=t,(0,r.b)(this._rotationT,-t),this._setOffsets(this._data)}get angle(){return this._angle}get xTopLeft(){return this._data[0]}get yTopLeft(){return this._data[1]}get xBottomRight(){return this._data[6]}get yBottomRight(){return this._data[7]}get texcoords(){return this._texcoords}get textureBinding(){return this._mosaic.textureBinding}get offsets(){return this._offsets||this._setOffsets(this._data),this._offsets}get char(){return String.fromCharCode(this._mosaic.code)}get code(){return this._mosaic.code}get bounds(){if(!this._bounds){const{height:t,width:e}=this._mosaic.metrics,i=e*this._scale,s=Math.abs(t)*this._scale,o=new Float32Array(8);o[0]=this.x,o[1]=this.y,o[2]=this.x+i,o[3]=this.y,o[4]=this.x,o[5]=this.y+s,o[6]=this.x+i,o[7]=this.y+s;const a=(0,r.m)((0,n.c)(),this._rotationT,this._transform);(0,n.t)(o,o,a);let l=1/0,h=1/0,c=0,f=0;for(let t=0;t<4;t++){const e=o[2*t],i=o[2*t+1];l=Math.min(l,e),h=Math.min(h,i),c=Math.max(c,e),f=Math.max(f,i)}const _=c-l,m=f-h,d=l+_/2,p=h+m/2;this._bounds=new u(d,p,_,m)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}_setOffsets(t){this._offsets||(this._offsets={upperLeft:0,upperRight:0,lowerLeft:0,lowerRight:0});const e=this._offsets,i=new Float32Array(8),s=(0,r.m)((0,n.c)(),this._rotationT,this._transform);(0,n.t)(i,t,s),e.upperLeft=(0,h.UJ)(8*i[0],8*i[1]),e.upperRight=(0,h.UJ)(8*i[2],8*i[3]),e.lowerLeft=(0,h.UJ)(8*i[4],8*i[5]),e.lowerRight=(0,h.UJ)(8*i[6],8*i[7])}_setTextureCoords({x:t,y:e,width:i,height:s}){this._texcoords={upperLeft:(0,h.UJ)(t,e),upperRight:(0,h.UJ)(t+i,e),lowerLeft:(0,h.UJ)(t,e+s),lowerRight:(0,h.UJ)(t+i,e+s)}}}const x=(t,e)=>({code:0,page:0,sdf:!0,rect:new c.Z(0,0,11,8),textureBinding:e,metrics:{advance:0,height:4,width:t,left:0,top:0}});function M(t,e){return t.forEach((t=>(0,o.t)(t,t,e))),{upperLeft:(0,h.UJ)(8*t[0][0],8*t[0][1]),upperRight:(0,h.UJ)(8*t[1][0],8*t[1][1]),lowerLeft:(0,h.UJ)(8*t[2][0],8*t[2][1]),lowerRight:(0,h.UJ)(8*t[3][0],8*t[3][1])}}class b{constructor(t,e,i){this._rotation=0,this._decorate(t,e,i),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=e.length>1,this._hasRotation=0!==i.angle,this._transform=this._createGlyphTransform(this.bounds,i),this._borderLineSize=i.borderLineSize,(i.borderLineSize||i.hasBackground)&&([this.bounds,this.background]=this.shapeBackground(this._transform));for(const e of t)e.setTransform(this._transform)}setRotation(t){if(0===t&&0===this._rotation)return;this._rotation=t;const e=this._transform,i=(0,r.b)((0,n.c)(),t);(0,r.m)(e,i,e);for(const t of this.glyphs)t.setTransform(this._transform)}_decorate(t,e,i){if(!i.decoration||"none"===i.decoration||!t.length)return;const s=i.scale,r="underline"===i.decoration?m:d,n=t[0].textureBinding;for(const i of e){const e=i.startX*s,o=i.startY*s,a=(i.width+i.glyphWidthEnd)*s;t.push(new g(e,o+r*s,x(a,n),1))}}shapeBackground(t){const{xmin:e,ymin:i,xmax:r,ymax:n,x:o,y:a,width:l,height:h}=this.bounds,c=Math.min(l,h)+16-1.5,f=(1.5+Math.min((0,s.F2)(this._borderLineSize||0),c))/2,_=this._borderLineSize?f:0,m=[e-8,i-8],d=[r+8,i-8],p=[e-8,n+8],y=[r+8,n+8],g=M([[m[0]-f,m[1]-f],[d[0]+f,d[1]-f],[m[0]+_,m[1]+_],[d[0]-_,d[1]+_]],t),x=M([[p[0]+_,p[1]-_],[y[0]-_,y[1]-_],[p[0]-f,p[1]+f],[y[0]+f,y[1]+f]],t),b=M([[m[0]-f,m[1]-f],[m[0]+_,m[1]+_],[p[0]-f,p[1]+f],[p[0]+_,p[1]-_]],t),v=M([[d[0]-_,d[1]+_],[d[0]+f,d[1]-f],[y[0]-_,y[1]-_],[y[0]+f,y[1]+f]],t),S={main:M([m,d,p,y],t),top:g,bot:x,left:b,right:v};return[new u(o,a,l+2*f,h+2*f),S]}get boundsT(){const t=this.bounds,e=(0,o.s)((0,a.c)(),t.x,t.y);if((0,o.t)(e,e,this._transform),this._hasRotation){const i=Math.max(t.width,t.height);return new u(e[0],e[1],i,i)}return new u(e[0],e[1],t.width,t.height)}_createBounds(t){let e=1/0,i=1/0,s=0,r=0;for(const n of t)e=Math.min(e,n.xTopLeft),i=Math.min(i,n.yTopLeft),s=Math.max(s,n.xBottomRight),r=Math.max(r,n.yBottomRight);const n=s-e,o=r-i;return new u(e+n/2,i+o/2,n,o)}_createGlyphTransform(t,e){const i=y*e.angle,s=(0,n.c)(),l=(0,a.c)();return(0,r.t)(s,s,(0,o.s)(l,e.xOffset,-e.yOffset)),e.isCIM?(0,r.r)(s,s,i):((0,r.t)(s,s,(0,o.s)(l,t.x,t.y)),(0,r.r)(s,s,i),(0,r.t)(s,s,(0,o.s)(l,-t.x,-t.y))),s}}class v{constructor(t,e,i,s,r,n){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(e,i)),this.end=Math.max(0,Math.max(e,i)),this.end<t.length&&(this.glyphWidthEnd=t[this.end].metrics.width),this.width=s,this.yMin=r,this.yMax=n}}const S=t=>10===t,P=t=>32===t;function w(t,e,i){const s=i.scale,r=new Array,n=function(t,e,i){const s=new Array,r=1/i.scale,n=i.maxLineWidth*r,o=e?t.length-1:0,a=e?-1:t.length,l=e?-1:1;let h=o,c=0,u=0,f=h,_=f,m=0,d=1/0,p=0;for(;h!==a;){const{code:e,metrics:i}=t[h],r=Math.abs(i.top);if(S(e)||P(e)||(d=Math.min(d,r),p=Math.max(p,r+i.height)),S(e))h!==o&&(s.push(new v(t,f,h-l,c,d,p)),d=1/0,p=0),c=0,f=h+l,_=h+l,u=0;else if(P(e))_=h+l,u=0,m=i.advance,c+=i.advance;else if(c>n){if(_!==f){const e=_-2*l;c-=m,s.push(new v(t,f,e,c-u,d,p)),d=1/0,p=0,f=_,c=u}else s.push(new v(t,f,h-l,c,d,p)),d=1/0,p=0,f=h,_=h,c=0;c+=i.advance,u+=i.advance}else c+=i.advance,u+=i.advance;h+=l}const y=new v(t,f,h-l,c,d,p);return y.start>=0&&y.end<t.length&&s.push(y),s}(t,e,i),o=function(t,e){let i=0;for(let e=0;e<t.length;e++){const{width:s}=t[e];i=Math.max(s,i)}const s="underline"===e.decoration?_:0,r=t[0].yMin;return{x:0,y:r,height:t[t.length-1].yMax+e.lineHeight*(t.length-1)+s-r,width:i}}(n,i),{vAlign:a,hAlign:h}=i,c=a===l.TR.Baseline?1:0,u=c?0:a-1,m=(1-c)*-o.y+u*(o.height/2)+(c?1:0)*-f;for(let e=0;e<n.length;e++){const{start:o,end:a,width:l}=n[e];let c=-1*(h+1)*(l/2)-p;const u=e*i.lineHeight+m-p;n[e].startX=c,n[e].startY=u;for(let e=o;e<=a;e++){const i=t[e];if(S(i.code))continue;const n=new g(c+i.metrics.left,u-i.metrics.top,i,s);c+=i.metrics.advance,r.push(n)}}return new b(r,n,i)}},47988:(t,e,i)=>{i.d(e,{Z:()=>l});var s=i(43697),r=i(92036),n=i(5600),o=(i(75215),i(67676),i(80442),i(52011));let a=class extends r.Z{initialize(){}destroy(){}get supportsTileUpdates(){return!1}get spatialReference(){const t=this.tileStore.tileScheme.spatialReference;return t&&t.toJSON()||null}};(0,s._)([(0,n.Cb)({readOnly:!0})],a.prototype,"supportsTileUpdates",null),(0,s._)([(0,n.Cb)({constructOnly:!0})],a.prototype,"remoteClient",void 0),(0,s._)([(0,n.Cb)({constructOnly:!0})],a.prototype,"service",void 0),(0,s._)([(0,n.Cb)()],a.prototype,"spatialReference",null),(0,s._)([(0,n.Cb)({constructOnly:!0})],a.prototype,"tileInfo",void 0),(0,s._)([(0,n.Cb)({constructOnly:!0})],a.prototype,"tileStore",void 0),a=(0,s._)([(0,o.j)("esri.views.2d.layers.features.processors.BaseProcessor")],a);const l=a},60951:(t,e,i)=>{i.r(e),i.d(e,{default:()=>Ni});var s=i(43697),r=i(83798),n=i(20102),o=(i(80442),i(92604)),a=i(70586),l=i(95330),h=(i(75215),i(67676)),c=i(52011),u=i(22862),f=i(82971),_=i(61027),m=i(66039),d=(i(83068),i(55415)),p=i(92036),y=i(5600),g=i(4307),x=i(79384);const M=new Set,b=[],v=new Map,S=[0,0];let P=class extends p.Z{constructor(t){super(t),this._keyToItem=new Map,this.concurrency=6,this.strategy="scale-first",this.tileInfoView=null}initialize(){const{concurrency:t,process:e,strategy:i}=this;this._queue=new x.e({concurrency:t,process:(t,i)=>{const s=this._keyToItem.get(t);return e(s,{signal:i})},peeker:"scale-first"===i?t=>this._peekByScaleFirst(t):t=>this._peekByCenterFirst(t)})}destroy(){this.clear(),this._queue=(0,a.SC)(this._queue)}get length(){return this._queue?this._queue.length:0}get onGoingCount(){return this._keyToItem.size}abort(t){const e="string"==typeof t?t:t.id;this._queue.abort(e)}clear(){this._queue.clear(),this._keyToItem.clear()}has(t){return"string"==typeof t?this._keyToItem.has(t):this._keyToItem.has(t.id)}isOngoing(t){const e="string"==typeof t?t:t.id;return this.has(e)&&this._queue.isOngoing(e)}pause(){this._queue.pause()}push(t){const e=t.key.id;if(this._queue.has(e))return this._queue.get(e);const i=this._queue.push(e),s=()=>{this._keyToItem.delete(e)};return this._keyToItem.set(e,t),i.then(s,s),i}reset(){this._queue.reset()}resume(){this._queue.resume()}_peekByScaleFirst(t){if(!this.state)return t.values().next().value;const e=this.tileInfoView;let i=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY;t.forEach((t=>{const e=this._keyToItem.get(t),r=this.tileInfoView.getTileScale(e.key);v.has(r)||(v.set(r,[]),i=Math.max(r,i),s=Math.min(r,s)),v.get(r).push(e.key),M.add(r)}));let r=this.state.scale;v.has(r)||(function(t,e){t.length=0,e.forEach((e=>t.push(e)))}(b,M),b.sort(((t,e)=>t-e)),r=b.reduce(((t,e)=>Math.abs(e-r)<Math.abs(t-r)?e:t),b[0])),r=Math.min(r,i),r=Math.max(r,s);const n=v.get(r),o=e.getClosestInfoForScale(r),a=o.getColumnForX(this.state.center[0]),l=o.getRowForY(this.state.center[1]);return n.sort(((t,e)=>{const i=o.denormalizeCol(t.col,t.world),s=o.denormalizeCol(e.col,e.world);return Math.sqrt((a-i)*(a-i)+(l-t.row)*(l-t.row))-Math.sqrt((a-s)*(a-s)+(l-e.row)*(l-e.row))})),M.clear(),v.clear(),n[0].id}_peekByCenterFirst(t){if(!this.state)return t.values().next().value;const e=this.tileInfoView,i=this.state.center;let s,r=Number.POSITIVE_INFINITY;return t.forEach((t=>{const n=this._keyToItem.get(t);e.getTileCoords(S,n.key);const o=(0,g.d)(S,i);o<r&&(r=o,s=n.key)})),s.id}};(0,s._)([(0,y.Cb)({constructOnly:!0})],P.prototype,"concurrency",void 0),(0,s._)([(0,y.Cb)({constructOnly:!0})],P.prototype,"process",void 0),(0,s._)([(0,y.Cb)()],P.prototype,"state",void 0),(0,s._)([(0,y.Cb)({constructOnly:!0})],P.prototype,"strategy",void 0),(0,s._)([(0,y.Cb)({constructOnly:!0})],P.prototype,"tileInfoView",void 0),P=(0,s._)([(0,c.j)("esri.views.2d.tiling.TileQueue")],P),i(24470),i(67524),new d.Z(0,0,0,0),new Map;var w=i(16534),C=i(26899);const L=new Map;L.set(m.LW.MARKER,{multiplier:1,indicesPerRecord:6,verticesPerRecord:4}),L.set(m.LW.LINE,{multiplier:1,indicesPerRecord:24,verticesPerRecord:8}),L.set(m.LW.FILL,{multiplier:1,indicesPerRecord:10,verticesPerRecord:10}),L.set(m.LW.TEXT,{multiplier:8,indicesPerRecord:6,verticesPerRecord:4}),L.set(m.LW.LABEL,{multiplier:8,indicesPerRecord:6,verticesPerRecord:4});class k{get length(){return this._pos}constructor(t,e){this._pos=0;const i=e?this._roundToNearest(e,t.BYTES_PER_ELEMENT):40;this._array=new ArrayBuffer(i),this._buffer=new t(this._array),this._ctor=t,this._i16View=new Int16Array(this._array)}_roundToNearest(t,e){const i=Math.round(t);return 1===e?i:i+(e-i%e)}_ensureSize(t){if(this._pos+t>=this._buffer.length){const e=this._roundToNearest(1.25*(this._array.byteLength+t*this._buffer.BYTES_PER_ELEMENT),this._buffer.BYTES_PER_ELEMENT),i=new ArrayBuffer(e),s=new this._ctor(i);s.set(this._buffer,0),this._array=i,this._buffer=s,this._i16View=new Int16Array(this._array)}}ensureSize(t){this._ensureSize(t)}writeF32(t){this._ensureSize(1);const e=this._pos;return new Float32Array(this._array,4*this._pos,1)[0]=t,this._pos++,e}push(t){this._ensureSize(1);const e=this._pos;return this._buffer[this._pos++]=t,e}writeFixed(t){this._buffer[this._pos++]=t}setValue(t,e){this._buffer[t]=e}i1616Add(t,e,i){this._i16View[2*t]+=e,this._i16View[2*t+1]+=i}getValue(t){return this._buffer[t]}incr(t){if(this._buffer.length<t)throw new Error("Increment index overflows the target buffer");this._buffer[t]++}decr(t){this._buffer[t]--}writeRegion(t){this._ensureSize(t.length);const e=this._pos;return this._buffer.set(t,this._pos),this._pos+=t.length,e}writeManyFrom(t,e,i){this._ensureSize(i-e);for(let s=e;s!==i;s++)this.writeFixed(t._buffer[s])}buffer(){const t=this._array.slice(0,4*this._pos);return this.destroy(),t}toArray(){return[...this._buffer]}seek(t){this._pos=t}destroy(){this._array=null,this._buffer=null}}class I{constructor(t,e,i){this._start={index:0,vertex:0};const s=function(t,e,i){const{indicesPerRecord:s,multiplier:r,verticesPerRecord:n}=L.get(t);return{recordBytes:i*w.T3*Uint32Array.BYTES_PER_ELEMENT,indexBytes:r*s*i*Uint32Array.BYTES_PER_ELEMENT,vertexBytes:r*n*i*e}}(t,e,i),r=e/4;this.geometryType=t,this._records=new k(Int32Array,s.recordBytes),this._indices=new k(Uint32Array,s.indexBytes),this._vertices=new k(Uint32Array,s.vertexBytes),this._metrics=new k(Float32Array,0),this._strideInt=r}serialize(t){const e=this._records.buffer(),i=this._indices.buffer(),s=this._vertices.buffer(),r=this._metrics.length?this._metrics.buffer():null,n=4*this._strideInt;return t.push(e,i,s),{stride:n,records:e,indices:i,vertices:s,metrics:r}}get strideInt(){return this._strideInt}get recordCount(){return this._records.length/w.T3}get vertexCount(){return this._vertices.length/this._strideInt}get indexCount(){return this._indices.length}get indexWriter(){return this._indices}get vertexWriter(){return this._vertices}get metricWriter(){return this._metrics}vertexEnsureSize(t){this._vertices.ensureSize(t)}indexEnsureSize(t){this._indices.ensureSize(t)}recordStart(){this._start.index=this._indices.length,this._start.vertex=this._vertices.length}recordEnd(t,e,i,s,r,n,o,a){this._records.push(t),this._records.push(e??0),this._records.push(i),this._records.push(s),this._records.push(r),this._records.push(n),this._records.push(o),this._records.writeF32(a)}writeIndex(t){this._indices.push(t)}writeVertex(t){this._vertices.push(t)}writeVertexF32(t){this._vertices.writeF32(t)}copyLastFrom(t,e,i){const s=t._records.length-w.T3,r=t._records.getValue(s),n=t._records.getValue(s+1),o=t._records.getValue(s+2),a=t._records.getValue(s+4),l=t._records.getValue(s+6),h=t._records.getValue(s+7),c=this._vertices.length,u=(t._start.vertex-this._vertices.length)/this._strideInt,f=this._indices.length,_=this.vertexCount;for(let e=t._start.index;e!==t._indices.length;e++){const i=t._indices.getValue(e);this._indices.push(i-u)}for(let e=t._start.vertex;e!==t._vertices.length;e++){const i=t._vertices.getValue(e);this._vertices.push(i)}for(let t=c;t<=this._vertices.length;t+=this._strideInt)this._vertices.i1616Add(t,e,i);this._records.push(r),this._records.push(n),this._records.push(o),this._records.push(f),this._records.push(a),this._records.push(_),this._records.push(l),this._records.push(h)}}var z=i(14867);function T(t){switch(t){case 1:case 8:case 32:return-1;case 2:case 64:return 0;case 4:case 16:case 128:return 1}}function O(t){switch(t){case 1:case 2:case 4:return-1;case 8:case 16:return 0;case 32:case 64:case 128:return 1}}class A{constructor(t,e,i,s,r,n=0){this._hasAggregate=!1,this.hasRecords=!1,this._data={self:new Map,neighbors:new Array},this._version=0,this._current={geometryType:0,writer:null,overlaps:0,start:0,insertAfter:0,sortKey:0,id:0,materialKey:0,indexStart:0,vertStart:0,isDotDensity:!1,bufferingEnabled:!1,metricBoxLenPointer:0},this.hint=e,this.tileKey=t,this._hasAggregate=s,this._pixelBufferEnabled=r,this._version=n,this._symbologyType=i}get hasAggregates(){return this._hasAggregate}get hasPixelBufferEnabled(){return this._pixelBufferEnabled}serialize(t){const e=[];return e.push(this._serializeTileVertexData(this.tileKey,this.tileKey,this._data.self)),this._data.neighbors.forEach(((i,s)=>{const r=1<<s,n=T(r),o=O(r),a=(0,z.M)(new d.Z(this.tileKey),n,o,t),l=this._serializeTileVertexData(this.tileKey,a.id,i.vertexData);l.message.bufferIds=i.displayIds,e.push(l)})),e}_serializeTileVertexData(t,e,i){const s=new Array;return{message:{tileKeyOrigin:t,tileKey:e,data:{[m.LW.MARKER]:i.get(m.LW.MARKER)?.serialize(s),[m.LW.FILL]:i.get(m.LW.FILL)?.serialize(s),[m.LW.LINE]:i.get(m.LW.LINE)?.serialize(s),[m.LW.TEXT]:i.get(m.LW.TEXT)?.serialize(s),[m.LW.LABEL]:i.get(m.LW.LABEL)?.serialize(s)},version:this._version},transferList:s}}featureStart(t,e){this._current.insertAfter=t,this._current.sortKey=e}featureEnd(){}recordStart(t,e,i,s){this._current.writer=this._getVertexWriter(i),this._current.overlaps=0,this._current.indexStart=this._current.writer.indexCount,this._current.vertStart=this._current.writer.vertexCount,this._current.bufferingEnabled=s,this._current.id=t,this._current.materialKey=e,this._current.geometryType=i,this._current.isDotDensity=!1,this._current.writer.recordStart()}recordCount(){return this._current.writer.recordCount}vertexCount(){return this._current.writer.vertexCount}indexCount(){return this._current.writer.indexCount}vertexEnsureSize(t){this._current.writer.vertexEnsureSize(t)}indexEnsureSize(t){this._current.writer.indexEnsureSize(t)}vertexBounds(t,e,i,s){this._current.bufferingEnabled&&this._addOverlap(t,e,i,s)}vertexWrite(t){this._current.writer.writeVertex(t)}vertexWriteF32(t){this._current.writer.writeVertexF32(t)}vertexEnd(){}vertexWriter(){return this._current.writer.vertexWriter}indexWrite(t){this._current.writer.writeIndex(t)}indexWriter(){return this._current.writer.indexWriter}metricWriter(){return this._current.writer.metricWriter}metricStart(t,e,i,s,r,n,o,a){this._current.writer=this._getVertexWriter(m.LW.LABEL);const l=this._current.writer.metricWriter;l.push((0,_.jL)(t)),l.push(e),l.push(i),l.push(s),l.push(r),l.push(n),l.push(o),l.push(a),l.push(255),this._current.metricBoxLenPointer=l.push(0)}metricEnd(){const t=this._current.writer.metricWriter;0===t.getValue(this._current.metricBoxLenPointer)&&t.seek(t.length-10)}metricBoxWrite(t,e,i,s){const r=this._current.writer.metricWriter;r.incr(this._current.metricBoxLenPointer),r.push(0),r.push(0),r.push(t),r.push(e),r.push(i),r.push(s)}recordEnd(){const t=this._current.vertStart,e=this._current.writer.vertexCount-t;if(!e)return!1;this.hasRecords=!0;const i=this._current.indexStart,s=this._current.writer.indexCount-i;if(this._current.writer.recordEnd(this._current.id,this._current.materialKey,this._current.insertAfter,i,s,t,e,this._current.sortKey),!this._pixelBufferEnabled||this._hasAggregate||0===this._current.overlaps||this._current.geometryType===m.LW.LABEL)return!0;const r=this._current.writer;for(let t=0;t<8;t++){const e=1<<t;if(this._current.overlaps&e){this._data.neighbors[t]||(this._data.neighbors[t]={vertexData:new Map,displayIds:new Set});const i=this._data.neighbors[t],s=this._current.geometryType;if(!i.vertexData.has(s)){const t=(0,C.$_)(s,this._symbologyType).geometry,e=new I(s,t,w.Cj);i.vertexData.set(s,e)}const n=i.vertexData.get(this._current.geometryType),o=8,a=512*-T(e)*o,l=512*-O(e)*o;n?.copyLastFrom(r,a,l),i.displayIds.add(this._current.id)}}return!0}_addOverlap(t,e,i,s){const r=255^((t<0+i?148:t>=w.i9-i?41:189)|(e<0+s?224:e>=w.i9-s?7:231));this._current.overlaps|=r}_getVertexWriter(t){if(!this._data.self.has(t)){const e=this._data.self,i=(0,C.$_)(t,this._symbologyType).geometry;e.set(t,new I(t,i,this.hint.records))}return this._data.self.get(t)}}var E=i(65390),F=i(22021),N=i(62357),R=i(45699),W=i(21106),V=i(95648),G=i(30729),D=i(37720),B=i(12142),X=i(63523);const U=100;function H(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function J(t,e){return Math.sqrt(t*t+e*e)}function Y(t){const e=J(t[0],t[1]);t[0]/=e,t[1]/=e}function Z(t,e){return J(t[0]-e[0],t[1]-e[1])}function K(t=2){return 1/Math.max(t,1)}function q(t,e){return[!!t?.minScale&&e.scaleToZoom(t.minScale)||0,!!t?.maxScale&&e.scaleToZoom(t.maxScale)||U]}function $(t){return t.length-1}function j(t,e,i=1){const[s,r]=function(t,e){return t[e+1]}(t,e);return Math.sqrt(s*s+r*r)*i}class Q{constructor(t,e,i,s,r){this._segments=t,this._index=e,this._distance=i,this._xStart=s,this._yStart=r,this._done=!1}static create(t){return new Q(t,0,0,t[0][0],t[0][1])}clone(){return new Q(this._segments,this._index,this._distance,this.xStart,this.yStart)}equals(t){return this._index===t._index||t._index===this._index-1&&(0===this._distance||1===t._distance)||t._index===this._index+1&&(1===this._distance||0===t._distance)}leq(t){return this._index<t._index||this._index===t._index&&this._distance<=t._distance}geq(t){return this._index>t._index||this._index===t._index&&this._distance>=t._distance}get _segment(){return this._segments[this._index+1]}get angle(){const t=this.dy,e=(0*t+-1*-this.dx)/(1*this.length);let i=Math.acos(e);return t>0&&(i=2*Math.PI-i),i}get xStart(){return this._xStart}get yStart(){return this._yStart}get x(){return this.xStart+this.distance*this.dx}get y(){return this.yStart+this.distance*this.dy}get dx(){return this._segment[0]}get dy(){return this._segment[1]}get xMidpoint(){return this.xStart+.5*this.dx}get yMidpoint(){return this.yStart+.5*this.dy}get xEnd(){return this.xStart+this.dx}get yEnd(){return this.yStart+this.dy}get length(){const{dx:t,dy:e}=this;return Math.sqrt(t*t+e*e)}get remainingLength(){return this.length*(1-this._distance)}get backwardLength(){return this.length*this._distance}get distance(){return this._distance}get done(){return this._done}hasPrev(){return this._index-1>=0}hasNext(){return this._index+1<$(this._segments)}next(){return this.hasNext()?(this._xStart+=this.dx,this._yStart+=this.dy,this._distance=0,this._index+=1,this):null}prev(){return this.hasPrev()?(this._index-=1,this._xStart-=this.dx,this._yStart-=this.dy,this._distance=1,this):(this._done=!0,null)}_seekBackwards(t,e){const i=this.backwardLength;if(t<=i)return this._distance=(i-t)/this.length,this;let s=this.backwardLength;for(;this.prev();){if(s+this.length>t)return this._seekBackwards(t-s);s+=this.length}return this._distance=0,e?this:null}seek(t,e=!1){if(t<0)return this._seekBackwards(Math.abs(t),e);if(t<=this.remainingLength)return this._distance=(this.backwardLength+t)/this.length,this;let i=this.remainingLength;for(;this.next();){if(i+this.length>t)return this.seek(t-i,e);i+=this.length}return this._distance=1,e?this:null}}function tt(t,e,i,s=!0){const r=function(t){let e=0;for(let i=0;i<$(t);i++)e+=j(t,i);return e}(t),n=Q.create(t),o=r/2;if(!s)return n.seek(o),void i(n.clone(),0,o+0*e,r);const a=Math.max((r-e)/2,0),l=Math.floor(a/e),h=o-l*e;n.seek(h);for(let t=-l;t<=l;t++)n.x<512&&n.x>=0&&n.y<512&&n.y>=0&&i(n.clone(),t,o+t*e,r),n.seek(e)}function et(t,e){const i=1e-6;if(e<=0)return;const s=t.length;if(s<3)return;const r=[];let n=0;r.push(0);for(let e=1;e<s;e++)n+=Z(t[e],t[e-1]),r.push(n);e=Math.min(e,.2*n);const o=[];o.push(t[0][0]),o.push(t[0][1]);const a=t[s-1][0],l=t[s-1][1],h=H([0,0],t[0],t[1]);Y(h),t[0][0]+=e*h[0],t[0][1]+=e*h[1],H(h,t[s-1],t[s-2]),Y(h),t[s-1][0]+=e*h[0],t[s-1][1]+=e*h[1];for(let t=1;t<s;t++)r[t]+=e;r[s-1]+=e;const c=.5*e;for(let n=1;n<s-1;n++){let a=0,l=0,h=0;for(let s=n-1;s>=0&&!(r[s+1]<r[n]-c);s--){const o=c+r[s+1]-r[n],u=r[s+1]-r[s],f=r[n]-r[s]<c?1:o/u;if(Math.abs(f)<i)break;const _=f*f,m=f*o-.5*_*u,d=f*u/e,p=t[s+1],y=t[s][0]-p[0],g=t[s][1]-p[1];a+=d/m*(p[0]*f*o+.5*_*(o*y-u*p[0])-_*f*u*y/3),l+=d/m*(p[1]*f*o+.5*_*(o*g-u*p[1])-_*f*u*g/3),h+=d}for(let o=n+1;o<s&&!(r[o-1]>r[n]+c);o++){const s=c-r[o-1]+r[n],u=r[o]-r[o-1],f=r[o]-r[n]<c?1:s/u;if(Math.abs(f)<i)break;const _=f*f,m=f*s-.5*_*u,d=f*u/e,p=t[o-1],y=t[o][0]-p[0],g=t[o][1]-p[1];a+=d/m*(p[0]*f*s+.5*_*(s*y-u*p[0])-_*f*u*y/3),l+=d/m*(p[1]*f*s+.5*_*(s*g-u*p[1])-_*f*u*g/3),h+=d}o.push(a/h),o.push(l/h)}o.push(a),o.push(l);for(let e=0,i=0;e<s;e++)t[e][0]=o[i++],t[e][1]=o[i++]}var it=i(58835),st=i(26145);class rt{static getPlacement(t,e,i,s,r,n){const o=(0,st.W)(i);return o?(-1===e&&t.invertY(),o.execute(t,i,s,r,n)):null}}var nt=i(58195);const ot=(0,B.UJ)(4,4),at=(0,B.UJ)(16,4),lt=(0,B.UJ)(4,2),ht=(0,B.UJ)(4,6),ct=[lt,lt,ht,ht],ut=[lt,ht,lt,ht],ft=[ht,ht,ot,ot],_t=[ot,ot,ht,ht],mt=[ht,ot,ht,ot],dt=[ot,ht,ot,ht],pt=t=>class extends t{constructor(...t){super(...t),this._isCIM=!1,this._vertexBoundsScale=1,this.geometryType=m.LW.TEXT,this._aux=(0,B.Jz)(0,0,this._referenceSize,this._bitset)}bindTextInfo(t,e){this._shapingInfo=t?.length?(0,nt.Nr)(t,e,{scale:this._scale,angle:this._angle,xOffset:this._xOffset,yOffset:this._yOffset,hAlign:this._xAlignD,vAlign:this._yAlignD,maxLineWidth:Math.max(32,Math.min(this._lineWidth,512)),lineHeight:w.uk*Math.max(.25,Math.min(this._lineHeight,4)),decoration:this._decoration,isCIM:this._isCIM,hasBackground:!!this._backgroundColor,borderLineSize:this._borderLineSize}):null}_write(t,e,i,s){const r=e.getDisplayId();this._writeGeometry(t,e,r,i,s)}_writeGeometry(t,e,i,s,r){const n=this._shapingInfo;if(null==n)return;if(this._textPlacement)return this._writePlacedText(t,i,n,s,e,r);const o=r?r.asOptimized():"esriGeometryPolygon"===e.geometryType?e.readCentroid():e.readGeometryForDisplay();if(null!=o){if(o.isPoint){const[e,s]=o.coords;if(!t.hasAggregates&&t.hasPixelBufferEnabled&&(e<0||e>=512||s<0||s>=512))return;return this._writeGlyphs(t,i,{x:e,y:s},n)}o.forEachVertex(((e,s)=>this._writeGlyphs(t,i,{x:e,y:s},n)))}}_writePlacedText(t,e,i,s,r,n){const o=this._textPlacement,a=n||it.z.fromFeatureSetReaderCIM(r);if(!a)return;const l=rt.getPlacement(a,-1,o,(0,N.F2)(1),t.tileKey,s.geometryEngine);if(!l)return;const h=i.bounds,c=Math.sqrt(h.height*h.height+h.width*h.width);let u,f,_;for(;u=l.next();)if(f=u.tx,_=-u.ty,f+c>=0&&f-c<512&&_+c>=0&&_-c<512){const s=-u.getAngle();i.setRotation(s),this._writeGlyphs(t,e,{x:f,y:_},i),i.setRotation(-s)}}_writeGlyphs(t,e,i,s){const r=X.m2.load(this._materialKey),n=(0,B.UJ)(Math.round(8*i.x),Math.round(8*i.y)),o=this._vertexBoundsScale,{bounds:a,background:l,glyphs:h}=s;h.length>0&&(this._borderLineColor||this._backgroundColor)&&(r.textureBinding=h[0].textureBinding,t.recordStart(e,r.data,this.geometryType,!0),this._writeBackgroundGeometry(t,e,i,a,l),t.recordEnd());const c=2*Math.max(a.width,a.height);for(const l of s.glyphs)r.textureBinding=l.textureBinding,t.recordStart(e,r.data,this.geometryType,!0),t.vertexBounds(i.x+a.x+this._xOffset,i.y+a.y-this._yOffset,c*o,c*o),this._writeVertices(t,e,n,l),t.recordEnd()}_writeGlyph(t,e,i,s,r){const n=X.m2.load(this._materialKey),o=(0,B.UJ)(Math.round(8*i),Math.round(8*s));n.textureBinding=r.textureBinding,t.recordStart(e,n.data,this.geometryType,!0);const a=r.bounds,l=this._vertexBoundsScale;t.vertexBounds(i+a.x*l,s+a.y*l,a.width*l,a.height*l),this._writeVertices(t,e,o,r),t.recordEnd()}_writeVertices(t,e,i,s){const r=t.vertexCount();this._writeVertexCommon(t,e,i,s),t.vertexWrite(s.offsets.upperLeft),t.vertexWrite(s.texcoords.upperLeft),t.vertexEnd(),this._writeVertexCommon(t,e,i,s),t.vertexWrite(s.offsets.upperRight),t.vertexWrite(s.texcoords.upperRight),t.vertexEnd(),this._writeVertexCommon(t,e,i,s),t.vertexWrite(s.offsets.lowerLeft),t.vertexWrite(s.texcoords.lowerLeft),t.vertexEnd(),this._writeVertexCommon(t,e,i,s),t.vertexWrite(s.offsets.lowerRight),t.vertexWrite(s.texcoords.lowerRight),t.vertexEnd(),t.indexWrite(r+0),t.indexWrite(r+1),t.indexWrite(r+2),t.indexWrite(r+1),t.indexWrite(r+3),t.indexWrite(r+2)}_writeVertexCommon(t,e,i,s){const r=this._color,n=this._haloColor,o=(0,B.Jz)(0,0,this._referenceSize,this._bitset),a=(0,B.Jz)(0,0,this._size,this._haloSize);t.vertexWrite(i),t.vertexWrite(e),t.vertexWrite(r),t.vertexWrite(n),t.vertexWrite(a),t.vertexWrite(o),t.vertexWrite(this._minMaxZoom)}_writeBackgroundVertex(t,e,i,s,r,n){const o=(0,B.Jz)(0,1,this._referenceSize,this._bitset),a=(0,B.Jz)(0,0,this._size,this._haloSize),l=(0,B.Jz)(0,0,0,0);t.vertexWrite(i),t.vertexWrite(e),t.vertexWrite(s),t.vertexWrite(l),t.vertexWrite(a),t.vertexWrite(o),t.vertexWrite(this._minMaxZoom),t.vertexWrite(r),t.vertexWrite(n),t.vertexEnd()}_writeBackgroundQuad(t,e,i,s,r,n){const o=t.vertexCount();this._writeBackgroundVertex(t,e,i,s,r.upperLeft,n[0]),this._writeBackgroundVertex(t,e,i,s,r.upperRight,n[1]),this._writeBackgroundVertex(t,e,i,s,r.lowerLeft,n[2]),this._writeBackgroundVertex(t,e,i,s,r.lowerRight,n[3]),t.indexWrite(o+0),t.indexWrite(o+1),t.indexWrite(o+2),t.indexWrite(o+1),t.indexWrite(o+3),t.indexWrite(o+2)}_writeBackgroundGeometry(t,e,i,s,r){const n=(0,B.UJ)(Math.round(8*i.x),Math.round(8*i.y)),{x:o,y:a,width:l,height:h}=s,c=2*Math.max(l,h);if(t.vertexBounds(i.x+o+this._xOffset,i.y+a-this._yOffset,c*this._vertexBoundsScale,c*this._vertexBoundsScale),this._backgroundColor){const i=[at,at,at,at];this._writeBackgroundQuad(t,e,n,this._backgroundColor,r.main,i)}if(this._borderLineColor||this._backgroundColor){const i=!!this._borderLineColor&&!!this._borderLineSize&&this._borderLineSize>0,[s,o,a,l,h]=i?[ct,ct,ut,ut,this._borderLineColor]:[ft,_t,mt,dt,this._backgroundColor];this._writeBackgroundQuad(t,e,n,h,r.top,s),this._writeBackgroundQuad(t,e,n,h,r.bot,o),this._writeBackgroundQuad(t,e,n,h,r.left,a),this._writeBackgroundQuad(t,e,n,h,r.right,l)}}};var yt=i(95961),gt=i(21793),xt=i(54432);class Mt{static executeEffects(t,e,i,s){const r=(0,xt.Tg)(t);let n=new gt.z(e);for(const e of t){const t=(0,st.h)(e);t&&(n=t.execute(n,e,1.3333333333333333,i,s,r))}return n}static applyEffects(t,e,i){if(!t)return e;const s=(0,xt.Tg)(t);let r,n=new gt.z(it.z.fromJSONCIM(e));for(const e of t){const t=(0,st.h)(e);t&&(n=t.execute(n,e,1,null,i,s))}const o=[];let a=null;for(;r=n.next();)o.push(...(0,yt.M)(r)),a=r.geometryType;return 0===o.length||null===a?null:"esriGeometryPolygon"===a?{rings:o}:{paths:o}}}class bt{constructor(){this._materialKey=null}bindFeature(t,e,i){}write(t,e,i,s){if(this._effects&&this._effects.length>0){let i=it.z.fromFeatureSetReaderCIM(e);if(i){i.invertY();const r=Mt.executeEffects(this._effects,i,t.tileKey,s.geometryEngine);for(;i=r.next();)i.invertY(),this._write(t,e,s,i)}}else this._write(t,e,s)}_write(t,e,i,s){}}class vt extends(pt(bt)){constructor(t,e,i,s,r,n,o,a,l,h,c,u,f,_,m,d,p,y,g,x,M,b,v,S){super(),this._xOffset=(0,N.F2)(f),this._yOffset=(0,N.F2)(_),this._decoration=h||"none",this._backgroundColor=b,this._borderLineColor=v,this._borderLineSize=S,this._color=r,this._haloColor=n,this._haloSize=Math.min(Math.floor(5*(0,N.F2)((0,N.t_)(i))),127),this._size=Math.min(Math.round((0,N.F2)(e)),127);const P=Math.min(Math.round((0,N.F2)(s||e)),127);this._referenceSize=Math.round(Math.sqrt(256*P)),this._scale=this._size/w.iD,this._angle=u,this._justify=(0,G.Hd)(o||"center"),this._xAlignD=(0,G.kH)(o||"center"),this._yAlignD=(0,G.b7)(a||"baseline"),this._baseline="baseline"===(a||"baseline"),this._bitset=(l===V.v2.MAP?1:0)|(c?1:0)<<1;const C=X.m2.load(t);C.sdf=!0,this._materialKey=C.data,this._lineWidth=(0,N.F2)(m)||512,this._lineHeight=d||1,this._textPlacement=p,this._effects=y,this._isCIM=g??!1,this._minMaxZoom=(0,B.UJ)(Math.round(x*w.JS),Math.round(M*w.JS))}static fromText(t,e){const i=t.font?.size,s=new vt(t.materialKey,i,t.haloSize||0,i,t.color&&(0,D.aH)(t.color)||0,t.haloColor&&(0,D.aH)(t.haloColor)||0,t.horizontalAlignment,t.verticalAlignment,V.v2.SCREEN,t.font?.decoration,!1,t.angle||0,t.xoffset||0,t.yoffset||0,t.lineWidth||0,t.lineHeight||0,null,null,!1,0,U,t.backgroundColor&&(0,D.aH)(t.backgroundColor),t.borderLineColor&&(0,D.aH)(t.borderLineColor),t.borderLineSize),[,n]=(0,r.E)(t.text);return s.bindTextInfo(e??[],n),s._vertexBoundsScale=t.maxVVSize&&i?t.maxVVSize/i:1,s}static fromCIMText(t,e,i){const s=t.scaleFactor||1,n=t.size*t.sizeRatio*s,[o,a]=q(t.scaleInfo,i),l=new vt(t.materialKey,n,t.outlineSize*t.sizeRatio,t.referenceSize,(0,D.t2)(t.color),(0,D.t2)(t.outlineColor),t.horizontalAlignment,t.verticalAlignment,t.alignment,t.decoration,t.colorLocked??!1,t.angle,t.offsetX*t.sizeRatio*s,t.offsetY*t.sizeRatio*s,t.lineWidth||512,1,t.markerPlacement,t.effects,!0,o,a,t.backgroundColor?(0,D.t2)(t.backgroundColor):void 0,t.borderLineColor?(0,D.t2)(t.borderLineColor):void 0,t.borderLineWidth),[,h]=(0,r.E)(t.text);return l.bindTextInfo(e,h),l._vertexBoundsScale=t.maxVVSize?t.maxVVSize/n:1,l}}const St=o.Z.getLogger("esri.views.2d.engine.webgl.WGLLabelTemplate"),Pt=function(t){const e=new Map;return t=>(e.has(t)||e.set(t,(t=>{let e=0;if(0===t)return 1/0;for(;!(t%2);)e++,t/=2;return e})(t)),e.get(t))}(),wt=t=>Math.floor(127*t+127),Ct=t=>Math.floor(t*w.JS),Lt=t=>Math.round(t*(254/360));class kt extends vt{constructor(t,e,i,s){super(t,i.font?.size,i.haloSize||0,i.font?.size,i.color&&(0,D.aH)(i.color)||0,i.haloColor&&(0,D.aH)(i.haloColor)||0,i.horizontalAlignment,i.verticalAlignment,(0,G.NS)(e.labelPlacement)?V.v2.MAP:V.v2.SCREEN,i.font?.decoration,!1,i.angle||0,i.xoffset,i.yoffset,i.lineWidth,i.lineHeight,null,null,!1,null,null,i.backgroundColor&&(0,D.aH)(i.backgroundColor),i.borderLineColor&&(0,D.aH)(i.borderLineColor),i.borderLineSize),this._outLineLabelAngle=0,this._refPlacementPadding=0,this._refPlacementDirX=0,this._refPlacementDirY=0,this._refOffsetX=0,this._refOffsetY=0,this._zoomLevel=0,this.geometryType=m.LW.LABEL,this._allowOverrun=e.allowOverrun??!1,this._repeatLabel=e.repeatLabel??!0,this._labelPosition=e.labelPosition??"curved";const r=function(t,e){const i=!!t.minScale&&e.scaleToZoom(t.minScale)||0;return(0,F.uZ)(i,0,25.5)}(e,s),n=function(t,e){const i=!!t.maxScale&&e.scaleToZoom(t.maxScale)||255;return(0,F.uZ)(i,0,25.5)}(e,s),o=e.labelPlacement,[a,l]=(0,G.qv)(o);this._xAlignD=a,this._yAlignD=l,this._minZoom=r,this._maxZoom=n,this._minBackgroundZoom=r,this._maxBackgroundZoom=n,this._refPlacementPadding=(0,N.F2)(i.haloSize)+w.XT,this._repeatLabelDistance=e.repeatLabelDistance?(0,N.F2)(e.repeatLabelDistance):128;const h=X.Gq.load(t);h.sdf=!0,this._materialKey=h.data}static fromLabelClass(t,e){if("esriServerLinePlacementCenterAlong"===t.labelPlacement){const e=t.symbol;e.xoffset=0,e.yoffset=0,e.angle=0,e.font.decoration="none"}return new kt(t.materialKey,t,t.symbol,e)}get _shapedBox(){return this._shapingInfo.bounds}setZoomLevel(t){this._zoomLevel=t}bindReferenceTemplate(t){let e=(0,G.g)(this._xAlignD),i=(0,G.tf)(this._yAlignD);if(this._refOffsetX=0,this._refOffsetY=0,null==t)return void(this._refSymbolAndPlacementOffset=(0,B.Jz)(0,0,wt(e),wt(i)));if("circle"===t.boundsType&&(e||i)){const t=Math.sqrt(e*e+i*i);e/=t,i/=t}const s=Math.max(t.height,t.width),r=4*this._refPlacementPadding;this._refSymbolAndPlacementOffset=(0,B.Jz)(r,s,wt(e),wt(i)),this._referenceSize=s,this._refPlacementDirX=e,this._refPlacementDirY=i,this._refOffsetX=t.xOffset,this._refOffsetY=t.yOffset}_write(t,e){if(null==this._shapingInfo)return;const i=this._shapingInfo,s=e.getDisplayId(),r="esriGeometryPolygon"===e.geometryType?e.readLegacyCentroid():e.readLegacyGeometry();if(r)switch(this._current={out:t,inId:s,inShaping:i,zoomLevel:this._zoomLevel},"esriGeometryPolyline"===e.geometryType&&"curved"===this._labelPosition&&(this._borderLineColor||this._backgroundColor)&&St.warnOnce("TextSymbol properties 'borderLineColor', 'borderLineSize', and 'backgroundColor' are not supported in curved labels"),e.geometryType){case"esriGeometryPolyline":this._placeLineLabels(r);break;case"esriGeometryPoint":case"esriGeometryPolygon":this._placePointLabels(r);break;default:((t,e="mapview-labeling")=>{St.error(new n.Z(e,t))})(`Geometry of type ${e.geometryType} is not supported`)}}_isVisible(t,e){const i=Ct(this._current.zoomLevel);return Ct(t)<=i&&i<=Ct(e)}_placePointLabels(t){const{out:e,inId:i,inShaping:s}=this._current;this._writeGlyphs(e,i,t,s)}_placeLineLabels(t){const e=function(t,e){const i=e;for(let e=0;e<t.length;e++){let s=t[e];et(s,i);const r=[];r.push(s[0]);for(let t=1;t<s.length;t++){const[e,i]=s[t-1],[n,o]=s[t],a=Math.round(n-e),l=Math.round(o-i);r.push([a,l])}t[e]=r,s=r}return t}(t.paths,this._current.inShaping.bounds.width),i=this._placeSubdivGlyphs.bind(this),s=(this._shapedBox.width+this._repeatLabelDistance)/2;for(const t of e)tt(t,s,i,this._repeatLabel)}_placeSubdivGlyphs(t,e,i,s){const r=Pt(e),n=this._shapedBox.width/2,o=Math.sqrt(this._repeatLabelDistance)/2,a=Math.min(i,s-i),l=this._current.inShaping.isMultiline?25:Math.log2(a/(o+n/2)),h=0===e?l:Math.min(r,l),c=Math.max(this._minZoom,this._current.zoomLevel+1-h),u=this._current.zoomLevel-c,f=this._shapedBox.width/2*2**u;this._current.inShaping.isMultiline?0===e&&this._placeStraight(t,c):this._allowOverrun&&u<0?this._placeStraightAlong(t,this._minZoom):"parallel"===this._labelPosition?this._placeStraightAlong(t,c):"curved"===this._labelPosition&&this._placeCurved(t,c,f)}_placeStraight(t,e){const{out:i,inId:s,inShaping:r}=this._current,n=Math.ceil(t.angle*(180/Math.PI)%360),o=Math.ceil((t.angle*(180/Math.PI)+180)%360);this._outLineLabelAngle=Lt(n),this._writeGlyphs(i,s,t,r,e),this._outLineLabelAngle=Lt(o),this._writeGlyphs(i,s,t,r,e)}_placeCurved(t,e,i){const{out:s,inId:r}=this._current;s.metricStart(r,e,t.x,t.y,0,0,0,0);const n=t.clone(),o=t.angle*(180/Math.PI)%360,a=(t.angle*(180/Math.PI)+180)%360;this._outLineLabelAngle=Lt(o),this._placeFirst(n,e,1),this._placeBack(t,n,e,i,1),this._placeForward(t,n,e,i,1),this._outLineLabelAngle=Lt(a),this._placeFirst(n,e,0),this._placeBack(t,n,e,i,0),this._placeForward(t,n,e,i,0),s.metricEnd()}_placeStraightAlong(t,e){const{out:i,inId:s,inShaping:r}=this._current;i.metricStart(s,e,t.x,t.y,0,0,0,0);const n=t.clone(),o=t.angle*(180/Math.PI)%360,a=(t.angle*(180/Math.PI)+180)%360,l=r.glyphs.length>0&&(this._borderLineColor||this._backgroundColor);if(this._maxBackgroundZoom=25,this._minBackgroundZoom=Math.max(e,0),l){const e=X.Gq.load(this._materialKey);e.textureBinding=r.glyphs[0].textureBinding;const n=(0,R.b)((0,W.c)(),-t.angle),[l,h]=r.shapeBackground(n);this._outLineLabelAngle=Lt(o),i.recordStart(s,e.data,this.geometryType,!0),this._writeBackgroundGeometry(i,s,t,l,h),i.recordEnd(),this._outLineLabelAngle=Lt(a),i.recordStart(s,e.data,this.geometryType,!0),this._writeBackgroundGeometry(i,s,t,l,h),i.recordEnd()}this._outLineLabelAngle=Lt(o),this._placeFirst(n,e,1,!0),this._outLineLabelAngle=Lt(a),this._placeFirst(n,e,0,!0),i.metricEnd()}_placeBack(t,e,i,s,r){const n=t.clone();let o=t.backwardLength+0;for(;n.prev()&&!(o>=s);)this._placeOnSegment(n,e,o,i,-1,r),o+=n.length+0}_placeForward(t,e,i,s,r){const n=t.clone();let o=t.remainingLength+0;for(;n.next()&&!(o>=s);)this._placeOnSegment(n,e,o,i,1,r),o+=n.length+0}_placeFirst(t,e,i,s=!1){const r=t,n=this._current.inShaping,o=n.glyphs,a=this._current.zoomLevel,{out:l,inId:h}=this._current;for(const c of o){const o=c.x>n.bounds.x?i:1-i,u=o*t.remainingLength+(1-o)*t.backwardLength,f=Math.abs(c.x+c.width/2-n.bounds.x),_=Math.max(0,a+Math.log2(f/(u+0))),m=Math.max(e,s?0:_);if(c.maxZoom=25,c.angle=t.angle+(1-i)*Math.PI,c.minZoom=m,this._writeGlyph(l,h,r.x,r.y,c),i&&this._isVisible(c.minZoom,c.maxZoom)){const t=c.bounds;l.metricBoxWrite(t.center[0],t.center[1],t.width,t.height)}}}_placeOnSegment(t,e,i,s,r,n){const o=this._current.inShaping.glyphs,{out:a,inId:l}=this._current,h=this._current.inShaping,c=this._current.zoomLevel,u=t.dx/t.length,f=t.dy/t.length,_={x:t.x+i*-r*u,y:t.y+i*-r*f};for(const u of o){const o=u.x>h.bounds.x?n:1-n;if(!(o&&1===r||!o&&-1===r))continue;const f=Math.abs(u.x+u.width/2-h.bounds.x),m=Math.max(0,c+Math.log2(f/i)-.1),d=Math.max(s,c+Math.log2(f/(i+t.length+0)));if(0!==m&&(u.angle=t.angle+(1-n)*Math.PI,u.minZoom=d,u.maxZoom=m,this._writeGlyph(a,l,_.x,_.y,u),n&&this._isVisible(u.minZoom,u.maxZoom))){const i=u.bounds,s=t.x-e.x,r=t.y-e.y;a.metricBoxWrite(i.center[0]+s,i.center[1]+r,i.width,i.height)}}}_writeGlyphs(t,e,i,s,r=this._minZoom){if(i.x<0||i.x>=512||i.y<0||i.y>=512)return;if(s.glyphs.length>0&&(this._borderLineColor||this._backgroundColor)){const r=X.Gq.load(this._materialKey);r.textureBinding=s.glyphs[0].textureBinding,t.recordStart(e,r.data,this.geometryType,!0),this._writeBackgroundGeometry(t,e,i,s.bounds,s.background),t.recordEnd()}const n=i.x+this._refOffsetX,o=i.y-this._refOffsetY;for(const i of s.glyphs)i.minZoom=r,i.maxZoom=this._maxZoom,this._writeGlyph(t,e,n,o,i);const a=this._refPlacementDirX,l=this._refPlacementDirY,h=s.boundsT;t.metricStart(e,r,n,o,a,l,this._referenceSize,this._materialKey),t.metricBoxWrite(h.center[0],h.center[1],h.width,h.height),t.metricEnd()}_writeVertexCommon(t,e,i,s){const r=this._color,n=this._haloColor,o=(0,B.Jz)(0,0,this._size,this._haloSize),a=Math.max(s.minZoom,this._minZoom),l=Math.min(s.maxZoom,this._maxZoom),h=(0,B.Jz)(Ct(a),Ct(l),this._outLineLabelAngle,0);t.vertexWrite(i),t.vertexWrite(e),t.vertexWrite(r),t.vertexWrite(n),t.vertexWrite(o),t.vertexWrite(this._refSymbolAndPlacementOffset),t.vertexWrite(h)}_writeBackgroundVertex(t,e,i,s,r,n){const o=(0,B.Jz)(0,0,this._size,this._haloSize),a=(0,B.Jz)(0,0,0,0),l=(0,B.Jz)(Ct(this._minBackgroundZoom),Ct(this._maxBackgroundZoom),this._outLineLabelAngle,1);t.vertexWrite(i),t.vertexWrite(e),t.vertexWrite(s),t.vertexWrite(a),t.vertexWrite(o),t.vertexWrite(this._refSymbolAndPlacementOffset),t.vertexWrite(l),t.vertexWrite(r),t.vertexWrite(n),t.vertexEnd()}}var It=i(1265);const zt=3.14159265359/180,Tt=t=>class extends t{constructor(...t){super(...t),this.angle=0,this.xOffset=0,this.yOffset=0,this.width=0,this.height=0,this.boundsType="square",this._anchorX=0,this._anchorY=0,this._computedWidth=0,this._computedHeight=0,this._allowBorrowing=!0,this._vertexBoundsScaleX=1,this._vertexBoundsScaleY=1,this.geometryType=m.LW.MARKER}_write(t,e,i,s){const r=e.getDisplayId();t.recordStart(r,this._materialKey,this.geometryType,!0),this._writeGeometry(t,e,r,i,s),t.recordEnd()}_writeGeometry(t,e,i,s,r){if(null!=this._markerPlacement)return this._writePlacedMarkers(t,e,s,r);if(this._allowBorrowing=!0,!r&&"esriGeometryPoint"===e.geometryType){const s=e.getX(),r=e.getY();if(!t.hasAggregates&&t.hasPixelBufferEnabled&&(s<0||s>=513||r<0||r>=513))return;return this._writeVertices(t,i,this._getPos(s,r),s,r)}const n=r?r.asOptimized():"esriGeometryPolygon"===e.geometryType?e.readCentroid():e.readGeometryForDisplay();if(null!=n){if(n.isPoint){const[e,s]=n.coords;if(!t.hasAggregates&&t.hasPixelBufferEnabled&&(e<0||e>=512||s<0||s>=512))return;return this._writeVertices(t,i,this._getPos(e,s),e,s)}n.forEachVertex(((e,s)=>{const r=2*w.i9;e<-r||e>=r||s<-r||s>=r||this._writeVertices(t,i,this._getPos(e,s),e,s)}))}}_writePlacedMarkers(t,e,i,s){const r=s||it.z.fromFeatureSetReaderCIM(e);if(!r)return;const n=rt.getPlacement(r,-1,this._markerPlacement,(0,N.F2)(1),t.tileKey,i.geometryEngine);if(!n)return;this._allowBorrowing="esriGeometryPolygon"!==e.geometryType;const o=e.getDisplayId(),a=(0,It.c)(),l=(0,W.c)();let h=n.next();for(;null!=h;){const e=h.tx,i=-h.ty;e>=-128&&e<=640&&i>=-128&&i<=640&&(this._applyTransformation(l,a,-h.getAngle()/zt),this._writeVertices(t,o,this._getPos(e,i),e,i)),h=n.next()}}_writeVertices(t,e,i,s,r){const n=X.mE.load(this._materialKey);return n.symbologyType===m.mD.HEATMAP?this._writeHeatmapVertices(t,e,i):this._writeMarkerVertices(t,e,n,i,s,r)}_writeMarkerVertices(t,e,i,s,r,n){const o=i.vvRotation,a=t.vertexCount();let l=this._computedWidth*this._vertexBoundsScaleX,h=this._computedHeight*this._vertexBoundsScaleY;if(this.angle){const t=Math.max(l,h);l=t,h=t}if(o){const t=Math.max(this.xOffset,this.yOffset);l+=t,h+=t}this._allowBorrowing&&t.vertexBounds(r+this.xOffset,n-this.yOffset,l,h),t.vertexWrite(s),t.vertexWrite(this._offsetUpperLeft),t.vertexWrite(this._texUpperLeft),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.vertexWrite(s),t.vertexWrite(this._offsetUpperRight),t.vertexWrite(this._texUpperRight),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.vertexWrite(s),t.vertexWrite(this._offsetBottomLeft),t.vertexWrite(this._texBottomLeft),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),t.vertexWrite(s),t.vertexWrite(this._offsetBottomRight),t.vertexWrite(this._texBottomRight),t.vertexWrite(this._bitestAndDistRatio),t.vertexWrite(e),t.vertexWrite(this._fillColor),t.vertexWrite(this._outlineColor),t.vertexWrite(this._sizeOutlineWidth),t.vertexWrite(this._minMaxZoom),t.vertexEnd(),this._writeIndices(t,a)}_writeHeatmapVertices(t,e,i){const s=t.vertexCount();t.vertexWrite(i),t.vertexWrite(this._offsetUpperLeft),t.vertexWrite(e),t.vertexEnd(),t.vertexWrite(i),t.vertexWrite(this._offsetUpperRight),t.vertexWrite(e),t.vertexEnd(),t.vertexWrite(i),t.vertexWrite(this._offsetBottomLeft),t.vertexWrite(e),t.vertexEnd(),t.vertexWrite(i),t.vertexWrite(this._offsetBottomRight),t.vertexWrite(e),t.vertexEnd(),this._writeIndices(t,s)}_writeIndices(t,e){t.indexWrite(e+0),t.indexWrite(e+1),t.indexWrite(e+2),t.indexWrite(e+1),t.indexWrite(e+3),t.indexWrite(e+2)}_applyTransformation(t,e,i=0){i?(0,R.b)(t,zt*i):(0,R.c)(t),(0,R.t)(t,t,(0,It.f)(this.xOffset,-this.yOffset)),this.angle&&(0,R.r)(t,t,zt*this.angle);const s=this._computedWidth,r=this._computedHeight,n=-(.5+this._anchorX)*s,o=-(.5-this._anchorY)*r;(0,g.s)(e,n,o),(0,g.t)(e,e,t),this._offsetUpperLeft=(0,B.UJ)(16*e[0],16*e[1]),(0,g.s)(e,n+s,o),(0,g.t)(e,e,t),this._offsetUpperRight=(0,B.UJ)(16*e[0],16*e[1]),(0,g.s)(e,n,o+r),(0,g.t)(e,e,t),this._offsetBottomLeft=(0,B.UJ)(16*e[0],16*e[1]),(0,g.s)(e,n+s,o+r),(0,g.t)(e,e,t),this._offsetBottomRight=(0,B.UJ)(16*e[0],16*e[1])}_computeSize(t,e,i,s,r,n,o,a){const l=t*i,h=e*i;if(n.sdf&&!o){const i=a&&t>e?l:t,r=e,n=s+2;t=Math.min(i+n,l),e=Math.min(r+n,h)}else t=l,e=h;const c=w.qu/Math.max(l,h),u=.5*(l-t)*c,f=.5*(h-e)*c,_=n.rect.x+w.s4+u,m=n.rect.y+w.s4+f,d=_+n.width-2*u,p=m+n.height-2*f,y=Math.floor(_),g=Math.floor(m),x=Math.ceil(d),M=Math.ceil(p);t*=(x-y)/(d-_),e*=(M-g)/(p-m),this._texUpperLeft=(0,B.UJ)(y,g),this._texUpperRight=(0,B.UJ)(x,g),this._texBottomLeft=(0,B.UJ)(y,M),this._texBottomRight=(0,B.UJ)(x,M),this._anchorX*=l/t,this._anchorY*=h/e,t*=r,e*=r,this._computedWidth=t,this._computedHeight=e}_getPos(t,e){return(0,B.UJ)(Math.round(8*t),Math.round(8*e))}};class Ot extends(Tt(bt)){constructor(t,e,i,s,r,n,o,a,l,h,c,u,f,_,d,p,y,g,x,M,b,v,S,P){super(),this.angle=s,this.height=o,this.width=n,this.xOffset=e*x,this.yOffset=i*x,this._markerPlacement=M||void 0,this._effects=b||void 0,this._anchorX=p,this._anchorY=y,this._minMaxZoom=(0,B.UJ)(Math.round(v*w.JS),Math.round(S*w.JS));const C=(_===V.v2.MAP?w.$6:w.yc)|(c?w.SQ:0)|(f?w.pZ:0)|(u?w.rL:0),L=d&&d.sdf,k=X.mE.load(t);k.sdf=L,k.pattern=!0,k.textureBinding=d.textureBinding,this._materialKey=k.data,this._fillColor=r,this._outlineColor=l,this._sizeOutlineWidth=(0,B.Jz)(Math.round(Math.min(Math.sqrt(128*n),255)),Math.round(Math.min(Math.sqrt(128*o),255)),Math.round(Math.min(Math.sqrt(128*h),255)),Math.round(Math.min(Math.sqrt(128*a),255))),k.symbologyType===m.mD.PIE_CHART?(n*=g*x,o*=g*x,this._computedWidth=n,this._computedHeight=o,this._texUpperLeft=(0,B.UJ)(0,1),this._texUpperRight=(0,B.UJ)(1,1),this._texBottomLeft=(0,B.UJ)(0,0),this._texBottomRight=(0,B.UJ)(1,0)):this._computeSize(n,o,g,h,x,d,k.hasSizeVV(),P);const I=Math.round(64*g);this._bitestAndDistRatio=(0,B.UJ)(C,I);const z=(0,It.c)(),T=(0,W.c)();this._applyTransformation(T,z)}static fromCIMMarker(t,e,i){const s=e&&e.width||1,r=e&&e.height||1,n=t.size,o=s/r*t.scaleX,a=t.scaleSymbolsProportionally&&t.frameHeight?n/t.frameHeight:1,l=(0,D.t2)(t.color),h=(0,D.t2)(t.outlineColor),c=(0,N.F2)(n),u=c*o,f=(0,N.F2)(t.offsetX||0),_=(0,N.F2)(t.offsetY||0),m=(0,N.F2)(t.outlineWidth||0)*a,d=t.alignment||V.v2.SCREEN,p=(0,N.F2)(t.referenceSize),[y,g]=q(t.scaleInfo,i);let x=t.rotation||0;t.rotateClockwise||(x=-x);let M=0,b=0;const v=t.anchorPoint;v&&(t.isAbsoluteAnchorPoint?n&&(M=v.x/(n*o),b=v.y/n):(M=v.x,b=v.y));const S=new Ot(t.materialKey,f,_,x,l,u,c,p,h,m,t.colorLocked,t.scaleSymbolsProportionally,!1,d,e,M,b,t.sizeRatio,t.scaleFactor??1,t.markerPlacement,t.effects,y,g,!0);return S._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/u:1,S._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/c:1,S}static fromPictureMarker(t,e){const i=Math.round((0,N.F2)(t.width)),s=Math.round((0,N.F2)(t.height)),r=w.gr,n=Math.round((0,N.F2)(t.xoffset||0)),o=Math.round((0,N.F2)(t.yoffset||0)),a=new Ot(t.materialKey,n,o,t.angle,r,i,s,s,0,0,!1,!1,!1,V.v2.SCREEN,e,0,0,1,1,null,null,0,U,!1);return a._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/t.width:1,a._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/t.height:1,a}static fromSimpleMarker(t,e){const i=t.style,s=(0,D.aH)(t.color),r=Math.round((0,N.F2)(t.size));let n=r;"esriSMSTriangle"===i&&(n*=e.height/e.width);const o=Math.round((0,N.F2)(t.xoffset||0)),a=Math.round((0,N.F2)(t.yoffset||0)),l=t.outline,h=0|(l?.color&&(0,D.aH)(l.color)),c=0|(l?.width&&Math.round((0,N.F2)(l.width))),u=new Ot(t.materialKey,o,a,t.angle??0,s,r,n,n,h,c,!1,!1,"esriSMSCross"===i||"esriSMSX"===i,V.v2.SCREEN,e,0,0,2,1,null,null,0,U,!1);return u.boundsType="esriSMSCircle"===i?"circle":"square",u._vertexBoundsScaleX=t.maxVVSize?t.maxVVSize/t.size:1,u._vertexBoundsScaleY=t.maxVVSize?t.maxVVSize/t.size:1,u}static fromLineSymbolMarker(t,e){const i=(0,D.aH)(t.color),s=Math.round((0,N.F2)(6*t.lineWidth)),r=s,n="cross"===t.style||"x"===t.style;let o;switch(t.placement){case"begin-end":o=V.Tx.Both;break;case"begin":o=V.Tx.JustBegin;break;case"end":o=V.Tx.JustEnd;break;default:o=V.Tx.None}const a={type:"CIMMarkerPlacementAtExtremities",angleToLine:!0,offset:0,extremityPlacement:o,offsetAlongLine:0},l=new Ot(t.materialKey,0,0,0,i,s,r,r/6,i,n?Math.round((0,N.F2)(t.lineWidth)):0,!1,!1,n,V.v2.MAP,e,0,0,2,1,a,null,0,U,!1);return l.boundsType="circle"===t.style?"circle":"square",l}}var At=i(58333),Et=i(72233);function Ft(t){return function(t,e){return(t%=e)>=0?t:t+e}(.7111111111111111*t,256)}Math.PI,Math.LN2,i(95401);var Nt=i(59255),Rt=i(5428);function Wt(t,e,i,s,r,n,o){le=0;const a=(s-i)*n,l=r&&r.length,h=l?(r[0]-i)*n:a;let c,u,f,_,m,d=Vt(e,i,0,0,h,n,!0);if(d&&d.next!==d.prev){if(l&&(d=function(t,e,i,s,r,n){const o=new Array;for(let r=0,a=s.length;r<a;r++){const l=Vt(t,e,0,s[r]*n,r<a-1?s[r+1]*n:i*n,n,!1);l===l.next&&(l.steiner=!0),o.push(Jt(l))}o.sort(ee);for(const t of o)r=Yt(t,r);return r}(e,i,s,r,d,n)),a>80*n){c=f=e[0+i*n],u=_=e[1+i*n];for(let t=n;t<h;t+=n){const s=e[t+i*n],r=e[t+1+i*n];c=Math.min(c,s),u=Math.min(u,r),f=Math.max(f,s),_=Math.max(_,r)}m=Math.max(f-c,_-u),m=0!==m?1/m:0}Dt(d,t,n,c,u,m,o,0)}}function Vt(t,e,i,s,r,n,o){let a;if(o===function(t,e,i,s,r,n){let o=0;for(let i=s,a=r-n;i<r;i+=n)o+=(t[a+e*n]-t[i+e*n])*(t[i+1+e*n]+t[a+1+e*n]),a=i;return o}(t,e,0,s,r,n)>0)for(let i=s;i<r;i+=n)a=Ut(i+e*n,t[i+e*n],t[i+1+e*n],a);else for(let i=r-n;i>=s;i-=n)a=Ut(i+e*n,t[i+e*n],t[i+1+e*n],a);return a&&te(a,a.next)&&(Ht(a),a=a.next),a}function Gt(t,e=t){if(!t)return t;let i,s=t;do{if(i=!1,s.steiner||!te(s,s.next)&&0!==Kt(s.prev,s,s.next))s=s.next;else{if(Ht(s),s=e=s.prev,s===s.next)break;i=!0}}while(i||s!==e);return e}function Dt(t,e,i,s,r,n,o,a){if(!t)return;!a&&n&&(t=Zt(t,s,r,n));let l=t;for(;t.prev!==t.next;){const h=t.prev,c=t.next;if(n?Xt(t,s,r,n):Bt(t))e.push(h.index/i+o),e.push(t.index/i+o),e.push(c.index/i+o),Ht(t),t=c.next,l=c.next;else if((t=c)===l){a?1===a?Dt(t=ie(t,e,i,o),e,i,s,r,n,o,2):2===a&&se(t,e,i,s,r,n,o):Dt(Gt(t),e,i,s,r,n,o,1);break}}}function Bt(t){const e=t.prev,i=t,s=t.next;if(Kt(e,i,s)>=0)return!1;let r=t.next.next;const n=r;let o=0;for(;r!==t.prev&&(0===o||r!==n);){if(o++,$t(e.x,e.y,i.x,i.y,s.x,s.y,r.x,r.y)&&Kt(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Xt(t,e,i,s){const r=t.prev,n=t,o=t.next;if(Kt(r,n,o)>=0)return!1;const a=r.x<n.x?r.x<o.x?r.x:o.x:n.x<o.x?n.x:o.x,l=r.y<n.y?r.y<o.y?r.y:o.y:n.y<o.y?n.y:o.y,h=r.x>n.x?r.x>o.x?r.x:o.x:n.x>o.x?n.x:o.x,c=r.y>n.y?r.y>o.y?r.y:o.y:n.y>o.y?n.y:o.y,u=Qt(a,l,e,i,s),f=Qt(h,c,e,i,s);let _=t.prevZ,m=t.nextZ;for(;_&&_.z>=u&&m&&m.z<=f;){if(_!==t.prev&&_!==t.next&&$t(r.x,r.y,n.x,n.y,o.x,o.y,_.x,_.y)&&Kt(_.prev,_,_.next)>=0)return!1;if(_=_.prevZ,m!==t.prev&&m!==t.next&&$t(r.x,r.y,n.x,n.y,o.x,o.y,m.x,m.y)&&Kt(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;_&&_.z>=u;){if(_!==t.prev&&_!==t.next&&$t(r.x,r.y,n.x,n.y,o.x,o.y,_.x,_.y)&&Kt(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;m&&m.z<=f;){if(m!==t.prev&&m!==t.next&&$t(r.x,r.y,n.x,n.y,o.x,o.y,m.x,m.y)&&Kt(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function Ut(t,e,i,s){const r=oe.create(t,e,i);return s?(r.next=s.next,r.prev=s,s.next.prev=r,s.next=r):(r.prev=r,r.next=r),r}function Ht(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Jt(t){let e=t,i=t;do{(e.x<i.x||e.x===i.x&&e.y<i.y)&&(i=e),e=e.next}while(e!==t);return i}function Yt(t,e){const i=function(t,e){let i=e;const s=t.x,r=t.y;let n,o=-1/0;do{if(r<=i.y&&r>=i.next.y&&i.next.y!==i.y){const t=i.x+(r-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(t<=s&&t>o){if(o=t,t===s){if(r===i.y)return i;if(r===i.next.y)return i.next}n=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!n)return null;if(s===o)return n.prev;const a=n,l=n.x,h=n.y;let c,u=1/0;for(i=n.next;i!==a;)s>=i.x&&i.x>=l&&s!==i.x&&$t(r<h?s:o,r,l,h,r<h?o:s,r,i.x,i.y)&&(c=Math.abs(r-i.y)/(s-i.x),(c<u||c===u&&i.x>n.x)&&jt(i,t)&&(n=i,u=c)),i=i.next;return n}(t,e);if(!i)return e;const s=ne(i,t);return Gt(s,s.next),Gt(i,i.next)}function Zt(t,e,i,s){let r;for(;r!==t;r=r.next){if(r=r||t,null===r.z&&(r.z=Qt(r.x,r.y,e,i,s)),r.prev.next!==r||r.next.prev!==r)return r.prev.next=r,r.next.prev=r,Zt(t,e,i,s);r.prevZ=r.prev,r.nextZ=r.next}return t.prevZ.nextZ=null,t.prevZ=null,function(t){let e,i=1;for(;;){let s,r=t;t=null,e=null;let n=0;for(;r;){n++,s=r;let o=0;for(;o<i&&s;o++)s=s.nextZ;let a=i;for(;o>0||a>0&&s;){let i;0===o?(i=s,s=s.nextZ,a--):0!==a&&s?r.z<=s.z?(i=r,r=r.nextZ,o--):(i=s,s=s.nextZ,a--):(i=r,r=r.nextZ,o--),e?e.nextZ=i:t=i,i.prevZ=e,e=i}r=s}if(e.nextZ=null,i*=2,n<2)return t}}(t)}function Kt(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function qt(t,e,i,s){return!!(te(t,e)&&te(i,s)||te(t,s)&&te(i,e))||Kt(t,e,i)>0!=Kt(t,e,s)>0&&Kt(i,s,t)>0!=Kt(i,s,e)>0}function $t(t,e,i,s,r,n,o,a){return(r-o)*(e-a)-(t-o)*(n-a)>=0&&(t-o)*(s-a)-(i-o)*(e-a)>=0&&(i-o)*(n-a)-(r-o)*(s-a)>=0}function jt(t,e){return Kt(t.prev,t,t.next)<0?Kt(t,e,t.next)>=0&&Kt(t,t.prev,e)>=0:Kt(t,e,t.prev)<0||Kt(t,t.next,e)<0}function Qt(t,e,i,s,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-s)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function te(t,e){return t.x===e.x&&t.y===e.y}function ee(t,e){return t.x-e.x}function ie(t,e,i,s){let r=t;do{const n=r.prev,o=r.next.next;!te(n,o)&&qt(n,r,r.next,o)&&jt(n,o)&&jt(o,n)&&(e.push(n.index/i+s),e.push(r.index/i+s),e.push(o.index/i+s),Ht(r),Ht(r.next),r=t=o),r=r.next}while(r!==t);return r}function se(t,e,i,s,r,n,o){let a=t;do{let t=a.next.next;for(;t!==a.prev;){if(a.index!==t.index&&re(a,t)){let l=ne(a,t);return a=Gt(a,a.next),l=Gt(l,l.next),Dt(a,e,i,s,r,n,o,0),void Dt(l,e,i,s,r,n,o,0)}t=t.next}a=a.next}while(a!==t)}function re(t,e){return t.next.index!==e.index&&t.prev.index!==e.index&&!function(t,e){let i=t;do{if(i.index!==t.index&&i.next.index!==t.index&&i.index!==e.index&&i.next.index!==e.index&&qt(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&jt(t,e)&&jt(e,t)&&function(t,e){let i=t,s=!1;const r=(t.x+e.x)/2,n=(t.y+e.y)/2;do{i.y>n!=i.next.y>n&&i.next.y!==i.y&&r<(i.next.x-i.x)*(n-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next}while(i!==t);return s}(t,e)}function ne(t,e){const i=oe.create(t.index,t.x,t.y),s=oe.create(e.index,e.x,e.y),r=t.next,n=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,s.next=i,i.prev=s,n.next=s,s.prev=n,s}class oe{constructor(){this.index=0,this.x=0,this.y=0,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}static create(t,e,i){const s=le<ae.length?ae[le++]:new oe;return s.index=t,s.x=e,s.y=i,s.prev=null,s.next=null,s.z=null,s.prevZ=null,s.nextZ=null,s.steiner=!1,s}}const ae=new Array;let le=0;for(let t=0;t<8096;t++)ae.push(new oe);const he=new Nt.bN(0,0,0,1,0),ce=new Nt.bN(0,0,0,1,0);function ue(t,e,i){let s=0;for(let r=1;r<i;r++){const i=t[2*(e+r-1)],n=t[2*(e+r-1)+1];s+=(t[2*(e+r)]-i)*(t[2*(e+r)+1]+n)}return s}function fe(t,e,i,s,r){let n=0;for(let o=i;o<s;o+=3){const i=2*(t[o]-r),s=2*(t[o+1]-r),a=2*(t[o+2]-r);n+=Math.abs((e[i]-e[a])*(e[s+1]-e[i+1])-(e[i]-e[s])*(e[a+1]-e[i+1]))}return n}he.setExtent(w.i9),ce.setExtent(w.i9);var _e=i(67327);const me=16,de=t=>class extends t{constructor(...t){super(...t),this.tessellationProperties={},this._tessellationOptions={halfWidth:0,pixelCoordRatio:1,offset:0},this.geometryType=m.LW.LINE}writeGeometry(t,e,i,s){this._writeGeometry(t,e,i,s)}_initializeTessellator(t){const e=X.a.load(this._materialKey),i=X.dk.load(this._materialKey),s=this._tessellationOptions,r=e.vvSizeFieldStops||e.vvSizeMinMaxValue||e.vvSizeScaleStops||e.vvSizeUnitValue,n=this.tessellationProperties._halfWidth<w.do&&!t&&!r;this.tessellationProperties.minMaxZoom=this._minMaxZoom,s.wrapDistance=65535,s.textured=this._isDashed||this._hasPattern,s.offset=this.tessellationProperties.offset,s.halfWidth=this.tessellationProperties._halfWidth;const o=n?0:1,a=(0,X.CA)(i)?ye:pe;this._lineTessellator=new _e.z(a(this.tessellationProperties,o,o),ge(this.tessellationProperties),n)}_write(t,e,i,s){const r="esriGeometryPoint"===e.geometryType;t.recordStart(e.getDisplayId(),this._materialKey,this.geometryType,r),this._writeGeometry(t,e,s,r),t.recordEnd()}_writeGeometry(t,e,i,s){const r=i||it.z.fromFeatureSetReaderCIM(e);if(!r)return;const n=this._getLines(r,s);null!=n&&this._writeVertices(t,e,n)}_getLines(t,e){return function(t,e){ce.setPixelMargin(e);const i=ce,s=-e,r=w.i9+e;let n=[],o=!1;if(!t.nextPath())return null;let a=!0;for(;a;){t.seekPathStart();const e=[];if(!t.pathSize)return null;i.reset(Nt.Vl.LineString),t.nextPoint();let l=t.x,h=t.y;if(o)i.moveTo(l,h);else{if(l<s||l>r||h<s||h>r){o=!0;continue}e.push({x:l,y:h})}let c=!1;for(;t.nextPoint();)if(l=t.x,h=t.y,o)i.lineTo(l,h);else{if(l<s||l>r||h<s||h>r){c=!0;break}e.push({x:l,y:h})}if(c)o=!0;else{if(o){const t=i.resultWithStarts();if(t)for(const e of t)n.push(e)}else n.push({line:e,start:0});a=t.nextPath(),o=!1}}return n=n.filter((t=>t.line.length>1)),0===n.length?null:n}(t,e?256:16)}_writeVertices(t,e,i){const s=e.getDisplayId(),r=t.vertexCount(),n=this.tessellationProperties,o=this._tessellationOptions;n.out=t,n.id=s,n.indexCount=0,n.vertexCount=0,n.offset=r,o.capType=this._capType,o.joinType=this._joinType;const a=X.dk.load(this._materialKey);this.tessellationProperties.key=(0,X.CA)(a)?a:X.a.load(this._materialKey);for(const{line:t,start:e}of i)o.initialDistance=e%65535,this._lineTessellator.tessellate(t,o)}},pe=(t,e,i)=>(s,r,n,o,a,l,h,c,u,f,_)=>{const m=(0,B.UJ)(_,Math.ceil(me*t._halfWidth)),d=(0,B.Jz)(Math.round(me*h),Math.round(me*c),Math.round(me*u),Math.round(me*f)),p=(0,B.Jz)(me*a,me*l,0,t._bitset),y=t.out;return y.vertexBounds(s,r,e,i),y.vertexWrite((0,B.UJ)(8*s,8*r)),y.vertexWrite(t.id),y.vertexWrite(t._fillColor),y.vertexWrite(d),y.vertexWrite(m),y.vertexWrite(t._tl),y.vertexWrite(t._br),y.vertexWrite(p),y.vertexWrite((0,B.UJ)(Math.ceil(me*t._halfReferenceWidth),0)),y.vertexWrite(t.minMaxZoom),y.vertexEnd(),t.offset+t.vertexCount++},ye=(t,e,i)=>(s,r,n,o,a,l,h,c,u,f,_)=>{const m=(0,B.UJ)(me*t._halfWidth,me*t._halfReferenceWidth),d=(0,B.Jz)(me*h+128,me*c+128,me*u+128,me*f+128),p=t.out,y=t._bitset<<24|t.id;p.vertexBounds(s,r,e,i),p.vertexWrite((0,B.UJ)(8*s,8*r)),p.vertexWrite(y),p.vertexWrite(t._fillColor);const g=(0,X.Xp)(t.key);return g||(p.vertexWrite(0),p.vertexWrite(0)),p.vertexWrite(0),p.vertexWrite(m),p.vertexWrite(d),g||p.vertexWrite(t.minMaxZoom),p.vertexEnd(),t.offset+t.vertexCount++},ge=t=>(e,i,s)=>{const r=t.out;r.indexWrite(e),r.indexWrite(i),r.indexWrite(s),t.indexCount+=3};class xe extends(de(bt)){constructor(t,e,i,s,r,n,o,a,l,h,c,u,f,_,m,d,p,y,g,x){super();const M=X.a.load(t);e&&(M.sdf=e.sdf,M.pattern=!0,M.textureBinding=e.textureBinding),this._capType=s,this._joinType=r,this._miterLimitCosine=K(n),this.tessellationProperties._fillColor=o,this.tessellationProperties._tl=a,this.tessellationProperties._br=l,this._hasPattern=h,this._isDashed=c,this._zOrder=p,this._effects=y||null,this._minMaxZoom=(0,B.UJ)(Math.round(g*w.JS),Math.round(x*w.JS)),this._materialKey=M.data;const b=(f?w.SQ:0)|(_?w.WD:0)|(u?w.Wq:0)|(m?w.GS:0);this.tessellationProperties._bitset=b,this.tessellationProperties._halfWidth=.5*i,this.tessellationProperties._halfReferenceWidth=.5*d,this.tessellationProperties.offset=0,this._initializeTessellator(!1)}static fromCIMLine(t,e,i){const s=t.color,r=t.scaleFactor||1,n=!!t.dashTemplate;let o=t.cap;n&&o===V.RL.ROUND&&(o=V.RL.SQUARE);const a=t.join,l=(0,N.F2)(t.width)*r,h=(0,N.F2)(t.referenceWidth),c=(0,N.F2)(t.miterLimit),u=s&&(0,D.t2)(s)||0,[f,_]=q(t.scaleInfo,i);if(!e)return new xe(t.materialKey,e,l,o,a,c,u,0,0,!1,n,t.scaleDash??!1,t.colorLocked??!1,!1,t.sampleAlphaOnly,h,t.zOrder,t.effects,f,_);const{rect:m,width:d,height:p}=e,y=m.x+w.s4,g=m.y+w.s4,x=y+d,M=g+p,b=(0,B.UJ)(y,g),v=(0,B.UJ)(x,M);return new xe(t.materialKey,e,l,o,a,c,u,b,v,!0,n,t.scaleDash??!1,t.colorLocked??!1,!1,t.sampleAlphaOnly,h,t.zOrder,t.effects,f,_)}static fromFillOutline(t){const e=X.dk.load(t.materialKey);return(0,X.CA)(e)&&t.outline&&"esriSLSSolid"===t.outline?.style?xe.fromSimpleLine({hash:"",materialKey:t.materialKey,...t.outline},null,!0):null}static fromSimpleLine(t,e,i=!1){const{color:s}=t,r="esriSLSSolid"!==t.style&&"esriSLSNull"!==t.style,n=(0,C.ws)(t.cap||"round"),o=(0,C.xV)(t.join||"round");let a=s&&"esriSLSNull"!==t.style&&(0,D.aH)(s)||0;"esriSLSNull"===t.style&&(a=0);const l=(0,N.F2)(t.width),h=t.miterLimit;if(!e)return new xe(t.materialKey,e,l,n,o,h,a,0,0,!1,r,!0,!1,i,!1,l,0,null,0,U);const{rect:c,width:u,height:f}=e,_=c.x+w.s4,m=c.y+w.s4,d=_+u,p=m+f,y=(0,B.UJ)(_,m),g=(0,B.UJ)(d,p);return new xe(t.materialKey,e,l,n,o,h,a,y,g,!0,r,!0,!1,i,!1,l,0,null,0,U)}static fromPictureLineSymbol(t,e,i,s){return o.Z.getLogger("esri.views.2d.engine.webgl.WGLLineTemplate").error("PictureLineSymbol support does not exist!"),null}}const Me=t=>class extends t{constructor(...t){super(...t),this.forceLibtess=!1,this._bitset=0,this._lineTemplate=null,this.geometryType=m.LW.FILL}_maybeAddLineTemplate(t){this._lineTemplate=xe.fromFillOutline(t)}_write(t,e,i,s){const r="esriGeometryPoint"===e.geometryType,n=X.dk.load(this._materialKey);t.recordStart(e.getDisplayId(),this._materialKey,this.geometryType,r),this._writeGeometry(t,e,n,s,r),(0,X.CA)(n)&&null!=this._lineTemplate&&this._lineTemplate.writeGeometry(t,e,s,r),t.recordEnd()}_writeGeometry(t,e,i,s,r){const n=this._getGeometry(e,s,r);if(null==n)return;const o=[];if(!(n.maxLength>100)&&!this.forceLibtess&&function(t,e){const{coords:i,lengths:s,hasIndeterminateRingOrder:r}=e,n=t;if(r)return!1;let o=0;for(let t=0;t<s.length;){let e=t,r=s[t],a=ue(i,o,r);const l=[];for(;++e<s.length;){const t=s[e],n=ue(i,o+r,t);if(!(n>0))break;a+=n,l.push(o+r),r+=t}const h=n.length;Wt(n,i,o,o+r,l,2,0);const c=fe(n,i,h,n.length,0),u=Math.abs(a);if(Math.abs((c-u)/Math.max(1e-7,u))>1e-5)return n.length=0,!1;t=e,o+=r}return!0}(o,n))return void(o.length&&this._writeVertices(t,e,n.coords,n.lengths,i,o));const a=function(t){const{coords:e,lengths:i}=t,{buffer:s}=(0,E.b)(e,i);return s}(n);this._writeVertices(t,e,a,[a.length/2],i)}_writeVertex(t,e,i,s,r,n){const o=(0,B.UJ)(1*s,1*r);if(t.vertexBounds(s,r,0,0),t.vertexWrite(o),t.vertexWrite(e),i.symbologyType===m.mD.DOT_DENSITY)t.vertexWriteF32(1/Math.abs(n.readGeometryArea()));else{t.vertexWrite(this.fillColor);const e=(0,X.Xp)(i);e||(t.vertexWrite(this.tl),t.vertexWrite(this.br)),t.vertexWrite(this.aux21),t.vertexWrite(this.aux22),t.vertexWrite(this.aux3),e||t.vertexWrite(this._minMaxZoom)}}_writeVertices(t,e,i,s,r,n){const o=e.getDisplayId(),a=this._bitset<<24|o,l=s.reduce(((t,e)=>t+e)),h=(0,C.$_)(r.geometryType,r.symbologyType).geometry/4,c=t.vertexCount();t.vertexEnsureSize(h*l);let u=0;if(n)for(const s of n){const n=i[2*s],o=i[2*s+1];this._writeVertex(t,a,r,n,o,e),u++}else for(let s=0;s<i.length;s+=2){const n=Math.round(i[s]),o=Math.round(i[s+1]);this._writeVertex(t,a,r,n,o,e),u++}t.indexEnsureSize(u);for(let e=0;e<u;e++)t.indexWrite(e+c)}_getGeometry(t,e,i){const s=e?.asOptimized()||t.readGeometryForDisplay();return s?function(t,e){if(null==t)return null;if(!function(t,e,i){let s=0;for(let e=0;e<t.lengths.length;e++){const r=t.lengths[e];for(let e=0;e<r;e++){const r=t.coords[2*(e+s)],n=t.coords[2*(e+s)+1];if(r<-128||r>i||n<-128||n>i)return!0}s+=r}return!1}(t,0,w.i9+128))return t;he.setPixelMargin(e),he.reset(Nt.Vl.Polygon);let i=0;for(let e=0;e<t.lengths.length;e++){const s=t.lengths[e];let r=t.coords[2*(0+i)],n=t.coords[2*(0+i)+1];he.moveTo(r,n);for(let e=1;e<s;e++)r=t.coords[2*(e+i)],n=t.coords[2*(e+i)+1],he.lineTo(r,n);he.close(),i+=s}const s=he.result(!1);if(!s)return null;const r=[],n=[];for(const t of s){let e=0;for(const i of t)n.push(i.x),n.push(i.y),e++;r.push(e)}return new Rt.Z(r,n)}(s,i?256:8):null}};var be=i(22303),ve=i(60800),Se=i(22974),Pe=i(19153),we=i(59266),Ce=i(40685);const Le=new Set(["StartTimeOffset","Duration","RepeatDelay"]);function ke(t,e){return Le.has(e)?(i=t,.05*Math.max(Math.round(i/.05),1)):t;var i}const Ie=[1/256,1/65536,1/16777216,1/4294967296];!function(t,e=0){let i=0;for(let s=0;s<4;s++)i+=t[e+s]*Ie[s]}(new Uint8ClampedArray([255,255,255,255]));var ze=i(33955);function Te(t){let e=1/0,i=-1/0,s=1/0,r=-1/0;for(const n of t)for(const t of n)t[0]<e&&(e=t[0]),t[0]>i&&(i=t[0]),t[1]<s&&(s=t[1]),t[1]>r&&(r=t[1]);return[e,s,i,r]}function Oe(t){return t?t.rings?Te(t.rings):t.paths?Te(t.paths):(0,ze.YX)(t)?[t.xmin,t.ymin,t.xmax,t.ymax]:null:null}function Ae(t,e,i,s,r){const[n,o,a,l]=t;if(a<n||l<o)return[0,0,0];const h=a-n,c=l-o,u=w.s4,f=Math.floor(.5*(64-u)),_=(128-2*(f+u))/Math.max(h,c),m=Math.round(h*_)+2*f,d=Math.round(c*_)+2*f;let p=1;e&&(p=d/_/(e.ymax-e.ymin));let y=0,g=0,x=1;s&&(r?e&&i&&e.ymax-e.ymin>0&&(x=(e.xmax-e.xmin)/(e.ymax-e.ymin),y=s.x/(i*x),g=s.y/i):(y=s.x,g=s.y)),e&&(y=.5*(e.xmax+e.xmin)+y*(e.xmax-e.xmin),g=.5*(e.ymax+e.ymin)+g*(e.ymax-e.ymin)),y-=n,g-=o,y*=_,g*=_,y+=f,g+=f;let M=y/m-.5,b=g/d-.5;return r&&i&&(M*=i*x,b*=i),[p,M,b]}var Ee=i(74465);const Fe=53290320,Ne=10,Re=o.Z.getLogger("esri.symbols.cim.cimAnalyzer");function We(t){switch(t){case"Butt":return V.RL.BUTT;case"Square":return V.RL.SQUARE;default:return V.RL.ROUND}}function Ve(t){switch(t){case"Bevel":return V.AH.BEVEL;case"Miter":return V.AH.MITER;default:return V.AH.ROUND}}function Ge(t){const e=t.markerPlacement;return e&&e.angleToLine?V.v2.MAP:V.v2.SCREEN}class De{constructor(t,e){this._cimLayers=[],this._poMap={},this._primitiveOverrides=[],this._resourceManager=t,this._info=e}async analyzeSymbolReference(t,e,i){if(this._cimLayers=i??[],!t)return this._cimLayers;if(t.primitiveOverrides){this._primitiveOverrides=t.primitiveOverrides,this._poMap={};const e=[],i=this._info;for(const t of this._primitiveOverrides){const s=t.valueExpressionInfo;if(s&&i){const r=s.expression,n=(0,we.Yi)(r,i.spatialReference,i.fields).then((e=>{null!=e&&this._setPoMap(t.primitiveName,t.propertyName,e)}));e.push(n)}else null!=t.value&&this._setPoMap(t.primitiveName,t.propertyName,t.value);e.length>0&&await Promise.all(e)}}const s=t.symbol,r=[];return xt.B$.fetchResources(s,this._resourceManager,r),r.length>0&&await Promise.all(r),this._analyzeSymbol(s,e),this._cimLayers}_analyzeSymbol(t,e){switch(t?.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this._analyzeMultiLayerSymbol(t,e,1,0,0,0)}}_analyzeMultiLayerSymbol(t,e,i,s,r,n){const o=t?.symbolLayers;if(!o)return;const a=t.effects;let l=V.v2.SCREEN;const h=xt.B$.getSize(t)??0;"CIMPointSymbol"===t.type&&"Map"===t.angleAlignment&&(l=V.v2.MAP);const c="CIMPolygonSymbol"===t.type;let u=o.length;for(;u--;){const f=o[u];if(!f||!1===f.enable)continue;let _;a?.length&&(_=[...a]);const m=f.effects;m?.length&&(a?_.push(...m):_=[...m]);const d=[];let p;xt.E0.findEffectOverrides(_,this._primitiveOverrides,d),p=d.length>0?this._createEffectsOverrideFunction(_,d):_;const y=[];switch(xt.E0.findApplicableOverrides(f,this._primitiveOverrides,y),f.type){case"CIMSolidFill":this._analyzeSolidFill(f,p);break;case"CIMPictureFill":this._analyzePictureFill(f,p);break;case"CIMHatchFill":this._analyzeHatchFill(f,p);break;case"CIMGradientFill":this._analyzeGradientFill(f,p);break;case"CIMSolidStroke":this._analyzeSolidStroke(f,p,c,h);break;case"CIMPictureStroke":this._analyzePictureStroke(f,p,c,h);break;case"CIMGradientStroke":this._analyzeGradientStroke(f,p,c,h);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":{"CIMLineSymbol"===t.type&&(l=Ge(f));const o=[],a=f.primitiveName;a&&o.push(a),this._analyzeMarker(f,p,null,o,l,h,1,e,i,s,r,n);break}default:Re.error("Cannot analyze CIM layer",f.type)}}}_analyzeSolidFill(t,e){const i=t.primitiveName,s=(0,Et.NO)(t.color),[r,n]=this._analyzePrimitiveOverrides(i,e,null,null),o=(0,Pe.hP)(JSON.stringify(t)+n).toString();this._cimLayers.push({type:"fill",templateHash:o,materialHash:r?()=>o:o,cim:t,materialOverrides:null,colorLocked:!!t.colorLocked,color:this._createOverrideFunction(i,"Color",s,Xe),height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,effects:e,applyRandomOffset:!1,sampleAlphaOnly:!0})}_analyzePictureFill(t,e){const i=t.primitiveName,s=(0,Et.cO)(t),[r,n]=this._analyzePrimitiveOverrides(i,e,null,null),o=(0,Pe.hP)(JSON.stringify(t)+n).toString(),a=(0,Pe.hP)(`${t.url}${JSON.stringify(t.colorSubstitutions)}`).toString(),l=(0,Et.NA)(t.height,Ce.v$);let h=(0,Et.NA)(t.scaleX,1);if("width"in t&&"number"==typeof t.width){const e=t.width;let i=1;const s=this._resourceManager.getResource(t.url);null!=s&&(i=s.width/s.height),h/=i*(l/e)}this._cimLayers.push({type:"fill",templateHash:o,materialHash:r?()=>a:a,cim:t,materialOverrides:null,colorLocked:!!t.colorLocked,effects:e,color:this._createOverrideFunction(i,"TintColor",s,Xe),height:this._createOverrideFunction(i,"Height",l),scaleX:this._createOverrideFunction(i,"ScaleX",h),angle:this._createOverrideFunction(i,"Rotation",(0,Et.NA)(t.rotation)),offsetX:this._createOverrideFunction(i,"OffsetX",(0,Et.NA)(t.offsetX)),offsetY:this._createOverrideFunction(i,"OffsetY",(0,Et.NA)(t.offsetY)),url:t.url,applyRandomOffset:!1,sampleAlphaOnly:!1})}_analyzeHatchFill(t,e){const i=t.primitiveName,s=this._analyzeMaterialOverrides(i,["Rotation","OffsetX","OffsetY"]);let[r,n]=this._analyzePrimitiveOverrides(i,e,null,null);const o=(0,Pe.hP)(JSON.stringify(t)+n).toString(),a=(0,Pe.hP)(`${t.separation}${JSON.stringify(t.lineSymbol)}`).toString();let l={r:255,g:255,b:255,a:1},h=!1;const c=t.lineSymbol?.symbolLayers?.find((t=>"CIMSolidStroke"===t.type&&null!=this._poMap[t.primitiveName]?.Color));if(c){l=(0,Et.NO)(c.color),l=this._createOverrideFunction(c.primitiveName,"Color",l,Xe);const t="function"==typeof l;r=r||t,h=null!=c.color||t}this._cimLayers.push({type:"fill",templateHash:o,materialHash:r&&s?this._createMaterialHashFunction(a,s):a,cim:t,materialOverrides:s,colorLocked:!!t.colorLocked,effects:e,color:l,height:this._createOverrideFunction(i,"Separation",(0,Et.NA)(t.separation,Ce.rC)),scaleX:1,angle:this._createOverrideFunction(i,"Rotation",(0,Et.NA)(t.rotation)),offsetX:this._createOverrideFunction(i,"OffsetX",(0,Et.NA)(t.offsetX)),offsetY:this._createOverrideFunction(i,"OffsetY",(0,Et.NA)(t.offsetY)),applyRandomOffset:!1,sampleAlphaOnly:!0,hasUnresolvedReplacementColor:!h})}_analyzeGradientFill(t,e){const i=t.primitiveName,[s,r]=this._analyzePrimitiveOverrides(i,e,null,null),n=(0,Pe.hP)(JSON.stringify(t)+r).toString();this._cimLayers.push({type:"fill",templateHash:n,materialHash:s?()=>n:n,cim:t,materialOverrides:null,colorLocked:!!t.colorLocked,effects:e,color:{r:128,g:128,b:128,a:1},height:0,angle:0,offsetX:0,offsetY:0,scaleX:1,applyRandomOffset:!1,sampleAlphaOnly:!1})}_analyzeSolidStroke(t,e,i,s){const r=t.primitiveName,n=(0,Et.NO)(t.color),o=(0,Et.NA)(t.width,Ce.KM),a=We(t.capStyle),l=Ve(t.joinStyle),h=t.miterLimit,[c,u]=this._analyzePrimitiveOverrides(r,e,null,null),f=(0,Pe.hP)(JSON.stringify(t)+u).toString();let _,m;if(e&&e instanceof Array&&e.length>0){const t=e[e.length-1];if("CIMGeometricEffectDashes"===t.type&&"NoConstraint"===t.lineDashEnding&&null===t.offsetAlongLine){const t=(e=[...e]).pop();_=t.dashTemplate,m=t.scaleDash}}this._cimLayers.push({type:"line",templateHash:f,materialHash:c?()=>f:f,cim:t,materialOverrides:null,isOutline:i,colorLocked:!!t.colorLocked,effects:e,color:this._createOverrideFunction(r,"Color",n,Xe),width:this._createOverrideFunction(r,"Width",o),cap:this._createOverrideFunction(r,"CapStyle",a),join:this._createOverrideFunction(r,"JoinStyle",l),miterLimit:h&&this._createOverrideFunction(r,"MiterLimit",h),referenceWidth:s,zOrder:Be(t.name),dashTemplate:_,scaleDash:m,sampleAlphaOnly:!0})}_analyzePictureStroke(t,e,i,s){const r=(0,Pe.hP)(`${t.url}${JSON.stringify(t.colorSubstitutions)}`).toString(),n=t.primitiveName,o=(0,Et.cO)(t),a=(0,Et.NA)(t.width,Ce.KM),l=We(t.capStyle),h=Ve(t.joinStyle),c=t.miterLimit,[u,f]=this._analyzePrimitiveOverrides(n,e,null,null),_=(0,Pe.hP)(JSON.stringify(t)+f).toString();this._cimLayers.push({type:"line",templateHash:_,materialHash:u?()=>r:r,cim:t,materialOverrides:null,isOutline:i,colorLocked:!!t.colorLocked,effects:e,color:this._createOverrideFunction(n,"TintColor",o,Xe),width:this._createOverrideFunction(n,"Width",a),cap:this._createOverrideFunction(n,"CapStyle",l),join:this._createOverrideFunction(n,"JoinStyle",h),miterLimit:c&&this._createOverrideFunction(n,"MiterLimit",c),referenceWidth:s,zOrder:Be(t.name),dashTemplate:null,scaleDash:!1,url:t.url,sampleAlphaOnly:!1})}_analyzeGradientStroke(t,e,i,s){const r=t.primitiveName,n=(0,Et.NA)(t.width,Ce.KM),o=We(t.capStyle),a=Ve(t.joinStyle),l=t.miterLimit,[h,c]=this._analyzePrimitiveOverrides(r,e,null,null),u=(0,Pe.hP)(JSON.stringify(t)+c).toString();this._cimLayers.push({type:"line",templateHash:u,materialHash:h?()=>u:u,cim:t,materialOverrides:null,isOutline:i,colorLocked:!!t.colorLocked,effects:e,color:{r:128,g:128,b:128,a:1},width:this._createOverrideFunction(r,"Width",n),cap:this._createOverrideFunction(r,"CapStyle",o),join:this._createOverrideFunction(r,"JoinStyle",a),miterLimit:l&&this._createOverrideFunction(r,"MiterLimit",l),referenceWidth:s,zOrder:Be(t.name),dashTemplate:null,scaleDash:!1,sampleAlphaOnly:!1})}_analyzeMarker(t,e,i,s,r,n,o,a,l,h,c,u,f=!1){if(this._analyzeMarkerInsidePolygon(t,e))return;const _=(0,Et.NA)(t.size,Ce.w7),m=(0,Et.NA)(t.rotation),d=(0,Et.NA)(t.offsetX),p=(0,Et.NA)(t.offsetY);let y=this._createOverrideFunction(t.primitiveName,"Size",_),g=this._createOverrideFunction(t.primitiveName,"Rotation",m),x=this._createOverrideFunction(t.primitiveName,"OffsetX",d),M=this._createOverrideFunction(t.primitiveName,"OffsetY",p);y=this._transformSize(y,o),g=this._transformRotation(g,!!t.rotateClockwise,h);const b=this._transformOffsetX(x,M,h,o,c),v=this._transformOffsetY(x,M,h,o,u);switch(x=b,M=v,t.type){case"CIMPictureMarker":this._analyzePictureMarker(t,e,i,s,r,n,y,g,x,M,t.colorLocked||f);break;case"CIMVectorMarker":this._analyzeVectorMarker(t,e,i,s,r,n,o,a,y,g,x,M,t.colorLocked||f)}}_analyzeMarkerInsidePolygon(t,e){const{markerPlacement:i,type:s}=t;if(!i||"CIMMarkerPlacementInsidePolygon"!==i.type)return!1;if("CIMVectorMarker"===s||"CIMPictureMarker"===s){const r=t.primitiveName;if(r){const[t,i]=this._analyzePrimitiveOverrides([r],e,null,null);if(t)return!1}const n=i.primitiveName;if(n){const[t,i]=this._analyzePrimitiveOverrides([n],e,null,null);if(t)return!1}if("CIMVectorMarker"===s){const{markerGraphics:e}=t;if(e)for(const t of e){const{symbol:e}=t;if("CIMPolygonSymbol"===e?.type&&e.symbolLayers){const{symbolLayers:t}=e;for(const e of t)if("CIMSolidStroke"===e.type)return!1}}}else{const{animatedSymbolProperties:e}=t;if(e)return!1}}const r=i,n=Math.abs(r.stepX),o=Math.abs(r.stepY);if(0===n||0===o)return!0;const a=new Set(["Rotation","OffsetX","OffsetY"]),l=this._primitiveOverrides.filter((e=>e.primitiveName!==t.primitiveName||!a.has(e.propertyName))),h="url"in t&&"string"==typeof t.url?t.url:void 0,c=(0,Pe.hP)(JSON.stringify(t)).toString();let u,f,_=null;if("Random"===i.gridType){const t=(0,N.Wz)(w.KA),e=Math.max(Math.floor(t/n),1),i=Math.max(Math.floor(t/o),1);u=o*i,_=t=>t?t*i:0,f=e*n/u}else i.shiftOddRows?(u=2*o,_=t=>t?2*t:0,f=n/o*.5):(u=o,_=null,f=n/o);const m=(0,Et.cO)(t);return this._cimLayers.push({type:"fill",templateHash:c,materialHash:c,cim:t,materialOverrides:l,colorLocked:!!t.colorLocked,effects:e,color:m,height:this._createOverrideFunction(r.primitiveName,"StepY",u,_),scaleX:f,angle:r.gridAngle,offsetX:(0,Et.NA)(r.offsetX),offsetY:(0,Et.NA)(r.offsetY),url:h,applyRandomOffset:"Random"===i.gridType,sampleAlphaOnly:!h,hasUnresolvedReplacementColor:!0}),!0}_analyzePictureMarker(t,e,i,s,r,n,o,a,l,h,c){let u=(0,Et.NA)(t.scaleX,1);const f=(0,Et.cO)(t),_=(0,Pe.hP)(`${t.url}${JSON.stringify(t.colorSubstitutions)}${JSON.stringify(t.animatedSymbolProperties)}`).toString();i||(i=this._createMarkerPlacementOverrideFunction(t.markerPlacement));const m=this._createAnimatedSymbolPropertiesOverrideFunction(t.animatedSymbolProperties),[d,p]=this._analyzePrimitiveOverrides(s,e,i,m),y=(0,Pe.hP)(JSON.stringify(t)+p).toString(),g=t.anchorPoint??{x:0,y:0};if("width"in t&&"number"==typeof t.width){const e=t.width;let i=1;const s=this._resourceManager.getResource(t.url);null!=s&&(i=s.width/s.height),u/=i*((0,Et.NA)(t.size)/e)}function x(t,e){return null!=m?(0,Et.hf)(m,t,e):null}const M=t.animatedSymbolProperties&&!0===t.animatedSymbolProperties.randomizeStartTime?(t,e,i,s)=>{const r=function(t){return Math.floor(function(t,e){let i;if("string"==typeof t)i=(0,Pe.hP)(t+`-seed(${e})`);else{let s=12;i=t^e;do{i=107*(i>>8^i)+s|0}while(0!=--s)}return(1+i/(1<<31))/2}(t,Fe)*Ne)}(s??0),n=x(t,e);return _+`-MATERIALGROUP(${r})`+`-ASP(${JSON.stringify(n)})`}:d?(t,e)=>{const i=x(t,e);return _+`-ASP(${JSON.stringify(i)})`}:_;this._cimLayers.push({type:"marker",templateHash:y,materialHash:M,cim:t,materialOverrides:null,colorLocked:!!t.colorLocked||!!c,effects:e,scaleSymbolsProportionally:!1,alignment:r,size:o,scaleX:this._createOverrideFunction(t.primitiveName,"ScaleX",u),rotation:a,offsetX:l,offsetY:h,color:this._createOverrideFunction(t.primitiveName,"TintColor",f,Xe),anchorPoint:{x:g.x,y:g.y},isAbsoluteAnchorPoint:"Relative"!==t.anchorPointUnits,outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,frameHeight:0,rotateClockwise:!1,referenceSize:n,sizeRatio:1,markerPlacement:i,url:t.url,animatedSymbolProperties:m})}_analyzeVectorMarker(t,e,i,s,r,n,o,a,l,h,c,u,f){const _=t.markerGraphics;if(!_)return;const m=t.frame;let d=0,p=1;t.scaleSymbolsProportionally&&m&&(d=m.ymax-m.ymin,p=this._transformSize(l,1/d)),p=this._transformSize(p,o),i||(i=this._createMarkerPlacementOverrideFunction(t.markerPlacement));for(const o of _)if(o){const _=o.symbol;if(!_)continue;const y=o.primitiveName;y&&s.push(y);let g=c,x=u;if(("CIMPointSymbol"===_.type||"CIMTextSymbol"===_.type)&&m){let e=0,i=0;const s=o.geometry;"x"in s&&"y"in s&&(e+=s.x-.5*(m.xmin+m.xmax),i+=s.y-.5*(m.ymin+m.ymax));const r=t.anchorPoint;r&&("Absolute"===t.anchorPointUnits?(e-=r.x,i-=r.y):m&&(e-=(m.xmax-m.xmin)*r.x,i-=(m.ymax-m.ymin)*r.y)),g=this._transformOffsetX(e,i,h,p,c),x=this._transformOffsetY(e,i,h,p,u)}switch(_.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":a||Je(_)?this._analyzeMultiLayerGraphicNonSDF(t,e,i,null,o,s,r,n,d,!!f||!!t.colorLocked):this._analyzeMultiLayerGraphic(t,e,i,null,o,s,r,n,d,p,l,h,g,x,!!f||!!t.colorLocked);break;case"CIMTextSymbol":this._analyzeTextGraphic(t,e,i,o,s,r,n,d,p,l,h,g,x,!!f||!!t.colorLocked)}y&&s.pop()}}_analyzeMultiLayerGraphic(t,e,i,s,r,n,o,a,l,h,c,u,f,_,m){const d=r.symbol,p=d.symbolLayers;if(!p)return;let y=p.length;if(He(p))return void this._analyzeCompositeMarkerGraphic(t,e,i,s,r,p,n,o,a,l,c,u,f,_,!!m||!!t.colorLocked);const g=this._resourceManager.geometryEngine,x=Mt.applyEffects(d.effects,r.geometry,g);if(x)for(;y--;){const d=p[y];if(!d||!1===d.enable)continue;const M=d.primitiveName;switch(M&&n.push(M),d.type){case"CIMSolidFill":case"CIMSolidStroke":{const h=Mt.applyEffects(d.effects,x,g),p=Oe(h);if(!p)continue;const y="Relative"!==t.anchorPointUnits,[b,v,S]=Ae(p,t.frame,t.size,t.anchorPoint,y),P="CIMSolidFill"===d.type,w={type:"sdf",geom:h,asFill:P},C=d.path,L=P?(0,Et.NO)((0,Et.W7)(d)):null==C?(0,Et.NO)((0,Et.$Z)(d)):{r:0,g:0,b:0,a:0},k=P?{r:0,g:0,b:0,a:0}:(0,Et.NO)((0,Et.$Z)(d)),I=(0,Et.F)(d)??0;if(!P&&!I)break;const z=r.primitiveName;let T=null;P&&!d.colorLocked&&(T=this._createOverrideFunction(z,"FillColor",L,Xe));let O=null;P||d.colorLocked||(O=this._createOverrideFunction(z,"StrokeColor",k,Xe));const A=this._createOverrideFunction(z,"StrokeWidth",I);let E=!1,F="";for(const t of this._primitiveOverrides)n.includes(t.primitiveName)&&(null!=t.value?F+=`-${t.primitiveName}-${t.propertyName}-${JSON.stringify(t.value)}`:t.valueExpressionInfo&&(E=!0));(null!=e&&"function"==typeof e||null!=i&&"function"==typeof i)&&(E=!0),((0,Et.wO)(c)||(0,Et.wO)(u)||(0,Et.wO)(f)||(0,Et.wO)(_))&&(E=!0);const N=JSON.stringify({...t,markerGraphics:null}),R=(0,Pe.hP)(JSON.stringify(w)+C).toString(),W=(0,Pe.hP)(JSON.stringify(r)+JSON.stringify(d)+N+F).toString();this._cimLayers.push({type:"marker",templateHash:W,materialHash:E?()=>R:R,cim:w,materialOverrides:null,colorLocked:!!d.colorLocked||!!m,effects:e,scaleSymbolsProportionally:!!t.scaleSymbolsProportionally,alignment:o,anchorPoint:{x:v,y:S},isAbsoluteAnchorPoint:y,size:c,rotation:u,offsetX:f,offsetY:_,scaleX:1,frameHeight:l,rotateClockwise:!1,referenceSize:a,sizeRatio:b,color:(0,Et.wO)(T)?T:this._createOverrideFunction(M,"Color",L,Xe),outlineColor:(0,Et.wO)(O)?O:this._createOverrideFunction(M,"Color",k,Xe),outlineWidth:(0,Et.wO)(A)?A:this._createOverrideFunction(M,"Width",I),markerPlacement:i,animatedSymbolProperties:s,path:C});break}case"CIMVectorMarker":d.markerPlacement?this._analyzeMultiLayerGraphicNonSDF(t,e,i,s,r,n,o,a,l,!!m||!!d.colorLocked):this._analyzeMarker(d,e,i,n,o,a,h,!1,c,u,f,_,!!m||!!t.colorLocked);break;default:this._analyzeMultiLayerGraphicNonSDF(t,e,i,s,r,n,o,a,l,!!m||!!t.colorLocked)}M&&n.pop()}}_analyzeTextGraphic(t,e,i,s,r,n,o,a,l,h,c,u,f,_){xt.E0.findApplicableOverrides(s,this._primitiveOverrides,[]);const m=s.geometry;if(!("x"in m)||!("y"in m))return;const d=s.symbol,p=(0,Et.BX)(d),y=(0,Et.wi)(d.fontStyleName),g=(0,ve.BN)(d.fontFamilyName);d.font={family:g,decoration:p,...y};let x=(0,Et.NA)(d.height,Ce.zV),M=(0,Et.NA)(d.angle),b=(0,Et.NA)(d.offsetX),v=(0,Et.NA)(d.offsetY);x=this._transformSize(x,l),M=this._transformRotation(M,!1,c);const S=this._transformOffsetX(b,v,c,l,u),P=this._transformOffsetY(b,v,c,l,f);b=S,v=P;const w=(0,Et.NO)((0,Et.W7)(d));let C=(0,Et.NO)((0,Et.$Z)(d)),L=(0,Et.F)(d)??0;L||(C=(0,Et.NO)((0,Et.W7)(d.haloSymbol)),L=(0,Et.NA)(d.haloSize)),L=this._transformSize(L,l);let k=!1;if(d.symbol?.symbolLayers)for(const t of d.symbol.symbolLayers)null!=(0,Et.W7)(t)&&(k=!!t.colorLocked);const I=s.primitiveName;let z=null;k||(z=this._createOverrideFunction(I,"Color",w,Xe));let T=null,O=null,A=0;if(d.callout&&"CIMBackgroundCallout"===d.callout.type){const t=d.callout;if(t.backgroundSymbol){const e=t.backgroundSymbol.symbolLayers;if(e)for(const t of e)"CIMSolidFill"===t.type?T=(0,Et.NO)(t.color):"CIMSolidStroke"===t.type&&(O=(0,Et.NO)(t.color),A=(0,Et.NA)(t.width,Ce.KM))}}const[E,F]=this._analyzePrimitiveOverrides(r,e,i,null),N=JSON.stringify(t.effects)+Number(t.colorLocked||_).toString()+JSON.stringify(t.anchorPoint)+t.anchorPointUnits+JSON.stringify(t.markerPlacement)+t.size.toString(),R=(0,Pe.hP)(JSON.stringify(s)+N+F).toString();let W=this._createOverrideFunction(s.primitiveName,"TextString",s.textString??"",Et.QI,d.textCase);if(null==W)return;const{fontStyleName:V}=d,G=g+(V?"-"+V.toLowerCase():"-regular"),D=G;"string"==typeof W&&W.includes("[")&&d.fieldMap&&(W=(0,Et.Qs)(d.fieldMap,W,d.textCase)),this._cimLayers.push({type:"text",templateHash:R,materialHash:E||"function"==typeof W||/\[(.*?)\]/.test(W)?(t,e,i)=>D+"-"+(0,Et.hf)(W,t,e,i):D+"-"+(0,Pe.hP)(W),cim:d,materialOverrides:null,colorLocked:!!_||!!k,effects:e,alignment:n,anchorPoint:{x:0,y:0},isAbsoluteAnchorPoint:"Relative"!==t.anchorPointUnits,fontName:G,decoration:p,weight:y.weight,style:y.style,size:x,angle:M,offsetX:b,offsetY:v,horizontalAlignment:(0,Et.X_)(d.horizontalAlignment),verticalAlignment:(0,Et.FG)(d.verticalAlignment),text:W,color:(0,Et.wO)(z)?z:w,outlineColor:C,outlineSize:L,backgroundColor:T,borderLineColor:O,borderLineWidth:A,lineWidth:null,referenceSize:o,sizeRatio:1,markerPlacement:i})}_analyzeMultiLayerGraphicNonSDF(t,e,i,s,r,n,o,a,l,h){const c=this._buildSimpleMarker(t,r),u=t.primitiveName,f=this._analyzeMaterialOverrides(u,["Rotation","OffsetX","OffsetY"]),[_,m]=this._analyzePrimitiveOverrides(n,null,null,null),[d,p,y]=xt.B$.getTextureAnchor(c,this._resourceManager),g=(0,Et.NA)(t.rotation),x=(0,Et.NA)(t.offsetX),M=(0,Et.NA)(t.offsetY),b=(0,Pe.hP)(JSON.stringify(c)+m).toString(),v=f&&f.length>0||null!=e&&"function"==typeof e;this._cimLayers.push({type:"marker",templateHash:b,materialHash:v&&f?this._createMaterialHashFunction(b,f):b,cim:c,materialOverrides:f,colorLocked:!!t.colorLocked||!!h,effects:e,scaleSymbolsProportionally:!!t.scaleSymbolsProportionally,alignment:o,anchorPoint:{x:d,y:p},isAbsoluteAnchorPoint:!1,size:(0,Et.NA)(t.size,Ce.w7),rotation:this._createOverrideFunction(u,"Rotation",g),offsetX:this._createOverrideFunction(u,"OffsetX",x),offsetY:this._createOverrideFunction(u,"OffsetY",M),color:{r:255,g:255,b:255,a:1},outlineColor:{r:0,g:0,b:0,a:0},outlineWidth:0,scaleX:1,frameHeight:l,rotateClockwise:!!t.rotateClockwise,referenceSize:a,sizeRatio:y/(0,N.F2)(t.size),markerPlacement:i,animatedSymbolProperties:s,avoidSDFRasterization:!0})}_buildSimpleMarker(t,e){return{type:t.type,enable:!0,name:t.name,colorLocked:t.colorLocked,primitiveName:t.primitiveName,anchorPoint:t.anchorPoint,anchorPointUnits:t.anchorPointUnits,offsetX:0,offsetY:0,rotateClockwise:t.rotateClockwise,rotation:0,size:t.size,billboardMode3D:t.billboardMode3D,depth3D:t.depth3D,frame:t.frame,markerGraphics:[e],scaleSymbolsProportionally:t.scaleSymbolsProportionally,respectFrame:t.respectFrame,clippingPath:t.clippingPath}}_analyzeCompositeMarkerGraphic(t,e,i,s,r,n,o,a,l,h,c,u,f,_,m){const d=r.geometry,p=n[0],y=n[1],g=Oe(d);if(!g)return;const x="Relative"!==t.anchorPointUnits,[M,b,v]=Ae(g,t.frame,t.size,t.anchorPoint,x),S={type:"sdf",geom:d,asFill:!0},P=y.path,w=y.primitiveName,C=p.primitiveName,L=(0,Et.NO)(y.color),k=(0,Et.NO)(p.color),I=(0,Et.NA)(p.width,Ce.KM),z=r.primitiveName;let T=null;y.colorLocked||m||(T=this._createOverrideFunction(z,"FillColor",L,Xe));let O=null;p.colorLocked||m||(O=this._createOverrideFunction(z,"StrokeColor",k,Xe));const A=this._createOverrideFunction(z,"StrokeWidth",I);let E=!1,F="";for(const t of this._primitiveOverrides)(t.primitiveName===w||t.primitiveName===C||o.includes(t.primitiveName))&&(null!=t.value?F+=`-${t.primitiveName}-${t.propertyName}-${JSON.stringify(t.value)}`:t.valueExpressionInfo&&(E=!0));null!=i&&"function"==typeof i&&(E=!0),((0,Et.wO)(c)||(0,Et.wO)(u)||(0,Et.wO)(f)||(0,Et.wO)(_))&&(E=!0);const N=JSON.stringify({...t,markerGraphics:null}),R=(0,Pe.hP)(JSON.stringify(S)+P).toString(),W=(0,Pe.hP)(JSON.stringify(r)+JSON.stringify(y)+JSON.stringify(p)+N+F).toString();this._cimLayers.push({type:"marker",templateHash:W,materialHash:E?()=>R:R,cim:S,materialOverrides:null,colorLocked:!!m,effects:e,scaleSymbolsProportionally:!!t.scaleSymbolsProportionally,alignment:a,anchorPoint:{x:b,y:v},isAbsoluteAnchorPoint:x,size:c,rotation:u,offsetX:f,offsetY:_,scaleX:1,frameHeight:h,rotateClockwise:!1,referenceSize:l,sizeRatio:M,color:(0,Et.wO)(T)?T:this._createOverrideFunction(w,"Color",L,Xe),outlineColor:(0,Et.wO)(O)?O:this._createOverrideFunction(C,"Color",k,Xe),outlineWidth:(0,Et.wO)(A)?A:this._createOverrideFunction(C,"Width",I),markerPlacement:i,path:P,animatedSymbolProperties:s})}_createMaterialHashFunction(t,e){const i=this._info?.geometryType;if(i){const t=this._poMap;for(const s of e)if(s.valueExpressionInfo){const e=t[s.primitiveName]&&t[s.primitiveName][s.propertyName];e instanceof we.mz&&(s.fn=(t,s,r)=>(0,Ee.Z)(e,t,{$view:r},i,s))}}return(i,s,r)=>{for(const t of e)t.fn&&(t.value=t.fn(i,s,r));return(0,Pe.hP)(t+xt.E0.buildOverrideKey(e)).toString()}}_setPoMap(t,e,i){let s;this._poMap[t]?s=this._poMap[t]:(s={},this._poMap[t]=s),s[e]=i}_createOverrideFunction(t,e,i,s,r){if(null==t)return i;const n=this._poMap[t];if(null==n)return i;const o=n[e];if("string"==typeof o||"number"==typeof o||o instanceof Array)return s?s.call(null,o,r):o;const a=this._info?.geometryType;return null!=o&&o instanceof we.mz&&null!=a?(t,e,n)=>{let l=(0,Ee.Z)(o,t,{$view:n},a,e);return null!==l&&s&&(l=s.call(null,l,r)),null!==l?l:i}:i}_createEffectsOverrideFunction(t,e){const i=this._poMap,s=this._info?.geometryType;for(const t of e)if(t.valueExpressionInfo&&s){const e=i[t.primitiveName]&&i[t.primitiveName][t.propertyName];e instanceof we.mz&&(t.fn=(t,i,r)=>(0,Ee.Z)(e,t,{$view:r},s,i))}return(i,s,r)=>{for(const t of e)t.fn&&(t.value=t.fn(i,s,r));const n=[];for(let i of t){const t=i?.primitiveName;if(t){let s=!1;for(const r of e)if(r.primitiveName===t){const t=Ue(r.propertyName);null!=r.value&&r.value!==i[t]&&(s||(i=(0,Se.d9)(i),s=!0),i[t]=r.value)}}n.push(i)}return n}}_createMarkerPlacementOverrideFunction(t){const e=[];if(xt.E0.findApplicableOverrides(t,this._primitiveOverrides,e),null==t||0===e.length)return t;const i=this._poMap,s=this._info?.geometryType;for(const t of e)if(t.valueExpressionInfo&&s){const e=i[t.primitiveName]&&i[t.primitiveName][t.propertyName];e instanceof we.mz&&(t.fn=(t,i,r)=>(0,Ee.Z)(e,t,{$view:r},s,i))}return(i,s,r)=>{for(const t of e)t.fn&&(t.value=t.fn(i,s,r));const n=(0,Se.d9)(t),o=t.primitiveName;for(const t of e)if(t.primitiveName===o){const e=Ue(t.propertyName);null!=t.value&&t.value!==n[e]&&(n[e]=t.value)}return n}}_createAnimatedSymbolPropertiesOverrideFunction(t){const e=[];if(xt.E0.findApplicableOverrides(t,this._primitiveOverrides,e),null==t||0===e.length)return t;const i=this._info?.geometryType;if(i){const t=this._poMap;for(const s of e)if(s.valueExpressionInfo){const e=t[s.primitiveName]&&t[s.primitiveName][s.propertyName];e instanceof we.mz&&(s.fn=(t,s,r)=>(0,Ee.Z)(e,t,{$view:r},i,s))}}return(i,s,r)=>{for(const t of e)t.fn&&(t.value=t.fn(i,s,r));const n=(0,Se.d9)(t),o=t.primitiveName;for(const t of e)if(t.primitiveName===o){const e=Ue(t.propertyName);if(null!=t.value){const i=ke(t.value,t.propertyName);i!==n[e]&&(n[e]=i)}}return n}}_analyzePrimitiveOverrides(t,e,i,s){let r=!1,n="";"string"==typeof t&&(t=[t]);for(const e of this._primitiveOverrides)t?.includes(e.primitiveName)&&(null!=e.value?n+=`-${e.primitiveName}-${e.propertyName}-${JSON.stringify(e.value)}`:e.valueExpressionInfo&&(r=!0));return null!=e&&"function"==typeof e&&(r=!0),null!=i&&"function"==typeof i&&(r=!0),null!=s&&"function"==typeof s&&(r=!0),[r,n]}_analyzeMaterialOverrides(t,e){return this._primitiveOverrides.filter((i=>i.primitiveName!==t||!e.includes(i.propertyName)))}_transformSize(t,e){return(0,Et.wO)(t)||(0,Et.wO)(e)?(i,s,r)=>((0,Et.wO)(t)?t(i,s,r):t)*((0,Et.wO)(e)?e(i,s,r):e):t*e}_transformRotation(t,e,i){return(0,Et.wO)(t)||(0,Et.wO)(i)?(s,r,n)=>{const o=(0,Et.wO)(t)?t(s,r,n):t,a=(0,Et.wO)(i)?i(s,r,n):i;return e?a-o:a+o}:e?i-t:i+t}_transformOffsetX(t,e,i,s,r){if(!((0,Et.wO)(t)||(0,Et.wO)(e)||(0,Et.wO)(i)||(0,Et.wO)(s)||(0,Et.wO)(r))){const n=i*Math.PI/180;if(n){const i=Math.cos(n),o=Math.sin(n);return(i*t-o*e)*s+r}return t*s+r}return(n,o,a)=>{let l=(0,Et.wO)(i)?i(n,o,a):i;const h=(0,Et.wO)(s)?s(n,o,a):s,c=(0,Et.wO)(t)?t(n,o,a):t,u=(0,Et.wO)(r)?r(n,o,a):r;return l?(l*=Math.PI/180,(Math.cos(l)*c-Math.sin(l)*((0,Et.wO)(e)?e(n,o,a):e))*h+u):c*h+u}}_transformOffsetY(t,e,i,s,r){if(!((0,Et.wO)(t)||(0,Et.wO)(e)||(0,Et.wO)(i)||(0,Et.wO)(s)||(0,Et.wO)(r))){const n=i*Math.PI/180;if(n){const i=Math.cos(n);return(Math.sin(n)*t+i*e)*s+r}return e*s+r}return(n,o,a)=>{let l=(0,Et.wO)(i)?i(n,o,a):i;const h=(0,Et.wO)(s)?s(n,o,a):s,c=(0,Et.wO)(e)?e(n,o,a):e,u=(0,Et.wO)(r)?r(n,o,a):r;if(l){l*=Math.PI/180;const e=Math.cos(l);return(Math.sin(l)*((0,Et.wO)(t)?t(n,o,a):t)+e*c)*h+u}return c*h+u}}}function Be(t){if(t&&0===t.indexOf("Level_")){const e=parseInt(t.substr(6),10);if(!isNaN(e))return e}return 0}function Xe(t){if(!t||0===t.length)return null;const e=new be.Z(t).toRgba();return{r:e[0],g:e[1],b:e[2],a:e[3]}}function Ue(t){return t?t.charAt(0).toLowerCase()+t.substr(1):t}const He=t=>t&&2===t.length&&t[0].enable&&t[1].enable&&"CIMSolidStroke"===t[0].type&&"CIMSolidFill"===t[1].type&&null==t[0].path&&null==t[1].path&&!t[0].effects&&!t[1].effects;function Je(t){const e=t.symbolLayers;if(!e||2!==e.length)return!1;const i=e.find((t=>t.effects?.find((t=>"CIMGeometricEffectDashes"===t.type)))),s=e.find((t=>t.effects?.find((t=>"CIMGeometricEffectAddControlPoints"===t.type))));return!!i&&!!s}const Ye=o.Z.getLogger("esri.views.2d.engine.webgl.WGLDynamicMeshTemplate");class Ze extends bt{constructor(t){super(),this._ongoingMaterialRequestMap=new Map,this._materialCache=new Map,this._dynamicPropertyMap=new Map,this._cimLayer=t}async analyze(t,e,i,s,r){if(r&&0===r.length)return null;const n=r&&r.length>0,o=e.readLegacyFeature(),a=e.getObjectId(),l=this._materialCache,h=this._cimLayer.materialHash;if(!h)return Ye.error("A Dynamic mesh template must have a material hash value or function!"),null;const c="function"==typeof h?h(o,i,s,a):h,u=l.get(c);if(null!=u)return u;const f=this._ongoingMaterialRequestMap.get(c);if(f)return f;const _=this._cimLayer,m=function(t,e){if(!e||0===e.length)return t;const i=(0,Se.d9)(t);return xt.E0.applyOverrides(i,e),i}(_.cim,this._cimLayer.materialOverrides);m.mosaicHash=c;const{type:d,url:p}=_,y={cim:m,type:d,mosaicHash:c,url:p,size:null,dashTemplate:null,text:null,fontName:null,objectId:a,animatedSymbolProperties:null};switch(d){case"marker":y.size=(0,Et.hf)(_.size,o,i,s),y.animatedSymbolProperties=(0,Et.hf)(_.animatedSymbolProperties,o,i,s);break;case"line":y.dashTemplate=_.dashTemplate;break;case"text":y.text=(0,Et.hf)(_.text,o,i,s),y.fontName=(0,Et.hf)(_.fontName,o,i,s)}const g=t.getMosaicItem(y,r).then((t=>(n||(this._ongoingMaterialRequestMap.delete(c),l.set(c,t)),t))).catch((t=>(this._ongoingMaterialRequestMap.delete(c),Ye.error(".analyze()",t.message),null)));return n||this._ongoingMaterialRequestMap.set(c,g),g}}function Ke(t,e){if(t&&"name"in t){const i=t;return e&&e.error(new n.Z(i.name,i.message,i.details)),!1}return!0}class qe extends(Me(Ze)){constructor(t,e,i){if(super(t),this._minMaxZoom=(0,B.UJ)(Math.round(e*w.JS),Math.round(i*w.JS)),(0,Et.wO)(t.color)){const e=(e,i,s)=>{const r=t.color(e,i,s);return r&&(0,D.t2)(r)||0};this._dynamicPropertyMap.set("fillColor",e)}else{const e=t.color;this.fillColor=e&&(0,D.t2)(e)||0}const s="CIMMarkerPlacementInsidePolygon"===t.cim.placement?.type&&t.cim.placement.shiftOddRows?2:1,r=t.height;if((0,Et.wO)(r)){const t=(t,e,i)=>r(t,e,i)*s;this._dynamicPropertyMap.set("_height",t)}else this._height=(r||0)*s;const n=t.offsetX;if((0,Et.wO)(n)){const t=(t,e,i)=>(0,N.F2)(n(t,e,i));this._dynamicPropertyMap.set("_offsetX",t)}else this._offsetX=(0,N.F2)(n||0);const o=t.offsetY;if((0,Et.wO)(o)){const t=(t,e,i)=>(0,N.F2)(-o(t,e,i));this._dynamicPropertyMap.set("_offsetY",t)}else this._offsetY=(0,N.F2)(-o||0);const a=t.scaleX;(0,Et.wO)(a)?this._dynamicPropertyMap.set("_scaleX",a):this._scaleX=a||1;const l=t.angle;if((0,Et.wO)(l)){const t=(t,e,i)=>Ft(l(t,e,i));this._dynamicPropertyMap.set("_angle",t)}else this._angle=Ft(l)||0;if(null!=t.effects){const e=t.effects;(0,Et.wO)(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}this._cimFillLayer=t,this._bitset=(t.colorLocked?w.SQ:0)|(t.applyRandomOffset?w.Ux:0)|(t.sampleAlphaOnly?w.GS:0)|(t.hasUnresolvedReplacementColor?w.av:0),this._fillMaterialKey=t.materialKey}static fromCIMFill(t,e){const[i,s]=q(t.scaleInfo,e);return new qe(t,i,s)}bindFeature(t,e,i){const s=t.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,r)=>{this[r]=t(s,e,i)}));const r=X.dk.load(this._fillMaterialKey),n=this._materialCache,o=(0,this._cimFillLayer.materialHash)(s,e,i),a=n.get(o);let l=null;if(a&&Ke(a.spriteMosaicItem)&&(l=a.spriteMosaicItem),l){const{rect:t,width:e,height:i}=l,s=t.x+w.s4,n=t.y+w.s4,o=s+e,a=n+i;let h=(0,N.F2)(this._height);h<=0&&(h=a-n),h<w.oh&&(h*=w.Kg,this._bitset|=w.gV),h=Math.round(h);let c=(0,N.F2)(this._height/i*e);c<=0&&(c=o-s),c<w.oh&&(c*=w.Kg,this._bitset|=w.zE),c=Math.round(c);const u=this._scaleX,f=1;this.tl=(0,B.UJ)(s,n),this.br=(0,B.UJ)(o,a),this.aux21=(0,B.UJ)(c,h),this.aux22=(0,B.UJ)(this._offsetX,this._offsetY),this.aux3=(0,B.Jz)(u*w.Kg,f*w.Kg,this._angle,0),r.sdf=l.sdf,r.pattern=!0,r.textureBinding=l.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}}class $e extends(de(Ze)){constructor(t,e,i){super(t),this._minMaxZoom=(0,B.UJ)(Math.round(e*w.JS),Math.round(i*w.JS)),this._cimLineLayer=t;let s=0;(0,Et.wO)(t.width)||(s=.5*(0,N.F2)(t.width)),this._dynamicPropertyMap.set("_halfWidth",((e,i,r)=>(0,Et.wO)(t.width)?.5*(0,N.F2)(t.width(e,i,r)):s)),(0,Et.wO)(t.cap)?this._dynamicPropertyMap.set("_capType",t.cap):this._capType=t.cap,(0,Et.wO)(t.join)?this._dynamicPropertyMap.set("_joinType",t.join):this._joinType=t.join;const r=t.color;if((0,Et.wO)(r)){const t=(t,e,i)=>(0,D.t2)(r(t,e,i));this._dynamicPropertyMap.set("_fillColor",t)}else this._fillColor=r&&(0,D.t2)(r)||0;const n=t.miterLimit;if((0,Et.wO)(n)){const t=(t,e,i)=>K(n(t,e,i));this._dynamicPropertyMap.set("_miterLimitCosine",t)}else this._miterLimitCosine=K(n);if(null!=t.effects){const e=t.effects;(0,Et.wO)(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}this._scaleFactor=t.scaleFactor||1,this._isDashed=null!=t.dashTemplate;const o=t.colorLocked?w.SQ:0,a=t.scaleDash?w.Wq:0,l=t.sampleAlphaOnly?w.GS:0;this.tessellationProperties._bitset=o|a|l,this._materialKey=t.materialKey,this._initializeTessellator(!0)}static fromCIMLine(t,e){const[i,s]=q(t.scaleInfo,e);return new $e(t,i,s)}bindFeature(t,e,i){const s=t.readLegacyFeature();this._dynamicPropertyMap.forEach(((t,r)=>{this[r]=t(s,e,i)})),this._halfWidth*=this._scaleFactor;const r=this._materialCache,n=(0,this._cimLineLayer.materialHash)(s,e,i),o=r.get(n);let a=null;if(o&&Ke(o.spriteMosaicItem)&&(a=o.spriteMosaicItem),a){this._hasPattern=!0;const{rect:t,width:e,height:i}=a,s=t.x+w.s4,r=t.y+w.s4,n=s+e,o=r+i;this.tessellationProperties._tl=(0,B.UJ)(s,r),this.tessellationProperties._br=(0,B.UJ)(n,o)}else this._hasPattern=!1,this.tessellationProperties._tl=0,this.tessellationProperties._br=0;this.tessellationProperties._fillColor=this._fillColor,this.tessellationProperties._halfWidth=this._halfWidth,this.tessellationProperties.offset=0,this.tessellationProperties._halfReferenceWidth=this.tessellationProperties._halfWidth;const l=X.a.load(this._materialKey);a&&(l.sdf=a.sdf,l.pattern=!0,l.textureBinding=a.textureBinding),this._materialKey=l.data}}const je=(0,It.c)(),Qe=(0,W.c)();class ti extends(Tt(Ze)){constructor(t,e,i){super(t),this._cimMarkerLayer=t,this._minMaxZoom=(0,B.UJ)(Math.round(e*w.JS),Math.round(i*w.JS));const s=t.color;if((0,Et.wO)(s)){const t=(t,e,i)=>(0,D.t2)(s(t,e,i));this._dynamicPropertyMap.set("_fillColor",t)}else this._fillColor=(0,D.t2)(s);const r=t.outlineColor;if((0,Et.wO)(r)){const t=(t,e,i)=>(0,D.t2)(r(t,e,i));this._dynamicPropertyMap.set("_outlineColor",t)}else this._outlineColor=(0,D.t2)(r);const n=t.size;if((0,Et.wO)(n)){const t=(t,e,i)=>(0,N.F2)(n(t,e,i));this._dynamicPropertyMap.set("_size",t)}else this._size=(0,N.F2)(n)||0;const o=t.scaleX;(0,Et.wO)(o)?this._dynamicPropertyMap.set("_scaleX",o):this._scaleX=o;const a=t.offsetX;if((0,Et.wO)(a)){const t=(t,e,i)=>(0,N.F2)(a(t,e,i));this._dynamicPropertyMap.set("xOffset",t)}else this.xOffset=(0,N.F2)(a)||0;const l=t.offsetY;if((0,Et.wO)(l)){const t=(t,e,i)=>(0,N.F2)(l(t,e,i));this._dynamicPropertyMap.set("yOffset",t)}else this.yOffset=(0,N.F2)(l)||0;const h=t.outlineWidth;if((0,Et.wO)(h)){const t=(t,e,i)=>(0,N.F2)(h(t,e,i));this._dynamicPropertyMap.set("_outlineWidth",t)}else this._outlineWidth=(0,N.F2)(h)||0;const c=t.rotation;if((0,Et.wO)(c)?this._dynamicPropertyMap.set("_angle",c):this._angle=c||0,null!=t.effects){const e=t.effects;(0,Et.wO)(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}if(null!=t.markerPlacement){const e=t.markerPlacement;(0,Et.wO)(e)?this._dynamicPropertyMap.set("_markerPlacement",e):this._markerPlacement=e}this._scaleFactor=t.scaleFactor??1,this._bitSet=(t.alignment===V.v2.MAP?w.$6:w.yc)|(t.colorLocked?w.SQ:0)|(t.scaleSymbolsProportionally?w.rL:0),this._materialKey=t.materialKey}static fromCIMMarker(t,e){const[i,s]=q(t.scaleInfo,e);return new ti(t,i,s)}bindFeature(t,e,i){const s=t.readLegacyFeature(),r=t.getObjectId();this._dynamicPropertyMap.forEach(((t,r)=>{this[r]=t(s,e,i)}));const a=this._cimMarkerLayer.materialHash,l="function"==typeof a?a(s,e,i,r):a,h=this._materialCache.get(l);if(!h||!Ke(h.spriteMosaicItem)||!h.spriteMosaicItem)return void o.Z.getLogger("esri.views.2d.engine.webgl.WGLDynamicMarkerTemplate").error(new n.Z("mapview-cim","Encountered an error when binding feature"));const c=h.spriteMosaicItem,u=this._cimMarkerLayer.sizeRatio,f=c.width/c.height*this._scaleX,_=X.mE.load(this._materialKey);_.sdf=c.sdf,_.pattern=!0,_.textureBinding=c.textureBinding,this._materialKey=_.data;const m=this._cimMarkerLayer.rotateClockwise?this._angle:-this._angle,d=this._size,p=d*f,y=this.xOffset,g=this.yOffset;this.xOffset*=this._scaleFactor,this.yOffset*=this._scaleFactor;const x=this._cimMarkerLayer.scaleSymbolsProportionally&&this._cimMarkerLayer.frameHeight?this._size/(0,N.F2)(this._cimMarkerLayer.frameHeight):1,M=this._outlineWidth*x,b=(0,N.F2)(this._cimMarkerLayer.referenceSize);let v=0,S=0;const P=this._cimMarkerLayer.anchorPoint;P&&(this._cimMarkerLayer.isAbsoluteAnchorPoint?this._size&&(v=(0,N.F2)(P.x)/(this._size*f),S=(0,N.F2)(P.y)/this._size):(v=P.x,S=P.y)),this._anchorX=v,this._anchorY=S,this._sizeOutlineWidth=(0,B.Jz)(Math.round(Math.min(Math.sqrt(128*p),255)),Math.round(Math.min(Math.sqrt(128*d),255)),Math.round(Math.min(Math.sqrt(128*M),255)),Math.round(Math.min(Math.sqrt(128*b),255))),this.angle=m;const w=Math.round(64*u);this._bitestAndDistRatio=(0,B.UJ)(this._bitSet,w),this._computeSize(p,d,u,M,this._scaleFactor,c,_.hasSizeVV(),!0),this._applyTransformation(Qe,je),this.xOffset=y,this.yOffset=g}}function ei(t){if(null==t)return[];const e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=t.charCodeAt(i);return e}class ii extends(pt(Ze)){constructor(t,e,i){super(t),this._horizontalAlignment="center",this._verticalAlignment="middle",this._textToGlyphs=new Map,this._minMaxZoom=(0,B.UJ)(Math.round(e*w.JS),Math.round(i*w.JS));const s=t.scaleFactor||1;this._cimTextLayer=t;const r=t.color;if((0,Et.wO)(r)){const t=(t,e,i)=>(0,D.t2)(r(t,e,i));this._dynamicPropertyMap.set("_color",t)}else this._color=(0,D.t2)(r);const n=t.outlineColor;if((0,Et.wO)(n)){const t=(t,e,i)=>(0,D.t2)(n(t,e,i));this._dynamicPropertyMap.set("_haloColor",t)}else this._haloColor=(0,D.t2)(n);let o,a,l;if((0,Et.wO)(t.size)||(o=Math.min(Math.round((0,N.F2)(t.size*t.sizeRatio)),127)),this._dynamicPropertyMap.set("_size",((e,i,s)=>(0,Et.wO)(t.size)?Math.min(Math.round((0,N.F2)(t.size(e,i,s)*t.sizeRatio)),127):o)),(0,Et.wO)(t.outlineSize)){const e=(e,i,s)=>Math.min(Math.floor(5*(0,N.F2)(t.outlineSize(e,i,s)*t.sizeRatio)),127);this._dynamicPropertyMap.set("_haloSize",e)}else this._haloSize=Math.min(Math.floor(5*(0,N.F2)(t.outlineSize*t.sizeRatio)),127);if((0,Et.wO)(t.offsetX)||(a=Math.round((0,N.F2)(t.offsetX*t.sizeRatio))),this._dynamicPropertyMap.set("_xOffset",((e,i,s)=>(0,Et.wO)(t.offsetX)?Math.round((0,N.F2)(t.offsetX(e,i,s)*t.sizeRatio)):a)),(0,Et.wO)(t.offsetY)||(l=Math.round((0,N.F2)(t.offsetY*t.sizeRatio))),this._dynamicPropertyMap.set("_yOffset",((e,i,s)=>(0,Et.wO)(t.offsetY)?Math.round((0,N.F2)(t.offsetY(e,i,s)*t.sizeRatio)):l)),(0,Et.wO)(t.angle)?this._dynamicPropertyMap.set("_angle",t.angle):this._angle=t.angle,(0,Et.wO)(t.horizontalAlignment)?this._dynamicPropertyMap.set("_horizontalAlignment",t.horizontalAlignment):this._horizontalAlignment=t.horizontalAlignment,(0,Et.wO)(t.verticalAlignment)?this._dynamicPropertyMap.set("_verticalAlignment",t.verticalAlignment):this._verticalAlignment=t.verticalAlignment,null!=t.effects){const e=t.effects;(0,Et.wO)(e)?this._dynamicPropertyMap.set("_effects",e):this._effects=e}if(null!=t.markerPlacement){const e=t.markerPlacement;(0,Et.wO)(e)?this._dynamicPropertyMap.set("_markerPlacement",e):this._textPlacement=e}(0,Et.wO)(t.text)?this._dynamicPropertyMap.set("_text",t.text):this._text=t.text,this._backgroundColor=t.backgroundColor&&(0,D.t2)(t.backgroundColor),this._borderLineColor=t.borderLineColor&&(0,D.t2)(t.borderLineColor),this._borderLineSize=t.borderLineWidth,this._scaleFactor=s;const h=Math.min(Math.round((0,N.F2)(t.referenceSize*t.sizeRatio)),127);this._referenceSize=Math.round(Math.sqrt(256*h)),this._materialKey=t.materialKey;const c=X.qr.load(this._materialKey);c.sdf=!0,this._bitset=(t.alignment===V.v2.MAP?1:0)|(t.colorLocked?1:0)<<1,this._materialKey=c.data,this._decoration="none",this._lineHeight=1,this._lineWidth=512,this._isCIM=!0}static fromCIMText(t,e){const[i,s]=q(t.scaleInfo,e);return new ii(t,i,s)}async analyze(t,e,i,s){const r=e.readLegacyFeature(),n=function(t,e,i,s){return"string"==typeof t.text?t.text:"function"==typeof t.text?t.text(e,i,s)??"":""}(this._cimTextLayer,r,i,s),o=await super.analyze(t,e,i,s,ei(n));return o?.glyphMosaicItems&&this._textToGlyphs.set(n,o.glyphMosaicItems),o}bindFeature(t,e,i){const s=t.readLegacyFeature();if(this._dynamicPropertyMap.forEach(((t,r)=>{this[r]=t(s,e,i)})),!this._text||0===this._text.length)return void(this._shapingInfo=null);this._size*=this._scaleFactor,this._scale=this._size/w.iD,this._xOffset*=this._scaleFactor,this._yOffset*=this._scaleFactor,this._xAlignD=(0,G.kH)(this._horizontalAlignment??"center"),this._yAlignD=(0,G.b7)(this._verticalAlignment??"baseline");const r=this._textToGlyphs.get(this._text)??[];this.bindTextInfo(r,!1)}}class si extends(Me(bt)){constructor(t,e,i,s,r,n,o,a,l,h,c,u,f,_,m,d){super(),this._effects=_||void 0;const p=X.dk.load(t);e&&(p.sdf=e.sdf,p.pattern=!0,p.textureBinding=e.textureBinding),this.fillColor=i,this.tl=s,this.br=r,this.aux21=(0,B.UJ)(n,o),this.aux22=(0,B.UJ)(a,l),this.aux3=(0,B.Jz)(h,c,u,0),this._bitset=f,this._minMaxZoom=(0,B.UJ)(Math.round(m*w.JS),Math.round(d*w.JS)),this._materialKey=p.data}static fromCIMFill(t,e,i){const s=t.color,r=s&&(0,D.t2)(s)||0,n=t.materialKey,[o,a]=q(t.scaleInfo,i);let l=(t.colorLocked?w.SQ:0)|(t.applyRandomOffset?w.Ux:0)|(t.sampleAlphaOnly?w.GS:0)|(t.hasUnresolvedReplacementColor?w.av:0);if(!e)return new si(n,null,r,0,0,0,0,0,0,0,0,0,l,t.effects,o,a);const{rect:h,width:c,height:u}=e,f=t.scaleX||1,_=h.x+w.s4,m=h.y+w.s4,d=_+c,p=m+u,y=(0,N.F2)(t.height);let g=f*y;"CIMHatchFill"===t.cim.type&&(g*=c/u);let x=y;x<=0&&(x=p-m),x<w.oh&&(x*=w.Kg,l|=w.gV),x=Math.round(x);let M=g;M<=0&&(M=d-_),M<w.oh&&(M*=w.Kg,l|=w.zE),M=Math.round(M);const b=(0,N.F2)(t.offsetX||0),v=(0,N.F2)(-t.offsetY||0),S=(0,B.UJ)(_,m),P=(0,B.UJ)(d,p);return new si(n,e,r,S,P,M,x,b,v,w.Kg,w.Kg,Ft(t.angle),l,t.effects,o,a)}static fromSimpleFill(t,e,i=!1){const{color:s}=t,r=s&&"esriSFSNull"!==t.style&&(0,D.aH)(s)||0;let n=i?w.SQ:0;const o=t.materialKey;let a;if(e){const{rect:t,width:i,height:s,pixelRatio:l}=e,h=t.x+w.s4,c=t.y+w.s4,u=h+i,f=c+s,_=(0,B.UJ)(h,c),m=(0,B.UJ)(u,f);let d=i/l;d<w.oh&&(d*=w.Kg,n|=w.zE),d=Math.round(d);let p=s/l;p<w.oh&&(p*=w.Kg,n|=w.gV),p=Math.round(p),a=new si(o,e,r,_,m,d,p,0,0,w.Kg,w.Kg,0,n,null,0,U)}else a=new si(o,null,r,0,0,0,0,0,0,0,0,0,n,null,0,U);return a._maybeAddLineTemplate(t),a}static fromPictureFill(t,e,i=!1){const s=w.gr,{rect:r,width:n,height:o}=e,a=r.x+w.s4,l=r.y+w.s4,h=a+n,c=l+o,u=(0,B.UJ)(a,l),f=(0,B.UJ)(h,c);let _=i?w.SQ:0,m=(0,N.F2)(t.width);m<w.oh&&(m*=w.Kg,_|=w.zE),m=Math.round(m);let d=(0,N.F2)(t.height);d<w.oh&&(d*=w.Kg,_|=w.gV),d=Math.round(d);const p=(0,N.F2)(t.xoffset),y=(0,N.F2)(-t.yoffset),g=t.materialKey,x=new si(g,e,s,u,f,m,d,p,y,w.Kg*t.xscale,w.Kg*t.yscale,0,_,null,0,U);return x._maybeAddLineTemplate(t),x}}class ri{constructor(){this._resolver=null}isHeld(){return!!this._resolver}async acquire(){this._resolver?(await this._resolver.promise,await this.acquire()):this._resolver=(0,l.hh)()}release(){const t=this._resolver;this._resolver=null,t?.resolve()}}const ni={marker:m.LW.MARKER,fill:m.LW.FILL,line:m.LW.LINE,text:m.LW.TEXT};class oi{constructor(t,e,i,s){const r={minScale:e?.minScale,maxScale:e?.maxScale},n=function(t){return t.minScale||t.maxScale?t.minScale+"-"+t.maxScale:""}(r);this.layers=t,this.data=e,this.hash=this._createHash()+n,this.rendererKey=i;const o={isOutline:!1,placement:null,symbologyType:m.mD.DEFAULT,vvFlags:i};for(const e of t){const t=ni[e.type];o.isOutline="line"===e.type&&e.isOutline,e.materialKey=(0,X.jj)(t,o),e.maxVVSize=s,e.scaleInfo=r,e.templateHash+=n}}get type(){return"expanded-cim"}_createHash(){let t="";for(const e of this.layers)t+=e.templateHash;return t}}const ai=async(t,e,i)=>{const s=new De(i,e);return new oi(await s.analyzeSymbolReference(t.data,!1),t.data,t.rendererKey,t.maxVVSize)};async function li(t,e,s,r){if(!t)return null;if("cim"===t.type)return ai(t,e,s);if("web-style"===t.type){const{fetchCIMSymbolReference:n}=await Promise.all([i.e(9790),i.e(8522),i.e(7307)]).then(i.bind(i,61908)),o={type:"cim",data:await n(t,null,r)??void 0,rendererKey:t.rendererKey,maxVVSize:t.maxVVSize};return ai(o,e,s)}return t}function hi(t){if(!t)return null;const{avoidSDFRasterization:e,type:i,cim:s,url:r,materialHash:n,maxVVSize:o}=t,a={cim:s,type:i,mosaicHash:n,url:r,size:null,dashTemplate:null,path:null,text:null,fontName:null,animatedSymbolProperties:null,avoidSDFRasterization:e};switch(i){case"marker":o&&"size"in s&&(s.size=Math.max(o,s.size)),a.size=t.size,a.path=t.path,a.animatedSymbolProperties=t.animatedSymbolProperties;break;case"line":a.dashTemplate=t.dashTemplate;break;case"text":a.text=t.text,a.fontName=t.fontName}return a}const ci=o.Z.getLogger("esri.views.2d.engine.webgl.mesh.templates.WGLTemplateStore"),ui={sortKey:null,templates:new Array},fi={isOutline:!1,placement:null,symbologyType:m.mD.DEFAULT,vvFlags:0},_i={...At.eG,hash:JSON.stringify(At.eG),materialKey:(0,X.jj)(m.LW.MARKER,fi)},mi={...At.wW,hash:JSON.stringify(At.wW),materialKey:(0,X.jj)(m.LW.LINE,fi)},di={...At.lj,hash:JSON.stringify(At.lj),materialKey:(0,X.jj)(m.LW.FILL,fi)};function pi(t,e){const i=t.length;return t.push(null),e.then((e=>t[i]=e)),t}function yi(t){return null!=t&&!!(1&t)}class gi{constructor(t,e){this._idCounter=1,this._templateIdCounter=1,this._idToTemplateGroup=new Map,this._symbolToTemplate=new Map,this._fetchQueue=[],this._idToResolver=new Map,this._cimTemplateCache=new Map,this._cimAnalyses=[],this._lock=new ri,this._fetchResource=t,this._tileInfo=e}get _markerError(){return this._errorTemplates.marker[0]}get _fillError(){return this._errorTemplates.fill[0]}get _lineError(){return this._errorTemplates.line[0]}get _textError(){return this._errorTemplates.line[0]}createTemplateGroup(t,e,i=null){this._initErrorTemplates();const s=t.hash,r=this._symbolToTemplate.get(s);if(null!=r)return r;const n=new Array,o={sortKey:i,templates:n};e&&this._createMeshTemplates(n,e,!0),this._createMeshTemplates(n,t,!1);const a=this._createGroupId("expanded-cim"===t.type&&xi(t));return this._idToTemplateGroup.set(a,o),this._symbolToTemplate.set(s,a),a}getTemplateGroup(t){return this._idToTemplateGroup.get(t)??ui}getDynamicTemplateGroup(t){return this._idToTemplateGroup.has(t)?(yi(t)||ci.error("mapview-template-store",`Id ${t} does not refer to a dynamic template`),this._idToTemplateGroup.get(t)):ui}getMosaicItem(t,e){const i=this._createTemplateId(),s=new Promise((t=>this._idToResolver.set(i,t)));return this._fetchQueue.push({symbol:t,id:i,glyphIds:e}),s}finalize(t){return this._fetchQueue.length||this._lock.isHeld()?async function(t,e,i){try{await t.acquire(),await e(i),t.release()}catch(e){throw t.release(),e}}(this._lock,this._fetchAllQueuedResources.bind(this),t):Promise.resolve()}_initErrorTemplates(){this._errorTemplates||(this._errorTemplates={fill:this._createMeshTemplates([],di,!1),marker:this._createMeshTemplates([],_i,!1),line:this._createMeshTemplates([],mi,!1)})}_fetchAllQueuedResources(t){if(!this._fetchQueue.length)return Promise.resolve();const e=this._fetchQueue,i=this._cimAnalyses;return this._fetchQueue=[],this._cimAnalyses=[],Promise.all(i).then((()=>this._fetchResource(e,t).then((t=>{for(const{id:e,mosaicItem:i}of t)this._idToResolver.get(e)(i),this._idToResolver.delete(e)})))).catch((t=>{(0,l.D_)(t)?this._fetchQueue=this._fetchQueue.concat(e):"worker:port-closed"===t.name||ci.error(new n.Z("mapview-template-store","Unable to fetch requested texture resources",t))}))}_createGroupId(t){return this._idCounter++<<1|(t?1:0)}_createTemplateId(){return this._templateIdCounter++}async _createSMS(t){const{spriteMosaicItem:e}=await this.getMosaicItem(t);return Ke(e,ci)?Ot.fromSimpleMarker(t,e):this._markerError}async _createPMS(t){const{spriteMosaicItem:e}=await this.getMosaicItem(t);return Ke(e,ci)?Ot.fromPictureMarker(t,e):this._markerError}async _createSFS(t,e){const{spriteMosaicItem:i}=await this.getMosaicItem(t);return Ke(i,ci)?si.fromSimpleFill(t,i,e):this._fillError}async _createPFS(t,e){const{spriteMosaicItem:i}=await this.getMosaicItem(t);return Ke(i,ci)?si.fromPictureFill(t,i,e):this._fillError}async _createSLS(t,e){const{spriteMosaicItem:i}=await this.getMosaicItem(t);return Ke(i,ci)?xe.fromSimpleLine(t,i):this._lineError}async _createLMS(t){const{spriteMosaicItem:e}=await this.getMosaicItem(t);return Ke(e,ci)?Ot.fromLineSymbolMarker(t,e):this._markerError}async _createTS(t){const{glyphMosaicItems:e}=await this.getMosaicItem(t);return vt.fromText(t,e??[])}async _createCIMText(t){const{glyphMosaicItems:e}=await this.getMosaicItem(hi(t),ei(t.text));return Ke(e,ci)?vt.fromCIMText(t,e,this._tileInfo):this._textError}async _createCIMFill(t){const{spriteMosaicItem:e}=await this.getMosaicItem(hi(t));return Ke(e,ci)?si.fromCIMFill(t,e,this._tileInfo):this._fillError}async _createCIMLine(t){const{spriteMosaicItem:e}=await this.getMosaicItem(hi(t));return Ke(e,ci)?xe.fromCIMLine(t,e,this._tileInfo):this._lineError}async _createCIMMarker(t){const{spriteMosaicItem:e}=await this.getMosaicItem(hi(t));return Ke(e,ci)?Ot.fromCIMMarker(t,e,this._tileInfo):this._markerError}async _createCIM(t){const e=t.templateHash;let i=this._cimTemplateCache.get(e);if(null!=i)return i;switch(t.type){case"marker":i=await this._createCIMMarker(t);break;case"line":i=await this._createCIMLine(t);break;case"fill":i=await this._createCIMFill(t);break;case"text":i=await this._createCIMText(t)}return this._cimTemplateCache.set(e,i),i}async _createDynamicCIM(t){const e=t.templateHash;let i=this._cimTemplateCache.get(e);if(null!=i)return i;switch(t.type){case"marker":i=ti.fromCIMMarker(t,this._tileInfo);break;case"line":i=$e.fromCIMLine(t,this._tileInfo);break;case"fill":i=qe.fromCIMFill(t,this._tileInfo);break;case"text":i=ii.fromCIMText(t,this._tileInfo)}return this._cimTemplateCache.set(e,i),i}_createPrimitiveMeshTemplates(t,e,i){switch(e.type){case"esriSMS":return pi(t,this._createSMS(e));case"esriPMS":return pi(t,this._createPMS(e));case"esriSFS":return pi(t,this._createSFS(e,i));case"line-marker":return pi(t,this._createLMS(e));case"esriPFS":return pi(t,this._createPFS(e,i));case"esriSLS":return pi(t,this._createSLS(e,!1));case"esriTS":return pi(t,this._createTS(e));default:return ci.error("Unable to create mesh template for unknown symbol type {: $ }{symbol.type}"),t}}_createMeshTemplates(t,e,i){if(e.type.includes("3d"))return ci.error("3D symbols are not supported with MapView"),t;if("expanded-cim"===e.type){for(const i of e.layers)"function"==typeof i.materialHash?pi(t,this._createDynamicCIM(i)):pi(t,this._createCIM(i));return t}if("composite-symbol"===e.type){for(const s of e.layers)this._createPrimitiveMeshTemplates(t,s,i);return t}return"cim"===e.type||"label"===e.type||"web-style"===e.type?t:this._createPrimitiveMeshTemplates(t,e,i)}}const xi=t=>{if(!t.layers)return!1;for(const e of t.layers)if("function"==typeof e.materialHash)return!0;return!1};class Mi{constructor(t,e,i){this._geometryType=t,this._idField=e,this._templateStore=i}update(t,e){null!=t.mesh.labels&&(this._labelTemplates=this._createLabelTemplates(t.mesh.labels,e)),this._schema=t}_createLabelTemplates(t,e){const i=new Map;if("simple"===t.type){for(const s of t.classes){const t=kt.fromLabelClass(s,e);i.set(s.index,t)}return i}for(const s in t.classes){const r=t.classes[s];for(const t of r){const s=kt.fromLabelClass(t,e);i.set(t.index,s)}}return i}get templates(){return this._templateStore}async analyze(t,e,i,s,r,n,o){if((0,l.Hc)(o))return;let a;"dictionary"===i?.type&&(a=await i.analyze(this._idField,t.copy(),e,r,n,o));let h=0;for(;t.next();){let e=null;if(e=a?a[h++]:null!=s&&(0,_.nE)(t.getDisplayId())&&1!==t.readAttribute("cluster_count")?s.match(this._idField,t,this._geometryType,r,n):i.match(this._idField,t,this._geometryType,r,n),t.setGroupId(e),yi(e)){const i=this._templateStore.getDynamicTemplateGroup(e).templates;for(const e of i)e&&e.analyze&&e.analyze(this._templateStore,t,r,n)}}return await(0,E.j)(),this._templateStore.finalize(o)}async analyzeGraphics(t,e,i,s,r,n){if((0,l.Hc)(n))return;const o=t.getCursor();for(i&&await i.analyze(this._idField,o.copy(),e,s,r,n);o.next();){let t=o.getGroupId();if(null!=t&&-1!==t||(t=i?.match(this._idField,o,o.geometryType,s,r),o.setGroupId(t)),yi(t)){const e=this._templateStore.getDynamicTemplateGroup(t).templates;for(const t of e)t&&t.analyze&&t.analyze(this._templateStore,o,s,r)}o.setGroupId(t)}return await(0,E.j)(),this._templateStore.finalize(n)}writeGraphic(t,e,i,s){const r=e.getGroupId(),n=e.getDisplayId(),o=this._templateStore.getTemplateGroup(r);if(t.featureStart(e.insertAfter,0),null!=n){if(yi(r))for(const t of o.templates)t&&t.bindFeature(e,null,null);if(o){for(const r of o.templates)r&&r.write(t,e,i,s);t.featureEnd()}}}writeCursor(t,e,i,s,r,n,o){const a=e.getGroupId(),l=e.getDisplayId(),h=this._templateStore.getTemplateGroup(a),c=h.templates,u=this._getSortKeyValue(e,h);if(t.featureStart(0,u),null!=l&&c){if(yi(a))for(const t of c)t.bindFeature(e,i,s);for(const i of c)i.write(t,e,r,o);if(c.length&&null!=n){const i=n&&this._findLabelRef(c);this._writeLabels(t,e,n,i,r,o)}t.featureEnd()}}_getSortKeyValue(t,e){const i=this._schema.mesh.sortKey;if(null==i)return 0;let s=0;return s=!0===i.byRenderer&&null!=e.sortKey?e.sortKey:null!=i.fieldIndex?t.getComputedNumericAtIndex(i.fieldIndex):null!=i.field?t.readAttribute(i.field):t.readAttribute(this._idField),s*="asc"===i.order?1:-1,null==s||isNaN(s)?0:s}_findLabelRef(t){for(const e of t)if(e instanceof Ot)return e;return null}_writeLabels(t,e,i,s,r,n){for(const o of i)if(null!=o&&o){const{glyphs:i,rtl:a,index:l}=o,h=this._labelTemplates.get(l);if(!h)continue;h.setZoomLevel(r),h.bindReferenceTemplate(s),h.bindTextInfo(i,a),h.write(t,e,null,n)}}}var bi=i(13867);const vi=o.Z.getLogger("esri/views/2d/engine/webgl/util/Matcher");async function Si(t,e,i,s){switch(t.type){case"simple":case"heatmap":return Pi.fromBasicRenderer(t,e,i,s);case"map":return Li.fromUVRenderer(t,e,i,s);case"interval":return Ci.fromCBRenderer(t,e,i,s);case"dictionary":return zi.fromDictionaryRenderer(t,e,i,s);case"pie-chart":return wi.fromPieChartRenderer(t,e,i,s);case"subtype":return wi.fromSubtypes(t,e,i,s)}}class Pi{constructor(){this.type="feature",this._defaultResult=null}static async fromBasicRenderer(t,e,i,s){const r=new Pi;if(t.symbol){const n=await li(t.symbol,i,s),o=e.createTemplateGroup(n,null);r.setDefault(o)}return r}static async fromPieChartRenderer(t,e,i,s){const r=new Pi;if(t.markerSymbol){const n=await li(t.markerSymbol,i,s);let o;t.fillSymbol&&(o=await li(t.fillSymbol,i,s));const a=e.createTemplateGroup(n,o);r.setDefault(a)}return r}size(){return 1}getDefault(){return this._defaultResult}setDefault(t){this._defaultResult=t}match(t,e,i,s,r){return this.getDefault()}async analyze(t,e,i,s,r,n){return null}}class wi extends Pi{constructor(t,e){super(),this._subMatchers=t,this._subtypeField=e}static async fromSubtypes(t,e,i,s){const r=new Map,n=[];for(const o in t.renderers){const a=parseInt(o,10),l=Si(t.renderers[o],e,i,s).then((t=>r.set(a,t)));n.push(l)}return await Promise.all(n),new wi(r,t.subtypeField)}match(t,e,i,s,r){const n=e.readAttribute(this._subtypeField),o=this._subMatchers.get(n);return o?o.match(t,e,i,s,r):null}}class Ci extends Pi{constructor(t,e,i,s){super(),this.type="interval",this._intervals=[],this._isMaxInclusive=e,this._fieldIndex=s,this._field=t,this._normalizationInfo=i}static async fromCBRenderer(t,e,i,s){const{isMaxInclusive:r,normalizationField:n,normalizationTotal:o,normalizationType:a}=t,l=t.field,h=new Ci(l,r,{normalizationField:n,normalizationTotal:o,normalizationType:a},t.fieldIndex),c=await li(t.backgroundFillSymbol,i,s);await Promise.all(t.intervals.map((async t=>{const r=await li(t.symbol,i,s),n=e.createTemplateGroup(r,c),o={min:t.min,max:t.max};h.add(o,n)})));const u=await li(t.defaultSymbol,i,s);if(u){const t=e.createTemplateGroup(u,c);h.setDefault(t)}return h}add(t,e){this._intervals.push({interval:t,result:e}),this._intervals.sort(((t,e)=>t.interval.min-e.interval.min))}size(){return super.size()+this._intervals.length}match(t,e,i,s,r){if(null==this._fieldIndex&&!this._field)return this.getDefault();const n=null!=this._fieldIndex?e.getComputedNumericAtIndex(this._fieldIndex):this._getValueFromField(e);if(null==n||isNaN(n)||n===1/0||n===-1/0)return this.getDefault();for(let t=0;t<this._intervals.length;t++){const{interval:e,result:i}=this._intervals[t],s=n>=e.min,r=this._isMaxInclusive?n<=e.max:n<e.max;if(s&&r)return i}return this.getDefault()}_needsNormalization(){const t=this._normalizationInfo;return t&&(t.normalizationField||t.normalizationTotal||t.normalizationType)}_getValueFromField(t){const e=t.readAttribute(this._field);if(!this._needsNormalization()||null==e)return e;const{normalizationField:i,normalizationTotal:s,normalizationType:r}=this._normalizationInfo,n=t.readAttribute(i)??1;if(r)switch(r){case"esriNormalizeByField":return n?e/n:void 0;case"esriNormalizeByLog":return Math.log(e)*Math.LOG10E;case"esriNormalizeByPercentOfTotal":return e/s*100;default:return void vi.error(`Found unknown normalization type: ${r}`)}else vi.error("Normalization is required, but no type was set!")}}class Li extends Pi{constructor(t,e,i){super(),this.type="map",this._nullResult=null,this._resultsMap=new Map,this._fields=[],this._fieldsIndex=i,this._fields=t,this._seperator=e||""}static async fromUVRenderer(t,e,i,s){const r=t.fieldDelimiter,n=[t.field];t.field2&&n.push(t.field2),t.field3&&n.push(t.field3);const o=await li(t.backgroundFillSymbol,i,s),a=new Li(n,r,t.fieldIndex);await Promise.all(t.map.map((async(t,r)=>{const n=await li(t.symbol,i,s),l=r+1,h=e.createTemplateGroup(n,o,l);"<Null>"===t.value?a.setNullResult(h):a.add(t.value,h)})));const l=await li(t.defaultSymbol,i,s);if(l){const t=Number.MAX_SAFE_INTEGER,i=e.createTemplateGroup(l,o,t);a.setDefault(i)}return a}setNullResult(t){this._nullResult=t}add(t,e){this._resultsMap.set(t.toString(),e)}size(){return super.size()+this._resultsMap.size}match(t,e,i,s,r){if(null==this._fieldsIndex&&!this._fields)return this.getDefault();const n=null!=this._fieldsIndex?e.getComputedStringAtIndex(this._fieldsIndex):this._getValueFromFields(e);if(null!==this._nullResult&&(null==n||""===n||"<Null>"===n))return this._nullResult;if(null==n)return this.getDefault();const o=n.toString();return this._resultsMap.has(o)?this._resultsMap.get(o):this.getDefault()}_getValueFromFields(t){const e=[];for(const i of this._fields){const s=t.readAttribute(i);null==s||""===s?e.push("<Null>"):e.push(s)}return e.join(this._seperator)}}let ki;async function Ii(){return ki||(ki=i.e(5329).then(i.bind(i,25329))),ki}class zi extends Pi{constructor(t,e,i,s,r,n){super(),this.type="dictionary",this._groupIdCache=new bi.z(100),this._loader=t,this._fieldMap=t.fieldMap,this._symbolFields=t.getSymbolFields(),this._templates=e,this._info=i,this._scaleFn=s,this._schemaUtilsModule=r,this._symbolOptions=n}static async fromDictionaryRenderer(t,e,s,r){const[{DictionaryLoader:n},o]=await Promise.all([i.e(4475).then(i.bind(i,84475)),Ii()]),a=new n(t.url,t.config,t.fieldMap);await a.fetchResources({spatialReference:s.spatialReference,fields:s.fields});const l=await async function(t,e){const i=t||1;if("number"==typeof i)return(t,e,s)=>i;const s=await(0,we.Yi)(i,e.spatialReference,e.fields);return(t,i,r)=>(0,Ee.Z)(s,t,{$view:r},e.geometryType,i)||1}(t.scaleExpression,s);return new zi(a,e,s,l,o,t.symbolOptions)}async _analyzeFeature(t,e,i,s,r){const o=t.readLegacyFeature(),a=this._scaleFn(o,i,s),l=this._attributeHash(o)+"-"+a,h=this._groupIdCache.get(l);if(h)return h;const c={...s,spatialReference:this._info.spatialReference,abortOptions:r,fields:this._info.fields},u=await this._loader.getSymbolAsync(o,c),f=li(this._schemaUtilsModule.createSymbolSchema(u,this._symbolOptions),this._info,e,r).then((t=>{if("expanded-cim"!==t?.type)return vi.error(new n.Z("mapview-bad-type",`Found unexpected type ${t?.type} in dictionary response`)),null;t.hash+="-"+a;for(const e of t.layers)e.scaleFactor=a,e.templateHash+="-"+a;return this._templates.createTemplateGroup(t,null)}));return this._groupIdCache.put(l,f,1),f}async analyze(t,e,i,s,r,n){const o=e.getCursor(),a=[];for(;o.next();)a.push(this._analyzeFeature(o,i,s,r,n));return Promise.all(a).then((t=>t.filter(h.pC)))}match(t,e,i,s,r){return null}_attributeHash(t){let e="";for(const i of this._symbolFields){const s=this._fieldMap?.[i];s&&(e+=t.attributes[s]+"-")}return e}}var Ti=i(47988);class Oi{constructor(t){this._remoteClient=t,this._resourceMap=new Map,this._inFlightResourceMap=new Map,this.geometryEngine=null,this.geometryEnginePromise=null}destroy(){}async fetchResource(t,e){const i=this._resourceMap,s=i.get(t);if(s)return s;let r=this._inFlightResourceMap.get(t);if(r)return r;try{r=this._remoteClient.invoke("tileRenderer.fetchResource",{url:t},{...e}),this._inFlightResourceMap.set(t,r),r.then((e=>(this._inFlightResourceMap.delete(t),i.set(t,e),e)))}catch(t){return(0,l.D_)(t)?null:{width:0,height:0}}return r}getResource(t){return this._resourceMap.get(t)??null}loadFont(t){return Promise.resolve(null)}}function Ai(t,e){const i=e-e/2,s=e+e/4;return(!t.minScale||t.minScale>=i)&&(!t.maxScale||t.maxScale<=s)}function Ei(t){const e=t.message,i={message:{data:{},tileKey:e.tileKey,tileKeyOrigin:e.tileKeyOrigin,version:e.version},transferList:new Array};for(const t in e.data){const s=t,r=e.data[s];if(i.message.data[s]=null,null!=r){const t=r.stride,e=r.indices.slice(0),n=r.vertices.slice(0),o=r.records.slice(0),a=r.metrics?.slice(0),l={stride:t,indices:e,vertices:n,records:o,metrics:a};i.transferList.push(e,n,o),i.message.data[s]=l}}return i}let Fi=class extends Ti.Z{constructor(){super(...arguments),this.type="symbol",this._matchers={feature:null,aggregate:null},this._bufferData=new Map,this._bufferIds=new Map}initialize(){this.addHandles([this.tileStore.on("update",this.onTileUpdate.bind(this))]),this._resourceManagerProxy=new Oi(this.remoteClient)}destroy(){this._resourceManagerProxy.destroy()}get supportsTileUpdates(){return!0}forEachBufferId(t){this._bufferIds.forEach((e=>{e.forEach(t)}))}async update(t,e){const i=e.schema.processors[0];if("symbol"!==i.type)return;const s=(0,u.Hg)(this._schema,i);((0,u.uD)(s,"mesh")||(0,u.uD)(s,"target"))&&(t.mesh=!0,t.why?.mesh.push("Symbology changed"),this._schema=i,this._factory=this._createFactory(i),this._factory.update(i,this.tileStore.tileScheme.tileInfo))}onTileMessage(t,e,i,s){return(0,l.k_)(s),this._onTileData(t,e,i,s)}onTileClear(t,e){const i={clear:!0,end:e};return this._bufferData.delete(t.key.id),this._bufferIds.delete(t.key.id),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:t.id,data:i})}onTileError(t,e,i){const s=i.signal,r={tileKey:t.id,error:e};return this.remoteClient.invoke("tileRenderer.onTileError",r,{signal:s})}onTileUpdate(t){for(const e of t.removed)this._bufferData.has(e.key.id)&&this._bufferData.delete(e.key.id),this._bufferIds.has(e.key.id)&&this._bufferIds.delete(e.key.id);for(const e of t.added)this._bufferData.forEach((t=>{for(const i of t)i.message.tileKey===e.id&&this._updateTileMesh("append",e,Ei(i),[],!1,!1,null)}))}_addBufferData(t,e){this._bufferData.has(t)||this._bufferData.set(t,[]),this._bufferData.get(t)?.push(Ei(e))}_createFactory(t){const{geometryType:e,objectIdField:i,fields:s}=this.service,r={geometryType:e,fields:s,spatialReference:f.Z.fromJSON(this.spatialReference)},n=new gi(((t,e)=>this.remoteClient.invoke("tileRenderer.getMaterialItems",t,e)),this.tileStore.tileScheme.tileInfo),{matcher:o,aggregateMatcher:a}=t.mesh;return this._store=n,this._matchers.feature=Si(o,n,r,this._resourceManagerProxy),this._matchers.aggregate=a?Si(a,n,r,this._resourceManagerProxy):null,new Mi(e,i,n)}async _onTileData(t,e,i,s){(0,l.k_)(s);const{type:r,addOrUpdate:n,remove:o,clear:a,end:h}=e,c=!!this._schema.mesh.sortKey;if(!n){const e={type:r,addOrUpdate:null,remove:o,clear:a,end:h,sort:c};return this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:t.id,data:e},s)}const u=this._processFeatures(t,n,i,s,e.status?.version);try{const i=await u;if(null==i){const e={type:r,addOrUpdate:null,remove:o,clear:a,end:h,sort:c};return this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:t.id,data:e},s)}const n=[];for(const e of i){let i=!1;const s=e.message.bufferIds,r=t.key.id,o=e.message.tileKey;if(r!==o&&null!=s){if(!this.tileStore.get(o)){this._addBufferData(r,e),n.push(e);continue}let t=this._bufferIds.get(o);t||(t=new Set,this._bufferIds.set(o,t));const a=Array.from(s);for(const e of a){if(t.has(e)){i=!0;break}t.add(e)}}i||(this._addBufferData(r,e),n.push(e))}await Promise.all(n.map((i=>{const n=t.key.id===i.message.tileKey,o=n?e.remove:[],a=n&&e.end;return this._updateTileMesh(r,t,i,o,a,!!e.clear,s.signal)})))}catch(e){this._handleError(t,e,s)}}async _updateTileMesh(t,e,i,s,r,n,o){const a=t,h=i.message.tileKey,c=!!this._schema.mesh.sortKey;h!==e.key.id&&(r=!1);const u=i?.message,f={type:a,addOrUpdate:u,remove:s,clear:n,end:r,sort:c},_={transferList:i?.transferList??[],signal:o};return(0,l.k_)(_),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:h,data:f},_)}async _processFeatures(t,e,i,s,r){if(null==e||!e.hasFeatures)return null;const n={transform:t.transform,hasZ:!1,hasM:!1},o=this._factory,a={viewingMode:"",scale:t.scale},h=await this._matchers.feature,c=await this._matchers.aggregate;(0,l.k_)(s);const u=this._getLabelInfos(t,e);return await o.analyze(e.getCursor(),this._resourceManagerProxy,h,c,n,a),(0,l.k_)(s),this._writeFeatureSet(t,e,n,u,o,i,r)}_writeFeatureSet(t,e,i,s,r,n,o){const a=e.getSize(),l=this._schema.mesh.matcher.symbologyType,h=new A(t.key.id,{features:a,records:a,metrics:0},l,n,l!==m.mD.HEATMAP,o),c={viewingMode:"",scale:t.scale},u=e.getCursor();for(;u.next();)try{const e=u.getDisplayId(),n=null!=s?s.get(e):null;r.writeCursor(h,u,i,c,t.level,n,this._resourceManagerProxy)}catch(t){}const f=t.tileInfoView.tileInfo.isWrappable;return h.serialize(f)}_handleError(t,e,i){if(!(0,l.D_)(e)){const s={tileKey:t.id,error:e.message};return this.remoteClient.invoke("tileRenderer.onTileError",s,{signal:i.signal})}return Promise.resolve()}_getLabelingSchemaForScale(t){const e=this._schema.mesh.labels;if(null==e)return null;if("subtype"===e.type){const i={type:"subtype",classes:{}};let s=!1;for(const r in e.classes){const n=e.classes[r].filter((e=>Ai(e,t.scale)));s=s||!!n.length,i.classes[r]=n}return s?i:null}const i=e.classes.filter((e=>Ai(e,t.scale)));return i.length?{type:"simple",classes:i}:null}_getLabels(t,e){if("subtype"===e.type){const i=this.service.subtypeField;(0,a.O3)(i,"Expected to find subtype Field");const s=t.readAttribute(i);return null==s?[]:e.classes[s]??[]}return e.classes}_getLabelInfos(t,e){const i=this._getLabelingSchemaForScale(t);if(null==i)return null;const s=new Map,n=e.getCursor();for(;n.next();){const t=n.getDisplayId(),e=[],o=(0,_.nE)(t),a=o&&1!==n.readAttribute("cluster_count")?"aggregate":"feature",l=this._getLabels(n,i);for(const i of l){if(i.target!==a)continue;const s=n.getStorage(),l=o&&"feature"===a?s.getComputedStringAtIndex(n.readAttribute("referenceId"),i.fieldIndex):s.getComputedStringAtIndex(t,i.fieldIndex);if(!l)continue;const h=(0,r.E)(l.toString()),c=h[0],u=h[1];this._store.getMosaicItem(i.symbol,ei(c)).then((t=>{e[i.index]={glyphs:t.glyphMosaicItems??[],rtl:u,index:i.index}}))}s.set(t,e)}return s}};Fi=(0,s._)([(0,c.j)("esri.views.2d.layers.features.processors.SymbolProcessor")],Fi);const Ni=Fi},14867:(t,e,i)=>{function s(t,e,i,s){const r=t.clone(),n=1<<r.level,o=r.col+e,a=r.row+i;return s&&o<0?(r.col=o+n,r.world-=1):o>=n?(r.col=o-n,r.world+=1):r.col=o,r.row=a,r}i.d(e,{M:()=>s})}}]);