@recombine-ai/bosun 0.3.7 → 0.3.9

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 (453) hide show
  1. package/build/client/_app/immutable/assets/0.XjKA4GPF.css +1 -0
  2. package/build/client/_app/immutable/assets/0.XjKA4GPF.css.br +0 -0
  3. package/build/client/_app/immutable/assets/0.XjKA4GPF.css.gz +0 -0
  4. package/build/client/_app/immutable/assets/2.DOE0DQ6H.css +1 -0
  5. package/build/client/_app/immutable/assets/2.DOE0DQ6H.css.br +0 -0
  6. package/build/client/_app/immutable/assets/2.DOE0DQ6H.css.gz +0 -0
  7. package/build/client/_app/immutable/assets/7.DlSPCZj0.css +1 -0
  8. package/build/client/_app/immutable/assets/7.DlSPCZj0.css.br +0 -0
  9. package/build/client/_app/immutable/assets/7.DlSPCZj0.css.gz +0 -0
  10. package/build/client/_app/immutable/assets/8.DoLA3Mkm.css +1 -0
  11. package/build/client/_app/immutable/assets/8.DoLA3Mkm.css.br +0 -0
  12. package/build/client/_app/immutable/assets/8.DoLA3Mkm.css.gz +0 -0
  13. package/build/client/_app/immutable/assets/{Tab.BxaGw9IG.css → Tab.jOjMVh6j.css} +1 -1
  14. package/build/client/_app/immutable/assets/Tab.jOjMVh6j.css.br +0 -0
  15. package/build/client/_app/immutable/assets/Tab.jOjMVh6j.css.gz +0 -0
  16. package/build/client/_app/immutable/chunks/7wcu2ga1.js +1 -0
  17. package/build/client/_app/immutable/chunks/7wcu2ga1.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/7wcu2ga1.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/B3K88SyC.js +1 -0
  20. package/build/client/_app/immutable/chunks/B3K88SyC.js.br +0 -0
  21. package/build/client/_app/immutable/chunks/B3K88SyC.js.gz +0 -0
  22. package/build/client/_app/immutable/chunks/{D5fGPlBk.js → BGEE3mf3.js} +1 -1
  23. package/build/client/_app/immutable/chunks/BGEE3mf3.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/BGEE3mf3.js.gz +0 -0
  25. package/build/client/_app/immutable/chunks/{BOQMymse.js → BH7VBnJ7.js} +1 -1
  26. package/build/client/_app/immutable/chunks/BH7VBnJ7.js.br +0 -0
  27. package/build/client/_app/immutable/chunks/BH7VBnJ7.js.gz +0 -0
  28. package/build/client/_app/immutable/chunks/BHkx8tAH.js +1 -0
  29. package/build/client/_app/immutable/chunks/BHkx8tAH.js.br +0 -0
  30. package/build/client/_app/immutable/chunks/BHkx8tAH.js.gz +0 -0
  31. package/build/client/_app/immutable/chunks/BMwJcaLS.js +1 -0
  32. package/build/client/_app/immutable/chunks/BMwJcaLS.js.br +2 -0
  33. package/build/client/_app/immutable/chunks/BMwJcaLS.js.gz +0 -0
  34. package/build/client/_app/immutable/chunks/{CfKHaDCm.js → BOrnwyTp.js} +1 -1
  35. package/build/client/_app/immutable/chunks/BOrnwyTp.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/BOrnwyTp.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/BbaH2eDw.js +1 -0
  38. package/build/client/_app/immutable/chunks/BbaH2eDw.js.br +0 -0
  39. package/build/client/_app/immutable/chunks/BbaH2eDw.js.gz +0 -0
  40. package/build/client/_app/immutable/chunks/{C769zFCl.js → Bub2VLj9.js} +1 -1
  41. package/build/client/_app/immutable/chunks/Bub2VLj9.js.br +0 -0
  42. package/build/client/_app/immutable/chunks/Bub2VLj9.js.gz +0 -0
  43. package/build/client/_app/immutable/chunks/{yOR3vtRx.js → ByppsbS-.js} +1 -1
  44. package/build/client/_app/immutable/chunks/ByppsbS-.js.br +0 -0
  45. package/build/client/_app/immutable/chunks/ByppsbS-.js.gz +0 -0
  46. package/build/client/_app/immutable/chunks/C0mQlu7J.js +1 -0
  47. package/build/client/_app/immutable/chunks/C0mQlu7J.js.br +1 -0
  48. package/build/client/_app/immutable/chunks/C0mQlu7J.js.gz +0 -0
  49. package/build/client/_app/immutable/chunks/C0pV4x1v.js +1 -0
  50. package/build/client/_app/immutable/chunks/C0pV4x1v.js.br +2 -0
  51. package/build/client/_app/immutable/chunks/C0pV4x1v.js.gz +0 -0
  52. package/build/client/_app/immutable/chunks/C0sQKHpE.js +1 -0
  53. package/build/client/_app/immutable/chunks/C0sQKHpE.js.br +0 -0
  54. package/build/client/_app/immutable/chunks/C0sQKHpE.js.gz +0 -0
  55. package/build/client/_app/immutable/chunks/{CRlLKhPr.js → CFcfsVkY.js} +1 -1
  56. package/build/client/_app/immutable/chunks/CFcfsVkY.js.br +0 -0
  57. package/build/client/_app/immutable/chunks/CFcfsVkY.js.gz +0 -0
  58. package/build/client/_app/immutable/chunks/{BHL1bMOV.js → CYkx2jgw.js} +1 -1
  59. package/build/client/_app/immutable/chunks/CYkx2jgw.js.br +0 -0
  60. package/build/client/_app/immutable/chunks/CYkx2jgw.js.gz +0 -0
  61. package/build/client/_app/immutable/chunks/CZ6iREyA.js +8 -0
  62. package/build/client/_app/immutable/chunks/CZ6iREyA.js.br +0 -0
  63. package/build/client/_app/immutable/chunks/CZ6iREyA.js.gz +0 -0
  64. package/build/client/_app/immutable/chunks/CbCJfhin.js +1 -0
  65. package/build/client/_app/immutable/chunks/CbCJfhin.js.br +0 -0
  66. package/build/client/_app/immutable/chunks/CbCJfhin.js.gz +0 -0
  67. package/build/client/_app/immutable/chunks/{DaRvw8c-.js → CdTjAjKm.js} +7 -7
  68. package/build/client/_app/immutable/chunks/CdTjAjKm.js.br +0 -0
  69. package/build/client/_app/immutable/chunks/CdTjAjKm.js.gz +0 -0
  70. package/build/client/_app/immutable/chunks/{4PztAao_.js → CmPVG-ki.js} +1 -1
  71. package/build/client/_app/immutable/chunks/CmPVG-ki.js.br +0 -0
  72. package/build/client/_app/immutable/chunks/CmPVG-ki.js.gz +0 -0
  73. package/build/client/_app/immutable/chunks/{DJ_lsF0V.js → Cnr0cZA4.js} +1 -1
  74. package/build/client/_app/immutable/chunks/Cnr0cZA4.js.br +0 -0
  75. package/build/client/_app/immutable/chunks/Cnr0cZA4.js.gz +0 -0
  76. package/build/client/_app/immutable/chunks/CojkI8AD.js +33 -0
  77. package/build/client/_app/immutable/chunks/CojkI8AD.js.br +0 -0
  78. package/build/client/_app/immutable/chunks/CojkI8AD.js.gz +0 -0
  79. package/build/client/_app/immutable/chunks/Cp_hX0eh.js +1 -0
  80. package/build/client/_app/immutable/chunks/Cp_hX0eh.js.br +0 -0
  81. package/build/client/_app/immutable/chunks/Cp_hX0eh.js.gz +0 -0
  82. package/build/client/_app/immutable/chunks/Cv6CwVfk.js +3 -0
  83. package/build/client/_app/immutable/chunks/Cv6CwVfk.js.br +0 -0
  84. package/build/client/_app/immutable/chunks/Cv6CwVfk.js.gz +0 -0
  85. package/build/client/_app/immutable/chunks/{DAfsp-82.js → D8qEOlWC.js} +1 -1
  86. package/build/client/_app/immutable/chunks/D8qEOlWC.js.br +0 -0
  87. package/build/client/_app/immutable/chunks/D8qEOlWC.js.gz +0 -0
  88. package/build/client/_app/immutable/chunks/{Bf1oCG9-.js → DOMF1VtZ.js} +1 -1
  89. package/build/client/_app/immutable/chunks/DOMF1VtZ.js.br +0 -0
  90. package/build/client/_app/immutable/chunks/DOMF1VtZ.js.gz +0 -0
  91. package/build/client/_app/immutable/chunks/{Bd7SZbXQ.js → DRaGXt8e.js} +1 -1
  92. package/build/client/_app/immutable/chunks/DRaGXt8e.js.br +0 -0
  93. package/build/client/_app/immutable/chunks/DRaGXt8e.js.gz +0 -0
  94. package/build/client/_app/immutable/chunks/{Bw2f0Pmg.js → DU-D8S0B.js} +1 -1
  95. package/build/client/_app/immutable/chunks/DU-D8S0B.js.br +0 -0
  96. package/build/client/_app/immutable/chunks/DU-D8S0B.js.gz +0 -0
  97. package/build/client/_app/immutable/chunks/{Culo9hD6.js → DadWvtYR.js} +1 -1
  98. package/build/client/_app/immutable/chunks/DadWvtYR.js.br +0 -0
  99. package/build/client/_app/immutable/chunks/DadWvtYR.js.gz +0 -0
  100. package/build/client/_app/immutable/chunks/{Cx_xzGPa.js → DbYdNz4J.js} +1 -1
  101. package/build/client/_app/immutable/chunks/DbYdNz4J.js.br +0 -0
  102. package/build/client/_app/immutable/chunks/DbYdNz4J.js.gz +0 -0
  103. package/build/client/_app/immutable/chunks/DiFAgw_s.js +1 -0
  104. package/build/client/_app/immutable/chunks/DiFAgw_s.js.br +0 -0
  105. package/build/client/_app/immutable/chunks/DiFAgw_s.js.gz +0 -0
  106. package/build/client/_app/immutable/chunks/DrMdBz9b.js +1 -0
  107. package/build/client/_app/immutable/chunks/DrMdBz9b.js.br +0 -0
  108. package/build/client/_app/immutable/chunks/DrMdBz9b.js.gz +0 -0
  109. package/build/client/_app/immutable/chunks/{qXu78w_4.js → DsvX5v5e.js} +1 -1
  110. package/build/client/_app/immutable/chunks/DsvX5v5e.js.br +0 -0
  111. package/build/client/_app/immutable/chunks/DsvX5v5e.js.gz +0 -0
  112. package/build/client/_app/immutable/chunks/Y0ymTIHd.js +1 -0
  113. package/build/client/_app/immutable/chunks/Y0ymTIHd.js.br +0 -0
  114. package/build/client/_app/immutable/chunks/Y0ymTIHd.js.gz +0 -0
  115. package/build/client/_app/immutable/chunks/_HWrJCgx.js +1 -0
  116. package/build/client/_app/immutable/chunks/_HWrJCgx.js.br +0 -0
  117. package/build/client/_app/immutable/chunks/_HWrJCgx.js.gz +0 -0
  118. package/build/client/_app/immutable/chunks/{CRTtd6by.js → qPgPowuc.js} +1 -1
  119. package/build/client/_app/immutable/chunks/qPgPowuc.js.br +0 -0
  120. package/build/client/_app/immutable/chunks/qPgPowuc.js.gz +0 -0
  121. package/build/client/_app/immutable/chunks/ri5tqg4N.js +1 -0
  122. package/build/client/_app/immutable/chunks/ri5tqg4N.js.br +0 -0
  123. package/build/client/_app/immutable/chunks/ri5tqg4N.js.gz +0 -0
  124. package/build/client/_app/immutable/chunks/{Codln_pl.js → sdLD1XcR.js} +1 -1
  125. package/build/client/_app/immutable/chunks/sdLD1XcR.js.br +0 -0
  126. package/build/client/_app/immutable/chunks/sdLD1XcR.js.gz +0 -0
  127. package/build/client/_app/immutable/chunks/t1v2-usS.js +4 -0
  128. package/build/client/_app/immutable/chunks/t1v2-usS.js.br +0 -0
  129. package/build/client/_app/immutable/chunks/t1v2-usS.js.gz +0 -0
  130. package/build/client/_app/immutable/chunks/tLFXBP7P.js +2 -0
  131. package/build/client/_app/immutable/chunks/tLFXBP7P.js.br +0 -0
  132. package/build/client/_app/immutable/chunks/tLFXBP7P.js.gz +0 -0
  133. package/build/client/_app/immutable/entry/app.jP0Pyfdy.js +2 -0
  134. package/build/client/_app/immutable/entry/app.jP0Pyfdy.js.br +0 -0
  135. package/build/client/_app/immutable/entry/app.jP0Pyfdy.js.gz +0 -0
  136. package/build/client/_app/immutable/entry/start.KD1JZMOT.js +1 -0
  137. package/build/client/_app/immutable/entry/start.KD1JZMOT.js.br +2 -0
  138. package/build/client/_app/immutable/entry/start.KD1JZMOT.js.gz +0 -0
  139. package/build/client/_app/immutable/nodes/0.ByrdmeSo.js +3 -0
  140. package/build/client/_app/immutable/nodes/0.ByrdmeSo.js.br +0 -0
  141. package/build/client/_app/immutable/nodes/0.ByrdmeSo.js.gz +0 -0
  142. package/build/client/_app/immutable/nodes/1.VLeq38lN.js +1 -0
  143. package/build/client/_app/immutable/nodes/1.VLeq38lN.js.br +0 -0
  144. package/build/client/_app/immutable/nodes/1.VLeq38lN.js.gz +0 -0
  145. package/build/client/_app/immutable/nodes/10.BHSGZYEC.js +1 -0
  146. package/build/client/_app/immutable/nodes/10.BHSGZYEC.js.br +0 -0
  147. package/build/client/_app/immutable/nodes/10.BHSGZYEC.js.gz +0 -0
  148. package/build/client/_app/immutable/nodes/11.CZ_7M4AF.js +1 -0
  149. package/build/client/_app/immutable/nodes/11.CZ_7M4AF.js.br +0 -0
  150. package/build/client/_app/immutable/nodes/11.CZ_7M4AF.js.gz +0 -0
  151. package/build/client/_app/immutable/nodes/12.DRr2l3NZ.js +1 -0
  152. package/build/client/_app/immutable/nodes/12.DRr2l3NZ.js.br +2 -0
  153. package/build/client/_app/immutable/nodes/12.DRr2l3NZ.js.gz +0 -0
  154. package/build/client/_app/immutable/nodes/13.DetV1tDO.js +1 -0
  155. package/build/client/_app/immutable/nodes/13.DetV1tDO.js.br +0 -0
  156. package/build/client/_app/immutable/nodes/13.DetV1tDO.js.gz +0 -0
  157. package/build/client/_app/immutable/nodes/14.I-eiMWQu.js +11 -0
  158. package/build/client/_app/immutable/nodes/14.I-eiMWQu.js.br +0 -0
  159. package/build/client/_app/immutable/nodes/14.I-eiMWQu.js.gz +0 -0
  160. package/build/client/_app/immutable/nodes/2.DX9U9zLg.js +35 -0
  161. package/build/client/_app/immutable/nodes/2.DX9U9zLg.js.br +0 -0
  162. package/build/client/_app/immutable/nodes/2.DX9U9zLg.js.gz +0 -0
  163. package/build/client/_app/immutable/nodes/3.Bh8il5iy.js +1 -0
  164. package/build/client/_app/immutable/nodes/3.Bh8il5iy.js.br +0 -0
  165. package/build/client/_app/immutable/nodes/3.Bh8il5iy.js.gz +0 -0
  166. package/build/client/_app/immutable/nodes/{3.C-B1sGi_.js → 4.CtzHYc6x.js} +1 -1
  167. package/build/client/_app/immutable/nodes/4.CtzHYc6x.js.br +0 -0
  168. package/build/client/_app/immutable/nodes/4.CtzHYc6x.js.gz +0 -0
  169. package/build/client/_app/immutable/nodes/5.B4dlomkV.js +1 -0
  170. package/build/client/_app/immutable/nodes/5.B4dlomkV.js.br +0 -0
  171. package/build/client/_app/immutable/nodes/5.B4dlomkV.js.gz +0 -0
  172. package/build/client/_app/immutable/nodes/6.CPYhLc46.js +1 -0
  173. package/build/client/_app/immutable/nodes/6.CPYhLc46.js.br +4 -0
  174. package/build/client/_app/immutable/nodes/6.CPYhLc46.js.gz +0 -0
  175. package/build/client/_app/immutable/nodes/7.CBPrYfFp.js +2 -0
  176. package/build/client/_app/immutable/nodes/7.CBPrYfFp.js.br +0 -0
  177. package/build/client/_app/immutable/nodes/7.CBPrYfFp.js.gz +0 -0
  178. package/build/client/_app/immutable/nodes/8.4NTWYv4c.js +6 -0
  179. package/build/client/_app/immutable/nodes/8.4NTWYv4c.js.br +0 -0
  180. package/build/client/_app/immutable/nodes/8.4NTWYv4c.js.gz +0 -0
  181. package/build/client/_app/immutable/nodes/9.BVI-eEdV.js +1 -0
  182. package/build/client/_app/immutable/nodes/9.BVI-eEdV.js.br +0 -0
  183. package/build/client/_app/immutable/nodes/9.BVI-eEdV.js.gz +0 -0
  184. package/build/client/_app/version.json +1 -1
  185. package/build/client/_app/version.json.br +0 -0
  186. package/build/client/_app/version.json.gz +0 -0
  187. package/build/server/chunks/0-CjpeDbMt.js +9 -0
  188. package/build/server/chunks/{0-CqdHgLFy.js.map → 0-CjpeDbMt.js.map} +1 -1
  189. package/build/server/chunks/1-M0YzuUQM.js +9 -0
  190. package/build/server/chunks/{1-CptSbbsC.js.map → 1-M0YzuUQM.js.map} +1 -1
  191. package/build/server/chunks/{7-soEaW5k5.js → 10-C7WLHR92.js} +5 -5
  192. package/build/server/chunks/10-C7WLHR92.js.map +1 -0
  193. package/build/server/chunks/11-CPYwUx-7.js +21 -0
  194. package/build/server/chunks/11-CPYwUx-7.js.map +1 -0
  195. package/build/server/chunks/12-C5OSs5Op.js +20 -0
  196. package/build/server/chunks/12-C5OSs5Op.js.map +1 -0
  197. package/build/server/chunks/13-BQ9R_Ex-.js +9 -0
  198. package/build/server/chunks/13-BQ9R_Ex-.js.map +1 -0
  199. package/build/server/chunks/14-BFsI6u_W.js +9 -0
  200. package/build/server/chunks/14-BFsI6u_W.js.map +1 -0
  201. package/build/server/chunks/2-Cjh0UTU6.js +9 -0
  202. package/build/server/chunks/2-Cjh0UTU6.js.map +1 -0
  203. package/build/server/chunks/3-VrGFs76T.js +9 -0
  204. package/build/server/chunks/3-VrGFs76T.js.map +1 -0
  205. package/build/server/chunks/4-CSgrzh2F.js +9 -0
  206. package/build/server/chunks/4-CSgrzh2F.js.map +1 -0
  207. package/build/server/chunks/5-zKehYil3.js +9 -0
  208. package/build/server/chunks/5-zKehYil3.js.map +1 -0
  209. package/build/server/chunks/6-uS_X9B0s.js +21 -0
  210. package/build/server/chunks/6-uS_X9B0s.js.map +1 -0
  211. package/build/server/chunks/7-DewREBAN.js +9 -0
  212. package/build/server/chunks/7-DewREBAN.js.map +1 -0
  213. package/build/server/chunks/8-Dk3ms3jm.js +9 -0
  214. package/build/server/chunks/8-Dk3ms3jm.js.map +1 -0
  215. package/build/server/chunks/9-W6XYayeK.js +25 -0
  216. package/build/server/chunks/9-W6XYayeK.js.map +1 -0
  217. package/build/server/chunks/{AgentSidebar-BIVt78i3.js → AgentSidebar-BB_yQ9s0.js} +4 -4
  218. package/build/server/chunks/AgentSidebar-BB_yQ9s0.js.map +1 -0
  219. package/build/server/chunks/{Button-ZjVPI4zo.js → Button-Cd4Yzpdy.js} +4 -4
  220. package/build/server/chunks/Button-Cd4Yzpdy.js.map +1 -0
  221. package/build/server/chunks/{CopyTracesDropdown-B8MjGOwT.js → ChatStepTrace-cq26gF4B.js} +162 -145
  222. package/build/server/chunks/ChatStepTrace-cq26gF4B.js.map +1 -0
  223. package/build/server/chunks/ContextEditor-CfjBPLpI.js +67 -0
  224. package/build/server/chunks/ContextEditor-CfjBPLpI.js.map +1 -0
  225. package/build/server/chunks/{Icon-Csjrnozq.js → Icon-BgknHaZs.js} +2 -2
  226. package/build/server/chunks/{Icon-Csjrnozq.js.map → Icon-BgknHaZs.js.map} +1 -1
  227. package/build/server/chunks/{Input-BCU2QEQ2.js → Input-BJW36iKz.js} +2 -2
  228. package/build/server/chunks/{Input-BCU2QEQ2.js.map → Input-BJW36iKz.js.map} +1 -1
  229. package/build/server/chunks/{Modal-bmttP-F1.js → Modal-D4tx0Bdo.js} +3 -3
  230. package/build/server/chunks/Modal-D4tx0Bdo.js.map +1 -0
  231. package/build/server/chunks/{Tab-Jw_OwV7Q.js → Tab-DheAG-QC.js} +3 -3
  232. package/build/server/chunks/Tab-DheAG-QC.js.map +1 -0
  233. package/build/server/chunks/{_layout.svelte-GwcIlDHC.js → _layout.svelte-BL8XnK1E.js} +23 -28
  234. package/build/server/chunks/_layout.svelte-BL8XnK1E.js.map +1 -0
  235. package/build/server/chunks/_layout.svelte-DHgaGTP_.js +844 -0
  236. package/build/server/chunks/_layout.svelte-DHgaGTP_.js.map +1 -0
  237. package/build/server/chunks/{_layout.svelte-CrT993Da.js → _layout.svelte-Svi5xbzP.js} +1 -14
  238. package/build/server/chunks/_layout.svelte-Svi5xbzP.js.map +1 -0
  239. package/build/server/chunks/{_page.svelte-CVO2CdmB.js → _page.svelte-39hvC6-Q.js} +4 -4
  240. package/build/server/chunks/{_page.svelte-CVO2CdmB.js.map → _page.svelte-39hvC6-Q.js.map} +1 -1
  241. package/build/server/chunks/{_page.svelte-D8d07zd0.js → _page.svelte-BpnUXzfh.js} +25 -10
  242. package/build/server/chunks/_page.svelte-BpnUXzfh.js.map +1 -0
  243. package/build/server/chunks/{_page.svelte--l_LvFv_.js → _page.svelte-C1YaC_Qg.js} +498 -496
  244. package/build/server/chunks/_page.svelte-C1YaC_Qg.js.map +1 -0
  245. package/build/server/chunks/{_page.svelte-BAi74pJ3.js → _page.svelte-CbqAsz26.js} +3 -3
  246. package/build/server/chunks/_page.svelte-CbqAsz26.js.map +1 -0
  247. package/build/server/chunks/{_page.svelte-BOzS_rqK.js → _page.svelte-CmsDxzfh.js} +19 -27
  248. package/build/server/chunks/_page.svelte-CmsDxzfh.js.map +1 -0
  249. package/build/server/chunks/{_page.svelte-d8hJxmZl.js → _page.svelte-DCP-PSh0.js} +243 -379
  250. package/build/server/chunks/_page.svelte-DCP-PSh0.js.map +1 -0
  251. package/build/server/chunks/edit-workspace-context-OTOIRCI0.js +13 -0
  252. package/build/server/chunks/edit-workspace-context-OTOIRCI0.js.map +1 -0
  253. package/build/server/chunks/hooks-BJphIAi-.js +8 -0
  254. package/build/server/chunks/hooks-BJphIAi-.js.map +1 -0
  255. package/build/server/chunks/{Tab.svelte_svelte_type_style_lang-ByZ0KVzO.js → index-server-CefdgakO.js} +2 -2
  256. package/build/server/chunks/index-server-CefdgakO.js.map +1 -0
  257. package/build/server/chunks/{index2-C572SQM_.js → index2-BuOY2QE4.js} +2 -2
  258. package/build/server/chunks/{index2-C572SQM_.js.map → index2-BuOY2QE4.js.map} +1 -1
  259. package/build/server/chunks/log-content.svelte-B3ZvaoLs.js +20 -0
  260. package/build/server/chunks/log-content.svelte-B3ZvaoLs.js.map +1 -0
  261. package/build/server/index.js +3 -2
  262. package/build/server/index.js.map +1 -1
  263. package/build/server/manifest.js +51 -18
  264. package/build/server/manifest.js.map +1 -1
  265. package/package.json +3 -1
  266. package/src/backend/lib/decode-html-entities.spec.ts +29 -0
  267. package/src/backend/lib/decode-html-entities.ts +25 -0
  268. package/src/backend/roleplay/router.ts +31 -0
  269. package/src/backend/tests/academy.ts +353 -115
  270. package/src/backend/tests/analyze.ts +357 -0
  271. package/src/backend/tests/data.ts +48 -12
  272. package/src/backend/tests/emulate-agents.ts +39 -4
  273. package/src/backend/tests/prompt-issues.ts +204 -0
  274. package/src/backend/tests/router.ts +51 -4
  275. package/build/client/_app/immutable/assets/0.BPqDeVAI.css +0 -1
  276. package/build/client/_app/immutable/assets/0.BPqDeVAI.css.br +0 -0
  277. package/build/client/_app/immutable/assets/0.BPqDeVAI.css.gz +0 -0
  278. package/build/client/_app/immutable/assets/4.BIrSikaZ.css +0 -1
  279. package/build/client/_app/immutable/assets/4.BIrSikaZ.css.br +0 -0
  280. package/build/client/_app/immutable/assets/4.BIrSikaZ.css.gz +0 -0
  281. package/build/client/_app/immutable/assets/6.C4C8vBUW.css +0 -1
  282. package/build/client/_app/immutable/assets/6.C4C8vBUW.css.br +0 -0
  283. package/build/client/_app/immutable/assets/6.C4C8vBUW.css.gz +0 -0
  284. package/build/client/_app/immutable/assets/Tab.BxaGw9IG.css.br +0 -0
  285. package/build/client/_app/immutable/assets/Tab.BxaGw9IG.css.gz +0 -0
  286. package/build/client/_app/immutable/chunks/4PztAao_.js.br +0 -0
  287. package/build/client/_app/immutable/chunks/4PztAao_.js.gz +0 -0
  288. package/build/client/_app/immutable/chunks/B2gGEZTS.js +0 -1
  289. package/build/client/_app/immutable/chunks/B2gGEZTS.js.br +0 -2
  290. package/build/client/_app/immutable/chunks/B2gGEZTS.js.gz +0 -0
  291. package/build/client/_app/immutable/chunks/BHL1bMOV.js.br +0 -0
  292. package/build/client/_app/immutable/chunks/BHL1bMOV.js.gz +0 -0
  293. package/build/client/_app/immutable/chunks/BOQMymse.js.br +0 -0
  294. package/build/client/_app/immutable/chunks/BOQMymse.js.gz +0 -0
  295. package/build/client/_app/immutable/chunks/Bd7SZbXQ.js.br +0 -0
  296. package/build/client/_app/immutable/chunks/Bd7SZbXQ.js.gz +0 -0
  297. package/build/client/_app/immutable/chunks/Bf1oCG9-.js.br +0 -0
  298. package/build/client/_app/immutable/chunks/Bf1oCG9-.js.gz +0 -0
  299. package/build/client/_app/immutable/chunks/BgaIh2D4.js +0 -1
  300. package/build/client/_app/immutable/chunks/BgaIh2D4.js.br +0 -0
  301. package/build/client/_app/immutable/chunks/BgaIh2D4.js.gz +0 -0
  302. package/build/client/_app/immutable/chunks/BrDK8TTs.js +0 -2
  303. package/build/client/_app/immutable/chunks/BrDK8TTs.js.br +0 -0
  304. package/build/client/_app/immutable/chunks/BrDK8TTs.js.gz +0 -0
  305. package/build/client/_app/immutable/chunks/BsKQRAyX.js +0 -1
  306. package/build/client/_app/immutable/chunks/BsKQRAyX.js.br +0 -0
  307. package/build/client/_app/immutable/chunks/BsKQRAyX.js.gz +0 -0
  308. package/build/client/_app/immutable/chunks/Bw2f0Pmg.js.br +0 -0
  309. package/build/client/_app/immutable/chunks/Bw2f0Pmg.js.gz +0 -0
  310. package/build/client/_app/immutable/chunks/BzAx_Qn3.js +0 -1
  311. package/build/client/_app/immutable/chunks/BzAx_Qn3.js.br +0 -0
  312. package/build/client/_app/immutable/chunks/BzAx_Qn3.js.gz +0 -0
  313. package/build/client/_app/immutable/chunks/C-dTPkQy.js +0 -1
  314. package/build/client/_app/immutable/chunks/C-dTPkQy.js.br +0 -0
  315. package/build/client/_app/immutable/chunks/C-dTPkQy.js.gz +0 -0
  316. package/build/client/_app/immutable/chunks/C769zFCl.js.br +0 -0
  317. package/build/client/_app/immutable/chunks/C769zFCl.js.gz +0 -0
  318. package/build/client/_app/immutable/chunks/C7FjDhij.js +0 -4
  319. package/build/client/_app/immutable/chunks/C7FjDhij.js.br +0 -0
  320. package/build/client/_app/immutable/chunks/C7FjDhij.js.gz +0 -0
  321. package/build/client/_app/immutable/chunks/CInh9KnU.js +0 -1
  322. package/build/client/_app/immutable/chunks/CInh9KnU.js.br +0 -2
  323. package/build/client/_app/immutable/chunks/CInh9KnU.js.gz +0 -0
  324. package/build/client/_app/immutable/chunks/CRTtd6by.js.br +0 -0
  325. package/build/client/_app/immutable/chunks/CRTtd6by.js.gz +0 -0
  326. package/build/client/_app/immutable/chunks/CRlLKhPr.js.br +0 -0
  327. package/build/client/_app/immutable/chunks/CRlLKhPr.js.gz +0 -0
  328. package/build/client/_app/immutable/chunks/CUfDVPpW.js +0 -1
  329. package/build/client/_app/immutable/chunks/CUfDVPpW.js.br +0 -0
  330. package/build/client/_app/immutable/chunks/CUfDVPpW.js.gz +0 -0
  331. package/build/client/_app/immutable/chunks/CfKHaDCm.js.br +0 -0
  332. package/build/client/_app/immutable/chunks/CfKHaDCm.js.gz +0 -0
  333. package/build/client/_app/immutable/chunks/Codln_pl.js.br +0 -0
  334. package/build/client/_app/immutable/chunks/Codln_pl.js.gz +0 -0
  335. package/build/client/_app/immutable/chunks/Culo9hD6.js.br +0 -0
  336. package/build/client/_app/immutable/chunks/Culo9hD6.js.gz +0 -0
  337. package/build/client/_app/immutable/chunks/CxDLEL1d.js +0 -8
  338. package/build/client/_app/immutable/chunks/CxDLEL1d.js.br +0 -0
  339. package/build/client/_app/immutable/chunks/CxDLEL1d.js.gz +0 -0
  340. package/build/client/_app/immutable/chunks/Cx_xzGPa.js.br +0 -0
  341. package/build/client/_app/immutable/chunks/Cx_xzGPa.js.gz +0 -0
  342. package/build/client/_app/immutable/chunks/D-51TRqM.js +0 -33
  343. package/build/client/_app/immutable/chunks/D-51TRqM.js.br +0 -0
  344. package/build/client/_app/immutable/chunks/D-51TRqM.js.gz +0 -0
  345. package/build/client/_app/immutable/chunks/D5fGPlBk.js.br +0 -0
  346. package/build/client/_app/immutable/chunks/D5fGPlBk.js.gz +0 -0
  347. package/build/client/_app/immutable/chunks/D9h7-Y-f.js +0 -1
  348. package/build/client/_app/immutable/chunks/D9h7-Y-f.js.br +0 -0
  349. package/build/client/_app/immutable/chunks/D9h7-Y-f.js.gz +0 -0
  350. package/build/client/_app/immutable/chunks/DAfsp-82.js.br +0 -0
  351. package/build/client/_app/immutable/chunks/DAfsp-82.js.gz +0 -0
  352. package/build/client/_app/immutable/chunks/DJ_lsF0V.js.br +0 -0
  353. package/build/client/_app/immutable/chunks/DJ_lsF0V.js.gz +0 -0
  354. package/build/client/_app/immutable/chunks/DaRvw8c-.js.br +0 -0
  355. package/build/client/_app/immutable/chunks/DaRvw8c-.js.gz +0 -0
  356. package/build/client/_app/immutable/chunks/FawE95CY.js +0 -1
  357. package/build/client/_app/immutable/chunks/FawE95CY.js.br +0 -0
  358. package/build/client/_app/immutable/chunks/FawE95CY.js.gz +0 -0
  359. package/build/client/_app/immutable/chunks/HBgR5qMR.js +0 -3
  360. package/build/client/_app/immutable/chunks/HBgR5qMR.js.br +0 -0
  361. package/build/client/_app/immutable/chunks/HBgR5qMR.js.gz +0 -0
  362. package/build/client/_app/immutable/chunks/I-mny6CH.js +0 -1
  363. package/build/client/_app/immutable/chunks/I-mny6CH.js.br +0 -0
  364. package/build/client/_app/immutable/chunks/I-mny6CH.js.gz +0 -0
  365. package/build/client/_app/immutable/chunks/aeuWzujc.js +0 -1
  366. package/build/client/_app/immutable/chunks/aeuWzujc.js.br +0 -2
  367. package/build/client/_app/immutable/chunks/aeuWzujc.js.gz +0 -0
  368. package/build/client/_app/immutable/chunks/qXu78w_4.js.br +0 -0
  369. package/build/client/_app/immutable/chunks/qXu78w_4.js.gz +0 -0
  370. package/build/client/_app/immutable/chunks/yOR3vtRx.js.br +0 -0
  371. package/build/client/_app/immutable/chunks/yOR3vtRx.js.gz +0 -0
  372. package/build/client/_app/immutable/entry/app.Dd7V5oBZ.js +0 -2
  373. package/build/client/_app/immutable/entry/app.Dd7V5oBZ.js.br +0 -0
  374. package/build/client/_app/immutable/entry/app.Dd7V5oBZ.js.gz +0 -0
  375. package/build/client/_app/immutable/entry/start.I6276KWl.js +0 -1
  376. package/build/client/_app/immutable/entry/start.I6276KWl.js.br +0 -2
  377. package/build/client/_app/immutable/entry/start.I6276KWl.js.gz +0 -0
  378. package/build/client/_app/immutable/nodes/0.DgVTcUxG.js +0 -3
  379. package/build/client/_app/immutable/nodes/0.DgVTcUxG.js.br +0 -0
  380. package/build/client/_app/immutable/nodes/0.DgVTcUxG.js.gz +0 -0
  381. package/build/client/_app/immutable/nodes/1._3H1cdWd.js +0 -1
  382. package/build/client/_app/immutable/nodes/1._3H1cdWd.js.br +0 -0
  383. package/build/client/_app/immutable/nodes/1._3H1cdWd.js.gz +0 -0
  384. package/build/client/_app/immutable/nodes/2.BO0WBJz3.js +0 -1
  385. package/build/client/_app/immutable/nodes/2.BO0WBJz3.js.br +0 -0
  386. package/build/client/_app/immutable/nodes/2.BO0WBJz3.js.gz +0 -0
  387. package/build/client/_app/immutable/nodes/3.C-B1sGi_.js.br +0 -0
  388. package/build/client/_app/immutable/nodes/3.C-B1sGi_.js.gz +0 -0
  389. package/build/client/_app/immutable/nodes/4.SsrvuMXV.js +0 -35
  390. package/build/client/_app/immutable/nodes/4.SsrvuMXV.js.br +0 -0
  391. package/build/client/_app/immutable/nodes/4.SsrvuMXV.js.gz +0 -0
  392. package/build/client/_app/immutable/nodes/5.DM_0dw43.js +0 -1
  393. package/build/client/_app/immutable/nodes/5.DM_0dw43.js.br +0 -0
  394. package/build/client/_app/immutable/nodes/5.DM_0dw43.js.gz +0 -0
  395. package/build/client/_app/immutable/nodes/6.BLcf1-sM.js +0 -5
  396. package/build/client/_app/immutable/nodes/6.BLcf1-sM.js.br +0 -0
  397. package/build/client/_app/immutable/nodes/6.BLcf1-sM.js.gz +0 -0
  398. package/build/client/_app/immutable/nodes/7.BLozkJCY.js +0 -1
  399. package/build/client/_app/immutable/nodes/7.BLozkJCY.js.br +0 -0
  400. package/build/client/_app/immutable/nodes/7.BLozkJCY.js.gz +0 -0
  401. package/build/client/_app/immutable/nodes/8.BeHRzquW.js +0 -1
  402. package/build/client/_app/immutable/nodes/8.BeHRzquW.js.br +0 -0
  403. package/build/client/_app/immutable/nodes/8.BeHRzquW.js.gz +0 -0
  404. package/build/client/_app/immutable/nodes/9.B1qNbiqD.js +0 -11
  405. package/build/client/_app/immutable/nodes/9.B1qNbiqD.js.br +0 -0
  406. package/build/client/_app/immutable/nodes/9.B1qNbiqD.js.gz +0 -0
  407. package/build/server/chunks/0-CqdHgLFy.js +0 -9
  408. package/build/server/chunks/1-CptSbbsC.js +0 -9
  409. package/build/server/chunks/2-CVrU1q5e.js +0 -9
  410. package/build/server/chunks/2-CVrU1q5e.js.map +0 -1
  411. package/build/server/chunks/3-Bi3FZgxy.js +0 -9
  412. package/build/server/chunks/3-Bi3FZgxy.js.map +0 -1
  413. package/build/server/chunks/4-Cg81z1QT.js +0 -9
  414. package/build/server/chunks/4-Cg81z1QT.js.map +0 -1
  415. package/build/server/chunks/5-BDZ8fU2l.js +0 -9
  416. package/build/server/chunks/5-BDZ8fU2l.js.map +0 -1
  417. package/build/server/chunks/6-_jdLZ_Lr.js +0 -33
  418. package/build/server/chunks/6-_jdLZ_Lr.js.map +0 -1
  419. package/build/server/chunks/7-soEaW5k5.js.map +0 -1
  420. package/build/server/chunks/8-Yp_dUmRS.js +0 -9
  421. package/build/server/chunks/8-Yp_dUmRS.js.map +0 -1
  422. package/build/server/chunks/9-Cb4lmLGK.js +0 -9
  423. package/build/server/chunks/9-Cb4lmLGK.js.map +0 -1
  424. package/build/server/chunks/AgentSidebar-BIVt78i3.js.map +0 -1
  425. package/build/server/chunks/Button-ZjVPI4zo.js.map +0 -1
  426. package/build/server/chunks/ContextEditor-Dgs8Ax9B.js +0 -45
  427. package/build/server/chunks/ContextEditor-Dgs8Ax9B.js.map +0 -1
  428. package/build/server/chunks/CopyTracesDropdown-B8MjGOwT.js.map +0 -1
  429. package/build/server/chunks/Modal-bmttP-F1.js.map +0 -1
  430. package/build/server/chunks/Tab-Jw_OwV7Q.js.map +0 -1
  431. package/build/server/chunks/Tab.svelte_svelte_type_style_lang-ByZ0KVzO.js.map +0 -1
  432. package/build/server/chunks/_layout.svelte-CrT993Da.js.map +0 -1
  433. package/build/server/chunks/_layout.svelte-GwcIlDHC.js.map +0 -1
  434. package/build/server/chunks/_page.svelte--l_LvFv_.js.map +0 -1
  435. package/build/server/chunks/_page.svelte-BAi74pJ3.js.map +0 -1
  436. package/build/server/chunks/_page.svelte-BOzS_rqK.js.map +0 -1
  437. package/build/server/chunks/_page.svelte-D8d07zd0.js.map +0 -1
  438. package/build/server/chunks/_page.svelte-d8hJxmZl.js.map +0 -1
  439. /package/build/client/_app/immutable/assets/{9.C5apk4jm.css → 14.C5apk4jm.css} +0 -0
  440. /package/build/client/_app/immutable/assets/{9.C5apk4jm.css.br → 14.C5apk4jm.css.br} +0 -0
  441. /package/build/client/_app/immutable/assets/{9.C5apk4jm.css.gz → 14.C5apk4jm.css.gz} +0 -0
  442. /package/build/client/_app/immutable/assets/{2.Dzh7_Q8n.css → 3.Dzh7_Q8n.css} +0 -0
  443. /package/build/client/_app/immutable/assets/{2.Dzh7_Q8n.css.br → 3.Dzh7_Q8n.css.br} +0 -0
  444. /package/build/client/_app/immutable/assets/{2.Dzh7_Q8n.css.gz → 3.Dzh7_Q8n.css.gz} +0 -0
  445. /package/build/client/_app/immutable/assets/{3.CZVw96CJ.css → 4.CZVw96CJ.css} +0 -0
  446. /package/build/client/_app/immutable/assets/{3.CZVw96CJ.css.br → 4.CZVw96CJ.css.br} +0 -0
  447. /package/build/client/_app/immutable/assets/{3.CZVw96CJ.css.gz → 4.CZVw96CJ.css.gz} +0 -0
  448. /package/build/client/_app/immutable/assets/{CopyTracesDropdown.NFJFjHv0.css → ChatStepTrace.NFJFjHv0.css} +0 -0
  449. /package/build/client/_app/immutable/assets/{CopyTracesDropdown.NFJFjHv0.css.br → ChatStepTrace.NFJFjHv0.css.br} +0 -0
  450. /package/build/client/_app/immutable/assets/{CopyTracesDropdown.NFJFjHv0.css.gz → ChatStepTrace.NFJFjHv0.css.gz} +0 -0
  451. /package/build/client/_app/immutable/assets/{Modal.tn0RQdqM.css → bosun-theme.tn0RQdqM.css} +0 -0
  452. /package/build/client/_app/immutable/assets/{Modal.tn0RQdqM.css.br → bosun-theme.tn0RQdqM.css.br} +0 -0
  453. /package/build/client/_app/immutable/assets/{Modal.tn0RQdqM.css.gz → bosun-theme.tn0RQdqM.css.gz} +0 -0
