@arcgis/ai-components 5.2.0-next.105 → 5.2.0-next.107

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 (304) hide show
  1. package/dist/agent-utils/BaseAgent.js +1 -1
  2. package/dist/agent-utils/FunctionAgent.js +1 -1
  3. package/dist/agent-utils/LLMAgent.js +42 -41
  4. package/dist/agent-utils/WorkflowAgent.js +1 -1
  5. package/dist/agent-utils/index.js +1 -1
  6. package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
  7. package/dist/agent-utils/middlewares/middleware.js +1 -1
  8. package/dist/agent-utils/middlewares/trace.js +6 -6
  9. package/dist/agent-utils/middlewares/types.js +1 -1
  10. package/dist/agent-utils/tools/FunctionTool.js +1 -1
  11. package/dist/agent-utils/workflows/ConditionalWorkflow.js +1 -1
  12. package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
  13. package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
  14. package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
  15. package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
  16. package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
  17. package/dist/agents/runtime/skill/createSkillAgent.d.ts +31 -0
  18. package/dist/agents/runtime/skill/createSkillAgent.js +260 -0
  19. package/dist/agents/runtime/skill/loadAgentSkills.d.ts +16 -0
  20. package/dist/agents/runtime/skill/types.d.ts +28 -0
  21. package/dist/agents/runtime/skill/types.js +2 -0
  22. package/dist/agents/tools/filter/clearFilters/adapter.js +1 -1
  23. package/dist/agents/tools/filter/resetMap/adapter.js +1 -1
  24. package/dist/agents/tools/filter/setFeatureEffect/adapter.js +21 -20
  25. package/dist/agents/tools/help/listFields/adapter.js +1 -1
  26. package/dist/agents/tools/navigation/goToAddress/adapter.js +1 -1
  27. package/dist/agents/tools/navigation/goToBookmark/adapter.js +1 -1
  28. package/dist/agents/tools/navigation/goToFeatures/adapter.js +1 -1
  29. package/dist/agents/tools/navigation/goToFullExtent/adapter.js +1 -1
  30. package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +1 -1
  31. package/dist/agents/tools/navigation/goToLayer/adapter.js +1 -1
  32. package/dist/agents/tools/navigation/goToScale/adapter.js +1 -1
  33. package/dist/agents/tools/navigation/goToViewpoint/adapter.js +1 -1
  34. package/dist/agents/tools/navigation/goToZoom/adapter.js +1 -1
  35. package/dist/agents/tools/query/getAttribute/adapter.js +1 -1
  36. package/dist/agents/tools/query/getStatistics/adapter.js +5 -4
  37. package/dist/agents/tools/query/getTopFeatures/adapter.js +5 -4
  38. package/dist/agents/tools/query/queryFeatures/adapter.js +5 -4
  39. package/dist/agents/tools/search/findRelevantFields/adapter.js +1 -1
  40. package/dist/agents/tools/search/findRelevantLayers/adapter.js +1 -1
  41. package/dist/agents/tools/shared/resolveToolArtifact.d.ts +22 -0
  42. package/dist/agents/tools/shared/resolveToolArtifact.js +20 -0
  43. package/dist/agents/tools/shared/types.d.ts +22 -0
  44. package/dist/agents/tools/shared/types.js +6 -0
  45. package/dist/cdn/25MBI4PD.js +2 -0
  46. package/dist/cdn/{LLUGJKAQ.js → 275FFTBE.js} +2 -2
  47. package/dist/cdn/2F4TPWZQ.js +2 -0
  48. package/dist/cdn/{HKOGIZDQ.js → 2LVYAXHG.js} +19 -19
  49. package/dist/cdn/{5MK44FNO.js → 2NRCE53B.js} +2 -2
  50. package/dist/cdn/{R2PQVY4O.js → 2WXXSZP5.js} +2 -2
  51. package/dist/cdn/{APFZY4PI.js → 3KNLFIM3.js} +2 -2
  52. package/dist/cdn/{NNXISHCA.js → 3PPXAIRE.js} +3 -3
  53. package/dist/cdn/{FUF3NAU7.js → 45BDE3MG.js} +2 -2
  54. package/dist/cdn/{VOKXKU7M.js → 477I66FH.js} +10 -10
  55. package/dist/cdn/4CFCV47G.js +2 -0
  56. package/dist/cdn/{TPULIO6I.js → 4IWDBEMN.js} +2 -2
  57. package/dist/cdn/{G2EGT3CF.js → 4OI4QEV7.js} +2 -2
  58. package/dist/cdn/{2W7LK4HA.js → 4UAREC76.js} +2 -2
  59. package/dist/cdn/{HHFNQR6Z.js → 4VBOTWC3.js} +2 -2
  60. package/dist/cdn/{RLEHNAIA.js → 4YOG5F3W.js} +1 -1
  61. package/dist/cdn/5X23DDDZ.js +2 -0
  62. package/dist/cdn/65ZACLYB.js +2 -0
  63. package/dist/cdn/{HDACNIZF.js → 6KWGSXIN.js} +2 -2
  64. package/dist/cdn/{O4NVW75A.js → 6MRTZ4OM.js} +2 -2
  65. package/dist/cdn/{DKZYPPJV.js → 77NAJM5H.js} +2 -2
  66. package/dist/cdn/{NEV6OZN3.js → 7DOYUO7L.js} +2 -2
  67. package/dist/cdn/{EYOWRGDP.js → 7JJX6VGI.js} +2 -2
  68. package/dist/cdn/{ONQ6JSBJ.js → A6LBMS7A.js} +1 -1
  69. package/dist/cdn/{ZDV4K4WG.js → AP3KPOHN.js} +2 -2
  70. package/dist/cdn/AUCKEB52.js +2 -0
  71. package/dist/cdn/B3HXSEBN.js +2 -0
  72. package/dist/cdn/{6ECRQVHY.js → BAKJLCYO.js} +2 -2
  73. package/dist/cdn/BJMGT6GV.js +19 -0
  74. package/dist/cdn/{HAEFC2SJ.js → BTOBEN7Q.js} +2 -2
  75. package/dist/cdn/BTTCBEPW.js +2 -0
  76. package/dist/cdn/{UZLQALHY.js → BVUCNXC5.js} +1 -1
  77. package/dist/cdn/{RFVZ7KCG.js → CAOMMQSY.js} +1 -1
  78. package/dist/cdn/{P4GFYBBO.js → CBYBFBD3.js} +2 -2
  79. package/dist/cdn/{VLLZ2FFU.js → CKUUYQLO.js} +2 -2
  80. package/dist/cdn/{MWYBF3F3.js → CSE6BHOJ.js} +2 -2
  81. package/dist/cdn/{7BCQMK6D.js → CX2HJ67C.js} +2 -2
  82. package/dist/cdn/EELMDCPV.js +2 -0
  83. package/dist/cdn/{7VUSIGEM.js → EGRRZTF6.js} +2 -2
  84. package/dist/cdn/EHYDAEGL.js +2 -0
  85. package/dist/cdn/{C4JT4S5E.js → EK3PM4L5.js} +2 -2
  86. package/dist/cdn/{PYGX4HN7.js → ENAEE4UU.js} +2 -2
  87. package/dist/cdn/EXMEB4X2.js +2 -0
  88. package/dist/cdn/{FG647IP6.js → EYGZJKVD.js} +2 -2
  89. package/dist/cdn/{4RDNI22D.js → FK2CVSXW.js} +5 -5
  90. package/dist/cdn/FLUI6GCU.js +2 -0
  91. package/dist/cdn/{ZU2FHVNK.js → FPH52WOH.js} +2 -2
  92. package/dist/cdn/FRYS2PZJ.js +2 -0
  93. package/dist/cdn/FSLQCZRN.js +2 -0
  94. package/dist/cdn/{PQ2DPOFM.js → FTTLFIBV.js} +2 -2
  95. package/dist/cdn/{NZSOJ726.js → FV6FHLYW.js} +2 -2
  96. package/dist/cdn/{WGO5SER7.js → G24MNC7D.js} +2 -2
  97. package/dist/cdn/{6OOZSZRJ.js → GN56DOYL.js} +2 -2
  98. package/dist/cdn/{ROQGPAR5.js → HIJGY4GU.js} +2 -2
  99. package/dist/cdn/{BL273EGZ.js → HMMYCSOK.js} +2 -2
  100. package/dist/cdn/{OE3GW5LE.js → HNTSDY3J.js} +2 -2
  101. package/dist/cdn/HQOK6DDH.js +2 -0
  102. package/dist/cdn/{K2R6XVK3.js → HV7MVIQV.js} +2 -2
  103. package/dist/cdn/I3SUE2TR.js +2 -0
  104. package/dist/cdn/{VAXH6RUQ.js → I72ST4JR.js} +2 -2
  105. package/dist/cdn/{FYZATVB3.js → IHUWQOMK.js} +2 -2
  106. package/dist/cdn/{J6A4AS7E.js → JMXXRRKQ.js} +2 -2
  107. package/dist/cdn/{5HBAJ57P.js → JPXEMNPR.js} +2 -2
  108. package/dist/cdn/{UHEYPSOR.js → JYNHWJUZ.js} +2 -2
  109. package/dist/cdn/KAX4A7SF.js +2 -0
  110. package/dist/cdn/{5ZFUGNRN.js → KBSXHSBX.js} +2 -2
  111. package/dist/cdn/{CCC6LBMY.js → KKCLHXHG.js} +1 -1
  112. package/dist/cdn/L2HLFWCV.js +72 -0
  113. package/dist/cdn/{LK7ZIQW6.js → L3BTURBA.js} +2 -2
  114. package/dist/cdn/{IBZ2NEAO.js → LBTGOMCT.js} +2 -2
  115. package/dist/cdn/{34O57OGV.js → LLY5A2E2.js} +1 -1
  116. package/dist/cdn/{Z5W4V7RC.js → LXIKAXUT.js} +2 -2
  117. package/dist/cdn/{AI6DYOKR.js → M2U456J5.js} +3 -3
  118. package/dist/cdn/{KWD2ECTM.js → M3KKORBG.js} +2 -2
  119. package/dist/cdn/M5B6X46F.js +2 -0
  120. package/dist/cdn/{SDWWUWAF.js → MZUDIQQH.js} +2 -2
  121. package/dist/cdn/{CEKOEHB3.js → NNPA3NLK.js} +2 -2
  122. package/dist/cdn/{MXTXJKFE.js → NPWLYHMU.js} +2 -2
  123. package/dist/cdn/NV7CL4S3.js +2 -0
  124. package/dist/cdn/{3UEKINYC.js → OALQBAZR.js} +2 -2
  125. package/dist/cdn/{RHYNE5OE.js → OF3TAARW.js} +1 -1
  126. package/dist/cdn/{F5NIRETW.js → P53TDER7.js} +2 -2
  127. package/dist/cdn/{SXM4NUT5.js → PJLGCS33.js} +2 -2
  128. package/dist/cdn/{BXQ4I5HB.js → PJPP6LOS.js} +3 -3
  129. package/dist/cdn/PUZ6RAFQ.js +2 -0
  130. package/dist/cdn/{IHP25JWI.js → QAX6UF4L.js} +2 -2
  131. package/dist/cdn/{JEBRN3EU.js → QTEPFTAU.js} +2 -2
  132. package/dist/cdn/ROS22KOA.js +2 -0
  133. package/dist/cdn/RPOFBIE7.js +2 -0
  134. package/dist/cdn/{COH3QXWG.js → S5GFNIHC.js} +3 -3
  135. package/dist/cdn/SBNNJ5WA.js +2 -0
  136. package/dist/cdn/SI22EJLC.js +2 -0
  137. package/dist/cdn/{5WYRJMBW.js → SJMAKF4P.js} +2 -2
  138. package/dist/cdn/{6P44KOKX.js → SKCUGZ7G.js} +2 -2
  139. package/dist/cdn/{V6HOUZPZ.js → SNG3WODY.js} +2 -2
  140. package/dist/cdn/{22KHSDJI.js → STOGCXJH.js} +2 -2
  141. package/dist/cdn/SUC2MIGE.js +2 -0
  142. package/dist/cdn/SXYKNDOF.js +2 -0
  143. package/dist/cdn/SZ2L5556.js +2 -0
  144. package/dist/cdn/{Y7XD7ZRD.js → T6W6F4TF.js} +2 -2
  145. package/dist/cdn/{WKTQVBFJ.js → TFAJNKBC.js} +2 -2
  146. package/dist/cdn/{R74ZHFA6.js → TLPZELG3.js} +1 -1
  147. package/dist/cdn/{2O4DON37.js → TNLFUXIB.js} +2 -2
  148. package/dist/cdn/{YEZ3AMNX.js → TXZQZR3I.js} +2 -2
  149. package/dist/cdn/UGIHS7OA.js +2 -0
  150. package/dist/cdn/{UDRKUVZP.js → UX457AQR.js} +2 -2
  151. package/dist/cdn/{ICBIUFK7.js → V266DJ5V.js} +2 -2
  152. package/dist/cdn/{FDOMMK2M.js → V4PJMCJZ.js} +1 -1
  153. package/dist/cdn/{7VAQUCBU.js → V52GSTOC.js} +2 -2
  154. package/dist/cdn/VGLBH473.js +2 -0
  155. package/dist/cdn/{WSWB3B7B.js → VHNTHPH7.js} +2 -2
  156. package/dist/cdn/{KITIP6J2.js → VK6CCPTG.js} +2 -2
  157. package/dist/cdn/{AOVJ34QE.js → VLPELJUS.js} +2 -2
  158. package/dist/cdn/VT5EWFH7.js +2 -0
  159. package/dist/cdn/{J6SZIQJA.js → VXLKTQ36.js} +2 -2
  160. package/dist/cdn/W54XYT2A.js +2 -0
  161. package/dist/cdn/{7SRLZQVC.js → X42ACC66.js} +2 -2
  162. package/dist/cdn/{CP5BVGJU.js → XNUWVZN7.js} +2 -2
  163. package/dist/cdn/XOTPSCNF.js +2 -0
  164. package/dist/cdn/XRVGYRXL.js +14 -0
  165. package/dist/cdn/{ANRQWYU2.js → XV7RMYLR.js} +2 -2
  166. package/dist/cdn/{5K5ZY267.js → XVJFPZTW.js} +2 -2
  167. package/dist/cdn/XZF7Y6B2.js +2 -0
  168. package/dist/cdn/Y4ZOB6UH.js +2 -0
  169. package/dist/cdn/Y6CV2NZR.js +2 -0
  170. package/dist/cdn/YMJKT5OK.js +2 -0
  171. package/dist/cdn/{655YIKL3.js → YOW3YKWR.js} +3 -3
  172. package/dist/cdn/{OKVLGJAG.js → ZA7ZU2F7.js} +2 -2
  173. package/dist/cdn/{EWLXNGKH.js → ZJWR4W2S.js} +16 -16
  174. package/dist/cdn/ZWIKFBOU.js +2 -0
  175. package/dist/cdn/ZY3JQCZQ.js +179 -0
  176. package/dist/cdn/agent-utils/index.js +2 -2
  177. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -2
  178. package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
  179. package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
  180. package/dist/cdn/index.js +2 -2
  181. package/dist/chunks/BaseWorkflow.js +1 -1
  182. package/dist/chunks/SKILL.js +5 -0
  183. package/dist/chunks/SKILL2.js +5 -0
  184. package/dist/chunks/SKILL3.js +22 -0
  185. package/dist/chunks/SKILL4.js +5 -0
  186. package/dist/chunks/adapter.js +138 -141
  187. package/dist/chunks/aiFactory.js +94 -0
  188. package/dist/chunks/arcgisKnowledgeGraph.js +15 -14
  189. package/dist/chunks/arcgisToolRegistry.js +88 -0
  190. package/dist/chunks/arcgis_knowledge_current_lc_context.js +1 -1
  191. package/dist/chunks/arcgis_knowledge_current_map_context.js +1 -1
  192. package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +1 -1
  193. package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
  194. package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +1 -1
  195. package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
  196. package/dist/chunks/baseAgentState.js +3 -3
  197. package/dist/chunks/converterUtils.js +1 -1
  198. package/dist/chunks/dataExplorationAgent.js +19 -0
  199. package/dist/chunks/data_explore_filter_prompt.js +1 -1
  200. package/dist/chunks/data_explore_query_prompt.js +1 -1
  201. package/dist/chunks/embeddings.worker.js +1 -1
  202. package/dist/chunks/fetchAgentContext.js +1 -1
  203. package/dist/chunks/fetchService.js +1 -1
  204. package/dist/chunks/fieldStatistics.js +1 -1
  205. package/dist/chunks/field_descriptions_prompt.js +1 -1
  206. package/dist/chunks/formatFeatureAttributes.js +1 -1
  207. package/dist/chunks/generateLayerDescriptions.js +182 -269
  208. package/dist/chunks/graph.js +1 -1
  209. package/dist/chunks/helpAgent.js +34 -0
  210. package/dist/chunks/help_prompt.js +1 -1
  211. package/dist/chunks/index.js +1 -1
  212. package/dist/chunks/intent_prompt.js +1 -1
  213. package/dist/chunks/layerStylingGraph.js +92 -77
  214. package/dist/chunks/layer_descriptions_prompt.js +1 -1
  215. package/dist/chunks/layer_styling_prompt.js +1 -1
  216. package/dist/chunks/mergeWhereClauses.js +1 -1
  217. package/dist/chunks/navigationAgent.js +27 -0
  218. package/dist/chunks/navigation_intent_prompt.js +1 -1
  219. package/dist/chunks/navigation_tool_prompt.js +1 -1
  220. package/dist/chunks/orchestrator.js +14 -13
  221. package/dist/chunks/requireAgentServices.js +11 -0
  222. package/dist/chunks/resolvePointGeometryFilter.js +12 -12
  223. package/dist/chunks/runtime.js +2 -2
  224. package/dist/chunks/slottableRequestUtils.js +1 -1
  225. package/dist/chunks/state.js +1 -1
  226. package/dist/chunks/summarize_query_response_prompt.js +1 -1
  227. package/dist/chunks/useT9n.js +1 -1
  228. package/dist/chunks/utils.js +1 -1
  229. package/dist/chunks/utils2.js +1 -1
  230. package/dist/chunks/utils3.js +1 -1
  231. package/dist/components/arcgis-assistant/customElement.js +1 -1
  232. package/dist/components/arcgis-assistant-agent/customElement.js +130 -212
  233. package/dist/components/arcgis-assistant-chat/customElement.js +1 -1
  234. package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
  235. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +18 -7
  236. package/dist/components/arcgis-assistant-help-agent/customElement.js +4 -2
  237. package/dist/components/arcgis-assistant-interrupt/customElement.js +1 -1
  238. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +1 -1
  239. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +2 -1
  240. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +2 -1
  241. package/dist/components/arcgis-assistant-message/customElement.js +1 -1
  242. package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
  243. package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
  244. package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
  245. package/dist/components/arcgis-assistant-message-loading/customElement.js +1 -1
  246. package/dist/components/arcgis-assistant-message-log/customElement.js +1 -1
  247. package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +1 -1
  248. package/dist/components/arcgis-assistant-message-text/customElement.js +1 -1
  249. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +19 -8
  250. package/dist/components/arcgis-assistant-speech-input/customElement.js +1 -1
  251. package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
  252. package/dist/components/arcgis-assistant-user-message/customElement.js +1 -1
  253. package/dist/docs/api.json +1 -1
  254. package/dist/docs/docs.json +1 -1
  255. package/dist/docs/web-types.json +1 -1
  256. package/dist/index.js +1 -1
  257. package/dist/loader.js +1 -1
  258. package/dist/orchestrator/models/types.d.ts +1 -0
  259. package/dist/orchestrator/providers/arcgis/aiFactory.d.ts +15 -0
  260. package/dist/orchestrator/registry/agentRegistry.d.ts +33 -0
  261. package/dist/orchestrator/types/types.d.ts +17 -0
  262. package/dist/utils/index.d.ts +13 -3
  263. package/dist/utils/index.js +707 -83
  264. package/package.json +9 -5
  265. package/dist/cdn/2EY3BQQX.js +0 -2
  266. package/dist/cdn/2NDBI2VA.js +0 -156
  267. package/dist/cdn/434TAA3J.js +0 -2
  268. package/dist/cdn/4OGR5QKS.js +0 -2
  269. package/dist/cdn/5X7EG7D2.js +0 -2
  270. package/dist/cdn/6FCU2KJP.js +0 -2
  271. package/dist/cdn/7BJ4JKLG.js +0 -2
  272. package/dist/cdn/7HS5KX3J.js +0 -2
  273. package/dist/cdn/7UUYJTKT.js +0 -2
  274. package/dist/cdn/7V6OSTFC.js +0 -2
  275. package/dist/cdn/7VYYQ7BT.js +0 -2
  276. package/dist/cdn/ACJTJLZN.js +0 -2
  277. package/dist/cdn/AKD5UOVX.js +0 -2
  278. package/dist/cdn/C7LGDNB3.js +0 -14
  279. package/dist/cdn/CGJINV7H.js +0 -2
  280. package/dist/cdn/CJMUJXPL.js +0 -2
  281. package/dist/cdn/D2SS763Z.js +0 -2
  282. package/dist/cdn/FJO4KNOZ.js +0 -2
  283. package/dist/cdn/G3SF6U2U.js +0 -2
  284. package/dist/cdn/G6CR7JVM.js +0 -22
  285. package/dist/cdn/GL7BPKBN.js +0 -2
  286. package/dist/cdn/JO5ETMPS.js +0 -2
  287. package/dist/cdn/NYJYRCGA.js +0 -2
  288. package/dist/cdn/PUHRBGKB.js +0 -2
  289. package/dist/cdn/Q57QWN5W.js +0 -2
  290. package/dist/cdn/QUKNPVAF.js +0 -2
  291. package/dist/cdn/RBE55SWR.js +0 -2
  292. package/dist/cdn/SWH6ZHD4.js +0 -18
  293. package/dist/cdn/SZ2QSSB3.js +0 -2
  294. package/dist/cdn/T4RIGOXB.js +0 -2
  295. package/dist/cdn/VXFQANGJ.js +0 -2
  296. package/dist/cdn/W4JQDITQ.js +0 -36
  297. package/dist/cdn/XX6GHMNR.js +0 -2
  298. package/dist/cdn/YLVJA4ZE.js +0 -2
  299. package/dist/cdn/ZOEMBHRF.js +0 -2
  300. package/dist/cdn/ZRVZMPFN.js +0 -2
  301. package/dist/chunks/dataExplorationGraph.js +0 -254
  302. package/dist/chunks/helpGraph.js +0 -133
  303. package/dist/chunks/navigationGraph.js +0 -290
  304. package/dist/chunks/toolCallResponse.js +0 -33
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
2
  var d=(...o)=>{let t=[];for(let n=0;n<o.length;++n){let s=o[n];if(typeof s=="string")t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if(typeof s=="object")for(let a in s)s[a]&&t.push(a)}let e=t.join(" ");return t.length=0,e},u=(o,t)=>{let e=o;for(;e;){if(e===t)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},g=(o,t,e)=>{let n=m(t).subscribe;return n(s=>{s.some(r=>u(o,r.target))&&e()})},l={},m=o=>{let t=o.join(","),e=l[t];if(e!==void 0)return e;let n=new Set,s=new MutationObserver(r=>n.forEach(c=>c(r)));globalThis.document&&s.observe(document.documentElement,{attributes:!0,attributeFilter:o,subtree:!0});let a={subscribe:r=>(n.add(r),()=>{n.delete(r),n.size===0&&(s.disconnect(),l[t]=void 0)})};return l[t]=a,a},i=(o,t)=>{let e=o;for(;e;){let n=e.closest?.(t);if(n)return n;let s=e.getRootNode?.();if(s===globalThis.document)return;e=s?.host}};var h=(o,t,e)=>i(o,`[${t}]`)?.getAttribute(t)??e;export{d as a,g as b,i as c,h as d};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{Dd as o}from"./CSE6BHOJ.js";var r=o;export{r as a};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import p from"./4CFCV47G.js";import n from"./ZY3JQCZQ.js";import{a as o,c as m}from"./SNG3WODY.js";import"./M5B6X46F.js";import l from"./VK6CCPTG.js";import"./LXIKAXUT.js";import k from"./M3KKORBG.js";import j from"./3PPXAIRE.js";import h from"./XVJFPZTW.js";import g from"./YOW3YKWR.js";import f from"./KKCLHXHG.js";import"./LLY5A2E2.js";import"./X42ACC66.js";import"./V4PJMCJZ.js";import e from"./EK3PM4L5.js";import"./T6W6F4TF.js";import"./CKUUYQLO.js";import d from"./KBSXHSBX.js";import"./275FFTBE.js";import"./TFAJNKBC.js";import"./HV7MVIQV.js";import"./OALQBAZR.js";import"./4YOG5F3W.js";import c from"./2LVYAXHG.js";import"./4OI4QEV7.js";import"./SJMAKF4P.js";import"./TXZQZR3I.js";import b from"./STOGCXJH.js";import a from"./VGLBH473.js";import"./A6LBMS7A.js";import{v as i,z as r}from"./S5GFNIHC.js";import"./TLPZELG3.js";import"./V52GSTOC.js";import"./477I66FH.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([,,,,,,,,,,,,,,,,,,,,,,p])=>{var t=class extends i{constructor(){super(...arguments),this.agent=p}static{this.properties={referenceElement:1}}#t;#i;getContext(){if(!this.#t)throw new Error("arcgis-assistant-navigation-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=o(this,"arcgis-assistant-navigation-agent"),this.#i=m(this)}disconnectedCallback(){this.#i?.unregister(this.agent.id),super.disconnectedCallback()}};r("arcgis-assistant-navigation-agent",t);return t},"identity/IdentityManager","portal/Portal","request","config","core/reactiveUtils","layers/FeatureLayer","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/knowledgeGraphService",a,b,c,d,e,f,g,h,j,k,l,n,p)
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./ANRQWYU2.js";import"./R2PQVY4O.js";import"./G2EGT3CF.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([{property:g,subclass:y},{c:p,d:w}])=>{var b=Object.defineProperty,k=Object.getOwnPropertyDescriptor,v=e=>{throw TypeError(e)},h=(e,t,r,s)=>{for(var n=s>1?void 0:s?k(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(n=(s?a(t,r,n):a(n))||n);return s&&n&&b(t,r,n),n},A=(e,t,r)=>t.has(e)||v("Cannot "+r),M=(e,t,r)=>t.has(e)?v("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),m=(e,t,r)=>(A(e,t,"access private method"),r),c,u,i=class extends w{constructor(e){super(e),M(this,c)}getAgents(){let e=Object.values(this.agentsMap);return this.defaultAgent?e.concat(this.defaultAgent):e}buildNodes(e){let t=super.buildNodes(e);return t[d]=()=>({}),t}buildEdges(e){m(this,c,u).call(this);let t=this.resolver,r=new Map;for(let[o,[a]]of Object.entries(this.agentsMap).entries())r.set(a,p(e[o],o));let{defaultAgent:s}=this,n=s?p(s,e.length-1):void 0;return[{from:d,decide:async(o,a)=>{let l=await Promise.resolve(t(o,a));if(!l)return;let f=r.get(l);if(f)return f;if(s)return n;throw new Error(`SwitchWorkflow resolver returned unknown case: ${l}. Expected one of: ${Object.keys(this.agentsMap).join(", ")||"(none)"}.`)}}]}getEntryNode(){return d}isTerminalAgent(){return!0}validateAgents(e){m(this,c,u).call(this),super.validateAgents(e)}};c=new WeakSet;u=function(){if(!Object.keys(this.agentsMap).length)throw new Error("SwitchWorkflow requires a non-empty agentsMap.")};h([g()],i.prototype,"agentsMap",2);h([g()],i.prototype,"resolver",2);h([g()],i.prototype,"defaultAgent",2);i=h([y("SwitchWorkflow")],i);var d="__switch_decide";return i},"core/accessorSupport/decorators",a)
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import a from"./XV7RMYLR.js";import"./2WXXSZP5.js";import"./4OI4QEV7.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([{property:g,subclass:y},{c:p,d:w}])=>{var b=Object.defineProperty,k=Object.getOwnPropertyDescriptor,v=e=>{throw TypeError(e)},h=(e,t,r,s)=>{for(var n=s>1?void 0:s?k(t,r):t,o=e.length-1,a;o>=0;o--)(a=e[o])&&(n=(s?a(t,r,n):a(n))||n);return s&&n&&b(t,r,n),n},A=(e,t,r)=>t.has(e)||v("Cannot "+r),M=(e,t,r)=>t.has(e)?v("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),m=(e,t,r)=>(A(e,t,"access private method"),r),c,u,i=class extends w{constructor(e){super(e),M(this,c)}getAgents(){let e=Object.values(this.agentsMap);return this.defaultAgent?e.concat(this.defaultAgent):e}buildNodes(e){let t=super.buildNodes(e);return t[d]=()=>({}),t}buildEdges(e){m(this,c,u).call(this);let t=this.resolver,r=new Map;for(let[o,[a]]of Object.entries(this.agentsMap).entries())r.set(a,p(e[o],o));let{defaultAgent:s}=this,n=s?p(s,e.length-1):void 0;return[{from:d,decide:async(o,a)=>{let l=await Promise.resolve(t(o,a));if(!l)return;let f=r.get(l);if(f)return f;if(s)return n;throw new Error(`SwitchWorkflow resolver returned unknown case: ${l}. Expected one of: ${Object.keys(this.agentsMap).join(", ")||"(none)"}.`)}}]}getEntryNode(){return d}isTerminalAgent(){return!0}validateAgents(e){m(this,c,u).call(this),super.validateAgents(e)}};c=new WeakSet;u=function(){if(!Object.keys(this.agentsMap).length)throw new Error("SwitchWorkflow requires a non-empty agentsMap.")};h([g()],i.prototype,"agentsMap",2);h([g()],i.prototype,"resolver",2);h([g()],i.prototype,"defaultAgent",2);i=h([y("SwitchWorkflow")],i);var d="__switch_decide";return i},"core/accessorSupport/decorators",a)
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as n}from"./6OOZSZRJ.js";import"./RLEHNAIA.js";import{g as i,h as a,v as t,z as e}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var r=i`:host{display:contents}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.loading-container{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);padding:0 var(--calcite-spacing-sm)}.loading{display:flex;align-items:center;gap:var(--calcite-spacing-sm)}.text{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}.skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.skeleton-text{display:block;height:.95em;border-radius:var(--calcite-border-radius);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 1.2s ease-in-out infinite;width:85%}.skeleton-text:last-child{width:70%}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.skeleton-text{animation:none}}`,s=class extends t{constructor(){super(...arguments),this._messages=n({blocking:!0}),this.loading=!1,this.loadingMessage="",this.assistantAvatarEnabled=!1}static{this.properties={loading:5,loadingMessage:1,assistantAvatarEnabled:5,interrupts:0}}static{this.styles=r}render(){return this.loading?a`<arcgis-assistant-message .assistantAvatarEnabled=${this.assistantAvatarEnabled} footer-disabled>${this.assistantAvatarEnabled?a`<slot name=icon slot=icon><calcite-icon class="icon" icon=effects scale=s></calcite-icon></slot>`:null}<slot name=content slot=content><arcgis-assistant-interrupt-preview .interrupts=${this.interrupts}></arcgis-assistant-interrupt-preview><div class="loading-container"><div class="loading"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader><div class="text">${this.loadingMessage}</div></div><div class="skeleton-block"><span class="skeleton-text"></span><span class="skeleton-text"></span></div></div></slot></arcgis-assistant-message>`:null}};e("arcgis-assistant-message-loading",s);export{s as ArcgisAssistantMessageLoading};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{b as n}from"./GN56DOYL.js";import"./4YOG5F3W.js";import{g as i,h as a,v as t,z as e}from"./S5GFNIHC.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";var r=i`:host{display:contents}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.loading-container{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);padding:0 var(--calcite-spacing-sm)}.loading{display:flex;align-items:center;gap:var(--calcite-spacing-sm)}.text{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}.skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.skeleton-text{display:block;height:.95em;border-radius:var(--calcite-border-radius);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 1.2s ease-in-out infinite;width:85%}.skeleton-text:last-child{width:70%}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.skeleton-text{animation:none}}`,s=class extends t{constructor(){super(...arguments),this._messages=n({blocking:!0}),this.loading=!1,this.loadingMessage="",this.assistantAvatarEnabled=!1}static{this.properties={loading:5,loadingMessage:1,assistantAvatarEnabled:5,interrupts:0}}static{this.styles=r}render(){return this.loading?a`<arcgis-assistant-message .assistantAvatarEnabled=${this.assistantAvatarEnabled} footer-disabled>${this.assistantAvatarEnabled?a`<slot name=icon slot=icon><calcite-icon class="icon" icon=effects scale=s></calcite-icon></slot>`:null}<slot name=content slot=content><arcgis-assistant-interrupt-preview .interrupts=${this.interrupts}></arcgis-assistant-interrupt-preview><div class="loading-container"><div class="loading"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader><div class="text">${this.loadingMessage}</div></div><div class="skeleton-block"><span class="skeleton-text"></span><span class="skeleton-text"></span></div></div></slot></arcgis-assistant-message>`:null}};e("arcgis-assistant-message-loading",s);export{s as ArcgisAssistantMessageLoading};
@@ -1,3 +1,3 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./BXQ4I5HB.js";import{a as I}from"./RFVZ7KCG.js";import{a as $}from"./434TAA3J.js";import{b as D}from"./6OOZSZRJ.js";import{a as M}from"./3UEKINYC.js";import"./RLEHNAIA.js";import a from"./HKOGIZDQ.js";import"./G2EGT3CF.js";import{g as C,h,k as A,l as P,n as g,t as v,u as f,v as T,x as y,z as L}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./7VAQUCBU.js";import"./VOKXKU7M.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([B,{whenOnce:q,watch:V,when:j},F,,N,,,H,{property:b,subclass:W},,{b:R}])=>{var G=C`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%);--calcite-panel-content-bottom-space: 0}.footer-container{display:flex;flex-direction:column;flex:1 1 0;gap:var(--calcite-spacing-md)}.content-container{display:flex;flex-direction:column;flex:1 1 0;min-height:0;position:relative;overflow:auto}.suggested-prompts-container{display:flex;justify-content:center;width:100%;background:var(--calcite-panel-background-color, var(--calcite-color-background))}.suggested-prompts{display:block;padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}.error-notice{padding:var(--calcite-spacing-sm)}.interrupt-waiting-message{font-style:italic;color:var(--calcite-color-text-2)}`;function x(o){return o.trim()?I.lexer(o).filter(t=>t.type!=="space").map(t=>I.parser([t])):[]}var w=class{constructor(){this._stableParts=[],this._stableText="",this._rawText=""}push(t){return this._rawText+=t,this._advanceStableBoundary(),this.getParts()}finalize(){let t=this._rawText.slice(this._stableText.length);return t.trim()&&(this._stableParts.push(...x(t)),this._stableText=this._rawText),this._stableParts}getParts(){let t=this._trimIncompleteTail(this._rawText.slice(this._stableText.length)),e=t.trim()?x(t):[];return[...this._stableParts,...e]}reset(){this._stableParts=[],this._stableText="",this._rawText=""}_advanceStableBoundary(){let t=this._rawText.slice(this._stableText.length),e=this._lastSafeBoundary(t);if(e<=0)return;let i=t.slice(0,e);this._stableParts.push(...x(i)),this._stableText+=i}_lastSafeBoundary(t){let e=t.split(`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as I}from"./CAOMMQSY.js";import b from"./PJPP6LOS.js";import{a as $}from"./B3HXSEBN.js";import{b as D}from"./GN56DOYL.js";import{a as M}from"./OALQBAZR.js";import"./4YOG5F3W.js";import a from"./2LVYAXHG.js";import"./4OI4QEV7.js";import{g as C,h,k as A,l as P,n as g,t as v,u as f,v as T,x as y,z as L}from"./S5GFNIHC.js";import"./TLPZELG3.js";import"./V52GSTOC.js";import"./477I66FH.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([B,{whenOnce:q,watch:V,when:j},F,,N,,,H,{property:b,subclass:W},,{b:R}])=>{var G=C`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%);--calcite-panel-content-bottom-space: 0}.footer-container{display:flex;flex-direction:column;flex:1 1 0;gap:var(--calcite-spacing-md)}.content-container{display:flex;flex-direction:column;flex:1 1 0;min-height:0;position:relative;overflow:auto}.suggested-prompts-container{display:flex;justify-content:center;width:100%;background:var(--calcite-panel-background-color, var(--calcite-color-background))}.suggested-prompts{display:block;padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}.error-notice{padding:var(--calcite-spacing-sm)}.interrupt-waiting-message{font-style:italic;color:var(--calcite-color-text-2)}`;function x(o){return o.trim()?I.lexer(o).filter(t=>t.type!=="space").map(t=>I.parser([t])):[]}var w=class{constructor(){this._stableParts=[],this._stableText="",this._rawText=""}push(t){return this._rawText+=t,this._advanceStableBoundary(),this.getParts()}finalize(){let t=this._rawText.slice(this._stableText.length);return t.trim()&&(this._stableParts.push(...x(t)),this._stableText=this._rawText),this._stableParts}getParts(){let t=this._trimIncompleteTail(this._rawText.slice(this._stableText.length)),e=t.trim()?x(t):[];return[...this._stableParts,...e]}reset(){this._stableParts=[],this._stableText="",this._rawText=""}_advanceStableBoundary(){let t=this._rawText.slice(this._stableText.length),e=this._lastSafeBoundary(t);if(e<=0)return;let i=t.slice(0,e);this._stableParts.push(...x(i)),this._stableText+=i}_lastSafeBoundary(t){let e=t.split(`
3
3
  `),i=!1,r=0,s=0;for(let l of e)/^\s*(```|~~~)/u.test(l)&&(i=!i),s+=l.length+1,l.trim()===""&&!i&&(r=s);return r<t.length?r:0}_trimIncompleteTail(t){let e=t.lastIndexOf("<");if(e!==-1&&!t.includes(">",e))return t.slice(0,e);let i=this._earliestUnclosedTag(t);if(i!==-1)return t.slice(0,i);let r=t.lastIndexOf("[");if(r!==-1){let s=t.slice(r);if(!/\[[^\]]*\]\([^)]*\)/u.test(s))return t.slice(0,r)}return t}_earliestUnclosedTag(t){let e=new Set(["br","img","hr","input","meta","link","area","base","col","embed","source","track","wbr"]),i=/<(\/?)([a-zA-Z][\w-]*)\b[^>]*?(\/?)>/gu,r=[];for(let s=i.exec(t);s;s=i.exec(t)){let[,l,a,n]=s,c=a.toLowerCase();if(!(e.has(c)||n==="/"))if(l==="/"){for(let d=r.length-1;d>=0;d--)if(r[d].name===c){r.splice(d);break}}else r.push({name:c,index:s.index})}return r.length?r[0].index:-1}};function Z(o){let t=new w;return t.push(o),t.finalize()}var J=async o=>await new Promise(t=>setTimeout(t,o));async function*K(o,{chunkSize:t=15,delay:e=50}={}){let i=new w;for(let r=0;r<o.length;r+=t)yield i.push(o.slice(r,r+t)),await J(e);yield i.finalize()}var Q=Object.defineProperty,X=Object.getOwnPropertyDescriptor,m=(o,t,e,i)=>{for(var r=i>1?void 0:i?X(t,e):t,s=o.length-1,l;s>=0;s--)(l=o[s])&&(r=(i?l(t,e,r):l(r))||r);return i&&r&&Q(t,e,r),r},U=o=>!o||typeof o!="object"?!1:o.name==="AbortError";async function*O(o,t,e,i,r=!1){if(r){if(i?.aborted){yield{type:"cancelled",log:e,runId:t};return}yield{type:"block-data",blockType:"text",data:{parts:Z(o)},runId:t};return}for await(let s of K(o)){if(i?.aborted){yield{type:"cancelled",log:e,runId:t};return}yield{type:"block-data",blockType:"text",data:{parts:s},runId:t}}}var p=class extends H{constructor(o){super(o),this.view=null,this.streamingDisabled=!1,this.runtimeEventsEnabled=!1,this.loading=!1,this.processing=!1,this.processingStep=""}async load(){this._set("loading",!0);try{await this._initialize()}finally{this._set("loading",!1)}}destroy(){this.orchestrator?.dispose(),super.destroy()}async _initialize(){this.removeHandles(),await Promise.all([this.portal.load(),this.view?.when()]),this.view&&await q(()=>!this.view.updating),this._set("orchestrator",await R.init({agents:[...this.agents],runtimeEventsEnabled:this.runtimeEventsEnabled,view:this.view??void 0})),this.addHandles([V(()=>[this.view,this.agents],()=>{this._initialize()})])}clearChatHistory(){this.orchestrator?.newConversation()}async*ask(o,t,e){if(!this.orchestrator)throw new Error("Orchestrator not initialized yet.");this._set("processing",!0),this._set("processingStep","");let i=[],r,s="pending";try{let l=this.orchestrator.ask(o,t);for await(let a of l)switch(s=a.runId,a.type){case"runtime":{yield{type:"runtime",event:a,runId:s};break}case"trace":{this._set("processingStep",a.data.text),i.push(a.data.text);break}case"completed":{this._set("processing",!1),this._set("processingStep","");let n=a.result,c=!!n.content.length,d=!!r?.length;if(!c&&!d){yield{type:"completed",error:"No response received.",log:i,runId:s};return}let u=n.content;if(yield{type:"block-start",blockType:"text",runId:s},yield*O(u,s,i,e,this.streamingDisabled),yield{type:"block-end",blockType:"text",runId:s},d)for(let k of r){if(e?.aborted){yield{type:"cancelled",log:i,runId:s};return}let{type:_,data:E}=k;if(yield{type:"block-start",blockType:_,runId:s},_==="text"){let z=typeof E?.content=="string"?E.content:"";yield*O(z,s,i,e,this.streamingDisabled)}else yield{type:"block-data",blockType:_,data:E,runId:s};yield{type:"block-end",blockType:_,runId:s}}yield{type:"completed",response:u,blocks:r,log:i,runId:s};return}case"ux-suggestion":{let n=a.suggestion;r=r?[...r,n]:[n];break}case"interrupt":{let{kind:n,message:c,metadata:d}=a.interrupt,u=Array.isArray(d)?d.filter(_=>typeof _=="string"):[],k=(()=>{switch(n){case"booleanChoice":return{type:"boolean-choice",message:c,options:u};case"singleSelection":return{type:"single-select",message:c,options:u};case"multipleSelection":return{type:"multi-select",message:c,options:u};case"textInput":return{type:"text-input",message:c};default:return{type:n,message:c,options:u}}})();this._set("processingStep","Waiting for user input..."),yield{type:"interrupt",payload:k,runId:s};break}case"cancelled":{yield{type:"cancelled",log:i,runId:s};return}case"error":{if(e?.aborted||U(a.error)){yield{type:"cancelled",log:i,runId:s};return}yield{type:"completed",error:a.error.message,log:i,runId:s};return}default:{console.warn("Unknown event type:",a);break}}}catch(l){if(e?.aborted||U(l)){yield{type:"cancelled",log:i,runId:s};return}console.warn("Error during message processing:",l),yield{type:"completed",error:"An error occurred during message processing.",log:i,runId:"error"};return}finally{this._set("processing",!1)}}cancel(){this.orchestrator?.cancel()}};m([b({readOnly:!0})],p.prototype,"orchestrator",2);m([b()],p.prototype,"agents",2);m([b()],p.prototype,"portal",2);m([b()],p.prototype,"view",2);m([b()],p.prototype,"streamingDisabled",2);m([b()],p.prototype,"runtimeEventsEnabled",2);m([b({readOnly:!0})],p.prototype,"loading",2);m([b({readOnly:!0})],p.prototype,"processing",2);m([b({readOnly:!0})],p.prototype,"processingStep",2);p=m([W("OrchestratorController")],p);var Y="Embeddings resource 'embeddings-v01.json' not found in the webmap portal item.",tt="Embeddings not found for this web map.",et="https://developers.arcgis.com/javascript/latest/agentic-apps/ai-webmap-setup/#embeddings",S=class extends T{constructor(){super(...arguments),this._messages=D({blocking:!0}),this.#t=v(),this.#o=v(),this.#s=v(),this.#e=null,this.#r=new Map,this.#i=F.getDefault(),this.#a=t=>{t.stopPropagation(),this.cancelInterrupt()},this.#n=t=>{t.stopPropagation();let e=t.detail;this.submitInterrupt(e)},this.#l=t=>{t.stopPropagation(),this.keepSuggestedPrompts||(this.suggestedPrompts=[]);let e=t.detail;this._inputValue="",this.arcgisSubmit.emit(e),this.submitMessage(e)},this.#c=t=>{if(this._canceling=!0,t.stopPropagation(),this.arcgisCancel.emit(),this._interrupt){this.orchestrator?.cancelInterrupt(),this._interrupt=null;return}this._orchestratorController?.cancel(),this.#e?.abort(),this.#e=null},this.#h=t=>{t.stopPropagation();let e=t.detail;this.arcgisFeedback.emit(e)},this.#d=t=>{t.stopPropagation();let e=t.detail;this._inputValue=e.prompt,this.arcgisPromptSelect.emit(e)},this.#u=t=>{this.arcgisSlottableRequest.emit(t.detail)},this._orchestratorController=null,this._interrupt=null,this._interruptDetails=[],this._error=null,this._inputValue="",this._isAnswering=!1,this._canceling=!1,this.messages=new B([]),this.referenceElement=null,this.suggestedPrompts=[],this.feedbackEnabled=!1,this.keepSuggestedPrompts=!1,this.streamingDisabled=!1,this.runtimeEventsEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.voiceInputEnabled=!1,this.readAloudEnabled=!1,this.assistantAvatarEnabled=!1,this.userAvatarEnabled=!1,this.arcgisCancel=g(),this.arcgisError=g(),this.arcgisFeedback=g(),this.arcgisInterrupt=g(),this.arcgisInterruptCancel=g(),this.arcgisInterruptSubmit=g(),this.arcgisPromptSelect=g(),this.arcgisReady=g(),this.arcgisResponse=g(),this.arcgisRuntime=g({bubbles:!1,composed:!1}),this.arcgisSlottableRequest=g({bubbles:!1,composed:!1}),this.arcgisSubmit=g()}static{this.properties={_orchestratorController:16,_interrupt:16,_interruptDetails:16,_error:16,_inputValue:16,_isAnswering:16,_signedInUserId:16,_canceling:16,_isSignedIn:16,_user:16,awaitingResponse:32,awaitingResponseStep:32,interrupt:32,messages:0,orchestrator:32,entryMessage:1,heading:1,description:1,referenceElement:1,alwaysUseAgentId:1,allowedAgentIds:0,suggestedPrompts:0,feedbackEnabled:5,keepSuggestedPrompts:5,streamingDisabled:5,runtimeEventsEnabled:5,logEnabled:5,copyEnabled:5,voiceInputEnabled:5,readAloudEnabled:5,assistantAvatarEnabled:5,userAvatarEnabled:5}}static{this.styles=G}#t;#o;#s;#e;#r;#i;#a;#n;#l;#c;#h;#d;#u;get _isSignedIn(){return!!this.#i?.user||!!this._signedInUserId}get _user(){return this.#i?.user?.fullName||this.#i?.user?.username}get awaitingResponse(){return this._orchestratorController?.processing??!1}get awaitingResponseStep(){return this._orchestratorController?.processingStep??""}get interrupt(){return this._interrupt}get orchestrator(){return this._orchestratorController?.orchestrator}cancelInterrupt(){this.arcgisInterruptCancel.emit(),this.orchestrator?.cancelInterrupt(),this._interrupt=null}async clearChatHistory(){this._reset(),this._orchestratorController?.clearChatHistory()}register(t){this.#r.set(t.agent.id,t),this._orchestratorController&&this.#g()}submitInterrupt(t){this.arcgisInterruptSubmit.emit(t),this._interrupt&&(this._interruptDetails=[...this._interruptDetails,{interrupt:this._interrupt,response:t}]),this.orchestrator?.resumeInterrupt(t),this._interrupt=null}async submitMessage(t){let e=t.trim();if(!e||(this.messages.push({id:Date.now().toString(),role:"user",content:e}),!this._orchestratorController))return;this.#e=new AbortController,this._orchestratorController.streamingDisabled=this.streamingDisabled;let i=this.alwaysUseAgentId?{routing:"direct",agentId:this.alwaysUseAgentId}:{routing:"auto",agentIds:this.allowedAgentIds},r=this._orchestratorController.ask(e,i,this.#e?.signal);for await(let s of r){let l=s.runId,a=this.messages.at(-1);switch(s.type){case"runtime":this.arcgisRuntime.emit(s.event);break;case"block-start":{this._isAnswering=!0;let n={type:s.blockType,isPending:!0};if(a?.role==="assistant"&&a.id===l){let c=[...a.blocks??[],n];this.messages.splice(-1,1,{...a,blocks:c})}else this.messages.push({role:"assistant",blocks:[n],id:l,isStreaming:!0,interrupts:this._interruptDetails}),this._interruptDetails=[];break}case"block-data":{if(a?.role!=="assistant"||a?.id!==l)break;let n=[...a.blocks??[]],c=n[n.length-1],{blockType:d,data:u}=s;if(c?.type!==d||!c.isPending)break;d==="text"?n[n.length-1]={...c,data:{...c.data,parts:u?.parts}}:n[n.length-1]={...c,data:{...c.data,...u??{}}},this.messages.splice(-1,1,{...a,blocks:n});break}case"block-end":{if(a?.role!=="assistant"||a?.id!==l)break;let n=[...a.blocks??[]],c=n[n.length-1];if(c?.type!==s.blockType||!c.isPending)break;let d=c;n[n.length-1]={...d,data:{...d.data},isPending:!1},this.messages.splice(-1,1,{...a,blocks:n});break}case"completed":s.error?(this.messages.push({role:"assistant",log:s.log,error:s.error,id:l,interrupts:this._interruptDetails}),this._interruptDetails=[]):a?.role==="assistant"&&a.id===l&&this.messages.splice(-1,1,{...a,content:s.response,blocks:a.blocks?.map(n=>({...n,data:{...n.data},isPending:!1}))??[],isStreaming:!1,log:s.log}),this._isAnswering=!1,this.#e=null,this._canceling=!1;break;case"interrupt":this._interrupt={...s.payload,id:l},this.arcgisInterrupt.emit(this._interrupt);break;case"cancelled":a?.role==="assistant"&&a.id===l?this.messages.splice(-1,1,{...a,blocks:a.blocks?.filter(n=>n.type==="text"||!n.isPending)??[],isStreaming:!1,log:s.log,error:`(${this._messages.stoppedByUserLabel})`}):(this.messages.push({role:"assistant",log:s.log,error:`(${this._messages.stoppedByUserLabel})`,id:l,interrupts:this._interruptDetails}),this._interruptDetails=[]),this._isAnswering=!1,this.#e=null,this._canceling=!1;break}}}unregister(t){this.#r.delete(t),this._orchestratorController&&this.#g()}load(){this.manager.onLifecycle(this._reset.bind(this))}loaded(){this.manager.onLifecycle(()=>{this.#t.value?.addEventListener("arcgisPromptSelect",this.#d),this.#t.value?.addEventListener("arcgisSubmit",this.#l),this.#t.value?.addEventListener("arcgisCancel",this.#c),this.#t.value?.addEventListener("arcgisFeedback",this.#h);let t=j(()=>!!this._interrupt&&!!this.#s.value,()=>{let i=this.#s.value;i.removeEventListener("arcgisSubmit",this.#n),i.removeEventListener("arcgisCancel",this.#a),i.addEventListener("arcgisSubmit",this.#n,{once:!0}),i.addEventListener("arcgisCancel",this.#a,{once:!0})}),e=this.messages.on("after-add",i=>{let r=i.item;r.role==="assistant"&&(r.error||r.content)&&this.arcgisResponse.emit(r)});return queueMicrotask(()=>{this.#p()}),()=>{t.remove(),e.remove(),this.#t.value?.removeEventListener("arcgisPromptSelect",this.#d),this.#s.value?.removeEventListener("arcgisSubmit",this.#n),this.#s.value?.removeEventListener("arcgisCancel",this.#a),this.#t.value?.removeEventListener("arcgisSubmit",this.#l),this.#t.value?.removeEventListener("arcgisCancel",this.#c),this.#t.value?.removeEventListener("arcgisFeedback",this.#h),this._orchestratorController?.destroy(),this._orchestratorController=null}})}willUpdate(t){this.hasUpdated&&t.has("runtimeEventsEnabled")&&this._orchestratorController&&(this._orchestratorController.destroy(),this._orchestratorController=null,this.#p())}async#g(){try{this._error=null;let t=M(this.el,this.referenceElement);await t?.componentOnReady();let e=[...this.#r.values()];return e.length?(this._orchestratorController?.destroy(),this._orchestratorController=new p({agents:e,portal:this.#i,runtimeEventsEnabled:this.runtimeEventsEnabled,streamingDisabled:this.streamingDisabled,view:t?.view}),await this._orchestratorController.load(),this.requestUpdate(),!0):(this._error=this._messages.noAgentsFoundMessage,!1)}catch(t){return this._error=t?.message??this._messages.orchestratorInitializationErrorMessage,P(this)(t),!1}}async#p(){await this.#g()?this.arcgisReady.emit():this._error&&this.arcgisError.emit(new Error(this._error))}_reset(){this._orchestratorController?.cancel(),this.#e?.abort(),this._interrupt=null,this.messages.removeAll(),this._error=null,this._inputValue="",this._signedInUserId=void 0}_renderEntryMessage(){return this._isSignedIn?this._error?this._renderErrorNotice():this.entryMessage?this.messages.length>0?null:h`<calcite-notice open kind=brand closable icon width=full><div slot=message>${this.entryMessage}</div></calcite-notice>`:h`<slot name=entry-message></slot>`:this._renderSignInNotice()}_renderSignInNotice(){let t=this.#i;return h`<calcite-notice slot=entry-message open kind=brand icon width=full><div slot=message>${this._messages.signInRequiredMessage}</div>${t?h`<calcite-link slot=link @click=${async()=>{try{let e=await N.getCredential(`${t.url}/sharing`);this._signedInUserId=e.userId,this._error=null,this.requestUpdate(),await this.#p()}catch(e){this._error=e?.message??this._messages.signInErrorMessage,this.arcgisError.emit(new Error(this._error)),A("error",this,"Error signing in:",{detail:{error:e}})}}} target=_blank title=${this._messages.signInToArcGISOnlineLabel??y}>${this._messages.signInLabel}</calcite-link>`:h`<div slot=link>${this._messages.noPortalInformationMessage}</div>`}</calcite-notice>`}_renderErrorNotice(){return this._error?h`<calcite-notice slot=entry-message open kind=brand icon width=full>${this._error===Y?h`<div slot=message>${tt}</div><calcite-link slot=link .href=${et} target=_blank title=${this._messages.learnAboutWebMapEmbeddingsLabel??y}>${this._messages.readMoreLabel}</calcite-link>`:h`<div slot=message>${this._error}</div>`}</calcite-notice>`:null}render(){return h`<calcite-panel .loading=${!this._orchestratorController&&!this._error||this._orchestratorController?.loading} .heading=${this.heading??this._messages.assistantLabel} .description=${this.description} ${f(this.#t)}><slot name=header-actions-start slot=header-actions-start></slot><slot name=header-actions-end slot=header-actions-end></slot><div class="content-container"><arcgis-assistant-chat .loading=${this.awaitingResponse} .messages=${this.messages} .interrupt=${this._interrupt}><slot name=message-starter slot=message-starter></slot><slot name=messages slot=messages>${this.messages.map(t=>t.role==="assistant"?h`<arcgis-assistant-message .message=${t} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled} @arcgisSlottableRequest=${this.#u} .assistantAvatarEnabled=${this.assistantAvatarEnabled}>${t.blocks?.map((e,i)=>h`<slot name=${$(t.id,i)??y} slot=${$(t.id,i)??y}><arcgis-assistant-message-block .block=${e}></arcgis-assistant-message-block></slot>`)}</arcgis-assistant-message>`:h`<arcgis-assistant-user-message .message=${t} .user=${this._user} .userAvatarEnabled=${this.userAvatarEnabled}></arcgis-assistant-user-message>`)}</slot>${this._interrupt?h`<div slot=message-loading><div class="interrupt-waiting-message">${this._messages.waitingForUserInputMessage}</div></div>`:h`<slot name=message-loading slot=message-loading><arcgis-assistant-message-loading .loading=${this.awaitingResponse} .loadingMessage=${this.awaitingResponseStep} .assistantAvatarEnabled=${this.assistantAvatarEnabled} .interrupts=${this._interruptDetails}></arcgis-assistant-message-loading></slot>`}</arcgis-assistant-chat></div>${this._interrupt?h`<slot name=interrupt><arcgis-assistant-interrupt slot=content-bottom .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} ${f(this.#s)}></arcgis-assistant-interrupt></slot>`:this.suggestedPrompts?.length?h`<div class="suggested-prompts-container" slot=content-bottom><arcgis-assistant-suggested-prompts class="suggested-prompts" .prompts=${this.suggestedPrompts}></arcgis-assistant-suggested-prompts></div>`:null}<div class="footer-container" slot=footer>${this._renderEntryMessage()}<slot name=chat-entry><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse||this._isAnswering} .inputValue=${this._inputValue} .messages=${this.messages} .voiceInputEnabled=${this.voiceInputEnabled} .disabled=${this._canceling||!this._isSignedIn||!!this._interrupt||!!this._error} ${f(this.#o)}><slot name=entry-actions-start slot=entry-actions-start></slot><slot name=entry-actions-end slot=entry-actions-end><calcite-button .iconStart=${this.awaitingResponse||this._isAnswering?"circle-stop":"send"} @click=${()=>{this.#o.value?.submitMessage()}} round>${this.awaitingResponse||this._isAnswering?this._messages.stopButtonLabel:this._messages.askButtonLabel}</calcite-button></slot></arcgis-assistant-chat-entry></slot><slot name=footer-content></slot></div></calcite-panel>`}};L("arcgis-assistant",S);return S},"core/Collection","core/reactiveUtils","portal/Portal","request","identity/IdentityManager","config","layers/FeatureLayer","core/Accessor","core/accessorSupport/decorators",a,b)
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./UZLQALHY.js";var e=`## Who you are
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import"./BVUCNXC5.js";var e=`## Who you are
3
3
 
4
4
  You are a map assistant embedded inside a GIS application. You have no knowledge of history, science, people, events, cooking, or anything outside of this map and its data. You only know what is described in the Map Context below.
5
5
 
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as r}from"./434TAA3J.js";import{a as m,b}from"./6OOZSZRJ.js";import"./RLEHNAIA.js";import{g as l,h as e,v as c,x as d,z as g}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var p=l`:host{display:block;container-type:inline-size}.container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--calcite-spacing-sm);width:100%;text-align:left}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.content-container{display:flex;flex:1;flex-direction:column;width:100%;min-width:0;gap:var(--calcite-spacing-md)}.content{display:flex;flex-direction:column;min-width:0;gap:var(--calcite-spacing-sm)}.blocks{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm)}.block-pending{display:flex;justify-content:center;align-items:center;padding:var(--calcite-spacing-sm);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 2s ease-in-out infinite;border-radius:var(--calcite-border-radius);min-height:100px}.message-error{font-style:italic}@container (min-width: 480px){.container{max-width:80%}}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.block-pending{animation:none}}`;function u({message:a}){let s=new Map;return a&&a.blocks?.forEach((i,t)=>{if(!i.isPending){let n=r(a.id,t);s.set(n,{data:{block:i,index:t,message:a},name:"block",slotName:n})}}),s}var o=class extends c{constructor(){super(...arguments),this._messages=b({blocking:!0}),this.arcgisSlottableRequest=m(this,["message"],u),this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.readAloudEnabled=!1,this.footerDisabled=!1,this.assistantAvatarEnabled=!1}static{this.properties={_isStreaming:16,feedbackEnabled:5,logEnabled:5,copyEnabled:5,readAloudEnabled:5,footerDisabled:5,message:0,assistantAvatarEnabled:5}}static{this.styles=p}get _isStreaming(){return!!this.message?.isStreaming}_renderContent(){let s=this.message,i=s?.id;if(i)return e`<div class="content"><arcgis-assistant-interrupt-preview .interrupts=${this.message?.interrupts}></arcgis-assistant-interrupt-preview>${s.blocks?.length?e`<div class="blocks">${s.blocks.map((t,n)=>t.isPending&&t.type!=="text"?e`<div class="block-pending"></div>`:e`<slot name=${r(i,n)??d}></slot>`)}</div>`:null}</div>`}_renderFooter(){return e`<arcgis-assistant-message-footer .message=${this.message} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-footer>`}render(){return e`<div class="container">${this.assistantAvatarEnabled?e`<slot name=icon><calcite-icon icon=effects class="icon" scale=s></calcite-icon></slot>`:null}<div class="content-container"><slot name=content>${this._renderContent()}</slot>${this.message?.error?e`<div class="message-error">${this.message.error}</div>`:null}${this._isStreaming?e`<div class="streaming-indicator"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader></div>`:null}${!this.footerDisabled&&!this._isStreaming?e`<slot name=footer>${this._renderFooter()}</slot>`:null}</div></div>`}};g("arcgis-assistant-message",o);export{o as ArcgisAssistantMessage};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as r}from"./B3HXSEBN.js";import{a as m,b}from"./GN56DOYL.js";import"./4YOG5F3W.js";import{g as l,h as e,v as c,x as d,z as g}from"./S5GFNIHC.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";var p=l`:host{display:block;container-type:inline-size}.container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--calcite-spacing-sm);width:100%;text-align:left}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.content-container{display:flex;flex:1;flex-direction:column;width:100%;min-width:0;gap:var(--calcite-spacing-md)}.content{display:flex;flex-direction:column;min-width:0;gap:var(--calcite-spacing-sm)}.blocks{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm)}.block-pending{display:flex;justify-content:center;align-items:center;padding:var(--calcite-spacing-sm);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 2s ease-in-out infinite;border-radius:var(--calcite-border-radius);min-height:100px}.message-error{font-style:italic}@container (min-width: 480px){.container{max-width:80%}}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.block-pending{animation:none}}`;function u({message:a}){let s=new Map;return a&&a.blocks?.forEach((i,t)=>{if(!i.isPending){let n=r(a.id,t);s.set(n,{data:{block:i,index:t,message:a},name:"block",slotName:n})}}),s}var o=class extends c{constructor(){super(...arguments),this._messages=b({blocking:!0}),this.arcgisSlottableRequest=m(this,["message"],u),this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.readAloudEnabled=!1,this.footerDisabled=!1,this.assistantAvatarEnabled=!1}static{this.properties={_isStreaming:16,feedbackEnabled:5,logEnabled:5,copyEnabled:5,readAloudEnabled:5,footerDisabled:5,message:0,assistantAvatarEnabled:5}}static{this.styles=p}get _isStreaming(){return!!this.message?.isStreaming}_renderContent(){let s=this.message,i=s?.id;if(i)return e`<div class="content"><arcgis-assistant-interrupt-preview .interrupts=${this.message?.interrupts}></arcgis-assistant-interrupt-preview>${s.blocks?.length?e`<div class="blocks">${s.blocks.map((t,n)=>t.isPending&&t.type!=="text"?e`<div class="block-pending"></div>`:e`<slot name=${r(i,n)??d}></slot>`)}</div>`:null}</div>`}_renderFooter(){return e`<arcgis-assistant-message-footer .message=${this.message} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-footer>`}render(){return e`<div class="container">${this.assistantAvatarEnabled?e`<slot name=icon><calcite-icon icon=effects class="icon" scale=s></calcite-icon></slot>`:null}<div class="content-container"><slot name=content>${this._renderContent()}</slot>${this.message?.error?e`<div class="message-error">${this.message.error}</div>`:null}${this._isStreaming?e`<div class="streaming-indicator"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader></div>`:null}${!this.footerDisabled&&!this._isStreaming?e`<slot name=footer>${this._renderFooter()}</slot>`:null}</div></div>`}};g("arcgis-assistant-message",o);export{o as ArcgisAssistantMessage};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
2
  function i(o,e){let t=o?.configurable?.context;if(!t||typeof t!="object")throw new Error("Agent context missing");let n=e.filter(r=>!(r in t));if(n.length)throw new Error(`Agent context missing: ${n.join(", ")}`);return t}export{i as a};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./ANRQWYU2.js";import"./R2PQVY4O.js";import"./G2EGT3CF.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([{property:d,subclass:f},{a:u,c:i,d:c}])=>{var m=Object.defineProperty,g=Object.getOwnPropertyDescriptor,p=(e,o,r,t)=>{for(var s=t>1?void 0:t?g(o,r):o,a=e.length-1,n;a>=0;a--)(n=e[a])&&(s=(t?n(o,r,s):n(s))||s);return t&&s&&m(o,r,s),s},l=class extends c{constructor(e){super(e)}getAgents(){return this.agents}getEntryNode(e){return e[0]?i(e[0],0):void 0}isTerminalAgent(e,o){return o===e.length-1}validateAgents(e){super.validateAgents(e);let o=new Map;for(let[r,t]of e.entries()){let s=e[r-1];if(t.outputSchema)for(let a of u(t.outputSchema)){let n=o.get(a)??[];n.push(`${t.name} [${r}]`),o.set(a,n)}if(!(r===0||!t.inputSchema||s?.outputSchema))throw new Error(`Workflow agent "${t.name}" declares an input schema, so upstream agent "${s.name}" must declare an output schema.`)}for(let[r,t]of o.entries())t.length>1&&console.warn(`Workflow output field "${r}" is declared by multiple steps (${t.join(", ")}). Later steps will overwrite earlier values in shared state.`)}buildEdges(e){return e.length===1?[{from:i(e[0],0),decide:()=>{}}]:e.slice(0,-1).map((o,r)=>({from:i(o,r),decide:t=>t.status==="failed"?void 0:i(e[r+1],r+1)}))}};p([d()],l.prototype,"agents",2);l=p([f("SequentialWorkflow")],l);return l},"core/accessorSupport/decorators",a)
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import a from"./XV7RMYLR.js";import"./2WXXSZP5.js";import"./4OI4QEV7.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([{property:d,subclass:f},{a:u,c:i,d:c}])=>{var m=Object.defineProperty,g=Object.getOwnPropertyDescriptor,p=(e,o,r,t)=>{for(var s=t>1?void 0:t?g(o,r):o,a=e.length-1,n;a>=0;a--)(n=e[a])&&(s=(t?n(o,r,s):n(s))||s);return t&&s&&m(o,r,s),s},l=class extends c{constructor(e){super(e)}getAgents(){return this.agents}getEntryNode(e){return e[0]?i(e[0],0):void 0}isTerminalAgent(e,o){return o===e.length-1}validateAgents(e){super.validateAgents(e);let o=new Map;for(let[r,t]of e.entries()){let s=e[r-1];if(t.outputSchema)for(let a of u(t.outputSchema)){let n=o.get(a)??[];n.push(`${t.name} [${r}]`),o.set(a,n)}if(!(r===0||!t.inputSchema||s?.outputSchema))throw new Error(`Workflow agent "${t.name}" declares an input schema, so upstream agent "${s.name}" must declare an output schema.`)}for(let[r,t]of o.entries())t.length>1&&console.warn(`Workflow output field "${r}" is declared by multiple steps (${t.join(", ")}). Later steps will overwrite earlier values in shared state.`)}buildEdges(e){return e.length===1?[{from:i(e[0],0),decide:()=>{}}]:e.slice(0,-1).map((o,r)=>({from:i(o,r),decide:t=>t.status==="failed"?void 0:i(e[r+1],r+1)}))}};p([d()],l.prototype,"agents",2);l=p([f("SequentialWorkflow")],l);return l},"core/accessorSupport/decorators",a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import b from"./3PPXAIRE.js";import"./LLY5A2E2.js";import"./V4PJMCJZ.js";import a from"./VGLBH473.js";import"./A6LBMS7A.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([,a])=>{return a},a,b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ function o(e,n){return`block-${e}-${n}`}export{o as a};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{g as t,h as e,t as i,u as a,v as n,z as r}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([l,{when:o,watch:c}])=>{var h=t`.messages-container{display:flex;flex:1;flex-direction:column;line-height:var(--calcite-font-line-height-relative-snug)}.messages-list{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;gap:var(--calcite-spacing-xxl);flex:1 1 auto;min-height:0;justify-content:flex-end;overflow:auto}.end-ref{margin-top:var(--calcite-spacing-lg)}`,s=class extends n{constructor(){super(...arguments),this.#t=i(),this.#s=!1,this.loading=!1,this.messages=new l([]),this.interrupt=null}static{this.properties={loading:5,messages:0,interrupt:0}}static{this.styles=h}#t;#s;firstUpdated(){this.#e()}loaded(){this.manager.onLifecycle(()=>[this.messages.on("change",()=>{this.#e()}),o(()=>!this.loading,()=>{this.#s=!1}),c(()=>[this.loading,this.interrupt],()=>this.#e())])}#e(){requestAnimationFrame(()=>{this.#s||this.#t.value?.scrollIntoView({behavior:"smooth",block:"end"})})}#i(){this.#s=!0}render(){return e`<div class="messages-container" @wheel=${this.#i}><div class="messages-list"><slot name=message-starter></slot><slot name=messages></slot><slot name=message-loading></slot></div><div class="end-ref" ${a(this.#t)}></div></div>`}};r("arcgis-assistant-chat",s);return s},"core/Collection","core/reactiveUtils")
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{g as t,h as e,t as i,u as a,v as n,z as r}from"./S5GFNIHC.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";export default $arcgis.t(([l,{when:o,watch:c}])=>{var h=t`.messages-container{display:flex;flex:1;flex-direction:column;line-height:var(--calcite-font-line-height-relative-snug)}.messages-list{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;gap:var(--calcite-spacing-xxl);flex:1 1 auto;min-height:0;justify-content:flex-end;overflow:auto}.end-ref{margin-top:var(--calcite-spacing-lg)}`,s=class extends n{constructor(){super(...arguments),this.#t=i(),this.#s=!1,this.loading=!1,this.messages=new l([]),this.interrupt=null}static{this.properties={loading:5,messages:0,interrupt:0}}static{this.styles=h}#t;#s;firstUpdated(){this.#e()}loaded(){this.manager.onLifecycle(()=>[this.messages.on("change",()=>{this.#e()}),o(()=>!this.loading,()=>{this.#s=!1}),c(()=>[this.loading,this.interrupt],()=>this.#e())])}#e(){requestAnimationFrame(()=>{this.#s||this.#t.value?.scrollIntoView({behavior:"smooth",block:"end"})})}#i(){this.#s=!0}render(){return e`<div class="messages-container" @wheel=${this.#i}><div class="messages-list"><slot name=message-starter></slot><slot name=messages></slot><slot name=message-loading></slot></div><div class="end-ref" ${a(this.#t)}></div></div>`}};r("arcgis-assistant-chat",s);return s},"core/Collection","core/reactiveUtils")
@@ -0,0 +1,19 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import"./BVUCNXC5.js";var e=`---
3
+ name: help
4
+ description: Answers questions about the current map, its layers and fields, available assistant capabilities, unsupported map actions, and unrelated requests that need a map-focused redirect.
5
+ allowed-tools: listLayerFields
6
+ ---
7
+
8
+ # Help
9
+
10
+ - Use the runtime context supplied with this skill as the authoritative source for map, layer, field, and capability information.
11
+ - List layers using the layers in the runtime context.
12
+ - When the user explicitly asks for fields, columns, or attributes of a named layer, call \`listLayerFields\` with that layer title. Do not use \`listLayerFields\` for general help, capability summaries, or layer listings.
13
+ - Summarize what the map contains using its actual layer titles, descriptions, and fields.
14
+ - Explain available capabilities using only the registered agents in the runtime context. Do not claim an action is supported unless a registered agent description supports it.
15
+ - For requests such as "what can I ask?", suggest 3-5 concise examples that use actual layer and field names from the map context.
16
+ - If a map-related action is unsupported, say so directly and suggest a nearby supported capability when one is available.
17
+ - You know only this map and the registered assistant capabilities. For unrelated questions, politely say that you do not have that information and redirect to a specific map-related question using the returned context.
18
+ - Keep responses concise. Use bullets for lists and never invent map details, fields, agents, or capabilities.
19
+ `;export{e as default};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./7VUSIGEM.js";import{e as l}from"./R2PQVY4O.js";import"./G2EGT3CF.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([{property:p,subclass:m},{watch:w},c])=>{var d=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(e,r,s,o)=>{for(var t=o>1?void 0:o?f(r,s):r,i=e.length-1,a;i>=0;i--)(a=e[i])&&(t=(o?a(r,s,t):a(t))||t);return o&&t&&d(r,s,t),t},h=class extends c{constructor(e){super(e)}initialize(){this.addHandles(w(()=>[this.name,this.description,this.inputSchema,this.outputSchema,this.workflow],()=>this.generate(),{initial:!0,sync:!0}))}getSchemas(){return[this.inputSchema,...this.workflow.getAgents().flatMap(e=>e.getSchemas()),this.outputSchema].filter(Boolean)}generate(){let{workspace:e,createGraph:r}=this.workflow.generate();if(this._set("workspace",e),!this.middlewares?.length)this._set("createGraph",r);else{let s=this.id,o={[s]:async(i,a)=>await r().compile().invoke(i,a)},t=[{from:s,decide:()=>{}}];this._set("createGraph",()=>l(o,t,e,{agent:this,entryNode:s,middlewares:this.middlewares}))}}};n([p()],h.prototype,"workflow",2);n([p()],h.prototype,"inputSchema",2);n([p()],h.prototype,"outputSchema",2);h=n([m("WorkflowAgent")],h);return h},"core/accessorSupport/decorators","core/reactiveUtils",a)
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import a from"./EGRRZTF6.js";import{e as l}from"./2WXXSZP5.js";import"./4OI4QEV7.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([{property:p,subclass:m},{watch:w},c])=>{var d=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(e,r,s,o)=>{for(var t=o>1?void 0:o?f(r,s):r,i=e.length-1,a;i>=0;i--)(a=e[i])&&(t=(o?a(r,s,t):a(t))||t);return o&&t&&d(r,s,t),t},h=class extends c{constructor(e){super(e)}initialize(){this.addHandles(w(()=>[this.name,this.description,this.inputSchema,this.outputSchema,this.workflow],()=>this.generate(),{initial:!0,sync:!0}))}getSchemas(){return[this.inputSchema,...this.workflow.getAgents().flatMap(e=>e.getSchemas()),this.outputSchema].filter(Boolean)}generate(){let{workspace:e,createGraph:r}=this.workflow.generate();if(this._set("workspace",e),!this.middlewares?.length)this._set("createGraph",r);else{let s=this.id,o={[s]:async(i,a)=>await r().compile().invoke(i,a)},t=[{from:s,decide:()=>{}}];this._set("createGraph",()=>l(o,t,e,{agent:this,entryNode:s,middlewares:this.middlewares}))}}};n([p()],h.prototype,"workflow",2);n([p()],h.prototype,"inputSchema",2);n([p()],h.prototype,"outputSchema",2);h=n([m("WorkflowAgent")],h);return h},"core/accessorSupport/decorators","core/reactiveUtils",a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a}from"./X42ACC66.js";import"./V4PJMCJZ.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export{a as listLayerFieldsTool};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
2
  var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>{try{return a||b((a={exports:{}}).exports,a),a.exports}catch(c){throw a=0,c}},n=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var o=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c};
@@ -1,4 +1,4 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
2
  function N(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var z=N();function ae(r){z=r}var R={exec:()=>null};function _(r){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),n=e[s];return n||(n=r(s),e[s]=n),n}}function u(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(n,l)=>{let a=typeof l=="string"?l:l.source;return a=a.replace(f.caret,"$1"),t=t.replace(n,a),s},getRegex:()=>new RegExp(t,e)};return s}var we=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),f={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:_(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:_(r=>new RegExp(`^ {0,${r}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:_(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:_(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:_(r=>new RegExp(`^ {0,${r}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:_(r=>new RegExp(`^ {0,${r}}>`))},me=/^(?:[ \t]*(?:\n|$))+/,Se=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$e=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,C=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ye=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,G=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,oe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=u(oe).replace(/bull/g,G).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Re=u(oe).replace(/bull/g,G).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),X=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Te=/^[^\n]+/,U=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ze=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_e=u(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,G).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",W=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ae=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",W).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he=r=>u(X).replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Pe=he(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Le=he(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ee=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Le).getRegex(),F={blockquote:Ee,code:Se,def:ze,fences:$e,heading:ye,hr:C,html:Ae,lheading:ce,list:_e,newline:me,paragraph:Pe,table:R,text:Te},ee=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Ie={...F,lheading:Re,table:ee,paragraph:u(X).replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ee).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()},Ce={...F,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:R,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(X).replace("hr",C).replace("heading",` *#{1,6} *[^
3
3
  ]`).replace("lheading",ce).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Be=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,qe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pe=/^( {2,}|\\)\n(?!\s*$)/,ve=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,$=/[\p{P}\p{S}]/u,A=/[\s\p{P}\p{S}]/u,B=/[^\s\p{P}\p{S}]/u,Ze=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,A).getRegex(),De=/[\p{Pi}\p{Ps}"']/u,ue=/(?!~)[\p{P}\p{S}]/u,Oe=/(?!~)[\s\p{P}\p{S}]/u,Qe=/(?:[^\s\p{P}\p{S}]|~)/u,Me=u(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",we?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ge=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,je=u(ge,"u").replace(/punct/g,$).getRegex(),He=u(ge,"u").replace(/punct/g,ue).getRegex(),Ne=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ge=u(Ne,"u").replace(/openQuote/g,De).replace(/punct/g,$).getRegex(),ke="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xe=u(ke,"gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,A).replace(/punct/g,$).getRegex(),Ue=u(ke,"gu").replace(/notPunctSpace/g,Qe).replace(/punctSpace/g,Oe).replace(/punct/g,ue).getRegex(),We="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Fe=u(We,"gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,A).replace(/punct/g,$).getRegex(),Je=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,A).replace(/punct/g,$).getRegex(),Ke="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Ve=u(Ke,"gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,A).replace(/punct/g,$).getRegex(),Ye=u(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,$).getRegex(),et="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",tt=u(et,"gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,A).replace(/punct/g,$).getRegex(),rt=u(/\\(punct)/,"gu").replace(/punct/g,$).getRegex(),nt=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),st=u(W).replace("(?:-->|$)","-->").getRegex(),lt=u("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",st).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),it=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,v=u(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",it).getRegex(),at=u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",v).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),de=u(/^!?\[(label)\]\[(ref)\]/).replace("label",v).replace("ref",U).getRegex(),fe=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),ot=u("reflink|nolink(?!\\()","g").replace("reflink",de).replace("nolink",fe).getRegex(),te=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,J={_backpedal:R,anyPunctuation:rt,autolink:nt,blockSkip:Me,br:pe,code:qe,del:R,delLDelim:R,delRDelim:R,emStrongLDelim:je,emStrongRDelimAst:Xe,emStrongRDelimUnd:Je,escape:Be,link:at,nolink:fe,punctuation:Ze,reflink:de,reflinkSearch:ot,tag:lt,text:ve,url:R},ct={...J,emStrongLDelim:Ge,emStrongRDelimAst:Fe,emStrongRDelimUnd:Ve,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",v).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",v).getRegex()},M={...J,emStrongRDelimAst:Ue,emStrongLDelim:He,delLDelim:Ye,delRDelim:tt,url:u(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",te).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:u(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",te).getRegex()},ht={...M,br:u(pe).replace("{2,}","*").getRegex(),text:u(M.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},q={normal:F,gfm:Ie,pedantic:Ce},E={normal:J,gfm:M,breaks:ht,pedantic:ct},pt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},re=r=>pt[r];function b(r,e){if(e){if(f.escapeTest.test(r))return r.replace(f.escapeReplace,re)}else if(f.escapeTestNoEncode.test(r))return r.replace(f.escapeReplaceNoEncode,re);return r}function ne(r){try{r=encodeURI(r).replace(f.percentDecode,"%")}catch{return null}return r}function se(r,e){let t=r.replace(f.findPipe,(l,a,i)=>{let c=!1,o=a;for(;--o>=0&&i[o]==="\\";)c=!c;return c?"|":" |"}),s=t.split(f.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(f.slashPipe,"|");return s}function y(r,e,t){let s=r.length;if(s===0)return"";let n=0;for(;n<s;){let l=r.charAt(s-n-1);if(l===e&&!t)n++;else if(l!==e&&t)n++;else break}return r.slice(0,s-n)}function le(r){let e=r.split(`
4
4
  `),t=e.length-1;for(;t>=0&&f.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(`
@@ -1,3 +1,3 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as e,b as n}from"./ROQGPAR5.js";import"./RFVZ7KCG.js";import{g as r,h as i,v as s,z as c}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var l=r`.container{border-radius:var(--calcite-border-radius);margin-bottom:var(--calcite-spacing-md)}.block{margin:0;background-color:var(--calcite-color-foreground-1);width:100%;max-height:300px;overflow:auto}.entry{margin-left:var(--calcite-spacing-sm);padding:var(--calcite-spacing-xxs) var(--calcite-spacing-lg);border-left:1px solid var(--calcite-color-border-1)}`,o=class extends s{constructor(){super(...arguments),this.logEnabled=!1,this.showLog=!1}static{this.properties={logEnabled:5,showLog:5,log:0}}static{this.styles=l}render(){return this.log?.length&&this.showLog&&this.logEnabled?i`<div class="container"><div class="block"><calcite-accordion appearance=transparent icon-position=start icon-type=chevron scale=s>${this.log.map(a=>{let t=a.includes(`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as e,b as n}from"./HIJGY4GU.js";import"./CAOMMQSY.js";import{g as r,h as i,v as s,z as c}from"./S5GFNIHC.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";var l=r`.container{border-radius:var(--calcite-border-radius);margin-bottom:var(--calcite-spacing-md)}.block{margin:0;background-color:var(--calcite-color-foreground-1);width:100%;max-height:300px;overflow:auto}.entry{margin-left:var(--calcite-spacing-sm);padding:var(--calcite-spacing-xxs) var(--calcite-spacing-lg);border-left:1px solid var(--calcite-color-border-1)}`,o=class extends s{constructor(){super(...arguments),this.logEnabled=!1,this.showLog=!1}static{this.properties={logEnabled:5,showLog:5,log:0}}static{this.styles=l}render(){return this.log?.length&&this.showLog&&this.logEnabled?i`<div class="container"><div class="block"><calcite-accordion appearance=transparent icon-position=start icon-type=chevron scale=s>${this.log.map(a=>{let t=a.includes(`
3
3
  `)||a.length>70;return i`<calcite-accordion-item .heading=${t?`${a.substring(0,70)}...`:a} .expanded=${t}><div class="entry">${t?e(n(a)):null}</div></calcite-accordion-item>`})}</calcite-accordion></div></div>`:null}};c("arcgis-assistant-message-log",o);export{o as ArcgisAssistantMessageLog};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as u}from"./ONQ6JSBJ.js";import{Dc as d}from"./AI6DYOKR.js";import{Dd as s}from"./MWYBF3F3.js";async function f(o,a,n){let e=n.map?.allLayers.find(r=>r.id===o);if(!e)return{text:`Error: Layer with id ${o} not found`};let t=a?.trim()?a:"1=1",l=e.createQuery();l.where=t;try{let{extent:r,count:i}=await e.queryExtent(l);if(i===0)return{text:`No features found in ${e.title} matching: ${t}`,where:t};if(r)await n.goTo(r);else return{text:`Error: Unable to determine extent for ${e.title}`,where:t};let c={layerId:o,layerTitle:e.title??o,where:t,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${e.title} matching: ${t}`,where:t,sharedStatePatch:{lastNavigatedFeatures:{value:c}}}}catch(r){return console.error("Error in goToFeatures:",r),{text:`Error: ${r instanceof Error?r.message:"Unknown error"}`,where:t}}}async function h({layerId:o,where:a},n){let{mapView:e}=u(n,["mapView"]);return await f(o,a,e)}var m=s.object({layerId:s.string().describe("The layerId of the layer to zoom to."),where:s.string().describe("ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Start with a fresh filter for the current request unless the task explicitly refers to prior results. Use only field name values from the selected layer, not aliases. Use field metadata only to interpret intent: prefer LIKE '%value%' for string fields, and use =, <, >, BETWEEN, IN, IS NULL, AND/OR/NOT as appropriate for number/date fields. For coded-value domain fields, use the domain code already provided in layerInfo.domain.codedValues, never the display label. Respect range-domain bounds when they are provided. Do NOT include subqueries, nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons.")}),E=d(h,{name:"goToFeatures",description:"Go to the features that match the given filter for the given layerId. Use coded-value domain codes from layer field metadata when building the WHERE clause.",schema:m});export{E as a};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as u}from"./A6LBMS7A.js";import{Dc as d}from"./M2U456J5.js";import{Dd as s}from"./CSE6BHOJ.js";async function f(o,a,n){let e=n.map?.allLayers.find(r=>r.id===o);if(!e)return{text:`Error: Layer with id ${o} not found`};let t=a?.trim()?a:"1=1",l=e.createQuery();l.where=t;try{let{extent:r,count:i}=await e.queryExtent(l);if(i===0)return{text:`No features found in ${e.title} matching: ${t}`,where:t};if(r)await n.goTo(r);else return{text:`Error: Unable to determine extent for ${e.title}`,where:t};let c={layerId:o,layerTitle:e.title??o,where:t,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${e.title} matching: ${t}`,where:t,sharedStatePatch:{lastNavigatedFeatures:{value:c}}}}catch(r){return console.error("Error in goToFeatures:",r),{text:`Error: ${r instanceof Error?r.message:"Unknown error"}`,where:t}}}async function h({layerId:o,where:a},n){let{mapView:e}=u(n,["mapView"]);return await f(o,a,e)}var m=s.object({layerId:s.string().describe("The layerId of the layer to zoom to."),where:s.string().describe("ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Start with a fresh filter for the current request unless the task explicitly refers to prior results. Use only field name values from the selected layer, not aliases. Use field metadata only to interpret intent: prefer LIKE '%value%' for string fields, and use =, <, >, BETWEEN, IN, IS NULL, AND/OR/NOT as appropriate for number/date fields. For coded-value domain fields, use the domain code already provided in layerInfo.domain.codedValues, never the display label. Respect range-domain bounds when they are provided. Do NOT include subqueries, nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons.")}),E=d(h,{name:"goToFeatures",description:"Go to the features that match the given filter for the given layerId. Use coded-value domain codes from layer field metadata when building the WHERE clause.",schema:m});export{E as a};
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as Q}from"./UZLQALHY.js";var xu,$n=Object.freeze({status:"aborted"});function s(t,r,i){function o(c,l){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(t))return;c._zod.traits.add(t),r(c,l);let u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let _=d[p];_ in c||(c[_]=u[_].bind(c))}}let e=i?.Parent??Object;class n extends e{}Object.defineProperty(n,"name",{value:t});function a(c){var l;let u=i?.Parent?new n:this;o(u,c),(l=u._zod).deferred??(l.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>i?.Parent&&c instanceof i.Parent?!0:c?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}var hn=Symbol("zod_brand"),G=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ne=class extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}};(xu=globalThis).__zod_globalConfig??(xu.__zod_globalConfig={});var pe=globalThis.__zod_globalConfig;function U(t){return t&&Object.assign(pe,t),pe}var v={};Q(v,{BIGINT_FORMAT_RANGES:()=>jn,Class:()=>yn,NUMBER_FORMAT_RANGES:()=>wn,aborted:()=>ce,allowsEval:()=>kn,assert:()=>Sd,assertEqual:()=>xd,assertIs:()=>zd,assertNever:()=>Id,assertNotEqual:()=>kd,assignProp:()=>oe,base64ToUint8Array:()=>zu,base64urlToUint8Array:()=>Vd,cached:()=>ke,captureStackTrace:()=>Dt,cleanEnum:()=>Jd,cleanRegex:()=>tt,clone:()=>T,cloneDef:()=>jd,createTransparentProxy:()=>Nd,defineLazy:()=>z,esc:()=>Zt,escapeRegex:()=>K,explicitlyAborted:()=>Pn,extend:()=>Ad,finalizeIssue:()=>E,floatSafeRemainder:()=>bn,getElementAtPath:()=>Pd,getEnumValues:()=>et,getLengthableOrigin:()=>it,getParsedType:()=>Dd,getSizableOrigin:()=>nt,hexToUint8Array:()=>Kd,isObject:()=>fe,isPlainObject:()=>ae,issue:()=>ze,joinValues:()=>m,jsonStringifyReplacer:()=>xe,merge:()=>Rd,mergeDefs:()=>ee,normalizeParams:()=>h,nullish:()=>ie,numKeys:()=>Zd,objectClone:()=>wd,omit:()=>Ed,optionalKeys:()=>Sn,parsedType:()=>g,partial:()=>Cd,pick:()=>Td,prefixIssues:()=>C,primitiveTypes:()=>In,promiseAllObject:()=>Ud,propertyKeyTypes:()=>rt,randomString:()=>Od,required:()=>Fd,safeExtend:()=>Ld,shallowClone:()=>zn,slugify:()=>xn,stringifyPrimitive:()=>f,uint8ArrayToBase64:()=>Iu,uint8ArrayToBase64url:()=>Md,uint8ArrayToHex:()=>Gd,unwrapMessage:()=>Qe});function xd(t){return t}function kd(t){return t}function zd(t){}function Id(t){throw new Error("Unexpected value in exhaustive check")}function Sd(t){}function et(t){let r=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,e])=>r.indexOf(+o)===-1).map(([o,e])=>e)}function m(t,r="|"){return t.map(i=>f(i)).join(r)}function xe(t,r){return typeof r=="bigint"?r.toString():r}function ke(t){return{get value(){{let i=t();return Object.defineProperty(this,"value",{value:i}),i}throw new Error("cached value already set")}}}function ie(t){return t==null}function tt(t){let r=t.startsWith("^")?1:0,i=t.endsWith("$")?t.length-1:t.length;return t.slice(r,i)}function bn(t,r){let i=t/r,o=Math.round(i),e=Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-o)<e?0:i-o}var ku=Symbol("evaluating");function z(t,r,i){let o;Object.defineProperty(t,r,{get(){if(o!==ku)return o===void 0&&(o=ku,o=i()),o},set(e){Object.defineProperty(t,r,{value:e})},configurable:!0})}function wd(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function oe(t,r,i){Object.defineProperty(t,r,{value:i,writable:!0,enumerable:!0,configurable:!0})}function ee(...t){let r={};for(let i of t){let o=Object.getOwnPropertyDescriptors(i);Object.assign(r,o)}return Object.defineProperties({},r)}function jd(t){return ee(t._zod.def)}function Pd(t,r){return r?r.reduce((i,o)=>i?.[o],t):t}function Ud(t){let r=Object.keys(t),i=r.map(o=>t[o]);return Promise.all(i).then(o=>{let e={};for(let n=0;n<r.length;n++)e[r[n]]=o[n];return e})}function Od(t=10){let r="abcdefghijklmnopqrstuvwxyz",i="";for(let o=0;o<t;o++)i+=r[Math.floor(Math.random()*r.length)];return i}function Zt(t){return JSON.stringify(t)}function xn(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Dt="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function fe(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var kn=ke(()=>{if(pe.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function ae(t){if(fe(t)===!1)return!1;let r=t.constructor;if(r===void 0||typeof r!="function")return!0;let i=r.prototype;return!(fe(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function zn(t){return ae(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Zd(t){let r=0;for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&r++;return r}var Dd=t=>{let r=typeof t;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},rt=new Set(["string","number","symbol"]),In=new Set(["string","number","bigint","boolean","symbol","undefined"]);function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(t,r,i){let o=new t._zod.constr(r??t._zod.def);return(!r||i?.parent)&&(o._zod.parent=t),o}function h(t){let r=t;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Nd(t){let r;return new Proxy({},{get(i,o,e){return r??(r=t()),Reflect.get(r,o,e)},set(i,o,e,n){return r??(r=t()),Reflect.set(r,o,e,n)},has(i,o){return r??(r=t()),Reflect.has(r,o)},deleteProperty(i,o){return r??(r=t()),Reflect.deleteProperty(r,o)},ownKeys(i){return r??(r=t()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(i,o){return r??(r=t()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(i,o,e){return r??(r=t()),Reflect.defineProperty(r,o,e)}})}function f(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Sn(t){return Object.keys(t).filter(r=>t[r]._zod.optin==="optional"&&t[r]._zod.optout==="optional")}var wn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},jn={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Td(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(a[c]=i.shape[c])}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ed(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={...t._zod.def.shape};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&delete a[c]}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ad(t,r){if(!ae(r))throw new Error("Invalid input to extend: expected a plain object");let i=t._zod.def.checks;if(i&&i.length>0){let n=t._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(n,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let e=ee(t._zod.def,{get shape(){let n={...t._zod.def.shape,...r};return oe(this,"shape",n),n}});return T(t,e)}function Ld(t,r){if(!ae(r))throw new Error("Invalid input to safeExtend: expected a plain object");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r};return oe(this,"shape",o),o}});return T(t,i)}function Rd(t,r){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r._zod.def.shape};return oe(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return T(t,i)}function Cd(t,r,i){let e=r._zod.def.checks;if(e&&e.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=ee(r._zod.def,{get shape(){let c=r._zod.def.shape,l={...c};if(i)for(let u in i){if(!(u in c))throw new Error(`Unrecognized key: "${u}"`);i[u]&&(l[u]=t?new t({type:"optional",innerType:c[u]}):c[u])}else for(let u in c)l[u]=t?new t({type:"optional",innerType:c[u]}):c[u];return oe(this,"shape",l),l},checks:[]});return T(r,a)}function Fd(t,r,i){let o=ee(r._zod.def,{get shape(){let e=r._zod.def.shape,n={...e};if(i)for(let a in i){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);i[a]&&(n[a]=new t({type:"nonoptional",innerType:e[a]}))}else for(let a in e)n[a]=new t({type:"nonoptional",innerType:e[a]});return oe(this,"shape",n),n}});return T(r,o)}function ce(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue!==!0)return!0;return!1}function Pn(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue===!1)return!0;return!1}function C(t,r){return r.map(i=>{var o;return(o=i).path??(o.path=[]),i.path.unshift(t),i})}function Qe(t){return typeof t=="string"?t:t?.message}function E(t,r,i){let o=t.message?t.message:Qe(t.inst?._zod.def?.error?.(t))??Qe(r?.error?.(t))??Qe(i.customError?.(t))??Qe(i.localeError?.(t))??"Invalid input",{inst:e,continue:n,input:a,...c}=t;return c.path??(c.path=[]),c.message=o,r?.reportInput&&(c.input=a),c}function nt(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function it(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function g(t){let r=typeof t;switch(r){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let i=t;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return r}function ze(...t){let[r,i,o]=t;return typeof r=="string"?{message:r,code:"custom",input:i,inst:o}:{...r}}function Jd(t){return Object.entries(t).filter(([r,i])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function zu(t){let r=atob(t),i=new Uint8Array(r.length);for(let o=0;o<r.length;o++)i[o]=r.charCodeAt(o);return i}function Iu(t){let r="";for(let i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return btoa(r)}function Vd(t){let r=t.replace(/-/g,"+").replace(/_/g,"/"),i="=".repeat((4-r.length%4)%4);return zu(r+i)}function Md(t){return Iu(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kd(t){let r=t.replace(/^0x/,"");if(r.length%2!==0)throw new Error("Invalid hex string length");let i=new Uint8Array(r.length/2);for(let o=0;o<r.length;o+=2)i[o/2]=Number.parseInt(r.slice(o,o+2),16);return i}function Gd(t){return Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}var yn=class{constructor(...r){}};var Su=(t,r)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:r,enumerable:!1}),t.message=JSON.stringify(r,xe,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ot=s("$ZodError",Su),F=s("$ZodError",Su,{Parent:Error});function at(t,r=i=>i.message){let i={},o=[];for(let e of t.issues)e.path.length>0?(i[e.path[0]]=i[e.path[0]]||[],i[e.path[0]].push(r(e))):o.push(r(e));return{formErrors:o,fieldErrors:i}}function ct(t,r=i=>i.message){let i={_errors:[]},o=(e,n=[])=>{for(let a of e.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>o({issues:c},[...n,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...n,...a.path]);else{let c=[...n,...a.path];if(c.length===0)i._errors.push(r(a));else{let l=i,u=0;for(;u<c.length;){let d=c[u];u===c.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(r(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}}};return o(t),i}function Un(t,r=i=>i.message){let i={errors:[]},o=(e,n=[])=>{var a,c;for(let l of e.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>o({issues:u},[...n,...l.path]));else if(l.code==="invalid_key")o({issues:l.issues},[...n,...l.path]);else if(l.code==="invalid_element")o({issues:l.issues},[...n,...l.path]);else{let u=[...n,...l.path];if(u.length===0){i.errors.push(r(l));continue}let d=i,p=0;for(;p<u.length;){let _=u[p],$=p===u.length-1;typeof _=="string"?(d.properties??(d.properties={}),(a=d.properties)[_]??(a[_]={errors:[]}),d=d.properties[_]):(d.items??(d.items=[]),(c=d.items)[_]??(c[_]={errors:[]}),d=d.items[_]),$&&d.errors.push(r(l)),p++}}};return o(t),i}function wu(t){let r=[],i=t.map(o=>typeof o=="object"?o.key:o);for(let o of i)typeof o=="number"?r.push(`[${o}]`):typeof o=="symbol"?r.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?r.push(`[${JSON.stringify(o)}]`):(r.length&&r.push("."),r.push(o));return r.join("")}function On(t){let r=[],i=[...t.issues].sort((o,e)=>(o.path??[]).length-(e.path??[]).length);for(let o of i)r.push(`\u2716 ${o.message}`),o.path?.length&&r.push(` \u2192 at ${wu(o.path)}`);return r.join(`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{b as Q}from"./BVUCNXC5.js";var xu,$n=Object.freeze({status:"aborted"});function s(t,r,i){function o(c,l){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(t))return;c._zod.traits.add(t),r(c,l);let u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let _=d[p];_ in c||(c[_]=u[_].bind(c))}}let e=i?.Parent??Object;class n extends e{}Object.defineProperty(n,"name",{value:t});function a(c){var l;let u=i?.Parent?new n:this;o(u,c),(l=u._zod).deferred??(l.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>i?.Parent&&c instanceof i.Parent?!0:c?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}var hn=Symbol("zod_brand"),G=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ne=class extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}};(xu=globalThis).__zod_globalConfig??(xu.__zod_globalConfig={});var pe=globalThis.__zod_globalConfig;function U(t){return t&&Object.assign(pe,t),pe}var v={};Q(v,{BIGINT_FORMAT_RANGES:()=>jn,Class:()=>yn,NUMBER_FORMAT_RANGES:()=>wn,aborted:()=>ce,allowsEval:()=>kn,assert:()=>Sd,assertEqual:()=>xd,assertIs:()=>zd,assertNever:()=>Id,assertNotEqual:()=>kd,assignProp:()=>oe,base64ToUint8Array:()=>zu,base64urlToUint8Array:()=>Vd,cached:()=>ke,captureStackTrace:()=>Dt,cleanEnum:()=>Jd,cleanRegex:()=>tt,clone:()=>T,cloneDef:()=>jd,createTransparentProxy:()=>Nd,defineLazy:()=>z,esc:()=>Zt,escapeRegex:()=>K,explicitlyAborted:()=>Pn,extend:()=>Ad,finalizeIssue:()=>E,floatSafeRemainder:()=>bn,getElementAtPath:()=>Pd,getEnumValues:()=>et,getLengthableOrigin:()=>it,getParsedType:()=>Dd,getSizableOrigin:()=>nt,hexToUint8Array:()=>Kd,isObject:()=>fe,isPlainObject:()=>ae,issue:()=>ze,joinValues:()=>m,jsonStringifyReplacer:()=>xe,merge:()=>Rd,mergeDefs:()=>ee,normalizeParams:()=>h,nullish:()=>ie,numKeys:()=>Zd,objectClone:()=>wd,omit:()=>Ed,optionalKeys:()=>Sn,parsedType:()=>g,partial:()=>Cd,pick:()=>Td,prefixIssues:()=>C,primitiveTypes:()=>In,promiseAllObject:()=>Ud,propertyKeyTypes:()=>rt,randomString:()=>Od,required:()=>Fd,safeExtend:()=>Ld,shallowClone:()=>zn,slugify:()=>xn,stringifyPrimitive:()=>f,uint8ArrayToBase64:()=>Iu,uint8ArrayToBase64url:()=>Md,uint8ArrayToHex:()=>Gd,unwrapMessage:()=>Qe});function xd(t){return t}function kd(t){return t}function zd(t){}function Id(t){throw new Error("Unexpected value in exhaustive check")}function Sd(t){}function et(t){let r=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,e])=>r.indexOf(+o)===-1).map(([o,e])=>e)}function m(t,r="|"){return t.map(i=>f(i)).join(r)}function xe(t,r){return typeof r=="bigint"?r.toString():r}function ke(t){return{get value(){{let i=t();return Object.defineProperty(this,"value",{value:i}),i}throw new Error("cached value already set")}}}function ie(t){return t==null}function tt(t){let r=t.startsWith("^")?1:0,i=t.endsWith("$")?t.length-1:t.length;return t.slice(r,i)}function bn(t,r){let i=t/r,o=Math.round(i),e=Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-o)<e?0:i-o}var ku=Symbol("evaluating");function z(t,r,i){let o;Object.defineProperty(t,r,{get(){if(o!==ku)return o===void 0&&(o=ku,o=i()),o},set(e){Object.defineProperty(t,r,{value:e})},configurable:!0})}function wd(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function oe(t,r,i){Object.defineProperty(t,r,{value:i,writable:!0,enumerable:!0,configurable:!0})}function ee(...t){let r={};for(let i of t){let o=Object.getOwnPropertyDescriptors(i);Object.assign(r,o)}return Object.defineProperties({},r)}function jd(t){return ee(t._zod.def)}function Pd(t,r){return r?r.reduce((i,o)=>i?.[o],t):t}function Ud(t){let r=Object.keys(t),i=r.map(o=>t[o]);return Promise.all(i).then(o=>{let e={};for(let n=0;n<r.length;n++)e[r[n]]=o[n];return e})}function Od(t=10){let r="abcdefghijklmnopqrstuvwxyz",i="";for(let o=0;o<t;o++)i+=r[Math.floor(Math.random()*r.length)];return i}function Zt(t){return JSON.stringify(t)}function xn(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Dt="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function fe(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var kn=ke(()=>{if(pe.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function ae(t){if(fe(t)===!1)return!1;let r=t.constructor;if(r===void 0||typeof r!="function")return!0;let i=r.prototype;return!(fe(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function zn(t){return ae(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Zd(t){let r=0;for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&r++;return r}var Dd=t=>{let r=typeof t;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},rt=new Set(["string","number","symbol"]),In=new Set(["string","number","bigint","boolean","symbol","undefined"]);function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(t,r,i){let o=new t._zod.constr(r??t._zod.def);return(!r||i?.parent)&&(o._zod.parent=t),o}function h(t){let r=t;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Nd(t){let r;return new Proxy({},{get(i,o,e){return r??(r=t()),Reflect.get(r,o,e)},set(i,o,e,n){return r??(r=t()),Reflect.set(r,o,e,n)},has(i,o){return r??(r=t()),Reflect.has(r,o)},deleteProperty(i,o){return r??(r=t()),Reflect.deleteProperty(r,o)},ownKeys(i){return r??(r=t()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(i,o){return r??(r=t()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(i,o,e){return r??(r=t()),Reflect.defineProperty(r,o,e)}})}function f(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Sn(t){return Object.keys(t).filter(r=>t[r]._zod.optin==="optional"&&t[r]._zod.optout==="optional")}var wn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},jn={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Td(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(a[c]=i.shape[c])}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ed(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={...t._zod.def.shape};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&delete a[c]}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ad(t,r){if(!ae(r))throw new Error("Invalid input to extend: expected a plain object");let i=t._zod.def.checks;if(i&&i.length>0){let n=t._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(n,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let e=ee(t._zod.def,{get shape(){let n={...t._zod.def.shape,...r};return oe(this,"shape",n),n}});return T(t,e)}function Ld(t,r){if(!ae(r))throw new Error("Invalid input to safeExtend: expected a plain object");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r};return oe(this,"shape",o),o}});return T(t,i)}function Rd(t,r){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r._zod.def.shape};return oe(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return T(t,i)}function Cd(t,r,i){let e=r._zod.def.checks;if(e&&e.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=ee(r._zod.def,{get shape(){let c=r._zod.def.shape,l={...c};if(i)for(let u in i){if(!(u in c))throw new Error(`Unrecognized key: "${u}"`);i[u]&&(l[u]=t?new t({type:"optional",innerType:c[u]}):c[u])}else for(let u in c)l[u]=t?new t({type:"optional",innerType:c[u]}):c[u];return oe(this,"shape",l),l},checks:[]});return T(r,a)}function Fd(t,r,i){let o=ee(r._zod.def,{get shape(){let e=r._zod.def.shape,n={...e};if(i)for(let a in i){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);i[a]&&(n[a]=new t({type:"nonoptional",innerType:e[a]}))}else for(let a in e)n[a]=new t({type:"nonoptional",innerType:e[a]});return oe(this,"shape",n),n}});return T(r,o)}function ce(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue!==!0)return!0;return!1}function Pn(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue===!1)return!0;return!1}function C(t,r){return r.map(i=>{var o;return(o=i).path??(o.path=[]),i.path.unshift(t),i})}function Qe(t){return typeof t=="string"?t:t?.message}function E(t,r,i){let o=t.message?t.message:Qe(t.inst?._zod.def?.error?.(t))??Qe(r?.error?.(t))??Qe(i.customError?.(t))??Qe(i.localeError?.(t))??"Invalid input",{inst:e,continue:n,input:a,...c}=t;return c.path??(c.path=[]),c.message=o,r?.reportInput&&(c.input=a),c}function nt(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function it(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function g(t){let r=typeof t;switch(r){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let i=t;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return r}function ze(...t){let[r,i,o]=t;return typeof r=="string"?{message:r,code:"custom",input:i,inst:o}:{...r}}function Jd(t){return Object.entries(t).filter(([r,i])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function zu(t){let r=atob(t),i=new Uint8Array(r.length);for(let o=0;o<r.length;o++)i[o]=r.charCodeAt(o);return i}function Iu(t){let r="";for(let i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return btoa(r)}function Vd(t){let r=t.replace(/-/g,"+").replace(/_/g,"/"),i="=".repeat((4-r.length%4)%4);return zu(r+i)}function Md(t){return Iu(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kd(t){let r=t.replace(/^0x/,"");if(r.length%2!==0)throw new Error("Invalid hex string length");let i=new Uint8Array(r.length/2);for(let o=0;o<r.length;o+=2)i[o/2]=Number.parseInt(r.slice(o,o+2),16);return i}function Gd(t){return Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}var yn=class{constructor(...r){}};var Su=(t,r)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:r,enumerable:!1}),t.message=JSON.stringify(r,xe,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ot=s("$ZodError",Su),F=s("$ZodError",Su,{Parent:Error});function at(t,r=i=>i.message){let i={},o=[];for(let e of t.issues)e.path.length>0?(i[e.path[0]]=i[e.path[0]]||[],i[e.path[0]].push(r(e))):o.push(r(e));return{formErrors:o,fieldErrors:i}}function ct(t,r=i=>i.message){let i={_errors:[]},o=(e,n=[])=>{for(let a of e.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>o({issues:c},[...n,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...n,...a.path]);else{let c=[...n,...a.path];if(c.length===0)i._errors.push(r(a));else{let l=i,u=0;for(;u<c.length;){let d=c[u];u===c.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(r(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}}};return o(t),i}function Un(t,r=i=>i.message){let i={errors:[]},o=(e,n=[])=>{var a,c;for(let l of e.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>o({issues:u},[...n,...l.path]));else if(l.code==="invalid_key")o({issues:l.issues},[...n,...l.path]);else if(l.code==="invalid_element")o({issues:l.issues},[...n,...l.path]);else{let u=[...n,...l.path];if(u.length===0){i.errors.push(r(l));continue}let d=i,p=0;for(;p<u.length;){let _=u[p],$=p===u.length-1;typeof _=="string"?(d.properties??(d.properties={}),(a=d.properties)[_]??(a[_]={errors:[]}),d=d.properties[_]):(d.items??(d.items=[]),(c=d.items)[_]??(c[_]={errors:[]}),d=d.items[_]),$&&d.errors.push(r(l)),p++}}};return o(t),i}function wu(t){let r=[],i=t.map(o=>typeof o=="object"?o.key:o);for(let o of i)typeof o=="number"?r.push(`[${o}]`):typeof o=="symbol"?r.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?r.push(`[${JSON.stringify(o)}]`):(r.length&&r.push("."),r.push(o));return r.join("")}function On(t){let r=[],i=[...t.issues].sort((o,e)=>(o.path??[]).length-(e.path??[]).length);for(let o of i)r.push(`\u2716 ${o.message}`),o.path?.length&&r.push(` \u2192 at ${wu(o.path)}`);return r.join(`
3
3
  `)}var V={};Q(V,{base64:()=>Wn,base64url:()=>Nt,bigint:()=>ei,boolean:()=>ri,browserEmail:()=>tm,cidrv4:()=>Kn,cidrv6:()=>Gn,cuid:()=>Zn,cuid2:()=>Dn,date:()=>qn,datetime:()=>Hn,domain:()=>im,duration:()=>Ln,e164:()=>Xn,email:()=>Cn,emoji:()=>Fn,extendedDuration:()=>Bd,guid:()=>Rn,hex:()=>om,hostname:()=>nm,html5Email:()=>Hd,httpProtocol:()=>Bn,idnEmail:()=>em,integer:()=>ti,ipv4:()=>Jn,ipv6:()=>Vn,ksuid:()=>En,lowercase:()=>oi,mac:()=>Mn,md5_base64:()=>cm,md5_base64url:()=>um,md5_hex:()=>am,nanoid:()=>An,null:()=>ni,number:()=>Tt,rfc5322Email:()=>Qd,sha1_base64:()=>sm,sha1_base64url:()=>dm,sha1_hex:()=>lm,sha256_base64:()=>pm,sha256_base64url:()=>fm,sha256_hex:()=>mm,sha384_base64:()=>vm,sha384_base64url:()=>$m,sha384_hex:()=>gm,sha512_base64:()=>_m,sha512_base64url:()=>ym,sha512_hex:()=>hm,string:()=>Qn,time:()=>Yn,ulid:()=>Nn,undefined:()=>ii,unicodeEmail:()=>ju,uppercase:()=>ai,uuid:()=>ge,uuid4:()=>Xd,uuid6:()=>qd,uuid7:()=>Yd,xid:()=>Tn});var Zn=/^[cC][0-9a-z]{6,}$/,Dn=/^[0-9a-z]+$/,Nn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Tn=/^[0-9a-vA-V]{20}$/,En=/^[A-Za-z0-9]{27}$/,An=/^[a-zA-Z0-9_-]{21}$/,Ln=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Bd=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Rn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ge=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Xd=ge(4),qd=ge(6),Yd=ge(7),Cn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hd=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Qd=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ju=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,em=ju,tm=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fn(){return new RegExp(rm,"u")}var Jn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Vn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Mn=t=>{let r=K(t??":");return new RegExp(`^(?:[0-9A-F]{2}${r}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${r}){5}[0-9a-f]{2}$`)},Kn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Gn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Wn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Nt=/^[A-Za-z0-9_-]*$/,nm=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,im=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Bn=/^https?$/,Xn=/^\+[1-9]\d{6,14}$/,Pu="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",qn=new RegExp(`^${Pu}$`);function Uu(t){let r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${r}`:t.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${t.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yn(t){return new RegExp(`^${Uu(t)}$`)}function Hn(t){let r=Uu({precision:t.precision}),i=["Z"];t.local&&i.push(""),t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${r}(?:${i.join("|")})`;return new RegExp(`^${Pu}T(?:${o})$`)}var Qn=t=>{let r=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},ei=/^-?\d+n?$/,ti=/^-?\d+$/,Tt=/^-?\d+(?:\.\d+)?$/,ri=/^(?:true|false)$/i,ni=/^null$/i;var ii=/^undefined$/i;var oi=/^[^A-Z]*$/,ai=/^[^a-z]*$/,om=/^[0-9a-fA-F]*$/;function ut(t,r){return new RegExp(`^[A-Za-z0-9+/]{${t}}${r}$`)}function lt(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var am=/^[0-9a-fA-F]{32}$/,cm=ut(22,"=="),um=lt(22),lm=/^[0-9a-fA-F]{40}$/,sm=ut(27,"="),dm=lt(27),mm=/^[0-9a-fA-F]{64}$/,pm=ut(43,"="),fm=lt(43),gm=/^[0-9a-fA-F]{96}$/,vm=ut(64,""),$m=lt(64),hm=/^[0-9a-fA-F]{128}$/,_m=ut(86,"=="),ym=lt(86);var j=s("$ZodCheck",(t,r)=>{var i;t._zod??(t._zod={}),t._zod.def=r,(i=t._zod).onattach??(i.onattach=[])}),Zu={number:"number",bigint:"bigint",object:"date"},Et=s("$ZodCheckLessThan",(t,r)=>{j.init(t,r);let i=Zu[typeof r.value];t._zod.onattach.push(o=>{let e=o._zod.bag,n=(r.inclusive?e.maximum:e.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<n&&(r.inclusive?e.maximum=r.value:e.exclusiveMaximum=r.value)}),t._zod.check=o=>{(r.inclusive?o.value<=r.value:o.value<r.value)||o.issues.push({origin:i,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:t,continue:!r.abort})}}),At=s("$ZodCheckGreaterThan",(t,r)=>{j.init(t,r);let i=Zu[typeof r.value];t._zod.onattach.push(o=>{let e=o._zod.bag,n=(r.inclusive?e.minimum:e.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>n&&(r.inclusive?e.minimum=r.value:e.exclusiveMinimum=r.value)}),t._zod.check=o=>{(r.inclusive?o.value>=r.value:o.value>r.value)||o.issues.push({origin:i,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:t,continue:!r.abort})}}),ci=s("$ZodCheckMultipleOf",(t,r)=>{j.init(t,r),t._zod.onattach.push(i=>{var o;(o=i._zod.bag).multipleOf??(o.multipleOf=r.value)}),t._zod.check=i=>{if(typeof i.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%r.value===BigInt(0):bn(i.value,r.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:r.value,input:i.value,inst:t,continue:!r.abort})}}),ui=s("$ZodCheckNumberFormat",(t,r)=>{j.init(t,r),r.format=r.format||"float64";let i=r.format?.includes("int"),o=i?"int":"number",[e,n]=wn[r.format];t._zod.onattach.push(a=>{let c=a._zod.bag;c.format=r.format,c.minimum=e,c.maximum=n,i&&(c.pattern=ti)}),t._zod.check=a=>{let c=a.value;if(i){if(!Number.isInteger(c)){a.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:c,inst:t});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!r.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!r.abort});return}}c<e&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:e,inclusive:!0,inst:t,continue:!r.abort}),c>n&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!r.abort})}}),li=s("$ZodCheckBigIntFormat",(t,r)=>{j.init(t,r);let[i,o]=jn[r.format];t._zod.onattach.push(e=>{let n=e._zod.bag;n.format=r.format,n.minimum=i,n.maximum=o}),t._zod.check=e=>{let n=e.value;n<i&&e.issues.push({origin:"bigint",input:n,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!r.abort}),n>o&&e.issues.push({origin:"bigint",input:n,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!r.abort})}}),si=s("$ZodCheckMaxSize",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<e&&(o._zod.bag.maximum=r.maximum)}),t._zod.check=o=>{let e=o.value;e.size<=r.maximum||o.issues.push({origin:nt(e),code:"too_big",maximum:r.maximum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),di=s("$ZodCheckMinSize",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>e&&(o._zod.bag.minimum=r.minimum)}),t._zod.check=o=>{let e=o.value;e.size>=r.minimum||o.issues.push({origin:nt(e),code:"too_small",minimum:r.minimum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),mi=s("$ZodCheckSizeEquals",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag;e.minimum=r.size,e.maximum=r.size,e.size=r.size}),t._zod.check=o=>{let e=o.value,n=e.size;if(n===r.size)return;let a=n>r.size;o.issues.push({origin:nt(e),...a?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!r.abort})}}),pi=s("$ZodCheckMaxLength",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<e&&(o._zod.bag.maximum=r.maximum)}),t._zod.check=o=>{let e=o.value;if(e.length<=r.maximum)return;let a=it(e);o.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),fi=s("$ZodCheckMinLength",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>e&&(o._zod.bag.minimum=r.minimum)}),t._zod.check=o=>{let e=o.value;if(e.length>=r.minimum)return;let a=it(e);o.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),gi=s("$ZodCheckLengthEquals",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag;e.minimum=r.length,e.maximum=r.length,e.length=r.length}),t._zod.check=o=>{let e=o.value,n=e.length;if(n===r.length)return;let a=it(e),c=n>r.length;o.issues.push({origin:a,...c?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!r.abort})}}),Ie=s("$ZodCheckStringFormat",(t,r)=>{var i,o;j.init(t,r),t._zod.onattach.push(e=>{let n=e._zod.bag;n.format=r.format,r.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(r.pattern))}),r.pattern?(i=t._zod).check??(i.check=e=>{r.pattern.lastIndex=0,!r.pattern.test(e.value)&&e.issues.push({origin:"string",code:"invalid_format",format:r.format,input:e.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:t,continue:!r.abort})}):(o=t._zod).check??(o.check=()=>{})}),vi=s("$ZodCheckRegex",(t,r)=>{Ie.init(t,r),t._zod.check=i=>{r.pattern.lastIndex=0,!r.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:r.pattern.toString(),inst:t,continue:!r.abort})}}),$i=s("$ZodCheckLowerCase",(t,r)=>{r.pattern??(r.pattern=oi),Ie.init(t,r)}),hi=s("$ZodCheckUpperCase",(t,r)=>{r.pattern??(r.pattern=ai),Ie.init(t,r)}),_i=s("$ZodCheckIncludes",(t,r)=>{j.init(t,r);let i=K(r.includes),o=new RegExp(typeof r.position=="number"?`^.{${r.position}}${i}`:i);r.pattern=o,t._zod.onattach.push(e=>{let n=e._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),t._zod.check=e=>{e.value.includes(r.includes,r.position)||e.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:e.value,inst:t,continue:!r.abort})}}),yi=s("$ZodCheckStartsWith",(t,r)=>{j.init(t,r);let i=new RegExp(`^${K(r.prefix)}.*`);r.pattern??(r.pattern=i),t._zod.onattach.push(o=>{let e=o._zod.bag;e.patterns??(e.patterns=new Set),e.patterns.add(i)}),t._zod.check=o=>{o.value.startsWith(r.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:t,continue:!r.abort})}}),bi=s("$ZodCheckEndsWith",(t,r)=>{j.init(t,r);let i=new RegExp(`.*${K(r.suffix)}$`);r.pattern??(r.pattern=i),t._zod.onattach.push(o=>{let e=o._zod.bag;e.patterns??(e.patterns=new Set),e.patterns.add(i)}),t._zod.check=o=>{o.value.endsWith(r.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:t,continue:!r.abort})}});function Ou(t,r,i){t.issues.length&&r.issues.push(...C(i,t.issues))}var xi=s("$ZodCheckProperty",(t,r)=>{j.init(t,r),t._zod.check=i=>{let o=r.schema._zod.run({value:i.value[r.property],issues:[]},{});if(o instanceof Promise)return o.then(e=>Ou(e,i,r.property));Ou(o,i,r.property)}}),ki=s("$ZodCheckMimeType",(t,r)=>{j.init(t,r);let i=new Set(r.mime);t._zod.onattach.push(o=>{o._zod.bag.mime=r.mime}),t._zod.check=o=>{i.has(o.value.type)||o.issues.push({code:"invalid_value",values:r.mime,input:o.value.type,inst:t,continue:!r.abort})}}),zi=s("$ZodCheckOverwrite",(t,r)=>{j.init(t,r),t._zod.check=i=>{i.value=r.tx(i.value)}});var st=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let o=r.split(`
4
4
  `).filter(a=>a),e=Math.min(...o.map(a=>a.length-a.trimStart().length)),n=o.map(a=>a.slice(e)).map(a=>" ".repeat(this.indent*2)+a);for(let a of n)this.content.push(a)}compile(){let r=Function,i=this?.args,e=[...(this?.content??[""]).map(n=>` ${n}`)];return new r(...i,e.join(`
5
5
  `))}};var Se=t=>(r,i,o,e)=>{let n=o?{...o,async:!1}:{async:!1},a=r._zod.run({value:i,issues:[]},n);if(a instanceof Promise)throw new G;if(a.issues.length){let c=new(e?.Err??t)(a.issues.map(l=>E(l,n,U())));throw Dt(c,e?.callee),c}return a.value},Lt=Se(F),we=t=>async(r,i,o,e)=>{let n=o?{...o,async:!0}:{async:!0},a=r._zod.run({value:i,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(e?.Err??t)(a.issues.map(l=>E(l,n,U())));throw Dt(c,e?.callee),c}return a.value},Rt=we(F),je=t=>(r,i,o)=>{let e=o?{...o,async:!1}:{async:!1},n=r._zod.run({value:i,issues:[]},e);if(n instanceof Promise)throw new G;return n.issues.length?{success:!1,error:new(t??ot)(n.issues.map(a=>E(a,e,U())))}:{success:!0,data:n.value}},Ii=je(F),Pe=t=>async(r,i,o)=>{let e=o?{...o,async:!0}:{async:!0},n=r._zod.run({value:i,issues:[]},e);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new t(n.issues.map(a=>E(a,e,U())))}:{success:!0,data:n.value}},Si=Pe(F),Ct=t=>(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return Se(t)(r,i,e)},bm=Ct(F),Ft=t=>(r,i,o)=>Se(t)(r,i,o),xm=Ft(F),Jt=t=>async(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return we(t)(r,i,e)},km=Jt(F),Vt=t=>async(r,i,o)=>we(t)(r,i,o),zm=Vt(F),Mt=t=>(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return je(t)(r,i,e)},Im=Mt(F),Kt=t=>(r,i,o)=>je(t)(r,i,o),Sm=Kt(F),Gt=t=>async(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return Pe(t)(r,i,e)},wm=Gt(F),Wt=t=>async(r,i,o)=>Pe(t)(r,i,o),jm=Wt(F);var wi={major:4,minor:4,patch:3};var x=s("$ZodType",(t,r)=>{var i;t??(t={}),t._zod.def=r,t._zod.bag=t._zod.bag||{},t._zod.version=wi;let o=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&o.unshift(t);for(let e of o)for(let n of e._zod.onattach)n(t);if(o.length===0)(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let e=(a,c,l)=>{let u=ce(a),d;for(let p of c){if(p._zod.def.when){if(Pn(a)||!p._zod.def.when(a))continue}else if(u)continue;let _=a.issues.length,$=p._zod.check(a);if($ instanceof Promise&&l?.async===!1)throw new G;if(d||$ instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await $,a.issues.length!==_&&(u||(u=ce(a,_)))});else{if(a.issues.length===_)continue;u||(u=ce(a,_))}}return d?d.then(()=>a):a},n=(a,c,l)=>{if(ce(a))return a.aborted=!0,a;let u=e(c,o,l);if(u instanceof Promise){if(l.async===!1)throw new G;return u.then(d=>t._zod.parse(d,l))}return t._zod.parse(u,l)};t._zod.run=(a,c)=>{if(c.skipChecks)return t._zod.parse(a,c);if(c.direction==="backward"){let u=t._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return u instanceof Promise?u.then(d=>n(d,a,c)):n(u,a,c)}let l=t._zod.parse(a,c);if(l instanceof Promise){if(c.async===!1)throw new G;return l.then(u=>e(u,o,c))}return e(l,o,c)}}z(t,"~standard",()=>({validate:e=>{try{let n=Ii(t,e);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Si(t,e).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),ve=s("$ZodString",(t,r)=>{x.init(t,r),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Qn(t._zod.bag),t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:t}),i}}),S=s("$ZodStringFormat",(t,r)=>{Ie.init(t,r),ve.init(t,r)}),Pi=s("$ZodGUID",(t,r)=>{r.pattern??(r.pattern=Rn),S.init(t,r)}),Ui=s("$ZodUUID",(t,r)=>{if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=ge(o))}else r.pattern??(r.pattern=ge());S.init(t,r)}),Oi=s("$ZodEmail",(t,r)=>{r.pattern??(r.pattern=Cn),S.init(t,r)}),Zi=s("$ZodURL",(t,r)=>{S.init(t,r),t._zod.check=i=>{try{let o=i.value.trim();if(!r.normalize&&r.protocol?.source===Bn.source&&!/^https?:\/\//i.test(o)){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:t,continue:!r.abort});return}let e=new URL(o);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(e.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:i.value,inst:t,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:i.value,inst:t,continue:!r.abort})),r.normalize?i.value=e.href:i.value=o;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:t,continue:!r.abort})}}}),Di=s("$ZodEmoji",(t,r)=>{r.pattern??(r.pattern=Fn()),S.init(t,r)}),Ni=s("$ZodNanoID",(t,r)=>{r.pattern??(r.pattern=An),S.init(t,r)}),Ti=s("$ZodCUID",(t,r)=>{r.pattern??(r.pattern=Zn),S.init(t,r)}),Ei=s("$ZodCUID2",(t,r)=>{r.pattern??(r.pattern=Dn),S.init(t,r)}),Ai=s("$ZodULID",(t,r)=>{r.pattern??(r.pattern=Nn),S.init(t,r)}),Li=s("$ZodXID",(t,r)=>{r.pattern??(r.pattern=Tn),S.init(t,r)}),Ri=s("$ZodKSUID",(t,r)=>{r.pattern??(r.pattern=En),S.init(t,r)}),Ci=s("$ZodISODateTime",(t,r)=>{r.pattern??(r.pattern=Hn(r)),S.init(t,r)}),Fi=s("$ZodISODate",(t,r)=>{r.pattern??(r.pattern=qn),S.init(t,r)}),Ji=s("$ZodISOTime",(t,r)=>{r.pattern??(r.pattern=Yn(r)),S.init(t,r)}),Vi=s("$ZodISODuration",(t,r)=>{r.pattern??(r.pattern=Ln),S.init(t,r)}),Mi=s("$ZodIPv4",(t,r)=>{r.pattern??(r.pattern=Jn),S.init(t,r),t._zod.bag.format="ipv4"}),Ki=s("$ZodIPv6",(t,r)=>{r.pattern??(r.pattern=Vn),S.init(t,r),t._zod.bag.format="ipv6",t._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:t,continue:!r.abort})}}}),Gi=s("$ZodMAC",(t,r)=>{r.pattern??(r.pattern=Mn(r.delimiter)),S.init(t,r),t._zod.bag.format="mac"}),Wi=s("$ZodCIDRv4",(t,r)=>{r.pattern??(r.pattern=Kn),S.init(t,r)}),Bi=s("$ZodCIDRv6",(t,r)=>{r.pattern??(r.pattern=Gn),S.init(t,r),t._zod.check=i=>{let o=i.value.split("/");try{if(o.length!==2)throw new Error;let[e,n]=o;if(!n)throw new Error;let a=Number(n);if(`${a}`!==n)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${e}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:t,continue:!r.abort})}}});function Xi(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var qi=s("$ZodBase64",(t,r)=>{r.pattern??(r.pattern=Wn),S.init(t,r),t._zod.bag.contentEncoding="base64",t._zod.check=i=>{Xi(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:t,continue:!r.abort})}});function Bu(t){if(!Nt.test(t))return!1;let r=t.replace(/[-_]/g,o=>o==="-"?"+":"/"),i=r.padEnd(Math.ceil(r.length/4)*4,"=");return Xi(i)}var Yi=s("$ZodBase64URL",(t,r)=>{r.pattern??(r.pattern=Nt),S.init(t,r),t._zod.bag.contentEncoding="base64url",t._zod.check=i=>{Bu(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:t,continue:!r.abort})}}),Hi=s("$ZodE164",(t,r)=>{r.pattern??(r.pattern=Xn),S.init(t,r)});function Xu(t,r=null){try{let i=t.split(".");if(i.length!==3)return!1;let[o]=i;if(!o)return!1;let e=JSON.parse(atob(o));return!("typ"in e&&e?.typ!=="JWT"||!e.alg||r&&(!("alg"in e)||e.alg!==r))}catch{return!1}}var Qi=s("$ZodJWT",(t,r)=>{S.init(t,r),t._zod.check=i=>{Xu(i.value,r.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:t,continue:!r.abort})}}),eo=s("$ZodCustomStringFormat",(t,r)=>{S.init(t,r),t._zod.check=i=>{r.fn(i.value)||i.issues.push({code:"invalid_format",format:r.format,input:i.value,inst:t,continue:!r.abort})}}),Ht=s("$ZodNumber",(t,r)=>{x.init(t,r),t._zod.pattern=t._zod.bag.pattern??Tt,t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=Number(i.value)}catch{}let e=i.value;if(typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e))return i;let n=typeof e=="number"?Number.isNaN(e)?"NaN":Number.isFinite(e)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:e,inst:t,...n?{received:n}:{}}),i}}),to=s("$ZodNumberFormat",(t,r)=>{ui.init(t,r),Ht.init(t,r)}),dt=s("$ZodBoolean",(t,r)=>{x.init(t,r),t._zod.pattern=ri,t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=!!i.value}catch{}let e=i.value;return typeof e=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:e,inst:t}),i}}),Qt=s("$ZodBigInt",(t,r)=>{x.init(t,r),t._zod.pattern=ei,t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=BigInt(i.value)}catch{}return typeof i.value=="bigint"||i.issues.push({expected:"bigint",code:"invalid_type",input:i.value,inst:t}),i}}),ro=s("$ZodBigIntFormat",(t,r)=>{li.init(t,r),Qt.init(t,r)}),no=s("$ZodSymbol",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{let e=i.value;return typeof e=="symbol"||i.issues.push({expected:"symbol",code:"invalid_type",input:e,inst:t}),i}}),io=s("$ZodUndefined",(t,r)=>{x.init(t,r),t._zod.pattern=ii,t._zod.values=new Set([void 0]),t._zod.parse=(i,o)=>{let e=i.value;return typeof e>"u"||i.issues.push({expected:"undefined",code:"invalid_type",input:e,inst:t}),i}}),oo=s("$ZodNull",(t,r)=>{x.init(t,r),t._zod.pattern=ni,t._zod.values=new Set([null]),t._zod.parse=(i,o)=>{let e=i.value;return e===null||i.issues.push({expected:"null",code:"invalid_type",input:e,inst:t}),i}}),ao=s("$ZodAny",(t,r)=>{x.init(t,r),t._zod.parse=i=>i}),co=s("$ZodUnknown",(t,r)=>{x.init(t,r),t._zod.parse=i=>i}),uo=s("$ZodNever",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:t}),i)}),lo=s("$ZodVoid",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{let e=i.value;return typeof e>"u"||i.issues.push({expected:"void",code:"invalid_type",input:e,inst:t}),i}}),so=s("$ZodDate",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=new Date(i.value)}catch{}let e=i.value,n=e instanceof Date;return n&&!Number.isNaN(e.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:e,...n?{received:"Invalid Date"}:{},inst:t}),i}});function Nu(t,r,i){t.issues.length&&r.issues.push(...C(i,t.issues)),r.value[i]=t.value}var mo=s("$ZodArray",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{let e=i.value;if(!Array.isArray(e))return i.issues.push({expected:"array",code:"invalid_type",input:e,inst:t}),i;i.value=Array(e.length);let n=[];for(let a=0;a<e.length;a++){let c=e[a],l=r.element._zod.run({value:c,issues:[]},o);l instanceof Promise?n.push(l.then(u=>Nu(u,i,a))):Nu(l,i,a)}return n.length?Promise.all(n).then(()=>i):i}});function Yt(t,r,i,o,e,n){let a=i in o;if(t.issues.length){if(e&&n&&!a)return;r.issues.push(...C(i,t.issues))}if(!a&&!e){t.issues.length||r.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}t.value===void 0?a&&(r.value[i]=void 0):r.value[i]=t.value}function qu(t){let r=Object.keys(t.shape);for(let o of r)if(!t.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let i=Sn(t.shape);return{...t,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(i)}}function Yu(t,r,i,o,e,n){let a=[],c=e.keySet,l=e.catchall._zod,u=l.def.type,d=l.optin==="optional",p=l.optout==="optional";for(let _ in r){if(_==="__proto__"||c.has(_))continue;if(u==="never"){a.push(_);continue}let $=l.run({value:r[_],issues:[]},o);$ instanceof Promise?t.push($.then(b=>Yt(b,i,_,r,d,p))):Yt($,i,_,r,d,p)}return a.length&&i.issues.push({code:"unrecognized_keys",keys:a,input:r,inst:n}),t.length?Promise.all(t).then(()=>i):i}var Hu=s("$ZodObject",(t,r)=>{if(x.init(t,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){let c=r.shape;Object.defineProperty(r,"shape",{get:()=>{let l={...c};return Object.defineProperty(r,"shape",{value:l}),l}})}let o=ke(()=>qu(r));z(t._zod,"propValues",()=>{let c=r.shape,l={};for(let u in c){let d=c[u]._zod;if(d.values){l[u]??(l[u]=new Set);for(let p of d.values)l[u].add(p)}}return l});let e=fe,n=r.catchall,a;t._zod.parse=(c,l)=>{a??(a=o.value);let u=c.value;if(!e(u))return c.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),c;c.value={};let d=[],p=a.shape;for(let _ of a.keys){let $=p[_],b=$._zod.optin==="optional",R=$._zod.optout==="optional",O=$._zod.run({value:u[_],issues:[]},l);O instanceof Promise?d.push(O.then(vn=>Yt(vn,c,_,u,b,R))):Yt(O,c,_,u,b,R)}return n?Yu(d,u,c,l,o.value,t):d.length?Promise.all(d).then(()=>c):c}}),po=s("$ZodObjectJIT",(t,r)=>{Hu.init(t,r);let i=t._zod.parse,o=ke(()=>qu(r)),e=_=>{let $=new st(["shape","payload","ctx"]),b=o.value,R=B=>{let P=Zt(B);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};$.write("const input = payload.value;");let O=Object.create(null),vn=0;for(let B of b.keys)O[B]=`key_${vn++}`;$.write("const newResult = {};");for(let B of b.keys){let P=O[B],Z=Zt(B),yu=_[B],bu=yu?._zod?.optin==="optional",bd=yu?._zod?.optout==="optional";$.write(`const ${P} = ${R(B)};`),bu&&bd?$.write(`
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./RHYNE5OE.js";import{a as t}from"./FDOMMK2M.js";import{a as l}from"./ONQ6JSBJ.js";import{Dc as d}from"./AI6DYOKR.js";import{a}from"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([o])=>{var g=.7,b=10;async function S(i){let{query:e,layerIds:s,includeSummaryStatistics:r=!1,fieldSearch:c,layersAndFieldsRegistry:m,embeddingCache:y,mapView:u,minScore:f=g,topResults:h=b}=i,n=await c.searchFields({text:e,layerIds:s,minScore:f,topResults:h,embeddingCache:y}),p=await o(n,m,u,r);return{matches:n,...p}}var v=a.object({query:a.string().describe("A concise semantic description of the fields relevant to the user's task."),layerIds:a.array(a.string()).min(1).describe("Layer IDs returned by findRelevantLayers, restricted to layers relevant to the current task."),includeSummaryStatistics:a.boolean().optional().default(!1).describe("Set to true only when the task directly asks for numeric summaries such as average, minimum, maximum, total, variance, or range.")});async function w(i,e){let{mapView:s}=l(e,["mapView"]),r=await S({...i,fieldSearch:t(e,"fieldSearch"),layersAndFieldsRegistry:t(e,"layersAndFieldsRegistry"),embeddingCache:t(e,"embeddingCache"),mapView:s});return JSON.stringify(r,null,2)}var A=d(w,{name:"findRelevantFields",description:"Finds relevant fields within candidate layers. Returns ranked matches, field metadata, categorical values, and optional numeric summary statistics. Call findRelevantLayers first when layer IDs are not already known.",schema:v});return A},b)
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import b from"./OF3TAARW.js";import{a as t}from"./V4PJMCJZ.js";import{a as l}from"./A6LBMS7A.js";import{Dc as d}from"./M2U456J5.js";import{a}from"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([o])=>{var g=.7,b=10;async function S(i){let{query:e,layerIds:s,includeSummaryStatistics:r=!1,fieldSearch:c,layersAndFieldsRegistry:m,embeddingCache:y,mapView:u,minScore:f=g,topResults:h=b}=i,n=await c.searchFields({text:e,layerIds:s,minScore:f,topResults:h,embeddingCache:y}),p=await o(n,m,u,r);return{matches:n,...p}}var v=a.object({query:a.string().describe("A concise semantic description of the fields relevant to the user's task."),layerIds:a.array(a.string()).min(1).describe("Layer IDs returned by findRelevantLayers, restricted to layers relevant to the current task."),includeSummaryStatistics:a.boolean().optional().default(!1).describe("Set to true only when the task directly asks for numeric summaries such as average, minimum, maximum, total, variance, or range.")});async function w(i,e){let{mapView:s}=l(e,["mapView"]),r=await S({...i,fieldSearch:t(e,"fieldSearch"),layersAndFieldsRegistry:t(e,"layersAndFieldsRegistry"),embeddingCache:t(e,"embeddingCache"),mapView:s});return JSON.stringify(r,null,2)}var A=d(w,{name:"findRelevantFields",description:"Finds relevant fields within candidate layers. Returns ranked matches, field metadata, categorical values, and optional numeric summary statistics. Call findRelevantLayers first when layer IDs are not already known.",schema:v});return A},b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import n from"./FK2CVSXW.js";import"./2F4TPWZQ.js";import m from"./ZY3JQCZQ.js";import{c as s,d as p}from"./SNG3WODY.js";import"./M5B6X46F.js";import l from"./VK6CCPTG.js";import"./LXIKAXUT.js";import k from"./M3KKORBG.js";import j from"./3PPXAIRE.js";import i from"./XVJFPZTW.js";import h from"./YOW3YKWR.js";import g from"./KKCLHXHG.js";import"./LLY5A2E2.js";import"./X42ACC66.js";import"./V4PJMCJZ.js";import f from"./EK3PM4L5.js";import"./T6W6F4TF.js";import"./CKUUYQLO.js";import d from"./KBSXHSBX.js";import"./275FFTBE.js";import"./TFAJNKBC.js";import"./HV7MVIQV.js";import"./OALQBAZR.js";import"./4YOG5F3W.js";import c from"./2LVYAXHG.js";import"./4OI4QEV7.js";import"./SJMAKF4P.js";import"./TXZQZR3I.js";import b from"./STOGCXJH.js";import a from"./VGLBH473.js";import"./A6LBMS7A.js";import{v as e,z as o}from"./S5GFNIHC.js";import"./TLPZELG3.js";import"./V52GSTOC.js";import"./477I66FH.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([,,,,,,,,,{fetchKnowledgeGraph:n},,,,,,,,,,,,,m])=>{var r=class extends e{constructor(){super(...arguments),this.agent=m}static{this.properties={referenceElement:1,serviceUrl:3,context:0}}#i;#r;#t;#e;get serviceUrl(){return this.#r}set serviceUrl(t){this.#r=t}async getContext(){let t=this.context?{...this.context,knowledgeGraph:void 0,view:void 0}:{};if(this.#i)return{...t,view:this.#i};if(this.#t)try{let i=await this.#t;return{...t,knowledgeGraph:i}}catch(i){console.error("Failed to load knowledge graph via service URL:",i)}if(!this.context?.knowledgeGraph&&!this.context?.view)throw new Error("arcgis-assistant-knowledge-agent requires either a knowledgeGraph or view in context, and neither were provided");return this.context}willUpdate(t){t.has("serviceUrl")&&this.serviceUrl?this.#t=n(this.serviceUrl):this.#t=void 0}load(){this.#i=p(this)??void 0,this.#e=s(this)}disconnectedCallback(){this.#e?.unregister(this.agent.id),super.disconnectedCallback()}};o("arcgis-assistant-knowledge-agent",r);return r},"identity/IdentityManager","portal/Portal","request","config","core/reactiveUtils","layers/FeatureLayer","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/knowledgeGraphService",a,b,c,d,f,g,h,i,j,k,l,m,n)
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{c}from"./R2PQVY4O.js";export default $arcgis.t(([l,{property:i,subclass:y},{watch:d}])=>{var w=Object.defineProperty,g=Object.getOwnPropertyDescriptor,t=(s,a,p,o)=>{for(var r=o>1?void 0:o?g(a,p):a,h=s.length-1,n;h>=0;h--)(n=s[h])&&(r=(o?n(a,p,r):n(r))||r);return o&&r&&w(a,p,r),r},m=()=>{throw new Error("createGraph method not implemented.")},e=class extends l{constructor(){super(...arguments),this.description="",this.middlewares=[],this.createGraph=m,this.workspace=c()}initialize(){this.addHandles([d(()=>[this.name,this.description],()=>this.generate(),{initial:!0,sync:!0}),d(()=>this.createGraph,()=>this._compiledGraph=void 0)])}get id(){return this.name.replace(/\s+/gu,"-").toLowerCase()}get registration(){return{id:this.id,name:this.name,description:this.description,createGraph:this.createGraph,workspace:this.workspace}}async run(s={},a){return this.createGraph===m&&this.generate(),this._compiledGraph=this._compiledGraph??this.createGraph().compile(),await this._compiledGraph.invoke(s,a)}};t([i({readOnly:!0})],e.prototype,"id",1);t([i()],e.prototype,"name",2);t([i()],e.prototype,"description",2);t([i()],e.prototype,"middlewares",2);t([i({readOnly:!0})],e.prototype,"createGraph",2);t([i({readOnly:!0})],e.prototype,"workspace",2);t([i({readOnly:!0})],e.prototype,"registration",1);e=t([y("BaseAgent")],e);return e},"core/Accessor","core/accessorSupport/decorators","core/reactiveUtils")
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{c}from"./2WXXSZP5.js";export default $arcgis.t(([l,{property:i,subclass:y},{watch:d}])=>{var w=Object.defineProperty,g=Object.getOwnPropertyDescriptor,t=(s,a,p,o)=>{for(var r=o>1?void 0:o?g(a,p):a,h=s.length-1,n;h>=0;h--)(n=s[h])&&(r=(o?n(a,p,r):n(r))||r);return o&&r&&w(a,p,r),r},m=()=>{throw new Error("createGraph method not implemented.")},e=class extends l{constructor(){super(...arguments),this.description="",this.middlewares=[],this.createGraph=m,this.workspace=c()}initialize(){this.addHandles([d(()=>[this.name,this.description],()=>this.generate(),{initial:!0,sync:!0}),d(()=>this.createGraph,()=>this._compiledGraph=void 0)])}get id(){return this.name.replace(/\s+/gu,"-").toLowerCase()}get registration(){return{id:this.id,name:this.name,description:this.description,createGraph:this.createGraph,workspace:this.workspace}}async run(s={},a){return this.createGraph===m&&this.generate(),this._compiledGraph=this._compiledGraph??this.createGraph().compile(),await this._compiledGraph.invoke(s,a)}};t([i({readOnly:!0})],e.prototype,"id",1);t([i()],e.prototype,"name",2);t([i()],e.prototype,"description",2);t([i()],e.prototype,"middlewares",2);t([i({readOnly:!0})],e.prototype,"createGraph",2);t([i({readOnly:!0})],e.prototype,"workspace",2);t([i({readOnly:!0})],e.prototype,"registration",1);e=t([y("BaseAgent")],e);return e},"core/Accessor","core/accessorSupport/decorators","core/reactiveUtils")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import p from"./XRVGYRXL.js";import"./2F4TPWZQ.js";import n from"./ZY3JQCZQ.js";import{a as o,c as m}from"./SNG3WODY.js";import"./M5B6X46F.js";import l from"./VK6CCPTG.js";import"./LXIKAXUT.js";import k from"./M3KKORBG.js";import j from"./3PPXAIRE.js";import h from"./XVJFPZTW.js";import g from"./YOW3YKWR.js";import f from"./KKCLHXHG.js";import"./LLY5A2E2.js";import"./X42ACC66.js";import"./V4PJMCJZ.js";import e from"./EK3PM4L5.js";import"./T6W6F4TF.js";import"./CKUUYQLO.js";import d from"./KBSXHSBX.js";import"./275FFTBE.js";import"./TFAJNKBC.js";import"./HV7MVIQV.js";import"./OALQBAZR.js";import"./4YOG5F3W.js";import c from"./2LVYAXHG.js";import"./4OI4QEV7.js";import"./SJMAKF4P.js";import"./TXZQZR3I.js";import b from"./STOGCXJH.js";import a from"./VGLBH473.js";import"./A6LBMS7A.js";import{v as i,z as r}from"./S5GFNIHC.js";import"./TLPZELG3.js";import"./V52GSTOC.js";import"./477I66FH.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([,,,,,,,,,,,,,,,,,,,,,,{b:p}])=>{var t=class extends i{constructor(){super(...arguments),this.agent=p}static{this.properties={referenceElement:1}}#t;#i;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-styling-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=o(this,"arcgis-assistant-layer-styling-agent"),this.#i=m(this)}disconnectedCallback(){this.#i?.unregister(this.agent.id),super.disconnectedCallback()}};r("arcgis-assistant-layer-styling-agent",t);return t},"identity/IdentityManager","portal/Portal","request","config","core/reactiveUtils","layers/FeatureLayer","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/knowledgeGraphService",a,b,c,d,e,f,g,h,j,k,l,n,p)
@@ -1,2 +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")
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as c}from"./A6LBMS7A.js";import{Dc as d}from"./M2U456J5.js";import{a}from"./5X23DDDZ.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")
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as s,b as c}from"./ROQGPAR5.js";import"./RFVZ7KCG.js";import{g as e,h as t,v as i,z as r}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var n=e`:host{display:block;min-width:0}.container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 15%,var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;max-width:100%;min-width:0;margin-left:auto;justify-content:flex-end}.container>div:first-child{min-width:0}.avatar{display:flex;align-items:center;justify-content:center}.content{min-width:0;overflow-wrap:anywhere;>*{margin:0}>*+*{margin-block-start:var(--calcite-spacing-sm)}:is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}>calcite-table{display:block;max-width:100%}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}pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}}@container (min-width: 480px){.container{max-width:80%}}`,a=class extends i{constructor(){super(...arguments),this.userAvatarEnabled=!1}static{this.properties={content:1,user:1,message:0,userAvatarEnabled:5}}static{this.styles=n}_getContent(){return this.message?.role==="user"?this.message.content:this.content}render(){return t`<div class="container"><div><slot name=content><div class="content">${s(c(this._getContent()))}</div></slot></div>${this.userAvatarEnabled?t`<slot name=icon><div class="avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></slot>`:null}</div>`}};r("arcgis-assistant-user-message",a);export{a as ArcgisAssistantUserMessage};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as s,b as c}from"./HIJGY4GU.js";import"./CAOMMQSY.js";import{g as e,h as t,v as i,z as r}from"./S5GFNIHC.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";var n=e`:host{display:block;min-width:0}.container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 15%,var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;max-width:100%;min-width:0;margin-left:auto;justify-content:flex-end}.container>div:first-child{min-width:0}.avatar{display:flex;align-items:center;justify-content:center}.content{min-width:0;overflow-wrap:anywhere;>*{margin:0}>*+*{margin-block-start:var(--calcite-spacing-sm)}:is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}>calcite-table{display:block;max-width:100%}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}pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}}@container (min-width: 480px){.container{max-width:80%}}`,a=class extends i{constructor(){super(...arguments),this.userAvatarEnabled=!1}static{this.properties={content:1,user:1,message:0,userAvatarEnabled:5}}static{this.styles=n}_getContent(){return this.message?.role==="user"?this.message.content:this.content}render(){return t`<div class="container"><div><slot name=content><div class="content">${s(c(this._getContent()))}</div></slot></div>${this.userAvatarEnabled?t`<slot name=icon><div class="avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></slot>`:null}</div>`}};r("arcgis-assistant-user-message",a);export{a as ArcgisAssistantUserMessage};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import b from"./STOGCXJH.js";import a from"./VGLBH473.js";import"./A6LBMS7A.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([,a])=>{return a},a,b)
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./ANRQWYU2.js";import"./R2PQVY4O.js";import"./G2EGT3CF.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([{property:l,subclass:w},{c:p,d:d}])=>{var y=Object.defineProperty,m=Object.getOwnPropertyDescriptor,f=e=>{throw TypeError(e)},h=(e,t,o,n)=>{for(var r=n>1?void 0:n?m(t,o):t,s=e.length-1,g;s>=0;s--)(g=e[s])&&(r=(n?g(t,o,r):g(r))||r);return n&&r&&y(t,o,r),r},k=(e,t,o)=>t.has(e)||f("Cannot "+o),b=(e,t,o)=>t.has(e)?f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),c=(e,t,o)=>(k(e,t,"access private method"),o),a,i,u=class extends d{constructor(e){super(e),b(this,a)}getAgents(){return c(this,a,i).call(this),[this.routerAgent,...Object.values(this.agentsMap)]}buildEdges(e){c(this,a,i).call(this);let t=p(this.routerAgent,0),o=new Map;for(let[n,[r]]of Object.entries(this.agentsMap).entries())o.set(r,p(e[n+1],n+1));return[{from:t,decide:n=>{let r=n[this.routerOutputKey];if(typeof r!="string"||!r)throw new Error("RouterWorkflow decideRoute could not determine next agent from state.");let s=o.get(r);if(!s)throw new Error(`RouterWorkflow decideRoute returned unknown agent: ${r}. Expected one of: ${Object.keys(this.agentsMap).join(", ")||"(none)"}.`);return s}}]}getEntryNode(){return c(this,a,i).call(this),p(this.routerAgent,0)}isTerminalAgent(e,t){return t>0}validateAgents(e){c(this,a,i).call(this),super.validateAgents(e)}};a=new WeakSet;i=function(){if(!Object.keys(this.agentsMap).length)throw new Error("RouterWorkflow requires a non-empty agentsMap.")};h([l()],u.prototype,"agentsMap",2);h([l()],u.prototype,"routerAgent",2);h([l()],u.prototype,"routerOutputKey",2);u=h([w("RouterWorkflow")],u);return u},"core/accessorSupport/decorators",a)
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import a from"./XV7RMYLR.js";import"./2WXXSZP5.js";import"./4OI4QEV7.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([{property:l,subclass:w},{c:p,d:d}])=>{var y=Object.defineProperty,m=Object.getOwnPropertyDescriptor,f=e=>{throw TypeError(e)},h=(e,t,o,n)=>{for(var r=n>1?void 0:n?m(t,o):t,s=e.length-1,g;s>=0;s--)(g=e[s])&&(r=(n?g(t,o,r):g(r))||r);return n&&r&&y(t,o,r),r},k=(e,t,o)=>t.has(e)||f("Cannot "+o),b=(e,t,o)=>t.has(e)?f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),c=(e,t,o)=>(k(e,t,"access private method"),o),a,i,u=class extends d{constructor(e){super(e),b(this,a)}getAgents(){return c(this,a,i).call(this),[this.routerAgent,...Object.values(this.agentsMap)]}buildEdges(e){c(this,a,i).call(this);let t=p(this.routerAgent,0),o=new Map;for(let[n,[r]]of Object.entries(this.agentsMap).entries())o.set(r,p(e[n+1],n+1));return[{from:t,decide:n=>{let r=n[this.routerOutputKey];if(typeof r!="string"||!r)throw new Error("RouterWorkflow decideRoute could not determine next agent from state.");let s=o.get(r);if(!s)throw new Error(`RouterWorkflow decideRoute returned unknown agent: ${r}. Expected one of: ${Object.keys(this.agentsMap).join(", ")||"(none)"}.`);return s}}]}getEntryNode(){return c(this,a,i).call(this),p(this.routerAgent,0)}isTerminalAgent(e,t){return t>0}validateAgents(e){c(this,a,i).call(this),super.validateAgents(e)}};a=new WeakSet;i=function(){if(!Object.keys(this.agentsMap).length)throw new Error("RouterWorkflow requires a non-empty agentsMap.")};h([l()],u.prototype,"agentsMap",2);h([l()],u.prototype,"routerAgent",2);h([l()],u.prototype,"routerOutputKey",2);u=h([w("RouterWorkflow")],u);return u},"core/accessorSupport/decorators",a)