@arcgis/ai-components 5.2.0-next.10 → 5.2.0-next.101

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 (300) hide show
  1. package/LICENSE.md +4 -2
  2. package/README.md +2 -2
  3. package/dist/agent-utils/FunctionAgent.d.ts +2 -2
  4. package/dist/agent-utils/LLMAgent.d.ts +7 -4
  5. package/dist/agent-utils/LLMAgent.js +4 -2
  6. package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
  7. package/dist/agent-utils/WorkflowAgent.js +14 -15
  8. package/dist/agent-utils/index.d.ts +177 -0
  9. package/dist/agent-utils/index.js +167 -0
  10. package/dist/agent-utils/middlewares/trace.d.ts +2 -0
  11. package/dist/agent-utils/middlewares/trace.js +25 -33
  12. package/dist/agent-utils/tools/FunctionTool.d.ts +2 -2
  13. package/dist/agent-utils/types.d.ts +37 -8
  14. package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
  15. package/dist/agent-utils/workflows/LoopWorkflow.d.ts +2 -2
  16. package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -2
  17. package/dist/agent-utils/workflows/RouterWorkflow.d.ts +2 -2
  18. package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +2 -2
  19. package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +2 -2
  20. package/dist/agentic-workflow/AgenticWorkflowRuntime.d.ts +24 -0
  21. package/dist/agentic-workflow/Edge.d.ts +16 -0
  22. package/dist/agentic-workflow/WebAgent.d.ts +39 -0
  23. package/dist/agentic-workflow/jsonTypes.d.ts +189 -0
  24. package/dist/agentic-workflow/nodes/AgentNode.d.ts +28 -0
  25. package/dist/agentic-workflow/nodes/BaseNode.d.ts +35 -0
  26. package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +25 -0
  27. package/dist/agentic-workflow/nodes/StartNode.d.ts +21 -0
  28. package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
  29. package/dist/agentic-workflow/types.d.ts +29 -0
  30. package/dist/agents/tools/filter/clearFilters/adapter.d.ts +8 -0
  31. package/dist/agents/tools/filter/clearFilters/adapter.js +22 -0
  32. package/dist/agents/tools/filter/resetMap/adapter.d.ts +8 -0
  33. package/dist/agents/tools/filter/resetMap/adapter.js +22 -0
  34. package/dist/agents/tools/filter/setFeatureEffect/adapter.d.ts +8 -0
  35. package/dist/agents/tools/filter/setFeatureEffect/adapter.js +121 -0
  36. package/dist/agents/tools/help/listFields/adapter.d.ts +11 -0
  37. package/dist/agents/tools/help/listFields/adapter.js +30 -0
  38. package/dist/agents/tools/navigation/goToAddress/adapter.d.ts +10 -0
  39. package/dist/agents/tools/navigation/goToAddress/adapter.js +60 -0
  40. package/dist/agents/tools/navigation/goToBookmark/adapter.d.ts +8 -0
  41. package/dist/agents/tools/navigation/goToBookmark/adapter.js +30 -0
  42. package/dist/agents/tools/navigation/goToFeatures/adapter.d.ts +8 -0
  43. package/dist/agents/tools/navigation/goToFeatures/adapter.js +50 -0
  44. package/dist/agents/tools/navigation/goToFullExtent/adapter.d.ts +8 -0
  45. package/dist/agents/tools/navigation/goToFullExtent/adapter.js +27 -0
  46. package/dist/agents/tools/navigation/goToHomeExtent/adapter.d.ts +8 -0
  47. package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +24 -0
  48. package/dist/agents/tools/navigation/goToLayer/adapter.d.ts +8 -0
  49. package/dist/agents/tools/navigation/goToLayer/adapter.js +26 -0
  50. package/dist/agents/tools/navigation/goToScale/adapter.d.ts +8 -0
  51. package/dist/agents/tools/navigation/goToScale/adapter.js +21 -0
  52. package/dist/agents/tools/navigation/goToViewpoint/adapter.d.ts +8 -0
  53. package/dist/agents/tools/navigation/goToViewpoint/adapter.js +42 -0
  54. package/dist/agents/tools/navigation/goToZoom/adapter.d.ts +8 -0
  55. package/dist/agents/tools/navigation/goToZoom/adapter.js +21 -0
  56. package/dist/agents/tools/query/getAttribute/adapter.d.ts +8 -0
  57. package/dist/agents/tools/query/getAttribute/adapter.js +40 -0
  58. package/dist/agents/tools/query/getStatistics/adapter.d.ts +8 -0
  59. package/dist/agents/tools/query/getStatistics/adapter.js +157 -0
  60. package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
  61. package/dist/agents/tools/query/getTopFeatures/adapter.js +144 -0
  62. package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
  63. package/dist/agents/tools/query/queryFeatures/adapter.js +130 -0
  64. package/dist/agents/tools/search/findRelevantFields/adapter.d.ts +8 -0
  65. package/dist/agents/tools/search/findRelevantFields/adapter.js +57 -0
  66. package/dist/agents/tools/search/findRelevantLayers/adapter.d.ts +8 -0
  67. package/dist/agents/tools/search/findRelevantLayers/adapter.js +38 -0
  68. package/dist/cdn/22KHSDJI.js +2 -0
  69. package/dist/cdn/2EY3BQQX.js +2 -0
  70. package/dist/cdn/{SWOXSJ62.js → 2O4DON37.js} +1 -1
  71. package/dist/cdn/34O57OGV.js +2 -0
  72. package/dist/cdn/{5W7S2RS4.js → 3UEKINYC.js} +1 -1
  73. package/dist/cdn/4OGR5QKS.js +2 -0
  74. package/dist/cdn/5FL5BTTX.js +66 -0
  75. package/dist/cdn/5HBAJ57P.js +2 -0
  76. package/dist/cdn/5K5ZY267.js +2 -0
  77. package/dist/cdn/5MK44FNO.js +2 -0
  78. package/dist/cdn/5WYRJMBW.js +2 -0
  79. package/dist/cdn/5X7EG7D2.js +2 -0
  80. package/dist/cdn/5XZLS7UO.js +2 -0
  81. package/dist/cdn/5ZFUGNRN.js +2 -0
  82. package/dist/cdn/655YIKL3.js +11 -0
  83. package/dist/cdn/6ECRQVHY.js +2 -0
  84. package/dist/cdn/6OOZSZRJ.js +2 -0
  85. package/dist/cdn/{D3TNNRP4.js → 6P44KOKX.js} +1 -1
  86. package/dist/cdn/6YYPVU7H.js +3 -0
  87. package/dist/cdn/7BCQMK6D.js +2 -0
  88. package/dist/cdn/7SRLZQVC.js +5 -0
  89. package/dist/cdn/7V6OSTFC.js +2 -0
  90. package/dist/cdn/7VAQUCBU.js +9 -0
  91. package/dist/cdn/7VUSIGEM.js +2 -0
  92. package/dist/cdn/ACJTJLZN.js +2 -0
  93. package/dist/cdn/AI6DYOKR.js +181 -0
  94. package/dist/cdn/AKD5UOVX.js +2 -0
  95. package/dist/cdn/ANRQWYU2.js +2 -0
  96. package/dist/cdn/{ZS2TZ6BF.js → AOVJ34QE.js} +1 -1
  97. package/dist/cdn/APFZY4PI.js +2 -0
  98. package/dist/cdn/B2JDVLA6.js +2 -0
  99. package/dist/cdn/BE7BRJZD.js +2 -0
  100. package/dist/cdn/{FL4W4VYN.js → BL273EGZ.js} +17 -1
  101. package/dist/cdn/C4FEETBZ.js +2 -0
  102. package/dist/cdn/C4JT4S5E.js +2 -0
  103. package/dist/cdn/CCC6LBMY.js +2 -0
  104. package/dist/cdn/{5ZZGKP7N.js → CEKOEHB3.js} +1 -1
  105. package/dist/cdn/CJMUJXPL.js +2 -0
  106. package/dist/cdn/COH3QXWG.js +4 -0
  107. package/dist/cdn/CP5BVGJU.js +2 -0
  108. package/dist/cdn/D5UFYQHN.js +44 -0
  109. package/dist/cdn/EWLXNGKH.js +208 -0
  110. package/dist/cdn/EYOWRGDP.js +2 -0
  111. package/dist/cdn/F5NIRETW.js +2 -0
  112. package/dist/cdn/FDOMMK2M.js +2 -0
  113. package/dist/cdn/FG647IP6.js +2 -0
  114. package/dist/cdn/FJO4KNOZ.js +2 -0
  115. package/dist/cdn/FUF3NAU7.js +2 -0
  116. package/dist/cdn/FXP5UIQU.js +156 -0
  117. package/dist/cdn/{T537PKP4.js → FYZATVB3.js} +1 -1
  118. package/dist/cdn/G2EGT3CF.js +6 -0
  119. package/dist/cdn/G3SF6U2U.js +2 -0
  120. package/dist/cdn/G7OMHU2B.js +2 -0
  121. package/dist/cdn/HAEFC2SJ.js +2 -0
  122. package/dist/cdn/HDACNIZF.js +2 -0
  123. package/dist/cdn/HHFNQR6Z.js +2 -0
  124. package/dist/cdn/HHUQXL3R.js +2 -0
  125. package/dist/cdn/IBZ2NEAO.js +2 -0
  126. package/dist/cdn/{FX7UOGHP.js → ICBIUFK7.js} +1 -1
  127. package/dist/cdn/ICQCK5D3.js +2 -0
  128. package/dist/cdn/IHP25JWI.js +99 -0
  129. package/dist/cdn/IJVMUS2L.js +14 -0
  130. package/dist/cdn/J6A4AS7E.js +22 -0
  131. package/dist/cdn/J6SZIQJA.js +2 -0
  132. package/dist/cdn/JCOA24UH.js +3 -0
  133. package/dist/cdn/{NE7E52YR.js → JEBRN3EU.js} +9 -3
  134. package/dist/cdn/JO5ETMPS.js +2 -0
  135. package/dist/cdn/K2R6XVK3.js +2 -0
  136. package/dist/cdn/KITIP6J2.js +2 -0
  137. package/dist/cdn/KWD2ECTM.js +2 -0
  138. package/dist/cdn/{MODWHY3R.js → LAYVGCPL.js} +6 -4
  139. package/dist/cdn/{7RCQFLPP.js → LK7ZIQW6.js} +1 -1
  140. package/dist/cdn/LLUGJKAQ.js +2 -0
  141. package/dist/cdn/MWYBF3F3.js +66 -0
  142. package/dist/cdn/{VMXLYWUK.js → MXTXJKFE.js} +1 -1
  143. package/dist/cdn/MY47B3CE.js +3 -0
  144. package/dist/cdn/NEV6OZN3.js +71 -0
  145. package/dist/cdn/NNXISHCA.js +14 -0
  146. package/dist/cdn/NZSOJ726.js +2 -0
  147. package/dist/cdn/O4NVW75A.js +2 -0
  148. package/dist/cdn/OE3GW5LE.js +2 -0
  149. package/dist/cdn/{23EQTPO3.js → OKVLGJAG.js} +1 -1
  150. package/dist/cdn/ONQ6JSBJ.js +2 -0
  151. package/dist/cdn/OX64WOEL.js +22 -0
  152. package/dist/cdn/{LQ6R5YRN.js → PQ2DPOFM.js} +1 -1
  153. package/dist/cdn/PUHRBGKB.js +2 -0
  154. package/dist/cdn/Q57QWN5W.js +2 -0
  155. package/dist/cdn/QUKNPVAF.js +2 -0
  156. package/dist/cdn/R2PQVY4O.js +2 -0
  157. package/dist/cdn/R74ZHFA6.js +2 -0
  158. package/dist/cdn/RBE55SWR.js +2 -0
  159. package/dist/cdn/RHYNE5OE.js +2 -0
  160. package/dist/cdn/RLEHNAIA.js +2 -0
  161. package/dist/cdn/RVSTAUQS.js +2 -0
  162. package/dist/cdn/{X2ZDYHCG.js → SDWWUWAF.js} +10 -5
  163. package/dist/cdn/{GTLS44GI.js → SXM4NUT5.js} +1 -1
  164. package/dist/cdn/SZ2QSSB3.js +2 -0
  165. package/dist/cdn/T4RIGOXB.js +2 -0
  166. package/dist/cdn/TCH5I5LS.js +2 -0
  167. package/dist/cdn/TEPP7YPR.js +2 -0
  168. package/dist/cdn/TMVF2W5N.js +36 -0
  169. package/dist/cdn/TPULIO6I.js +34 -0
  170. package/dist/cdn/UDRKUVZP.js +2 -0
  171. package/dist/cdn/{6YMR4QSD.js → UHEYPSOR.js} +1 -1
  172. package/dist/cdn/UHNVDALX.js +18 -0
  173. package/dist/cdn/UZLQALHY.js +2 -0
  174. package/dist/cdn/V6HOUZPZ.js +2 -0
  175. package/dist/cdn/VAXH6RUQ.js +134 -0
  176. package/dist/cdn/VLLZ2FFU.js +2 -0
  177. package/dist/cdn/VOKXKU7M.js +56 -0
  178. package/dist/cdn/VXFQANGJ.js +2 -0
  179. package/dist/cdn/WGO5SER7.js +6 -0
  180. package/dist/cdn/WJXXOKGA.js +9 -0
  181. package/dist/cdn/WKTQVBFJ.js +2 -0
  182. package/dist/cdn/{2SJAOYZT.js → WSWB3B7B.js} +1 -1
  183. package/dist/cdn/XX6GHMNR.js +2 -0
  184. package/dist/cdn/Y7XD7ZRD.js +2 -0
  185. package/dist/cdn/YEZ3AMNX.js +2 -0
  186. package/dist/cdn/YLVJA4ZE.js +2 -0
  187. package/dist/cdn/Z5HWPSZN.js +2 -0
  188. package/dist/cdn/Z5W4V7RC.js +2 -0
  189. package/dist/cdn/ZDV4K4WG.js +2 -0
  190. package/dist/cdn/ZOEMBHRF.js +2 -0
  191. package/dist/cdn/ZRVZMPFN.js +2 -0
  192. package/dist/cdn/{ZTBA5PM7.js → ZU2FHVNK.js} +1 -1
  193. package/dist/cdn/agent-utils/index.js +2 -0
  194. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +3 -0
  195. package/dist/cdn/agent-utils/middlewares/middleware.js +2 -0
  196. package/dist/cdn/agent-utils/middlewares/trace.js +2 -0
  197. package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
  198. package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -1
  199. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.en.json +1 -0
  200. package/dist/cdn/assets/assistant-message/t9n/messages.en.json +1 -0
  201. package/dist/cdn/assets/assistant-message-loading/t9n/messages.en.json +1 -0
  202. package/dist/cdn/index.js +1 -1
  203. package/dist/chunks/adapter.js +1295 -2104
  204. package/dist/chunks/arcgisKnowledgeGraph.js +128 -72
  205. package/dist/chunks/arcgis_knowledge_current_lc_context.js +19 -2
  206. package/dist/chunks/arcgis_knowledge_current_map_context.js +31 -2
  207. package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
  208. package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +116 -27
  209. package/dist/chunks/baseAgentState.js +58 -0
  210. package/dist/chunks/converterUtils.js +66 -41
  211. package/dist/chunks/dataExplorationGraph.js +131 -182
  212. package/dist/chunks/data_explore_query_prompt.js +9 -4
  213. package/dist/chunks/fetchAgentContext.js +13 -0
  214. package/dist/chunks/fetchService.js +10 -0
  215. package/dist/chunks/fieldStatistics.js +79 -0
  216. package/dist/chunks/formatFeatureAttributes.js +132 -0
  217. package/dist/chunks/generateLayerDescriptions.js +259 -282
  218. package/dist/chunks/helpGraph.js +35 -25
  219. package/dist/chunks/help_prompt.js +34 -17
  220. package/dist/chunks/index.js +11 -0
  221. package/dist/chunks/intent_prompt.js +16 -0
  222. package/dist/chunks/layerStylingGraph.js +39 -33
  223. package/dist/chunks/mergeWhereClauses.js +15 -0
  224. package/dist/chunks/navigationGraph.js +140 -116
  225. package/dist/chunks/navigation_intent_prompt.js +8 -2
  226. package/dist/chunks/orchestrator.js +444 -233
  227. package/dist/chunks/resolvePointGeometryFilter.js +92 -0
  228. package/dist/chunks/state.js +21 -27
  229. package/dist/chunks/toolCallResponse.js +14 -10
  230. package/dist/chunks/utils2.js +11 -11
  231. package/dist/components/arcgis-assistant/customElement.d.ts +82 -1
  232. package/dist/components/arcgis-assistant/customElement.js +332 -183
  233. package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
  234. package/dist/components/arcgis-assistant-agent/customElement.js +614 -10
  235. package/dist/components/arcgis-assistant-chat/customElement.js +22 -17
  236. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +20 -4
  237. package/dist/components/arcgis-assistant-help-agent/customElement.js +29 -7
  238. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -0
  239. package/dist/components/arcgis-assistant-interrupt/customElement.js +11 -12
  240. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +12 -8
  241. package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +7 -7
  242. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +40 -16
  243. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +30 -7
  244. package/dist/components/arcgis-assistant-message/customElement.d.ts +3 -0
  245. package/dist/components/arcgis-assistant-message/customElement.js +9 -8
  246. package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
  247. package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +3 -0
  248. package/dist/components/arcgis-assistant-message-loading/customElement.js +11 -10
  249. package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
  250. package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
  251. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +18 -4
  252. package/dist/components/arcgis-assistant-speech-input/customElement.js +34 -52
  253. package/dist/components/arcgis-assistant-user-message/customElement.d.ts +2 -0
  254. package/dist/components/arcgis-assistant-user-message/customElement.js +15 -10
  255. package/dist/docs/api.json +1 -1
  256. package/dist/docs/docs.json +1 -1
  257. package/dist/docs/vscode.html-custom-data.json +1 -1
  258. package/dist/docs/web-types.json +1 -1
  259. package/dist/loader.js +6 -6
  260. package/dist/oauth-callback.html +1 -1
  261. package/dist/orchestrator/orchestrator/orchestratorEvents.d.ts +78 -0
  262. package/dist/types/lumina.d.ts +5 -4
  263. package/dist/types/preact.d.ts +5 -4
  264. package/dist/types/react.d.ts +5 -4
  265. package/dist/types/stencil.d.ts +7 -6
  266. package/dist/utils/index.d.ts +65 -38
  267. package/dist/utils/index.js +56 -55
  268. package/package.json +32 -12
  269. package/dist/cdn/462JBSEV.js +0 -422
  270. package/dist/cdn/5QAHYX7Y.js +0 -5
  271. package/dist/cdn/64PJB5NU.js +0 -2
  272. package/dist/cdn/6AWNQHCO.js +0 -4
  273. package/dist/cdn/AXDZBBNL.js +0 -45
  274. package/dist/cdn/BIV2IPHH.js +0 -2
  275. package/dist/cdn/CCY4TSBO.js +0 -2
  276. package/dist/cdn/CTSALWEP.js +0 -2
  277. package/dist/cdn/D2N2NSRQ.js +0 -72
  278. package/dist/cdn/DOV5ZJ7M.js +0 -2
  279. package/dist/cdn/EEUCKMU7.js +0 -2
  280. package/dist/cdn/EGHBXLNG.js +0 -2
  281. package/dist/cdn/ETRWZ3MS.js +0 -108
  282. package/dist/cdn/EWI4V3GQ.js +0 -36
  283. package/dist/cdn/F2AHA4GB.js +0 -54
  284. package/dist/cdn/I6HNBTWY.js +0 -2
  285. package/dist/cdn/JBHNHHWO.js +0 -3
  286. package/dist/cdn/JOFUPKIB.js +0 -2
  287. package/dist/cdn/KMQ3SP4I.js +0 -5
  288. package/dist/cdn/KUEOKIQR.js +0 -2
  289. package/dist/cdn/LKRAPK4A.js +0 -165
  290. package/dist/cdn/NXKKG5TK.js +0 -2
  291. package/dist/cdn/OBUZ7HBN.js +0 -2
  292. package/dist/cdn/OIVRK7HT.js +0 -2
  293. package/dist/cdn/RUURNLTP.js +0 -2
  294. package/dist/cdn/RVOAPUBN.js +0 -2
  295. package/dist/cdn/TSZPHE7L.js +0 -22
  296. package/dist/cdn/VAZNJSKA.js +0 -16
  297. package/dist/cdn/VNQN5ZQO.js +0 -14
  298. package/dist/cdn/WIDTPVSU.js +0 -2
  299. package/dist/cdn/XER22VYQ.js +0 -3
  300. package/dist/cdn/YIMNOUTF.js +0 -2
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as r}from"./VXFQANGJ.js";export default $arcgis.t(([f,l])=>{var c=750;function m(e){return"point"in e&&e.point!==void 0}function y(e){return"layerId"in e&&e.layerId!==void 0}var I=async(e,a)=>{if(m(e)){let{point:t}=e;return{geometry:new f({x:t.x,y:t.y,spatialReference:t.spatialReference?{wkid:t.spatialReference.wkid}:a.spatialReference})}}if(y(e)){let t=a.map?.allLayers.find(o=>o.id===e.layerId);if(!t)return{error:`Could not find geometry layer with ID: ${e.layerId}`};let i=t.title??t.id,n=e.where?.trim()||"1=1";try{let o=await t.queryFeatures({where:n,returnGeometry:!0,outSpatialReference:a.spatialReference,num:c+1});if(!o.features.length)return{error:`No features found in geometry layer "${i}" with the specified where clause: ${n}`};if(o.features.length>c)return{error:`Geometry filter for layer "${i}" matched too many features (${o.features.length}+). Please narrow the geometry layer filter.`};let s=o.features.map(u=>u.geometry).filter(u=>!!u);if(!s.length)return{error:"No valid geometries found for the matched geometry layer features."};let d=s.length===1?s[0]:l.executeMany(s);return d?(d.spatialReference||(d.spatialReference=a.spatialReference),{geometry:d}):{error:"Failed to combine geometries from geometry layer."}}catch(o){return{error:`Failed to query geometry: ${String(o)}`}}}return{error:"Invalid geometry configuration provided"}},p=["feet","kilometers","meters","miles","nautical-miles","us-nautical-miles"],h=r.enum(p),g=r.object({id:r.string()}),b=r.object({id:r.string(),kind:r.literal("point"),payload:r.object({x:r.number(),y:r.number(),spatialReference:r.object({wkid:r.number()}).optional()})}),v=r.object({sharedResourceId:r.string().describe("ID of a point returned by listSharedResources for a previously geocoded address or place."),distance:r.number().optional().describe("Optional buffer distance around the point."),units:h.optional().describe("The units for the distance buffer.")}),$=(e,a)=>{if(!e||!("sharedResourceId"in e))return e;if(!a)throw new Error("Shared resources are unavailable in the tool runtime state.");let t=a.find(n=>{let o=g.safeParse(n);return o.success&&o.data.id===e.sharedResourceId});if(!t)throw new Error(`Shared resource not found: ${e.sharedResourceId}`);let i=b.safeParse(t);if(!i.success)throw new Error(`Shared resource ${e.sharedResourceId} does not contain a valid point.`);return{point:i.data.payload,distance:e.distance,units:e.units}};return{a:m,b:y,c:I,d:h,e:v,f:$}},"geometry/Point","geometry/operators/unionOperator")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{c as i,e as c}from"./R2PQVY4O.js";export default $arcgis.t(([m,{subclass:p}])=>{function a(t){return t?Object.keys(t.shape??{}):[]}function d(t){let e={};for(let n of t)for(let s of a(n))e[s]=void 0;return e}function g(t,e){return Object.fromEntries(e.filter(n=>Object.hasOwn(t,n)).map(n=>[n,t[n]]))}function l(t,e){return`${t.id}_${e}`}function h(t,e){let n=e.inputSchema;return n?{...g(t,a(n)),agentExecutionContext:t.agentExecutionContext,outputMessage:t.outputMessage,status:void 0,summary:""}:{...t,status:void 0,summary:""}}function x(t,e){return t.outputSchema?g(e,a(t.outputSchema)):{}}function y(t){let e={outputMessage:t.outputMessage,status:t.status,summary:t.summary};return t.agentExecutionContext&&(e.agentExecutionContext=t.agentExecutionContext),e}function v(t,e){return async(n,s)=>{let o=await t.run(h(n,t),s),r=x(t,o);return e||o.status==="failed"?{...r,...y(o)}:{...r,outputMessage:o.outputMessage}}}var w=Object.getOwnPropertyDescriptor,E=(t,e,n,s)=>{for(var o=s>1?void 0:s?w(e,n):e,r=t.length-1,u;r>=0;r--)(u=t[r])&&(o=u(o)||o);return o},f=class extends m{generate(){let t=this.getAgents();this.validateAgents(t);for(let r of t)r.generate();let e=d(t.flatMap(r=>r.getSchemas())),n=i(e),s=this.buildNodes(t),o=this.buildEdges(t);return{workspace:n,createGraph:()=>c(s,o,n,{entryNode:this.getEntryNode(t)})}}buildNodes(t){let e={};for(let[n,s]of t.entries())e[l(s,n)]=v(s,this.isTerminalAgent(t,n));return e}validateAgents(t){if(!t.length)throw new Error("Workflow requires at least one agent.")}};f=E([p("BaseWorkflow")],f);return{a:a,b:d,c:l,d:f}},"core/Accessor","core/accessorSupport/decorators")
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`# ArcgisKnowledge Tool Instructions
2
+ import"./UZLQALHY.js";var e=`# ArcgisKnowledge Tool Instructions
3
3
 