@@ -1 +0,0 @@
1
- import{P as L,Q as U,R as I,T as N,k as R,i as v,U as P,V as Y,W as B,A as M,X as j,g as K,Y as $,Z,_ as q,a0 as z,w as C,a1 as G,a2 as Q,a3 as V,a4 as W,S as E,a5 as m,a6 as d}from"./C-dTPkQy.js";import{b as X,g as F}from"./BrDK8TTs.js";let _=!1,S=Symbol();function ne(e,r,i){const n=i[r]??(i[r]={store:null,source:N(void 0),unsubscribe:I});if(n.store!==e&&!(S in i))if(n.unsubscribe(),n.store=e??null,e==null)n.source.v=void 0,n.unsubscribe=I;else{var t=!0;n.unsubscribe=X(e,s=>{t?n.source.v=s:R(n.source,s)}),t=!1}return e&&S in i?F(e):v(n.source)}function ie(){const e={};function r(){L(()=>{for(var i in e)e[i].unsubscribe();U(e,S,{enumerable:!1,value:!0})})}return[e,r]}function H(e){var r=_;try{return _=!1,[e(),_]}finally{_=r}}const J={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function te(e,r,i){return new Proxy({props:e,exclude:r},J)}const k={get(e,r){let i=e.props.length;for(;i--;){let n=e.props[i];if(d(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n)return n[r]}},set(e,r,i){let n=e.props.length;for(;n--;){let t=e.props[n];d(t)&&(t=t());const s=P(t,r);if(s&&s.set)return s.set(i),!0}return!1},getOwnPropertyDescriptor(e,r){let i=e.props.length;for(;i--;){let n=e.props[i];if(d(n)&&(n=n()),typeof n=="object"&&n!==null&&r in n){const t=P(n,r);return t&&!t.configurable&&(t.configurable=!0),t}}},has(e,r){if(r===E||r===m)return!1;for(let i of e.props)if(d(i)&&(i=i()),i!=null&&r in i)return!0;return!1},ownKeys(e){const r=[];for(let i of e.props)if(d(i)&&(i=i()),!!i){for(const n in i)r.includes(n)||r.push(n);for(const n of Object.getOwnPropertySymbols(i))r.includes(n)||r.push(n)}return r}};function ue(...e){return new Proxy({props:e},k)}function se(e,r,i,n){var O;var t=!G||(i&Q)!==0,s=(i&z)!==0,x=(i&W)!==0,f=n,b=!0,w=()=>(b&&(b=!1,f=x?C(n):n),f),l;if(s){var A=E in e||m in e;l=((O=P(e,r))==null?void 0:O.set)??(A&&r in e?u=>e[r]=u:void 0)}var o,h=!1;s?[o,h]=H(()=>e[r]):o=e[r],o===void 0&&n!==void 0&&(o=w(),l&&(t&&Y(),l(o)));var a;if(t?a=()=>{var u=e[r];return u===void 0?w():(b=!0,u)}:a=()=>{var u=e[r];return u!==void 0&&(f=void 0),u===void 0?f:u},t&&!(i&B))return a;if(l){var D=e.$$legacy;return function(u,p){return arguments.length>0?((!t||!p||D||h)&&l(p?a():u),u):a()}}var g=!1,c=(i&V?M:j)(()=>(g=!1,a()));s&&v(c);var T=Z;return function(u,p){if(arguments.length>0){const y=p?v(c):t&&s?K(u):u;return R(c,y),g=!0,f!==void 0&&(f=y),u}return $&&g||T.f&q?c.v:v(c)}}export{ne as a,ue as b,se as p,te as r,ie as s};
@@ -1,3 +0,0 @@
1
- import{at as gr,E as tr,b5 as wr,L as j,F as S,aI as z,G as ar,i as R,X as Pr,I as Ur,J as Vr,K as vr,M as q,an as m,ap as Ar,aV as Yr,aq as U,aY as jr,b6 as X,b7 as Z,a8 as K,ao as cr,T as Kr,al as dr,aO as Er,b0 as Lr,aX as Tr,as as Fr,b8 as Xr,b9 as J,D as Nr,aB as V,ba as Zr,aK as Sr,bb as Gr,aN as Wr,bc as Jr,Z as Ir,t as Cr,bd as $r,aW as Qr,aL as xr,aU as hr,aZ as re,B as fr,a7 as ee,P as ae,be as ie,bf as te,aa as fe,bg as se,bh as ue,bi as le,bj as ne,bk as oe,bl as ve,bm as ce,m as de,bn as he,bo as _e,bp as be,O as pe,a as ge,b as $,u as we,aj as Ae,d as Ee,r as Le,f as Te}from"./C-dTPkQy.js";import"./CWj6FrbW.js";import{i as Ne}from"./CUfDVPpW.js";import{i as Se,n as Ie,d as Ce}from"./BrDK8TTs.js";import{p as Q}from"./FawE95CY.js";function Xe(r,a){return a}function Me(r,a,e){for(var i=r.items,t=[],f=a.length,u=0;u<f;u++)Gr(a[u].e,t,!0);var n=f>0&&t.length===0&&e!==null;if(n){var v=e.parentNode;Wr(v),v.append(e),i.clear(),k(r,a[0].prev,a[f-1].next)}Jr(t,()=>{for(var _=0;_<f;_++){var b=a[_];n||(i.delete(b.k),k(r,b.prev,b.next)),V(b.e,!n)}})}function Ze(r,a,e,i,t,f=null){var u=r,n={flags:a,items:new Map,first:null},v=(a&wr)!==0;if(v){var _=r;u=S?j(z(_)):_.appendChild(gr())}S&&ar();var b=null,d=!1,o=new Map,A=Pr(()=>{var E=e();return Lr(E)?E:E==null?[]:Er(E)}),c,p;function h(){ke(p,c,n,o,u,t,a,i,e),f!==null&&(c.length===0?b?Tr(b):b=U(()=>f(u)):b!==null&&Fr(b,()=>{b=null}))}tr(()=>{p??(p=Ir),c=R(A);var E=c.length;if(d&&E===0)return;d=E===0;let N=!1;if(S){var I=Ur(u)===Vr;I!==(E===0)&&(u=vr(),j(u),q(!1),N=!0)}if(S){for(var w=null,T,s=0;s<E;s++){if(m.nodeType===Ar&&m.data===Yr){u=m,N=!0,q(!1);break}var l=c[s],g=i(l,s);T=ir(m,n,w,null,l,g,s,t,a,e),n.items.set(g,T),w=T}E>0&&j(vr())}if(S)E===0&&f&&(b=U(()=>f(u)));else if(jr()){var C=new Set,L=K;for(s=0;s<E;s+=1){l=c[s],g=i(l,s);var O=n.items.get(g)??o.get(g);O?a&(X|Z)&&Mr(O,l,s,a):(T=ir(null,n,null,null,l,g,s,t,a,e,!0),o.set(g,T)),C.add(g)}for(const[M,Y]of n.items)C.has(M)||L.skipped_effects.add(Y.e);L.add_callback(h)}else h();N&&q(!0),R(A)}),S&&(u=m)}function ke(r,a,e,i,t,f,u,n,v){var sr,ur,lr,nr;var _=(u&Zr)!==0,b=(u&(X|Z))!==0,d=a.length,o=e.items,A=e.first,c=A,p,h=null,E,N=[],I=[],w,T,s,l;if(_)for(l=0;l<d;l+=1)w=a[l],T=n(w,l),s=o.get(T),s!==void 0&&((sr=s.a)==null||sr.measure(),(E??(E=new Set)).add(s));for(l=0;l<d;l+=1){if(w=a[l],T=n(w,l),s=o.get(T),s===void 0){var g=i.get(T);if(g!==void 0){i.delete(T),o.set(T,g);var C=h?h.next:c;k(e,h,g),k(e,g,C),x(g,C,t),h=g}else{var L=c?c.e.nodes_start:t;h=ir(L,e,h,h===null?e.first:h.next,w,T,l,f,u,v)}o.set(T,h),N=[],I=[],c=h.next;continue}if(b&&Mr(s,w,l,u),s.e.f&J&&(Tr(s.e),_&&((ur=s.a)==null||ur.unfix(),(E??(E=new Set)).delete(s))),s!==c){if(p!==void 0&&p.has(s)){if(N.length<I.length){var O=I[0],M;h=O.prev;var Y=N[0],G=N[N.length-1];for(M=0;M<N.length;M+=1)x(N[M],O,t);for(M=0;M<I.length;M+=1)p.delete(I[M]);k(e,Y.prev,G.next),k(e,h,Y),k(e,G,O),c=O,h=G,l-=1,N=[],I=[]}else p.delete(s),x(s,c,t),k(e,s.prev,s.next),k(e,s,h===null?e.first:h.next),k(e,h,s),h=s;continue}for(N=[],I=[];c!==null&&c.k!==T;)c.e.f&J||(p??(p=new Set)).add(c),I.push(c),c=c.next;if(c===null)continue;s=c}N.push(s),h=s,c=s.next}if(c!==null||p!==void 0){for(var y=p===void 0?[]:Er(p);c!==null;)c.e.f&J||y.push(c),c=c.next;var W=y.length;if(W>0){var zr=u&wr&&d===0?t:null;if(_){for(l=0;l<W;l+=1)(lr=y[l].a)==null||lr.measure();for(l=0;l<W;l+=1)(nr=y[l].a)==null||nr.fix()}Me(e,y,zr)}}_&&Nr(()=>{var or;if(E!==void 0)for(s of E)(or=s.a)==null||or.apply()}),r.first=e.first&&e.first.e,r.last=h&&h.e;for(var qr of i.values())V(qr.e);i.clear()}function Mr(r,a,e,i){i&X&&cr(r.v,a),i&Z?cr(r.i,e):r.i=e}function ir(r,a,e,i,t,f,u,n,v,_,b){var d=(v&X)!==0,o=(v&Xr)===0,A=d?o?Kr(t,!1,!1):dr(t):t,c=v&Z?dr(u):u,p={i:c,v:A,k:f,a:null,e:null,prev:e,next:i};try{if(r===null){var h=document.createDocumentFragment();h.append(r=gr())}return p.e=U(()=>n(r,A,c,_),S),p.e.prev=e&&e.e,p.e.next=i&&i.e,e===null?b||(a.first=p):(e.next=p,e.e.next=p.e),i!==null&&(i.prev=p,i.e.prev=p.e),p}finally{}}function x(r,a,e){for(var i=r.next?r.next.e.nodes_start:e,t=a?a.e.nodes_start:e,f=r.e.nodes_start;f!==null&&f!==i;){var u=Sr(f);t.before(f),f=u}}function k(r,a,e){a===null?r.first=e:(a.next=e,a.e.next=e&&e.e),e!==null&&(e.prev=a,e.e.prev=a&&a.e)}function Oe(r,a,e=!1,i=!1,t=!1){var f=r,u="";Cr(()=>{var n=Ir;if(u===(u=a()??"")){S&&ar();return}if(n.nodes_start!==null&&($r(n.nodes_start,n.nodes_end),n.nodes_start=n.nodes_end=null),u!==""){if(S){m.data;for(var v=ar(),_=v;v!==null&&(v.nodeType!==Ar||v.data!=="");)_=v,v=Sr(v);if(v===null)throw Qr(),xr;hr(m,_),f=j(v);return}var b=u+"";e?b=`<svg>${b}</svg>`:i&&(b=`<math>${b}</math>`);var d=re(b);if((e||i)&&(d=z(d)),hr(z(d),d.lastChild),e||i)for(;z(d);)f.before(z(d));else f.before(d)}})}function me(r,a){var e=void 0,i;tr(()=>{e!==(e=a())&&(i&&(V(i),i=null),e&&(i=U(()=>{fr(()=>e(r))})))})}function kr(r){var a,e,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var t=r.length;for(a=0;a<t;a++)r[a]&&(e=kr(r[a]))&&(i&&(i+=" "),i+=e)}else for(e in r)r[e]&&(i&&(i+=" "),i+=e);return i}function Be(){for(var r,a,e=0,i="",t=arguments.length;e<t;e++)(r=arguments[e])&&(a=kr(r))&&(i&&(i+=" "),i+=a);return i}function Or(r){return typeof r=="object"?Be(r):r??""}const _r=[...`
2
- \r\f \v\uFEFF`];function Re(r,a,e){var i=r==null?"":""+r;if(a&&(i=i?i+" "+a:a),e){for(var t in e)if(e[t])i=i?i+" "+t:t;else if(i.length)for(var f=t.length,u=0;(u=i.indexOf(t,u))>=0;){var n=u+f;(u===0||_r.includes(i[u-1]))&&(n===i.length||_r.includes(i[n]))?i=(u===0?"":i.substring(0,u))+i.substring(n+1):u=n}}return i===""?null:i}function br(r,a=!1){var e=a?" !important;":";",i="";for(var t in r){var f=r[t];f!=null&&f!==""&&(i+=" "+t+": "+f+e)}return i}function rr(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function ye(r,a){if(a){var e="",i,t;if(Array.isArray(a)?(i=a[0],t=a[1]):i=a,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var f=!1,u=0,n=!1,v=[];i&&v.push(...Object.keys(i).map(rr)),t&&v.push(...Object.keys(t).map(rr));var _=0,b=-1;const p=r.length;for(var d=0;d<p;d++){var o=r[d];if(n?o==="/"&&r[d-1]==="*"&&(n=!1):f?f===o&&(f=!1):o==="/"&&r[d+1]==="*"?n=!0:o==='"'||o==="'"?f=o:o==="("?u++:o===")"&&u--,!n&&f===!1&&u===0){if(o===":"&&b===-1)b=d;else if(o===";"||d===p-1){if(b!==-1){var A=rr(r.substring(_,b).trim());if(!v.includes(A)){o!==";"&&d++;var c=r.substring(_,d).trim();e+=" "+c+";"}}_=d+1,b=-1}}}}return i&&(e+=br(i)),t&&(e+=br(t,!0)),e=e.trim(),e===""?null:e}return r==null?null:String(r)}function mr(r,a,e,i,t,f){var u=r.__className;if(S||u!==e||u===void 0){var n=Re(e,i,f);(!S||n!==r.getAttribute("class"))&&(n==null?r.removeAttribute("class"):a?r.className=n:r.setAttribute("class",n)),r.__className=e}else if(f&&t!==f)for(var v in f){var _=!!f[v];(t==null||_!==!!t[v])&&r.classList.toggle(v,_)}return f}function er(r,a={},e,i){for(var t in e){var f=e[t];a[t]!==f&&(e[t]==null?r.style.removeProperty(t):r.style.setProperty(t,f,i))}}function De(r,a,e,i){var t=r.__style;if(S||t!==a){var f=ye(a,i);(!S||f!==r.getAttribute("style"))&&(f==null?r.removeAttribute("style"):r.style.cssText=f),r.__style=a}else i&&(Array.isArray(i)?(er(r,e==null?void 0:e[0],i[0]),er(r,e==null?void 0:e[1],i[1],"important")):er(r,e,i));return i}function F(r,a,e=!1){if(r.multiple){if(a==null)return;if(!Lr(a))return ie();for(var i of r.options)i.selected=a.includes(P(i));return}for(i of r.options){var t=P(i);if(te(t,a)){i.selected=!0;return}}(!e||a!==void 0)&&(r.selectedIndex=-1)}function Br(r){var a=new MutationObserver(()=>{F(r,r.__value)});a.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ae(()=>{a.disconnect()})}function Ge(r,a,e=a){var i=new WeakSet,t=!0;ee(r,"change",f=>{var u=f?"[selected]":":checked",n;if(r.multiple)n=[].map.call(r.querySelectorAll(u),P);else{var v=r.querySelector(u)??r.querySelector("option:not([disabled])");n=v&&P(v)}e(n),K!==null&&i.add(K)}),fr(()=>{var f=a();if(r===document.activeElement){var u=fe??K;if(i.has(u))return}if(F(r,f,t),t&&f===void 0){var n=r.querySelector(":checked");n!==null&&(f=P(n),e(f))}r.__value=f,t=!1}),Br(r)}function P(r){return"__value"in r?r.__value:r.value}const D=Symbol("class"),H=Symbol("style"),Rr=Symbol("is custom element"),yr=Symbol("is html");function He(r){if(S){var a=!1,e=()=>{if(!a){if(a=!0,r.hasAttribute("value")){var i=r.value;B(r,"value",null),r.value=i}if(r.hasAttribute("checked")){var t=r.checked;B(r,"checked",null),r.checked=t}}};r.__on_r=e,Nr(e),be()}}function ze(r,a){a?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function B(r,a,e,i){var t=Dr(r);S&&(t[a]=r.getAttribute(a),a==="src"||a==="srcset"||a==="href"&&r.nodeName==="LINK")||t[a]!==(t[a]=e)&&(a==="loading"&&(r[ue]=e),e==null?r.removeAttribute(a):typeof e!="string"&&Hr(r).includes(a)?r[a]=e:r.setAttribute(a,e))}function qe(r,a,e,i,t=!1,f=!1){if(S&&t&&r.tagName==="INPUT"){var u=r,n=u.type==="checkbox"?"defaultChecked":"defaultValue";n in e||He(u)}var v=Dr(r),_=v[Rr],b=!v[yr];let d=S&&_;d&&q(!1);var o=a||{},A=r.tagName==="OPTION";for(var c in a)c in e||(e[c]=null);e.class?e.class=Or(e.class):(i||e[D])&&(e.class=null),e[H]&&(e.style??(e.style=null));var p=Hr(r);for(const s in e){let l=e[s];if(A&&s==="value"&&l==null){r.value=r.__value="",o[s]=l;continue}if(s==="class"){var h=r.namespaceURI==="http://www.w3.org/1999/xhtml";mr(r,h,l,i,a==null?void 0:a[D],e[D]),o[s]=l,o[D]=e[D];continue}if(s==="style"){De(r,l,a==null?void 0:a[H],e[H]),o[s]=l,o[H]=e[H];continue}var E=o[s];if(!(l===E&&!(l===void 0&&r.hasAttribute(s)))){o[s]=l;var N=s[0]+s[1];if(N!=="$$")if(N==="on"){const g={},C="$$"+s;let L=s.slice(2);var I=Ce(L);if(Se(L)&&(L=L.slice(0,-7),g.capture=!0),!I&&E){if(l!=null)continue;r.removeEventListener(L,o[C],g),o[C]=null}if(l!=null)if(I)r[`__${L}`]=l,de([L]);else{let O=function(M){o[s].call(this,M)};o[C]=ce(L,r,O,g)}else I&&(r[`__${L}`]=void 0)}else if(s==="style")B(r,s,l);else if(s==="autofocus")he(r,!!l);else if(!_&&(s==="__value"||s==="value"&&l!=null))r.value=r.__value=l;else if(s==="selected"&&A)ze(r,l);else{var w=s;b||(w=Ie(w));var T=w==="defaultValue"||w==="defaultChecked";if(l==null&&!_&&!T)if(v[s]=null,w==="value"||w==="checked"){let g=r;const C=a===void 0;if(w==="value"){let L=g.defaultValue;g.removeAttribute(w),g.defaultValue=L,g.value=g.__value=C?L:null}else{let L=g.defaultChecked;g.removeAttribute(w),g.defaultChecked=L,g.checked=C?L:!1}}else r.removeAttribute(s);else T||p.includes(w)&&(_||typeof l!="string")?(r[w]=l,w in v&&(v[w]=_e)):typeof l!="function"&&B(r,w,l)}}}return d&&q(!0),o}function We(r,a,e=[],i=[],t,f=!1,u=!1){se(e,i,n=>{var v=void 0,_={},b=r.nodeName==="SELECT",d=!1;if(tr(()=>{var A=a(...n.map(R)),c=qe(r,v,A,t,f,u);d&&b&&"value"in A&&F(r,A.value);for(let h of Object.getOwnPropertySymbols(_))A[h]||V(_[h]);for(let h of Object.getOwnPropertySymbols(A)){var p=A[h];h.description===oe&&(!v||p!==v[h])&&(_[h]&&V(_[h]),_[h]=U(()=>me(r,()=>p))),c[h]=p}v=c}),b){var o=r;fr(()=>{F(o,v.value,!0),Br(o)})}d=!0})}function Dr(r){return r.__attributes??(r.__attributes={[Rr]:r.nodeName.includes("-"),[yr]:r.namespaceURI===le})}var pr=new Map;function Hr(r){var a=r.getAttribute("is")||r.nodeName,e=pr.get(a);if(e)return e;pr.set(a,e=[]);for(var i,t=r,f=Element.prototype;f!==t;){i=ve(t);for(var u in i)i[u].set&&e.push(u);t=ne(t)}return e}var Pe=Ae('<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" stroke-width="1" aria-hidden="true"><!></svg>'),Ue=Te('<div class="flex h-xl w-xl items-center justify-center rounded bg-gray-200 text-xs text-gray-500">?</div>');function Je(r,a){let e=Q(a,"width",3,25),i=Q(a,"height",3,25),t=Q(a,"class",3,"");const f={paperclip:{viewBox:"0 0 32 32",path:'<image href="/ui/paperclip.svg" width="32" height="32" />'},send:{viewBox:"0 0 32 32",path:'<image href="/ui/send.svg" width="32" height="32" />'},checkmark:{viewBox:"0 0 24 24",path:'<path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" />'},"chevron-down":{viewBox:"0 0 24 24",path:'<path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" />'},"chevron-up":{viewBox:"0 0 24 24",path:'<path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6 1.41 1.41z" />'},"chevron-left":{viewBox:"0 0 24 24",path:'<path d="M14.41 7.41L13 6l-6 6 6 6 1.41-1.41L9.83 12z" />'},"chevron-right":{viewBox:"0 0 24 24",path:'<path d="M9.59 16.59L11 18l6-6-6-6-1.41 1.41L14.17 12z" />'},log:{viewBox:"0 0 24 24",path:'<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-6h2v2h-2v-2zm0-4h2v3h-2v-3z" />'},close:{viewBox:"0 0 24 24",path:`<path d="M6 6L18 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>
3
- <path d="M18 6L6 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/>`},copy:{viewBox:"0 0 24 24",path:'<rect x="4" y="4" width="11" height="11" rx="2" ry="2" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round" /><rect x="9" y="9" width="11" height="11" rx="2" ry="2" fill="none" stroke="currentColor" stroke-width="2" stroke-linejoin="round" />'}};let u=we(()=>f[a.name]);var n=pe(),v=ge(n);{var _=d=>{var o=Pe(),A=Ee(o);Oe(A,()=>R(u).path,!0),Le(o),Cr(()=>{B(o,"width",e()),B(o,"height",i()),B(o,"viewBox",R(u).viewBox),mr(o,0,Or(t()))}),$(d,o)},b=d=>{var o=Ue();$(d,o)};Ne(v,d=>{R(u)?d(_):d(b,!1)})}$(r,n)}export{Je as I,We as a,Ge as b,mr as c,De as d,Ze as e,Or as f,Be as g,Oe as h,Xe as i,He as r,B as s};
@@ -1 +0,0 @@
1
- import"./CWj6FrbW.js";import{a7 as _,a8 as u,a9 as b,w as h,C as y,F as k,aa as E,p as S,f as x,b as I,c as V,i as g,u as C}from"./C-dTPkQy.js";import{a as F}from"./HBgR5qMR.js";import{b as M}from"./aeuWzujc.js";import{p as i,r as N}from"./FawE95CY.js";function W(a,e,v=e){var c=new WeakSet;_(a,"input",async l=>{var t=l?a.defaultValue:a.value;if(t=n(a)?d(t):t,v(t),u!==null&&c.add(u),await b(),t!==(t=e())){var f=a.selectionStart,s=a.selectionEnd,o=a.value.length;if(a.value=t??"",s!==null){var r=a.value.length;f===s&&s===o&&r>o?(a.selectionStart=r,a.selectionEnd=r):(a.selectionStart=f,a.selectionEnd=Math.min(s,r))}}}),(k&&a.defaultValue!==a.value||h(e)==null&&a.value)&&(v(n(a)?d(a.value):a.value),u!==null&&c.add(u)),y(()=>{var l=e();if(a===document.activeElement){var t=E??u;if(c.has(t))return}n(a)&&l===d(a.value)||a.type==="date"&&!l&&!a.value||l!==a.value&&(a.value=l??"")})}function n(a){var e=a.type;return e==="number"||e==="range"}function d(a){return a===""?null:+a}var j=x("<input/>");function D(a,e){S(e,!0);let v=i(e,"class",3,""),c=i(e,"value",15),l=i(e,"type",3,"text"),t=i(e,"variant",3,"config"),f=i(e,"el",15),s=N(e,["$$slots","$$events","$$legacy","class","value","type","variant","el"]),o=C(()=>t()==="chat"?`input-chat ${v()}`:`input-config ${v()}`);var r=j();F(r,()=>({type:l(),class:g(o),...s}),void 0,void 0,"svelte-8ff5h4",!0),M(r,m=>f(m),()=>f()),W(r,c),I(a,r),V()}export{D as I,W as b};
@@ -1 +0,0 @@
1
- import{B as S,C as h,w as k,D as B,S as T}from"./C-dTPkQy.js";function t(r,i){return r===i||(r==null?void 0:r[T])===i}function w(r={},i,a,c){return S(()=>{var f,s;return h(()=>{f=s,s=[],k(()=>{r!==a(...s)&&(i(r,...s),f&&t(a(...f),r)&&i(null,...f))})}),()=>{B(()=>{s&&t(a(...s),r)&&i(null,...s)})}}),r}export{w as b};
@@ -1,2 +0,0 @@
1
- < dmM?��zI�>�?9Dw}�vy��p��Ec�-O�.� �;1��z��T���6ᭃ�'��/t�����U����Y���ޠ�=Hl60-����@�y���=ׯ�s��)����c� f�� �����D6��/Jbd��R?�(UUY��Ѐ�g���Z
2
- �QY�K�D�)p�5;�V���_xjҿ�
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DgVTcUxG.js","../chunks/CWj6FrbW.js","../chunks/BrDK8TTs.js","../chunks/C-dTPkQy.js","../chunks/CUfDVPpW.js","../chunks/B2gGEZTS.js","../chunks/BHL1bMOV.js","../chunks/BzAx_Qn3.js","../chunks/BUApaBEI.js","../assets/0.BPqDeVAI.css","../nodes/1._3H1cdWd.js","../chunks/CInh9KnU.js","../chunks/BgaIh2D4.js","../nodes/2.BO0WBJz3.js","../chunks/HBgR5qMR.js","../chunks/FawE95CY.js","../chunks/Bf1oCG9-.js","../chunks/aeuWzujc.js","../chunks/I-mny6CH.js","../assets/Input.NBh3BL7E.css","../chunks/W8E9z4jl.js","../chunks/Bd7SZbXQ.js","../assets/Tab.BxaGw9IG.css","../chunks/D9h7-Y-f.js","../assets/AgentSidebar.QeNZJtLq.css","../assets/2.Dzh7_Q8n.css","../nodes/3.C-B1sGi_.js","../chunks/BEJ5fU19.js","../assets/3.CZVw96CJ.css","../nodes/4.SsrvuMXV.js","../chunks/CxDLEL1d.js","../chunks/BsKQRAyX.js","../assets/Modal.tn0RQdqM.css","../chunks/C7FjDhij.js","../assets/CopyTracesDropdown.NFJFjHv0.css","../chunks/D-51TRqM.js","../assets/4.BIrSikaZ.css","../nodes/5.DM_0dw43.js","../nodes/6.BLcf1-sM.js","../chunks/hp4PFHFv.js","../assets/6.C4C8vBUW.css","../nodes/7.BLozkJCY.js","../nodes/8.BeHRzquW.js","../nodes/9.B1qNbiqD.js","../assets/9.C5apk4jm.css"])))=>i.map(i=>d[i]);
2
- var H=r=>{throw TypeError(r)};var J=(r,t,e)=>t.has(r)||H("Cannot "+e);var o=(r,t,e)=>(J(r,t,"read from private field"),e?e.call(r):t.get(r)),q=(r,t,e)=>t.has(r)?H("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(r):t.set(r,e),G=(r,t,e,n)=>(J(r,t,"write to private field"),n?n.call(r,e):t.set(r,e),e);import{c as T,_ as l}from"../chunks/BsKQRAyX.js";import{k as j,a5 as ot,i as d,af as nt,Q as it,T as ct,p as mt,q as ut,v as _t,e as Q,a9 as dt,f as K,a as P,s as lt,b as v,c as ft,O as R,u as x,d as vt,r as gt,j as ht,t as Et}from"../chunks/C-dTPkQy.js";import{h as yt,m as Pt,u as bt,o as Ot,s as Rt}from"../chunks/BrDK8TTs.js";import"../chunks/CWj6FrbW.js";import{i as k}from"../chunks/CUfDVPpW.js";import{b as D}from"../chunks/aeuWzujc.js";import{p as w}from"../chunks/FawE95CY.js";function At(r){return class extends It{constructor(t){super({component:r,...t})}}}var g,c;class It{constructor(t){q(this,g);q(this,c);var A;var e=new Map,n=(a,s)=>{var f=ct(s,!1,!1);return e.set(a,f),f};const m=new Proxy({...t.props||{},$$events:{}},{get(a,s){return d(e.get(s)??n(s,Reflect.get(a,s)))},has(a,s){return s===ot?!0:(d(e.get(s)??n(s,Reflect.get(a,s))),Reflect.has(a,s))},set(a,s,f){return j(e.get(s)??n(s,f),f),Reflect.set(a,s,f)}});G(this,c,(t.hydrate?yt:Pt)(t.component,{target:t.target,anchor:t.anchor,props:m,context:t.context,intro:t.intro??!1,recover:t.recover})),(!((A=t==null?void 0:t.props)!=null&&A.$$host)||t.sync===!1)&&nt(),G(this,g,m.$$events);for(const a of Object.keys(o(this,c)))a==="$set"||a==="$destroy"||a==="$on"||it(this,a,{get(){return o(this,c)[a]},set(s){o(this,c)[a]=s},enumerable:!0});o(this,c).$set=a=>{Object.assign(m,a)},o(this,c).$destroy=()=>{bt(o(this,c))}}$set(t){o(this,c).$set(t)}$on(t,e){o(this,g)[t]=o(this,g)[t]||[];const n=(...m)=>e.call(this,...m);return o(this,g)[t].push(n),()=>{o(this,g)[t]=o(this,g)[t].filter(m=>m!==n)}}$destroy(){o(this,c).$destroy()}}g=new WeakMap,c=new WeakMap;const Yt={};var Lt=K('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),Tt=K("<!> <!>",1);function xt(r,t){mt(t,!0);let e=w(t,"components",23,()=>[]),n=w(t,"data_0",3,null),m=w(t,"data_1",3,null),A=w(t,"data_2",3,null);ut(()=>t.stores.page.set(t.page)),_t(()=>{t.stores,t.page,t.constructors,e(),t.form,n(),m(),A(),t.stores.page.notify()});let a=Q(!1),s=Q(!1),f=Q(null);Ot(()=>{const i=t.stores.page.subscribe(()=>{d(a)&&(j(s,!0),dt().then(()=>{j(f,document.title||"untitled page",!0)}))});return j(a,!0),i});const N=x(()=>t.constructors[2]);var Y=Tt(),z=P(Y);{var U=i=>{const h=x(()=>t.constructors[0]);var E=R(),I=P(E);T(I,()=>d(h),(y,b)=>{D(b(y,{get data(){return n()},get form(){return t.form},get params(){return t.page.params},children:(u,kt)=>{var B=R(),$=P(B);{var tt=O=>{const p=x(()=>t.constructors[1]);var L=R(),C=P(L);T(C,()=>d(p),(S,M)=>{D(M(S,{get data(){return m()},get form(){return t.form},get params(){return t.page.params},children:(_,wt)=>{var F=R(),rt=P(F);T(rt,()=>d(N),(at,st)=>{D(st(at,{get data(){return A()},get form(){return t.form},get params(){return t.page.params}}),V=>e()[2]=V,()=>{var V;return(V=e())==null?void 0:V[2]})}),v(_,F)},$$slots:{default:!0}}),_=>e()[1]=_,()=>{var _;return(_=e())==null?void 0:_[1]})}),v(O,L)},et=O=>{const p=x(()=>t.constructors[1]);var L=R(),C=P(L);T(C,()=>d(p),(S,M)=>{D(M(S,{get data(){return m()},get form(){return t.form},get params(){return t.page.params}}),_=>e()[1]=_,()=>{var _;return(_=e())==null?void 0:_[1]})}),v(O,L)};k($,O=>{t.constructors[2]?O(tt):O(et,!1)})}v(u,B)},$$slots:{default:!0}}),u=>e()[0]=u,()=>{var u;return(u=e())==null?void 0:u[0]})}),v(i,E)},W=i=>{const h=x(()=>t.constructors[0]);var E=R(),I=P(E);T(I,()=>d(h),(y,b)=>{D(b(y,{get data(){return n()},get form(){return t.form},get params(){return t.page.params}}),u=>e()[0]=u,()=>{var u;return(u=e())==null?void 0:u[0]})}),v(i,E)};k(z,i=>{t.constructors[1]?i(U):i(W,!1)})}var X=lt(z,2);{var Z=i=>{var h=Lt(),E=vt(h);{var I=y=>{var b=ht();Et(()=>Rt(b,d(f))),v(y,b)};k(E,y=>{d(s)&&y(I)})}gt(h),v(i,h)};k(X,i=>{d(a)&&i(Z)})}v(r,Y),ft()}const zt=At(xt),Bt=[()=>l(()=>import("../nodes/0.DgVTcUxG.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),()=>l(()=>import("../nodes/1._3H1cdWd.js"),__vite__mapDeps([10,1,11,3,2,12,6,7,8]),import.meta.url),()=>l(()=>import("../nodes/2.BO0WBJz3.js"),__vite__mapDeps([13,1,2,3,4,14,15,7,8,6,16,17,18,19,20,21,22,23,24,5,25]),import.meta.url),()=>l(()=>import("../nodes/3.C-B1sGi_.js"),__vite__mapDeps([26,1,2,3,23,4,14,15,24,5,27,28]),import.meta.url),()=>l(()=>import("../nodes/4.SsrvuMXV.js"),__vite__mapDeps([29,1,2,3,4,30,31,15,14,32,7,8,16,17,33,21,22,27,34,35,18,19,23,24,6,5,36]),import.meta.url),()=>l(()=>import("../nodes/5.DM_0dw43.js"),__vite__mapDeps([37,1,2,3,7,8,6,23,4,14,15,24,5,21,17,22,27]),import.meta.url),()=>l(()=>import("../nodes/6.BLcf1-sM.js"),__vite__mapDeps([38,27,39,8,1,2,3,4,14,15,18,17,19,35,31,30,32,16,7,6,21,22,5,23,24,40]),import.meta.url),()=>l(()=>import("../nodes/7.BLozkJCY.js"),__vite__mapDeps([41,39,8]),import.meta.url),()=>l(()=>import("../nodes/8.BeHRzquW.js"),__vite__mapDeps([42,1,11,3]),import.meta.url),()=>l(()=>import("../nodes/9.B1qNbiqD.js"),__vite__mapDeps([43,1,11,3,2,4,14,15,12,7,8,20,16,17,33,30,31,32,21,22,27,34,44]),import.meta.url)],Ft=[],Ht={"/":[3],"/roleplay":[4],"/tests":[5],"/tests/[agent]":[6],"/traces":[7],"/traces/conversations":[8,[2]],"/traces/conversations/[conversationId]/traces":[9,[2]]},Dt={handleError:({error:r})=>{console.error(r)},reroute:()=>{},transport:{}},Vt=Object.fromEntries(Object.entries(Dt.transport).map(([r,t])=>[r,t.decode])),Jt=!1,Kt=(r,t)=>Vt[r](t);export{Kt as decode,Vt as decoders,Ht as dictionary,Jt as hash,Dt as hooks,Yt as matchers,Bt as nodes,zt as root,Ft as server_loads};
@@ -1 +0,0 @@
1
- import{l as o,a as r}from"../chunks/BzAx_Qn3.js";export{o as load_css,r as start};
@@ -1,2 +0,0 @@
1
- )�import{l as o,a as r}from"../chunks/BzAx_Qn3.js";export{o as load_css,r as start};
2
- 
@@ -1,3 +0,0 @@
1
- import"../chunks/CWj6FrbW.js";import{o as E,a as _,s as x}from"../chunks/BrDK8TTs.js";import{p as R,f as v,b as m,c as y,k as p,e as C,d as u,s as L,i as f,r as h,t as $}from"../chunks/C-dTPkQy.js";import{i as j}from"../chunks/CUfDVPpW.js";import{s as k}from"../chunks/B2gGEZTS.js";import{p as g}from"../chunks/BHL1bMOV.js";import{g as a}from"../chunks/BzAx_Qn3.js";var I=v(`<div class="
2
- absolute bottom-0 right-0 z-50 m-4 rounded-sm border border-red-500 bg-red-50
3
- px-4 py-2 text-red-800 focus:outline-none focus:ring-0"> </div>`),A=v('<main class="h-screen overflow-hidden bg-gray-600"><!> <!></main>');function D(w,c){R(c,!0);let s=C("");function i(e){p(s,e,!0),setTimeout(()=>{p(s,"")},5e3),console.error(e)}k({onAgentSelect:e=>{const r=g.url.pathname.split("/")[1],t=new URLSearchParams(g.url.search).get("step");if(!r||r==="roleplay"){let n=`/roleplay?agent=${encodeURIComponent(e)}`;t&&(n+=`&step=${encodeURIComponent(t)}`),a(n);return}if(r==="tests"){let n=`/tests/${encodeURIComponent(e)}`;t&&(n+=`?step=${encodeURIComponent(t)}`),a(n);return}if(r==="traces"){a("/traces");return}a(`/${r}`)},onError:i}),E(()=>{const e=o=>{var t;console.error(o),i(`Uncaught error: ${((t=o.error)==null?void 0:t.message)||o.message||"Unknown error"}`)},r=o=>{var t;console.error(o),i(`Unhandled promise rejection: ${((t=o.reason)==null?void 0:t.message)||o.reason||"Unknown error"}`)};return window.addEventListener("error",e),window.addEventListener("unhandledrejection",r),()=>{window.removeEventListener("error",e),window.removeEventListener("unhandledrejection",r)}});var d=A(),l=u(d);_(l,()=>c.children);var b=L(l,2);{var U=e=>{var r=I(),o=u(r,!0);h(r),$(()=>x(o,f(s))),m(e,r)};j(b,e=>{f(s)&&e(U)})}h(d),m(w,d),y()}export{D as component};
@@ -1 +0,0 @@
1
- import"../chunks/CWj6FrbW.js";import"../chunks/CInh9KnU.js";import{p as c,f as l,a as v,t as u,b as _,c as d,d as e,r as o,s as g}from"../chunks/C-dTPkQy.js";import{s as p}from"../chunks/BrDK8TTs.js";import{i as x}from"../chunks/BgaIh2D4.js";import{p as m}from"../chunks/BHL1bMOV.js";var b=l("<h1> </h1> <p> </p>",1);function z(i,f){c(f,!1),x();var t=b(),r=v(t),n=e(r,!0);o(r);var a=g(r,2),h=e(a,!0);o(a),u(()=>{var s;p(n,m.status),p(h,(s=m.error)==null?void 0:s.message)}),_(i,t),d()}export{z as component};
@@ -1 +0,0 @@
1
- import"../chunks/CWj6FrbW.js";import{o as St,a as kt,s as b}from"../chunks/BrDK8TTs.js";import{m as Ct,p as Pt,e as f,g as Re,f as I,h as Tt,d as s,s as l,t as E,i as t,b as c,c as At,k as o,$ as Lt,a as ve,n as P,j as T,u as ue,r as a,O as Ue}from"../chunks/C-dTPkQy.js";import{i as R}from"../chunks/CUfDVPpW.js";import{b as Ge,s as Qe,e as qe,i as He,I as Nt,c as Dt}from"../chunks/HBgR5qMR.js";import{p as jt}from"../chunks/FawE95CY.js";import{g as A}from"../chunks/BzAx_Qn3.js";import{p as S}from"../chunks/BHL1bMOV.js";import{B as U}from"../chunks/Bf1oCG9-.js";import{I as Et}from"../chunks/I-mny6CH.js";import{T as Mt,p as Je,m as Ft,g as zt}from"../chunks/W8E9z4jl.js";import{T as Bt,a as pe}from"../chunks/Bd7SZbXQ.js";import{A as Ot}from"../chunks/D9h7-Y-f.js";import{g as Rt}from"../chunks/B2gGEZTS.js";async function Ut(v,_,m,g,x){const N=v.target.value;o(_,N,!0),Je(N),m.setSourceId(N),o(g,null),await A("/traces"),await x()}function Gt(v,_,m){const g=v.target.value;o(_,g,!0),o(m,parseInt(t(_),10)||10,!0)}async function Qt(v,_,m,g,x){v==null||v.preventDefault(),v==null||v.stopPropagation(),o(_,""),o(m,[],!0),o(g,null),await x()}var qt=I("<!> <!> <!>",1),Ht=I("<option> </option>"),Jt=I("<option> </option>"),Kt=I('<button type="button" aria-label="Clear search" class="absolute right-2 top-1/2 flex -translate-y-1/2 items-center justify-center rounded p-1 text-rc-gray-200 hover:bg-rc-gray-600 hover:text-rc-gray-100 focus:outline-none"><!></button>'),Vt=I('<p class="py-8 text-center text-rc-gray-200">Loading...</p>'),Wt=I('<p class="py-8 text-center text-rc-gray-300">No conversations found</p>'),Xt=(v,_,m)=>_(t(m),v),Yt=I('<li><div class="flex w-full flex-col gap-2"><div class="flex w-full items-center justify-between"><div class="text-gray-300"> </div> <div class="flex items-center gap-2"><span class="text-xs text-rc-gray-300"> </span> <span class="font-semibold text-rc-gray-100"> </span></div></div> <div class="flex items-center justify-between gap-4"><div class="text-sm"><span class="text-rc-gray-200">Conversation Id:</span> <span class="text-rc-green-200"> </span></div> <p class="text-sm text-gray-400"> </p></div></div></li>'),Zt=I('<ul class="space-y-2"></ul>'),er=v=>v.stopPropagation(),tr=I('<div class="flex h-screen"><!> <div class="flex h-full min-w-0 flex-1 flex-col bg-rc-gray-980 pb-3 pr-4 pt-2"><nav class="mb-3 flex h-14 flex-none items-center justify-between bg-rc-gray-980"><div class="flex items-center"><!></div> <div class="flex items-center gap-4"><div class="flex-1"><label class="block"><div class="flex gap-2"><select class="select svelte-1uk1thp" aria-label="Telescope source"><!></select> <div class="relative"><!><!></div> <!></div></label></div> <div class="hidden items-center gap-2"><div class="text-rc-gray-200">Sort:</div> <!></div> <div class="hidden items-center gap-2"><div class="text-rc-gray-200">Page size:</div> <select class="rounded-sm border border-rc-gray-300 bg-rc-gray-700 p-2 pr-8 text-rc-gray-100"><option>5</option><option>10</option><option>20</option><option>50</option></select></div> <div class="flex items-center gap-3"><div class="flex items-center gap-2"><!> <!> <div class="text-sm text-rc-gray-200"> </div></div></div></div> <div class="ml-3"><span class="text-gray-400">API Mode:</span> <span class="font-semibold text-rc-green-200"> </span></div></nav> <main class="flex flex-1 gap-1 overflow-hidden border-thin border-rc-gray-300/40"><div class="flex h-full w-1/3 flex-col border-r-thin border-r-rc-gray-300 bg-rc-gray-800"><div class="flex-none border-b border-rc-gray-300/40 p-4"><h2 class="text-lg font-semibold text-rc-gray-100">Conversations</h2></div> <div class="rc-scroll flex-1 overflow-scroll px-3 py-4"><!></div></div> <div class="flex h-full w-2/3 flex-col bg-rc-gray-980"><!></div></main></div></div>');function _r(v,_){Pt(_,!0);const m=new Mt(fetch);let g=f(void 0),x=f(null),N=f(""),D=f(""),G=f(10),Q=f("10"),M=f(!0),w=f(Re([])),k=f(null),F=f(!1),q=f(null),fe=f(0),$=f(Re([])),j=f(""),z=f(!1),H=f(null),ge=jt(_,"useMock",3,!1);const{onError:Ke}=Rt();function Ve(e){return new Date(e).toLocaleString()}function We(e){const r=Math.floor(e/60),n=e%60;return`${r}:${String(n).padStart(2,"0")}`}async function Xe(e,r=t(G),n){return ge()?Ft.fetchConversations(r,e,n??void 0):m.getConversations({phoneNumber:e,limit:Number(r),lastConversationId:n??void 0})}async function B(){o(w,[],!0),o(k,null),await J()}async function Ye(){o(z,!0),o(H,null);try{const e=await fetch("/traces/api/sources");if(!e.ok)throw new Error(`Failed to load sources (${e.status})`);const r=await e.json(),n=Array.isArray(r)?r:[];if(o($,n.filter(i=>i&&typeof i.id=="string"&&typeof i.label=="string"),!0),!t($).length)throw new Error("No sources returned");const d=zt(),h=d&&t($).some(i=>i.id===d)?d:t($)[0].id;o(j,h,!0),Je(h),m.setSourceId(h)}catch(e){console.error("Failed to load Telescope sources:",e),o(H,(e==null?void 0:e.message)??"Failed to load Telescope sources",!0),o($,[],!0),o(j,""),m.setSourceId(void 0)}finally{o(z,!1)}}async function J(){o(F,!0),o(q,null);try{const e=await Xe(t(D)||void 0,t(G),t(k)??void 0);let r=Array.isArray(e.items)?e.items.slice():[];r=r.filter(n=>!!(n!=null&&n.phoneNumber)),o(g,{limit:e.limit,items:r,lastConversationId:e.lastConversationId},!0),o(fe,r.length,!0),o(k,e.lastConversationId??null,!0),o(F,!1)}catch(e){o(F,!1),o(q,e.message||"Unknown error",!0),Ke(`Error loading conversations: ${t(q)}`),console.error("Load page error:",e)}}async function Ze(){var e;(e=t(g))!=null&&e.lastConversationId&&(t(w).push(t(g).lastConversationId),o(k,t(g).lastConversationId,!0),await J())}async function et(){t(w).length&&(t(w).pop(),o(k,t(w).length?t(w)[t(w).length-1]:null,!0),await J())}function tt(){var e;o(M,!t(M)),(e=t(g))!=null&&e.items&&t(g).items.sort((r,n)=>t(M)?n.createdAt-r.createdAt:r.createdAt-n.createdAt)}async function rt(e,r){var d;if(r==null||r.stopPropagation(),S.params.conversationId&&S.params.conversationId===e.conversationId||!S.params.conversationId&&((d=t(x))==null?void 0:d.conversationId)===e.conversationId){o(x,null),await A("/traces");return}o(x,e,!0),await A(`/traces/conversations/${e.conversationId}/traces`)}async function _e(){await B()}const me=ue(()=>S.url.pathname.split("/")[1]);function at({value:e}){if(e!==t(me)){if(e==="roleplay")return A("/roleplay");if(e==="tests")return A("/tests");if(e==="traces")return A("/traces");A("/"+e)}}St(()=>{const e=new URLSearchParams(window.location.search);o(N,e.get("agent")??"",!0),(async()=>(await Ye(),await B()))()});var K=tr();Tt(e=>{Lt.title="Bosun: Telescope"});var he=s(K);Ot(he,{agents:[],currentAgent:"",onSelect:()=>{},showAgents:!1,className:"flex-none border-r-thin border-r-rc-gray-600"});var xe=l(he,2),V=s(xe),W=s(V),st=s(W);Bt(st,{get value(){return t(me)},ariaLabel:"Top tabs",onChange:at,children:(e,r)=>{var n=qt(),d=ve(n);pe(d,{value:"roleplay",children:(u,y)=>{P();var p=T("Roleplay");c(u,p)},$$slots:{default:!0}});var h=l(d,2);pe(h,{value:"tests",children:(u,y)=>{P();var p=T("Tests");c(u,p)},$$slots:{default:!0}});var i=l(h,2);pe(i,{value:"traces",children:(u,y)=>{P();var p=T("Traces");c(u,p)},$$slots:{default:!0}}),c(e,n)},$$slots:{default:!0}}),a(W);var X=l(W,2),Y=s(X),ye=s(Y),be=s(ye),C=s(be);C.__change=[Ut,j,m,x,B];var ot=s(C);{var nt=e=>{var r=Ue(),n=ve(r);qe(n,17,()=>t($),He,(d,h)=>{var i=Ht(),u=s(i,!0);a(i);var y={};E(()=>{b(u,t(h).label),y!==(y=t(h).id)&&(i.value=(i.__value=t(h).id)??"")}),c(d,i)}),c(e,r)},lt=e=>{var r=Jt(),n=s(r,!0);a(r),r.value=r.__value="",E(()=>b(n,t(z)?"Loading…":"No sources")),c(e,r)};R(ot,e=>{t($).length?e(nt):e(lt,!1)})}a(C);var Z=l(C,2),we=s(Z);Et(we,{class:"w-56 rounded-r-none !border !border-rc-gray-500 !p-2 !pr-8 hover:border-rc-gray-400",placeholder:"Search by phone...",onkeydown:e=>{e.key==="Enter"&&(e.preventDefault(),e.stopPropagation(),_e())},get value(){return t(D)},set value(e){o(D,e,!0)}});var it=l(we);{var ct=e=>{var r=Kt();r.__click=[Qt,D,w,k,B];var n=s(r);Nt(n,{name:"close",width:18,height:18}),a(r),c(e,r)};R(it,e=>{t(D)&&e(ct)})}a(Z);var dt=l(Z,2);U(dt,{onclick:_e,children:(e,r)=>{P();var n=T("Search");c(e,n)},$$slots:{default:!0}}),a(be),a(ye),a(Y);var ee=l(Y,2),vt=l(s(ee),2);U(vt,{onclick:tt,children:(e,r)=>{P();var n=T();E(()=>b(n,t(M)?"Newest first":"Oldest first")),c(e,n)},$$slots:{default:!0}}),a(ee);var te=l(ee,2),O=l(s(te),2);O.__change=[Gt,Q,G];var re=s(O);re.value=re.__value="5";var ae=l(re);ae.value=ae.__value="10";var se=l(ae);se.value=se.__value="20";var Ie=l(se);Ie.value=Ie.__value="50",a(O),a(te);var $e=l(te,2),Se=s($e),ke=s(Se);{let e=ue(()=>t(w).length===0&&!t(k));U(ke,{onclick:et,get disabled(){return t(e)},children:(r,n)=>{P();var d=T("Prev");c(r,d)},$$slots:{default:!0}})}var Ce=l(ke,2);{let e=ue(()=>{var r;return!((r=t(g))!=null&&r.items.length)});U(Ce,{onclick:Ze,get disabled(){return t(e)},children:(r,n)=>{P();var d=T("Next");c(r,d)},$$slots:{default:!0}})}var Pe=l(Ce,2),ut=s(Pe);a(Pe),a(Se),a($e),a(X);var Te=l(X,2),Ae=l(s(Te),2),pt=s(Ae,!0);a(Ae),a(Te),a(V);var Le=l(V,2),oe=s(Le),Ne=l(s(oe),2),ft=s(Ne);{var gt=e=>{var r=Vt();c(e,r)},_t=e=>{var r=Ue(),n=ve(r);{var d=i=>{var u=Wt();c(i,u)},h=i=>{var u=Zt();qe(u,21,()=>t(g).items,He,(y,p)=>{var L=Yt();L.__click=[Xt,rt,p];var De=s(L),le=s(De),ie=s(le),ht=s(ie,!0);a(ie);var je=l(ie,2),ce=s(je),xt=s(ce,!0);a(ce);var Ee=l(ce,2),yt=s(Ee,!0);a(Ee),a(je),a(le);var Me=l(le,2),de=s(Me),Fe=l(s(de),2),bt=s(Fe,!0);a(Fe),a(de);var ze=l(de,2),wt=s(ze);a(ze),a(Me),a(De),a(L),E((It,$t)=>{var Be,Oe;Dt(L,1,`cursor-pointer rounded-lg border border-rc-gray-300 p-3 transition-colors ${(S.params.conversationId?t(p).conversationId===S.params.conversationId:t(p).conversationId===((Be=t(x))==null?void 0:Be.conversationId))?"bg-rc-gray-600":"bg-rc-gray-700"}`,"svelte-1uk1thp"),Qe(L,"aria-selected",S.params.conversationId?t(p).conversationId===S.params.conversationId:t(p).conversationId===((Oe=t(x))==null?void 0:Oe.conversationId)),b(ht,It),b(xt,t(p).medium),b(yt,t(p).phoneNumber),b(bt,t(p).conversationId),b(wt,`Duration: ${$t??""}`)},[()=>Ve(t(p).createdAt),()=>We(t(p).duration??0)]),c(y,L)}),a(u),c(i,u)};R(n,i=>{var u,y;(y=(u=t(g))==null?void 0:u.items)!=null&&y.length?i(h,!1):i(d)},!0)}c(e,r)};R(ft,e=>{t(F)?e(gt):e(_t,!1)})}a(Ne),a(oe);var ne=l(oe,2);ne.__click=[er];var mt=s(ne);kt(mt,()=>_.children),a(ne),a(Le),a(xe),a(K),E(()=>{C.disabled=t(z)||!t($).length,Qe(C,"title",t(H)??"Telescope source"),b(ut,`Items: ${t(fe)??""}`),b(pt,ge()?"Mock (local)":"Live")}),Ge(C,()=>t(j),e=>o(j,e)),Ge(O,()=>t(Q),e=>o(Q,e)),c(v,K),At()}Ct(["change","click"]);export{_r as component};
@@ -1,35 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../chunks/DaRvw8c-.js","../chunks/BsKQRAyX.js","../chunks/C-dTPkQy.js","../chunks/BrDK8TTs.js","../assets/editor.BMIWPGx3.css"])))=>i.map(i=>d[i]);
2
- var At=Object.defineProperty;var Ct=(G,F,O)=>F in G?At(G,F,{enumerable:!0,configurable:!0,writable:!0,value:O}):G[F]=O;var Oe=(G,F,O)=>Ct(G,typeof F!="symbol"?F+"":F,O);import"../chunks/CWj6FrbW.js";import{s as Ie,o as ot,a as Nt,c as Pt}from"../chunks/BrDK8TTs.js";import{p as Ge,f as xe,d as de,a as Pe,r as ce,s as ve,i as w,u as ke,t as Ne,b as he,k as J,e as ge,c as ze,m as Qe,g as We,v as Me,n as Ke,j as $e,ag as mt,O as st,h as It,$ as Rt}from"../chunks/C-dTPkQy.js";import{i as Ce}from"../chunks/CUfDVPpW.js";import{e as kt,k as Ft,M as Bt}from"../chunks/CxDLEL1d.js";import{I as _t,c as Be,e as Ze,i as at,f as Mt,s as Kt,d as Dt}from"../chunks/HBgR5qMR.js";import{g as nt,r as jt}from"../chunks/BzAx_Qn3.js";import{B as De}from"../chunks/Bf1oCG9-.js";import{p as Xe}from"../chunks/FawE95CY.js";import{D as Ut,d as Je,C as $t,i as xt,a as Vt,e as bt,c as Wt,f as qe,b as Ht,g as rt,h as Gt,j as zt,k as Yt}from"../chunks/C7FjDhij.js";import{P as lt,C as Jt}from"../chunks/D-51TRqM.js";import{b as ft}from"../chunks/aeuWzujc.js";import{I as wt}from"../chunks/I-mny6CH.js";import{t as ct}from"../chunks/BEJ5fU19.js";import{_ as Ot}from"../chunks/BsKQRAyX.js";import{A as qt}from"../chunks/D9h7-Y-f.js";import{p as vt}from"../chunks/BHL1bMOV.js";import{T as Xt,a as gt}from"../chunks/Bd7SZbXQ.js";import{g as Zt}from"../chunks/B2gGEZTS.js";var Qt=xe("<span> </span> <!>",1),en=xe('<div class="p-1 text-base font-semibold text-rc-green-200"> </div>'),tn=xe('<div class="p-1 text-base font-semibold text-rc-gray-100"> </div>'),nn=xe('<div class="flex items-start gap-2"><div class="min-w-0"><div class="p-1 text-sm text-rc-gray-300 group-hover:text-rc-gray-200"> </div> <!></div></div>'),rn=xe('<div class="mt-1 max-h-96 w-60 overflow-y-auto rounded-lg border border-rc-gray-110 bg-rc-gray-930 shadow-inner-white-soft backdrop-blur-2xl" role="listbox"></div>'),on=xe("<div><!> <!></div>");function sn(G,F){Ge(F,!0);let O=Xe(F,"class",3,""),C=ge(!1),L=ge(null);function h(){J(C,!w(C))}function b(T){F.onSelectState(T),J(C,!1)}function u(T){const e=T.userMessage;return e==null?"No message":(typeof e=="string"?e:String(e)).trim()||"No message"}function g(T,e=50,t="…"){if(!T)return"";if(T.length<=e)return T;const r=T.slice(0,e+1),f=Math.max(r.lastIndexOf(" "),r.lastIndexOf(" "),r.lastIndexOf(" "),r.lastIndexOf(`
3
- `),r.lastIndexOf("\r"));return(f>0?r.slice(0,f):T.slice(0,e)).trimEnd()+t}function l(T){T.key==="ArrowDown"&&!w(C)?(J(C,!0),T.preventDefault()):T.key==="ArrowUp"&&w(C)&&(J(C,!1),T.preventDefault())}let k=ke(()=>F.agentStates.find(T=>T.id===F.currentState)??null),D=ke(()=>{var T;return((T=w(k))==null?void 0:T.name)??"History"});var P=on(),A=de(P);De(A,{variant:"ghost",get"aria-expanded"(){return w(C)},"aria-haspopup":"listbox","aria-controls":"history-dropdown",onclick:h,onkeydown:l,class:"flex w-60 items-center gap-2 text-nowrap rounded-lg border border-transparent !bg-rc-gray-700 !px-3 !pb-1 !pt-[5px] text-justify text-rc-gray-200 hover:border hover:border-rc-gray-500 focus:outline-none focus:ring-0",get el(){return w(L)},set el(T){J(L,T,!0)},children:(T,e)=>{var t=Qt(),r=Pe(t),f=de(r,!0);ce(r);var c=ve(r,2);{let d=ke(()=>"size-7 text-rc-gray-500 transition-transform duration-200 "+(w(C)?"rotate-180":""));_t(c,{name:"chevron-down",get class(){return w(d)}})}Ne(()=>Ie(f,w(D))),he(T,t)},$$slots:{default:!0}});var y=ve(A,2);Ut(y,{id:"history-dropdown",get open(){return w(C)},onClose:()=>J(C,!1),get anchorEl(){return w(L)},placement:"bottom-start",offset:[0,1],children:e=>{var t=rn();Ze(t,21,()=>F.agentStates.slice().reverse(),at,(r,f)=>{{let c=ke(()=>w(f).id===F.currentState);De(r,{variant:"ghost",size:"small",role:"option",get"aria-selected"(){return w(c)},onclick:()=>b(w(f).id),class:"group w-full rounded-none border-b border-rc-gray-110 py-2 pr-3 text-left backdrop-blur-2xl last:border-b-0 hover:bg-rc-gray-700 focus:bg-rc-gray-400",children:(d,n)=>{var i=nn(),a=de(i),o=de(a),s=de(o,!0);ce(o);var m=ve(o,2);{var p=R=>{var I=en(),B=de(I,!0);ce(I),Ne(U=>Ie(B,U),[()=>g(u(w(f)))]),he(R,I)},S=R=>{var I=tn(),B=de(I,!0);ce(I),Ne(U=>Ie(B,U),[()=>g(u(w(f)))]),he(R,I)};Ce(m,R=>{w(f).id===F.currentState?R(p):R(S,!1)})}ce(a),ce(i),Ne(()=>Ie(s,w(f).name)),he(d,i)},$$slots:{default:!0}})}}),ce(t),he(e,t)},$$slots:{default:!0}}),ce(P),Ne(()=>Be(P,1,`relative ${O()}`)),he(G,P),ze()}Qe(["click"]);let ut=We([]);function an(G){ut.push(G)}function it(){ut.length=0}var ln=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cn(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}var un=xe('<dialog class="dialog m-auto bg-transparent p-0 text-rc-gray-100 shadow-md svelte-jby388"><!> <!></dialog>');function fn(G,F){Ge(F,!0);let O,C=Xe(F,"showCloseButton",3,!1),L=Xe(F,"onClose",3,()=>{}),h=Xe(F,"onOpen",3,()=>{}),b=Xe(F,"isOpen",3,!1);Me(()=>{b()?(console.log("show"),O==null||O.showModal(),h()()):O!=null&&O.open&&(console.log("close"),O.close())});function u(){L()()}ot(()=>(O.addEventListener("close",u),()=>{O.removeEventListener("close",u)}));function g(A){A.target===O&&O.close()}var l=un();l.__mousedown=g;var k=de(l);Nt(k,()=>F.children);var D=ve(k,2);{var P=A=>{De(A,{variant:"ghost",onclick:()=>O.close(),class:"absolute right-2 top-2",children:(y,T)=>{Ke();var e=$e("✕");he(y,e)},$$slots:{default:!0}})};Ce(D,A=>{C()&&A(P)})}ce(l),ft(l,A=>O=A,()=>O),he(G,l),ze()}Qe(["mousedown"]);function hn(G){if(!Array.isArray(G))return[];const F=[];for(const O of G){if(!O||typeof O!="object")continue;const C=O.text,L=O.lastSeen,h=O.uses;if(typeof C!="string"||typeof L!="number"||!Number.isFinite(L)||typeof h!="number"||!Number.isFinite(h))continue;const b=C.trim();b&&F.push({text:b,lastSeen:L,uses:h})}return F.sort((O,C)=>C.lastSeen-O.lastSeen),F}function pn(G,F,O=2e3){var u;const C=F.trim();if(!C)return G;const L=(((u=G[0])==null?void 0:u.lastSeen)??0)+1,h=G.findIndex(g=>g.text===C);let b;if(h!==-1){const g=G[h];b=[{text:g.text,lastSeen:L,uses:(g.uses??0)+1},...G.slice(0,h),...G.slice(h+1)]}else b=[{text:C,lastSeen:L,uses:1},...G];return b.length>O?b.slice(0,O):b}function dn(G,F,O=2e3){var u,g;if(!F.length)return G;if(!G.length)return F;const C=((u=G[0])==null?void 0:u.lastSeen)??0,h=(((g=F[0])==null?void 0:g.lastSeen)??0)>C?F:F.map((l,k)=>({...l,lastSeen:C+(F.length-k)})),b=new Map;for(const l of G)b.set(l.text,l);for(const l of h){const k=b.get(l.text);if(!k){b.set(l.text,l);continue}b.set(l.text,{text:l.text,lastSeen:Math.max(k.lastSeen,l.lastSeen),uses:k.uses+l.uses})}return Array.from(b.values()).sort((l,k)=>k.lastSeen-l.lastSeen).slice(0,O)}function mn(G,F,O=5){if(!F.length)return[];const L=G.trim().toLowerCase(),h=yt(G,!0),b=yt(G,!1);if(!h)return[];const u=/\s$/u.test(G),g=[];for(const l of F){const k=yt(l.text);if(!k||l.text.trim().toLowerCase()===L||!k.startsWith(b))continue;const D=vn(l.text,b,u)??G.length;g.push({item:l,prefixEndIndex:Math.max(0,Math.min(l.text.length,D))})}return g.sort((l,k)=>l.item.lastSeen!==k.item.lastSeen?k.item.lastSeen-l.item.lastSeen:l.item.uses!==k.item.uses?k.item.uses-l.item.uses:l.item.text.length-k.item.text.length),g.slice(0,O).slice().reverse().map(l=>({text:l.item.text,prefixEndIndex:l.prefixEndIndex,segments:gn(l.item.text,[[0,l.prefixEndIndex]])}))}function yt(G,F=!0){const O=G.toLowerCase();let C;try{C=O.replace(/[\p{P}\p{S}]/gu," ")}catch{C=O.replace(/[^a-z0-9\s]/gi," ")}const h=C.replace(/\s+/g," ").replace(/^\s+/u,"");return F?h.replace(/\s+$/u,""):h}function vn(G,F,O){if(!F)return null;let C="",L=!0;for(let h=0;h<G.length;h++){const b=G[h];let u;if(/\s/u.test(b))u=" ";else try{u=/[\p{P}\p{S}]/u.test(b)?" ":b.toLowerCase()}catch{u=/[^a-z0-9\s]/i.test(b)?" ":b.toLowerCase()}if(u===" "){if(L)continue;C+=" ",L=!0}else C+=u,L=!1;if(C.length===F.length){if(C!==F)return null;let g=h+1;if(O&&F.endsWith(" ")){let l=g;for(;l<G.length;){const k=G[l];if(/\s/u.test(k)){l+=1;continue}try{if(/[\p{P}\p{S}]/u.test(k)){l+=1;continue}}catch{if(/[^a-z0-9\s]/i.test(k)){l+=1;continue}}break}g=l}return g}if(C.length>F.length)return null}return null}function gn(G,F){if(!F.length)return[{text:G,matched:!1}];const O=[];let C=0;for(const[L,h]of F)L>C&&O.push({text:G.slice(C,L),matched:!1}),O.push({text:G.slice(L,h),matched:!0}),C=h;return C<G.length&&O.push({text:G.slice(C),matched:!1}),O.filter(L=>L.text.length>0)}var yn=xe('<form><h2 class="text-l mb-4 text-gray-300">Image URL</h2> <!> <!></form>'),_n=xe('<div class="my-2 flex w-full justify-center"><div class="rounded-full border border-rc-gray-650 bg-rc-gray-800/40 px-3 py-1 text-xs text-rc-gray-200"> </div></div>'),xn=xe('<!> <div class="log-element"><div><!></div></div>',1),bn=(G,F,O)=>{G.preventDefault(),F(w(O))},wn=xe("<span> </span>"),En=xe('<button type="button" role="option" tabindex="-1"></button>'),kn=xe('<div class="absolute bottom-full left-0 right-0 mb-1 max-h-60 overflow-y-auto rounded-lg border border-rc-gray-110 bg-rc-gray-930 shadow-inner-white-soft backdrop-blur-2xl" role="listbox"></div>'),On=xe('<div class="pointer-events-none absolute inset-0 z-10 overflow-hidden rounded-lg" aria-hidden="true"><div class="whitespace-pre text-rc-gray-400/70"><span class="invisible"> </span><span> </span></div></div>'),Tn=xe('<div class="mb-2 flex flex-wrap items-center justify-end gap-2"><!> <!></div> <div class="rc-scroll flex-1 overflow-y-auto pr-1"></div> <form class="absolute bottom-2 left-2 right-2 z-10 flex gap-2 rounded"><div class="relative flex-1"><!> <!> <!></div> <!> <!></form>',1),Ln=xe("<!> <!>",1);function Sn(G,F){Ge(F,!0);let O=We(new Set),C=ge(""),L=ge(""),h=ge(""),b,u=ge(!1),g=ge(null),l=ge(""),k=ge(We([])),D=ge(null),P=ge(!1),A=ge(!1),y=ge(null);const T=ke(()=>mn(w(C),w(k))),e=ke(()=>w(y)==null?null:w(T)[w(y)]??null),t=ke(()=>w(e)?w(e).text.slice(w(e).prefixEndIndex):"");Me(()=>{if(typeof window>"u")return;if(!w(g)){J(l,"");return}const K=window.getComputedStyle(w(g)),ie=`calc(${K.paddingTop} + ${K.borderTopWidth})`,q=`calc(${K.paddingRight} + ${K.borderRightWidth})`,X=`calc(${K.paddingBottom} + ${K.borderBottomWidth})`,H=`calc(${K.paddingLeft} + ${K.borderLeftWidth})`;J(l,[`padding:${ie} ${q} ${X} ${H}`,`font:${K.font}`,`letter-spacing:${K.letterSpacing}`,`line-height:${K.lineHeight}`,`text-indent:${K.textIndent}`,`text-transform:${K.textTransform}`,`text-align:${K.textAlign}`,`box-sizing:${K.boxSizing}`].join(";"),!0)}),Me(()=>{w(y)!=null&&w(y)>=w(T).length&&J(y,null)});const r=ke(()=>!w(P)||w(A)?!1:w(T).length>0);function f(K){J(C,K.text,!0),J(y,null),J(A,!0)}function c(){J(P,!0),J(A,!1)}function d(){J(P,!1),J(y,null),J(A,!1)}function n(){J(y,null),J(A,!1)}function i(K){if(K.key==="Escape"){w(r)&&K.preventDefault(),J(A,!0),J(y,null);return}if(K.key==="ArrowUp"||K.key==="ArrowDown"){if(!w(T).length)return;w(A)&&J(A,!1),K.preventDefault();const ie=w(T).length-1;if(w(y)===null)J(y,K.key==="ArrowUp"?ie:0,!0);else{const q=K.key==="ArrowUp"?-1:1;J(y,Math.max(0,Math.min(ie,w(y)+q)),!0)}return}if(K.key==="Enter"||K.key==="Tab"&&!K.shiftKey){if(w(y)===null)return;const ie=w(T)[w(y)];if(!ie)return;K.preventDefault(),f(ie);return}}Me(()=>{Je.length>0&&a(b)});function a(K){O.has(K)||!K||K.scrollTo({top:K.scrollHeight,behavior:"smooth"})}function o(K){K.scrollTop+K.clientHeight+200>K.scrollHeight?O.delete(K):O.add(K)}function s(K){K.preventDefault(),(w(C)||w(h))&&(J(k,pn(w(k),w(C)),!0),F.onmessage({sender:"user",text:w(C),imageUrl:w(h)}),J(h,""),J(C,""),J(A,!1),J(y,null))}function m(K){K.preventDefault(),J(h,w(L),!0),J(L,""),J(u,!1)}function p(K){return K&&typeof K.renderedPrompt=="string"?K.renderedPrompt:null}function S(K,ie){for(let q=ie-1;q>=0;q--){const X=K[q];if(qe(X)&&X.name==="main"&&p(X))return X}for(let q=ie-1;q>=0;q--){const X=K[q];if(qe(X)&&X.name==="prewarm"&&p(X))return X}return null}function R(K){return K.eventName==="received-message"||K.eventName==="llm-handler-stream-requested"||K.eventName==="finished-main-streaming-step"||K.eventName==="sent-message"||K.eventName==="transfer-requested"}const I=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function B(K){if(typeof K!="number"||!Number.isFinite(K))return null;const ie=new Date(K);if(Number.isNaN(ie.getTime()))return null;const q=ie.getFullYear(),X=String(ie.getMonth()+1).padStart(2,"0"),H=String(ie.getDate()).padStart(2,"0");return`${q}-${X}-${H}`}function U(K){if(typeof K!="number"||!Number.isFinite(K))return null;const ie=new Date(K);if(Number.isNaN(ie.getTime()))return null;const q=ie.getDate(),X=I[ie.getMonth()],H=ie.getFullYear();return`${q} ${X} ${H}`}const _=ke(()=>Je.filter(K=>xt(K)||qe(K)?!0:bt(K)?R(K):!1));let v=ge(!1),N=null;function $(K){return K?Je:Je.map(ie=>{if(!qe(ie))return ie;const{receivedPrompt:q,renderedPrompt:X,...H}=ie;return H})}async function V(){try{await navigator.clipboard.writeText(JSON.stringify(ut,null,2)),J(v,!0),N&&clearTimeout(N),N=window.setTimeout(()=>{J(v,!1),N=null},2e3)}catch(K){console.error("Failed to copy logs",K)}}Me(()=>{if(typeof window>"u")return;const K=(F.agentId??"").trim();if(!K||K===w(D))return;J(D,K,!0),J(k,[],!0);const ie=K;ct.agents.userMessageHistory.query({agentId:ie}).then(q=>{if(w(D)!==ie)return;const X=hn(q);J(k,dn(X,w(k)),!0),J(y,null)}).catch(q=>{console.error("Failed to load user message history",q),w(D)===ie&&(J(k,[],!0),J(y,null))})});var te=Ln(),ae=Pe(te);fn(ae,{get isOpen(){return w(u)},onClose:()=>J(u,!1),showCloseButton:!0,children:(K,ie)=>{lt(K,{class:"p-4",children:(q,X)=>{var H=yn(),ee=ve(de(H),2);wt(ee,{class:"mb-2 w-80",get value(){return w(L)},set value(le){J(L,le,!0)}});var Z=ve(ee,2);De(Z,{variant:"secondary",type:"submit",class:"ml-2 p-2",children:(le,Ee)=>{Ke();var ye=$e("Attach");he(le,ye)},$$slots:{default:!0}}),ce(H),mt("submit",H,m),he(q,H)}})},$$slots:{default:!0}});var oe=ve(ae,2);lt(oe,{get class(){return`relative flex flex-col p-2 pb-16 ${F.class??""}`},children:(K,ie)=>{var q=Tn(),X=Pe(q),H=de(X);{let j=ke(()=>!Je.length);$t(H,{get disabled(){return w(j)},getWithPromptsText:()=>JSON.stringify($(!0),null,2),getWithoutPromptsText:()=>JSON.stringify($(!1),null,2)})}var ee=ve(H,2);{let j=ke(()=>!ut.length);De(ee,{variant:"secondary",size:"small",get disabled(){return w(j)},onclick:Q=>{Q.stopPropagation(),V()},children:(Q,Y)=>{Ke();var se=$e();Ne(()=>Ie(se,w(v)?"Copied all logs":"Copy all logs")),he(Q,se)},$$slots:{default:!0}})}ce(X);var Z=ve(X,2);Ze(Z,21,()=>w(_),at,(j,Q,Y)=>{const se=ke(()=>B(w(Q).createdAt)),_e=ke(()=>Y>0?B(w(_)[Y-1].createdAt):null),ue=ke(()=>U(w(Q).createdAt));var be=xn(),Se=Pe(be);{var je=Te=>{var ne=_n(),re=de(ne),me=de(re,!0);ce(re),ce(ne),Ne(()=>Ie(me,w(ue))),he(Te,ne)};Ce(Se,Te=>{w(se)&&w(ue)&&w(se)!==w(_e)&&Te(je)})}var He=ve(Se,2),et=de(He),Ye=de(et);{var ht=Te=>{Vt(Te,{get trace(){return w(Q)}})},Ue=Te=>{var ne=st(),re=Pe(ne);{var me=fe=>{Wt(fe,{get trace(){return w(Q)},get context(){return F.context},get agentId(){return F.agentId}})},pe=fe=>{var we=st(),Le=Pe(we);{var Re=Fe=>{{let pt=ke(()=>w(Q).name==="main"?S(w(_),Y):null);Ht(Fe,{get trace(){return w(Q)},get compareTrace(){return w(pt)}})}};Ce(Le,Fe=>{qe(w(Q))&&Fe(Re)},!0)}he(fe,we)};Ce(re,fe=>{bt(w(Q))?fe(me):fe(pe,!1)},!0)}he(Te,ne)};Ce(Ye,Te=>{xt(w(Q))?Te(ht):Te(Ue,!1)})}ce(et),ce(He),he(j,be)}),ce(Z),ft(Z,j=>b=j,()=>b);var le=ve(Z,2),Ee=de(le),ye=de(Ee);{var Ae=j=>{var Q=kn();Ze(Q,23,()=>w(T),Y=>Y.text,(Y,se,_e)=>{var ue=En();ue.__mousedown=[bn,f,se],Ze(ue,21,()=>w(se).segments,at,(be,Se)=>{var je=wn(),He=de(je,!0);ce(je),Ne(()=>{Be(je,1,Mt(w(Se).matched?"text-rc-green-200":"")),Ie(He,w(Se).text)}),he(be,je)}),ce(ue),Ne(()=>{Kt(ue,"aria-selected",w(y)===w(_e)),Be(ue,1,`w-full select-none border-b border-rc-gray-110 px-3 py-2 text-left font-semibold text-rc-gray-100 last:border-b-0 hover:bg-rc-gray-700/70 ${w(y)===w(_e)?"bg-rc-gray-700/70":""}`)}),he(Y,ue)}),ce(Q),he(j,Q)};Ce(ye,j=>{w(r)&&j(Ae)})}var x=ve(ye,2);wt(x,{variant:"chat",placeholder:"Enter user's message...",autocomplete:"off",onfocus:c,onblur:d,oninput:n,onkeydown:i,get value(){return w(C)},set value(j){J(C,j,!0)},get el(){return w(g)},set el(j){J(g,j,!0)}});var M=ve(x,2);{var z=j=>{var Q=On(),Y=de(Q),se=de(Y),_e=de(se,!0);ce(se);var ue=ve(se),be=de(ue,!0);ce(ue),ce(Y),ce(Q),Ne(()=>{Dt(Y,w(l)),Ie(_e,w(C)),Ie(be,w(t))}),he(j,Q)};Ce(M,j=>{w(y)!==null&&w(t)&&j(z)})}ce(Ee);var E=ve(Ee,2);De(E,{size:"small",variant:"secondary",onclick:()=>J(u,!0),children:(j,Q)=>{_t(j,{name:"paperclip"})},$$slots:{default:!0}});var W=ve(E,2);De(W,{size:"small",type:"submit",children:(j,Q)=>{_t(j,{name:"send"})},$$slots:{default:!0}}),ce(le),mt("scroll",Z,j=>o(j.target)),mt("submit",le,s),he(K,q)}}),he(G,te),ze()}Qe(["mousedown"]);function An(G,F){G.languages.registerCompletionItemProvider("markdown",{triggerCharacters:[" ","."],provideCompletionItems:(O,C)=>{const L=O.getValueInRange({startLineNumber:C.lineNumber,startColumn:1,endLineNumber:C.lineNumber,endColumn:C.column}),h=L.match(/\{%\s*(if|elif|for)\s+([^%]*)$/),b=L.match(/\{\{\s*([^}]*)$/);if(h||b){let g="";h?g=h[2].trim():b&&(g=b[1].trim());const{keys:l,lastPartLength:k}=Cn(F,g);return{suggestions:l.map(P=>({label:P,kind:G.languages.CompletionItemKind.Variable,insertText:P,range:{startLineNumber:C.lineNumber,endLineNumber:C.lineNumber,startColumn:C.column-k,endColumn:C.column}}))}}const u=L.match(/\{%\s*([^%]*)$/);if(u){const g=u[1].trim();return{suggestions:["if","elif","else","endif","for","endfor"].filter(k=>k.startsWith(g)).map((k,D)=>({label:k,kind:G.languages.CompletionItemKind.Keyword,insertText:k,sortText:String(D).padStart(2,"0"),range:{startLineNumber:C.lineNumber,endLineNumber:C.lineNumber,startColumn:C.column-g.length,endColumn:C.column}}))}}return{suggestions:[]}}})}function Cn(G,F){let O=G,C=[],L=0;if(F==="")C=Object.keys(G??{}),L=0;else if(F.includes(".")){const h=F.split("."),b=h.pop()||"";L=b.length;for(const u of h)if(O&&typeof O=="object"&&u in O)O=O[u];else{O=null;break}O&&typeof O=="object"&&(C=Object.keys(O).filter(u=>u.startsWith(b)))}else L=F.length,C=Object.keys(G??{}).filter(h=>h.startsWith(F));return{keys:C,lastPartLength:L}}function Nn(G,F){const O=F.createDecorationsCollection();function C(){const h=F.getModel();if(!h)return;const b=[],u=h.getLineCount();for(let g=1;g<=u;g++){const l=h.getLineContent(g),k=/^(#+)\s/.exec(l);if(k){const P=k[1].length;let A="prompt-heading-3";P===1?A="prompt-heading-1":P===2&&(A="prompt-heading-2"),b.push({range:new G.Range(g,1,g,l.length+1),options:{isWholeLine:!0,inlineClassName:A}})}for(let P=1;P<=l.length;P++){const A=l[P-1];(A==="#"||A==="*")&&b.push({range:new G.Range(g,P,g,P+1),options:{inlineClassName:"prompt-symbol"}})}const D=l.match(/^(\s+)(\d+(?:\.\d+)+\.?)(?=[\s)]|$)/);if(D){const P=D[1],A=D[2],y=P.length+1,T=y+A.length;b.push({range:new G.Range(g,y,g,T),options:{inlineClassName:"prompt-subnumber"}})}}O.set(b)}function L(){O.clear()}return{update:C,dispose:L}}const Pn={base:"vs-dark",inherit:!0,rules:[{token:"",foreground:"DDDDDD"},{token:"string.md",foreground:"DDDDDD"},{token:"keyword.md",foreground:"767676"},{token:"strong.md",foreground:"DDDDDD",fontStyle:"bold"},{token:"string.target.md",foreground:"00B58A"},{token:"tag.md",foreground:"00B58A"},{token:"string.link.md",foreground:"569cd6",fontStyle:"underline"}],colors:{"editor.background":"#1D1D1D","editor.foreground":"#AFAFAF","editorLineNumber.foreground":"#636363","editorLineNumber.activeForeground":"#767676","editorCursor.foreground":"#DDDDDD","editor.selectionBackground":"#4B556320","editor.lineHighlightBackground":"#FFFFFF08","editorLineNumber.background":"#1D1D1D"}};var Tt={exports:{}};/*! Browser bundle of nunjucks 3.2.4 */(function(G,F){(function(C,L){G.exports=L()})(typeof self<"u"?self:ln,function(){return function(O){var C={};function L(h){if(C[h])return C[h].exports;var b=C[h]={i:h,l:!1,exports:{}};return O[h].call(b.exports,b,b.exports,L),b.l=!0,b.exports}return L.m=O,L.c=C,L.d=function(h,b,u){L.o(h,b)||Object.defineProperty(h,b,{configurable:!1,enumerable:!0,get:u})},L.n=function(h){var b=h&&h.__esModule?function(){return h.default}:function(){return h};return L.d(b,"a",b),b},L.o=function(h,b){return Object.prototype.hasOwnProperty.call(h,b)},L.p="",L(L.s=11)}([function(O,l,L){var h=Array.prototype,b=Object.prototype,u={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","\\":"&#92;"},g=/[&"'<>\\]/g,l=O.exports={};function k(v,N){return b.hasOwnProperty.call(v,N)}l.hasOwnProp=k;function D(v){return u[v]}function P(v,N,$){if($.Update||($=new l.TemplateError($)),$.Update(v),!N){var V=$;$=new Error(V.message),$.name=V.name}return $}l._prettifyError=P;function A(v,N,$){var V,te;v instanceof Error&&(te=v,v=te.name+": "+te.message),Object.setPrototypeOf?(V=new Error(v),Object.setPrototypeOf(V,A.prototype)):(V=this,Object.defineProperty(V,"message",{enumerable:!1,writable:!0,value:v})),Object.defineProperty(V,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(V,this.constructor);var ae;if(te){var oe=Object.getOwnPropertyDescriptor(te,"stack");ae=oe&&(oe.get||function(){return oe.value}),ae||(ae=function(){return te.stack})}else{var K=new Error(v).stack;ae=function(){return K}}return Object.defineProperty(V,"stack",{get:function(){return ae.call(V)}}),Object.defineProperty(V,"cause",{value:te}),V.lineno=N,V.colno=$,V.firstUpdate=!0,V.Update=function(q){var X="("+(q||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?X+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(X+=" [Line "+this.lineno+"]")),X+=`
4
- `,this.firstUpdate&&(X+=" "),this.message=X+(this.message||""),this.firstUpdate=!1,this},V}Object.setPrototypeOf?Object.setPrototypeOf(A.prototype,Error.prototype):A.prototype=Object.create(Error.prototype,{constructor:{value:A}}),l.TemplateError=A;function y(v){return v.replace(g,D)}l.escape=y;function T(v){return b.toString.call(v)==="[object Function]"}l.isFunction=T;function e(v){return b.toString.call(v)==="[object Array]"}l.isArray=e;function t(v){return b.toString.call(v)==="[object String]"}l.isString=t;function r(v){return b.toString.call(v)==="[object Object]"}l.isObject=r;function f(v){return v?typeof v=="string"?v.split("."):[v]:[]}function c(v){var N=f(v);return function(V){for(var te=V,ae=0;ae<N.length;ae++){var oe=N[ae];if(k(te,oe))te=te[oe];else return}return te}}l.getAttrGetter=c;function d(v,N,$){for(var V={},te=T(N)?N:c(N),ae=0;ae<v.length;ae++){var oe=v[ae],K=te(oe,ae);if(K===void 0&&$===!0)throw new TypeError('groupby: attribute "'+N+'" resolved to undefined');(V[K]||(V[K]=[])).push(oe)}return V}l.groupBy=d;function n(v){return Array.prototype.slice.call(v)}l.toArray=n;function i(v){var N=[];if(!v)return N;for(var $=v.length,V=n(arguments).slice(1),te=-1;++te<$;)S(V,v[te])===-1&&N.push(v[te]);return N}l.without=i;function a(v,N){for(var $="",V=0;V<N;V++)$+=v;return $}l.repeat=a;function o(v,N,$){if(v!=null){if(h.forEach&&v.forEach===h.forEach)v.forEach(N,$);else if(v.length===+v.length)for(var V=0,te=v.length;V<te;V++)N.call($,v[V],V,v)}}l.each=o;function s(v,N){var $=[];if(v==null)return $;if(h.map&&v.map===h.map)return v.map(N);for(var V=0;V<v.length;V++)$[$.length]=N(v[V],V);return v.length===+v.length&&($.length=v.length),$}l.map=s;function m(v,N,$){var V=-1;function te(){V++,V<v.length?N(v[V],V,te,$):$()}te()}l.asyncIter=m;function p(v,N,$){var V=R(v||{}),te=V.length,ae=-1;function oe(){ae++;var K=V[ae];ae<te?N(K,v[K],ae,te,oe):$()}oe()}l.asyncFor=p;function S(v,N,$){return Array.prototype.indexOf.call(v||[],N,$)}l.indexOf=S;function R(v){var N=[];for(var $ in v)k(v,$)&&N.push($);return N}l.keys=R;function I(v){return R(v).map(function(N){return[N,v[N]]})}l._entries=I;function B(v){return R(v).map(function(N){return v[N]})}l._values=B;function U(v,N){return v=v||{},R(N).forEach(function($){v[$]=N[$]}),v}l._assign=l.extend=U;function _(v,N){if(e(N)||t(N))return N.indexOf(v)!==-1;if(r(N))return v in N;throw new Error('Cannot use "in" operator to search for "'+v+'" in unexpected types.')}l.inOperator=_},function(O,C,L){function h(t,r){for(var f=0;f<r.length;f++){var c=r[f];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(t,u(c.key),c)}}function b(t,r,f){return r&&h(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var r=g(t,"string");return typeof r=="symbol"?r:String(r)}function g(t,r){if(typeof t!="object"||t===null)return t;var f=t[Symbol.toPrimitive];if(f!==void 0){var c=f.call(t,r);if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function l(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,k(t,r)}function k(t,r){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,d){return c.__proto__=d,c},k(t,r)}var D=L(16),P=L(0);function A(t,r){return typeof t!="function"||typeof r!="function"?r:function(){var c=this.parent;this.parent=t;var d=r.apply(this,arguments);return this.parent=c,d}}function y(t,r,f){f=f||{},P.keys(f).forEach(function(d){f[d]=A(t.prototype[d],f[d])});var c=function(d){l(n,d);function n(){return d.apply(this,arguments)||this}return b(n,[{key:"typename",get:function(){return r}}]),n}(t);return P._assign(c.prototype,f),c}var T=function(){function t(){this.init.apply(this,arguments)}var r=t.prototype;return r.init=function(){},t.extend=function(c,d){return typeof c=="object"&&(d=c,c="anonymous"),y(this,c,d)},b(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),e=function(t){l(r,t);function r(){var c,d;return d=t.call(this)||this,(c=d).init.apply(c,arguments),d}var f=r.prototype;return f.init=function(){},r.extend=function(d,n){return typeof d=="object"&&(n=d,d="anonymous"),y(this,d,n)},b(r,[{key:"typename",get:function(){return this.constructor.name}}]),r}(D);O.exports={Obj:T,EmitterObj:e}},function(O,C,L){var h=L(0),b=Array.from,u=typeof Symbol=="function"&&Symbol.iterator&&typeof b=="function",g=function(){function s(p,S){this.variables=Object.create(null),this.parent=p,this.topLevel=!1,this.isolateWrites=S}var m=s.prototype;return m.set=function(S,R,I){var B=S.split("."),U=this.variables,_=this;if(I&&(_=this.resolve(B[0],!0))){_.set(S,R);return}for(var v=0;v<B.length-1;v++){var N=B[v];U[N]||(U[N]={}),U=U[N]}U[B[B.length-1]]=R},m.get=function(S){var R=this.variables[S];return R!==void 0?R:null},m.lookup=function(S){var R=this.parent,I=this.variables[S];return I!==void 0?I:R&&R.lookup(S)},m.resolve=function(S,R){var I=R&&this.isolateWrites?void 0:this.parent,B=this.variables[S];return B!==void 0?this:I&&I.resolve(S)},m.push=function(S){return new s(this,S)},m.pop=function(){return this.parent},s}();function l(s,m,p){return function(){for(var R=arguments.length,I=new Array(R),B=0;B<R;B++)I[B]=arguments[B];var U=A(I),_,v=P(I);if(U>s.length)_=I.slice(0,s.length),I.slice(_.length,U).forEach(function(V,te){te<m.length&&(v[m[te]]=V)}),_.push(v);else if(U<s.length){_=I.slice(0,U);for(var N=U;N<s.length;N++){var $=s[N];_.push(v[$]),delete v[$]}_.push(v)}else _=I;return p.apply(this,_)}}function k(s){return s.__keywords=!0,s}function D(s){return s&&Object.prototype.hasOwnProperty.call(s,"__keywords")}function P(s){var m=s.length;if(m){var p=s[m-1];if(D(p))return p}return{}}function A(s){var m=s.length;if(m===0)return 0;var p=s[m-1];return D(p)?m-1:m}function y(s){if(typeof s!="string")return s;this.val=s,this.length=s.length}y.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),y.prototype.valueOf=function(){return this.val},y.prototype.toString=function(){return this.val};function T(s,m){return s instanceof y?new y(m):m.toString()}function e(s){var m=typeof s;return m==="string"?new y(s):m!=="function"?s:function(S){var R=s.apply(this,arguments);return typeof R=="string"?new y(R):R}}function t(s,m){return s=s??"",m&&!(s instanceof y)&&(s=h.escape(s.toString())),s}function r(s,m,p){if(s==null)throw new h.TemplateError("attempted to output null or undefined value",m+1,p+1);return s}function f(s,m){if(s!=null)return typeof s[m]=="function"?function(){for(var p=arguments.length,S=new Array(p),R=0;R<p;R++)S[R]=arguments[R];return s[m].apply(s,S)}:s[m]}function c(s,m,p,S){if(s){if(typeof s!="function")throw new Error("Unable to call `"+m+"`, which is not a function")}else throw new Error("Unable to call `"+m+"`, which is undefined or falsey");return s.apply(p,S)}function d(s,m,p){var S=m.lookup(p);return S!==void 0?S:s.lookup(p)}function n(s,m,p){return s.lineno?s:new h.TemplateError(s,m,p)}function i(s,m,p,S){if(h.isArray(s)){var R=s.length;h.asyncIter(s,function(B,U,_){switch(m){case 1:p(B,U,R,_);break;case 2:p(B[0],B[1],U,R,_);break;case 3:p(B[0],B[1],B[2],U,R,_);break;default:B.push(U,R,_),p.apply(this,B)}},S)}else h.asyncFor(s,function(B,U,_,v,N){p(B,U,_,v,N)},S)}function a(s,m,p,S){var R=0,I,B;function U(te,ae){R++,B[te]=ae,R===I&&S(null,B.join(""))}if(h.isArray(s))if(I=s.length,B=new Array(I),I===0)S(null,"");else for(var _=0;_<s.length;_++){var v=s[_];switch(m){case 1:p(v,_,I,U);break;case 2:p(v[0],v[1],_,I,U);break;case 3:p(v[0],v[1],v[2],_,I,U);break;default:v.push(_,I,U),p.apply(this,v)}}else{var N=h.keys(s||{});if(I=N.length,B=new Array(I),I===0)S(null,"");else for(var $=0;$<N.length;$++){var V=N[$];p(V,s[V],$,I,U)}}}function o(s){return typeof s!="object"||s===null||h.isArray(s)?s:u&&Symbol.iterator in s?b(s):s}O.exports={Frame:g,makeMacro:l,makeKeywordArgs:k,numArgs:A,suppressValue:t,ensureDefined:r,memberLookup:f,contextOrFrameLookup:d,callWrap:c,handleError:n,isArray:h.isArray,keys:h.keys,SafeString:y,copySafeness:T,markSafe:e,asyncEach:i,asyncAll:a,inOperator:h.inOperator,fromIterator:o}},function(O,C,L){function h(ne,re){for(var me=0;me<re.length;me++){var pe=re[me];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ne,u(pe.key),pe)}}function b(ne,re,me){return re&&h(ne.prototype,re),Object.defineProperty(ne,"prototype",{writable:!1}),ne}function u(ne){var re=g(ne,"string");return typeof re=="symbol"?re:String(re)}function g(ne,re){if(typeof ne!="object"||ne===null)return ne;var me=ne[Symbol.toPrimitive];if(me!==void 0){var pe=me.call(ne,re);if(typeof pe!="object")return pe;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ne)}function l(ne,re){ne.prototype=Object.create(re.prototype),ne.prototype.constructor=ne,k(ne,re)}function k(ne,re){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(pe,fe){return pe.__proto__=fe,pe},k(ne,re)}var D=L(1),P=D.Obj;function A(ne,re,me){ne instanceof re&&me.push(ne),ne instanceof y&&ne.findAll(re,me)}var y=function(ne){l(re,ne);function re(){return ne.apply(this,arguments)||this}var me=re.prototype;return me.init=function(fe,we){for(var Le=arguments,Re=this,Fe=arguments.length,pt=new Array(Fe>2?Fe-2:0),tt=2;tt<Fe;tt++)pt[tt-2]=arguments[tt];this.lineno=fe,this.colno=we,this.fields.forEach(function(Lt,St){var dt=Le[St+2];dt===void 0&&(dt=null),Re[Lt]=dt})},me.findAll=function(fe,we){var Le=this;return we=we||[],this instanceof e?this.children.forEach(function(Re){return A(Re,fe,we)}):this.fields.forEach(function(Re){return A(Le[Re],fe,we)}),we},me.iterFields=function(fe){var we=this;this.fields.forEach(function(Le){fe(we[Le],Le)})},re}(P),T=function(ne){l(re,ne);function re(){return ne.apply(this,arguments)||this}return b(re,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),re}(y),e=function(ne){l(re,ne);function re(){return ne.apply(this,arguments)||this}var me=re.prototype;return me.init=function(fe,we,Le){ne.prototype.init.call(this,fe,we,Le||[])},me.addChild=function(fe){this.children.push(fe)},b(re,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),re}(y),t=e.extend("Root"),r=T.extend("Literal"),f=T.extend("Symbol"),c=e.extend("Group"),d=e.extend("Array"),n=y.extend("Pair",{fields:["key","value"]}),i=e.extend("Dict"),a=y.extend("LookupVal",{fields:["target","val"]}),o=y.extend("If",{fields:["cond","body","else_"]}),s=o.extend("IfAsync"),m=y.extend("InlineIf",{fields:["cond","body","else_"]}),p=y.extend("For",{fields:["arr","name","body","else_"]}),S=p.extend("AsyncEach"),R=p.extend("AsyncAll"),I=y.extend("Macro",{fields:["name","args","body"]}),B=I.extend("Caller"),U=y.extend("Import",{fields:["template","target","withContext"]}),_=function(ne){l(re,ne);function re(){return ne.apply(this,arguments)||this}var me=re.prototype;return me.init=function(fe,we,Le,Re,Fe){ne.prototype.init.call(this,fe,we,Le,Re||new e,Fe)},b(re,[{key:"typename",get:function(){return"FromImport"}},{key:"fields",get:function(){return["template","names","withContext"]}}]),re}(y),v=y.extend("FunCall",{fields:["name","args"]}),N=v.extend("Filter"),$=N.extend("FilterAsync",{fields:["name","args","symbol"]}),V=i.extend("KeywordArgs"),te=y.extend("Block",{fields:["name","body"]}),ae=y.extend("Super",{fields:["blockName","symbol"]}),oe=y.extend("TemplateRef",{fields:["template"]}),K=oe.extend("Extends"),ie=y.extend("Include",{fields:["template","ignoreMissing"]}),q=y.extend("Set",{fields:["targets","value"]}),X=y.extend("Switch",{fields:["expr","cases","default"]}),H=y.extend("Case",{fields:["cond","body"]}),ee=e.extend("Output"),Z=y.extend("Capture",{fields:["body"]}),le=r.extend("TemplateData"),Ee=y.extend("UnaryOp",{fields:["target"]}),ye=y.extend("BinOp",{fields:["left","right"]}),Ae=ye.extend("In"),x=ye.extend("Is"),M=ye.extend("Or"),z=ye.extend("And"),E=Ee.extend("Not"),W=ye.extend("Add"),j=ye.extend("Concat"),Q=ye.extend("Sub"),Y=ye.extend("Mul"),se=ye.extend("Div"),_e=ye.extend("FloorDiv"),ue=ye.extend("Mod"),be=ye.extend("Pow"),Se=Ee.extend("Neg"),je=Ee.extend("Pos"),He=y.extend("Compare",{fields:["expr","ops"]}),et=y.extend("CompareOperand",{fields:["expr","type"]}),Ye=y.extend("CallExtension",{init:function(re,me,pe,fe){this.parent(),this.extName=re.__name||re,this.prop=me,this.args=pe||new e,this.contentArgs=fe||[],this.autoescape=re.autoescape},fields:["extName","prop","args","contentArgs"]}),ht=Ye.extend("CallExtensionAsync");function Ue(ne,re,me){var pe=ne.split(`
5
- `);pe.forEach(function(fe,we){fe&&(me&&we>0||!me)&&process.stdout.write(" ".repeat(re));var Le=we===pe.length-1?"":`
6
- `;process.stdout.write(""+fe+Le)})}function Te(ne,re){if(re=re||0,Ue(ne.typename+": ",re),ne instanceof e)Ue(`
7
- `),ne.children.forEach(function(fe){Te(fe,re+2)});else if(ne instanceof Ye)Ue(ne.extName+"."+ne.prop+`
8
- `),ne.args&&Te(ne.args,re+2),ne.contentArgs&&ne.contentArgs.forEach(function(fe){Te(fe,re+2)});else{var me=[],pe=null;ne.iterFields(function(fe,we){fe instanceof y?me.push([we,fe]):(pe=pe||{},pe[we]=fe)}),pe?Ue(JSON.stringify(pe,null,2)+`
9
- `,null,!0):Ue(`
10
- `),me.forEach(function(fe){var we=fe[0],Le=fe[1];Ue("["+we+"] =>",re+2),Te(Le,re+4)})}}O.exports={Node:y,Root:t,NodeList:e,Value:T,Literal:r,Symbol:f,Group:c,Array:d,Pair:n,Dict:i,Output:ee,Capture:Z,TemplateData:le,If:o,IfAsync:s,InlineIf:m,For:p,AsyncEach:S,AsyncAll:R,Macro:I,Caller:B,Import:U,FromImport:_,FunCall:v,Filter:N,FilterAsync:$,KeywordArgs:V,Block:te,Super:ae,Extends:K,Include:ie,Set:q,Switch:X,Case:H,LookupVal:a,BinOp:ye,In:Ae,Is:x,Or:M,And:z,Not:E,Add:W,Concat:j,Sub:Q,Mul:Y,Div:se,FloorDiv:_e,Mod:ue,Pow:be,Neg:Se,Pos:je,Compare:He,CompareOperand:et,CallExtension:Ye,CallExtensionAsync:ht,printNodes:Te}},function(O,C){},function(O,C,L){function h(r,f){r.prototype=Object.create(f.prototype),r.prototype.constructor=r,b(r,f)}function b(r,f){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,n){return d.__proto__=n,d},b(r,f)}var u=L(8),g=L(17),l=L(3),k=L(0),D=k.TemplateError,P=L(2),A=P.Frame,y=L(1),T=y.Obj,e={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},t=function(r){h(f,r);function f(){return r.apply(this,arguments)||this}var c=f.prototype;return c.init=function(n,i){this.templateName=n,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=i},c.fail=function(n,i,a){throw i!==void 0&&(i+=1),a!==void 0&&(a+=1),new D(n,i,a)},c._pushBuffer=function(){var n=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=n,this._emit("var "+this.buffer+' = "";'),n},c._popBuffer=function(){this.buffer=this.bufferStack.pop()},c._emit=function(n){this.codebuf.push(n)},c._emitLine=function(n){this._emit(n+`
11
- `)},c._emitLines=function(){for(var n=this,i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];a.forEach(function(s){return n._emitLine(s)})},c._emitFuncBegin=function(n,i){this.buffer="output",this._scopeClosers="",this._emitLine("function "+i+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+n.lineno+";"),this._emitLine("var colno = "+n.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {")},c._emitFuncEnd=function(n){n||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null},c._addScopeLevel=function(){this._scopeClosers+="})"},c._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers=""},c._withScopedSyntax=function(n){var i=this._scopeClosers;this._scopeClosers="",n.call(this),this._closeScopeLevels(),this._scopeClosers=i},c._makeCallback=function(n){var i=this._tmpid();return"function("+i+(n?","+n:"")+`) {
12
- if(`+i+") { cb("+i+"); return; }"},c._tmpid=function(){return this.lastId++,"t_"+this.lastId},c._templateName=function(){return this.templateName==null?"undefined":JSON.stringify(this.templateName)},c._compileChildren=function(n,i){var a=this;n.children.forEach(function(o){a.compile(o,i)})},c._compileAggregate=function(n,i,a,o){var s=this;a&&this._emit(a),n.children.forEach(function(m,p){p>0&&s._emit(","),s.compile(m,i)}),o&&this._emit(o)},c._compileExpression=function(n,i){this.assertType(n,l.Literal,l.Symbol,l.Group,l.Array,l.Dict,l.FunCall,l.Caller,l.Filter,l.LookupVal,l.Compare,l.InlineIf,l.In,l.Is,l.And,l.Or,l.Not,l.Add,l.Concat,l.Sub,l.Mul,l.Div,l.FloorDiv,l.Mod,l.Pow,l.Neg,l.Pos,l.Compare,l.NodeList),this.compile(n,i)},c.assertType=function(n){for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];a.some(function(s){return n instanceof s})||this.fail("assertType: invalid type: "+n.typename,n.lineno,n.colno)},c.compileCallExtension=function(n,i,a){var o=this,s=n.args,m=n.contentArgs,p=typeof n.autoescape=="boolean"?n.autoescape:!0;if(a||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+n.extName+'")["'+n.prop+'"]('),this._emit("context"),(s||m)&&this._emit(","),s&&(s instanceof l.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),s.children.forEach(function(R,I){o._compileExpression(R,i),(I!==s.children.length-1||m.length)&&o._emit(",")})),m.length&&m.forEach(function(R,I){if(I>0&&o._emit(","),R){o._emitLine("function(cb) {"),o._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var B=o._pushBuffer();o._withScopedSyntax(function(){o.compile(R,i),o._emitLine("cb(null, "+B+");")}),o._popBuffer(),o._emitLine("return "+B+";"),o._emitLine("}")}else o._emit("null")}),a){var S=this._tmpid();this._emitLine(", "+this._makeCallback(S)),this._emitLine(this.buffer+" += runtime.suppressValue("+S+", "+p+" && env.opts.autoescape);"),this._addScopeLevel()}else this._emit(")"),this._emit(", "+p+` && env.opts.autoescape);
13
- `)},c.compileCallExtensionAsync=function(n,i){this.compileCallExtension(n,i,!0)},c.compileNodeList=function(n,i){this._compileChildren(n,i)},c.compileLiteral=function(n){if(typeof n.value=="string"){var i=n.value.replace(/\\/g,"\\\\");i=i.replace(/"/g,'\\"'),i=i.replace(/\n/g,"\\n"),i=i.replace(/\r/g,"\\r"),i=i.replace(/\t/g,"\\t"),i=i.replace(/\u2028/g,"\\u2028"),this._emit('"'+i+'"')}else n.value===null?this._emit("null"):this._emit(n.value.toString())},c.compileSymbol=function(n,i){var a=n.value,o=i.lookup(a);o?this._emit(o):this._emit('runtime.contextOrFrameLookup(context, frame, "'+a+'")')},c.compileGroup=function(n,i){this._compileAggregate(n,i,"(",")")},c.compileArray=function(n,i){this._compileAggregate(n,i,"[","]")},c.compileDict=function(n,i){this._compileAggregate(n,i,"{","}")},c.compilePair=function(n,i){var a=n.key,o=n.value;a instanceof l.Symbol?a=new l.Literal(a.lineno,a.colno,a.value):a instanceof l.Literal&&typeof a.value=="string"||this.fail("compilePair: Dict keys must be strings or names",a.lineno,a.colno),this.compile(a,i),this._emit(": "),this._compileExpression(o,i)},c.compileInlineIf=function(n,i){this._emit("("),this.compile(n.cond,i),this._emit("?"),this.compile(n.body,i),this._emit(":"),n.else_!==null?this.compile(n.else_,i):this._emit('""'),this._emit(")")},c.compileIn=function(n,i){this._emit("runtime.inOperator("),this.compile(n.left,i),this._emit(","),this.compile(n.right,i),this._emit(")")},c.compileIs=function(n,i){var a=n.right.name?n.right.name.value:n.right.value;this._emit('env.getTest("'+a+'").call(context, '),this.compile(n.left,i),n.right.args&&(this._emit(","),this.compile(n.right.args,i)),this._emit(") === true")},c._binOpEmitter=function(n,i,a){this.compile(n.left,i),this._emit(a),this.compile(n.right,i)},c.compileOr=function(n,i){return this._binOpEmitter(n,i," || ")},c.compileAnd=function(n,i){return this._binOpEmitter(n,i," && ")},c.compileAdd=function(n,i){return this._binOpEmitter(n,i," + ")},c.compileConcat=function(n,i){return this._binOpEmitter(n,i,' + "" + ')},c.compileSub=function(n,i){return this._binOpEmitter(n,i," - ")},c.compileMul=function(n,i){return this._binOpEmitter(n,i," * ")},c.compileDiv=function(n,i){return this._binOpEmitter(n,i," / ")},c.compileMod=function(n,i){return this._binOpEmitter(n,i," % ")},c.compileNot=function(n,i){this._emit("!"),this.compile(n.target,i)},c.compileFloorDiv=function(n,i){this._emit("Math.floor("),this.compile(n.left,i),this._emit(" / "),this.compile(n.right,i),this._emit(")")},c.compilePow=function(n,i){this._emit("Math.pow("),this.compile(n.left,i),this._emit(", "),this.compile(n.right,i),this._emit(")")},c.compileNeg=function(n,i){this._emit("-"),this.compile(n.target,i)},c.compilePos=function(n,i){this._emit("+"),this.compile(n.target,i)},c.compileCompare=function(n,i){var a=this;this.compile(n.expr,i),n.ops.forEach(function(o){a._emit(" "+e[o.type]+" "),a.compile(o.expr,i)})},c.compileLookupVal=function(n,i){this._emit("runtime.memberLookup(("),this._compileExpression(n.target,i),this._emit("),"),this._compileExpression(n.val,i),this._emit(")")},c._getNodeName=function(n){switch(n.typename){case"Symbol":return n.value;case"FunCall":return"the return value of ("+this._getNodeName(n.name)+")";case"LookupVal":return this._getNodeName(n.target)+'["'+this._getNodeName(n.val)+'"]';case"Literal":return n.value.toString();default:return"--expression--"}},c.compileFunCall=function(n,i){this._emit("(lineno = "+n.lineno+", colno = "+n.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(n.name,i),this._emit(', "'+this._getNodeName(n.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(n.args,i,"[","])"),this._emit(")")},c.compileFilter=function(n,i){var a=n.name;this.assertType(a,l.Symbol),this._emit('env.getFilter("'+a.value+'").call(context, '),this._compileAggregate(n.args,i),this._emit(")")},c.compileFilterAsync=function(n,i){var a=n.name,o=n.symbol.value;this.assertType(a,l.Symbol),i.set(o,o),this._emit('env.getFilter("'+a.value+'").call(context, '),this._compileAggregate(n.args,i),this._emitLine(", "+this._makeCallback(o)),this._addScopeLevel()},c.compileKeywordArgs=function(n,i){this._emit("runtime.makeKeywordArgs("),this.compileDict(n,i),this._emit(")")},c.compileSet=function(n,i){var a=this,o=[];n.targets.forEach(function(s){var m=s.value,p=i.lookup(m);p==null&&(p=a._tmpid(),a._emitLine("var "+p+";")),o.push(p)}),n.value?(this._emit(o.join(" = ")+" = "),this._compileExpression(n.value,i),this._emitLine(";")):(this._emit(o.join(" = ")+" = "),this.compile(n.body,i),this._emitLine(";")),n.targets.forEach(function(s,m){var p=o[m],S=s.value;a._emitLine('frame.set("'+S+'", '+p+", true);"),a._emitLine("if(frame.topLevel) {"),a._emitLine('context.setVariable("'+S+'", '+p+");"),a._emitLine("}"),S.charAt(0)!=="_"&&(a._emitLine("if(frame.topLevel) {"),a._emitLine('context.addExport("'+S+'", '+p+");"),a._emitLine("}"))})},c.compileSwitch=function(n,i){var a=this;this._emit("switch ("),this.compile(n.expr,i),this._emit(") {"),n.cases.forEach(function(o,s){a._emit("case "),a.compile(o.cond,i),a._emit(": "),a.compile(o.body,i),o.body.children.length&&a._emitLine("break;")}),n.default&&(this._emit("default:"),this.compile(n.default,i)),this._emit("}")},c.compileIf=function(n,i,a){var o=this;this._emit("if("),this._compileExpression(n.cond,i),this._emitLine(") {"),this._withScopedSyntax(function(){o.compile(n.body,i),a&&o._emit("cb()")}),n.else_?(this._emitLine(`}
14
- else {`),this._withScopedSyntax(function(){o.compile(n.else_,i),a&&o._emit("cb()")})):a&&(this._emitLine(`}
15
- else {`),this._emit("cb()")),this._emitLine("}")},c.compileIfAsync=function(n,i){this._emit("(function(cb) {"),this.compileIf(n,i,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel()},c._emitLoopBindings=function(n,i,a,o){var s=this,m=[{name:"index",val:a+" + 1"},{name:"index0",val:a},{name:"revindex",val:o+" - "+a},{name:"revindex0",val:o+" - "+a+" - 1"},{name:"first",val:a+" === 0"},{name:"last",val:a+" === "+o+" - 1"},{name:"length",val:o}];m.forEach(function(p){s._emitLine('frame.set("loop.'+p.name+'", '+p.val+");")})},c.compileFor=function(n,i){var a=this,o=this._tmpid(),s=this._tmpid(),m=this._tmpid();if(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+m+" = "),this._compileExpression(n.arr,i),this._emitLine(";"),this._emit("if("+m+") {"),this._emitLine(m+" = runtime.fromIterator("+m+");"),n.name instanceof l.Array){this._emitLine("var "+o+";"),this._emitLine("if(runtime.isArray("+m+")) {"),this._emitLine("var "+s+" = "+m+".length;"),this._emitLine("for("+o+"=0; "+o+" < "+m+".length; "+o+"++) {"),n.name.children.forEach(function(_,v){var N=a._tmpid();a._emitLine("var "+N+" = "+m+"["+o+"]["+v+"];"),a._emitLine('frame.set("'+_+'", '+m+"["+o+"]["+v+"]);"),i.set(n.name.children[v].value,N)}),this._emitLoopBindings(n,m,o,s),this._withScopedSyntax(function(){a.compile(n.body,i)}),this._emitLine("}"),this._emitLine("} else {");var p=n.name.children,S=p[0],R=p[1],I=this._tmpid(),B=this._tmpid();i.set(S.value,I),i.set(R.value,B),this._emitLine(o+" = -1;"),this._emitLine("var "+s+" = runtime.keys("+m+").length;"),this._emitLine("for(var "+I+" in "+m+") {"),this._emitLine(o+"++;"),this._emitLine("var "+B+" = "+m+"["+I+"];"),this._emitLine('frame.set("'+S.value+'", '+I+");"),this._emitLine('frame.set("'+R.value+'", '+B+");"),this._emitLoopBindings(n,m,o,s),this._withScopedSyntax(function(){a.compile(n.body,i)}),this._emitLine("}"),this._emitLine("}")}else{var U=this._tmpid();i.set(n.name.value,U),this._emitLine("var "+s+" = "+m+".length;"),this._emitLine("for(var "+o+"=0; "+o+" < "+m+".length; "+o+"++) {"),this._emitLine("var "+U+" = "+m+"["+o+"];"),this._emitLine('frame.set("'+n.name.value+'", '+U+");"),this._emitLoopBindings(n,m,o,s),this._withScopedSyntax(function(){a.compile(n.body,i)}),this._emitLine("}")}this._emitLine("}"),n.else_&&(this._emitLine("if (!"+s+") {"),this.compile(n.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},c._compileAsyncLoop=function(n,i,a){var o=this,s=this._tmpid(),m=this._tmpid(),p=this._tmpid(),S=a?"asyncAll":"asyncEach";if(i=i.push(),this._emitLine("frame = frame.push();"),this._emit("var "+p+" = runtime.fromIterator("),this._compileExpression(n.arr,i),this._emitLine(");"),n.name instanceof l.Array){var R=n.name.children.length;this._emit("runtime."+S+"("+p+", "+R+", function("),n.name.children.forEach(function(U){o._emit(U.value+",")}),this._emit(s+","+m+",next) {"),n.name.children.forEach(function(U){var _=U.value;i.set(_,_),o._emitLine('frame.set("'+_+'", '+_+");")})}else{var I=n.name.value;this._emitLine("runtime."+S+"("+p+", 1, function("+I+", "+s+", "+m+",next) {"),this._emitLine('frame.set("'+I+'", '+I+");"),i.set(I,I)}this._emitLoopBindings(n,p,s,m),this._withScopedSyntax(function(){var U;a&&(U=o._pushBuffer()),o.compile(n.body,i),o._emitLine("next("+s+(U?","+U:"")+");"),a&&o._popBuffer()});var B=this._tmpid();this._emitLine("}, "+this._makeCallback(B)),this._addScopeLevel(),a&&this._emitLine(this.buffer+" += "+B+";"),n.else_&&(this._emitLine("if (!"+p+".length) {"),this.compile(n.else_,i),this._emitLine("}")),this._emitLine("frame = frame.pop();")},c.compileAsyncEach=function(n,i){this._compileAsyncLoop(n,i)},c.compileAsyncAll=function(n,i){this._compileAsyncLoop(n,i,!0)},c._compileMacro=function(n,i){var a=this,o=[],s=null,m="macro_"+this._tmpid(),p=i!==void 0;n.args.children.forEach(function(_,v){v===n.args.children.length-1&&_ instanceof l.Dict?s=_:(a.assertType(_,l.Symbol),o.push(_))});var S=[].concat(o.map(function(_){return"l_"+_.value}),["kwargs"]),R=o.map(function(_){return'"'+_.value+'"'}),I=(s&&s.children||[]).map(function(_){return'"'+_.key.value+'"'}),B;p?B=i.push(!0):B=new A,this._emitLines("var "+m+" = runtime.makeMacro(","["+R.join(", ")+"], ","["+I.join(", ")+"], ","function ("+S.join(", ")+") {","var callerFrame = frame;","frame = "+(p?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),o.forEach(function(_){a._emitLine('frame.set("'+_.value+'", l_'+_.value+");"),B.set(_.value,"l_"+_.value)}),s&&s.children.forEach(function(_){var v=_.key.value;a._emit('frame.set("'+v+'", '),a._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+v+'")'),a._emit(' ? kwargs["'+v+'"] : '),a._compileExpression(_.value,B),a._emit(");")});var U=this._pushBuffer();return this._withScopedSyntax(function(){a.compile(n.body,B)}),this._emitLine("frame = "+(p?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+U+");"),this._emitLine("});"),this._popBuffer(),m},c.compileMacro=function(n,i){var a=this._compileMacro(n),o=n.name.value;i.set(o,a),i.parent?this._emitLine('frame.set("'+o+'", '+a+");"):(n.name.value.charAt(0)!=="_"&&this._emitLine('context.addExport("'+o+'");'),this._emitLine('context.setVariable("'+o+'", '+a+");"))},c.compileCaller=function(n,i){this._emit("(function (){");var a=this._compileMacro(n,i);this._emit("return "+a+";})()")},c._compileGetTemplate=function(n,i,a,o){var s=this._tmpid(),m=this._templateName(),p=this._makeCallback(s),S=a?"true":"false",R=o?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(n.template,i),this._emitLine(", "+S+", "+m+", "+R+", "+p),s},c.compileImport=function(n,i){var a=n.target.value,o=this._compileGetTemplate(n,i,!1,!1);this._addScopeLevel(),this._emitLine(o+".getExported("+(n.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(o)),this._addScopeLevel(),i.set(a,o),i.parent?this._emitLine('frame.set("'+a+'", '+o+");"):this._emitLine('context.setVariable("'+a+'", '+o+");")},c.compileFromImport=function(n,i){var a=this,o=this._compileGetTemplate(n,i,!1,!1);this._addScopeLevel(),this._emitLine(o+".getExported("+(n.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(o)),this._addScopeLevel(),n.names.children.forEach(function(s){var m,p,S=a._tmpid();s instanceof l.Pair?(m=s.key.value,p=s.value.value):(m=s.value,p=m),a._emitLine("if(Object.prototype.hasOwnProperty.call("+o+', "'+m+'")) {'),a._emitLine("var "+S+" = "+o+"."+m+";"),a._emitLine("} else {"),a._emitLine(`cb(new Error("cannot import '`+m+`'")); return;`),a._emitLine("}"),i.set(p,S),i.parent?a._emitLine('frame.set("'+p+'", '+S+");"):a._emitLine('context.setVariable("'+p+'", '+S+");")})},c.compileBlock=function(n){var i=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+n.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(i)),this._emitLine(this.buffer+" += "+i+";"),this._addScopeLevel()},c.compileSuper=function(n,i){var a=n.blockName.value,o=n.symbol.value,s=this._makeCallback(o);this._emitLine('context.getSuper(env, "'+a+'", b_'+a+", frame, runtime, "+s),this._emitLine(o+" = runtime.markSafe("+o+");"),this._addScopeLevel(),i.set(o,o)},c.compileExtends=function(n,i){var a=this._tmpid(),o=this._compileGetTemplate(n,i,!0,!1);this._emitLine("parentTemplate = "+o),this._emitLine("for(var "+a+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+a+", parentTemplate.blocks["+a+"]);"),this._emitLine("}"),this._addScopeLevel()},c.compileInclude=function(n,i){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var a=this._compileGetTemplate(n,i,!1,n.ignoreMissing);this._emitLine("callback(null,"+a+");});"),this._emitLine("});");var o=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(o)),this._emitLine("callback(null,"+o+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel()},c.compileTemplateData=function(n,i){this.compileLiteral(n,i)},c.compileCapture=function(n,i){var a=this,o=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax(function(){a.compile(n.body,i)}),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=o},c.compileOutput=function(n,i){var a=this,o=n.children;o.forEach(function(s){s instanceof l.TemplateData?s.value&&(a._emit(a.buffer+" += "),a.compileLiteral(s,i),a._emitLine(";")):(a._emit(a.buffer+" += runtime.suppressValue("),a.throwOnUndefined&&a._emit("runtime.ensureDefined("),a.compile(s,i),a.throwOnUndefined&&a._emit(","+n.lineno+","+n.colno+")"),a._emit(`, env.opts.autoescape);
16
- `))})},c.compileRoot=function(n,i){var a=this;i&&this.fail("compileRoot: root node can't have frame"),i=new A,this._emitFuncBegin(n,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(n,i),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var o=[],s=n.findAll(l.Block);s.forEach(function(m,p){var S=m.name.value;if(o.indexOf(S)!==-1)throw new Error('Block "'+S+'" defined more than once.');o.push(S),a._emitFuncBegin(m,"b_"+S);var R=new A;a._emitLine("var frame = frame.push(true);"),a.compile(m.body,R),a._emitFuncEnd()}),this._emitLine("return {"),s.forEach(function(m,p){var S="b_"+m.name.value;a._emitLine(S+": "+S+",")}),this._emitLine(`root: root
17
- };`)},c.compile=function(n,i){var a=this["compile"+n.typename];a?a.call(this,n,i):this.fail("compile: Cannot compile node: "+n.typename,n.lineno,n.colno)},c.getCode=function(){return this.codebuf.join("")},f}(T);O.exports={compile:function(f,c,d,n,i){i===void 0&&(i={});var a=new t(n,i.throwOnUndefined),o=(d||[]).map(function(m){return m.preprocess}).filter(function(m){return!!m}),s=o.reduce(function(m,p){return p(m)},f);return a.compile(g.transform(u.parse(s,d,i),c,n)),a.getCode()},Compiler:t}},function(O,C,L){function h(k,D){k.prototype=Object.create(D.prototype),k.prototype.constructor=k,b(k,D)}function b(k,D){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,y){return A.__proto__=y,A},b(k,D)}var u=L(4),g=L(1),l=g.EmitterObj;O.exports=function(k){h(D,k);function D(){return k.apply(this,arguments)||this}var P=D.prototype;return P.resolve=function(y,T){return u.resolve(u.dirname(y),T)},P.isRelative=function(y){return y.indexOf("./")===0||y.indexOf("../")===0},D}(l)},function(O,C,L){function h(R,I){R.prototype=Object.create(I.prototype),R.prototype.constructor=R,b(R,I)}function b(R,I){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(U,_){return U.__proto__=_,U},b(R,I)}var u=L(12),g=L(15),l=L(0),k=L(5),D=L(18),P=L(10),A=P.FileSystemLoader,y=P.WebLoader,T=P.PrecompiledLoader,e=L(20),t=L(21),r=L(1),f=r.Obj,c=r.EmitterObj,d=L(2),n=d.handleError,i=d.Frame,a=L(22);function o(R,I,B){u(function(){R(I,B)})}var s={type:"code",obj:{root:function(I,B,U,_,v){try{v(null,"")}catch(N){v(n(N,null,null))}}}},m=function(R){h(I,R);function I(){return R.apply(this,arguments)||this}var B=I.prototype;return B.init=function(_,v){var N=this;v=this.opts=v||{},this.opts.dev=!!v.dev,this.opts.autoescape=v.autoescape!=null?v.autoescape:!0,this.opts.throwOnUndefined=!!v.throwOnUndefined,this.opts.trimBlocks=!!v.trimBlocks,this.opts.lstripBlocks=!!v.lstripBlocks,this.loaders=[],_?this.loaders=l.isArray(_)?_:[_]:A?this.loaders=[new A("views")]:y&&(this.loaders=[new y("/views")]),typeof window<"u"&&window.nunjucksPrecompiled&&this.loaders.unshift(new T(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=t(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],l._entries(D).forEach(function($){var V=$[0],te=$[1];return N.addFilter(V,te)}),l._entries(e).forEach(function($){var V=$[0],te=$[1];return N.addTest(V,te)})},B._initLoaders=function(){var _=this;this.loaders.forEach(function(v){v.cache={},typeof v.on=="function"&&(v.on("update",function(N,$){v.cache[N]=null,_.emit("update",N,$,v)}),v.on("load",function(N,$){_.emit("load",N,$,v)}))})},B.invalidateCache=function(){this.loaders.forEach(function(_){_.cache={}})},B.addExtension=function(_,v){return v.__name=_,this.extensions[_]=v,this.extensionsList.push(v),this},B.removeExtension=function(_){var v=this.getExtension(_);v&&(this.extensionsList=l.without(this.extensionsList,v),delete this.extensions[_])},B.getExtension=function(_){return this.extensions[_]},B.hasExtension=function(_){return!!this.extensions[_]},B.addGlobal=function(_,v){return this.globals[_]=v,this},B.getGlobal=function(_){if(typeof this.globals[_]>"u")throw new Error("global not found: "+_);return this.globals[_]},B.addFilter=function(_,v,N){var $=v;return N&&this.asyncFilters.push(_),this.filters[_]=$,this},B.getFilter=function(_){if(!this.filters[_])throw new Error("filter not found: "+_);return this.filters[_]},B.addTest=function(_,v){return this.tests[_]=v,this},B.getTest=function(_){if(!this.tests[_])throw new Error("test not found: "+_);return this.tests[_]},B.resolveTemplate=function(_,v,N){var $=_.isRelative&&v?_.isRelative(N):!1;return $&&_.resolve?_.resolve(v,N):N},B.getTemplate=function(_,v,N,$,V){var te=this,ae=this,oe=null;if(_&&_.raw&&(_=_.raw),l.isFunction(N)&&(V=N,N=null,v=v||!1),l.isFunction(v)&&(V=v,v=!1),_ instanceof S)oe=_;else{if(typeof _!="string")throw new Error("template names must be a string: "+_);for(var K=0;K<this.loaders.length;K++){var ie=this.loaders[K];if(oe=ie.cache[this.resolveTemplate(ie,N,_)],oe)break}}if(oe)if(v&&oe.compile(),V){V(null,oe);return}else return oe;var q,X=function(ee,Z){if(!Z&&!ee&&!$&&(ee=new Error("template not found: "+_)),ee)if(V){V(ee);return}else throw ee;var le;Z?(le=new S(Z.src,te,Z.path,v),Z.noCache||(Z.loader.cache[_]=le)):le=new S(s,te,"",v),V?V(null,le):q=le};return l.asyncIter(this.loaders,function(H,ee,Z,le){function Ee(ye,Ae){ye?le(ye):Ae?(Ae.loader=H,le(null,Ae)):Z()}_=ae.resolveTemplate(H,N,_),H.async?H.getSource(_,Ee):Ee(null,H.getSource(_))},X),q},B.express=function(_){return a(this,_)},B.render=function(_,v,N){l.isFunction(v)&&(N=v,v=null);var $=null;return this.getTemplate(_,function(V,te){if(V&&N)o(N,V);else{if(V)throw V;$=te.render(v,N)}}),$},B.renderString=function(_,v,N,$){l.isFunction(N)&&($=N,N={}),N=N||{};var V=new S(_,this,N.path);return V.render(v,$)},B.waterfall=function(_,v,N){return g(_,v,N)},I}(c),p=function(R){h(I,R);function I(){return R.apply(this,arguments)||this}var B=I.prototype;return B.init=function(_,v,N){var $=this;this.env=N||new m,this.ctx=l.extend({},_),this.blocks={},this.exported=[],l.keys(v).forEach(function(V){$.addBlock(V,v[V])})},B.lookup=function(_){return _ in this.env.globals&&!(_ in this.ctx)?this.env.globals[_]:this.ctx[_]},B.setVariable=function(_,v){this.ctx[_]=v},B.getVariables=function(){return this.ctx},B.addBlock=function(_,v){return this.blocks[_]=this.blocks[_]||[],this.blocks[_].push(v),this},B.getBlock=function(_){if(!this.blocks[_])throw new Error('unknown block "'+_+'"');return this.blocks[_][0]},B.getSuper=function(_,v,N,$,V,te){var ae=l.indexOf(this.blocks[v]||[],N),oe=this.blocks[v][ae+1],K=this;if(ae===-1||!oe)throw new Error('no super block available for "'+v+'"');oe(_,K,$,V,te)},B.addExport=function(_){this.exported.push(_)},B.getExported=function(){var _=this,v={};return this.exported.forEach(function(N){v[N]=_.ctx[N]}),v},I}(f),S=function(R){h(I,R);function I(){return R.apply(this,arguments)||this}var B=I.prototype;return B.init=function(_,v,N,$){if(this.env=v||new m,l.isObject(_))switch(_.type){case"code":this.tmplProps=_.obj;break;case"string":this.tmplStr=_.obj;break;default:throw new Error("Unexpected template object type "+_.type+"; expected 'code', or 'string'")}else if(l.isString(_))this.tmplStr=_;else throw new Error("src must be a string or an object describing the source");if(this.path=N,$)try{this._compile()}catch(V){throw l._prettifyError(this.path,this.env.opts.dev,V)}else this.compiled=!1},B.render=function(_,v,N){var $=this;typeof _=="function"?(N=_,_={}):typeof v=="function"&&(N=v,v=null);var V=!v;try{this.compile()}catch(q){var te=l._prettifyError(this.path,this.env.opts.dev,q);if(N)return o(N,te);throw te}var ae=new p(_||{},this.blocks,this.env),oe=v?v.push(!0):new i;oe.topLevel=!0;var K=null,ie=!1;return this.rootRenderFunc(this.env,ae,oe,d,function(q,X){if(!(ie&&N&&typeof X<"u"))if(q&&(q=l._prettifyError($.path,$.env.opts.dev,q),ie=!0),N)V?o(N,q,X):N(q,X);else{if(q)throw q;K=X}}),K},B.getExported=function(_,v,N){typeof _=="function"&&(N=_,_={}),typeof v=="function"&&(N=v,v=null);try{this.compile()}catch(te){if(N)return N(te);throw te}var $=v?v.push():new i;$.topLevel=!0;var V=new p(_||{},this.blocks,this.env);this.rootRenderFunc(this.env,V,$,d,function(te){te?N(te,null):N(null,V.getExported())})},B.compile=function(){this.compiled||this._compile()},B._compile=function(){var _;if(this.tmplProps)_=this.tmplProps;else{var v=k.compile(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts),N=new Function(v);_=N()}this.blocks=this._getBlocks(_),this.rootRenderFunc=_.root,this.compiled=!0},B._getBlocks=function(_){var v={};return l.keys(_).forEach(function(N){N.slice(0,2)==="b_"&&(v[N.slice(2)]=_[N])}),v},I}(f);O.exports={Environment:m,Template:S}},function(O,C,L){function h(P,A){P.prototype=Object.create(A.prototype),P.prototype.constructor=P,b(P,A)}function b(P,A){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(T,e){return T.__proto__=e,T},b(P,A)}var u=L(9),g=L(3),l=L(1).Obj,k=L(0),D=function(P){h(A,P);function A(){return P.apply(this,arguments)||this}var y=A.prototype;return y.init=function(e){this.tokens=e,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},y.nextToken=function(e){var t;if(this.peeked)if(!e&&this.peeked.type===u.TOKEN_WHITESPACE)this.peeked=null;else return t=this.peeked,this.peeked=null,t;if(t=this.tokens.nextToken(),!e)for(;t&&t.type===u.TOKEN_WHITESPACE;)t=this.tokens.nextToken();return t},y.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},y.pushToken=function(e){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=e},y.error=function(e,t,r){if(t===void 0||r===void 0){var f=this.peekToken()||{};t=f.lineno,r=f.colno}return t!==void 0&&(t+=1),r!==void 0&&(r+=1),new k.TemplateError(e,t,r)},y.fail=function(e,t,r){throw this.error(e,t,r)},y.skip=function(e){var t=this.nextToken();return!t||t.type!==e?(this.pushToken(t),!1):!0},y.expect=function(e){var t=this.nextToken();return t.type!==e&&this.fail("expected "+e+", got "+t.type,t.lineno,t.colno),t},y.skipValue=function(e,t){var r=this.nextToken();return!r||r.type!==e||r.value!==t?(this.pushToken(r),!1):!0},y.skipSymbol=function(e){return this.skipValue(u.TOKEN_SYMBOL,e)},y.advanceAfterBlockEnd=function(e){var t;return e||(t=this.peekToken(),t||this.fail("unexpected end of file"),t.type!==u.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),e=this.nextToken().value),t=this.nextToken(),t&&t.type===u.TOKEN_BLOCK_END?t.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+e+" statement"),t},y.advanceAfterVariableEnd=function(){var e=this.nextToken();e&&e.type===u.TOKEN_VARIABLE_END?this.dropLeadingWhitespace=e.value.charAt(e.value.length-this.tokens.tags.VARIABLE_END.length-1)==="-":(this.pushToken(e),this.fail("expected variable end"))},y.parseFor=function(){var e=this.peekToken(),t,r;this.skipSymbol("for")?(t=new g.For(e.lineno,e.colno),r="endfor"):this.skipSymbol("asyncEach")?(t=new g.AsyncEach(e.lineno,e.colno),r="endeach"):this.skipSymbol("asyncAll")?(t=new g.AsyncAll(e.lineno,e.colno),r="endall"):this.fail("parseFor: expected for{Async}",e.lineno,e.colno),t.name=this.parsePrimary(),t.name instanceof g.Symbol||this.fail("parseFor: variable name expected for loop");var f=this.peekToken().type;if(f===u.TOKEN_COMMA){var c=t.name;for(t.name=new g.Array(c.lineno,c.colno),t.name.addChild(c);this.skip(u.TOKEN_COMMA);){var d=this.parsePrimary();t.name.addChild(d)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',e.lineno,e.colno),t.arr=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks(r,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),t.else_=this.parseUntilBlocks(r)),this.advanceAfterBlockEnd(),t},y.parseMacro=function(){var e=this.peekToken();this.skipSymbol("macro")||this.fail("expected macro");var t=this.parsePrimary(!0),r=this.parseSignature(),f=new g.Macro(e.lineno,e.colno,t,r);return this.advanceAfterBlockEnd(e.value),f.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),f},y.parseCall=function(){var e=this.peekToken();this.skipSymbol("call")||this.fail("expected call");var t=this.parseSignature(!0)||new g.NodeList,r=this.parsePrimary();this.advanceAfterBlockEnd(e.value);var f=this.parseUntilBlocks("endcall");this.advanceAfterBlockEnd();var c=new g.Symbol(e.lineno,e.colno,"caller"),d=new g.Caller(e.lineno,e.colno,c,t,f),n=r.args.children;n[n.length-1]instanceof g.KeywordArgs||n.push(new g.KeywordArgs);var i=n[n.length-1];return i.addChild(new g.Pair(e.lineno,e.colno,c,d)),new g.Output(e.lineno,e.colno,[r])},y.parseWithContext=function(){var e=this.peekToken(),t=null;return this.skipSymbol("with")?t=!0:this.skipSymbol("without")&&(t=!1),t!==null&&(this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",e.lineno,e.colno)),t},y.parseImport=function(){var e=this.peekToken();this.skipSymbol("import")||this.fail("parseImport: expected import",e.lineno,e.colno);var t=this.parseExpression();this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword',e.lineno,e.colno);var r=this.parseExpression(),f=this.parseWithContext(),c=new g.Import(e.lineno,e.colno,t,r,f);return this.advanceAfterBlockEnd(e.value),c},y.parseFrom=function(){var e=this.peekToken();this.skipSymbol("from")||this.fail("parseFrom: expected from");var t=this.parseExpression();this.skipSymbol("import")||this.fail("parseFrom: expected import",e.lineno,e.colno);for(var r=new g.NodeList,f;;){var c=this.peekToken();if(c.type===u.TOKEN_BLOCK_END){r.children.length||this.fail("parseFrom: Expected at least one import name",e.lineno,e.colno),c.value.charAt(0)==="-"&&(this.dropLeadingWhitespace=!0),this.nextToken();break}r.children.length>0&&!this.skip(u.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var d=this.parsePrimary();if(d.value.charAt(0)==="_"&&this.fail("parseFrom: names starting with an underscore cannot be imported",d.lineno,d.colno),this.skipSymbol("as")){var n=this.parsePrimary();r.addChild(new g.Pair(d.lineno,d.colno,d,n))}else r.addChild(d);f=this.parseWithContext()}return new g.FromImport(e.lineno,e.colno,t,r,f)},y.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var t=new g.Block(e.lineno,e.colno);t.name=this.parsePrimary(),t.name instanceof g.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value);var r=this.peekToken();return r||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(r.value),t},y.parseExtends=function(){var e="extends",t=this.peekToken();this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e);var r=new g.Extends(t.lineno,t.colno);return r.template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),r},y.parseInclude=function(){var e="include",t=this.peekToken();this.skipSymbol(e)||this.fail("parseInclude: expected "+e);var r=new g.Include(t.lineno,t.colno);return r.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(r.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),r},y.parseIf=function(){var e=this.peekToken(),t;this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?t=new g.If(e.lineno,e.colno):this.skipSymbol("ifAsync")?t=new g.IfAsync(e.lineno,e.colno):this.fail("parseIf: expected if, elif, or elseif",e.lineno,e.colno),t.cond=this.parseExpression(),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("elif","elseif","else","endif");var r=this.peekToken();switch(r&&r.value){case"elseif":case"elif":t.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),t.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":t.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return t},y.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t=new g.Set(e.lineno,e.colno,[]),r;(r=this.parsePrimary())&&(t.targets.push(r),!!this.skip(u.TOKEN_COMMA)););return this.skipValue(u.TOKEN_OPERATOR,"=")?(t.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(u.TOKEN_BLOCK_END)?(t.body=new g.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),t.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),t},y.parseSwitch=function(){var e="switch",t="endswitch",r="case",f="default",c=this.peekToken();!this.skipSymbol(e)&&!this.skipSymbol(r)&&!this.skipSymbol(f)&&this.fail('parseSwitch: expected "switch," "case" or "default"',c.lineno,c.colno);var d=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(r,f,t);var n=this.peekToken(),i=[],a;do{this.skipSymbol(r);var o=this.parseExpression();this.advanceAfterBlockEnd(e);var s=this.parseUntilBlocks(r,f,t);i.push(new g.Case(n.line,n.col,o,s)),n=this.peekToken()}while(n&&n.value===r);switch(n.value){case f:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new g.Switch(c.lineno,c.colno,d,i,a)},y.parseStatement=function(){var e=this.peekToken(),t;if(e.type!==u.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&k.indexOf(this.breakOnBlocks,e.value)!==-1)return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var r=0;r<this.extensions.length;r++){var f=this.extensions[r];if(k.indexOf(f.tags||[],e.value)!==-1)return f.parse(this,g,u)}this.fail("unknown block tag: "+e.value,e.lineno,e.colno)}return t},y.parseRaw=function(e){e=e||"raw";for(var t="end"+e,r=new RegExp("([\\s\\S]*?){%\\s*("+e+"|"+t+")\\s*(?=%})%}"),f=1,c="",d=null,n=this.advanceAfterBlockEnd();(d=this.tokens._extractRegex(r))&&f>0;){var i=d[0],a=d[1],o=d[2];o===e?f+=1:o===t&&(f-=1),f===0?(c+=a,this.tokens.backN(i.length-a.length)):c+=i}return new g.Output(n.lineno,n.colno,[new g.TemplateData(n.lineno,n.colno,c)])},y.parsePostfix=function(e){for(var t,r=this.peekToken();r;){if(r.type===u.TOKEN_LEFT_PAREN)e=new g.FunCall(r.lineno,r.colno,e,this.parseSignature());else if(r.type===u.TOKEN_LEFT_BRACKET)t=this.parseAggregate(),t.children.length>1&&this.fail("invalid index"),e=new g.LookupVal(r.lineno,r.colno,e,t.children[0]);else if(r.type===u.TOKEN_OPERATOR&&r.value==="."){this.nextToken();var f=this.nextToken();f.type!==u.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+f.value,f.lineno,f.colno),t=new g.Literal(f.lineno,f.colno,f.value),e=new g.LookupVal(r.lineno,r.colno,e,t)}else break;r=this.peekToken()}return e},y.parseExpression=function(){var e=this.parseInlineIf();return e},y.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var t=this.parseOr(),r=e;e=new g.InlineIf(e.lineno,e.colno),e.body=r,e.cond=t,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null}return e},y.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new g.Or(e.lineno,e.colno,e,t)}return e},y.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new g.And(e.lineno,e.colno,e,t)}return e},y.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new g.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},y.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var r=t.type===u.TOKEN_SYMBOL&&t.value==="not";if(r||this.pushToken(t),this.skipSymbol("in")){var f=this.parseIs();e=new g.In(e.lineno,e.colno,e,f),r&&(e=new g.Not(e.lineno,e.colno,e))}else{r&&this.pushToken(t);break}}return e},y.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var t=this.skipSymbol("not"),r=this.parseCompare();e=new g.Is(e.lineno,e.colno,e,r),t&&(e=new g.Not(e.lineno,e.colno,e))}return e},y.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),r=[];;){var f=this.nextToken();if(f)if(e.indexOf(f.value)!==-1)r.push(new g.CompareOperand(f.lineno,f.colno,this.parseConcat(),f.value));else{this.pushToken(f);break}else break}return r.length?new g.Compare(r[0].lineno,r[0].colno,t,r):t},y.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(u.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new g.Concat(e.lineno,e.colno,e,t)}return e},y.parseAdd=function(){for(var e=this.parseSub();this.skipValue(u.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new g.Add(e.lineno,e.colno,e,t)}return e},y.parseSub=function(){for(var e=this.parseMul();this.skipValue(u.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new g.Sub(e.lineno,e.colno,e,t)}return e},y.parseMul=function(){for(var e=this.parseDiv();this.skipValue(u.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new g.Mul(e.lineno,e.colno,e,t)}return e},y.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(u.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new g.Div(e.lineno,e.colno,e,t)}return e},y.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(u.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new g.FloorDiv(e.lineno,e.colno,e,t)}return e},y.parseMod=function(){for(var e=this.parsePow();this.skipValue(u.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new g.Mod(e.lineno,e.colno,e,t)}return e},y.parsePow=function(){for(var e=this.parseUnary();this.skipValue(u.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new g.Pow(e.lineno,e.colno,e,t)}return e},y.parseUnary=function(e){var t=this.peekToken(),r;return this.skipValue(u.TOKEN_OPERATOR,"-")?r=new g.Neg(t.lineno,t.colno,this.parseUnary(!0)):this.skipValue(u.TOKEN_OPERATOR,"+")?r=new g.Pos(t.lineno,t.colno,this.parseUnary(!0)):r=this.parsePrimary(),e||(r=this.parseFilter(r)),r},y.parsePrimary=function(e){var t=this.nextToken(),r,f=null;if(t?t.type===u.TOKEN_STRING?r=t.value:t.type===u.TOKEN_INT?r=parseInt(t.value,10):t.type===u.TOKEN_FLOAT?r=parseFloat(t.value):t.type===u.TOKEN_BOOLEAN?t.value==="true"?r=!0:t.value==="false"?r=!1:this.fail("invalid boolean: "+t.value,t.lineno,t.colno):t.type===u.TOKEN_NONE?r=null:t.type===u.TOKEN_REGEX&&(r=new RegExp(t.value.body,t.value.flags)):this.fail("expected expression, got end of file"),r!==void 0?f=new g.Literal(t.lineno,t.colno,r):t.type===u.TOKEN_SYMBOL?f=new g.Symbol(t.lineno,t.colno,t.value):(this.pushToken(t),f=this.parseAggregate()),e||(f=this.parsePostfix(f)),f)return f;throw this.error("unexpected token: "+t.value,t.lineno,t.colno)},y.parseFilterName=function(){for(var e=this.expect(u.TOKEN_SYMBOL),t=e.value;this.skipValue(u.TOKEN_OPERATOR,".");)t+="."+this.expect(u.TOKEN_SYMBOL).value;return new g.Symbol(e.lineno,e.colno,t)},y.parseFilterArgs=function(e){if(this.peekToken().type===u.TOKEN_LEFT_PAREN){var t=this.parsePostfix(e);return t.args.children}return[]},y.parseFilter=function(e){for(;this.skip(u.TOKEN_PIPE);){var t=this.parseFilterName();e=new g.Filter(t.lineno,t.colno,t,new g.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))))}return e},y.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var t=this.parseFilterName(),r=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value);var f=new g.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var c=new g.Filter(t.lineno,t.colno,t,new g.NodeList(t.lineno,t.colno,[f].concat(r)));return new g.Output(t.lineno,t.colno,[c])},y.parseAggregate=function(){var e=this.nextToken(),t;switch(e.type){case u.TOKEN_LEFT_PAREN:t=new g.Group(e.lineno,e.colno);break;case u.TOKEN_LEFT_BRACKET:t=new g.Array(e.lineno,e.colno);break;case u.TOKEN_LEFT_CURLY:t=new g.Dict(e.lineno,e.colno);break;default:return null}for(;;){var r=this.peekToken().type;if(r===u.TOKEN_RIGHT_PAREN||r===u.TOKEN_RIGHT_BRACKET||r===u.TOKEN_RIGHT_CURLY){this.nextToken();break}if(t.children.length>0&&(this.skip(u.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",e.lineno,e.colno)),t instanceof g.Dict){var f=this.parsePrimary();this.skip(u.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",e.lineno,e.colno);var c=this.parseExpression();t.addChild(new g.Pair(f.lineno,f.colno,f,c))}else{var d=this.parseExpression();t.addChild(d)}}return t},y.parseSignature=function(e,t){var r=this.peekToken();if(!t&&r.type!==u.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",r.lineno,r.colno)}r.type===u.TOKEN_LEFT_PAREN&&(r=this.nextToken());for(var f=new g.NodeList(r.lineno,r.colno),c=new g.KeywordArgs(r.lineno,r.colno),d=!1;;){if(r=this.peekToken(),!t&&r.type===u.TOKEN_RIGHT_PAREN){this.nextToken();break}else if(t&&r.type===u.TOKEN_BLOCK_END)break;if(d&&!this.skip(u.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",r.lineno,r.colno);else{var n=this.parseExpression();this.skipValue(u.TOKEN_OPERATOR,"=")?c.addChild(new g.Pair(n.lineno,n.colno,n,this.parseExpression())):f.addChild(n)}d=!0}return c.children.length&&f.addChild(c),f},y.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,r=new Array(t),f=0;f<t;f++)r[f]=arguments[f];this.breakOnBlocks=r;var c=this.parse();return this.breakOnBlocks=e,c},y.parseNodes=function(){for(var e,t=[];e=this.nextToken();)if(e.type===u.TOKEN_DATA){var r=e.value,f=this.peekToken(),c=f&&f.value;this.dropLeadingWhitespace&&(r=r.replace(/^\s*/,""),this.dropLeadingWhitespace=!1),f&&(f.type===u.TOKEN_BLOCK_START&&c.charAt(c.length-1)==="-"||f.type===u.TOKEN_VARIABLE_START&&c.charAt(this.tokens.tags.VARIABLE_START.length)==="-"||f.type===u.TOKEN_COMMENT&&c.charAt(this.tokens.tags.COMMENT_START.length)==="-")&&(r=r.replace(/\s*$/,"")),t.push(new g.Output(e.lineno,e.colno,[new g.TemplateData(e.lineno,e.colno,r)]))}else if(e.type===u.TOKEN_BLOCK_START){this.dropLeadingWhitespace=!1;var d=this.parseStatement();if(!d)break;t.push(d)}else if(e.type===u.TOKEN_VARIABLE_START){var n=this.parseExpression();this.dropLeadingWhitespace=!1,this.advanceAfterVariableEnd(),t.push(new g.Output(e.lineno,e.colno,[n]))}else e.type===u.TOKEN_COMMENT?this.dropLeadingWhitespace=e.value.charAt(e.value.length-this.tokens.tags.COMMENT_END.length-1)==="-":this.fail("Unexpected token at top-level: "+e.type,e.lineno,e.colno);return t},y.parse=function(){return new g.NodeList(0,0,this.parseNodes())},y.parseAsRoot=function(){return new g.Root(0,0,this.parseNodes())},A}(l);O.exports={parse:function(A,y,T){var e=new D(u.lex(A,T));return y!==void 0&&(e.extensions=y),e.parseAsRoot()},Parser:D}},function(O,C,L){var h=L(0),b=`
18
- \r `,u="()[]{}%*-+~/#,:|.<>=!",g="0123456789",l="{%",k="%}",D="{{",P="}}",A="{#",y="#}",T="string",e="whitespace",t="data",r="block-start",f="block-end",c="variable-start",d="variable-end",n="comment",i="left-paren",a="right-paren",o="left-bracket",s="right-bracket",m="left-curly",p="right-curly",S="operator",R="comma",I="colon",B="tilde",U="pipe",_="int",v="float",N="boolean",$="none",V="symbol",te="special",ae="regex";function oe(ie,q,X,H){return{type:ie,value:q,lineno:X,colno:H}}var K=function(){function ie(X,H){this.str=X,this.index=0,this.len=X.length,this.lineno=0,this.colno=0,this.in_code=!1,H=H||{};var ee=H.tags||{};this.tags={BLOCK_START:ee.blockStart||l,BLOCK_END:ee.blockEnd||k,VARIABLE_START:ee.variableStart||D,VARIABLE_END:ee.variableEnd||P,COMMENT_START:ee.commentStart||A,COMMENT_END:ee.commentEnd||y},this.trimBlocks=!!H.trimBlocks,this.lstripBlocks=!!H.lstripBlocks}var q=ie.prototype;return q.nextToken=function(){var H=this.lineno,ee=this.colno,Z;if(this.in_code){var le=this.current();if(this.isFinished())return null;if(le==='"'||le==="'")return oe(T,this._parseString(le),H,ee);if(Z=this._extract(b))return oe(e,Z,H,ee);if((Z=this._extractString(this.tags.BLOCK_END))||(Z=this._extractString("-"+this.tags.BLOCK_END)))return this.in_code=!1,this.trimBlocks&&(le=this.current(),le===`
19
- `?this.forward():le==="\r"&&(this.forward(),le=this.current(),le===`
20
- `?this.forward():this.back())),oe(f,Z,H,ee);if((Z=this._extractString(this.tags.VARIABLE_END))||(Z=this._extractString("-"+this.tags.VARIABLE_END)))return this.in_code=!1,oe(d,Z,H,ee);if(le==="r"&&this.str.charAt(this.index+1)==="/"){this.forwardN(2);for(var Ee="";!this.isFinished();)if(this.current()==="/"&&this.previous()!=="\\"){this.forward();break}else Ee+=this.current(),this.forward();for(var ye=["g","i","m","y"],Ae="";!this.isFinished();){var x=ye.indexOf(this.current())!==-1;if(x)Ae+=this.current(),this.forward();else break}return oe(ae,{body:Ee,flags:Ae},H,ee)}else if(u.indexOf(le)!==-1){this.forward();var M=["==","===","!=","!==","<=",">=","//","**"],z=le+this.current(),E;switch(h.indexOf(M,z)!==-1&&(this.forward(),le=z,h.indexOf(M,z+this.current())!==-1&&(le=z+this.current(),this.forward())),le){case"(":E=i;break;case")":E=a;break;case"[":E=o;break;case"]":E=s;break;case"{":E=m;break;case"}":E=p;break;case",":E=R;break;case":":E=I;break;case"~":E=B;break;case"|":E=U;break;default:E=S}return oe(E,le,H,ee)}else if(Z=this._extractUntil(b+u),Z.match(/^[-+]?[0-9]+$/))if(this.current()==="."){this.forward();var W=this._extract(g);return oe(v,Z+"."+W,H,ee)}else return oe(_,Z,H,ee);else{if(Z.match(/^(true|false)$/))return oe(N,Z,H,ee);if(Z==="none")return oe($,Z,H,ee);if(Z==="null")return oe($,Z,H,ee);if(Z)return oe(V,Z,H,ee);throw new Error("Unexpected value while parsing: "+Z)}}else{var j=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((Z=this._extractString(this.tags.BLOCK_START+"-"))||(Z=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,oe(r,Z,H,ee);if((Z=this._extractString(this.tags.VARIABLE_START+"-"))||(Z=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,oe(c,Z,H,ee);Z="";var Q,Y=!1;for(this._matches(this.tags.COMMENT_START)&&(Y=!0,Z=this._extractString(this.tags.COMMENT_START));(Q=this._extractUntil(j))!==null;)if(Z+=Q,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!Y){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=Z.length){var se=Z.slice(-this.colno);if(/^\s+$/.test(se)&&(Z=Z.slice(0,-this.colno),!Z.length))return this.nextToken()}break}else if(this._matches(this.tags.COMMENT_END)){if(!Y)throw new Error("unexpected end of comment");Z+=this._extractString(this.tags.COMMENT_END);break}else Z+=this.current(),this.forward();if(Q===null&&Y)throw new Error("expected end of comment, got end of file");return oe(Y?n:t,Z,H,ee)}},q._parseString=function(H){this.forward();for(var ee="";!this.isFinished()&&this.current()!==H;){var Z=this.current();if(Z==="\\"){switch(this.forward(),this.current()){case"n":ee+=`
21
- `;break;case"t":ee+=" ";break;case"r":ee+="\r";break;default:ee+=this.current()}this.forward()}else ee+=Z,this.forward()}return this.forward(),ee},q._matches=function(H){if(this.index+H.length>this.len)return null;var ee=this.str.slice(this.index,this.index+H.length);return ee===H},q._extractString=function(H){return this._matches(H)?(this.forwardN(H.length),H):null},q._extractUntil=function(H){return this._extractMatching(!0,H||"")},q._extract=function(H){return this._extractMatching(!1,H)},q._extractMatching=function(H,ee){if(this.isFinished())return null;var Z=ee.indexOf(this.current());if(H&&Z===-1||!H&&Z!==-1){var le=this.current();this.forward();for(var Ee=ee.indexOf(this.current());(H&&Ee===-1||!H&&Ee!==-1)&&!this.isFinished();)le+=this.current(),this.forward(),Ee=ee.indexOf(this.current());return le}return""},q._extractRegex=function(H){var ee=this.currentStr().match(H);return ee?(this.forwardN(ee[0].length),ee):null},q.isFinished=function(){return this.index>=this.len},q.forwardN=function(H){for(var ee=0;ee<H;ee++)this.forward()},q.forward=function(){this.index++,this.previous()===`
22
- `?(this.lineno++,this.colno=0):this.colno++},q.backN=function(H){for(var ee=0;ee<H;ee++)this.back()},q.back=function(){if(this.index--,this.current()===`
23
- `){this.lineno--;var H=this.src.lastIndexOf(`
24
- `,this.index-1);H===-1?this.colno=this.index:this.colno=this.index-H}else this.colno--},q.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},q.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},q.previous=function(){return this.str.charAt(this.index-1)},ie}();O.exports={lex:function(q,X){return new K(q,X)},TOKEN_STRING:T,TOKEN_WHITESPACE:e,TOKEN_DATA:t,TOKEN_BLOCK_START:r,TOKEN_BLOCK_END:f,TOKEN_VARIABLE_START:c,TOKEN_VARIABLE_END:d,TOKEN_COMMENT:n,TOKEN_LEFT_PAREN:i,TOKEN_RIGHT_PAREN:a,TOKEN_LEFT_BRACKET:o,TOKEN_RIGHT_BRACKET:s,TOKEN_LEFT_CURLY:m,TOKEN_RIGHT_CURLY:p,TOKEN_OPERATOR:S,TOKEN_COMMA:R,TOKEN_COLON:I,TOKEN_TILDE:B,TOKEN_PIPE:U,TOKEN_INT:_,TOKEN_FLOAT:v,TOKEN_BOOLEAN:N,TOKEN_NONE:$,TOKEN_SYMBOL:V,TOKEN_SPECIAL:te,TOKEN_REGEX:ae}},function(O,C,L){function h(D,P){D.prototype=Object.create(P.prototype),D.prototype.constructor=D,b(D,P)}function b(D,P){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(y,T){return y.__proto__=T,y},b(D,P)}var u=L(6),g=L(19),l=g.PrecompiledLoader,k=function(D){h(P,D);function P(y,T){var e;return e=D.call(this)||this,e.baseURL=y||".",T=T||{},e.useCache=!!T.useCache,e.async=!!T.async,e}var A=P.prototype;return A.resolve=function(T,e){throw new Error("relative templates not support in the browser yet")},A.getSource=function(T,e){var t=this,r=this.useCache,f;return this.fetch(this.baseURL+"/"+T,function(c,d){if(c)if(e)e(c.content);else if(c.status===404)f=null;else throw c.content;else f={src:d,path:T,noCache:!r},t.emit("load",T,f),e&&e(null,f)}),f},A.fetch=function(T,e){if(typeof window>"u")throw new Error("WebLoader can only by used in a browser");var t=new XMLHttpRequest,r=!0;t.onreadystatechange=function(){t.readyState===4&&r&&(r=!1,t.status===0||t.status===200?e(null,t.responseText):e({status:t.status,content:t.responseText}))},T+=(T.indexOf("?")===-1?"?":"&")+"s="+new Date().getTime(),t.open("GET",T,this.async),t.send()},P}(u);O.exports={WebLoader:k,PrecompiledLoader:l}},function(O,C,L){var h=L(0),b=L(7),u=b.Environment,g=b.Template,l=L(6),k=L(10),D=L(23),P=L(5),A=L(8),y=L(9),T=L(2),e=L(3),t=L(25),r;function f(c,d){d=d||{},h.isObject(c)&&(d=c,c=null);var n;return k.FileSystemLoader?n=new k.FileSystemLoader(c,{watch:d.watch,noCache:d.noCache}):k.WebLoader&&(n=new k.WebLoader(c,{useCache:d.web&&d.web.useCache,async:d.web&&d.web.async})),r=new u(n,d),d&&d.express&&r.express(d.express),r}O.exports={Environment:u,Template:g,Loader:l,FileSystemLoader:k.FileSystemLoader,NodeResolveLoader:k.NodeResolveLoader,PrecompiledLoader:k.PrecompiledLoader,WebLoader:k.WebLoader,compiler:P,parser:A,lexer:y,runtime:T,lib:h,nodes:e,installJinjaCompat:t,configure:f,reset:function(){r=void 0},compile:function(d,n,i,a){return r||f(),new g(d,n,i,a)},render:function(d,n,i){return r||f(),r.render(d,n,i)},renderString:function(d,n,i){return r||f(),r.renderString(d,n,i)},precompile:D?D.precompile:void 0,precompileString:D?D.precompileString:void 0}},function(O,C,L){var h=L(13),b=[],u=[],g=h.makeRequestCallFromTimer(l);function l(){if(u.length)throw u.shift()}O.exports=k;function k(P){var A;b.length?A=b.pop():A=new D,A.task=P,h(A)}function D(){this.task=null}D.prototype.call=function(){try{this.task.call()}catch(P){k.onerror?k.onerror(P):(u.push(P),g())}finally{this.task=null,b[b.length]=this}}},function(O,C,L){(function(h){O.exports=b;function b(e){u.length||g(),u[u.length]=e}var u=[],g,l=0,k=1024;function D(){for(;l<u.length;){var e=l;if(l=l+1,u[e].call(),l>k){for(var t=0,r=u.length-l;t<r;t++)u[t]=u[t+l];u.length-=l,l=0}}u.length=0,l=0}var P=typeof h<"u"?h:self,A=P.MutationObserver||P.WebKitMutationObserver;typeof A=="function"?g=y(D):g=T(D),b.requestFlush=g;function y(e){var t=1,r=new A(e),f=document.createTextNode("");return r.observe(f,{characterData:!0}),function(){t=-t,f.data=t}}function T(e){return function(){var r=setTimeout(c,0),f=setInterval(c,50);function c(){clearTimeout(r),clearInterval(f),e()}}}b.makeRequestCallFromTimer=T}).call(C,L(14))},function(O,C){var L;L=function(){return this}();try{L=L||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(L=window)}O.exports=L},function(O,C,L){var h,b;(function(u){var g=function(){var A=Array.prototype.slice.call(arguments);typeof A[0]=="function"&&A[0].apply(null,A.splice(1))},l=function(A){typeof setImmediate=="function"?setImmediate(A):typeof process<"u"&&process.nextTick?process.nextTick(A):setTimeout(A,0)},k=function(A){var y=function(T){var e=function(){return A.length&&A[T].apply(null,arguments),e.next()};return e.next=function(){return T<A.length-1?y(T+1):null},e};return y(0)},D=Array.isArray||function(A){return Object.prototype.toString.call(A)==="[object Array]"},P=function(A,y,T){var e=T?l:g;if(y=y||function(){},!D(A)){var t=new Error("First argument to waterfall must be an array of functions");return y(t)}if(!A.length)return y();var r=function(f){return function(c){if(c)y.apply(null,arguments),y=function(){};else{var d=Array.prototype.slice.call(arguments,1),n=f.next();n?d.push(r(n)):d.push(y),e(function(){f.apply(null,d)})}}};r(k(A))()};h=[],b=(function(){return P}).apply(C,h),b!==void 0&&(O.exports=b)})()},function(O,C,L){var h=typeof Reflect=="object"?Reflect:null,b=h&&typeof h.apply=="function"?h.apply:function(s,m,p){return Function.prototype.apply.call(s,m,p)},u;h&&typeof h.ownKeys=="function"?u=h.ownKeys:Object.getOwnPropertySymbols?u=function(s){return Object.getOwnPropertyNames(s).concat(Object.getOwnPropertySymbols(s))}:u=function(s){return Object.getOwnPropertyNames(s)};function g(o){console&&console.warn&&console.warn(o)}var l=Number.isNaN||function(s){return s!==s};function k(){k.init.call(this)}O.exports=k,O.exports.once=n,k.EventEmitter=k,k.prototype._events=void 0,k.prototype._eventsCount=0,k.prototype._maxListeners=void 0;var D=10;function P(o){if(typeof o!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof o)}Object.defineProperty(k,"defaultMaxListeners",{enumerable:!0,get:function(){return D},set:function(o){if(typeof o!="number"||o<0||l(o))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+o+".");D=o}}),k.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},k.prototype.setMaxListeners=function(s){if(typeof s!="number"||s<0||l(s))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+s+".");return this._maxListeners=s,this};function A(o){return o._maxListeners===void 0?k.defaultMaxListeners:o._maxListeners}k.prototype.getMaxListeners=function(){return A(this)},k.prototype.emit=function(s){for(var m=[],p=1;p<arguments.length;p++)m.push(arguments[p]);var S=s==="error",R=this._events;if(R!==void 0)S=S&&R.error===void 0;else if(!S)return!1;if(S){var I;if(m.length>0&&(I=m[0]),I instanceof Error)throw I;var B=new Error("Unhandled error."+(I?" ("+I.message+")":""));throw B.context=I,B}var U=R[s];if(U===void 0)return!1;if(typeof U=="function")b(U,this,m);else for(var _=U.length,v=f(U,_),p=0;p<_;++p)b(v[p],this,m);return!0};function y(o,s,m,p){var S,R,I;if(P(m),R=o._events,R===void 0?(R=o._events=Object.create(null),o._eventsCount=0):(R.newListener!==void 0&&(o.emit("newListener",s,m.listener?m.listener:m),R=o._events),I=R[s]),I===void 0)I=R[s]=m,++o._eventsCount;else if(typeof I=="function"?I=R[s]=p?[m,I]:[I,m]:p?I.unshift(m):I.push(m),S=A(o),S>0&&I.length>S&&!I.warned){I.warned=!0;var B=new Error("Possible EventEmitter memory leak detected. "+I.length+" "+String(s)+" listeners added. Use emitter.setMaxListeners() to increase limit");B.name="MaxListenersExceededWarning",B.emitter=o,B.type=s,B.count=I.length,g(B)}return o}k.prototype.addListener=function(s,m){return y(this,s,m,!1)},k.prototype.on=k.prototype.addListener,k.prototype.prependListener=function(s,m){return y(this,s,m,!0)};function T(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function e(o,s,m){var p={fired:!1,wrapFn:void 0,target:o,type:s,listener:m},S=T.bind(p);return S.listener=m,p.wrapFn=S,S}k.prototype.once=function(s,m){return P(m),this.on(s,e(this,s,m)),this},k.prototype.prependOnceListener=function(s,m){return P(m),this.prependListener(s,e(this,s,m)),this},k.prototype.removeListener=function(s,m){var p,S,R,I,B;if(P(m),S=this._events,S===void 0)return this;if(p=S[s],p===void 0)return this;if(p===m||p.listener===m)--this._eventsCount===0?this._events=Object.create(null):(delete S[s],S.removeListener&&this.emit("removeListener",s,p.listener||m));else if(typeof p!="function"){for(R=-1,I=p.length-1;I>=0;I--)if(p[I]===m||p[I].listener===m){B=p[I].listener,R=I;break}if(R<0)return this;R===0?p.shift():c(p,R),p.length===1&&(S[s]=p[0]),S.removeListener!==void 0&&this.emit("removeListener",s,B||m)}return this},k.prototype.off=k.prototype.removeListener,k.prototype.removeAllListeners=function(s){var m,p,S;if(p=this._events,p===void 0)return this;if(p.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):p[s]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete p[s]),this;if(arguments.length===0){var R=Object.keys(p),I;for(S=0;S<R.length;++S)I=R[S],I!=="removeListener"&&this.removeAllListeners(I);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(m=p[s],typeof m=="function")this.removeListener(s,m);else if(m!==void 0)for(S=m.length-1;S>=0;S--)this.removeListener(s,m[S]);return this};function t(o,s,m){var p=o._events;if(p===void 0)return[];var S=p[s];return S===void 0?[]:typeof S=="function"?m?[S.listener||S]:[S]:m?d(S):f(S,S.length)}k.prototype.listeners=function(s){return t(this,s,!0)},k.prototype.rawListeners=function(s){return t(this,s,!1)},k.listenerCount=function(o,s){return typeof o.listenerCount=="function"?o.listenerCount(s):r.call(o,s)},k.prototype.listenerCount=r;function r(o){var s=this._events;if(s!==void 0){var m=s[o];if(typeof m=="function")return 1;if(m!==void 0)return m.length}return 0}k.prototype.eventNames=function(){return this._eventsCount>0?u(this._events):[]};function f(o,s){for(var m=new Array(s),p=0;p<s;++p)m[p]=o[p];return m}function c(o,s){for(;s+1<o.length;s++)o[s]=o[s+1];o.pop()}function d(o){for(var s=new Array(o.length),m=0;m<s.length;++m)s[m]=o[m].listener||o[m];return s}function n(o,s){return new Promise(function(m,p){function S(I){o.removeListener(s,R),p(I)}function R(){typeof o.removeListener=="function"&&o.removeListener("error",S),m([].slice.call(arguments))}a(o,s,R,{once:!0}),s!=="error"&&i(o,S,{once:!0})})}function i(o,s,m){typeof o.on=="function"&&a(o,"error",s,m)}function a(o,s,m,p){if(typeof o.on=="function")p.once?o.once(s,m):o.on(s,m);else if(typeof o.addEventListener=="function")o.addEventListener(s,function S(R){p.once&&o.removeEventListener(s,S),m(R)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof o)}},function(O,C,L){var h=L(3),b=L(0),u=0;function g(){return"hole_"+u++}function l(r,f){for(var c=null,d=0;d<r.length;d++){var n=f(r[d]);n!==r[d]&&(c||(c=r.slice()),c[d]=n)}return c||r}function k(r,f,c){if(!(r instanceof h.Node))return r;if(!c){var d=f(r);if(d&&d!==r)return d}if(r instanceof h.NodeList){var n=l(r.children,function(m){return k(m,f,c)});n!==r.children&&(r=new h[r.typename](r.lineno,r.colno,n))}else if(r instanceof h.CallExtension){var i=k(r.args,f,c),a=l(r.contentArgs,function(m){return k(m,f,c)});(i!==r.args||a!==r.contentArgs)&&(r=new h[r.typename](r.extName,r.prop,i,a))}else{var o=r.fields.map(function(m){return r[m]}),s=l(o,function(m){return k(m,f,c)});s!==o&&(r=new h[r.typename](r.lineno,r.colno),s.forEach(function(m,p){r[r.fields[p]]=m}))}return c&&f(r)||r}function D(r,f){return k(r,f,!0)}function P(r,f,c){var d=[],n=D(c?r[c]:r,function(i){var a;return i instanceof h.Block?i:((i instanceof h.Filter&&b.indexOf(f,i.name.value)!==-1||i instanceof h.CallExtensionAsync)&&(a=new h.Symbol(i.lineno,i.colno,g()),d.push(new h.FilterAsync(i.lineno,i.colno,i.name,i.args,a))),a)});return c?r[c]=n:r=n,d.length?(d.push(r),new h.NodeList(r.lineno,r.colno,d)):r}function A(r,f){return D(r,function(c){return c instanceof h.Output?P(c,f):c instanceof h.Set?P(c,f,"value"):c instanceof h.For?P(c,f,"arr"):c instanceof h.If?P(c,f,"cond"):c instanceof h.CallExtension?P(c,f,"args"):void 0})}function y(r){return k(r,function(f){if(f instanceof h.Block){var c=!1,d=g();f.body=k(f.body,function(n){if(n instanceof h.FunCall&&n.name.value==="super")return c=!0,new h.Symbol(n.lineno,n.colno,d)}),c&&f.body.children.unshift(new h.Super(0,0,f.name,new h.Symbol(0,0,d)))}})}function T(r){return D(r,function(f){if(!(!(f instanceof h.If)&&!(f instanceof h.For))){var c=!1;if(k(f,function(d){if(d instanceof h.FilterAsync||d instanceof h.IfAsync||d instanceof h.AsyncEach||d instanceof h.AsyncAll||d instanceof h.CallExtensionAsync)return c=!0,d}),c){if(f instanceof h.If)return new h.IfAsync(f.lineno,f.colno,f.cond,f.body,f.else_);if(f instanceof h.For&&!(f instanceof h.AsyncAll))return new h.AsyncEach(f.lineno,f.colno,f.arr,f.name,f.body,f.else_)}}})}function e(r,f){return T(y(A(r,f)))}function t(r,f){return e(r,f||[])}O.exports={transform:t}},function(O,u,L){var h=L(0),b=L(2),u=O.exports={};function g(x,M){return x==null||x===!1?M:x}u.abs=Math.abs;function l(x){return x!==x}function k(x,M,z){var E,W=[],j=[];for(E=0;E<x.length;E++)E%M===0&&j.length&&(W.push(j),j=[]),j.push(x[E]);if(j.length){if(z)for(E=j.length;E<M;E++)j.push(z);W.push(j)}return W}u.batch=k;function D(x){x=g(x,"");var M=x.toLowerCase();return b.copySafeness(x,M.charAt(0).toUpperCase()+M.slice(1))}u.capitalize=D;function P(x,M){if(x=g(x,""),M=M||80,x.length>=M)return x;var z=M-x.length,E=h.repeat(" ",z/2-z%2),W=h.repeat(" ",z/2);return b.copySafeness(x,E+x+W)}u.center=P;function A(x,M,z){return z?x||M:x!==void 0?x:M}u.default=A;function y(x,M,z){if(!h.isObject(x))throw new h.TemplateError("dictsort filter: val must be an object");var E=[];for(var W in x)E.push([W,x[W]]);var j;if(z===void 0||z==="key")j=0;else if(z==="value")j=1;else throw new h.TemplateError("dictsort filter: You can only sort by either key or value");return E.sort(function(Q,Y){var se=Q[j],_e=Y[j];return M||(h.isString(se)&&(se=se.toUpperCase()),h.isString(_e)&&(_e=_e.toUpperCase())),se>_e?1:se===_e?0:-1}),E}u.dictsort=y;function T(x,M){return JSON.stringify(x,null,M)}u.dump=T;function e(x){return x instanceof b.SafeString?x:(x=x??"",b.markSafe(h.escape(x.toString())))}u.escape=e;function t(x){return x instanceof b.SafeString?x:(x=x??"",b.markSafe(x.toString()))}u.safe=t;function r(x){return x[0]}u.first=r;function f(x){return x=x??"",b.markSafe(h.escape(x.toString()))}u.forceescape=f;function c(x,M){return h.groupBy(x,M,this.env.opts.throwOnUndefined)}u.groupby=c;function d(x,M,z){if(x=g(x,""),x==="")return"";M=M||4;var E=x.split(`
25
- `),W=h.repeat(" ",M),j=E.map(function(Q,Y){return Y===0&&!z?Q:""+W+Q}).join(`
26
- `);return b.copySafeness(x,j)}u.indent=d;function n(x,M,z){return M=M||"",z&&(x=h.map(x,function(E){return E[z]})),x.join(M)}u.join=n;function i(x){return x[x.length-1]}u.last=i;function a(x){var M=g(x,"");return M!==void 0?typeof Map=="function"&&M instanceof Map||typeof Set=="function"&&M instanceof Set?M.size:h.isObject(M)&&!(M instanceof b.SafeString)?h.keys(M).length:M.length:0}u.length=a;function o(x){if(h.isString(x))return x.split("");if(h.isObject(x))return h._entries(x||{}).map(function(M){var z=M[0],E=M[1];return{key:z,value:E}});if(h.isArray(x))return x;throw new h.TemplateError("list filter: type not iterable")}u.list=o;function s(x){return x=g(x,""),x.toLowerCase()}u.lower=s;function m(x){return x==null?"":b.copySafeness(x,x.replace(/\r\n|\n/g,`<br />
27
- `))}u.nl2br=m;function p(x){return x[Math.floor(Math.random()*x.length)]}u.random=p;function S(x){function M(z,E,W){E===void 0&&(E="truthy");var j=this,Q=j.env.getTest(E);return h.toArray(z).filter(function(se){return Q.call(j,se,W)===x})}return M}u.reject=S(!1);function R(x,M){return x.filter(function(z){return!z[M]})}u.rejectattr=R,u.select=S(!0);function I(x,M){return x.filter(function(z){return!!z[M]})}u.selectattr=I;function B(x,M,z,E){var W=x;if(M instanceof RegExp)return x.replace(M,z);typeof E>"u"&&(E=-1);var j="";if(typeof M=="number")M=""+M;else if(typeof M!="string")return x;if(typeof x=="number"&&(x=""+x),typeof x!="string"&&!(x instanceof b.SafeString))return x;if(M==="")return j=z+x.split("").join(z)+z,b.copySafeness(x,j);var Q=x.indexOf(M);if(E===0||Q===-1)return x;for(var Y=0,se=0;Q>-1&&(E===-1||se<E);)j+=x.substring(Y,Q)+z,Y=Q+M.length,se++,Q=x.indexOf(M,Y);return Y<x.length&&(j+=x.substring(Y)),b.copySafeness(W,j)}u.replace=B;function U(x){var M;return h.isString(x)?M=o(x):M=h.map(x,function(z){return z}),M.reverse(),h.isString(x)?b.copySafeness(x,M.join("")):M}u.reverse=U;function _(x,M,z){M=M||0;var E=Math.pow(10,M),W;return z==="ceil"?W=Math.ceil:z==="floor"?W=Math.floor:W=Math.round,W(x*E)/E}u.round=_;function v(x,M,z){for(var E=Math.floor(x.length/M),W=x.length%M,j=[],Q=0,Y=0;Y<M;Y++){var se=Q+Y*E;Y<W&&Q++;var _e=Q+(Y+1)*E,ue=x.slice(se,_e);z&&Y>=W&&ue.push(z),j.push(ue)}return j}u.slice=v;function N(x,M,z){return z===void 0&&(z=0),M&&(x=h.map(x,function(E){return E[M]})),z+x.reduce(function(E,W){return E+W},0)}u.sum=N,u.sort=b.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(M,z,E,W){var j=this,Q=h.map(M,function(se){return se}),Y=h.getAttrGetter(W);return Q.sort(function(se,_e){var ue=W?Y(se):se,be=W?Y(_e):_e;if(j.env.opts.throwOnUndefined&&W&&(ue===void 0||be===void 0))throw new TypeError('sort: attribute "'+W+'" resolved to undefined');return!E&&h.isString(ue)&&h.isString(be)&&(ue=ue.toLowerCase(),be=be.toLowerCase()),ue<be?z?1:-1:ue>be?z?-1:1:0}),Q});function $(x){return b.copySafeness(x,x)}u.string=$;function V(x,M){x=g(x,"");var z=/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,E=ae(x.replace(z,"")),W="";return M?W=E.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,`
28
- `).replace(/\n\n\n+/g,`
29
-
30
- `):W=E.replace(/\s+/gi," "),b.copySafeness(x,W)}u.striptags=V;function te(x){x=g(x,"");var M=x.split(" ").map(function(z){return D(z)});return b.copySafeness(x,M.join(" "))}u.title=te;function ae(x){return b.copySafeness(x,x.replace(/^\s*|\s*$/g,""))}u.trim=ae;function oe(x,M,z,E){var W=x;if(x=g(x,""),M=M||255,x.length<=M)return x;if(z)x=x.substring(0,M);else{var j=x.lastIndexOf(" ",M);j===-1&&(j=M),x=x.substring(0,j)}return x+=E??"...",b.copySafeness(W,x)}u.truncate=oe;function K(x){return x=g(x,""),x.toUpperCase()}u.upper=K;function ie(x){var M=encodeURIComponent;if(h.isString(x))return M(x);var z=h.isArray(x)?x:h._entries(x);return z.map(function(E){var W=E[0],j=E[1];return M(W)+"="+M(j)}).join("&")}u.urlencode=ie;var q=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,X=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,H=/^https?:\/\/.*$/,ee=/^www\./,Z=/\.(?:org|net|com)(?:\:|\/|$)/;function le(x,M,z){l(M)&&(M=1/0);var E=z===!0?' rel="nofollow"':"",W=x.split(/(\s+)/).filter(function(j){return j&&j.length}).map(function(j){var Q=j.match(q),Y=Q?Q[1]:j,se=Y.substr(0,M);return H.test(Y)?'<a href="'+Y+'"'+E+">"+se+"</a>":ee.test(Y)?'<a href="http://'+Y+'"'+E+">"+se+"</a>":X.test(Y)?'<a href="mailto:'+Y+'">'+Y+"</a>":Z.test(Y)?'<a href="http://'+Y+'"'+E+">"+se+"</a>":j});return W.join("")}u.urlize=le;function Ee(x){x=g(x,"");var M=x?x.match(/\w+/g):null;return M?M.length:null}u.wordcount=Ee;function ye(x,M){var z=parseFloat(x);return l(z)?M:z}u.float=ye;var Ae=b.makeMacro(["value","default","base"],[],function(M,z,E){E===void 0&&(E=10);var W=parseInt(M,E);return l(W)?z:W});u.int=Ae,u.d=u.default,u.e=u.escape},function(O,C,L){function h(l,k){l.prototype=Object.create(k.prototype),l.prototype.constructor=l,b(l,k)}function b(l,k){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(P,A){return P.__proto__=A,P},b(l,k)}var u=L(6),g=function(l){h(k,l);function k(P){var A;return A=l.call(this)||this,A.precompiled=P||{},A}var D=k.prototype;return D.getSource=function(A){return this.precompiled[A]?{src:{type:"code",obj:this.precompiled[A]},path:A}:null},k}(u);O.exports={PrecompiledLoader:g}},function(O,C,L){var h=L(2).SafeString;function b(p){return typeof p=="function"}C.callable=b;function u(p){return p!==void 0}C.defined=u;function g(p,S){return p%S===0}C.divisibleby=g;function l(p){return p instanceof h}C.escaped=l;function k(p,S){return p===S}C.equalto=k,C.eq=C.equalto,C.sameas=C.equalto;function D(p){return p%2===0}C.even=D;function P(p){return!p}C.falsy=P;function A(p,S){return p>=S}C.ge=A;function y(p,S){return p>S}C.greaterthan=y,C.gt=C.greaterthan;function T(p,S){return p<=S}C.le=T;function e(p,S){return p<S}C.lessthan=e,C.lt=C.lessthan;function t(p){return p.toLowerCase()===p}C.lower=t;function r(p,S){return p!==S}C.ne=r;function f(p){return p===null}C.null=f;function c(p){return typeof p=="number"}C.number=c;function d(p){return p%2===1}C.odd=d;function n(p){return typeof p=="string"}C.string=n;function i(p){return!!p}C.truthy=i;function a(p){return p===void 0}C.undefined=a;function o(p){return p.toUpperCase()===p}C.upper=o;function s(p){return typeof Symbol<"u"?!!p[Symbol.iterator]:Array.isArray(p)||typeof p=="string"}C.iterable=s;function m(p){var S=p!=null&&typeof p=="object"&&!Array.isArray(p);return Set?S&&!(p instanceof Set):S}C.mapping=m},function(O,C,L){function h(g){var l=-1;return{current:null,reset:function(){l=-1,this.current=null},next:function(){return l++,l>=g.length&&(l=0),this.current=g[l],this.current}}}function b(g){g=g||",";var l=!0;return function(){var k=l?"":g;return l=!1,k}}function u(){return{range:function(l,k,D){typeof k>"u"?(k=l,l=0,D=1):D||(D=1);var P=[];if(D>0)for(var A=l;A<k;A+=D)P.push(A);else for(var y=l;y>k;y+=D)P.push(y);return P},cycler:function(){return h(Array.prototype.slice.call(arguments))},joiner:function(l){return b(l)}}}O.exports=u},function(O,C,L){var h=L(4);O.exports=function(u,g){function l(k,D){if(this.name=k,this.path=k,this.defaultEngine=D.defaultEngine,this.ext=h.extname(k),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=(this.defaultEngine[0]!=="."?".":"")+this.defaultEngine)}return l.prototype.render=function(D,P){u.render(this.name,D,P)},g.set("view",l),g.set("nunjucksEnv",u),u}},function(O,C,L){var h=L(4),b=L(4),u=L(0),g=u._prettifyError,l=L(5),k=L(7),D=k.Environment,P=L(24);function A(t,r){return Array.isArray(r)?r.some(function(f){return t.match(f)}):!1}function y(t,r){r=r||{},r.isString=!0;var f=r.env||new D([]),c=r.wrapper||P;if(!r.name)throw new Error('the "name" option is required when compiling a string');return c([e(t,r.name,f)],r)}function T(t,r){r=r||{};var f=r.env||new D([]),c=r.wrapper||P;if(r.isString)return y(t,r);var d=h.existsSync(t)&&h.statSync(t),n=[],i=[];function a(m){h.readdirSync(m).forEach(function(p){var S=b.join(m,p),R=S.substr(b.join(t,"/").length),I=h.statSync(S);I&&I.isDirectory()?(R+="/",A(R,r.exclude)||a(S)):A(R,r.include)&&i.push(S)})}if(d.isFile())n.push(e(h.readFileSync(t,"utf-8"),r.name||t,f));else if(d.isDirectory()){a(t);for(var o=0;o<i.length;o++){var s=i[o].replace(b.join(t,"/"),"");try{n.push(e(h.readFileSync(i[o],"utf-8"),s,f))}catch(m){if(r.force)console.error(m);else throw m}}}return c(n,r)}function e(t,r,f){f=f||new D([]);var c=f.asyncFilters,d=f.extensionsList,n;r=r.replace(/\\/g,"/");try{n=l.compile(t,c,d,r,f.opts)}catch(i){throw g(r,!1,i)}return{name:r,template:n}}O.exports={precompile:T,precompileString:y}},function(O,C,L){function h(b,u){var g="";u=u||{};for(var l=0;l<b.length;l++){var k=JSON.stringify(b[l].name),D=b[l].template;g+="(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["+k+`] = (function() {
31
- `+D+`
32
- })();
33
- `,u.asFunction&&(g+="return function(ctx, cb) { return nunjucks.render("+k+`, ctx, cb); }
34
- `),g+=`})();
35
- `}return g}O.exports=h},function(O,C,L){function h(){var b=this.runtime,u=this.lib,g=this.compiler.Compiler,l=this.parser.Parser,k=this.nodes,D=this.lexer,P=b.contextOrFrameLookup,A=b.memberLookup,y,T;g&&(y=g.prototype.assertType),l&&(T=l.prototype.parseAggregate);function e(){b.contextOrFrameLookup=P,b.memberLookup=A,g&&(g.prototype.assertType=y),l&&(l.prototype.parseAggregate=T)}b.contextOrFrameLookup=function(a,o,s){var m=P.apply(this,arguments);if(m!==void 0)return m;switch(s){case"True":return!0;case"False":return!1;case"None":return null;default:return}};function t(i){return{index:i.index,lineno:i.lineno,colno:i.colno}}if(k&&g&&l){var r=k.Node.extend("Slice",{fields:["start","stop","step"],init:function(a,o,s,m,p){s=s||new k.Literal(a,o,null),m=m||new k.Literal(a,o,null),p=p||new k.Literal(a,o,1),this.parent(a,o,s,m,p)}});g.prototype.assertType=function(a){a instanceof r||y.apply(this,arguments)},g.prototype.compileSlice=function(a,o){this._emit("("),this._compileExpression(a.start,o),this._emit("),("),this._compileExpression(a.stop,o),this._emit("),("),this._compileExpression(a.step,o),this._emit(")")},l.prototype.parseAggregate=function(){var a=this,o=t(this.tokens);o.colno--,o.index--;try{return T.apply(this)}catch(U){var s=t(this.tokens),m=function(){return u._assign(a.tokens,s),U};u._assign(this.tokens,o),this.peeked=!1;var p=this.peekToken();if(p.type!==D.TOKEN_LEFT_BRACKET)throw m();this.nextToken();for(var S=new r(p.lineno,p.colno),R=!1,I=0;I<=S.fields.length&&!this.skip(D.TOKEN_RIGHT_BRACKET);I++){if(I===S.fields.length)if(R)this.fail("parseSlice: too many slice components",p.lineno,p.colno);else break;if(this.skip(D.TOKEN_COLON))R=!0;else{var B=S.fields[I];S[B]=this.parseExpression(),R=this.skip(D.TOKEN_COLON)||R}}if(!R)throw m();return new k.Array(p.lineno,p.colno,[S])}}}function f(i,a,o,s){i=i||[],a===null&&(a=s<0?i.length-1:0),o===null?o=s<0?-1:i.length:o<0&&(o+=i.length),a<0&&(a+=i.length);for(var m=[],p=a;!(p<0||p>i.length||s>0&&p>=o||s<0&&p<=o);p+=s)m.push(b.memberLookup(i,p));return m}function c(i,a){return Object.prototype.hasOwnProperty.call(i,a)}var d={pop:function(a){if(a===void 0)return this.pop();if(a>=this.length||a<0)throw new Error("KeyError");return this.splice(a,1)},append:function(a){return this.push(a)},remove:function(a){for(var o=0;o<this.length;o++)if(this[o]===a)return this.splice(o,1);throw new Error("ValueError")},count:function(a){for(var o=0,s=0;s<this.length;s++)this[s]===a&&o++;return o},index:function(a){var o;if((o=this.indexOf(a))===-1)throw new Error("ValueError");return o},find:function(a){return this.indexOf(a)},insert:function(a,o){return this.splice(a,0,o)}},n={items:function(){return u._entries(this)},values:function(){return u._values(this)},keys:function(){return u.keys(this)},get:function(a,o){var s=this[a];return s===void 0&&(s=o),s},has_key:function(a){return c(this,a)},pop:function(a,o){var s=this[a];if(s===void 0&&o!==void 0)s=o;else{if(s===void 0)throw new Error("KeyError");delete this[a]}return s},popitem:function(){var a=u.keys(this);if(!a.length)throw new Error("KeyError");var o=a[0],s=this[o];return delete this[o],[o,s]},setdefault:function(a,o){return o===void 0&&(o=null),a in this||(this[a]=o),this[a]},update:function(a){return u._assign(this,a),null}};return n.iteritems=n.items,n.itervalues=n.values,n.iterkeys=n.keys,b.memberLookup=function(a,o,s){return arguments.length===4?f.apply(this,arguments):(a=a||{},u.isArray(a)&&c(d,o)?d[o].bind(a):u.isObject(a)&&c(n,o)?n[o].bind(a):A.apply(this,arguments))},e}O.exports=h}])})})(Tt);var In=Tt.exports;const Et=cn(In);var Rn=xe('<div class="flex justify-end"><!></div>'),Fn=xe('<div class="prompt-editor flex h-full flex-col"><div class="relative flex-1"><div class="h-full w-full"></div> <label class="absolute right-6 top-1 z-10 inline-flex cursor-pointer items-center gap-2 bg-transparent text-rc-gray-100 focus:outline-none focus:ring-0"><input type="checkbox" class="checkbox svelte-1br1z62"/> <span>Preview</span></label></div> <!></div>');function Bn(G,F){Ge(F,!0);let O=ge(null),C,L=!1,h=null,b=!1;ot(()=>{if(C)return kt(),Ot(()=>import("../chunks/DaRvw8c-.js").then(P=>P.e),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(P=>{P.editor.defineTheme("bosun-dark",Pn),J(O,P.editor.create(C,{value:"",language:"markdown",theme:"bosun-dark",fontSize:16,fontFamily:'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',automaticLayout:!0,minimap:{enabled:!1},wordBasedSuggestions:"off",wordWrap:"bounded",wordWrapColumn:75,wrappingStrategy:"advanced",matchBrackets:"never",bracketPairColorization:{enabled:!0},guides:{highlightActiveBracketPair:!1,bracketPairs:!1,bracketPairsHorizontal:!1},occurrencesHighlight:"off",selectionHighlight:!1,unicodeHighlight:{ambiguousCharacters:!1,nonBasicASCII:!1,invisibleCharacters:!1,includeStrings:!1,includeComments:!1},autoClosingQuotes:"never",padding:{top:32}}),!0),ct.agents.context.query({agentId:F.agentId}).then(T=>{An(P,T)}),h=Nn(P,w(O));const A=F.prompt??"";L=!0,w(O).setValue(A),L=!1,requestAnimationFrame(()=>{h==null||h.update()});const y=g(F.onPromptChanged,500);w(O).onDidChangeModelContent(()=>{if(w(O)&&(h==null||h.update(),!L))try{const T=w(O).getValue();if(T===F.prompt)return;y(T)}catch(T){console.error("Error updating prompt",T)}}),b=!0}).catch(P=>{console.error("Error initializing Monaco editor:",P)}),()=>{h==null||h.dispose(),w(O)&&(w(O).dispose(),J(O,null))}}),Me(()=>{if(!w(O)||!b)return;const P=w(O).getValue(),A=F.prompt??"";if(P!==A){L=!0;try{w(O).setValue(A),h==null||h.update()}finally{L=!1}}});let u;function g(P,A=300){return(...y)=>{clearTimeout(u),u=setTimeout(()=>{P(...y)},A)}}function l(P,A){return Et.configure({autoescape:!1,trimBlocks:!0,lstripBlocks:!0}),Et.renderString(P,A||{})}let k="";function D(P){w(O)&&(L=!0,P.currentTarget.checked?(k=w(O).getValue(),ct.agents.context.query({agentId:F.agentId}).then(A=>{const y=l(k,A||{});w(O)&&(w(O).setValue(y),w(O).updateOptions({readOnly:!0}))})):(k&&(w(O).setValue(k),k="",L=!1),w(O).updateOptions({readOnly:!1})))}lt(G,{get class(){return`relative overflow-hidden ${F.class??""}`},children:(P,A)=>{var y=Fn(),T=de(y),e=de(T);ft(e,d=>C=d,()=>C);var t=ve(e,2),r=de(t);r.__change=D,Ke(2),ce(t),ce(T);var f=ve(T,2);{var c=d=>{var n=Rn(),i=de(n);De(i,{variant:"secondary",size:"big",get onclick(){return F.onSchemaClick},class:"absolute bottom-2 right-6 h-12 !text-base !font-medium",children:(a,o)=>{Ke();var s=$e("Schema");he(a,s)},$$slots:{default:!0}}),ce(n),he(d,n)};Ce(f,d=>{F.showSchemaButton&&F.onSchemaClick&&d(c)})}ce(y),he(P,y)}}),ze()}Qe(["change"]);var Mn=xe('<div class="flex h-full flex-col"><div class="h-full w-full"></div></div>');function Kn(G,F){Ge(F,!0);let O=ge(null),C;Me(()=>{if(C)return kt(),Ot(()=>import("../chunks/DaRvw8c-.js").then(L=>L.e),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(L=>{w(O)?L.editor.setModelLanguage(w(O).getModel(),"typescript"):J(O,L.editor.create(C,{value:F.schema,language:"typescript",theme:"vs-dark",automaticLayout:!0,minimap:{enabled:!1},matchBrackets:"never",bracketPairColorization:{enabled:!1},guides:{highlightActiveBracketPair:!1,bracketPairs:!1,bracketPairsHorizontal:!1},occurrencesHighlight:"off",selectionHighlight:!1,unicodeHighlight:{ambiguousCharacters:!1,nonBasicASCII:!1,invisibleCharacters:!1,includeStrings:!1,includeComments:!1},autoClosingQuotes:"never"}),!0),w(O).onDidChangeModelContent(()=>{const h=w(O).getValue();h!==F.schema&&F.onChange(h)})}),()=>{w(O)&&w(O).dispose()}}),Me(()=>{w(O)&&w(O).setValue(F.schema)}),lt(G,{get class(){return`overflow-hidden ${F.class??""}`},children:(L,h)=>{var b=Mn(),u=de(b);ft(u,g=>C=g,()=>C),ce(b),he(L,b)}}),ze()}const Dn=globalThis.__sveltekit_13qrqhh.env;class jn{constructor(F){Oe(this,"ws",null);Oe(this,"openHandler",null);Oe(this,"closeHandler",null);Oe(this,"errorHandler",null);Oe(this,"messageHandler",null);Oe(this,"retries",0);Oe(this,"maxRetries",5);Oe(this,"retryDelay",500);Oe(this,"retryTimeout",null);Oe(this,"isOpen",!1);Oe(this,"isDestroyed",!1);Oe(this,"init",()=>{if(!this.isOpen){console.log(`Initializing websocket connection with [${this.wsUrl}]`);try{this.ws=new WebSocket(this.wsUrl)}catch{this.retryConnect();return}this.isDestroyed=!1,this.ws.onmessage=F=>{var C,L,h,b,u,g,l,k;const O=JSON.parse(F.data);O.channel==="error"?(C=this.errorHandler)==null||C.call(this,O.message):O.channel==="app-events"?console.log("MSG:",O.event.type):O.channel==="log"?console.log(`MSG: log [${O.message.severity}]`,O.message.message):O.channel==="api-call-trace"?console.log("MSG: api-call-trace",(L=O.trace)==null?void 0:L.operationName,(h=O.trace)==null?void 0:h.method,(b=O.trace)==null?void 0:b.path):O.channel==="conversational-trace"&&console.log("MSG: conversational-trace",(u=O.trace)==null?void 0:u.eventName,(g=O.trace)==null?void 0:g.role,(l=O.trace)==null?void 0:l.medium),(k=this.messageHandler)==null||k.call(this,O)},this.ws.onerror=F=>{var O;console.error("Websocket error:",F),(O=this.ws)==null||O.close(),this.retryConnect()},this.ws.onclose=()=>{console.log("Websocket closed"),this.isOpen=!1,this.retryConnect()},this.ws.onopen=()=>{var F;this.retries=0,this.isOpen=!0,this.retryTimeout&&clearTimeout(this.retryTimeout),(F=this.openHandler)==null||F.call(this),console.log("Websocket connected")}}});Oe(this,"destroy",()=>{var F;this.isDestroyed=!0,(F=this.ws)==null||F.close()});Oe(this,"onOpen",F=>{this.openHandler=F,this.isOpen&&F()});Oe(this,"onClose",F=>{this.closeHandler=F,this.isOpen||F()});Oe(this,"onError",F=>{this.errorHandler=F});Oe(this,"onMessage",F=>{this.messageHandler=F});Oe(this,"sendMessage",F=>{var O;F.channel,(O=this.ws)==null||O.send(JSON.stringify(F))});Oe(this,"retryConnect",()=>{var F,O;this.isDestroyed||(!this.isOpen&&this.retries<this.maxRetries?(this.retries++,this.init(),this.retryTimeout=setTimeout(this.retryConnect,this.retryDelay)):((F=this.errorHandler)==null||F.call(this,"WebSocket Error, please reload the browser"),(O=this.closeHandler)==null||O.call(this)))});this.wsUrl=F}}const Un=Dn.PUBLIC_WS_HOST??"ws://localhost:8080",Ve=new jn(Un);var $n=xe("<!> <!> <!>",1),Vn=xe('<span class="mr-2 font-semibold leading-5 text-rc-gray-500 hover:text-rc-gray-200">Chat version</span> <!>',1),Wn=(G,F,O)=>F(w(O).name),Hn=xe("<button><span> </span></button>"),Gn=xe("<!> <!>",1),zn=xe("<div>Select an agent on the left panel to start chatting</div>"),Yn=xe('<div class="flex h-screen"><!> <div class="flex h-full min-w-0 flex-1 flex-col bg-rc-gray-980 pb-3 pr-4 pt-2"><nav class="mb-3 flex h-14 flex-none items-center justify-between bg-rc-gray-980"><div class="flex items-center"><!></div> <div class="ml-auto flex items-baseline gap-2"><!> <!></div></nav> <div class="flex-1 overflow-hidden"><div><div></div> <div><!> <!></div> <!></div> <div><div class="text-rc-gray-100">Connecting...</div></div></div></div></div>');function mr(G,F){Ge(F,!0);const{onAgentSelect:O,onError:C}=Zt();let L=ge(We([])),h=ge(We([])),b=ge(null),u=ge(We([])),g=ge(null),l=ge(null),k=ge(null),D=ge(We({})),P=ge(!1),A=ge(null),y=ge(!1),T=null,e=ge(!1);function t(E,W){return W?W.get(E):typeof window>"u"?null:new URL(window.location.href).searchParams.get(E)}function r(E,W){if(console.log("setQueryParams",E,W),typeof window>"u")return;const j=new URL(window.location.href);W===null?j.searchParams.delete(E):j.searchParams.set(E,W),jt(j.toString(),{})}const f=ke(()=>t("agent",vt.url.searchParams));ot(()=>{Ve.onClose(()=>{J(P,!1)}),Ve.onMessage(E=>{var W,j,Q,Y,se,_e,ue;if(E.channel!=="chat")if(E.channel==="app-events"){if(E.event.type==="agents-loaded")J(P,!0),rt(),it();else if(E.event.type==="context-updated")J(l,E.event.context,!0),E.event.promptContext&&J(k,E.event.promptContext,!0);else if(E.event.type==="prompt-updated")J(g,E.event.prompt,!0),J(y,!!w(g),!0);else if(E.event.type==="delayed-actions-updated")J(D,E.event.actions,!0);else if(E.event.type==="update-states"){const be=w(u).length;J(u,E.event.states,!0),(!w(A)&&w(u).length>0||w(u).length>be)&&J(A,w(u)[w(u).length-1].id,!0)}else if(E.event.type==="agent-selected"){console.log("agent-selected, in roleplay"),r("agent",E.event.agent.id),J(h,E.event.agent.steps,!0);const be=w(h).find(Se=>Se.name===t("step"));J(b,be||w(h)[0],!0),d({type:"step-selected",step:(W=w(b))==null?void 0:W.name})}}else E.channel==="log"?an(E.message):E.channel==="step-trace"?Gt(E.trace):E.channel==="api-call-trace"?(console.log("[roleplay] api-call-trace received",(j=E.trace)==null?void 0:j.operationName,(Q=E.trace)==null?void 0:Q.method,(Y=E.trace)==null?void 0:Y.path,E.trace),zt(E.trace)):E.channel==="conversational-trace"?(console.log("[roleplay] conversational-trace received",(se=E.trace)==null?void 0:se.eventName,(_e=E.trace)==null?void 0:_e.role,(ue=E.trace)==null?void 0:ue.medium,E.trace),Yt(E.trace)):E.channel==="error"&&C(E.message)}),Ve.onError(C),Ve.init()}),Pt(()=>{Ve.destroy()}),Me(()=>{if(!w(P))return;const E=w(f),W=w(L);if(E){if(!W.length)return;if(!W.includes(E)){console.warn("Agent from URL not in agents list yet:",E);return}c(E)}else c(null)});function c(E){T!==E&&(rt(),it(),J(A,null),J(y,!1),J(h,[],!0),J(b,null),E&&d({type:"select-agent",agent:E}),T=E)}function d(E){Ve.sendMessage({channel:"app-events",event:E})}function n(E){console.log("Context changed",E),J(k,E,!0),d({type:"context-updated",context:E})}function i(E){d({type:"prompt-updated",prompt:E})}function a(E){O(E)}function o(E){w(f)&&(J(A,E,!0),rt(),it(),d({type:"select-agent",agent:w(f),state:w(A)}))}function s(){w(f)&&(rt(),it(),J(A,null),d({type:"select-agent",agent:w(f),state:w(A)}))}function m(E){J(b,w(h).find(W=>W.name===E)||null,!0),w(b)?r("step",w(b).name):r("step",null),d({type:"step-selected",step:E})}const p=ke(()=>{var E;return((E=w(b))==null?void 0:E.schema)??null}),S=ke(()=>{var E,W;return!!((E=w(b))!=null&&E.schema)&&((W=w(b))==null?void 0:W.schema.trim().length)>0}),R=ke(()=>({sidebar:{width:"flex-[1] min-w-[140px] max-w-xs shrink-0",visibility:"visible"},promptColumn:{width:w(y)?"flex-[3] min-w-0":"hidden",visibility:w(y)?"flex":"hidden"},promptEditor:{width:"w-full h-full min-w-0",visibility:w(y)?"visible":"hidden"},schemaEditor:{width:"w-full h-full min-w-0",visibility:w(S)?"visible":"hidden"},chat:{width:w(y)?"flex-[2] min-w-0":"flex-[4] min-w-0",visibility:"visible"},contextEditor:{width:"flex-[2] min-w-0 max-w-xl",visibility:"visible"}}));function I(){w(p)&&J(e,!0)}function B(E){return encodeURIComponent(E)}function U({value:E}){var Q;if(E==="roleplay")return;const W=t("agent",vt.url.searchParams),j=((Q=w(b))==null?void 0:Q.name)??t("step");if(E==="tests"){if(W){const Y=`/tests/${B(W)}`,se=j?`${Y}?step=${B(j)}`:Y;nt(se)}else{const Y=j?`/tests?step=${B(j)}`:"/tests";nt(Y)}return}if(E==="traces"){nt("/traces");return}nt("/"+E)}ot(async()=>{J(L,await ct.agents.list.query(),!0)});var _=Yn();It(E=>{Rt.title="Bosun: Playground"});var v=de(_);{let E=ke(()=>w(f)||"");qt(v,{className:"flex-none w-16",get agents(){return w(L)},get currentAgent(){return w(E)},onSelect:a})}var N=ve(v,2),$=de(N),V=de($),te=de(V);{let E=ke(()=>vt.url.pathname.replace(/^\//,""));Xt(te,{get value(){return w(E)},ariaLabel:"Top tabs",onChange:U,children:(W,j)=>{var Q=$n(),Y=Pe(Q);gt(Y,{value:"roleplay",class:"px-3",children:(ue,be)=>{Ke();var Se=$e("Roleplay");he(ue,Se)},$$slots:{default:!0}});var se=ve(Y,2);gt(se,{value:"tests",class:"px-3",children:(ue,be)=>{Ke();var Se=$e("Tests");he(ue,Se)},$$slots:{default:!0}});var _e=ve(se,2);gt(_e,{value:"traces",class:"px-3",children:(ue,be)=>{Ke();var Se=$e("Traces");he(ue,Se)},$$slots:{default:!0}}),he(W,Q)},$$slots:{default:!0}})}ce(V);var ae=ve(V,2),oe=de(ae);{var K=E=>{var W=Vn(),j=ve(Pe(W),2);sn(j,{get agentStates(){return w(u)},get currentState(){return w(A)},onSelectState:o,class:"mr-4 self-baseline"}),he(E,W)};Ce(oe,E=>{w(u).length>1&&E(K)})}var ie=ve(oe,2);De(ie,{onclick:s,class:"self-baseline text-lg font-bold",children:(E,W)=>{Ke();var j=$e("New chat");he(E,j)},$$slots:{default:!0}}),ce(ae),ce($);var q=ve($,2),X=de(q),H=de(X);Ze(H,21,()=>w(h),at,(E,W)=>{var j=Hn();j.__click=[Wn,m,W];var Q=de(j),Y=de(Q,!0);ce(Q),ce(j),Ne(()=>{var se;Be(j,1,`my-1 ml-2 mr-0 rounded-lg px-3 py-2 text-left hover:bg-rc-gray-700 ${w(W).name===((se=w(b))==null?void 0:se.name)?"bg-rc-gray-600":"bg-transparent"}`),Ie(Y,w(W).name)}),he(E,j)}),ce(H);var ee=ve(H,2),Z=de(ee);{var le=E=>{var W=st(),j=Pe(W);Ft(j,()=>w(b).name,Q=>{var Y=st(),se=Pe(Y);{var _e=ue=>{{let be=ke(()=>w(g)??"");Bn(ue,{get class(){return`${w(R).promptEditor.width??""} border-thin border-rc-gray-650 bg-rc-gray-800 shadow-inner-white-soft backdrop-blur-3xl focus:outline-none focus:ring-0`},get prompt(){return w(be)},get agentId(){return w(f)},onPromptChanged:i,get showSchemaButton(){return w(S)},onSchemaClick:I})}};Ce(se,ue=>{w(f)&&ue(_e)})}he(Q,Y)}),he(E,W)};Ce(Z,E=>{w(b)&&w(y)&&E(le)})}var Ee=ve(Z,2);{var ye=E=>{Bt(E,{title:"Schema",class:"!w-[80vw] !max-w-5xl",get open(){return w(e)},set open(j){J(e,j,!0)},children:j=>{Kn(j,{class:"h-[70vh] min-w-0",get schema(){return w(p)},onChange:console.log})},$$slots:{default:!0}})};Ce(Ee,E=>{w(p)&&E(ye)})}ce(ee);var Ae=ve(ee,2);{var x=E=>{var W=Gn(),j=Pe(W);Sn(j,{get class(){return`h-full min-w-0 border-thin border-rc-gray-650 shadow-inner-white-soft backdrop-blur-3xl ${w(R).chat.width??""}`},get context(){return w(l)},get agentId(){return w(f)},onmessage:Y=>Ve.sendMessage({channel:"chat",message:Y})});var Q=ve(j,2);Jt(Q,{get class(){return`h-full ${w(R).contextEditor.width??""} min-h-0 min-w-0 border-thin border-rc-gray-650 shadow-inner-white-soft backdrop-blur-3xl focus:outline-none focus:ring-0`},get context(){return w(l)},onContextChanged:n}),he(E,W)},M=E=>{var W=zn();Ne(()=>Be(W,1,`h-full ${w(R).chat.width??""} flex items-start justify-center pt-40 text-rc-gray-200`)),he(E,W)};Ce(Ae,E=>{w(f)?E(x):E(M,!1)})}ce(X);var z=ve(X,2);ce(q),ce(N),ce(_),Ne(()=>{Be(X,1,`${w(P)?"flex":"hidden"} h-full w-full gap-x-2 focus:outline-none focus:ring-0`),Be(H,1,`flex h-full ${w(R).sidebar.width??""} flex-col text-rc-gray-200`),Be(ee,1,`${w(R).promptColumn.visibility??""} ${w(R).promptColumn.width??""} flex h-full flex-col`),Be(z,1,`${w(P)?"hidden":"flex"} h-full items-center justify-center`)}),he(G,_),ze()}Qe(["click"]);export{mr as component};