@arcgis/map-components 5.2.0-next.120 → 5.2.0-next.122

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 (316) hide show
  1. package/dist/cdn/33C5FBRZ.js +2 -0
  2. package/dist/cdn/{JD46SR26.js → 34E7N7GU.js} +1 -1
  3. package/dist/cdn/{IR2RGKT4.js → 3E36QFXG.js} +2 -2
  4. package/dist/cdn/3FRV7BIJ.js +2 -0
  5. package/dist/cdn/{Z4FIADPO.js → 3TR7QOHP.js} +1 -1
  6. package/dist/cdn/464EB67Q.js +2 -0
  7. package/dist/cdn/{W5B2F2LI.js → 4DENNWA5.js} +1 -1
  8. package/dist/cdn/{POEFPML6.js → 55AZTWOF.js} +1 -1
  9. package/dist/cdn/{2DDAZ3QO.js → 56PUZWIU.js} +1 -1
  10. package/dist/cdn/{YZUEPMQZ.js → 5IFQI7ML.js} +1 -1
  11. package/dist/cdn/{JMWMN4DG.js → 5SLLYIWJ.js} +1 -1
  12. package/dist/cdn/{7QH5PIWM.js → 6EQW3YHG.js} +1 -1
  13. package/dist/cdn/{U35IJFNU.js → 6VR7MKOM.js} +1 -1
  14. package/dist/cdn/6XJFRQ75.js +2 -0
  15. package/dist/cdn/7WBDTHNZ.js +2 -0
  16. package/dist/cdn/{RRC7AD75.js → AXFCL6D2.js} +1 -1
  17. package/dist/cdn/{LBVSFCZG.js → B4QA6HTE.js} +1 -1
  18. package/dist/cdn/BAV6JF4F.js +2 -0
  19. package/dist/cdn/{HNMWTX7W.js → BEZWJEYM.js} +1 -1
  20. package/dist/cdn/{LCNYVSCF.js → BTQUD5J4.js} +1 -1
  21. package/dist/cdn/CCFGYVBQ.js +2 -0
  22. package/dist/cdn/{FAN45DMA.js → CNYKQYK2.js} +1 -1
  23. package/dist/cdn/DOR5MVML.js +2 -0
  24. package/dist/cdn/E4JAHCCG.js +2 -0
  25. package/dist/cdn/{JD562WMM.js → EDMWGUZ2.js} +1 -1
  26. package/dist/cdn/{JKZMOIRA.js → EEHSPW4M.js} +1 -1
  27. package/dist/cdn/{GN4BH6SY.js → EMJLCAFX.js} +1 -1
  28. package/dist/cdn/{FAFDJABP.js → ESAIFZ6N.js} +1 -1
  29. package/dist/cdn/{2L6YCWXJ.js → EUV2XFUO.js} +1 -1
  30. package/dist/cdn/{GPIHHNP7.js → F46CTQWP.js} +1 -1
  31. package/dist/cdn/F5LP5CU2.js +2 -0
  32. package/dist/cdn/FKCRBOFP.js +2 -0
  33. package/dist/cdn/G3KYGRHM.js +2 -0
  34. package/dist/cdn/{3VGRIUOZ.js → G4HKU5PR.js} +1 -1
  35. package/dist/cdn/{Y5Q3Q4GW.js → GIOUZTHM.js} +1 -1
  36. package/dist/cdn/{4DWURRQB.js → GLH5GJZC.js} +1 -1
  37. package/dist/cdn/{BFGF2JTH.js → GLOUXFQV.js} +1 -1
  38. package/dist/cdn/{3VBI4PPT.js → H3CCHIXN.js} +1 -1
  39. package/dist/cdn/{W5O3OCTG.js → H5FV4C72.js} +1 -1
  40. package/dist/cdn/{ACIG6774.js → HH5GEJCC.js} +1 -1
  41. package/dist/cdn/{P2X5UYZB.js → I2IBXGQM.js} +1 -1
  42. package/dist/cdn/{VFSWB7LJ.js → IWOKTFPQ.js} +1 -1
  43. package/dist/cdn/{XO3NPMHQ.js → J4BQSA3J.js} +1 -1
  44. package/dist/cdn/{Z3JADSL3.js → J4TWDZII.js} +1 -1
  45. package/dist/cdn/{23KFFLAG.js → JBGNMAZ7.js} +1 -1
  46. package/dist/cdn/{3OQZ3SMG.js → JSYLRK26.js} +1 -1
  47. package/dist/cdn/{5FBX5V2M.js → KHHVCV55.js} +1 -1
  48. package/dist/cdn/{ZSQCIUGN.js → KIHX5LRN.js} +1 -1
  49. package/dist/cdn/{LBJMKYT2.js → KM2GXXBO.js} +1 -1
  50. package/dist/cdn/{F5EC22X4.js → KRYDKCJG.js} +1 -1
  51. package/dist/cdn/{46ZZWK6X.js → KY3ND2AY.js} +1 -1
  52. package/dist/cdn/KYWVUIH5.js +2 -0
  53. package/dist/cdn/{UJVNCEXT.js → LAY2RKKS.js} +1 -1
  54. package/dist/cdn/{REDWVTQJ.js → LP2PF2VT.js} +1 -1
  55. package/dist/cdn/LV5KLLVW.js +2 -0
  56. package/dist/cdn/{4IB44LRA.js → LWW6FUI2.js} +1 -1
  57. package/dist/cdn/{B6JX5OWP.js → M3EXGLNJ.js} +1 -1
  58. package/dist/cdn/{TOBWMRET.js → M3EZM5X5.js} +1 -1
  59. package/dist/cdn/{LH33ZRF7.js → MFBQRTJ3.js} +1 -1
  60. package/dist/cdn/{5RBUI62E.js → MLJ5RYY3.js} +1 -1
  61. package/dist/cdn/{2JMMBI2U.js → MV2EKVMR.js} +1 -1
  62. package/dist/cdn/{WWGWIJMC.js → NZSCPBS7.js} +1 -1
  63. package/dist/cdn/{PQTX5YLB.js → OKW62U6T.js} +1 -1
  64. package/dist/cdn/{3EYHGXI5.js → PLTLRYBF.js} +1 -1
  65. package/dist/cdn/PR6OAZWA.js +2 -0
  66. package/dist/cdn/{UNP7N3DO.js → PUYZDQHZ.js} +1 -1
  67. package/dist/cdn/{KKDZFKGV.js → PYP3U5W5.js} +1 -1
  68. package/dist/cdn/{OMZESNEM.js → Q4AJYCNY.js} +1 -1
  69. package/dist/cdn/{HGYJFGKA.js → QGFWUN5S.js} +1 -1
  70. package/dist/cdn/{X7KSMNND.js → QIEX43LK.js} +1 -1
  71. package/dist/cdn/{HH4T6PVP.js → QMQV37ML.js} +1 -1
  72. package/dist/cdn/QXVHT3RD.js +5 -0
  73. package/dist/cdn/{MZZGKPLV.js → R7E5VLXC.js} +1 -1
  74. package/dist/cdn/{CWQN57H6.js → RJSFDOIW.js} +1 -1
  75. package/dist/cdn/{TNY5ERJS.js → RKAZH2LM.js} +1 -1
  76. package/dist/cdn/{5IQQ6P2J.js → RU7PGLLB.js} +1 -1
  77. package/dist/cdn/{4W6PAHFY.js → S62FQUEJ.js} +1 -1
  78. package/dist/cdn/S7T2NPCW.js +2 -0
  79. package/dist/cdn/{NK74ZCP7.js → SXQRPAPL.js} +1 -1
  80. package/dist/cdn/{2KN3VFRG.js → TH6TT77M.js} +1 -1
  81. package/dist/cdn/{MU54WQG6.js → TILA2OKK.js} +1 -1
  82. package/dist/cdn/TJDMX7ZL.js +2 -0
  83. package/dist/cdn/TMJX7DFH.js +2 -0
  84. package/dist/cdn/{6XZKWBWD.js → TVZZB4KV.js} +1 -1
  85. package/dist/cdn/TZHXSIXK.js +2 -0
  86. package/dist/cdn/{SEMVPT7E.js → UJUD6U2G.js} +1 -1
  87. package/dist/cdn/US6PRR7S.js +2 -0
  88. package/dist/cdn/{TL7OKFLN.js → V7BQUMJL.js} +1 -1
  89. package/dist/cdn/VSH4WLRS.js +2 -0
  90. package/dist/cdn/{Q6MJXAPZ.js → WNLOSRMS.js} +1 -1
  91. package/dist/cdn/X6EQMX6U.js +2 -0
  92. package/dist/cdn/{6SKPV2U5.js → XGZ36AOT.js} +1 -1
  93. package/dist/cdn/{D3F6S7NU.js → XQKZNHH7.js} +1 -1
  94. package/dist/cdn/{CONE7FEI.js → YG4HDEP3.js} +1 -1
  95. package/dist/cdn/{NEQHSO5U.js → YRZRKOE3.js} +1 -1
  96. package/dist/cdn/YZ55QJUM.js +2 -0
  97. package/dist/cdn/{EZVWEV6T.js → ZSVZL6PT.js} +1 -1
  98. package/dist/cdn/ZUAZUUTW.js +2 -0
  99. package/dist/cdn/assets/feature-form-next/t9n/messages.ar.json +1 -1
  100. package/dist/cdn/assets/feature-form-next/t9n/messages.bg.json +1 -1
  101. package/dist/cdn/assets/feature-form-next/t9n/messages.ca.json +1 -1
  102. package/dist/cdn/assets/feature-form-next/t9n/messages.cs.json +1 -1
  103. package/dist/cdn/assets/feature-form-next/t9n/messages.da.json +1 -1
  104. package/dist/cdn/assets/feature-form-next/t9n/messages.de.json +1 -1
  105. package/dist/cdn/assets/feature-form-next/t9n/messages.el.json +1 -1
  106. package/dist/cdn/assets/feature-form-next/t9n/messages.en.json +1 -1
  107. package/dist/cdn/assets/feature-form-next/t9n/messages.es.json +1 -1
  108. package/dist/cdn/assets/feature-form-next/t9n/messages.et.json +1 -1
  109. package/dist/cdn/assets/feature-form-next/t9n/messages.fi.json +1 -1
  110. package/dist/cdn/assets/feature-form-next/t9n/messages.fr.json +1 -1
  111. package/dist/cdn/assets/feature-form-next/t9n/messages.he.json +1 -1
  112. package/dist/cdn/assets/feature-form-next/t9n/messages.hr.json +1 -1
  113. package/dist/cdn/assets/feature-form-next/t9n/messages.hu.json +1 -1
  114. package/dist/cdn/assets/feature-form-next/t9n/messages.id.json +1 -1
  115. package/dist/cdn/assets/feature-form-next/t9n/messages.it.json +1 -1
  116. package/dist/cdn/assets/feature-form-next/t9n/messages.ja.json +1 -1
  117. package/dist/cdn/assets/feature-form-next/t9n/messages.ko.json +1 -1
  118. package/dist/cdn/assets/feature-form-next/t9n/messages.lt.json +1 -1
  119. package/dist/cdn/assets/feature-form-next/t9n/messages.lv.json +1 -1
  120. package/dist/cdn/assets/feature-form-next/t9n/messages.nl.json +1 -1
  121. package/dist/cdn/assets/feature-form-next/t9n/messages.no.json +1 -1
  122. package/dist/cdn/assets/feature-form-next/t9n/messages.pl.json +1 -1
  123. package/dist/cdn/assets/feature-form-next/t9n/messages.pt-BR.json +1 -1
  124. package/dist/cdn/assets/feature-form-next/t9n/messages.pt-PT.json +1 -1
  125. package/dist/cdn/assets/feature-form-next/t9n/messages.ro.json +1 -1
  126. package/dist/cdn/assets/feature-form-next/t9n/messages.ru.json +1 -1
  127. package/dist/cdn/assets/feature-form-next/t9n/messages.sk.json +1 -1
  128. package/dist/cdn/assets/feature-form-next/t9n/messages.sl.json +1 -1
  129. package/dist/cdn/assets/feature-form-next/t9n/messages.sr.json +1 -1
  130. package/dist/cdn/assets/feature-form-next/t9n/messages.sv.json +1 -1
  131. package/dist/cdn/assets/feature-form-next/t9n/messages.th.json +1 -1
  132. package/dist/cdn/assets/feature-form-next/t9n/messages.tr.json +1 -1
  133. package/dist/cdn/assets/feature-form-next/t9n/messages.uk.json +1 -1
  134. package/dist/cdn/assets/feature-form-next/t9n/messages.vi.json +1 -1
  135. package/dist/cdn/assets/feature-form-next/t9n/messages.zh-CN.json +1 -1
  136. package/dist/cdn/assets/feature-form-next/t9n/messages.zh-TW.json +1 -1
  137. package/dist/cdn/assets/selection-list/t9n/messages.en.json +1 -1
  138. package/dist/cdn/assets/selection-toolbar/t9n/messages.en.json +1 -1
  139. package/dist/cdn/assets/sketch/t9n/messages.ar.json +1 -1
  140. package/dist/cdn/assets/sketch/t9n/messages.bg.json +1 -1
  141. package/dist/cdn/assets/sketch/t9n/messages.bs.json +1 -1
  142. package/dist/cdn/assets/sketch/t9n/messages.ca.json +1 -1
  143. package/dist/cdn/assets/sketch/t9n/messages.cs.json +1 -1
  144. package/dist/cdn/assets/sketch/t9n/messages.da.json +1 -1
  145. package/dist/cdn/assets/sketch/t9n/messages.de.json +1 -1
  146. package/dist/cdn/assets/sketch/t9n/messages.el.json +1 -1
  147. package/dist/cdn/assets/sketch/t9n/messages.es.json +1 -1
  148. package/dist/cdn/assets/sketch/t9n/messages.et.json +1 -1
  149. package/dist/cdn/assets/sketch/t9n/messages.fi.json +1 -1
  150. package/dist/cdn/assets/sketch/t9n/messages.fr.json +1 -1
  151. package/dist/cdn/assets/sketch/t9n/messages.he.json +1 -1
  152. package/dist/cdn/assets/sketch/t9n/messages.hr.json +1 -1
  153. package/dist/cdn/assets/sketch/t9n/messages.hu.json +1 -1
  154. package/dist/cdn/assets/sketch/t9n/messages.id.json +1 -1
  155. package/dist/cdn/assets/sketch/t9n/messages.it.json +1 -1
  156. package/dist/cdn/assets/sketch/t9n/messages.ja.json +1 -1
  157. package/dist/cdn/assets/sketch/t9n/messages.ko.json +1 -1
  158. package/dist/cdn/assets/sketch/t9n/messages.lt.json +1 -1
  159. package/dist/cdn/assets/sketch/t9n/messages.lv.json +1 -1
  160. package/dist/cdn/assets/sketch/t9n/messages.nl.json +1 -1
  161. package/dist/cdn/assets/sketch/t9n/messages.no.json +1 -1
  162. package/dist/cdn/assets/sketch/t9n/messages.pl.json +1 -1
  163. package/dist/cdn/assets/sketch/t9n/messages.pt-BR.json +1 -1
  164. package/dist/cdn/assets/sketch/t9n/messages.pt-PT.json +1 -1
  165. package/dist/cdn/assets/sketch/t9n/messages.ro.json +1 -1
  166. package/dist/cdn/assets/sketch/t9n/messages.ru.json +1 -1
  167. package/dist/cdn/assets/sketch/t9n/messages.sk.json +1 -1
  168. package/dist/cdn/assets/sketch/t9n/messages.sl.json +1 -1
  169. package/dist/cdn/assets/sketch/t9n/messages.sr.json +1 -1
  170. package/dist/cdn/assets/sketch/t9n/messages.sv.json +1 -1
  171. package/dist/cdn/assets/sketch/t9n/messages.th.json +1 -1
  172. package/dist/cdn/assets/sketch/t9n/messages.tr.json +1 -1
  173. package/dist/cdn/assets/sketch/t9n/messages.uk.json +1 -1
  174. package/dist/cdn/assets/sketch/t9n/messages.vi.json +1 -1
  175. package/dist/cdn/assets/sketch/t9n/messages.zh-CN.json +1 -1
  176. package/dist/cdn/assets/sketch/t9n/messages.zh-HK.json +1 -1
  177. package/dist/cdn/assets/sketch/t9n/messages.zh-TW.json +1 -1
  178. package/dist/cdn/assets/utility-network-trace-results/t9n/messages.en.json +1 -1
  179. package/dist/cdn/index.js +1 -1
  180. package/dist/cdn/main.css +1 -1
  181. package/dist/chunks/async-utils.js +3 -3
  182. package/dist/chunks/layer-utils.js +48 -44
  183. package/dist/chunks/slots.js +1 -1
  184. package/dist/components/arcgis-attachment-validation-view/customElement.d.ts +81 -0
  185. package/dist/components/arcgis-attachment-validation-view/customElement.js +109 -0
  186. package/dist/components/arcgis-attachment-validation-view/index.d.ts +1 -0
  187. package/dist/components/arcgis-attachment-validation-view/index.js +2 -0
  188. package/dist/components/arcgis-basemap-gallery/customElement.d.ts +10 -9
  189. package/dist/components/arcgis-basemap-gallery/customElement.js +39 -28
  190. package/dist/components/arcgis-basemap-gallery-item/customElement.js +30 -30
  191. package/dist/components/arcgis-editor/customElement.d.ts +10 -2
  192. package/dist/components/arcgis-editor/customElement.js +2 -2
  193. package/dist/components/arcgis-expand/customElement.d.ts +9 -0
  194. package/dist/components/arcgis-expand/customElement.js +47 -41
  195. package/dist/components/arcgis-exploratory-analysis/customElement.d.ts +23 -0
  196. package/dist/components/arcgis-exploratory-analysis/customElement.js +21 -21
  197. package/dist/components/arcgis-feature-attachments/customElement.js +17 -17
  198. package/dist/components/arcgis-feature-form-field/customElement.d.ts +48 -0
  199. package/dist/components/arcgis-feature-form-utility-network-association-list/customElement.js +1 -1
  200. package/dist/components/arcgis-feature-templates/customElement.js +1 -1
  201. package/dist/components/arcgis-fullscreen/customElement.js +9 -10
  202. package/dist/components/arcgis-legend/customElement.d.ts +5 -6
  203. package/dist/components/arcgis-legend/customElement.js +5 -5
  204. package/dist/components/arcgis-legend-card-element/customElement.js +26 -26
  205. package/dist/components/arcgis-link-chart/customElement.d.ts +9 -0
  206. package/dist/components/arcgis-link-chart/customElement.js +14 -11
  207. package/dist/components/arcgis-map/customElement.d.ts +9 -0
  208. package/dist/components/arcgis-map/customElement.js +9 -6
  209. package/dist/components/arcgis-paste/customElement.js +1 -1
  210. package/dist/components/arcgis-presentation/customElement.js +62 -62
  211. package/dist/components/arcgis-presentation-slide-list/customElement.js +1 -1
  212. package/dist/components/arcgis-scale-bar/customElement.js +8 -8
  213. package/dist/components/arcgis-scene/customElement.d.ts +9 -0
  214. package/dist/components/arcgis-scene/customElement.js +5 -2
  215. package/dist/components/arcgis-selection-list/customElement.d.ts +33 -12
  216. package/dist/components/arcgis-selection-list/customElement.js +79 -63
  217. package/dist/components/arcgis-selection-toolbar/customElement.d.ts +42 -2
  218. package/dist/components/arcgis-selection-toolbar/customElement.js +60 -37
  219. package/dist/components/arcgis-sketch/SketchComponentViewModel.d.ts +84 -0
  220. package/dist/components/arcgis-sketch/configuration.d.ts +33 -0
  221. package/dist/components/arcgis-sketch/customElement.d.ts +3 -2
  222. package/dist/components/arcgis-sketch/customElement.js +25 -21
  223. package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +18 -3
  224. package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +63 -53
  225. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +11 -3
  226. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +107 -53
  227. package/dist/components/arcgis-utility-network-trace-analysis/index.js +1 -0
  228. package/dist/components/arcgis-utility-network-trace-analysis/types.d.ts +5 -1
  229. package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +19 -11
  230. package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +124 -110
  231. package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +29 -0
  232. package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +31 -17
  233. package/dist/components/arcgis-utility-network-trace-locations/customElement.js +1 -1
  234. package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +63 -14
  235. package/dist/components/arcgis-utility-network-trace-results/customElement.js +245 -55
  236. package/dist/components/arcgis-utility-network-trace-results/index.js +1 -2
  237. package/dist/components/arcgis-utility-network-trace-results-pane/customElement.js +7 -7
  238. package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +1 -1
  239. package/dist/docs/api.json +1 -1
  240. package/dist/docs/docs.json +1 -1
  241. package/dist/docs/vscode.html-custom-data.json +1 -1
  242. package/dist/docs/web-types.json +1 -1
  243. package/dist/index.d.ts +10 -0
  244. package/dist/loader.js +12 -11
  245. package/dist/types/lumina.d.ts +20 -10
  246. package/dist/types/preact.d.ts +21 -10
  247. package/dist/types/react.d.ts +22 -10
  248. package/dist/types/stencil.d.ts +20 -10
  249. package/package.json +8 -8
  250. package/dist/cdn/2OGEVHBC.js +0 -2
  251. package/dist/cdn/4FADGEJD.js +0 -2
  252. package/dist/cdn/5DV4N5DK.js +0 -2
  253. package/dist/cdn/5PNAHYUT.js +0 -2
  254. package/dist/cdn/7AKMHKTT.js +0 -2
  255. package/dist/cdn/A2FK4TED.js +0 -2
  256. package/dist/cdn/BOEHQXPR.js +0 -2
  257. package/dist/cdn/C2HB2U6P.js +0 -2
  258. package/dist/cdn/CRWARUC7.js +0 -2
  259. package/dist/cdn/CST7D7GR.js +0 -2
  260. package/dist/cdn/DDSMWDPS.js +0 -2
  261. package/dist/cdn/DOHO6T7Z.js +0 -2
  262. package/dist/cdn/GJZCVU6G.js +0 -5
  263. package/dist/cdn/IDE4IFH7.js +0 -2
  264. package/dist/cdn/IJTCIWOA.js +0 -2
  265. package/dist/cdn/IXVJQIMH.js +0 -2
  266. package/dist/cdn/KGBACXRG.js +0 -2
  267. package/dist/cdn/KWJAKUM4.js +0 -2
  268. package/dist/cdn/MRC7R44N.js +0 -2
  269. package/dist/cdn/MT6BTCFR.js +0 -2
  270. package/dist/cdn/QD7ELNLS.js +0 -2
  271. package/dist/cdn/TBSKBHHL.js +0 -2
  272. package/dist/cdn/WU7R423Z.js +0 -2
  273. package/dist/cdn/ZB6W452H.js +0 -2
  274. /package/dist/cdn/{ZU6D3YMF.js → 27MP6TEF.js} +0 -0
  275. /package/dist/cdn/{3XRSSDOC.js → 3JCF73F4.js} +0 -0
  276. /package/dist/cdn/{RLTZHJ26.js → 3XEPXV4Q.js} +0 -0
  277. /package/dist/cdn/{IMINWWQN.js → 43IOCYG5.js} +0 -0
  278. /package/dist/cdn/{HMZDI4HQ.js → 45JO7F4Y.js} +0 -0
  279. /package/dist/cdn/{232VF5GS.js → 4W35GLNO.js} +0 -0
  280. /package/dist/cdn/{7HQJTIYO.js → 5CER2N5T.js} +0 -0
  281. /package/dist/cdn/{33AEAI5T.js → 5M56ZA46.js} +0 -0
  282. /package/dist/cdn/{W6X34YBZ.js → 6NWR2Z4F.js} +0 -0
  283. /package/dist/cdn/{KMODOE6H.js → 7FVXPOAG.js} +0 -0
  284. /package/dist/cdn/{2PRRRGTC.js → AYJQLWX4.js} +0 -0
  285. /package/dist/cdn/{HJP2DQC3.js → AZ73DBU3.js} +0 -0
  286. /package/dist/cdn/{CQW2542N.js → B4CANXID.js} +0 -0
  287. /package/dist/cdn/{HLHFT3VN.js → BEFZSVBT.js} +0 -0
  288. /package/dist/cdn/{55Q2U4HS.js → BIWQEPK4.js} +0 -0
  289. /package/dist/cdn/{N5NLF7RI.js → BLYJE76S.js} +0 -0
  290. /package/dist/cdn/{2Q7J34UP.js → CESFJ6AD.js} +0 -0
  291. /package/dist/cdn/{5ZZ7JN5X.js → COKGOKO2.js} +0 -0
  292. /package/dist/cdn/{7Y65HW7Z.js → D3LYSFXK.js} +0 -0
  293. /package/dist/cdn/{FZATLDJD.js → EAM45WZP.js} +0 -0
  294. /package/dist/cdn/{6VBFCBUV.js → EDTGV4YF.js} +0 -0
  295. /package/dist/cdn/{62XRQDSI.js → FMBY3L4S.js} +0 -0
  296. /package/dist/cdn/{TKC3X6S6.js → GQ6SYNZS.js} +0 -0
  297. /package/dist/cdn/{YUZAZ3CJ.js → H4FH2RBM.js} +0 -0
  298. /package/dist/cdn/{P3MLJ7YL.js → I5ZESLWO.js} +0 -0
  299. /package/dist/cdn/{MM6LPGBW.js → KO7RD6SS.js} +0 -0
  300. /package/dist/cdn/{2LEEKX4J.js → LQ76PRWK.js} +0 -0
  301. /package/dist/cdn/{CTHAODQE.js → MUWOF7W4.js} +0 -0
  302. /package/dist/cdn/{G5DB24SO.js → OCLOCCB6.js} +0 -0
  303. /package/dist/cdn/{2UG26OVP.js → OJXNUBIA.js} +0 -0
  304. /package/dist/cdn/{ANRJPTRX.js → OUXE3CSQ.js} +0 -0
  305. /package/dist/cdn/{AKKV6RKF.js → PXAY7IM4.js} +0 -0
  306. /package/dist/cdn/{4PMOT2RS.js → QMYL4UM7.js} +0 -0
  307. /package/dist/cdn/{UCFBAQVW.js → QPFX5XH3.js} +0 -0
  308. /package/dist/cdn/{EGN54PEX.js → RFSBZHJD.js} +0 -0
  309. /package/dist/cdn/{4TZLBS5N.js → RYYBMDGS.js} +0 -0
  310. /package/dist/cdn/{CDGKQKVU.js → T2DT5I33.js} +0 -0
  311. /package/dist/cdn/{EJ5KLAEE.js → UINNR6FV.js} +0 -0
  312. /package/dist/cdn/{KWL3F4UP.js → UPZVIKOH.js} +0 -0
  313. /package/dist/cdn/{KXCLNNE5.js → VCRVQMYT.js} +0 -0
  314. /package/dist/cdn/{COSLSZXO.js → VWN2LORT.js} +0 -0
  315. /package/dist/cdn/{3NKJ4HFO.js → XAMLHDWZ.js} +0 -0
  316. /package/dist/cdn/{N43ZQ4C7.js → ZWN6DXNO.js} +0 -0
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as p}from"./UNPUCYYB.js";import h from"./ILBDNJQP.js";import{a as b}from"./5JADSW57.js";import g from"./4SLCQ6RS.js";import e from"./4FBTH6YD.js";import c from"./KORK4WZ7.js";import{h as m}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as v,S as l,V as y,a as f,b as s,w as d}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:u,formatNumber:M},S,,,,n,T])=>{var C=f`:host{width:100%;display:flex;>*{align-items:center;align-self:center;height:100%;width:100%}}.root{display:flex;flex-direction:column}calcite-action-bar[layout=horizontal]{width:100%;calcite-chip{margin-inline-start:auto}}calcite-action-bar[layout=vertical]{height:100%;calcite-chip{margin-block-start:auto}}calcite-action-bar slot{align-items:center}calcite-dropdown:has(calcite-action:not([text-enabled])){align-self:center}calcite-action:not([text-enabled]){align-self:center}calcite-chip{display:flex;align-self:center;line-height:initial}calcite-dropdown{calcite-icon{margin-inline-start:var(--calcite-space-2xs)}}calcite-chip[closed]{display:inline-flex}calcite-progress{--calcite-progress-background-color: transparent}`,w={replace:"overwrite-features",add:"cursor-plus",remove:"cursor-minus"},$=T(S),g=class extends v{constructor(){super(...arguments),this.viewModel=$(this),this.messages=b(),this.autoDestroyDisabled=!1,this.disabled=!1,this.icon="selection-set",this.view=this.viewModel.view,this.activeOperation=this.viewModel.activeOperation,this.availableOperationTypes=["replace","add","remove"],this.continuousSelectionEnabled=this.viewModel.continuousSelectionEnabled,this.defaultLassoToolOptions=this.viewModel.defaultLassoToolOptions,this.defaultOperationType=this.viewModel.defaultOperationType,this.defaultPolygonToolOptions=this.viewModel.defaultPolygonToolOptions,this.defaultPointToolOptions=this.viewModel.defaultPointToolOptions,this.defaultRectangleToolOptions=this.viewModel.defaultRectangleToolOptions,this.effectiveSelectionManager=this.viewModel.effectiveSelectionManager,this.effectiveSources=this.viewModel.effectiveSources,this.hideChip=!1,this.hideChipCloseButton=!1,this.hideLassoTool=!1,this.hideOperationTypeControls=!1,this.hidePanTool=!1,this.hidePolygonTool=!1,this.hidePointTool=!1,this.hideProgress=!1,this.hideRectangleTool=!1,this.layout="horizontal",this.returnFeatureTitleFields=this.viewModel.returnFeatureTitleFields,this.selectionManager=this.viewModel.selectionManager,this.showTextLabels=!1,this.sources=this.viewModel.sources,this.toolConfigs=this.viewModel.toolConfigs,this.visualScale="m",this.arcgisBeforeActivate=n(()=>this.viewModel,"before-activate"),this.arcgisClear=d(),this.arcgisComplete=n(()=>this.viewModel,"complete"),this.arcgisPropertyChange=m()("activeOperation","state"),this.arcgisReady=d(),this.arcgisSelectionChange=n(()=>this.viewModel,"selection-change")}static{this.properties={_effectiveDisabled:16,_effectiveOperationType:16,_processing:16,autoDestroyDisabled:5,disabled:7,icon:1,label:1,referenceElement:1,view:0,activeOperation:32,availableOperationTypes:0,continuousSelectionEnabled:5,defaultLassoToolOptions:0,defaultOperationType:1,defaultPolygonToolOptions:0,defaultPointToolOptions:0,defaultRectangleToolOptions:0,effectiveSelectionManager:32,effectiveSources:32,hideChip:5,hideChipCloseButton:5,hideLassoTool:5,hideOperationTypeControls:5,hidePanTool:5,hidePolygonTool:5,hidePointTool:5,hideProgress:5,hideRectangleTool:5,layerViewPreferenceDisabled:5,layout:1,returnFeatureTitleFields:5,returnGeometryDisabled:5,selectionManager:0,showTextLabels:5,sources:0,state:32,syncResultsDisabled:5,syncWhileDrawing:5,toolConfigs:0,visualScale:1}}static{this.styles=C}get _effectiveDisabled(){return this.disabled||this.state==="disabled"}get _effectiveOperationType(){return this.activeOperation?.effectiveType||this.defaultOperationType}get _processing(){return!!this.activeOperation?.processingFinalSelection}get layerViewPreferenceDisabled(){return!this.viewModel.layerViewPreferenceEnabled}set layerViewPreferenceDisabled(e){this.viewModel.layerViewPreferenceEnabled=!e}get returnGeometryDisabled(){return!this.viewModel.returnGeometry}set returnGeometryDisabled(e){this.viewModel.returnGeometry=!e}get state(){return this.viewModel.state}get syncResultsDisabled(){return!this.viewModel.persistSelection}set syncResultsDisabled(e){this.viewModel.persistSelection=!e}get syncWhileDrawing(){return!this.viewModel.selectOnComplete}set syncWhileDrawing(e){this.viewModel.selectOnComplete=!e}async activate(e){if(this.cancel(),!this._effectiveDisabled)return this.viewModel.activate(e)}async activateTool(e){if(!this._effectiveDisabled)return this.viewModel.activateTool(e)}async cancel(){this.viewModel.cancel()}async destroy(){this.viewModel?.destroy()}async syncSources(){return this.effectiveSelectionManager?.syncSources()}async toggleTool(e){if(!this._effectiveDisabled)return this.viewModel.toggleTool(e)}_handleClearSelection(){this.effectiveSelectionManager?.clear(),this.arcgisClear.emit()}_getLabelForSelectionOperationType(e){let{messages:t}=this;switch(e){case"replace":return t?.replaceSelection;case"add":return t?.addToSelection;case"remove":return t?.removeFromSelection}}_getTextForSelectionOperationType(e){let{messages:t}=this;switch(e){case"replace":return t?.replace;case"add":return t?.add;case"remove":return t?.remove}}_getTextForChip(e){let{layout:t,messages:i,visualScale:o}=this,a=o==="l"?999:99;return i.countTruncated&&e>a&&t==="vertical"?u(i.countTruncated,{count:a}):M(e)}_getTooltipForChip(e){let{messages:t}=this;return!t?.selectionCount||!t?.clearSelectionCount?"":this.hideChipCloseButton||e===0?u(t.selectionCount,{count:e}):u(t.clearSelectionCount,{count:e})}#i(){if(this.hideProgress)return;let e=this.messages.processing;return s`<calcite-progress aria-label=${e??l} .label=${e} .type=${this._processing?"indeterminate":"determinate"}></calcite-progress>`}#o(){return p("tools-group",s`<calcite-action-group>${this.#s()}${this.#a()}</calcite-action-group>`)}#s(){return[this.#l(),this.#c(),this.#r(),this.#d(),this.#h()]}#a(){return this.toolConfigs.map(({toolName:e,icon:t})=>this.#e(e,t))}#l(){if(this.hidePanTool)return;let e=this.messages.pan??"";return this.#t({active:!this.activeOperation,disabled:this._effectiveDisabled,icon:"pan",onclick:()=>{this.cancel()},text:e,title:e})}#n(){if(this.hideChip)return;let{effectiveSelectionManager:e}=this,t=e?.count??0,i=this._getTextForChip(t),o=!this.hideChipCloseButton&&t>0;return s`<calcite-chip appearance=outline .closable=${o} .disabled=${this._effectiveDisabled||t===0} .label=${i} .scale=${this.visualScale} title=${this._getTooltipForChip(t)??l} @calciteChipClose=${this._handleClearSelection}>${i}</calcite-chip>`}#c(){if(this.hidePointTool)return;let{messages:e}=this;return this.#e("point","selection-set",e.point,e.selectByPoint)}#r(){if(this.hidePolygonTool)return;let{messages:e}=this;return this.#e("polygon","polygon-select",e.polygon,e.selectByPolygon)}#h(){if(this.hideLassoTool)return;let{messages:e}=this;return this.#e("lasso","lasso-select",e.lasso,e.selectByLasso)}#d(){if(this.hideRectangleTool)return;let{messages:e}=this;return this.#e("rectangle","cursor-marquee",e.rectangle,e.selectByRectangle)}#p(){let{availableOperationTypes:e}=this;if(this.hideOperationTypeControls||!e.length)return;let{_effectiveOperationType:t,showTextLabels:i,visualScale:o}=this,a=w[t],c=this._getTextForSelectionOperationType(t),r=this._getLabelForSelectionOperationType(t);return p("toggle-group",s`<calcite-action-group><calcite-dropdown overlay-positioning=fixed placement=bottom-start .scale=${o}><calcite-action class=tool-button .disabled=${this._effectiveDisabled} .icon=${a} .scale=${o} slot=trigger .text=${c??""} .textEnabled=${i} title=${r??l}><calcite-icon icon=chevron-down scale=s></calcite-icon></calcite-action><calcite-dropdown-group>${e.map(h=>this.#u(h))}</calcite-dropdown-group></calcite-dropdown></calcite-action-group>`)}#u(e){return s`<calcite-dropdown-item .iconStart=${w[e]} .selected=${this.defaultOperationType===e} @calciteDropdownItemSelect=${()=>this.defaultOperationType=e}>${this._getLabelForSelectionOperationType(e)}</calcite-dropdown-item>`}#e(e,t="selection",i=e,o=i){return this.#t({active:this.activeOperation?.toolName===e,disabled:this._effectiveDisabled,icon:t,onclick:()=>{this.toggleTool(e)},text:i,title:o})}#t(e){let{active:t,disabled:i,icon:o,onclick:a,text:c,title:r}=e,{showTextLabels:h,visualScale:O}=this;return s`<calcite-action .active=${t} class=tool-button .disabled=${i} .icon=${o} @click=${a} .text=${c} .textEnabled=${h} title=${r??l} .scale=${O}></calcite-action>`}render(){return s`<div><calcite-action-bar expand-toggle-disabled .layout=${this.layout} overflow-mode=none .scale=${this.visualScale}>${this.#p()}${this.#o()}${this.#n()}</calcite-action-bar>${this.#i()}</div>`}};y("arcgis-selection-toolbar",g);return g},"intl","widgets/support/SelectionToolbar/SelectionToolbarViewModel",a,c,e,g,h)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import i from"./YG4HDEP3.js";import"./VJVKFKSG.js";import h from"./ILBDNJQP.js";import{a as y}from"./5JADSW57.js";import f from"./4FBTH6YD.js";import e from"./KORK4WZ7.js";import{h as p}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import b from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import{b as c}from"./XURWCCLX.js";import{N as l,O as u,V as d,a as g,b as a,o,w as r}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([T,{when:R},x,,,,b,{a:m}])=>{var k=g`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}arcgis-utility-network-trace-inputs[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;--calcite-panel-background-color: var(--calcite-color-background);min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}slot[name=results]::slotted(:not(arcgis-utility-network-trace-results)){display:none}slot[name=results]::slotted([arcgis-hidden-results-slot-item]){display:none}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}}`,D=b(x),v="arcgis-utility-network-trace-results",f="arcgis-hidden-results-slot-item",C=["actions","autoDestroyDisabled","aggregatedGeometryGraphicsColor","disableHighlightFeatureResults","hideActionBar","hideFeatureResults","hidePlaceholder","includeDefaultActionsDisabled","messageOverrides","referenceElement","view","_traceError","_traceResult"],h=class extends u{constructor(){super(...arguments),this._messages=y({blocking:!0}),this.#t=D(this),this._activeTab="input",this._showMissingTerminalWarning=!1,this._showNoStartingPointsWarning=!1,this._slottedElements=[],this._mode="default",this.autoDestroyDisabled=!1,this.aggregatedGeometryGraphicsColor=new T([255,255,0,.6]),this.disableHighlightFeatureResults=!1,this.hideActionBar=!1,this.hideGraphics=!1,this.hidePlaceholder=!1,this.hideFeatureResults=!1,this.includeDefaultActionsDisabled=!1,this.state=this.#t.state,this.view=this.#t.view,this.arcgisHideGraphicsChange=r(),this.arcgisPropertyChange=p()("aggregatedGeometryGraphicsColor","hideGraphics"),this.arcgisReady=r(),this.arcgisTriggerAction=r(),this.arcgisTraceLocationSelectEnd=r(),this.arcgisTraceLocationSelectStart=r(),this.arcgisTraceResultClear=r(),this.arcgisTraceResultFeaturesReady=r()}static{this.properties={_activeTab:16,_traceError:16,_traceResult:16,_showMissingTerminalWarning:16,_showNoStartingPointsWarning:16,_slottedElements:16,_mode:16,actions:0,autoDestroyDisabled:5,beforeTraceLocationSelectStart:0,aggregatedGeometryGraphicsColor:0,disableHighlightFeatureResults:5,hideActionBar:5,hideGraphics:5,hidePlaceholder:5,hideFeatureResults:5,includeDefaultActionsDisabled:5,label:3,messageOverrides:0,traceResultFeatures:32,referenceElement:1,state:32,view:0}}static{this.styles=k}#t;#e;#i;get#r(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}get#l(){return Array.from(this.el.children).some(t=>t.slot==="results"&&t.matches(v))}get traceResultFeatures(){return this.#i?.traceResultFeatures??[]}async destroy(){await this.#i?.destroy(),await this.#e?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[R(()=>!this.#t.utilityNetwork,()=>this.#s("input"))])}willUpdate(t){C.some(e=>t.has(e))&&this.#a()}#n(){this._traceResult=void 0,this.#i?.clearResults()}#c(){if(!this.#e)return;let{traceLocations:t,traceLocationDetails:e,traceConfiguration:i,isSubnetworkNameTraceSelected:s}=this.#e,w=!!i?.subnetworkName,$=t?.some(n=>n.type==="starting-point"),_=e?.some(n=>!!n.flagProperties.terminalConfiguration&&!n.flagProperties.selectedTerminals?.size)??!1;this._traceError=void 0,this._showNoStartingPointsWarning=!s&&!$||s&&!w,this._showMissingTerminalWarning=_}#s(t){this._activeTab=t}#a(){if(!this.#i)return;let t={actions:this.actions,autoDestroyDisabled:this.autoDestroyDisabled,aggregatedGeometryGraphicsColor:this.aggregatedGeometryGraphicsColor,disableHighlightFeatureResults:this.disableHighlightFeatureResults,expanded:!0,hideActionBar:this.hideActionBar,hideFeatureResults:this.hideFeatureResults,hidePlaceholder:this.hidePlaceholder,includeDefaultActionsDisabled:this.includeDefaultActionsDisabled,layers:this.#r,messageOverrides:this.messageOverrides,referenceElement:this.referenceElement,traceError:this._traceError,traceResult:this._traceResult,utilityNetwork:this.#t.utilityNetwork??void 0,view:this.view??void 0};Object.assign(this.#i,t)}#h(t){let{_messages:e}=this;switch(t){case"no-user-type-extension":return e.errors.loadErrors.noUserTypeExtension;case"no-utility-network":return e.errors.loadErrors.noUtilityNetwork;case"no-view":return e.errors.loadErrors.noView;case"sceneView-not-supported":return e.errors.loadErrors.sceneViewNotSupported;default:return t}}async#g(){let t=this.#e?.selectedNamedTraceConfiguration,e=this.#e?.traceConfiguration;if(!(t?.traceType&&e)){o("error",this,"Trace configuration not found");return}let i=this.#e?.traceLocations;try{this._traceResult=await this.#t.executeTraceConfiguration({traceType:t.traceType,traceConfiguration:e,traceLocations:i??[],resultTypes:t.resultTypes,outSpatialReference:this.view?.spatialReference})}catch(s){m(s,this,"Error while running trace"),this._traceError=s,this._traceResult=void 0}}#u(){this.#c(),!(this._showNoStartingPointsWarning||this._showMissingTerminalWarning)&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1,this.#n(),this.#s("results"),this.#g())}#d(t){t&&(this.#e=t)}#o(t){t&&(this.#i=t)}#p(t){this._slottedElements=c(t);let e=c(t,v);e.length<this._slottedElements.length&&o("warn",this,"The trace results pane only renders instances of `arcgis-utility-network-trace-results` in the `results` slot."),e.length>1&&o("warn",this,"Multiple `arcgis-utility-network-trace-results` elements were provided in the `results` slot. Only the first will render.");let[i]=e;for(let s of e)s===i?s.removeAttribute(f):s.setAttribute(f,"");this.#o(i),this.#a()}#m(t){let{detail:e,target:i}=t;e.name==="aggregatedGeometryGraphicsColor"?(t.stopPropagation(),this.aggregatedGeometryGraphicsColor=i[e.name]):e.name==="hideGraphics"&&(t.stopPropagation(),this.hideGraphics=i[e.name],this.arcgisHideGraphicsChange.emit(this.hideGraphics))}#y(t){t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented&&t.preventDefault()}#b(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit()}#v(t){t.stopPropagation(),this.arcgisTraceResultClear.emit()}#f(t){t.stopPropagation(),this.arcgisTraceResultFeaturesReady.emit()}#w(t){t.stopPropagation(),this.arcgisTriggerAction.emit(t.detail)}#$(t){let{detail:e,target:i}=t;t.stopPropagation(),e.name==="selectedUtilityNetwork"&&(this.#t.utilityNetwork=i.selectedUtilityNetwork,this.#a()),e.name==="selectedNamedTraceConfiguration"&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1),e.name==="mode"&&(this._mode=i.mode)}#_(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showMissingTerminalWarning=!1}><div slot=title>${t.errors.missingTerminalTitle}</div><div slot=message>${t.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`}#T(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showNoStartingPointsWarning=!1}><div slot=title>${t.errors.noStartingPointsTitle}</div><div slot=message>${t.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`}#R(){return a`<calcite-tab .selected=${this._activeTab==="results"}>${this.state==="executing"&&a`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>`||""}<arcgis-utility-network-trace-results-pane hide-warnings .hidden=${this.state==="executing"}><slot name=results @slotchange=${this.#p}></slot>${this.#l?null:a`<arcgis-utility-network-trace-results .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .disableHighlightFeatureResults=${this.disableHighlightFeatureResults} expanded .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .hidePlaceholder=${this.hidePlaceholder} .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .layers=${this.#r} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceError=${this._traceError} .traceResult=${this._traceResult} .utilityNetwork=${this.#t.utilityNetwork??void 0} .view=${this.view??void 0} @arcgisPropertyChange=${this.#m} @arcgisResultsReady=${this.#f} @arcgisTraceResultClear=${this.#v} @arcgisTriggerAction=${this.#w} ${l(this.#o)}></arcgis-utility-network-trace-results>`}</arcgis-utility-network-trace-results-pane></calcite-tab>`}#x(){let{_messages:t,_traceResult:e}=this,i=!!(e?.elements.length||e?.globalFunctionResults.length||e?.aggregatedGeometry)&&this.#i?.state==="ready",s=this.#i?.numFeatureResults??0;return a`<calcite-button appearance=outline width=full @click=${()=>{this.#s("input"),this.#n()}} .disabled=${!i} slot=footer>${s>0&&!this.hideFeatureResults&&this.state!=="executing"?t.buttons.clearResultsCustom.replace("{number}",s.toString()):t.buttons.clearResultsGeneric}</calcite-button>`}#k(){let{_mode:t}=this,{loadError:e}=this.#t,i=(e==="no-user-type-extension"||e==="sceneView-not-supported"?a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#h(e)}</div></calcite-notice>`:void 0)??a`${this._showNoStartingPointsWarning&&t==="default"&&this.#T()||""}${this._showMissingTerminalWarning&&t==="default"&&this.#_()||""}<arcgis-utility-network-trace-inputs .autoDestroyDisabled=${this.autoDestroyDisabled} .hideFeaturesActionBar=${this.hideActionBar} .referenceElement=${this.referenceElement} .view=${this.view??void 0} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisPropertyChange=${this.#$} @arcgisTraceLocationSelectEnd=${this.#b} @arcgisTraceLocationSelectStart=${this.#y} ${l(this.#d)}></arcgis-utility-network-trace-inputs>`;return a`<calcite-tab .selected=${this._activeTab==="input"}><div class="inputs-tab-container">${i}</div></calcite-tab>`}#D(){let{state:t}=this;if(this._mode!=="default")return null;let e=t==="disabled"||t==="loading"||!this.#e?.traceConfiguration;return a`<calcite-button appearance=solid width=full @click=${this.#u} slot=footer .disabled=${e}>${this._messages.buttons.getResults}</calcite-button>`}render(){let{_activeTab:t,state:e}=this;return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${()=>this.#s("input")} .selected=${t==="input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${()=>this.#s("results")} .selected=${t==="results"} .disabled=${e==="disabled"||e==="loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#k()}${this.#R()}</calcite-tabs>${t==="input"?this.#D():null}${t==="results"?this.#x():null}</calcite-panel>`}};d("arcgis-utility-network-trace-analysis",h);return h},"Color","core/reactiveUtils","networks/UtilityNetworkTraceAnalysis",b,e,f,h,i)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import d from"./EDMWGUZ2.js";import c from"./TMJX7DFH.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import{b}from"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as k,Q as w,R as $,S as l,V as _,a as A,b as a,n as x}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([z,P,C,L,{watch:S},,{d:f}])=>{function I(i){let t=i.toLowerCase();return t==="image/bmp"||t==="image/emf"||t==="image/exif"||t==="image/gif"||t==="image/x-icon"||t==="image/jpeg"||t==="image/png"||t==="image/tiff"||t==="image/x-wmf"}function T(i){return i?i==="text/plain"?"file-text":i==="application/pdf"?"file-pdf":i==="text/csv"?"file-csv":i==="application/gpx+xml"?"file-gpx":i==="application/x-dwf"?"file-cad":i==="application/postscript"||i==="application/json"||i==="text/xml"||i==="model/vrml"?"file-code":i==="application/x-zip-compressed"||i==="application/x-7z-compressed"||i==="application/x-gzip"||i==="application/x-tar"||i==="application/x-gtar"||i==="application/x-bzip2"||i==="application/gzip"||i==="application/x-compress"||i==="application/x-apple-diskimage"||i==="application/x-rar-compressed"||i==="application/zip"?"file-zip":i.includes("image/")?"file-image":i.includes("audio/")?"file-sound":i.includes("video/")?"file-video":i.includes("msexcel")||i.includes("ms-excel")||i.includes("spreadsheetml")?"file-excel":i.includes("msword")||i.includes("ms-word")||i.includes("wordprocessingml")?"file-word":i.includes("powerpoint")||i.includes("presentationml")?"file-report":"file":"file"}var j=A`:host([empty]){display:none}.item-link{display:flex;flex-grow:1;color:var(--calcite-color-text-3)}.item-link:visited,.item-link:hover,.item-link:focus-visible,.item-link:active{color:var(--calcite-color-text-1)}.item-link img{max-width:100%;max-height:100%;object-fit:contain}.item-link--list{align-items:center;justify-content:center;width:64px;max-height:64px;overflow:hidden;border-radius:var(--calcite-corner-radius-sm)}.item-link--list img{border-radius:var(--calcite-corner-radius-sm)}.item-link--list-icon{border:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.item-link--list calcite-icon{margin:var(--calcite-spacing-lg)}.item-link--preview{align-items:center;justify-content:center}.item-link--preview calcite-icon{margin-block:var(--calcite-spacing-lg)}.item-description{text-align:center;word-wrap:break-word;word-break:break-word}calcite-link{--calcite-link-text-color: var(--calcite-color-text-3);padding-inline:var(--calcite-spacing-sm);word-wrap:break-word;word-break:break-word}calcite-card{width:100%}calcite-card:hover,calcite-card:focus,calcite-card:focus-within{--calcite-card-border-color: var(--calcite-color-text-1)}`,E=C.ofType(z),v=class extends k{constructor(){super(...arguments),this._attachmentLayer=null,this._supportsImageOrientation=window?.CSS?.supports("image-orientation","from-image"),this.hideSection=!1,this._attachmentInfos=new E,this.headingLevel=2,this.hidePreviewImageAttachmentName=!1,this.empty=!1}static{this.properties={effectiveDisplayType:16,getAttachmentsPromise:16,hideSection:16,_attachmentInfos:16,_hasContent:16,supportsResizeAttachments:16,attachmentKeywords:0,attachmentTypes:0,description:1,displayType:1,graphic:0,heading:1,messages:0,orderByFields:0,headingLevel:9,hidePreviewImageAttachmentName:5,empty:39}}static{this.styles=j}get _supportsTypeWildcard(){let{graphic:t}=this;if(!t)return!1;let e=f(t);return e?.loaded&&"capabilities"in e&&e.capabilities&&"attachment"in e.capabilities&&e.capabilities.attachment&&"supportsResize"in e.capabilities.attachment&&e.capabilities.attachment.supportsTypeWildcard||!1}get effectiveDisplayType(){let{displayType:t}=this;return!t||t==="auto"?this.supportsResizeAttachments?"preview":"list":t}get _hasContent(){return this._attachmentInfos.length>0||this.getAttachmentsPromise!=null}get supportsResizeAttachments(){let{graphic:t}=this;if(!t)return!1;let e=f(t);return e?.loaded&&"capabilities"in e&&e.capabilities&&"attachment"in e.capabilities&&e.capabilities.attachment&&"supportsResize"in e.capabilities.attachment&&e.capabilities.attachment.supportsResize||!1}loaded(){this.manager.onLifecycle(()=>[S(()=>this.graphic,()=>this.graphicChanged(),{initial:!0})])}async getAttachments(){let{_attachmentLayer:t,_attachmentInfos:e,orderByFields:n,attachmentTypes:c,attachmentKeywords:o,_supportsTypeWildcard:m}=this;if(!t||typeof t.queryAttachments!="function")throw new L("invalid-layer","getAttachments(): A valid layer is required.");let p=this.graphic?.getObjectId();if(typeof p!="number")throw new L("invalid-object-id","getAttachments(): Numeric object id is required");let u=n?.map(s=>`${s.field} ${s.order==="descending"?"DESC":"ASC"}`),r=new P({objectIds:[p],returnMetadata:!0,orderByFields:u,attachmentTypes:m?c?.filter(Boolean).map(s=>`${s}/*`):void 0,keywords:o}),h=[],d=t.queryAttachments(r).then(s=>s[p]||h).catch(()=>h);this.getAttachmentsPromise=d,this._setEmpty(!1);let g=await d;e.destroyAll(),g.length&&e.addMany(g),this.getAttachmentsPromise=null,this._setEmpty(!this._hasContent)}_setEmpty(t){x(()=>this.empty=t)}setAttachmentLayer(){let{graphic:t}=this,e=f(t);this._attachmentLayer=e?e.type==="scene"&&e.associatedLayer!=null?e.associatedLayer:e:null}graphicChanged(){if(!this.graphic){this._attachmentInfos.destroyAll(),this.getAttachmentsPromise=null,this._setEmpty(!0);return}this.setAttachmentLayer(),this.getAttachments().catch(()=>{this._attachmentInfos.destroyAll(),this.getAttachmentsPromise=null,this._setEmpty(!0)})}getCSSTransform(t){let{orientationInfo:e}=t;return!this._supportsImageOrientation&&e?[e.rotation?`rotate(${e.rotation}deg)`:"",e.mirrored?"scaleX(-1)":""].join(" "):""}render(){return this.empty?null:a`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this.renderAttachments()}</div>`}renderAttachmentsList(t){return a`<calcite-list .loading=${!!this.getAttachmentsPromise} .label=${this.messages?.componentLabel??""} interaction-mode=static selection-mode=none>${t.toArray().filter(Boolean).map(e=>this.renderAttachmentListItem(e))}</calcite-list>`}renderAttachmentsPreview(t){return a`<calcite-card-group .label=${this.messages?.componentLabel??""}>${this.getAttachmentsPromise?a`<calcite-card loading></calcite-card>`:t.toArray().filter(Boolean).map(e=>this.renderAttachmentPreviewItem(e))}</calcite-card-group>`}renderAttachmentsCarousel(t){let e=t.toArray().filter(Boolean);return a`<calcite-carousel .paginationDisabled=${e.length<2} .label=${this.messages?.componentLabel??""} pagination-position=top>${this.getAttachmentsPromise?a`<calcite-carousel-item .label=${this.messages?.componentLabel??""}><calcite-card loading></calcite-card></calcite-carousel-item>`:e.map(n=>a`<calcite-carousel-item .label=${n.name||this.messages?.noTitle||""}>${this.renderAttachmentPreviewItem(n,!0)}</calcite-carousel-item>`)}</calcite-carousel>`}renderAttachments(){let{effectiveDisplayType:t,_attachmentInfos:e}=this;return t==="carousel"?this.renderAttachmentsCarousel(e):t==="preview"?this.renderAttachmentsPreview(e):this.renderAttachmentsList(e)}renderAttachmentListItem(t){let{supportsResizeAttachments:e}=this,{contentType:n,name:c,url:o,size:m}=t,p=64,u=c||this.messages?.noTitle,r=T(n),h=this.getCSSTransform(t),d=h?{transform:h,"image-orientation":"none"}:{},g=e&&I(n),s=a`<a class=${w(b("item-link","item-link--list",{"item-link--list-icon":!g}))} slot=content-start href=${o??void 0??l} rel=noreferrer target=_blank>${g?a`<img alt=${c??l} src=${`${o}${o?.includes("?")?"&":"?"}w=${p}&s=${m}`} style=${$(d)} title=${c??l}>`:a`<calcite-icon .icon=${r}></calcite-icon>`}</a>`,y=a`<calcite-link slot=content .href=${o??void 0} rel=noreferrer target=_blank>${u}</calcite-link>`;return a`<calcite-list-item .label=${u}>${s}${y}</calcite-list-item>`}renderAttachmentPreviewItem(t,e=!1){let{supportsResizeAttachments:n}=this,{contentType:c,name:o,url:m,size:p}=t,u=225,r=o||this.messages?.noTitle,h=T(c),d=this.getCSSTransform(t),g=d?{transform:d,"image-orientation":"none"}:{},s=n&&I(c),y=a`<a class=${w(b("item-link","item-link--preview"))} slot=thumbnail href=${m??void 0??l} rel=noreferrer target=_blank aria-label=${r??l} title=${r??l}>${s?a`<img alt=${r??l} src=${`${m}${m?.includes("?")?"&":"?"}w=${u}&s=${p}`} style=${$(g)}>`:a`<calcite-icon scale=l .icon=${h}></calcite-icon>`}</a>`;return a`<calcite-card .label=${r}>${y}${(e||this.hidePreviewImageAttachmentName)&&s?null:a`<span class="item-description" slot=description>${r}</span>`}</calcite-card>`}};_("arcgis-feature-attachments",v);return v},"rest/query/support/AttachmentInfo","rest/support/AttachmentQuery","core/Collection","core/Error","core/reactiveUtils",c,d)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import c from"./4DWURRQB.js";import b from"./C2HB2U6P.js";import a from"./CONE7FEI.js";import"./VJVKFKSG.js";import{a as k}from"./5JADSW57.js";import{h as f}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{N as h,O as g,V as m,a as p,b as s,w as d}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([o,{watch:v},{substitute:$},T,{a:b},{c:y,g:w},n])=>{var _=p`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}.subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}.results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,u=class extends g{constructor(){super(...arguments),this._messages=k({blocking:!0}),this.#o=!0,this.#n=new Map,this.#e=new o,this.#i=new o,this.#a=new o,this.#t=null,this.#s=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideFeaturesActionBar=!1,this.mode="default",this.arcgisPropertyChange=f()("mode","selectedNamedTraceConfiguration","selectedUtilityNetwork","traceLocations"),this.arcgisTraceLocationSelectEnd=d(),this.arcgisTraceLocationSelectStart=d()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideFeaturesActionBar:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,referenceElement:1,mode:3,traceLocationDetails:32,traceLocations:32}}static{this.styles=_}#o;get#k(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#l;#n;#e;#i;#a;#t;#r;#u;#p;#g;#s;get#m(){return!this.isSubnetworkNameTraceSelected}get#f(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#v(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationDetails(){return new o([...this.#e,...this.#i,...this.#a])}get traceLocations(){let t=[];return this.#m&&this.#e.forEach(e=>t.push(...this.#d(e))),this.#f&&this.#a.forEach(e=>t.push(...this.#d(e))),this.#i.forEach(e=>t.push(...this.#d(e))),t}async destroy(){this.#w(),n.getSketchViewModel(this.view)?.cancel(),n.removeSketchGraphicsLayer(this.view),this.#r?.destroy(),this.#u?.destroy(),this.#p?.destroy(),this.#g?.destroy(),await this.manager.destroy()}load(){this.#y(),this.manager.onLifecycle(()=>[v(()=>this.view?.map,()=>this.#y())])}willUpdate(t){t.has("selectedUtilityNetwork")&&this.#S()}disconnectedCallback(){super.disconnectedCallback(),this.#n.clear()}#$({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}#y(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView;return}}#T(t){t&&(this.#u=t)}#_(t){t&&(this.#p=t)}#L(t){t&&(this.#g=t)}#N(t){t&&(this.#r=t)}#d(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new T({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#w(){let{view:t}=this;this.#e.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#e.removeAll(),this.#i.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#i.removeAll(),this.#a.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#a.removeAll()}async#S(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){b(e,this,"Error while loading the selected utility network")}this.#C(),this.#F(),this.#w()}#C(){this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[]}#F(){let{selectedUtilityNetwork:t}=this;this.#l=new o(this.#k.filter(e=>t?.isUtilityLayer(e)&&!this.#v.includes(e.layerId)))}#P(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#D(t){if(t==null)return;let e=this.#n,i=this.#l,a=e.get(t);if(a)return a;if(!i)return;let r=i.find(c=>"layerId"in c&&c.layerId===t);return r&&e.set(t,r),r}async#U(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(r=>r.getObjectId()),i.outFields=["*"];let{features:a}=await y(t,i);return a.forEach(r=>{if(!r.getEffectivePopupTemplate(this.#o)){let c=r.layer;r.popupTemplate=c.createPopupTemplate()}}),a}async#E(t){let e=new Map,i=[];return t.forEach(a=>{let r=w(a.layer)?a.layer.parent:a.layer;if(r){let c=this.#D(r.layerId);if(c){let l=e.get(c)||[];l.push(a),e.set(c,l)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let r=e.get(a)??[],c=await this.#U(a,r);i.push(...c)})),i}async#x(t){return this._exceedDisplayLimit=t.length>this.#s,this._candidateFeatures=await this.#E(t.slice(0,this.#s)),this._candidateFeatures.length===0?(this.#c(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#t?.reject(),this.#t=Promise.withResolvers(),await this.#t.promise)}#A(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#c()}#c(t){t?.stopPropagation(),this.#r?.clear(),this.#b(),(this.view?n.getSketchViewModel(this.view):null)?.cancel()}#b(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#t?.reject(),this.#t=null}#I(){let t=this.#t,e=this.#r,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#t=null}}#B(t,e=!1,i){return s`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#G(){let{_namedTraceConfigurations:t,selectedUtilityNetwork:e}=this;return s`<arcgis-utility-network-trace-configuration-picker .traceConfigurations=${t} .utilityNetwork=${e} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="selectedNamedTraceConfiguration"&&(this.selectedNamedTraceConfiguration=i.target.selectedNamedTraceConfiguration),i.detail.name==="traceConfiguration"&&(this._traceConfiguration=i.target.traceConfiguration)}}></arcgis-utility-network-trace-configuration-picker>`}#M(){let{selectedUtilityNetwork:t,view:e}=this;return s`<arcgis-utility-network-picker .selectedUtilityNetwork=${t} .view=${e} @arcgisPropertyChange=${i=>{i.detail.name==="selectedUtilityNetwork"&&(this.selectedUtilityNetwork=i.target.selectedUtilityNetwork)}}></arcgis-utility-network-picker>`}#V(){let{_error:t}=this,{noView:e}=this._messages.errors,i;return t===e?i=this.#B(t,!1,"exclamation-mark-triangle"):i=this.#R(),s`<calcite-flow-item .selected=${this.mode==="default"}>${i}</calcite-flow-item>`}#j(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return s`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#c(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#z(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,r=e.length===1?"feature":"list";return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#o} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideFeaturesActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${()=>this.#b()} @arcgisPropertyChange=${this.#$} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#N)}></arcgis-features-next>`}#q(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,r=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,c=$(e.warnings.exceededDisplayLimit,{limit:this.#s.toString()}),l=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return s`${r&&s`<calcite-input-message class="results-limited-message" icon=exclamation-mark-circle status=idle>${c}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#c()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&s`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#I()} .disabled=${l}>${e.buttons.add}</calcite-button>`||""}`}#h(t,e,i){return s`<arcgis-utility-network-trace-locations .view=${this.view} .traceLocationType=${t} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#P} @arcgisTraceLocationSelectEnd=${this.#A} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#l} .traceLocations=${e} .afterMapInteraction=${this.#x.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(i)}></arcgis-utility-network-trace-locations>`}#R(){let{_messages:t}=this,e=this.#M(),i=this.#G(),a=this._namedTraceConfigurations.length&&this.traceConfiguration?s`${this.#m?this.#h("starting-point",this.#e,this.#T):null}${this.#f?this.#h("stopping-point",this.#a,this.#L):null}${this.#h("barrier",this.#i,this.#_)}`:null,r=this.selectedUtilityNetwork?.loaded?s`${i}${a}`:null;return s`<calcite-block-group .label=${t.labels.traceInputs}>${e}${r}</calcite-block-group>`}render(){let{mode:t}=this;return s`<calcite-panel>${t==="add-spatial-feature"?this.#z():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#V()}${this.#j()}</calcite-flow>${t!=="default"?this.#q():null}</calcite-panel>`}};m("arcgis-utility-network-trace-inputs",u);return u},"core/Collection","core/reactiveUtils","intl","rest/networks/support/TraceLocation",a,b,c)
2
+ import c from"./GLH5GJZC.js";import b from"./TMJX7DFH.js";import a from"./YG4HDEP3.js";import"./VJVKFKSG.js";import{a as k}from"./5JADSW57.js";import{h as f}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{N as h,O as g,V as m,a as p,b as s,w as d}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([o,{watch:v},{substitute:$},T,{a:b},{d:y,h:w},n])=>{var _=p`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}.subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}.results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,u=class extends g{constructor(){super(...arguments),this._messages=k({blocking:!0}),this.#o=!0,this.#n=new Map,this.#e=new o,this.#i=new o,this.#a=new o,this.#t=null,this.#s=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideFeaturesActionBar=!1,this.mode="default",this.arcgisPropertyChange=f()("mode","selectedNamedTraceConfiguration","selectedUtilityNetwork","traceLocations"),this.arcgisTraceLocationSelectEnd=d(),this.arcgisTraceLocationSelectStart=d()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideFeaturesActionBar:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,referenceElement:1,mode:3,traceLocationDetails:32,traceLocations:32}}static{this.styles=_}#o;get#k(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#l;#n;#e;#i;#a;#t;#r;#u;#p;#g;#s;get#m(){return!this.isSubnetworkNameTraceSelected}get#f(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#v(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationDetails(){return new o([...this.#e,...this.#i,...this.#a])}get traceLocations(){let t=[];return this.#m&&this.#e.forEach(e=>t.push(...this.#d(e))),this.#f&&this.#a.forEach(e=>t.push(...this.#d(e))),this.#i.forEach(e=>t.push(...this.#d(e))),t}async destroy(){this.#w(),n.getSketchViewModel(this.view)?.cancel(),n.removeSketchGraphicsLayer(this.view),this.#r?.destroy(),this.#u?.destroy(),this.#p?.destroy(),this.#g?.destroy(),await this.manager.destroy()}load(){this.#y(),this.manager.onLifecycle(()=>[v(()=>this.view?.map,()=>this.#y())])}willUpdate(t){t.has("selectedUtilityNetwork")&&this.#S()}disconnectedCallback(){super.disconnectedCallback(),this.#n.clear()}#$({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}#y(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView;return}}#T(t){t&&(this.#u=t)}#_(t){t&&(this.#p=t)}#L(t){t&&(this.#g=t)}#N(t){t&&(this.#r=t)}#d(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new T({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#w(){let{view:t}=this;this.#e.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#e.removeAll(),this.#i.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#i.removeAll(),this.#a.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#a.removeAll()}async#S(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){b(e,this,"Error while loading the selected utility network")}this.#C(),this.#F(),this.#w()}#C(){this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[]}#F(){let{selectedUtilityNetwork:t}=this;this.#l=new o(this.#k.filter(e=>t?.isUtilityLayer(e)&&!this.#v.includes(e.layerId)))}#P(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#D(t){if(t==null)return;let e=this.#n,i=this.#l,a=e.get(t);if(a)return a;if(!i)return;let r=i.find(c=>"layerId"in c&&c.layerId===t);return r&&e.set(t,r),r}async#U(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(r=>r.getObjectId()),i.outFields=["*"];let{features:a}=await y(t,i);return a.forEach(r=>{if(!r.getEffectivePopupTemplate(this.#o)){let c=r.layer;r.popupTemplate=c.createPopupTemplate()}}),a}async#E(t){let e=new Map,i=[];return t.forEach(a=>{let r=w(a.layer)?a.layer.parent:a.layer;if(r){let c=this.#D(r.layerId);if(c){let l=e.get(c)||[];l.push(a),e.set(c,l)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let r=e.get(a)??[],c=await this.#U(a,r);i.push(...c)})),i}async#x(t){return this._exceedDisplayLimit=t.length>this.#s,this._candidateFeatures=await this.#E(t.slice(0,this.#s)),this._candidateFeatures.length===0?(this.#c(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#t?.reject(),this.#t=Promise.withResolvers(),await this.#t.promise)}#A(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#c()}#c(t){t?.stopPropagation(),this.#r?.clear(),this.#b(),(this.view?n.getSketchViewModel(this.view):null)?.cancel()}#b(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#t?.reject(),this.#t=null}#I(){let t=this.#t,e=this.#r,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#t=null}}#B(t,e=!1,i){return s`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#G(){let{_namedTraceConfigurations:t,selectedUtilityNetwork:e}=this;return s`<arcgis-utility-network-trace-configuration-picker .traceConfigurations=${t} .utilityNetwork=${e} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="selectedNamedTraceConfiguration"&&(this.selectedNamedTraceConfiguration=i.target.selectedNamedTraceConfiguration),i.detail.name==="traceConfiguration"&&(this._traceConfiguration=i.target.traceConfiguration)}}></arcgis-utility-network-trace-configuration-picker>`}#M(){let{selectedUtilityNetwork:t,view:e}=this;return s`<arcgis-utility-network-picker .selectedUtilityNetwork=${t} .view=${e} @arcgisPropertyChange=${i=>{i.detail.name==="selectedUtilityNetwork"&&(this.selectedUtilityNetwork=i.target.selectedUtilityNetwork)}}></arcgis-utility-network-picker>`}#V(){let{_error:t}=this,{noView:e}=this._messages.errors,i;return t===e?i=this.#B(t,!1,"exclamation-mark-triangle"):i=this.#R(),s`<calcite-flow-item .selected=${this.mode==="default"}>${i}</calcite-flow-item>`}#j(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return s`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#c(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#z(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,r=e.length===1?"feature":"list";return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#o} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideFeaturesActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${()=>this.#b()} @arcgisPropertyChange=${this.#$} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#N)}></arcgis-features-next>`}#q(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,r=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,c=$(e.warnings.exceededDisplayLimit,{limit:this.#s.toString()}),l=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return s`${r&&s`<calcite-input-message class="results-limited-message" icon=exclamation-mark-circle status=idle>${c}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#c()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&s`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#I()} .disabled=${l}>${e.buttons.add}</calcite-button>`||""}`}#h(t,e,i){return s`<arcgis-utility-network-trace-locations .view=${this.view} .traceLocationType=${t} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#P} @arcgisTraceLocationSelectEnd=${this.#A} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#l} .traceLocations=${e} .afterMapInteraction=${this.#x.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(i)}></arcgis-utility-network-trace-locations>`}#R(){let{_messages:t}=this,e=this.#M(),i=this.#G(),a=this._namedTraceConfigurations.length&&this.traceConfiguration?s`${this.#m?this.#h("starting-point",this.#e,this.#T):null}${this.#f?this.#h("stopping-point",this.#a,this.#L):null}${this.#h("barrier",this.#i,this.#_)}`:null,r=this.selectedUtilityNetwork?.loaded?s`${i}${a}`:null;return s`<calcite-block-group .label=${t.labels.traceInputs}>${e}${r}</calcite-block-group>`}render(){let{mode:t}=this;return s`<calcite-panel>${t==="add-spatial-feature"?this.#z():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#V()}${this.#j()}</calcite-flow>${t!=="default"?this.#q():null}</calcite-panel>`}};m("arcgis-utility-network-trace-inputs",u);return u},"core/Collection","core/reactiveUtils","intl","rest/networks/support/TraceLocation",a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{E as L,F as $,P as y,R,h as x}from"./MRC7R44N.js";import{P as b,S as V,d as D,f as E,o as G,q as P,u as w}from"./3EYHGXI5.js";import{a as S}from"./CDGKQKVU.js";import{P as M,g as m,o as B}from"./W6X34YBZ.js";var c=class extends ${_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),s=e/Math.abs(e),n=t/Math.abs(t),i=0,a=0,l=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*l,t-=n*l,i+=s*l/2,a+=n*l/2);let r=e,h=t;if(m(r)&&m(h)){let o=Math.min(r,h)/2,u=w(this.get("cornerRadiusTL",8),o),d=w(this.get("cornerRadiusTR",8),o),g=w(this.get("cornerRadiusBR",8),o),_=w(this.get("cornerRadiusBL",8),o),f=Math.min(Math.abs(r/2),Math.abs(h/2));u=x(u,0,f),d=x(d,0,f),g=x(g,0,f),_=x(_,0,f);let p=this._display;p.moveTo(i+u*s,a),p.lineTo(i+r-d*s,a),d>0&&p.arcTo(i+r,a,i+r,a+d*n,d),p.lineTo(i+r,a+h-g*n),g>0&&p.arcTo(i+r,a+h,i+r-g*s,a+h,g),p.lineTo(i+_*s,a+h),_>0&&p.arcTo(i,a+h,i,a+h-_*n,_),p.lineTo(i,a+u*n),u>0&&p.arcTo(i,a,i+u*s,a,u),p.closePath()}}};c.className="RoundedRectangle";c.classNames=$.classNames.concat([c.className]);var v=class extends y{_afterNew(){this._settings.themeTags=b(this._settings.themeTags,["button"]),super._afterNew(),this._setDefaultTagged("background",b(this._settings.themeTags,["background"]),()=>c.new(this._root,{})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};v.className="Button";v.classNames=y.classNames.concat([v.className]);var T=class extends R{_afterNew(){super._afterNew();let e=this.children.push(y.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e),this._setDefaultTagged("background",["editablelabel","background"],()=>c.new(this._root,{}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new M([this.getPrivate("input").events.on(e,t=>{}),this.events.on(e,t=>{this.set("active",!0)})]))}}_prepareChildren(){super._prepareChildren(),this._maybeInitTextarea()}_updateChildren(){if(super._updateChildren(),this.isDirty("active")){let e=this.get("active",!1);e?this._startEditing():this._stopEditing();let t=this.get("background");t&&t.set("active",e)}this._syncText(),this._syncStyle()}_maybeInitTextarea(){if(!this._isInited()){let e=this.getPrivate("input");if(e&&e.getPrivate("htmlElement")){let s=e.getPrivate("htmlElement").querySelector(".am5-editable-label");s&&(this.setPrivate("textarea",s),s.addEventListener("input",n=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",n=>this.set("active",!1)),E("keyboardevents")&&this._disposers.push(D(document,"keydown",n=>{P(n)=="Escape"&&this.set("active",!1)})),this._disposers.push(D(document,"keydown",n=>{P(n)=="Enter"&&this.get("multiLine")===!1&&(n.preventDefault(),this.set("active",!1))})),this.events.dispatch("inited",{type:"inited",target:this}))}}}_isInited(){return!!this.getPrivate("textarea")}_startEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._startEditing()});return}this._text.set("opacity",0);let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.get("text","")==""&&this.set("text"," "),e.show(0),this.setTimeout(()=>{this._syncStyle(),t.focus()},100))}_stopEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._stopEditing()});return}let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.set("text",t.value),e.hide(0),this._text.set("opacity",1))}_syncStyle(){let e=this.getPrivate("input"),t=this.getPrivate("textarea"),s=e.getPrivate("htmlElement");if(t&&s){let n=window.getComputedStyle(t);B(n,d=>{t.style[d]="initial"}),t.style.color=this.get("fill",V(0)).toCSS(this.get("fillOpacity",1)),t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="none",t.style.outline="none",t.style.padding="0",t.wrap="off",t.style.resize="none",t.style.overflow="hidden";let i=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);i>0?t.style.maxWidth=i+"px":t.style.minWidth="",t.style.height="auto",t.style.minHeight=t.scrollHeight+"px",this.get("width")&&(t.style.width=this.width()-this.get("paddingLeft",0)-this.get("paddingRight",0)+"px",t.style.minWidth="");let a=this.get("lineHeight");a?a instanceof S?t.style.lineHeight=a.value+"":m(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let l=this.get("fontFamily");l||(l=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=l;let r=this.get("fontSize");r?m(r)?r=r+"px":r=r:r=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=r;let h=this.get("fontWeight");h?h=h:h=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=h;let o=this.get("fontStyle");o?o=o:o=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=o,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let d=this.get("textAlign","start");d=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):d=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=d})}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};T.className="EditableLabel";T.classNames=R.classNames.concat([T.className]);var C=class extends y{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=b(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._setDefaultTagged("background",b(this._settings.themeTags,["main","background"]),()=>c.new(this._root,{}))}_makeButton(){return this.children.push(v.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:L.new(this._root,{themeTags:["icon"]})._markC("themeTags")})._markC("themeTags","icon"))}_makeThumb(){return this.children.push(c.new(this._root,{themeTags:["thumb",this.get("orientation")]})._markC("themeTags"))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,s=this.thumb,n=this.get("background");n&&this._disposers.push(n.events.on("click",i=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(i.point),l=this.width(),r=this.height(),h=this.get("orientation"),o;h=="vertical"?o=(a.y-s.height()/2)/r:o=(a.x-s.width()/2)/l;let u,d;h=="vertical"?(u=o*r,d="y"):(u=o*l,d="x");let g=this.get("animationDuration",0);g>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:d,to:u,duration:g,easing:this.get("animationEasing")}))):(this.thumb._setC(d,u),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",i=>{if(!G(i.originalEvent,this))return;let a=this.get("animationDuration",0),l=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:l}),this.animate({key:"end",to:1,duration:a,easing:l})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(s.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(s.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(s.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e._setC("x",0),t._setC("x",0),this._disposers.push(s.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("x",i=>this.width()/2)),this._disposers.push(t.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0))),this._disposers.push(t.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0)))):(e._setC("y",0),t._setC("y",0),this._disposers.push(s.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("y",i=>this.height()/2)),this._disposers.push(t.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))),this._disposers.push(t.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,s=this.get("orientation"),n=this.height(),i=this.width();s=="vertical"?(e._setC("y",n*this.get("start",0)),t._setC("y",n*this.get("end",1))):(e._setC("x",i*this.get("start",0)),t._setC("x",i*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),l=Math.round(this.get("start",0)*100),r=Math.round(this.get("end",0)*100),h,o;a?(h=a.call(this,this.get("start",0)),o=a.call(this,this.get("end",0))):(h=l+"%",o=r+"%"),e._setC("ariaLabel",this._t("From %1",void 0,h)),e._setC("ariaValueNow",""+l),e._setC("ariaValueText",l+"%"),e._setC("ariaValueMin","0"),e._setC("ariaValueMax","100"),t._setC("ariaLabel",this._t("To %1",void 0,o)),t._setC("ariaValueNow",""+r),t._setC("ariaValueText",r+"%"),t._setC("ariaValueMin","0"),t._setC("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,n=this.height(),i=this.width(),a=t.x(),l=s.x(),r=t.y(),h=s.y(),o=0,u=1;this.get("orientation")=="vertical"?m(r)&&m(h)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("height",h-r),e._setC("y",r)),o=r/n,u=h/n):m(a)&&m(l)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("width",l-a),e._setC("x",a)),o=a/i,u=l/i),this.getPrivate("isBusy")&&(this.get("start")!=o||this.get("end")!=u)&&(this._setC("start",o),this._setC("end",u));let d=this.getPrivate("positionTextFunction"),g=Math.round(this.get("start",0)*100),_=Math.round(this.get("end",0)*100),f,p;d?(f=d.call(this,this.get("start",0)),p=d.call(this,this.get("end",0))):(f=g+"%",p=_+"%"),e._setC("ariaLabel",this._t("From %1 to %2",void 0,f,p)),e._setC("ariaValueNow",""+g),e._setC("ariaValueText",g+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let n=e.height();t._setC("y",e.y()),s._setC("y",e.y()+n)}else{let n=e.width();t._setC("x",e.x()),s._setC("x",e.x()+n)}}};C.className="Scrollbar";C.classNames=y.classNames.concat([C.className]);export{c as a,v as b,T as c,C as d};
2
+ import{E as L,F as $,P as y,R,h as x}from"./TZHXSIXK.js";import{P as b,S as V,d as D,f as E,o as G,q as P,u as w}from"./PLTLRYBF.js";import{a as S}from"./T2DT5I33.js";import{P as M,g as m,o as B}from"./6NWR2Z4F.js";var c=class extends ${_beforeChanged(){super._beforeChanged(),(this.isDirty("cornerRadiusTL")||this.isDirty("cornerRadiusTR")||this.isDirty("cornerRadiusBR")||this.isDirty("cornerRadiusBL"))&&(this._clear=!0)}_draw(){let e=this.width(),t=this.height(),s=e/Math.abs(e),n=t/Math.abs(t),i=0,a=0,l=this.get("strokeWidth",0);this.get("containStroke",!1)&&(e-=s*l,t-=n*l,i+=s*l/2,a+=n*l/2);let r=e,h=t;if(m(r)&&m(h)){let o=Math.min(r,h)/2,u=w(this.get("cornerRadiusTL",8),o),d=w(this.get("cornerRadiusTR",8),o),g=w(this.get("cornerRadiusBR",8),o),_=w(this.get("cornerRadiusBL",8),o),f=Math.min(Math.abs(r/2),Math.abs(h/2));u=x(u,0,f),d=x(d,0,f),g=x(g,0,f),_=x(_,0,f);let p=this._display;p.moveTo(i+u*s,a),p.lineTo(i+r-d*s,a),d>0&&p.arcTo(i+r,a,i+r,a+d*n,d),p.lineTo(i+r,a+h-g*n),g>0&&p.arcTo(i+r,a+h,i+r-g*s,a+h,g),p.lineTo(i+_*s,a+h),_>0&&p.arcTo(i,a+h,i,a+h-_*n,_),p.lineTo(i,a+u*n),u>0&&p.arcTo(i,a,i+u*s,a,u),p.closePath()}}};c.className="RoundedRectangle";c.classNames=$.classNames.concat([c.className]);var v=class extends y{_afterNew(){this._settings.themeTags=b(this._settings.themeTags,["button"]),super._afterNew(),this._setDefaultTagged("background",b(this._settings.themeTags,["background"]),()=>c.new(this._root,{})),this.setPrivate("trustBounds",!0)}_prepareChildren(){if(super._prepareChildren(),this.isDirty("icon")){let e=this._prevSettings.icon,t=this.get("icon");t!==e&&(this._disposeProperty("icon"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.icon=t)}if(this.isDirty("label")){let e=this._prevSettings.label,t=this.get("label");t!==e&&(this._disposeProperty("label"),e&&e.dispose(),t&&this.children.push(t),this._prevSettings.label=t)}}};v.className="Button";v.classNames=y.classNames.concat([v.className]);var T=class extends R{_afterNew(){super._afterNew();let e=this.children.push(y.new(this._root,{html:'<textarea class="am5-editable-label"></textarea>',isMeasured:!1}));e.hide(),this.setPrivate("input",e),this._setDefaultTagged("background",["editablelabel","background"],()=>c.new(this._root,{}))}_beforeChanged(){if(super._beforeChanged(),this.isDirty("editOn")){this._editOnEvents&&this._editOnEvents.dispose();let e=this.get("editOn","click");e!="none"&&(this._editOnEvents=new M([this.getPrivate("input").events.on(e,t=>{}),this.events.on(e,t=>{this.set("active",!0)})]))}}_prepareChildren(){super._prepareChildren(),this._maybeInitTextarea()}_updateChildren(){if(super._updateChildren(),this.isDirty("active")){let e=this.get("active",!1);e?this._startEditing():this._stopEditing();let t=this.get("background");t&&t.set("active",e)}this._syncText(),this._syncStyle()}_maybeInitTextarea(){if(!this._isInited()){let e=this.getPrivate("input");if(e&&e.getPrivate("htmlElement")){let s=e.getPrivate("htmlElement").querySelector(".am5-editable-label");s&&(this.setPrivate("textarea",s),s.addEventListener("input",n=>{this.get("multiLine")===!1&&(s.value=s.value.replace(/\n/g," ")),this.set("text",s.value),this._syncStyle()}),s.addEventListener("blur",n=>this.set("active",!1)),E("keyboardevents")&&this._disposers.push(D(document,"keydown",n=>{P(n)=="Escape"&&this.set("active",!1)})),this._disposers.push(D(document,"keydown",n=>{P(n)=="Enter"&&this.get("multiLine")===!1&&(n.preventDefault(),this.set("active",!1))})),this.events.dispatch("inited",{type:"inited",target:this}))}}}_isInited(){return!!this.getPrivate("textarea")}_startEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._startEditing()});return}this._text.set("opacity",0);let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.get("text","")==""&&this.set("text"," "),e.show(0),this.setTimeout(()=>{this._syncStyle(),t.focus()},100))}_stopEditing(){if(!this._isInited()){this.events.once("inited",()=>{this._stopEditing()});return}let e=this.getPrivate("input"),t=this.getPrivate("textarea");t&&(this.set("text",t.value),e.hide(0),this._text.set("opacity",1))}_syncStyle(){let e=this.getPrivate("input"),t=this.getPrivate("textarea"),s=e.getPrivate("htmlElement");if(t&&s){let n=window.getComputedStyle(t);B(n,d=>{t.style[d]="initial"}),t.style.color=this.get("fill",V(0)).toCSS(this.get("fillOpacity",1)),t.style.backgroundColor="rgba(0, 0, 0, 0)",t.style.border="none",t.style.outline="none",t.style.padding="0",t.wrap="off",t.style.resize="none",t.style.overflow="hidden";let i=this.get("maxWidth",0)-this.get("paddingLeft",0)-this.get("paddingRight",0);i>0?t.style.maxWidth=i+"px":t.style.minWidth="",t.style.height="auto",t.style.minHeight=t.scrollHeight+"px",this.get("width")&&(t.style.width=this.width()-this.get("paddingLeft",0)-this.get("paddingRight",0)+"px",t.style.minWidth="");let a=this.get("lineHeight");a?a instanceof S?t.style.lineHeight=a.value+"":m(a)&&(t.style.lineHeight=a+""):t.style.lineHeight="1.2";let l=this.get("fontFamily");l||(l=getComputedStyle(s,"font-family").getPropertyValue("font-family")),t.style.fontFamily=l;let r=this.get("fontSize");r?m(r)?r=r+"px":r=r:r=getComputedStyle(s,"font-size").getPropertyValue("font-size"),t.style.fontSize=r;let h=this.get("fontWeight");h?h=h:h=getComputedStyle(s,"font-weight").getPropertyValue("font-weight"),t.style.fontWeight=h;let o=this.get("fontStyle");o?o=o:o=getComputedStyle(s,"font-style").getPropertyValue("font-style"),t.style.fontStyle=o,this.get("oversizedBehavior")=="wrap"?t.style.whiteSpace="pre-wrap":t.style.whiteSpace="nowrap",this._root.events.on("frameended",()=>{t.style.minWidth==""&&(t.style.minWidth=t.scrollWidth+20+"px");let d=this.get("textAlign","start");d=="center"?(t.style.textAlign="center",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-50%)")):d=="end"?(t.style.textAlign="right",!s.style.transform.match(/translateX/)&&!this.get("width")&&(s.style.transform+=" translateX(-100%)")):t.style.textAlign=d})}}_syncText(){let e=this.getPrivate("textarea"),t=this.get("text","");t==" "&&(t=""),e&&(e.value=t)}};T.className="EditableLabel";T.classNames=R.classNames.concat([T.className]);var C=class extends y{constructor(){super(...arguments),this.thumb=this._makeThumb(),this.startGrip=this._makeButton(),this.endGrip=this._makeButton(),this._thumbBusy=!1,this._startDown=!1,this._endDown=!1,this._thumbDown=!1}_addOrientationClass(){this._settings.themeTags=b(this._settings.themeTags,["scrollbar",this._settings.orientation]),this._setDefaultTagged("background",b(this._settings.themeTags,["main","background"]),()=>c.new(this._root,{}))}_makeButton(){return this.children.push(v.new(this._root,{themeTags:["resize","button",this.get("orientation")],icon:L.new(this._root,{themeTags:["icon"]})._markC("themeTags")})._markC("themeTags","icon"))}_makeThumb(){return this.children.push(c.new(this._root,{themeTags:["thumb",this.get("orientation")]})._markC("themeTags"))}_handleAnimation(e){e&&this._disposers.push(e.events.on("stopped",()=>{this.setPrivateRaw("isBusy",!1),this._thumbBusy=!1}))}_afterNew(){this._addOrientationClass(),super._afterNew();let e=this.startGrip,t=this.endGrip,s=this.thumb,n=this.get("background");n&&this._disposers.push(n.events.on("click",i=>{this.setPrivateRaw("isBusy",!0);let a=this._display.toLocal(i.point),l=this.width(),r=this.height(),h=this.get("orientation"),o;h=="vertical"?o=(a.y-s.height()/2)/r:o=(a.x-s.width()/2)/l;let u,d;h=="vertical"?(u=o*r,d="y"):(u=o*l,d="x");let g=this.get("animationDuration",0);g>0?(this._thumbBusy=!0,this._handleAnimation(this.thumb.animate({key:d,to:u,duration:g,easing:this.get("animationEasing")}))):(this.thumb._setC(d,u),this._root.events.once("frameended",()=>{this.setPrivateRaw("isBusy",!1)}))})),this._disposers.push(s.events.on("dblclick",i=>{if(!G(i.originalEvent,this))return;let a=this.get("animationDuration",0),l=this.get("animationEasing");this.animate({key:"start",to:0,duration:a,easing:l}),this.animate({key:"end",to:1,duration:a,easing:l})})),this._disposers.push(e.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._startDown=!0,this._gripDown="start"})),this._disposers.push(t.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._endDown=!0,this._gripDown="end"})),this._disposers.push(s.events.on("pointerdown",()=>{this.setPrivateRaw("isBusy",!0),this._thumbDown=!0,this._gripDown=void 0})),this._disposers.push(e.events.on("globalpointerup",()=>{this._startDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._startDown=!1})),this._disposers.push(t.events.on("globalpointerup",()=>{this._endDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._endDown=!1})),this._disposers.push(s.events.on("globalpointerup",()=>{this._thumbDown&&(this.setPrivateRaw("isBusy",!1),this._released()),this._thumbDown=!1})),this._disposers.push(e.on("x",()=>{this._updateThumb()})),this._disposers.push(t.on("x",()=>{this._updateThumb()})),this._disposers.push(e.on("y",()=>{this._updateThumb()})),this._disposers.push(t.on("y",()=>{this._updateThumb()})),this._disposers.push(s.events.on("positionchanged",()=>{this._updateGripsByThumb()})),this.get("orientation")=="vertical"?(e._setC("x",0),t._setC("x",0),this._disposers.push(s.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()-s.height()),0))),this._disposers.push(s.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("x",i=>this.width()/2)),this._disposers.push(t.adapters.add("x",i=>this.width()/2)),this._disposers.push(e.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0))),this._disposers.push(t.adapters.add("y",i=>Math.max(Math.min(Number(i),this.height()),0)))):(e._setC("y",0),t._setC("y",0),this._disposers.push(s.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()-s.width()),0))),this._disposers.push(s.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("y",i=>this.height()/2)),this._disposers.push(t.adapters.add("y",i=>this.height()/2)),this._disposers.push(e.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))),this._disposers.push(t.adapters.add("x",i=>Math.max(Math.min(Number(i),this.width()),0))))}_updateChildren(){super._updateChildren(),(this.isDirty("end")||this.isDirty("start")||this._sizeDirty)&&this.updateGrips()}_changed(){if(super._changed(),this.isDirty("start")||this.isDirty("end")){let e="rangechanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,start:this.get("start",0),end:this.get("end",1),grip:this._gripDown})}}_released(){let e="released";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this})}updateGrips(){let e=this.startGrip,t=this.endGrip,s=this.get("orientation"),n=this.height(),i=this.width();s=="vertical"?(e._setC("y",n*this.get("start",0)),t._setC("y",n*this.get("end",1))):(e._setC("x",i*this.get("start",0)),t._setC("x",i*this.get("end",1)));let a=this.getPrivate("positionTextFunction"),l=Math.round(this.get("start",0)*100),r=Math.round(this.get("end",0)*100),h,o;a?(h=a.call(this,this.get("start",0)),o=a.call(this,this.get("end",0))):(h=l+"%",o=r+"%"),e._setC("ariaLabel",this._t("From %1",void 0,h)),e._setC("ariaValueNow",""+l),e._setC("ariaValueText",l+"%"),e._setC("ariaValueMin","0"),e._setC("ariaValueMax","100"),t._setC("ariaLabel",this._t("To %1",void 0,o)),t._setC("ariaValueNow",""+r),t._setC("ariaValueText",r+"%"),t._setC("ariaValueMin","0"),t._setC("ariaValueMax","100")}_updateThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip,n=this.height(),i=this.width(),a=t.x(),l=s.x(),r=t.y(),h=s.y(),o=0,u=1;this.get("orientation")=="vertical"?m(r)&&m(h)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("height",h-r),e._setC("y",r)),o=r/n,u=h/n):m(a)&&m(l)&&(!this._thumbBusy&&!e.isDragging()&&(e._setC("width",l-a),e._setC("x",a)),o=a/i,u=l/i),this.getPrivate("isBusy")&&(this.get("start")!=o||this.get("end")!=u)&&(this._setC("start",o),this._setC("end",u));let d=this.getPrivate("positionTextFunction"),g=Math.round(this.get("start",0)*100),_=Math.round(this.get("end",0)*100),f,p;d?(f=d.call(this,this.get("start",0)),p=d.call(this,this.get("end",0))):(f=g+"%",p=_+"%"),e._setC("ariaLabel",this._t("From %1 to %2",void 0,f,p)),e._setC("ariaValueNow",""+g),e._setC("ariaValueText",g+"%")}_updateGripsByThumb(){let e=this.thumb,t=this.startGrip,s=this.endGrip;if(this.get("orientation")=="vertical"){let n=e.height();t._setC("y",e.y()),s._setC("y",e.y()+n)}else{let n=e.width();t._setC("x",e.x()),s._setC("x",e.x()+n)}}};C.className="Scrollbar";C.classNames=y.classNames.concat([C.className]);export{c as a,v as b,T as c,C as d};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./C2HB2U6P.js";import{a as E}from"./5JADSW57.js";import{O as M,V as I,a as S,b as p,o as l,q as m,w as b}from"./GFTZ7EZP.js";export default $arcgis.t(([k,{cutExecute:A},{lengthExecute:L},{projectIsLoaded:j,projectLoad:B,projectExecute:N},{proximityGetNearestCoordinate:U},D,F,R,T,x,O,G,{substitute:W},{b:P,d:v,f:C,g:_}])=>{var H=S`calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}.add-location-button{--calcite-button-border-color: var(--calcite-color-border-1);--calcite-button-icon-color: var(--calcite-color-text-1);--calcite-button-text-color: var(--calcite-color-text-1)}.button-container{display:flex;justify-content:center}calcite-list{margin:0 var(--calcite-space-sm) var(--calcite-space-sm);background-color:var(--calcite-color-surface-2);border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);overflow:hidden}calcite-list-item[selected] [slot=content-bottom]{display:block}.warning{color:var(--calcite-color-status-danger)}.terminals{padding:var(--calcite-space-sm) var(--calcite-space-md);display:flex;flex-direction:column}.filter-barrier{display:flex;justify-content:space-between;align-items:center;width:100%}`,V=`utility-network-trace-locations-sketch-${Date.now()}`,$=class q extends M{constructor(){super(...arguments),this._messages=E({blocking:!0}),this._isSelectWaiting=!1,this.traceLocationType="starting-point",this.traceLocations=new k,this.filterLayers=new k,this.spatialTolerance=.05,this.autoDestroyDisabled=!1,this.arcgisTraceLocationSelectEnd=b(),this.arcgisTraceLocationSelectStart=b(),this.arcgisError=b()}static{this.properties={_isSelectWaiting:16,beforeTraceLocationSelectStart:0,afterMapInteraction:0,view:0,traceLocationType:1,traceLocations:0,filterLayers:0,spatialTolerance:9,error:1,autoDestroyDisabled:5,utilityNetwork:0,heading:1,sketchViewModel:32}}static{this.styles=H}static{this.sketchViewModelMap=new Map}static getSketchViewModel(t){if(!this.sketchViewModelMap.has(t)){let e=this.#a(t,V);e&&this.sketchViewModelMap.set(t,new O({view:t,layer:e}))}return this.sketchViewModelMap.get(t)??null}static#a(t,e){if(!t?.map)return null;let i=t.map.findLayerById(e);if(!i){let r=new R({id:e,listMode:"hide",title:e});return P(t,r),r}return i}static removeSketchGraphicsLayer(t){if(t?.map){let e=t.map.findLayerById(V);e&&t.map.remove(e),this.sketchViewModelMap.delete(t)}}#i;get sketchViewModel(){return this.view?q.getSketchViewModel(this.view):null}async destroy(){this.#r(),await this.manager.destroy()}async load(){j()||await B()}willUpdate(t){t.has("filterLayers")&&this.#o()}#t(t,e){this.error=e,l(t,this,e),this.arcgisError.emit()}#s(t){let{traceLocations:e,view:i}=this;t.spatialProperties.flagGraphic&&i&&i.graphics.remove(t.spatialProperties.flagGraphic),e?.remove(t)}#o(){if(!this.sketchViewModel)return;let t=new k;this.filterLayers?.forEach(e=>{C(e)?e.sublayers.forEach(i=>{t.add(new G({layer:i,enabled:!0}))}):t.add(new G({layer:e,enabled:!0}))}),this.sketchViewModel.snappingOptions={enabled:!1,featureSources:t}}#n(t,e){let i=t.clone(),r=i.spatialReference,s=e.spatialReference;if(!r||!s)return l("warn",this,"Unable to calculate percent along because geometry is missing a spatial reference."),-1;let o=e;if(!r.equals(s)){let y=N(e,r);if(!y)return l("warn",this,"Unable to project flag point to source geometry spatial reference."),-1;o=y}let n=U(i,o);if(n.isEmpty)return l("warn",this,"Unable to compute nearest coordinate for polyline flag."),-1;let a=n.coordinate,c=a.x-.5,h=a.y-.5,d=a.x+.5,u=a.y+.5,f=new D({hasZ:!1,hasM:!0,paths:[[[c,h],[d,u]]],spatialReference:i.spatialReference}),g=A(i,f);if(g.length>0){let y=L(i,{unit:"feet"}),w;return g[0].paths[0][0][0]===i.paths[0][0][0]?w=L(g[0],{unit:"feet"}):g.length>1?w=L(g[1],{unit:"feet"}):w=0,w/y}return l("warn",this,"Unable to cut the source geometry with the flag geometry."),-1}get#c(){let t=this.utilityNetwork?.dataElement?.domainNetworks;return t?t.flatMap(e=>e.edgeSources).map(e=>e.layerId).filter(Boolean):[]}async#l(){let{view:t,sketchViewModel:e}=this;if(!(t&&e)){l("error",this,"Cannot add trace location."),e||l("error",this,m("sketchViewModel")),t||l("error",this,m("view"));return}if(this.beforeTraceLocationSelectStart){this._isSelectWaiting=!0;try{await this.beforeTraceLocationSelectStart()}finally{this._isSelectWaiting=!1}}await this.#e(t,e)}async#e(t,e){this.arcgisTraceLocationSelectStart.emit({cancelSelect:()=>e.cancel()}).defaultPrevented||(this.#i?.remove(),this.#i=e.on("create",i=>this.#h(i,t,e)),"acquireCursor"in t&&t.acquireCursor("crosshair"),e.snappingOptions.enabled=!0,e.create("point"))}#h(t,e,i){if(t.state==="complete"&&t.graphic){i.layer.remove(t.graphic),this.#p(t,e,i);return}t.state==="cancel"&&(this.#r(),this.arcgisTraceLocationSelectEnd.emit())}async#p(t,e,i){let{utilityNetwork:r}=this,{graphic:s}=t;if(!r){l("error",this,m("utilityNetwork")),this.#r(),this.arcgisTraceLocationSelectEnd.emit();return}if(s?.geometry?.type!=="point"){this.#t("warn",this._messages.errors.noHitResult),this.#e(e,i);return}let o=s.geometry,n=e.toScreen(o);if(!n){this.#t("warn",this._messages.errors.noHitResult),this.#e(e,i);return}let a=(await e.hitTest(n,{include:this.filterLayers})).results.filter(c=>c.type==="graphic"&&c?.layer&&c.graphic);if(!a.length){this.#t("info",this._messages.errors.noHitResult),this.#e(e,i);return}this.#r(),await this.#d(a,o,e)?this.arcgisTraceLocationSelectEnd.emit():this.#e(e,i)}#r(){let{view:t,sketchViewModel:e}=this;if(!t){l("error",this,m("view"));return}e&&(e.snappingOptions.enabled=!1),this.#i?.remove(),this.#i=void 0,"acquireCursor"in t&&t.acquireCursor("default")}async#d(t,e,i){if(!t.length)return this.#t("error",this._messages.errors.noHitResult),!1;let r=t[0].graphic;if(this.afterMapInteraction){let o=t.map(n=>{let a=n,c=a.graphic;return c.origin=a.layer,c.sourceLayer=a.layer,c});try{r=await this.afterMapInteraction(o)}catch{r=null}}if(!r)return l("error",this,"No graphic available from hit test results."),this.arcgisTraceLocationSelectEnd.emit(),!0;let s=await this.#u(r);return s?await this.#g(s,e,i):(this.#t("error",this._messages.errors.missingAttributes),this.arcgisTraceLocationSelectEnd.emit(),!0)}async#u(t){let e=(v(t.layer),t.layer),i=e.geometryType===null,r=e.fieldsIndex?.get("assetgroup")??!1,s=e.fieldsIndex?.get("assetgroup")?.name??"assetgroup",o=e.fieldsIndex?.get("assettype")??!1,n=e.fieldsIndex?.get("assettype")?.name??"assettype",a=t.getGlobalId(),c=t.getObjectId(),h=r?!!t.getAttribute(s):!0,d=o?!!t.getAttribute(n):!0,u=!!t.geometry;if(a&&c&&h&&d&&(u||i))return t;let f=e.createQuery();return f.objectIds=[c],(await e.queryFeatures(f)).features[0]||null}async#g(t,e,i){let{traceLocations:r}=this,s=t.getGlobalId()??"",o=t.geometry?.type,n=await this.#m(t,e);if(!n)return this.#t("error",this._messages.errors.errorGeneratingTraceLocationDetails),!1;let a=r?.filter(h=>h.spatialProperties.mapGraphic?.getGlobalId()===s)??[];if(a.length>0){if(o!=="polyline")return this.#t("warn",this._messages.errors.duplicateTraceLocationDetails),!1;if(a.some(h=>Math.abs(h.traceLocation.percentAlong-n.traceLocation.percentAlong)<=this.spatialTolerance))return this.#t("warn",this._messages.errors.duplicateTraceLocationDetailsWithinTolerance),!1}let c=this.#y(t,e,i);return c?(n.spatialProperties.flagGraphic=c,r?.add(n),!0):(this.#t("warn",this._messages.errors.errorAdding),!1)}async#m(t,e){let{traceLocationType:i,utilityNetwork:r}=this,s=t.getGlobalId()??"",o=t.geometry?.type,n=await this.#f(t);if(o==="point"||o==="polygon"){let a=r?.getTerminalConfiguration(t),c=a?a.terminals[0].id:1;return{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,terminalId:c}),flagProperties:{title:n,expanded:!1,terminalConfiguration:a??void 0,selectedTerminals:a?new Set([c]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(o==="polyline"){let a=this.#n(t.geometry,e);return a<0?(l("warn",this,"Unable to calculate percent along for polyline flag."),null):{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,percentAlong:a}),flagProperties:{title:n,expanded:!1,terminalConfiguration:void 0,selectedTerminals:void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(!o){let a=_(t.layer)?t.layer.parent:t.layer,c=a&&this.#c.includes(a.layerId),h=r?.getTerminalConfiguration(t),d=h?h.terminals[0].id:c?-1:1,u=c?.5:-1;return{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,terminalId:d,percentAlong:u}),flagProperties:{title:n,expanded:!1,terminalConfiguration:h??void 0,selectedTerminals:h?new Set([d]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}return null}async#f(t){let e=(v(t.layer),t.layer);return("getFeatureTitle"in e?await e.getFeatureTitle(t):null)||t.getObjectId()?.toString()||this._messages.unknown}#y(t,e,i){let r=t.geometry?t.geometry.type==="point"?t.geometry:e:null,s=this.#w(),o=new F({geometry:r,symbol:s,attributes:t.attributes});return i.graphics.add(o),o}#w(){let{traceLocationType:t}=this,e=[244,21,21,.6],i=[21,244,21,.6];return t==="stopping-point"?new x({color:e,style:"x",size:12,outline:{color:e,width:2}}):t==="barrier"?new x({color:e,style:"square",size:12,outline:{color:e,width:0}}):new x({color:i,style:"circle",size:12,outline:{color:i,width:0}})}#b(){let{view:t,traceLocations:e}=this;e?.forEach(i=>{i.spatialProperties.flagGraphic&&t&&t.graphics.remove(i.spatialProperties.flagGraphic)}),e?.removeAll()}#v(t,e){let{flagProperties:i}=t,{selectedTerminals:r}=i,{name:s,id:o}=e,n=r?.has(o)??!1;return p`<calcite-label layout=inline><calcite-checkbox .value=${o} .checked=${n} @calciteCheckboxChange=${a=>{a.target.checked?r?.add(o):r?.delete(o),this.requestUpdate()}}></calcite-checkbox>${s}</calcite-label>`}#k(){return p`<calcite-notice kind=danger open scale=s width=auto><div slot=message>${this._messages.errors.noTerminalSelected}</div></calcite-notice>`}#L(t){let{traceLocation:e}=t;return p`<calcite-label layout=inline><div class="filter-barrier">${this._messages.labels.filterBarrier}<calcite-switch .checked=${e.isFilterBarrier} @calciteSwitchChange=${i=>{e.isFilterBarrier=i.target.checked}}></calcite-switch></div></calcite-label>`}#T(t){let{flagProperties:e}=t,{terminalConfiguration:i,selectedTerminals:r}=e,s=t.traceLocation.type==="barrier",o=i&&i.terminals.length>0&&r?.size===0;return p`<calcite-action .icon=${e.expanded?"chevron-up":"chevron-down"} slot=actions-end scale=s text @click=${()=>{e.expanded=!e.expanded,this.requestUpdate()}}></calcite-action>${o&&p`<calcite-icon class="warning" icon=exclamation-mark-triangle scale=s slot=content-start></calcite-icon>`||""}${e.expanded&&p`<div class="terminals" slot=content-bottom>${s&&this.#L(t)||""}${i&&this.#x(t)||""}${o&&this.#k()||""}</div>`||""}`}#x(t){let{flagProperties:e}=t,{terminalConfiguration:i}=e;if(!i)return l("warn",this,"One or more locations are missing the required flag property `terminalConfiguration`."),[];let r=i.terminals;return r.length?r.length===1?[]:r.map(s=>this.#v(t,s)):(l("warn",this,"`terminalConfiguration.terminals` is required but either missing or empty.`"),[])}#$(t){let{flagProperties:e}=t,{terminalConfiguration:i,expanded:r,title:s}=e,o=i&&i.id!==0,n=t.traceLocation.type==="barrier",a=o||n,c=i?.name??void 0;return p`<calcite-list-item .label=${s} .description=${c} .value=${s} .expanded=${r}>${a?this.#T(t):p`<div slot=content-bottom></div>`}<calcite-action icon=x slot=actions-end scale=s text @click=${()=>this.#s(t)}></calcite-action></calcite-list-item>`}#S(t){if(!t.length)return null;let{traceLocationType:e}=this,i=t.map(s=>this.#$(s)).toArray(),r=W(this._messages.labels.list,{type:e});return p`<div><calcite-list interaction-mode=static selection-mode=none .label=${r}>${i}</calcite-list></div>`}#M(){let{traceLocationType:t,_messages:e,traceLocations:i,heading:r}=this,s=t==="starting-point"?e.types.startingPoint:t==="barrier"?e.types.barrier:e.types.stoppingPoint,o=r??s.heading,n=s.description,a=s.buttonText;return p`<calcite-block .heading=${o} .label=${o} expanded .description=${n}>${i?.length?p`<calcite-button slot=actions-end appearance=transparent .label=${e.buttons.clear} @click=${()=>this.#b()}>${e.buttons.clear}</calcite-button>${this.#S(i)}`:null}<div class="button-container"><calcite-button .loading=${this._isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${a} @click=${()=>this.#l()}>${a}</calcite-button></div></calcite-block>`}render(){return this.#M()}};I("arcgis-utility-network-trace-locations",$);return $},"core/Collection","geometry/operators/cutOperator","geometry/operators/lengthOperator","geometry/operators/projectOperator","geometry/operators/proximityOperator","geometry/Polyline","Graphic","layers/GraphicsLayer","rest/networks/support/TraceLocation","symbols/SimpleMarkerSymbol","widgets/Sketch/SketchViewModel","views/interactive/snapping/FeatureSnappingLayerSource","intl",a)
2
+ import a from"./TMJX7DFH.js";import{a as E}from"./5JADSW57.js";import{O as M,V as I,a as S,b as p,o as l,q as m,w as b}from"./GFTZ7EZP.js";export default $arcgis.t(([k,{cutExecute:A},{lengthExecute:L},{projectIsLoaded:j,projectLoad:B,projectExecute:N},{proximityGetNearestCoordinate:U},D,F,R,T,x,O,G,{substitute:W},{b:P,e:v,g:C,h:_}])=>{var H=S`calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}.add-location-button{--calcite-button-border-color: var(--calcite-color-border-1);--calcite-button-icon-color: var(--calcite-color-text-1);--calcite-button-text-color: var(--calcite-color-text-1)}.button-container{display:flex;justify-content:center}calcite-list{margin:0 var(--calcite-space-sm) var(--calcite-space-sm);background-color:var(--calcite-color-surface-2);border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);overflow:hidden}calcite-list-item[selected] [slot=content-bottom]{display:block}.warning{color:var(--calcite-color-status-danger)}.terminals{padding:var(--calcite-space-sm) var(--calcite-space-md);display:flex;flex-direction:column}.filter-barrier{display:flex;justify-content:space-between;align-items:center;width:100%}`,V=`utility-network-trace-locations-sketch-${Date.now()}`,$=class q extends M{constructor(){super(...arguments),this._messages=E({blocking:!0}),this._isSelectWaiting=!1,this.traceLocationType="starting-point",this.traceLocations=new k,this.filterLayers=new k,this.spatialTolerance=.05,this.autoDestroyDisabled=!1,this.arcgisTraceLocationSelectEnd=b(),this.arcgisTraceLocationSelectStart=b(),this.arcgisError=b()}static{this.properties={_isSelectWaiting:16,beforeTraceLocationSelectStart:0,afterMapInteraction:0,view:0,traceLocationType:1,traceLocations:0,filterLayers:0,spatialTolerance:9,error:1,autoDestroyDisabled:5,utilityNetwork:0,heading:1,sketchViewModel:32}}static{this.styles=H}static{this.sketchViewModelMap=new Map}static getSketchViewModel(t){if(!this.sketchViewModelMap.has(t)){let e=this.#a(t,V);e&&this.sketchViewModelMap.set(t,new O({view:t,layer:e}))}return this.sketchViewModelMap.get(t)??null}static#a(t,e){if(!t?.map)return null;let i=t.map.findLayerById(e);if(!i){let r=new R({id:e,listMode:"hide",title:e});return P(t,r),r}return i}static removeSketchGraphicsLayer(t){if(t?.map){let e=t.map.findLayerById(V);e&&t.map.remove(e),this.sketchViewModelMap.delete(t)}}#i;get sketchViewModel(){return this.view?q.getSketchViewModel(this.view):null}async destroy(){this.#r(),await this.manager.destroy()}async load(){j()||await B()}willUpdate(t){t.has("filterLayers")&&this.#o()}#t(t,e){this.error=e,l(t,this,e),this.arcgisError.emit()}#s(t){let{traceLocations:e,view:i}=this;t.spatialProperties.flagGraphic&&i&&i.graphics.remove(t.spatialProperties.flagGraphic),e?.remove(t)}#o(){if(!this.sketchViewModel)return;let t=new k;this.filterLayers?.forEach(e=>{C(e)?e.sublayers.forEach(i=>{t.add(new G({layer:i,enabled:!0}))}):t.add(new G({layer:e,enabled:!0}))}),this.sketchViewModel.snappingOptions={enabled:!1,featureSources:t}}#n(t,e){let i=t.clone(),r=i.spatialReference,s=e.spatialReference;if(!r||!s)return l("warn",this,"Unable to calculate percent along because geometry is missing a spatial reference."),-1;let o=e;if(!r.equals(s)){let y=N(e,r);if(!y)return l("warn",this,"Unable to project flag point to source geometry spatial reference."),-1;o=y}let n=U(i,o);if(n.isEmpty)return l("warn",this,"Unable to compute nearest coordinate for polyline flag."),-1;let a=n.coordinate,c=a.x-.5,h=a.y-.5,d=a.x+.5,u=a.y+.5,f=new D({hasZ:!1,hasM:!0,paths:[[[c,h],[d,u]]],spatialReference:i.spatialReference}),g=A(i,f);if(g.length>0){let y=L(i,{unit:"feet"}),w;return g[0].paths[0][0][0]===i.paths[0][0][0]?w=L(g[0],{unit:"feet"}):g.length>1?w=L(g[1],{unit:"feet"}):w=0,w/y}return l("warn",this,"Unable to cut the source geometry with the flag geometry."),-1}get#c(){let t=this.utilityNetwork?.dataElement?.domainNetworks;return t?t.flatMap(e=>e.edgeSources).map(e=>e.layerId).filter(Boolean):[]}async#l(){let{view:t,sketchViewModel:e}=this;if(!(t&&e)){l("error",this,"Cannot add trace location."),e||l("error",this,m("sketchViewModel")),t||l("error",this,m("view"));return}if(this.beforeTraceLocationSelectStart){this._isSelectWaiting=!0;try{await this.beforeTraceLocationSelectStart()}finally{this._isSelectWaiting=!1}}await this.#e(t,e)}async#e(t,e){this.arcgisTraceLocationSelectStart.emit({cancelSelect:()=>e.cancel()}).defaultPrevented||(this.#i?.remove(),this.#i=e.on("create",i=>this.#h(i,t,e)),"acquireCursor"in t&&t.acquireCursor("crosshair"),e.snappingOptions.enabled=!0,e.create("point"))}#h(t,e,i){if(t.state==="complete"&&t.graphic){i.layer.remove(t.graphic),this.#p(t,e,i);return}t.state==="cancel"&&(this.#r(),this.arcgisTraceLocationSelectEnd.emit())}async#p(t,e,i){let{utilityNetwork:r}=this,{graphic:s}=t;if(!r){l("error",this,m("utilityNetwork")),this.#r(),this.arcgisTraceLocationSelectEnd.emit();return}if(s?.geometry?.type!=="point"){this.#t("warn",this._messages.errors.noHitResult),this.#e(e,i);return}let o=s.geometry,n=e.toScreen(o);if(!n){this.#t("warn",this._messages.errors.noHitResult),this.#e(e,i);return}let a=(await e.hitTest(n,{include:this.filterLayers})).results.filter(c=>c.type==="graphic"&&c?.layer&&c.graphic);if(!a.length){this.#t("info",this._messages.errors.noHitResult),this.#e(e,i);return}this.#r(),await this.#d(a,o,e)?this.arcgisTraceLocationSelectEnd.emit():this.#e(e,i)}#r(){let{view:t,sketchViewModel:e}=this;if(!t){l("error",this,m("view"));return}e&&(e.snappingOptions.enabled=!1),this.#i?.remove(),this.#i=void 0,"acquireCursor"in t&&t.acquireCursor("default")}async#d(t,e,i){if(!t.length)return this.#t("error",this._messages.errors.noHitResult),!1;let r=t[0].graphic;if(this.afterMapInteraction){let o=t.map(n=>{let a=n,c=a.graphic;return c.origin=a.layer,c.sourceLayer=a.layer,c});try{r=await this.afterMapInteraction(o)}catch{r=null}}if(!r)return l("error",this,"No graphic available from hit test results."),this.arcgisTraceLocationSelectEnd.emit(),!0;let s=await this.#u(r);return s?await this.#g(s,e,i):(this.#t("error",this._messages.errors.missingAttributes),this.arcgisTraceLocationSelectEnd.emit(),!0)}async#u(t){let e=(v(t.layer),t.layer),i=e.geometryType===null,r=e.fieldsIndex?.get("assetgroup")??!1,s=e.fieldsIndex?.get("assetgroup")?.name??"assetgroup",o=e.fieldsIndex?.get("assettype")??!1,n=e.fieldsIndex?.get("assettype")?.name??"assettype",a=t.getGlobalId(),c=t.getObjectId(),h=r?!!t.getAttribute(s):!0,d=o?!!t.getAttribute(n):!0,u=!!t.geometry;if(a&&c&&h&&d&&(u||i))return t;let f=e.createQuery();return f.objectIds=[c],(await e.queryFeatures(f)).features[0]||null}async#g(t,e,i){let{traceLocations:r}=this,s=t.getGlobalId()??"",o=t.geometry?.type,n=await this.#m(t,e);if(!n)return this.#t("error",this._messages.errors.errorGeneratingTraceLocationDetails),!1;let a=r?.filter(h=>h.spatialProperties.mapGraphic?.getGlobalId()===s)??[];if(a.length>0){if(o!=="polyline")return this.#t("warn",this._messages.errors.duplicateTraceLocationDetails),!1;if(a.some(h=>Math.abs(h.traceLocation.percentAlong-n.traceLocation.percentAlong)<=this.spatialTolerance))return this.#t("warn",this._messages.errors.duplicateTraceLocationDetailsWithinTolerance),!1}let c=this.#y(t,e,i);return c?(n.spatialProperties.flagGraphic=c,r?.add(n),!0):(this.#t("warn",this._messages.errors.errorAdding),!1)}async#m(t,e){let{traceLocationType:i,utilityNetwork:r}=this,s=t.getGlobalId()??"",o=t.geometry?.type,n=await this.#f(t);if(o==="point"||o==="polygon"){let a=r?.getTerminalConfiguration(t),c=a?a.terminals[0].id:1;return{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,terminalId:c}),flagProperties:{title:n,expanded:!1,terminalConfiguration:a??void 0,selectedTerminals:a?new Set([c]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(o==="polyline"){let a=this.#n(t.geometry,e);return a<0?(l("warn",this,"Unable to calculate percent along for polyline flag."),null):{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,percentAlong:a}),flagProperties:{title:n,expanded:!1,terminalConfiguration:void 0,selectedTerminals:void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}else if(!o){let a=_(t.layer)?t.layer.parent:t.layer,c=a&&this.#c.includes(a.layerId),h=r?.getTerminalConfiguration(t),d=h?h.terminals[0].id:c?-1:1,u=c?.5:-1;return{traceLocation:new T({type:i,isFilterBarrier:!1,globalId:s,terminalId:d,percentAlong:u}),flagProperties:{title:n,expanded:!1,terminalConfiguration:h??void 0,selectedTerminals:h?new Set([d]):void 0},spatialProperties:{mapPoint:e,mapGraphic:t}}}return null}async#f(t){let e=(v(t.layer),t.layer);return("getFeatureTitle"in e?await e.getFeatureTitle(t):null)||t.getObjectId()?.toString()||this._messages.unknown}#y(t,e,i){let r=t.geometry?t.geometry.type==="point"?t.geometry:e:null,s=this.#w(),o=new F({geometry:r,symbol:s,attributes:t.attributes});return i.graphics.add(o),o}#w(){let{traceLocationType:t}=this,e=[244,21,21,.6],i=[21,244,21,.6];return t==="stopping-point"?new x({color:e,style:"x",size:12,outline:{color:e,width:2}}):t==="barrier"?new x({color:e,style:"square",size:12,outline:{color:e,width:0}}):new x({color:i,style:"circle",size:12,outline:{color:i,width:0}})}#b(){let{view:t,traceLocations:e}=this;e?.forEach(i=>{i.spatialProperties.flagGraphic&&t&&t.graphics.remove(i.spatialProperties.flagGraphic)}),e?.removeAll()}#v(t,e){let{flagProperties:i}=t,{selectedTerminals:r}=i,{name:s,id:o}=e,n=r?.has(o)??!1;return p`<calcite-label layout=inline><calcite-checkbox .value=${o} .checked=${n} @calciteCheckboxChange=${a=>{a.target.checked?r?.add(o):r?.delete(o),this.requestUpdate()}}></calcite-checkbox>${s}</calcite-label>`}#k(){return p`<calcite-notice kind=danger open scale=s width=auto><div slot=message>${this._messages.errors.noTerminalSelected}</div></calcite-notice>`}#L(t){let{traceLocation:e}=t;return p`<calcite-label layout=inline><div class="filter-barrier">${this._messages.labels.filterBarrier}<calcite-switch .checked=${e.isFilterBarrier} @calciteSwitchChange=${i=>{e.isFilterBarrier=i.target.checked}}></calcite-switch></div></calcite-label>`}#T(t){let{flagProperties:e}=t,{terminalConfiguration:i,selectedTerminals:r}=e,s=t.traceLocation.type==="barrier",o=i&&i.terminals.length>0&&r?.size===0;return p`<calcite-action .icon=${e.expanded?"chevron-up":"chevron-down"} slot=actions-end scale=s text @click=${()=>{e.expanded=!e.expanded,this.requestUpdate()}}></calcite-action>${o&&p`<calcite-icon class="warning" icon=exclamation-mark-triangle scale=s slot=content-start></calcite-icon>`||""}${e.expanded&&p`<div class="terminals" slot=content-bottom>${s&&this.#L(t)||""}${i&&this.#x(t)||""}${o&&this.#k()||""}</div>`||""}`}#x(t){let{flagProperties:e}=t,{terminalConfiguration:i}=e;if(!i)return l("warn",this,"One or more locations are missing the required flag property `terminalConfiguration`."),[];let r=i.terminals;return r.length?r.length===1?[]:r.map(s=>this.#v(t,s)):(l("warn",this,"`terminalConfiguration.terminals` is required but either missing or empty.`"),[])}#$(t){let{flagProperties:e}=t,{terminalConfiguration:i,expanded:r,title:s}=e,o=i&&i.id!==0,n=t.traceLocation.type==="barrier",a=o||n,c=i?.name??void 0;return p`<calcite-list-item .label=${s} .description=${c} .value=${s} .expanded=${r}>${a?this.#T(t):p`<div slot=content-bottom></div>`}<calcite-action icon=x slot=actions-end scale=s text @click=${()=>this.#s(t)}></calcite-action></calcite-list-item>`}#S(t){if(!t.length)return null;let{traceLocationType:e}=this,i=t.map(s=>this.#$(s)).toArray(),r=W(this._messages.labels.list,{type:e});return p`<div><calcite-list interaction-mode=static selection-mode=none .label=${r}>${i}</calcite-list></div>`}#M(){let{traceLocationType:t,_messages:e,traceLocations:i,heading:r}=this,s=t==="starting-point"?e.types.startingPoint:t==="barrier"?e.types.barrier:e.types.stoppingPoint,o=r??s.heading,n=s.description,a=s.buttonText;return p`<calcite-block .heading=${o} .label=${o} expanded .description=${n}>${i?.length?p`<calcite-button slot=actions-end appearance=transparent .label=${e.buttons.clear} @click=${()=>this.#b()}>${e.buttons.clear}</calcite-button>${this.#S(i)}`:null}<div class="button-container"><calcite-button .loading=${this._isSelectWaiting} class="add-location-button" icon-start=select appearance=outline .label=${a} @click=${()=>this.#l()}>${a}</calcite-button></div></calcite-block>`}render(){return this.#M()}};I("arcgis-utility-network-trace-locations",$);return $},"core/Collection","geometry/operators/cutOperator","geometry/operators/lengthOperator","geometry/operators/projectOperator","geometry/operators/proximityOperator","geometry/Polyline","Graphic","layers/GraphicsLayer","rest/networks/support/TraceLocation","symbols/SimpleMarkerSymbol","widgets/Sketch/SketchViewModel","views/interactive/snapping/FeatureSnappingLayerSource","intl",a)