4
4
  You are an assistant that helps users answer questions and perform operations on their knowledge graph, map or link chart. You have been assigned the task below, which must be achieved by calling a single tool.
5
5
 
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as wd}from"./VXFQANGJ.js";import{$ as T,$a as Ta,$b as Tb,$c as Tc,A as s,Aa as sa,Ab as sb,Ac as sc,Ad as sd,B as t,Ba as ta,Bb as tb,Bc as tc,Bd as td,C as u,Ca as ua,Cb as ub,Cc as uc,Cd as ud,D as v,Da as va,Db as vb,Dc as vc,Dd as vd,E as w,Ea as wa,Eb as wb,Ec as wc,F as x,Fa as xa,Fb as xb,Fc as xc,G as y,Ga as ya,Gb as yb,Gc as yc,H as z,Ha as za,Hb as zb,Hc as zc,I as A,Ia as Aa,Ib as Ab,Ic as Ac,J as B,Ja as Ba,Jb as Bb,Jc as Bc,K as C,Ka as Ca,Kb as Cb,Kc as Cc,L as D,La as Da,Lb as Db,Lc as Dc,M as E,Ma as Ea,Mb as Eb,Mc as Ec,N as F,Na as Fa,Nb as Fb,Nc as Fc,O as G,Oa as Ga,Ob as Gb,Oc as Gc,P as H,Pa as Ha,Pb as Hb,Pc as Hc,Q as I,Qa as Ia,Qb as Ib,Qc as Ic,R as J,Ra as Ja,Rb as Jb,Rc as Jc,S as K,Sa as Ka,Sb as Kb,Sc as Kc,T as L,Ta as La,Tb as Lb,Tc as Lc,U as M,Ua as Ma,Ub as Mb,Uc as Mc,V as N,Va as Na,Vb as Nb,Vc as Nc,W as O,Wa as Oa,Wb as Ob,Wc as Oc,X as P,Xa as Pa,Xb as Pb,Xc as Pc,Y as Q,Ya as Qa,Yb as Qb,Yc as Qc,Z as R,Za as Ra,Zb as Rb,Zc as Rc,_ as S,_a as Sa,_b as Sb,_c as Sc,a,aa as U,ab as Ua,ac as Ub,ad as Uc,b,ba as V,bb as Va,bc as Vb,bd as Vc,c,ca as W,cb as Wa,cc as Wb,cd as Wc,d,da as X,db as Xa,dc as Xb,dd as Xc,e,ea as Y,eb as Ya,ec as Yb,ed as Yc,f,fa as Z,fb as Za,fc as Zb,fd as Zc,g,ga as _,gb as _a,gc as _b,gd as _c,h,ha as $,hb as $a,hc as $b,hd as $c,i,ia as aa,ib as ab,ic as ac,id as ad,ja as ba,jb as bb,jc as bc,jd as bd,ka as ca,kb as cb,kc as cc,kd as cd,l as j,la as da,lb as db,lc as dc,ld as dd,ma as ea,mb as eb,mc as ec,md as ed,na as fa,nb as fb,nc as fc,nd as fd,oa as ga,ob as gb,oc as gc,od as gd,p as k,pa as ha,pb as hb,pc as hc,pd as hd,q as l,qa as ia,qb as ib,qc as ic,qd as id,r as m,ra as ja,rb as jb,rc as jc,rd as jd,sa as ka,sb as kb,sc as kc,sd as kd,t as n,ta as la,tb as lb,tc as lc,td as ld,u as o,ua as ma,ub as mb,uc as mc,ud as md,v as p,va as na,vb as nb,vc as nc,vd as nd,wa as oa,wb as ob,wc as oc,wd as od,xa as pa,xb as pb,xc as pc,xd as pd,y as q,ya as qa,yb as qb,yc as qc,yd as qd,z as r,za as ra,zb as rb,zc as rc,zd as rd}from"./MWYBF3F3.js";import"./UZLQALHY.js";export{b as $brand,m as $input,l as $output,a as NEVER,p as TimePrecision,Hb as ZodAny,Rb as ZodArray,$a as ZodBase64,bb as ZodBase64URL,wb as ZodBigInt,yb as ZodBigIntFormat,ub as ZodBoolean,Xa as ZodCIDRv4,Za as ZodCIDRv6,Ha as ZodCUID,Ja as ZodCUID2,Mc as ZodCatch,Sc as ZodCodec,ed as ZodCustom,hb as ZodCustomStringFormat,Pb as ZodDate,Ec as ZodDefault,ac as ZodDiscriminatedUnion,db as ZodE164,ra as ZodEmail,Da as ZodEmoji,oc as ZodEnum,_ as ZodError,zc as ZodExactOptional,tc as ZodFile,sd as ZodFirstPartyTypeKind,cd as ZodFunction,ta as ZodGUID,Ra as ZodIPv4,Va as ZodIPv6,W as ZodISODate,V as ZodISODateTime,Y as ZodISODuration,X as ZodISOTime,cc as ZodIntersection,pd as ZodIssueCode,fb as ZodJWT,Pa as ZodKSUID,_c as ZodLazy,rc as ZodLiteral,Ta as ZodMAC,kc as ZodMap,Oc as ZodNaN,Fa as ZodNanoID,Lb as ZodNever,Ic as ZodNonOptional,Fb as ZodNull,Bc as ZodNullable,mb as ZodNumber,ob as ZodNumberFormat,Ub as ZodObject,xc as ZodOptional,Qc as ZodPipe,Gc as ZodPrefault,Vc as ZodPreprocess,ad as ZodPromise,Wc as ZodReadonly,$ as ZodRealError,gc as ZodRecord,mc as ZodSet,oa as ZodString,qa as ZodStringFormat,Kc as ZodSuccess,Bb as ZodSymbol,Yc as ZodTemplateLiteral,vc as ZodTransform,ec as ZodTuple,ma as ZodType,La as ZodULID,Aa as ZodURL,va as ZodUUID,Db as ZodUndefined,Yb as ZodUnion,Jb as ZodUnknown,Nb as ZodVoid,Na as ZodXID,_b as ZodXor,na as _ZodString,Fc as _default,dd as _function,Ib as any,Sb as array,ab as base64,cb as base64url,xb as bigint,vb as boolean,Nc as catch,fd as check,Ya as cidrv4,_a as cidrv6,d as clone,Tc as codec,ud as coerce,c as config,U as core,Ia as cuid,Ka as cuid2,gd as custom,Qb as date,fa as decode,ha as decodeAsync,wd as default,jd as describe,bc as discriminatedUnion,eb as e164,sa as email,Ea as emoji,ea as encode,ga as encodeAsync,K as endsWith,pc as enum,Ac as exactOptional,uc as file,f as flattenError,qb as float32,rb as float64,g as formatError,td as fromJSONSchema,dd as function,rd as getErrorMap,o as globalRegistry,s as gt,t as gte,ua as guid,lb as hash,kb as hex,jb as hostname,Ca as httpUrl,I as includes,ld as instanceof,pb as int,sb as int32,zb as int64,dc as intersection,Uc as invertCodec,Sa as ipv4,Wa as ipv6,Z as iso,nd as json,gb as jwt,Tb as keyof,Qa as ksuid,$c as lazy,E as length,sc as literal,k as locales,Xb as looseObject,jc as looseRecord,G as lowercase,q as lt,r as lte,Ua as mac,lc as map,C as maxLength,z as maxSize,kd as meta,M as mime,D as minLength,A as minSize,y as multipleOf,Pc as nan,Ga as nanoid,qc as nativeEnum,v as negative,Mb as never,x as nonnegative,Jc as nonoptional,w as nonpositive,O as normalize,Gb as null,Cc as nullable,Dc as nullish,nb as number,Vb as object,yc as optional,N as overwrite,aa as parse,ba as parseAsync,ic as partialRecord,Rc as pipe,u as positive,Hc as prefault,od as preprocess,i as prettifyError,bd as promise,L as property,Xc as readonly,hc as record,hd as refine,F as regex,j as regexes,n as registry,ja as safeDecode,la as safeDecodeAsync,ia as safeEncode,ka as safeEncodeAsync,ca as safeParse,da as safeParseAsync,nc as set,qd as setErrorMap,B as size,S as slugify,J as startsWith,Wb as strictObject,pa as string,ib as stringFormat,md as stringbool,Lc as success,id as superRefine,Cb as symbol,Zc as templateLiteral,T as toJSONSchema,Q as toLowerCase,R as toUpperCase,wc as transform,h as treeifyError,P as trim,fc as tuple,tb as uint32,Ab as uint64,Ma as ulid,Eb as undefined,Zb as union,Kb as unknown,H as uppercase,Ba as url,e as util,wa as uuid,xa as uuidv4,ya as uuidv6,za as uuidv7,Ob as void,Oa as xid,$b as xor,vd as z};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import c from"./G7OMHU2B.js";import"./CP5BVGJU.js";import b from"./7VUSIGEM.js";import"./R2PQVY4O.js";import a from"./D5UFYQHN.js";import"./G2EGT3CF.js";import"./R74ZHFA6.js";import"./7VAQUCBU.js";import"./HHFNQR6Z.js";import"./VOKXKU7M.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{b as C,c as q}from"./V6HOUZPZ.js";import"./3UEKINYC.js";import"./RLEHNAIA.js";import d from"./G7OMHU2B.js";import"./CP5BVGJU.js";import b from"./7VUSIGEM.js";import{a as R,b as F,e as L}from"./R2PQVY4O.js";import a from"./D5UFYQHN.js";import{e as P}from"./G2EGT3CF.js";import{v as A,z as J}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./7VAQUCBU.js";import"./HHFNQR6Z.js";import"./VOKXKU7M.js";import{W as I,ka as T}from"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import{Dd as c}from"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([W,K,{property:n,subclass:l},b,E,,,,,,,D,M])=>{var Q=Object.defineProperty,U=Object.getOwnPropertyDescriptor,f=(t,e,r,s)=>{for(var o=s>1?void 0:s?U(e,r):e,a=t.length-1,i;a>=0;a--)(i=t[a])&&(o=(s?i(e,r,o):i(o))||o);return s&&o&&Q(e,r,o),o},p=class extends E{constructor(t){super(t)}static fromJSON(t){return new p({id:t.id,sourceAnchorId:t.source_anchor_id,sourceNodeId:t.source_node_id,targetAnchorId:t.target_anchor_id,targetNodeId:t.target_node_id})}};f([n()],p.prototype,"id",2);f([n()],p.prototype,"sourceAnchorId",2);f([n()],p.prototype,"sourceNodeId",2);f([n()],p.prototype,"targetAnchorId",2);f([n()],p.prototype,"targetNodeId",2);p=f([l("Edge")],p);var X=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,O=(t,e,r,s)=>{for(var o=s>1?void 0:s?Y(e,r):e,a=t.length-1,i;a>=0;a--)(i=t[a])&&(o=(s?i(e,r,o):i(o))||o);return s&&o&&X(e,r,o),o},m=class extends E{constructor(t){super(t)}async load(){return await Promise.resolve(this)}compile(t){return{runtimeNode:this.createRuntimeNode(),edges:t.outgoingEdges.map(e=>({from:this.id,to:e.targetNodeId}))}}static fromJSON(t){throw new Error("BaseNode is abstract and cannot be instantiated directly.")}};O([n()],m.prototype,"id",2);O([n()],m.prototype,"label",2);O([n()],m.prototype,"type",2);m=O([l("BaseNode")],m);function G(t){let e=new Set(t.required),r=Object.fromEntries(Object.entries(t.properties).map(([s,o])=>{let a=$(o);return[s,e.has(s)?a:a.optional()]}));return c.object(r)}function $(t){let e;switch(t.type){case"array":e=c.array(t.items?$(t.items):c.unknown());break;case"boolean":e=c.boolean();break;case"number":e=c.number();break;case"object":e=G({properties:t.properties??{},required:t.required});break;case"string":e=t.enum?.length?c.enum(t.enum):c.string();break}return t.description?e.describe(t.description):e}var tt=new Map([["clear_filters",async()=>(await import("./RBE55SWR.js")).clearFiltersTool],["reset_map",async()=>(await import("./T4RIGOXB.js")).resetMapTool],["set_feature_effect",async()=>(await import("./FJO4KNOZ.js").then(m=>m.default.then(e=>({setFeatureEffectTool:e})))).setFeatureEffectTool],["list_layer_fields",async()=>(await import("./CJMUJXPL.js")).listLayerFieldsTool],["go_to_address",async()=>(await import("./QUKNPVAF.js").then(m=>m.default.then(e=>({goToAddressTool:e})))).goToAddressTool],["go_to_bookmark",async()=>(await import("./2EY3BQQX.js")).goToBookmarkTool],["go_to_features",async()=>(await import("./5X7EG7D2.js")).goToFeaturesTool],["go_to_full_extent",async()=>(await import("./YLVJA4ZE.js").then(m=>m.default.then(e=>({goToFullExtentTool:e})))).goToFullExtentTool],["go_to_home_extent",async()=>(await import("./JO5ETMPS.js")).goToHomeExtentTool],["go_to_layer",async()=>(await import("./Q57QWN5W.js")).goToLayerTool],["go_to_scale",async()=>(await import("./4OGR5QKS.js")).goToScaleTool],["go_to_viewpoint",async()=>(await import("./ZOEMBHRF.js").then(m=>m.default.then(e=>({goToViewpointTool:e})))).goToViewpointTool],["go_to_zoom",async()=>(await import("./PUHRBGKB.js")).goToZoomTool],["find_relevant_fields",async()=>(await import("./7BCQMK6D.js").then(m=>m.default.then(e=>({findRelevantFieldsTool:e})))).findRelevantFieldsTool],["find_relevant_layers",async()=>(await import("./IBZ2NEAO.js")).findRelevantLayersTool],["get_attribute",async()=>(await import("./7V6OSTFC.js").then(m=>m.default.then(e=>({getAttributeTool:e})))).getAttributeTool],["get_statistics",async()=>(await import("./XX6GHMNR.js").then(m=>m.default.then(e=>({getStatisticsTool:e})))).getStatisticsTool],["get_top_features",async()=>(await import("./ZRVZMPFN.js").then(m=>m.default.then(e=>({getTopFeaturesTool:e})))).getTopFeaturesTool],["query_features",async()=>(await import("./G3SF6U2U.js").then(m=>m.default.then(e=>({queryFeaturesTool:e})))).queryFeaturesTool]]);async function et(t){let e=tt.get(t);if(!e)throw new Error(`ArcGIS tool is not supported in the browser runtime: ${t}`);return await e()}var ot=Object.defineProperty,rt=Object.getOwnPropertyDescriptor,N=(t,e,r,s)=>{for(var o=s>1?void 0:s?rt(e,r):e,a=t.length-1,i;a>=0;a--)(i=t[a])&&(o=(s?i(e,r,o):i(o))||o);return s&&o&&ot(e,r,o),o},u=class extends E{constructor(t){super(t),this.type="arcgis-tool"}async createRuntimeTools(){if(!this.name)throw new Error("ArcgisTool name is required");return[await et(this.name)]}static fromJSON(t){return new u({name:t.name,requireApproval:t.require_approval})}};N([n()],u.prototype,"name",2);N([n()],u.prototype,"requireApproval",2);N([n()],u.prototype,"type",2);u=N([l("ArcgisTool")],u);var st=Object.defineProperty,at=Object.getOwnPropertyDescriptor,B=t=>{throw TypeError(t)},w=(t,e,r,s)=>{for(var o=s>1?void 0:s?at(e,r):e,a=t.length-1,i;a>=0;a--)(i=t[a])&&(o=(s?i(e,r,o):i(o))||o);return s&&o&&st(e,r,o),o},it=(t,e,r)=>e.has(t)||B("Cannot "+r),nt=(t,e,r)=>e.has(t)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ct=(t,e,r)=>(it(t,e,"access private method"),r),S,z,d=class extends m{constructor(t){super(t),nt(this,S),this.type="agent-node"}createRuntimeNode(){let t;return async(e,r)=>{t??=ct(this,S,z).call(this);let s=await(await t).run(e,r),o=this.outputSchema?.safeParse(s);if(o&&!o.success)throw o.error;let a=o?.data,i=a??s.outputMessage;return{agentExecutionContext:s.agentExecutionContext,...a?{}:{outputMessage:s.outputMessage},status:s.status,summary:s.summary,nodes:{[this.id]:{output:i}}}}}compile(t){let e=t.outgoingEdges[0]?.targetNodeId;return{runtimeNode:this.createRuntimeNode(),edges:[{from:this.id,decide:r=>r.status==="failed"?void 0:e}],schemas:[c.object({output:this.outputSchema??c.string()})]}}static fromJSON(t){let e=new d({id:t.id,label:t.label,prompt:t.prompt?.content,type:"agent-node",modelTier:t.llm_model?.model_tier});return t.structured_output&&(e.outputSchema=G(t.structured_output)),e.tools=t.tools?.filter(r=>r.type==="arcgis_tool").map(r=>u.fromJSON(r)),e}};S=new WeakSet;z=async function(){let t=this.prompt;if(!t?.trim())throw new Error(`WebAgent agent node "${this.id}" requires a prompt.`);let e=[];if(this.tools)for(let r of this.tools){let s=await r.createRuntimeTools();e.push(...s)}return new M({name:this.id,outputSchema:this.outputSchema,modelTier:this.modelTier,prompt:t,tools:e})};w([n()],d.prototype,"type",2);w([n()],d.prototype,"prompt",2);w([n()],d.prototype,"outputSchema",2);w([n()],d.prototype,"tools",2);w([n()],d.prototype,"modelTier",2);d=w([l("AgentNode")],d);var pt=Object.defineProperty,dt=Object.getOwnPropertyDescriptor,k=(t,e,r,s)=>{for(var o=s>1?void 0:s?dt(e,r):e,a=t.length-1,i;a>=0;a--)(i=t[a])&&(o=(s?i(e,r,o):i(o))||o);return s&&o&&pt(e,r,o),o},h=class extends m{constructor(t){super(t),this.type="end-message-node"}createRuntimeNode(){return async t=>{let e=await I.fromTemplate(this.message,{templateFormat:"mustache"}).format(t);return{outputMessage:e,status:"success",summary:e}}}compile(t){return{runtimeNode:this.createRuntimeNode(),edges:[]}}static fromJSON(t){let e=new h({id:t.id,label:t.label,type:"end-message-node"});return e.message=t.message,e}};k([n()],h.prototype,"type",2);k([n()],h.prototype,"message",2);h=k([l("EndMessageNode")],h);var mt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,H=(t,e,r,s)=>{for(var o=s>1?void 0:s?ut(e,r):e,a=t.length-1,i;a>=0;a--)(i=t[a])&&(o=(s?i(e,r,o):i(o))||o);return s&&o&&mt(e,r,o),o},y=class extends m{constructor(t){super(t),this.type="start-node"}createRuntimeNode(){return t=>({question:t.agentExecutionContext.userRequest})}static fromJSON(t){return new y({id:t.id,label:t.label,type:"start-node"})}};H([n()],y.prototype,"type",2);y=H([l("StartNode")],y);function lt(t){switch(t.type){case"agent_node":return d.fromJSON(t);case"end_message_node":return h.fromJSON(t);case"start_node":return y.fromJSON(t);default:throw new Error(`WebAgent node "${t.id}" uses unsupported type "${t.type}".`)}}function ht(t={}){let e=Object.keys(t);if(R(e),e.includes("nodes"))throw new Error("node state cannot define reserved field: nodes.");let r=F(t);return T.Root({...r,nodes:T({reducer:(s,o)=>({...s,...o}),default:()=>({})}),...P()})}function V(t){let e=new Set;for(let s of t)for(let o of Object.keys(s.shape??{}))o!=="nodes"&&e.add(o);let r=Object.fromEntries([...e].map(s=>[s,void 0]));return ht(r)}var v=class t{constructor(e,r,s){this.sourceJSON=e,this.edges=r,this.nodes=s,this._loaded=!1}static fromJSON(e){return new t(e,e.graph.edges.map(r=>p.fromJSON(r)),e.graph.nodes.map(r=>lt(r)))}async load(){return this._loadPromise??=Promise.all(this.nodes.map(async e=>await e.load())).then(()=>{this._loaded=!0}),await this._loadPromise,this}getSchemas(){let e=Object.fromEntries(this._getNodeCompilations().flatMap((r,s)=>{let o=this.nodes[s];return r.schemas?.map(a=>[o.id,a])??[]}));return[c.object({loopCounts:c.record(c.string(),c.number()).optional(),nodes:c.object(e).partial().optional(),question:c.string().optional()})]}generate(){this._assertLoaded(),this._nodeCompilations=void 0;let e=this._getNodeCompilations(),r=V(this.getSchemas()),s=this.nodes.find(i=>i.type==="start-node")?.id,o={},a=[];for(let[i,Z]of this.nodes.entries()){let _=e[i];_&&(_.runtimeNode&&(o[Z.id]=_.runtimeNode),a.push(..._.edges))}return{createGraph:()=>L(o,a,r,{entryNode:s}),workspace:r}}_assertLoaded(){if(!this._loaded)throw new Error("AgenticWorkflowRuntime must be loaded before it can generate a graph.")}_getNodeCompilations(){return this._assertLoaded(),this._nodeCompilations??=this.nodes.map(e=>e.compile({outgoingEdges:this.edges.filter(r=>r.sourceNodeId===e.id)}))}},gt=Object.defineProperty,ft=Object.getOwnPropertyDescriptor,x=(t,e,r,s)=>{for(var o=s>1?void 0:s?ft(e,r):e,a=t.length-1,i;a>=0;a--)(i=t[a])&&(o=(s?i(e,r,o):i(o))||o);return s&&o&&gt(e,r,o),o},wt=()=>{throw new Error("WebAgent must be loaded before it can run.")},g=class extends D{constructor(t){super(t)}async load(){if(this.portalItem){try{await this.portalItem.load()}catch(r){throw new b("web-agent:load-portal-item","Failed to load portal item",{error:r})}let e=await this.portalItem.fetchData();if(this.sourceJSON=e,!this.portalItem.title)throw new b("web-agent:missing-title","The portal item is missing a title")}if(!this.sourceJSON)throw new b("web-agent:missing-source-json","The source JSON is missing");if(!this.sourceJSON.description)throw new b("web-agent:missing-description","The source JSON is missing a description");let t=v.fromJSON(this.sourceJSON);return await t.load(),this._runtime=t,this.description=this.sourceJSON.description,this.name=this.portalItem?.title??`web-agent-${Date.now()}`,this.generate(),this}getSchemas(){return this._runtime?.getSchemas()??[]}generate(){if(!this._runtime){this._set("workspace",V([])),this._set("createGraph",wt);return}let{createGraph:t,workspace:e}=this._runtime.generate();this._set("workspace",e),this._set("createGraph",t)}};x([n({type:W})],g.prototype,"portalItem",2);x([n()],g.prototype,"sourceJSON",2);g=x([l("WebAgent")],g);var j=class extends A{static{this.properties={agent:0,context:0,itemId:1,workflow:0}}#t;async getContext(){return C(this.context)?await this.context():this.context}async load(){let e;if(this.itemId){let r=K.getDefault();e=new g({portalItem:new W({id:this.itemId,portal:r})})}else this.workflow&&(e=new g({sourceJSON:this.workflow}));if(e&&(await e.load(),this.agent=e.registration),!this.agent)throw new Error("Failed to initialize the assistant agent because the agent registration is missing.");this.#t=q(this)}disconnectedCallback(){this.#t?.unregister(this.agent.id),super.disconnectedCallback()}};J("arcgis-assistant-agent",j);return j},"portal/PortalItem","portal/Portal","core/accessorSupport/decorators","core/Error","core/Accessor","identity/IdentityManager","request","config","core/reactiveUtils","layers/FeatureLayer",a,b,d)
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`## GIS Agent Orchestrator
2
+ import"./UZLQALHY.js";var e=`## GIS Agent Orchestrator
3
3
 
4
4
  You are an orchestrator for an ArcGIS Maps SDK for JavaScript system.
5
5
 
@@ -97,6 +97,20 @@ Do not reinterpret the request into a different form.
97
97
 
98
98
  ---
99
99
 
100
+ ## Follow-up Reference Resolution
101
+
102
+ If the latest user request refers to prior results or prior context using a referential phrase such as "these", "those", "them", "that set", "the previous results", "this", "it", "that one", "this parcel", "this location", or "that feature", then the request depends on earlier context.
103
+
104
+ This also applies to equivalent referential wording in other languages.
105
+
106
+ Resolve the reference using the most recent relevant chat history or successful prior step.
107
+
108
+ In this case, the \`assignedTask\` should be standalone and should preserve the referenced prior constraints while adding only the new constraint or question from the latest user request.
109
+
110
+ Do not leave ambiguous references like "these", "those", "them", "this", or "it" in \`assignedTask\` when they can be resolved from context.
111
+
112
+ ---
113
+
100
114
  ## Assigned Task Guidelines (IMPORTANT)
101
115
 
102
116
  - The \`assignedTask\` must match the user\u2019s request exactly in meaning
@@ -106,6 +120,8 @@ Do not reinterpret the request into a different form.
106
120
 
107
121
  - Keep the task short, specific, and directly executable
108
122
  - Keep wording close to the user\u2019s request with minimal transformation
123
+ - When resolving follow-up references, only replace the ambiguous reference with the resolved prior context; keep the rest of the user\u2019s wording as close as possible.
124
+
109
125
  - Use only information explicitly present in the user request or provided context
110
126
 
111
127
  - The \`assignedTask\` may represent only part of the user\u2019s request when multiple steps are necessary
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a,b as s,c as o}from"./WJXXOKGA.js";import"./5FL5BTTX.js";import{g as r,h as t,v as i,z as c}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var l=r`.container{color:var(--calcite-color-text-1);min-width:0}.content{min-width:0;overflow-wrap:anywhere}.content>*{margin:0}.content>*+*{margin-block-start:var(--calcite-spacing-sm)}.content :is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}.content>calcite-table{display:block;max-width:100%}.content pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}.content pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}.part{animation:part-reveal calc(3 * var(--calcite-animation-timing)) ease-out}@keyframes part-reveal{0%{opacity:0;transform:translateY(var(--calcite-size-fixed-xxs))}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.part{animation:none}}`,e=class extends i{static{this.properties={content:1,parts:0}}static{this.styles=l}render(){return t`<div class="container"><div class="content">${this.parts?.map(n=>t`<span class="part">${a(o(n))}</span>`)??a(s(this.content))}</div></div>`}};c("arcgis-assistant-message-text",e);export{e as ArcgisAssistantMessageText};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as c}from"./ONQ6JSBJ.js";import{Dc as d}from"./AI6DYOKR.js";import{a}from"./VXFQANGJ.js";export default $arcgis.t(([i,u,w,{addressToLocations:S},v])=>{async function y(e,s){let r=w.getDefault().helperServices,n=r.geocode.find(g=>g.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let l=n.url,m=`${i.assetsPath?.endsWith("/")?i.assetsPath:`${i.assetsPath}/`}esri/images/search/search-symbol-32.png`,o=(await S(l,{address:{SingleLine:e},outFields:["Match_addr"]}))?.[0];if(!o?.extent||!o.location)throw new Error(`Could not find location for: ${e}`);let h=new v({url:m,width:24,height:24}),p=new u({geometry:o.location,symbol:h});s.graphics.removeAll(),s.graphics.add(p),await s.goTo(o.extent);let t={address:o.address??e,location:o.location.toJSON(),extent:o.extent.toJSON()},f={value:t,sharedStatePatch:{lastResolvedLocation:{value:t}},sharedResourceAdditions:[{kind:"point",description:t.address,payload:t.location}]};return[`Successfully zoomed to ${t.address}.`,f]}async function T({address:e},s){let{mapView:r}=c(s,["mapView"]);return await y(e,r)}var A=a.object({address:a.string().describe("The full address or place name to locate.")}),W=d(T,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:A,responseFormat:"content_and_artifact"});return W},"config","Graphic","portal/Portal","rest/locator","symbols/PictureMarkerSymbol")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ export default $arcgis.t(([{formatDateOnly:h,convertDateFormatToIntlOptions:m,formatTimeOnly:N,formatDate:c}])=>{var T=new Set(["date","esrifieldtypedate","date-only","dateonly","esrifieldtypedateonly","time-only","timeonly","esrifieldtypetimeonly","timestamp-offset","timestampoffset","esrifieldtypetimestampoffset"]),y=e=>{if(!e)return!1;let t=e.toLowerCase();return T.has(t)},f=e=>{if(e instanceof Date)return Number.isNaN(e.getTime())?null:e;if(typeof e=="number"&&Number.isFinite(e)){let t=new Date(e);return Number.isNaN(t.getTime())?null:t}return null},S=e=>!e||e==="system"?Intl.DateTimeFormat().resolvedOptions().timeZone:e==="unknown"?"UTC":e,w=e=>{if(typeof e=="string"&&e)return e;let t=f(e);return t?t.toISOString().slice(0,10):null},j=()=>{let e=new Date().getTimezoneOffset(),t=e<=0?"+":"-",n=Math.floor(Math.abs(e)/60).toString().padStart(2,"0"),r=(Math.abs(e)%60).toString().padStart(2,"0"),i=`${t}${n}:${r}`;return{userTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,userTimezoneOffset:i}},I=(e,t,n)=>{let r=t?.toLowerCase();if(r&&!y(r))return e;if(r==="date-only"){let o=w(e);return o?h(o,m("short-date")):e}if(r==="time-only"){if(typeof e=="string"&&e)return N(e,m("long-time"));let o=f(e);return o?c(o,{...m("long-time"),timeZone:"UTC"}):e}let i=f(e);return i?c(i,{...m("short-date-short-time"),timeZone:S(n)}):e},g=(e,t,n)=>{if(e&&typeof e!="function"){let r="getField"in n&&n.getField?.(e),i=r&&"getFieldDomain"in n&&n.getFieldDomain?n.getFieldDomain(r.name):null;if(i?.type==="coded-value"){let o=i.codedValues.find(s=>s.code===t);return o?o.name:null}}return null},O=e=>!e||e==="system"?Intl.DateTimeFormat().resolvedOptions().timeZone:e==="unknown"?"UTC":e,v=e=>{if(e instanceof Date)return Number.isNaN(e.getTime())?null:e;if(typeof e=="number"&&Number.isFinite(e)){let t=new Date(e);return Number.isNaN(t.getTime())?null:t}if(typeof e=="string"&&e){let t=new Date(e);return Number.isNaN(t.getTime())?null:t}return null},x=(e,t)=>{if(typeof e!="number")return e;let n={};t.minimumFractionDigits!==void 0&&(n.minimumFractionDigits=t.minimumFractionDigits),t.maximumFractionDigits!==void 0&&(n.maximumFractionDigits=t.maximumFractionDigits),t.useGrouping==="always"?n.useGrouping=!0:t.useGrouping==="never"&&(n.useGrouping=!1);try{return new Intl.NumberFormat(void 0,n).format(e)}catch{return e}},C=(e,t,n)=>{let r=v(e);if(!r)return e;let i={};t.dateStyle?i.dateStyle=t.dateStyle:(t.year&&(i.year=t.year),t.month&&(i.month=t.month)),t.timeStyle&&(i.timeStyle=t.timeStyle),t.timeStyle&&t.hour12==="always"?i.hour12=!0:t.timeStyle&&t.hour12==="never"&&(i.hour12=!1),i.timeZone=O(n);try{return new Intl.DateTimeFormat(void 0,i).format(r)}catch{return e}},p=(e,t)=>e.getFieldAlias?.(t)??e.fieldsIndex?.get(t)?.alias??e.fieldsIndex?.get(t)?.name??t,F=(e,t,n,r,i)=>{if(n==null)return n;let o=e.getFieldConfiguration?.(t)?.fieldFormat;return o?.type==="number"?x(n,o):o?.type==="date-time"?!r||y(r)?C(n,o,i):n:I(n,r,i)},G=(e,t,n,r)=>{let i=e.fieldsIndex?.get(t),o=g(t,n,e)??n;return F(e,t,o,i?.type,r)},$=(e,t)=>p(e,t),k=(e,t,n)=>{let r=e.objectIdField,i=t.features.map(s=>s.attributes[r]),o=t.features.map(s=>{let d=s.attributes,u={};return e.fields.forEach(a=>{if(!Object.hasOwn(d,a.name))return;let l=d[a.name];if(a.name===r){u[a.name]=l;return}let D=g(a.name,l,e)??l,b=p(e,a.name);u[b]=F(e,a.name,D,a.type,n)}),u});return{objectIds:i,attributes:o}};return{a:j,b:G,c:$,d:k}},"intl")
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`## ArcgisKnowledge Agent - Lucene Generation for Graph Search
2
+ import"./UZLQALHY.js";var e=`## ArcgisKnowledge Agent - Lucene Generation for Graph Search
3
3
 
4
4
  You are an assistant that generates a lucene query for graph query searching.
5
5
 
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a}from"./7SRLZQVC.js";import"./FDOMMK2M.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export{a as listLayerFieldsTool};
@@ -0,0 +1,4 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as Y}from"./R74ZHFA6.js";var X=globalThis,Z=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),kt=new WeakMap,I=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=kt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&kt.set(e,t))}return t}toString(){return this.cssText}},jt=o=>new I(typeof o=="string"?o:o+"",void 0,vt),be=(o,...t)=>{let e=o.length===1?o[0]:t.reduce((s,r,n)=>s+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[n+1],o[0]);return new I(e,o,vt)},Ht=(o,t)=>{if(Z)o.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),r=X.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,o.appendChild(s)}},Et=Z?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return jt(e)})(o):o;var{is:_e,defineProperty:Ae,getOwnPropertyDescriptor:Ce,getOwnPropertyNames:we,getOwnPropertySymbols:Oe,getPrototypeOf:Te}=Object,et=globalThis,Vt=et.trustedTypes,Se=Vt?Vt.emptyScript:"",Pe=et.reactiveElementPolyfillSupport,k=(o,t)=>o,tt={toAttribute(o,t){switch(t){case Boolean:o=o?Se:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},j=(o,t)=>!_e(o,t),zt={attribute:!0,type:String,converter:tt,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),et.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=zt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Ae(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:n}=Ce(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:r,set(i){let a=r?.call(this);n?.call(this,i),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Te(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,s=[...we(e),...Oe(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(Et(r))}else t!==void 0&&e.push(Et(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ht(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let n=(s.converter?.toAttribute!==void 0?s.converter:tt).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let n=s.getPropertyOptions(r),i=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:tt;this._$Em=r;let a=i.fromAttribute(e,n.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,e,s,r=!1,n){if(t!==void 0){let i=this.constructor;if(r===!1&&(n=this[t]),s??=i.getPropertyOptions(t),!((s.hasChanged??j)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:n},i){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),n!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,n]of s){let{wrapped:i}=n,a=this[r];i!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,n,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[k("elementProperties")]=new Map,_[k("finalized")]=new Map,Pe?.({ReactiveElement:_}),(et.reactiveElementVersions??=[]).push("2.1.2");var bt=globalThis,Bt=o=>o,st=bt.trustedTypes,Wt=st?st.createPolicy("lit-html",{createHTML:o=>o}):void 0,_t="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,At="?"+A,Ne=`<${At}>`,T=document,V=()=>T.createComment(""),z=o=>o===null||typeof o!="object"&&typeof o!="function",Ct=Array.isArray,Qt=o=>Ct(o)||typeof o?.[Symbol.iterator]=="function",$t=`[
3
+ \f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ft=/-->/g,qt=/>/g,w=RegExp(`>|${$t}(?:([^\\s"'>=/]+)(${$t}*=${$t}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Gt=/'/g,Kt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,wt=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),ds=wt(1),ps=wt(2),us=wt(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Jt=new WeakMap,O=T.createTreeWalker(T,129);function Xt(o,t){if(!Ct(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wt!==void 0?Wt.createHTML(t):t}var Zt=(o,t)=>{let e=o.length-1,s=[],r,n=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let l=o[a],h,u,c=-1,m=0;for(;m<l.length&&(i.lastIndex=m,u=i.exec(l),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Ft:u[1]!==void 0?i=qt:u[2]!==void 0?(Yt.test(u[2])&&(r=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=r??H,c=-1):u[1]===void 0?c=-2:(c=i.lastIndex-u[2].length,h=u[1],i=u[3]===void 0?w:u[3]==='"'?Kt:Gt):i===Kt||i===Gt?i=w:i===Ft||i===qt?i=H:(i=w,r=void 0);let v=i===w&&o[a+1].startsWith("/>")?" ":"";n+=i===H?l+Ne:c>=0?(s.push(h),l.slice(0,c)+_t+l.slice(c)+A+v):l+A+(c===-2?a:v)}return[Xt(o,n+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class o{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let n=0,i=0,a=t.length-1,l=this.parts,[h,u]=Zt(t,e);if(this.el=o.createElement(h,s),O.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=O.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let c of r.getAttributeNames())if(c.endsWith(_t)){let m=u[i++],v=r.getAttribute(c).split(A),C=/([.?@])?(.*)/.exec(m);l.push({type:1,index:n,name:C[2],strings:v,ctor:C[1]==="."?rt:C[1]==="?"?nt:C[1]==="@"?it:P}),r.removeAttribute(c)}else c.startsWith(A)&&(l.push({type:6,index:n}),r.removeAttribute(c));if(Yt.test(r.tagName)){let c=r.textContent.split(A),m=c.length-1;if(m>0){r.textContent=st?st.emptyScript:"";for(let v=0;v<m;v++)r.append(c[v],V()),O.nextNode(),l.push({type:2,index:++n});r.append(c[m],V())}}}else if(r.nodeType===8)if(r.data===At)l.push({type:2,index:n});else{let c=-1;for(;(c=r.data.indexOf(A,c+1))!==-1;)l.push({type:7,index:n}),c+=A.length-1}n++}}static createElement(t,e){let s=T.createElement("template");return s.innerHTML=t,s}};function S(o,t,e=o,s){if(t===f)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,n=z(t)?void 0:t._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(o),r._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=S(o,r._$AS(o,t.values),r,s)),t}var ot=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??T).importNode(e,!0);O.currentNode=r;let n=O.nextNode(),i=0,a=0,l=s[0];for(;l!==void 0;){if(i===l.index){let h;l.type===2?h=new L(n,n.nextSibling,this,t):l.type===1?h=new l.ctor(n,l.name,l.strings,this,t):l.type===6&&(h=new at(n,this,t)),this._$AV.push(h),l=s[++a]}i!==l?.index&&(n=O.nextNode(),i++)}return O.currentNode=T,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},L=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),z(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&z(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=B.createElement(Xt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let n=new ot(r,this),i=n.u(this.options);n.p(e),this.T(i),this._$AH=n}}_$AC(t){let e=Jt.get(t.strings);return e===void 0&&Jt.set(t.strings,e=new B(t)),e}k(t){Ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let n of t)r===e.length?e.push(s=new o(this.O(V()),this.O(V()),this,this.options)):s=e[r],s._$AI(n),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=Bt(t).nextSibling;Bt(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,n){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){let n=this.strings,i=!1;if(n===void 0)t=S(this,t,e,0),i=!z(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,l,h;for(t=n[0],l=0;l<n.length-1;l++)h=S(this,a[s+l],e,l),h===f&&(h=this._$AH[l]),i||=!z(h)||h!==this._$AH[l],h===d?t=d:t!==d&&(t+=(h??"")+n[l+1]),this._$AH[l]=h}i&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},rt=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},nt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends P{constructor(t,e,s,r,n){super(t,e,s,r,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},at=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},te={M:_t,P:A,A:At,C:1,L:Zt,R:ot,D:Qt,V:S,I:L,H:P,N:nt,U:it,B:rt,F:at},De=bt.litHtmlPolyfillSupport;De?.(B,L),(bt.litHtmlVersions??=[]).push("3.3.2");var Ot=(o,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let n=e?.renderBefore??null;s._$litPart$=r=new L(t.insertBefore(V(),n),n,void 0,e??{})}return r._$AI(o),r};var Tt=globalThis,E=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ot(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Tt.litElementHydrateSupport?.({LitElement:E});var xe=Tt.litElementPolyfillSupport;xe?.({LitElement:E});(Tt.litElementVersions??=[]).push("4.2.2");var ee=new Set,se;var oe=o=>typeof o=="string"?o:"el"in o?o.el.localName:"localName"in o?o.localName:o.declaredClass,Os=(o,t,e,s)=>{let r=oe(t);if(s?.once){let i=`${o}${r}${e}`;if(ee.has(i))return;ee.add(i)}let n;if(s?.detail){n={};for(let[i,a]of Object.entries(s.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let l=new WeakRef(a);Object.defineProperty(n,i,{enumerable:!0,get(){return l.deref()}})}else n[i]=a;se?.log.interceptors?.forEach(i=>i(o,r,e,n)),console[o](`[${r}]: ${e}`,n)}else se?.log.interceptors?.forEach(i=>i(o,r,e)),console[o](`[${r}]: ${e}`)},re=o=>{let t=`[${oe(o)}] `;return e=>{let s=e instanceof Error&&e.message?e:new Error(String(e));s.message=`${t}${s.message}`,setTimeout(()=>{throw e})}};var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},W=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var q=Symbol.for("controller"),Le=o=>typeof o=="object"&&o!==null&&(q in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),Ps=o=>typeof o?.then=="function";var F,D=o=>{F!==o&&(F=o,queueMicrotask(()=>F===o?F=void 0:0))},G=o=>F,N=[],ct=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},ne=()=>N,U,Ns=o=>{U!==o&&(U=o,queueMicrotask(()=>U===o?U=void 0:0))},Ue=()=>{let o=U;return U=void 0,o},ie=async(o,t)=>{let e=ht(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(r=>t(r,s))}return e.exports},ae=async o=>{let t=ht(o);return await t.ready,t},ht=o=>{let e=G().manager.X(o);if(e!==void 0)return e;if(Le(o))return o;let s=Ue();if(s!==void 0)return s},lt=!1,Ds=o=>{lt=!0;try{return o()}finally{lt=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var le=(o,t)=>{let e=t>Re?Me:t/Ie,s=0,r=setInterval(()=>{s+=e,s>=t&&(clearInterval(r),o())},e);return r},Re=4e3,Me=2e3,Ie=4;var ke=(o,t,e)=>{let s=Object.keys(o),r=s.length;R===void 0&&queueMicrotask(M),R??=new Map;let n=R.get(o);return n===void 0&&(n={callbacks:[],keyCount:r},R.set(o,n)),n.keyCount!==r&&(n.callbacks.forEach(i=>i(s)),n.callbacks=[],n.keyCount=r),n.callbacks.push(i=>{let a=h=>p(t,null,h),l=i[r];l===void 0?a(void 0):o[l]===e?a(l):a(void 0)}),e},R,M=()=>{R?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),R=void 0},je=(o,t,e)=>{let s=o.manager;return s.V!==d&&s.V!==e&&s.S(void 0,void 0),s.T.length===0&&queueMicrotask(()=>s.S(void 0,void 0)),s.V=e,s.T.push((r,n)=>p(t,void 0,e===n?r:void 0)),e},He=(o=[G(),...ne()],t,e)=>{let s=Array.isArray(o)?o:[o],r=s.length+1,n=i=>{r-=1,i!==void 0&&(r=Math.min(r,0)),r===0&&t(i)};s.forEach(i=>ke(i,a=>n(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of s)if("manager"in i&&i.manager.component===i){je(i,a=>n(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},Ve=(o="",t={},e=G())=>{let s={emit:r=>{o===""&&M();let n=new CustomEvent(o,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(n),n}};return o===""&&He(void 0,r=>o=r.key,s),s},ze=Ve.bind(null,""),de;de=q;var St=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#r=[],this.#n=[],this.#l=[],this.#c=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#h=[];let e=this,s=t??G(new.target.name);e.#o=s,e.ready=e.P.promise,e.#a=he(e),e.component=s,e.#o.addController(e),e.#o.manager===void 0||(ct(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#r;#n;#l;#c;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(re(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?he(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return D(this.#o),ie}get useRef(){return D(this.#o),ae}get useRefSync(){return D(this.#o),ht}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#r.push(t)}onUpdate(t){this.#n.push(t)}onUpdated(t){this.#l.push(t)}onDestroy(t){this.#c.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#r.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#n.forEach(ce,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#l.forEach(ce,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#c.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(r=>{typeof r=="function"?this.#i.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#i.push(r.remove)})}};function ce(o){p(o,void 0,this)}var he=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,r,n){if(!((r==="exports"||r==="_exports")&&r in s&&s[r]===e)&&(r in s||r in Promise.prototype||typeof r=="symbol"))return typeof s=="function"?s[r]:Reflect.get(s,r,n)}},e=new Proxy(o,t);return e};var pe=St;var{I:zs}=te;var dt=o=>o.strings===void 0;var Be={},ue=(o,t=Be)=>o._$AH=t;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=o=>(...t)=>({_$litDirective$:o,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var K=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),K(s,t);return!0},pt=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},fe=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),qe(t)}};function We(o){this._$AN!==void 0?(pt(this),this._$AM=o,fe(this)):this._$AM=o}function Fe(o,t=!1,e=0){let s=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)K(s[n],!1),pt(s[n]);else s!=null&&(K(s,!1),pt(s));else K(this,o)}var qe=o=>{o.type==y.CHILD&&(o._$AP??=Fe,o._$AQ??=We)},ut=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),fe(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),pt(this))}setValue(t){if(dt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Xs=()=>new Nt,Nt=class{},Pt=new WeakMap,Dt=$(class extends ut{render(o){return d}update(o,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=o.options?.host,this.rt(this.ct=o.element)),d}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Pt.get(t);e===void 0&&(e=new WeakMap,Pt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?Pt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Lt=o=>{let t=o;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(o),(e.I??e._postLoad).promise}return!1},Ut={};function Rt(){}function Mt(o){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;o.prototype["f"+e]=async function(...s){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:s}))}}}var Ke=(o,t)=>function(s,r){if(!globalThis.customElements)return;let i=(r??s??{}).resourcesUrl;i&&o.setAssetPath(i);for(let[a,[l,h="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[c,m,v]=h.split(";"),C=c?c?.split(",").map(Je):void 0,gt=C?.map(([x])=>x),Q=class extends xt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=gt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=o}constructor(){!Q.B&&(Q.B=l(),Q.F()),super()}};customElements.define(a,Q)}},ft=Object.defineProperty,Je=o=>{let t=o.split(":");return t.length===1?[t[0],Y(t[0])]:t},Qe=globalThis.HTMLElement??Rt,xt=class extends Qe{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(s=>{Object.hasOwn(t,s)&&(t.#e[s]=t[s],delete t[s])}),e.A?t.#r({a:e.A}):e.B.then(async s=>{await e.K.p,t.#r(await(s.default?.then(r=>typeof r=="function"?{a:r}:r)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ft(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ft(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ft(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Mt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,s){this.#t?.attributeChangedCallback(t,e,s),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Lt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#r(t){let e=this.constructor,s=e.L,r=this.#e,n=Object.values(t).find(c=>c.L===s),i=`${s}--lazy`,a=n;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);Xe(a),!e.A&&(e.A=n,customElements.define(i,n)),n.N=this;let h=document.createElement(i);n.N=void 0,this.#t=h,this.#e=h,this.#s.forEach(c=>h.attributeChangedCallback(c,null,this.getAttribute(c))),Object.entries(r).forEach(Ye,h);let u=this.isConnected;(u||this.G)&&(h.connectedCallback?.(),u||h.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function Ye([o,t]){this[o]=t}var Xe=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,n){e.setAttribute.call(this.el,r,n)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},t.hasAttribute=function(r){return e.hasAttribute.call(this.el,r)},ft(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var mt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=yt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${yt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),M();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),ct(void 0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=le(t,Ze)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(r=>r(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},Ze=1e3,yt="autoDestroyDisabled";var ye=$(class extends g{constructor(o){if(super(o),o.type!==y.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter(t=>o[t]).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let r=!!t[s];r===this.st.has(s)||this.nt?.has(s)||(r?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var ge="important",ts=" !"+ge,es=$(class extends g{constructor(o){if(super(o),o.type!==y.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce((t,e)=>{let s=o[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`},"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let r=t[s];if(r!=null){this.ft.add(s);let n=typeof r=="string"&&r.endsWith(ts);s.includes("-")||n?e.setProperty(s,n?r.slice(0,-11):r,n?ge:""):e[s]=r}}return f}});var ss=$(class extends g{constructor(o){if(super(o),o.type!==y.PROPERTY&&o.type!==y.ATTRIBUTE&&o.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!dt(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===f||t===d)return t;let e=o.element,s=o.name;if(o.type===y.PROPERTY){if(t===e[s])return f}else if(o.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===y.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return ue(o),t}});var ve=class o extends E{constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,s=e.N,r=e.K.o,n=o.prototype.shouldUpdate;t.#r=s?.H??new b,t.I=s?.I??new b,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=Rt,t.shouldUpdate!==n&&(t.#e=t.shouldUpdate,t.shouldUpdate=n),r&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,r()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Ut;return this.K?.commonStyles===void 0||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){let s=typeof e=="number"?e:Array.isArray(e)?e[0]:0,r=Array.isArray(e)?e[1]:void 0,n=r?.hasChanged??j,i={attribute:s&1&&typeof t=="string"?Y(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),useDefault:!!(s&128),c:!1,...r,hasChanged(a,l){let h=n(a,l);return i.c=h,h}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,s){let r=this.K,n=super.getPropertyDescriptor(t,e,s);return s.d=n,{...n,get(){return r.t?.(this.#t.get(t)),n.get?.call(this)},set(i){let a=this.manager;if(s.readOnly&&!lt&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);n.set.call(this,i??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(M(),a?.S(t,i))}}}static{this.lumina=!0}static{Mt(this)}#t;#e;#s;#r;#n;#l;get elementInternals(){return this.#l??=this.el.attachInternals(),this.#l}connectedCallback(){this.hasAttribute("defer-hydration")||this.#c(!0)}#c(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#n=e;let s=!this.manager.connectedCalled;t&&super.connectedCallback(),s?queueMicrotask(()=>this.#i().catch(r=>{this.#r.reject(r),setTimeout(()=>{throw r})})):e&&this.requestUpdate()}#d(t){try{this.#n.clear(),this.constructor.K.r(this.#n,()=>super.update(t))}catch(e){throw this.#n.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#n?.destroy(),this.#n=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,n=t??(s===Ut?this.el:this.el.attachShadow(s));if(t)return this.manager.connectedCalled||this.#c(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=n.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return n}async#i(){let t=this.el.G??Lt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(W(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let s=this.J.filter(r=>!r.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#r.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#n?this.#d(t):super.update(t)}listen(t,e,s){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,s),()=>this.el.removeEventListener(t,r,s)))}listenOn(t,e,s,r){let n=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)))}async componentOnReady(){return await this.#r.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var $e=o=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},s={...o,getAssetPath(r){let n=new URL(r,t);return n.origin!==globalThis.location?.origin?n.href:n.pathname},setAssetPath:e,customElement(r,n){n.K=s,n.L=r,customElements.get(r)||customElements.define(r,n)}};return e(o.defaultAssetPath),s};var $r=o=>typeof o=="object"&&o!=null?ye(o):o;var It=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Dt(this.#e)):Dt(t)}},br=$(It);var _r=d;var J=$e({defaultAssetPath:"https://jsdev.arcgis.com/5.2.0-next/ai-components/",hydratedAttribute:"hydrated"}),{customElement:Tr,getAssetPath:Sr,setAssetPath:Pr}=J;J.t=void 0;J.o=void 0;J.c=void 0;J.r=void 0;export{Ps as a,D as b,ct as c,ne as d,Ns as e,Ds as f,be as g,ds as h,f as i,d as j,Os as k,re as l,He as m,ze as n,St as o,Ke as p,y as q,$ as r,g as s,Xs as t,Dt as u,ve as v,$r as w,_r as x,J as y,Tr as z,Sr as A};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{ea as c}from"./AI6DYOKR.js";function f(e,s,t){return{...e,status:s,summary:t}}function g(e){let s=Object.entries(e).filter(([t,n])=>t!=="agentExecutionContext"&&t!=="outputMessage"&&t!=="summary"&&t!=="status"&&n!==void 0);if(s.length!==0)try{return JSON.stringify(Object.fromEntries(s),null,2)}catch{return}}function m(e,s,t=[]){let n=s.safeParse(e);if(n.success){let u={...n.data},r=g(u),a=r??"LLMAgent produced structured output.",o=r??u.outputMessage,i={...u,...o?{outputMessage:o}:{},agentExecutionContext:{messages:[...t,new c(typeof o=="string"&&o.trim()?o:a)]}};return f(i,"success",a)}else throw new Error(`LLMAgent output schema validation failed: ${n.error.message}`)}function l(e,s){let t={outputMessage:e.outputMessage};if(s){let n=s.shape,u=e;for(let r of Object.keys(n??{}))r in e&&(t[r]=u[r])}return t}export{f as a,m as b,l as c};