context-lens 0.4.3 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. package/README.md +22 -0
  2. package/dist/analysis/ingest.d.ts.map +1 -1
  3. package/dist/analysis/ingest.js +1 -1
  4. package/dist/analysis/ingest.js.map +1 -1
  5. package/dist/cli-utils.d.ts.map +1 -1
  6. package/dist/cli-utils.js +6 -0
  7. package/dist/cli-utils.js.map +1 -1
  8. package/dist/core/conversation.d.ts +1 -1
  9. package/dist/core/conversation.d.ts.map +1 -1
  10. package/dist/core/conversation.js +10 -1
  11. package/dist/core/conversation.js.map +1 -1
  12. package/dist/core/parse.d.ts.map +1 -1
  13. package/dist/core/parse.js +3 -1
  14. package/dist/core/parse.js.map +1 -1
  15. package/dist/core/routing.d.ts.map +1 -1
  16. package/dist/core/routing.js +22 -0
  17. package/dist/core/routing.js.map +1 -1
  18. package/dist/proxy/capture.d.ts +1 -0
  19. package/dist/proxy/capture.d.ts.map +1 -1
  20. package/dist/proxy/capture.js.map +1 -1
  21. package/dist/proxy/config.d.ts.map +1 -1
  22. package/dist/proxy/config.js +2 -0
  23. package/dist/proxy/config.js.map +1 -1
  24. package/dist/proxy/routing.d.ts +2 -1
  25. package/dist/proxy/routing.d.ts.map +1 -1
  26. package/dist/proxy/routing.js +19 -0
  27. package/dist/proxy/routing.js.map +1 -1
  28. package/dist/proxy/server.js +3 -0
  29. package/dist/proxy/server.js.map +1 -1
  30. package/dist/schemas.d.ts +2 -0
  31. package/dist/schemas.d.ts.map +1 -1
  32. package/dist/schemas.js +1 -0
  33. package/dist/schemas.js.map +1 -1
  34. package/dist/server/store.d.ts +2 -1
  35. package/dist/server/store.d.ts.map +1 -1
  36. package/dist/server/store.js +75 -28
  37. package/dist/server/store.js.map +1 -1
  38. package/dist/types.d.ts +2 -1
  39. package/dist/types.d.ts.map +1 -1
  40. package/dist/version.generated.d.ts +1 -1
  41. package/dist/version.generated.js +1 -1
  42. package/mitm_addon.py +6 -0
  43. package/package.json +1 -1
  44. package/ui/dist/assets/core-IjjuPsJe.js +12 -0
  45. package/ui/dist/assets/cpp-BRuaLJcg.js +1 -0
  46. package/ui/dist/assets/engine-oniguruma-KVl37NQr.js +1 -0
  47. package/ui/dist/assets/{index-ndnQ4AES.css → index-D1eb5Vsp.css} +1 -1
  48. package/ui/dist/assets/index-JtXLWNzT.js +35 -0
  49. package/ui/dist/assets/ruby-CkRbH_-r.js +1 -0
  50. package/ui/dist/index.html +2 -2
  51. package/ui/dist/assets/abap-BdImnpbu.js +0 -1
  52. package/ui/dist/assets/actionscript-3-CoDkCxhg.js +0 -1
  53. package/ui/dist/assets/ada-bCR0ucgS.js +0 -1
  54. package/ui/dist/assets/andromeeda-C4gqWexZ.js +0 -1
  55. package/ui/dist/assets/angular-html-CU67Zn6k.js +0 -1
  56. package/ui/dist/assets/angular-ts-BwZT4LLn.js +0 -1
  57. package/ui/dist/assets/apache-Pmp26Uib.js +0 -1
  58. package/ui/dist/assets/apex-D8_7TLub.js +0 -1
  59. package/ui/dist/assets/apl-dKokRX4l.js +0 -1
  60. package/ui/dist/assets/applescript-Co6uUVPk.js +0 -1
  61. package/ui/dist/assets/ara-BRHolxvo.js +0 -1
  62. package/ui/dist/assets/asciidoc-Dv7Oe6Be.js +0 -1
  63. package/ui/dist/assets/asm-D_Q5rh1f.js +0 -1
  64. package/ui/dist/assets/astro-CbQHKStN.js +0 -1
  65. package/ui/dist/assets/aurora-x-D-2ljcwZ.js +0 -1
  66. package/ui/dist/assets/awk-DMzUqQB5.js +0 -1
  67. package/ui/dist/assets/ayu-dark-CMjwMIkn.js +0 -1
  68. package/ui/dist/assets/ayu-light-C47S-Tmv.js +0 -1
  69. package/ui/dist/assets/ayu-mirage-CjoLj4QM.js +0 -1
  70. package/ui/dist/assets/ballerina-BFfxhgS-.js +0 -1
  71. package/ui/dist/assets/bat-BkioyH1T.js +0 -1
  72. package/ui/dist/assets/beancount-k_qm7-4y.js +0 -1
  73. package/ui/dist/assets/berry-uYugtg8r.js +0 -1
  74. package/ui/dist/assets/bibtex-CHM0blh-.js +0 -1
  75. package/ui/dist/assets/bicep-Bmn6On1c.js +0 -1
  76. package/ui/dist/assets/blade-D4QpJJKB.js +0 -1
  77. package/ui/dist/assets/bsl-BO_Y6i37.js +0 -1
  78. package/ui/dist/assets/c3-VCDPK7BO.js +0 -1
  79. package/ui/dist/assets/cadence-Bv_4Rxtq.js +0 -1
  80. package/ui/dist/assets/cairo-KRGpt6FW.js +0 -1
  81. package/ui/dist/assets/catppuccin-frappe-DFWUc33u.js +0 -1
  82. package/ui/dist/assets/catppuccin-latte-C9dUb6Cb.js +0 -1
  83. package/ui/dist/assets/catppuccin-macchiato-DQyhUUbL.js +0 -1
  84. package/ui/dist/assets/catppuccin-mocha-D87Tk5Gz.js +0 -1
  85. package/ui/dist/assets/clarity-D53aC0YG.js +0 -1
  86. package/ui/dist/assets/clojure-P80f7IUj.js +0 -1
  87. package/ui/dist/assets/cmake-D1j8_8rp.js +0 -1
  88. package/ui/dist/assets/cobol-nwyudZeR.js +0 -1
  89. package/ui/dist/assets/codeowners-Bp6g37R7.js +0 -1
  90. package/ui/dist/assets/codeql-DsOJ9woJ.js +0 -1
  91. package/ui/dist/assets/coffee-Ch7k5sss.js +0 -1
  92. package/ui/dist/assets/common-lisp-Cg-RD9OK.js +0 -1
  93. package/ui/dist/assets/coq-DkFqJrB1.js +0 -1
  94. package/ui/dist/assets/cpp-CofmeUqb.js +0 -1
  95. package/ui/dist/assets/crystal-tKQVLTB8.js +0 -1
  96. package/ui/dist/assets/csharp-COcwbKMJ.js +0 -1
  97. package/ui/dist/assets/csv-fuZLfV_i.js +0 -1
  98. package/ui/dist/assets/cue-D82EKSYY.js +0 -1
  99. package/ui/dist/assets/cypher-COkxafJQ.js +0 -1
  100. package/ui/dist/assets/d-85-TOEBH.js +0 -1
  101. package/ui/dist/assets/dark-plus-C3mMm8J8.js +0 -1
  102. package/ui/dist/assets/dart-CF10PKvl.js +0 -1
  103. package/ui/dist/assets/dax-CEL-wOlO.js +0 -1
  104. package/ui/dist/assets/desktop-BmXAJ9_W.js +0 -1
  105. package/ui/dist/assets/dotenv-Da5cRb03.js +0 -1
  106. package/ui/dist/assets/dracula-BzJJZx-M.js +0 -1
  107. package/ui/dist/assets/dracula-soft-BXkSAIEj.js +0 -1
  108. package/ui/dist/assets/dream-maker-BtqSS_iP.js +0 -1
  109. package/ui/dist/assets/edge-BkV0erSs.js +0 -1
  110. package/ui/dist/assets/elixir-CDX3lj18.js +0 -1
  111. package/ui/dist/assets/elm-DbKCFpqz.js +0 -1
  112. package/ui/dist/assets/emacs-lisp-C9XAeP06.js +0 -1
  113. package/ui/dist/assets/erb-CgJxNhIT.js +0 -1
  114. package/ui/dist/assets/erlang-DsQrWhSR.js +0 -1
  115. package/ui/dist/assets/everforest-dark-BgDCqdQA.js +0 -1
  116. package/ui/dist/assets/everforest-light-C8M2exoo.js +0 -1
  117. package/ui/dist/assets/fennel-BYunw83y.js +0 -1
  118. package/ui/dist/assets/fish-BvzEVeQv.js +0 -1
  119. package/ui/dist/assets/fluent-C4IJs8-o.js +0 -1
  120. package/ui/dist/assets/fortran-fixed-form-CkoXwp7k.js +0 -1
  121. package/ui/dist/assets/fortran-free-form-BxgE0vQu.js +0 -1
  122. package/ui/dist/assets/fsharp-CXgrBDvD.js +0 -1
  123. package/ui/dist/assets/gdresource-BOOCDP_w.js +0 -1
  124. package/ui/dist/assets/gdscript-C5YyOfLZ.js +0 -1
  125. package/ui/dist/assets/gdshader-DkwncUOv.js +0 -1
  126. package/ui/dist/assets/genie-D0YGMca9.js +0 -1
  127. package/ui/dist/assets/gherkin-DyxjwDmM.js +0 -1
  128. package/ui/dist/assets/git-commit-F4YmCXRG.js +0 -1
  129. package/ui/dist/assets/git-rebase-r7XF79zn.js +0 -1
  130. package/ui/dist/assets/github-dark-default-Cuk6v7N8.js +0 -1
  131. package/ui/dist/assets/github-dark-dimmed-DH5Ifo-i.js +0 -1
  132. package/ui/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +0 -1
  133. package/ui/dist/assets/github-light-DAi9KRSo.js +0 -1
  134. package/ui/dist/assets/github-light-default-D7oLnXFd.js +0 -1
  135. package/ui/dist/assets/github-light-high-contrast-BfjtVDDH.js +0 -1
  136. package/ui/dist/assets/gleam-BspZqrRM.js +0 -1
  137. package/ui/dist/assets/glimmer-js-Rg0-pVw9.js +0 -1
  138. package/ui/dist/assets/glimmer-ts-U6CK756n.js +0 -1
  139. package/ui/dist/assets/glsl-DplSGwfg.js +0 -1
  140. package/ui/dist/assets/gn-n2N0HUVH.js +0 -1
  141. package/ui/dist/assets/gnuplot-DdkO51Og.js +0 -1
  142. package/ui/dist/assets/groovy-gcz8RCvz.js +0 -1
  143. package/ui/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +0 -1
  144. package/ui/dist/assets/gruvbox-dark-medium-GsRaNv29.js +0 -1
  145. package/ui/dist/assets/gruvbox-dark-soft-CVdnzihN.js +0 -1
  146. package/ui/dist/assets/gruvbox-light-hard-CH1njM8p.js +0 -1
  147. package/ui/dist/assets/gruvbox-light-medium-DRw_LuNl.js +0 -1
  148. package/ui/dist/assets/gruvbox-light-soft-hJgmCMqR.js +0 -1
  149. package/ui/dist/assets/hack-CaT9iCJl.js +0 -1
  150. package/ui/dist/assets/haml-B8DHNrY2.js +0 -1
  151. package/ui/dist/assets/handlebars-BL8al0AC.js +0 -1
  152. package/ui/dist/assets/haskell-Df6bDoY_.js +0 -1
  153. package/ui/dist/assets/haxe-CzTSHFRz.js +0 -1
  154. package/ui/dist/assets/hcl-BWvSN4gD.js +0 -1
  155. package/ui/dist/assets/hjson-D5-asLiD.js +0 -1
  156. package/ui/dist/assets/hlsl-D3lLCCz7.js +0 -1
  157. package/ui/dist/assets/horizon-BUw7H-hv.js +0 -1
  158. package/ui/dist/assets/houston-DnULxvSX.js +0 -1
  159. package/ui/dist/assets/html-derivative-BFtXZ54Q.js +0 -1
  160. package/ui/dist/assets/http-jrhK8wxY.js +0 -1
  161. package/ui/dist/assets/hurl-irOxFIW8.js +0 -1
  162. package/ui/dist/assets/hxml-Bvhsp5Yf.js +0 -1
  163. package/ui/dist/assets/hy-DFXneXwc.js +0 -1
  164. package/ui/dist/assets/imba-DGztddWO.js +0 -1
  165. package/ui/dist/assets/index-BEayMkoF.js +0 -34
  166. package/ui/dist/assets/index-BxdAuPdU.js +0 -153
  167. package/ui/dist/assets/ini-BEwlwnbL.js +0 -1
  168. package/ui/dist/assets/jinja-4LBKfQ-Z.js +0 -1
  169. package/ui/dist/assets/jison-wvAkD_A8.js +0 -1
  170. package/ui/dist/assets/json5-C9tS-k6U.js +0 -1
  171. package/ui/dist/assets/jsonl-DcaNXYhu.js +0 -1
  172. package/ui/dist/assets/jsonnet-DFQXde-d.js +0 -1
  173. package/ui/dist/assets/jssm-C2t-YnRu.js +0 -1
  174. package/ui/dist/assets/julia-CxzCAyBv.js +0 -1
  175. package/ui/dist/assets/kanagawa-dragon-CkXjmgJE.js +0 -1
  176. package/ui/dist/assets/kanagawa-lotus-CfQXZHmo.js +0 -1
  177. package/ui/dist/assets/kanagawa-wave-DWedfzmr.js +0 -1
  178. package/ui/dist/assets/kdl-DV7GczEv.js +0 -1
  179. package/ui/dist/assets/kusto-DZf3V79B.js +0 -1
  180. package/ui/dist/assets/laserwave-DUszq2jm.js +0 -1
  181. package/ui/dist/assets/latex-DGMBWnxU.js +0 -1
  182. package/ui/dist/assets/lean-BZvkOJ9d.js +0 -1
  183. package/ui/dist/assets/less-B1dDrJ26.js +0 -1
  184. package/ui/dist/assets/light-plus-B7mTdjB0.js +0 -1
  185. package/ui/dist/assets/liquid-DYVedYrR.js +0 -1
  186. package/ui/dist/assets/llvm-BtvRca6l.js +0 -1
  187. package/ui/dist/assets/log-2UxHyX5q.js +0 -1
  188. package/ui/dist/assets/logo-BtOb2qkB.js +0 -1
  189. package/ui/dist/assets/lua-BaeVxFsk.js +0 -1
  190. package/ui/dist/assets/luau-C-HG3fhB.js +0 -1
  191. package/ui/dist/assets/make-CHLpvVh8.js +0 -1
  192. package/ui/dist/assets/marko-DZsq8hO1.js +0 -1
  193. package/ui/dist/assets/material-theme-D5KoaKCx.js +0 -1
  194. package/ui/dist/assets/material-theme-darker-BfHTSMKl.js +0 -1
  195. package/ui/dist/assets/material-theme-lighter-B0m2ddpp.js +0 -1
  196. package/ui/dist/assets/material-theme-ocean-CyktbL80.js +0 -1
  197. package/ui/dist/assets/material-theme-palenight-Csfq5Kiy.js +0 -1
  198. package/ui/dist/assets/matlab-D7o27uSR.js +0 -1
  199. package/ui/dist/assets/mdc-DUICxH0z.js +0 -1
  200. package/ui/dist/assets/mdx-Cmh6b_Ma.js +0 -1
  201. package/ui/dist/assets/mermaid-mWjccvbQ.js +0 -1
  202. package/ui/dist/assets/min-dark-CafNBF8u.js +0 -1
  203. package/ui/dist/assets/min-light-CTRr51gU.js +0 -1
  204. package/ui/dist/assets/mipsasm-CKIfxQSi.js +0 -1
  205. package/ui/dist/assets/mojo-B93PlW-d.js +0 -1
  206. package/ui/dist/assets/monokai-D4h5O-jR.js +0 -1
  207. package/ui/dist/assets/moonbit-Ba13S78F.js +0 -1
  208. package/ui/dist/assets/move-IF9eRakj.js +0 -1
  209. package/ui/dist/assets/narrat-DRg8JJMk.js +0 -1
  210. package/ui/dist/assets/nextflow-BrzmwbiE.js +0 -1
  211. package/ui/dist/assets/nginx-BpAMiNFr.js +0 -1
  212. package/ui/dist/assets/night-owl-C39BiMTA.js +0 -1
  213. package/ui/dist/assets/night-owl-light-CMTm3GFP.js +0 -1
  214. package/ui/dist/assets/nim-CVrawwO9.js +0 -1
  215. package/ui/dist/assets/nix-CwoSXNpI.js +0 -1
  216. package/ui/dist/assets/nord-Ddv68eIx.js +0 -1
  217. package/ui/dist/assets/nushell-C-sUppwS.js +0 -1
  218. package/ui/dist/assets/objective-c-DXmwc3jG.js +0 -1
  219. package/ui/dist/assets/objective-cpp-CLxacb5B.js +0 -1
  220. package/ui/dist/assets/ocaml-C0hk2d4L.js +0 -1
  221. package/ui/dist/assets/odin-BBf5iR-q.js +0 -1
  222. package/ui/dist/assets/one-dark-pro-DVMEJ2y_.js +0 -1
  223. package/ui/dist/assets/one-light-C3Wv6jpd.js +0 -1
  224. package/ui/dist/assets/openscad-C4EeE6gA.js +0 -1
  225. package/ui/dist/assets/pascal-D93ZcfNL.js +0 -1
  226. package/ui/dist/assets/perl-C0TMdlhV.js +0 -1
  227. package/ui/dist/assets/pkl-u5AG7uiY.js +0 -1
  228. package/ui/dist/assets/plastic-3e1v2bzS.js +0 -1
  229. package/ui/dist/assets/plsql-ChMvpjG-.js +0 -1
  230. package/ui/dist/assets/po-BTJTHyun.js +0 -1
  231. package/ui/dist/assets/poimandres-CS3Unz2-.js +0 -1
  232. package/ui/dist/assets/polar-C0HS_06l.js +0 -1
  233. package/ui/dist/assets/postcss-CXtECtnM.js +0 -1
  234. package/ui/dist/assets/powerquery-CEu0bR-o.js +0 -1
  235. package/ui/dist/assets/powershell-Dpen1YoG.js +0 -1
  236. package/ui/dist/assets/prisma-Dd19v3D-.js +0 -1
  237. package/ui/dist/assets/prolog-CbFg5uaA.js +0 -1
  238. package/ui/dist/assets/proto-C7zT0LnQ.js +0 -1
  239. package/ui/dist/assets/pug-CGlum2m_.js +0 -1
  240. package/ui/dist/assets/puppet-BMWR74SV.js +0 -1
  241. package/ui/dist/assets/purescript-CklMAg4u.js +0 -1
  242. package/ui/dist/assets/qml-3beO22l8.js +0 -1
  243. package/ui/dist/assets/qmldir-C8lEn-DE.js +0 -1
  244. package/ui/dist/assets/qss-IeuSbFQv.js +0 -1
  245. package/ui/dist/assets/r-Dspwwk_N.js +0 -1
  246. package/ui/dist/assets/racket-BqYA7rlc.js +0 -1
  247. package/ui/dist/assets/raku-DXvB9xmW.js +0 -1
  248. package/ui/dist/assets/razor-Uh8Bk_45.js +0 -1
  249. package/ui/dist/assets/red-bN70gL4F.js +0 -1
  250. package/ui/dist/assets/reg-C-SQnVFl.js +0 -1
  251. package/ui/dist/assets/regexp-CDVJQ6XC.js +0 -1
  252. package/ui/dist/assets/rel-C3B-1QV4.js +0 -1
  253. package/ui/dist/assets/riscv-BM1_JUlF.js +0 -1
  254. package/ui/dist/assets/ron-BhRPY-oY.js +0 -1
  255. package/ui/dist/assets/rose-pine-dawn-DHQR4-dF.js +0 -1
  256. package/ui/dist/assets/rose-pine-moon-D4_iv3hh.js +0 -1
  257. package/ui/dist/assets/rose-pine-qdsjHGoJ.js +0 -1
  258. package/ui/dist/assets/rosmsg-BJDFO7_C.js +0 -1
  259. package/ui/dist/assets/rst-D5oM4XIm.js +0 -1
  260. package/ui/dist/assets/ruby-Cw6WdidG.js +0 -1
  261. package/ui/dist/assets/sas-cz2c8ADy.js +0 -1
  262. package/ui/dist/assets/sass-Cj5Yp3dK.js +0 -1
  263. package/ui/dist/assets/scala-C151Ov-r.js +0 -1
  264. package/ui/dist/assets/scheme-C98Dy4si.js +0 -1
  265. package/ui/dist/assets/scss-OYdSNvt2.js +0 -1
  266. package/ui/dist/assets/sdbl-DVxCFoDh.js +0 -1
  267. package/ui/dist/assets/shaderlab-Dg9Lc6iA.js +0 -1
  268. package/ui/dist/assets/shellsession-BADoaaVG.js +0 -1
  269. package/ui/dist/assets/slack-dark-BthQWCQV.js +0 -1
  270. package/ui/dist/assets/slack-ochin-DqwNpetd.js +0 -1
  271. package/ui/dist/assets/smalltalk-BERRCDM3.js +0 -1
  272. package/ui/dist/assets/snazzy-light-Bw305WKR.js +0 -1
  273. package/ui/dist/assets/solarized-dark-DXbdFlpD.js +0 -1
  274. package/ui/dist/assets/solarized-light-L9t79GZl.js +0 -1
  275. package/ui/dist/assets/solidity-rGO070M0.js +0 -1
  276. package/ui/dist/assets/soy-Brmx7dQM.js +0 -1
  277. package/ui/dist/assets/sparql-rVzFXLq3.js +0 -1
  278. package/ui/dist/assets/splunk-BtCnVYZw.js +0 -1
  279. package/ui/dist/assets/ssh-config-_ykCGR6B.js +0 -1
  280. package/ui/dist/assets/stata-BH5u7GGu.js +0 -1
  281. package/ui/dist/assets/stylus-BEDo0Tqx.js +0 -1
  282. package/ui/dist/assets/surrealql-Bq5Q-fJD.js +0 -1
  283. package/ui/dist/assets/svelte-zxCyuUbr.js +0 -1
  284. package/ui/dist/assets/synthwave-84-CbfX1IO0.js +0 -1
  285. package/ui/dist/assets/system-verilog-CnnmHF94.js +0 -1
  286. package/ui/dist/assets/systemd-4A_iFExJ.js +0 -1
  287. package/ui/dist/assets/talonscript-CkByrt1z.js +0 -1
  288. package/ui/dist/assets/tasl-QIJgUcNo.js +0 -1
  289. package/ui/dist/assets/tcl-dwOrl1Do.js +0 -1
  290. package/ui/dist/assets/templ-P3uqSqPl.js +0 -1
  291. package/ui/dist/assets/terraform-BETggiCN.js +0 -1
  292. package/ui/dist/assets/tex-CvyZ59Mk.js +0 -1
  293. package/ui/dist/assets/tokyo-night-hegEt444.js +0 -1
  294. package/ui/dist/assets/ts-tags-zn1MmPIZ.js +0 -1
  295. package/ui/dist/assets/tsv-B_m7g4N7.js +0 -1
  296. package/ui/dist/assets/turtle-BsS91CYL.js +0 -1
  297. package/ui/dist/assets/twig-ChbOoGGc.js +0 -1
  298. package/ui/dist/assets/typespec-BGHnOYBU.js +0 -1
  299. package/ui/dist/assets/typst-DHCkPAjA.js +0 -1
  300. package/ui/dist/assets/v-BcVCzyr7.js +0 -1
  301. package/ui/dist/assets/vala-CsfeWuGM.js +0 -1
  302. package/ui/dist/assets/vb-D17OF-Vu.js +0 -1
  303. package/ui/dist/assets/verilog-BQ8w6xss.js +0 -1
  304. package/ui/dist/assets/vesper-DU1UobuO.js +0 -1
  305. package/ui/dist/assets/vhdl-CeAyd5Ju.js +0 -1
  306. package/ui/dist/assets/viml-CJc9bBzg.js +0 -1
  307. package/ui/dist/assets/vitesse-black-Bkuqu6BP.js +0 -1
  308. package/ui/dist/assets/vitesse-dark-D0r3Knsf.js +0 -1
  309. package/ui/dist/assets/vitesse-light-CVO1_9PV.js +0 -1
  310. package/ui/dist/assets/vue-DN_0RTcg.js +0 -1
  311. package/ui/dist/assets/vue-html-AaS7Mt5G.js +0 -1
  312. package/ui/dist/assets/vue-vine-CQOfvN7w.js +0 -1
  313. package/ui/dist/assets/vyper-CDx5xZoG.js +0 -1
  314. package/ui/dist/assets/wasm-MzD3tlZU.js +0 -1
  315. package/ui/dist/assets/wenyan-BV7otONQ.js +0 -1
  316. package/ui/dist/assets/wgsl-Dx-B1_4e.js +0 -1
  317. package/ui/dist/assets/wikitext-BhOHFoWU.js +0 -1
  318. package/ui/dist/assets/wit-5i3qLPDT.js +0 -1
  319. package/ui/dist/assets/wolfram-lXgVvXCa.js +0 -1
  320. package/ui/dist/assets/xsl-CtQFsRM5.js +0 -1
  321. package/ui/dist/assets/zenscript-DVFEvuxE.js +0 -1
  322. package/ui/dist/assets/zig-VOosw3JB.js +0 -1
  323. /package/ui/dist/assets/{docker-BcOcwvcX.js → dockerfile-BcOcwvcX.js} +0 -0
@@ -1,34 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();/**
2
- * @vue/shared v3.5.28
3
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
- * @license MIT
5
- **/function vi(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const je={},Ln=[],Nt=()=>{},cl=()=>!1,eo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),mi=e=>e.startsWith("onUpdate:"),Ze=Object.assign,gi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},cc=Object.prototype.hasOwnProperty,Fe=(e,t)=>cc.call(e,t),Ee=Array.isArray,On=e=>Ss(e)==="[object Map]",ul=e=>Ss(e)==="[object Set]",Vi=e=>Ss(e)==="[object Date]",Pe=e=>typeof e=="function",We=e=>typeof e=="string",Et=e=>typeof e=="symbol",ze=e=>e!==null&&typeof e=="object",dl=e=>(ze(e)||Pe(e))&&Pe(e.then)&&Pe(e.catch),fl=Object.prototype.toString,Ss=e=>fl.call(e),uc=e=>Ss(e).slice(8,-1),pl=e=>Ss(e)==="[object Object]",to=e=>We(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Zn=vi(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),no=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},dc=/-\w/g,kt=no(e=>e.replace(dc,t=>t.slice(1).toUpperCase())),fc=/\B([A-Z])/g,mn=no(e=>e.replace(fc,"-$1").toLowerCase()),so=no(e=>e.charAt(0).toUpperCase()+e.slice(1)),$o=no(e=>e?`on${so(e)}`:""),un=(e,t)=>!Object.is(e,t),So=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},hl=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},pc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},hc=e=>{const t=We(e)?Number(e):NaN;return isNaN(t)?e:t};let Ui;const oo=()=>Ui||(Ui=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Me(e){if(Ee(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],o=We(s)?yc(s):Me(s);if(o)for(const i in o)t[i]=o[i]}return t}else if(We(e)||ze(e))return e}const vc=/;(?![^(]*\))/g,mc=/:([^]+)/,gc=/\/\*[^]*?\*\//g;function yc(e){const t={};return e.replace(gc,"").split(vc).forEach(n=>{if(n){const s=n.split(mc);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function he(e){let t="";if(We(e))t=e;else if(Ee(e))for(let n=0;n<e.length;n++){const s=he(e[n]);s&&(t+=s+" ")}else if(ze(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function _c(e){if(!e)return null;let{class:t,style:n}=e;return t&&!We(t)&&(e.class=he(t)),n&&(e.style=Me(n)),e}const bc="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wc=vi(bc);function vl(e){return!!e||e===""}function kc(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=yi(e[s],t[s]);return n}function yi(e,t){if(e===t)return!0;let n=Vi(e),s=Vi(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Et(e),s=Et(t),n||s)return e===t;if(n=Ee(e),s=Ee(t),n||s)return n&&s?kc(e,t):!1;if(n=ze(e),s=ze(t),n||s){if(!n||!s)return!1;const o=Object.keys(e).length,i=Object.keys(t).length;if(o!==i)return!1;for(const r in e){const l=e.hasOwnProperty(r),c=t.hasOwnProperty(r);if(l&&!c||!l&&c||!yi(e[r],t[r]))return!1}}return String(e)===String(t)}const ml=e=>!!(e&&e.__v_isRef===!0),M=e=>We(e)?e:e==null?"":Ee(e)||ze(e)&&(e.toString===fl||!Pe(e.toString))?ml(e)?M(e.value):JSON.stringify(e,gl,2):String(e),gl=(e,t)=>ml(t)?gl(e,t.value):On(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,o],i)=>(n[Co(s,i)+" =>"]=o,n),{})}:ul(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Co(n))}:Et(t)?Co(t):ze(t)&&!Ee(t)&&!pl(t)?String(t):t,Co=(e,t="")=>{var n;return Et(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
- * @vue/reactivity v3.5.28
7
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
- * @license MIT
9
- **/let ot;class yl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=ot,!t&&ot&&(this.index=(ot.scopes||(ot.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=ot;try{return ot=this,t()}finally{ot=n}}}on(){++this._on===1&&(this.prevScope=ot,ot=this)}off(){this._on>0&&--this._on===0&&(ot=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function _l(e){return new yl(e)}function bl(){return ot}function xc(e,t=!1){ot&&ot.cleanups.push(e)}let Ve;const To=new WeakSet;class wl{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,ot&&ot.active&&ot.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,To.has(this)&&(To.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||xl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ki(this),$l(this);const t=Ve,n=Ct;Ve=this,Ct=!0;try{return this.fn()}finally{Sl(this),Ve=t,Ct=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)wi(t);this.deps=this.depsTail=void 0,Ki(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?To.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ko(this)&&this.run()}get dirty(){return Ko(this)}}let kl=0,Qn,es;function xl(e,t=!1){if(e.flags|=8,t){e.next=es,es=e;return}e.next=Qn,Qn=e}function _i(){kl++}function bi(){if(--kl>0)return;if(es){let t=es;for(es=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Qn;){let t=Qn;for(Qn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function $l(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Sl(e){let t,n=e.depsTail,s=n;for(;s;){const o=s.prevDep;s.version===-1?(s===n&&(n=o),wi(s),$c(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=o}e.deps=t,e.depsTail=n}function Ko(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Cl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Cl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===cs)||(e.globalVersion=cs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ko(e))))return;e.flags|=2;const t=e.dep,n=Ve,s=Ct;Ve=e,Ct=!0;try{$l(e);const o=e.fn(e._value);(t.version===0||un(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Ve=n,Ct=s,Sl(e),e.flags&=-3}}function wi(e,t=!1){const{dep:n,prevSub:s,nextSub:o}=e;if(s&&(s.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)wi(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function $c(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ct=!0;const Tl=[];function Xt(){Tl.push(Ct),Ct=!1}function Zt(){const e=Tl.pop();Ct=e===void 0?!0:e}function Ki(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ve;Ve=void 0;try{t()}finally{Ve=n}}}let cs=0;class Sc{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ki{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ve||!Ct||Ve===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ve)n=this.activeLink=new Sc(Ve,this),Ve.deps?(n.prevDep=Ve.depsTail,Ve.depsTail.nextDep=n,Ve.depsTail=n):Ve.deps=Ve.depsTail=n,Ml(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ve.depsTail,n.nextDep=void 0,Ve.depsTail.nextDep=n,Ve.depsTail=n,Ve.deps===n&&(Ve.deps=s)}return n}trigger(t){this.version++,cs++,this.notify(t)}notify(t){_i();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{bi()}}}function Ml(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ml(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const zs=new WeakMap,Cn=Symbol(""),Wo=Symbol(""),us=Symbol("");function it(e,t,n){if(Ct&&Ve){let s=zs.get(e);s||zs.set(e,s=new Map);let o=s.get(n);o||(s.set(n,o=new ki),o.map=s,o.key=n),o.track()}}function Wt(e,t,n,s,o,i){const r=zs.get(e);if(!r){cs++;return}const l=c=>{c&&c.trigger()};if(_i(),t==="clear")r.forEach(l);else{const c=Ee(e),p=c&&to(n);if(c&&n==="length"){const d=Number(s);r.forEach((m,v)=>{(v==="length"||v===us||!Et(v)&&v>=d)&&l(m)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),p&&l(r.get(us)),t){case"add":c?p&&l(r.get("length")):(l(r.get(Cn)),On(e)&&l(r.get(Wo)));break;case"delete":c||(l(r.get(Cn)),On(e)&&l(r.get(Wo)));break;case"set":On(e)&&l(r.get(Cn));break}}bi()}function Cc(e,t){const n=zs.get(e);return n&&n.get(t)}function Pn(e){const t=Oe(e);return t===e?t:(it(t,"iterate",us),yt(e)?t:t.map(Pt))}function io(e){return it(e=Oe(e),"iterate",us),e}function an(e,t){return Qt(e)?Fn(Jt(e)?Pt(t):t):Pt(t)}const Tc={__proto__:null,[Symbol.iterator](){return Mo(this,Symbol.iterator,e=>an(this,e))},concat(...e){return Pn(this).concat(...e.map(t=>Ee(t)?Pn(t):t))},entries(){return Mo(this,"entries",e=>(e[1]=an(this,e[1]),e))},every(e,t){return jt(this,"every",e,t,void 0,arguments)},filter(e,t){return jt(this,"filter",e,t,n=>n.map(s=>an(this,s)),arguments)},find(e,t){return jt(this,"find",e,t,n=>an(this,n),arguments)},findIndex(e,t){return jt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return jt(this,"findLast",e,t,n=>an(this,n),arguments)},findLastIndex(e,t){return jt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return jt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Eo(this,"includes",e)},indexOf(...e){return Eo(this,"indexOf",e)},join(e){return Pn(this).join(e)},lastIndexOf(...e){return Eo(this,"lastIndexOf",e)},map(e,t){return jt(this,"map",e,t,void 0,arguments)},pop(){return Un(this,"pop")},push(...e){return Un(this,"push",e)},reduce(e,...t){return Wi(this,"reduce",e,t)},reduceRight(e,...t){return Wi(this,"reduceRight",e,t)},shift(){return Un(this,"shift")},some(e,t){return jt(this,"some",e,t,void 0,arguments)},splice(...e){return Un(this,"splice",e)},toReversed(){return Pn(this).toReversed()},toSorted(e){return Pn(this).toSorted(e)},toSpliced(...e){return Pn(this).toSpliced(...e)},unshift(...e){return Un(this,"unshift",e)},values(){return Mo(this,"values",e=>an(this,e))}};function Mo(e,t,n){const s=io(e),o=s[t]();return s!==e&&!yt(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=n(i.value)),i}),o}const Mc=Array.prototype;function jt(e,t,n,s,o,i){const r=io(e),l=r!==e&&!yt(e),c=r[t];if(c!==Mc[t]){const m=c.apply(e,i);return l?Pt(m):m}let p=n;r!==e&&(l?p=function(m,v){return n.call(this,an(e,m),v,e)}:n.length>2&&(p=function(m,v){return n.call(this,m,v,e)}));const d=c.call(r,p,s);return l&&o?o(d):d}function Wi(e,t,n,s){const o=io(e);let i=n;return o!==e&&(yt(e)?n.length>3&&(i=function(r,l,c){return n.call(this,r,l,c,e)}):i=function(r,l,c){return n.call(this,r,an(e,l),c,e)}),o[t](i,...s)}function Eo(e,t,n){const s=Oe(e);it(s,"iterate",us);const o=s[t](...n);return(o===-1||o===!1)&&ro(n[0])?(n[0]=Oe(n[0]),s[t](...n)):o}function Un(e,t,n=[]){Xt(),_i();const s=Oe(e)[t].apply(e,n);return bi(),Zt(),s}const Ec=vi("__proto__,__v_isRef,__isVue"),El=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Et));function Pc(e){Et(e)||(e=String(e));const t=Oe(this);return it(t,"has",e),t.hasOwnProperty(e)}class Pl{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(o?i?Bc:Ol:i?Ll:Al).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=Ee(t);if(!o){let c;if(r&&(c=Tc[n]))return c;if(n==="hasOwnProperty")return Pc}const l=Reflect.get(t,n,qe(t)?t:s);if((Et(n)?El.has(n):Ec(n))||(o||it(t,"get",n),i))return l;if(qe(l)){const c=r&&to(n)?l:l.value;return o&&ze(c)?Go(c):c}return ze(l)?o?Go(l):Cs(l):l}}class Il extends Pl{constructor(t=!1){super(!1,t)}set(t,n,s,o){let i=t[n];const r=Ee(t)&&to(n);if(!this._isShallow){const p=Qt(i);if(!yt(s)&&!Qt(s)&&(i=Oe(i),s=Oe(s)),!r&&qe(i)&&!qe(s))return p||(i.value=s),!0}const l=r?Number(n)<t.length:Fe(t,n),c=Reflect.set(t,n,s,qe(t)?t:o);return t===Oe(o)&&(l?un(s,i)&&Wt(t,"set",n,s):Wt(t,"add",n,s)),c}deleteProperty(t,n){const s=Fe(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&s&&Wt(t,"delete",n,void 0),o}has(t,n){const s=Reflect.has(t,n);return(!Et(n)||!El.has(n))&&it(t,"has",n),s}ownKeys(t){return it(t,"iterate",Ee(t)?"length":Cn),Reflect.ownKeys(t)}}class Ic extends Pl{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Ac=new Il,Lc=new Ic,Oc=new Il(!0);const qo=e=>e,Ps=e=>Reflect.getPrototypeOf(e);function Rc(e,t,n){return function(...s){const o=this.__v_raw,i=Oe(o),r=On(i),l=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,p=o[e](...s),d=n?qo:t?Fn:Pt;return!t&&it(i,"iterate",c?Wo:Cn),Ze(Object.create(p),{next(){const{value:m,done:v}=p.next();return v?{value:m,done:v}:{value:l?[d(m[0]),d(m[1])]:d(m),done:v}}})}}function Is(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Dc(e,t){const n={get(o){const i=this.__v_raw,r=Oe(i),l=Oe(o);e||(un(o,l)&&it(r,"get",o),it(r,"get",l));const{has:c}=Ps(r),p=t?qo:e?Fn:Pt;if(c.call(r,o))return p(i.get(o));if(c.call(r,l))return p(i.get(l));i!==r&&i.get(o)},get size(){const o=this.__v_raw;return!e&&it(Oe(o),"iterate",Cn),o.size},has(o){const i=this.__v_raw,r=Oe(i),l=Oe(o);return e||(un(o,l)&&it(r,"has",o),it(r,"has",l)),o===l?i.has(o):i.has(o)||i.has(l)},forEach(o,i){const r=this,l=r.__v_raw,c=Oe(l),p=t?qo:e?Fn:Pt;return!e&&it(c,"iterate",Cn),l.forEach((d,m)=>o.call(i,p(d),p(m),r))}};return Ze(n,e?{add:Is("add"),set:Is("set"),delete:Is("delete"),clear:Is("clear")}:{add(o){!t&&!yt(o)&&!Qt(o)&&(o=Oe(o));const i=Oe(this);return Ps(i).has.call(i,o)||(i.add(o),Wt(i,"add",o,o)),this},set(o,i){!t&&!yt(i)&&!Qt(i)&&(i=Oe(i));const r=Oe(this),{has:l,get:c}=Ps(r);let p=l.call(r,o);p||(o=Oe(o),p=l.call(r,o));const d=c.call(r,o);return r.set(o,i),p?un(i,d)&&Wt(r,"set",o,i):Wt(r,"add",o,i),this},delete(o){const i=Oe(this),{has:r,get:l}=Ps(i);let c=r.call(i,o);c||(o=Oe(o),c=r.call(i,o)),l&&l.call(i,o);const p=i.delete(o);return c&&Wt(i,"delete",o,void 0),p},clear(){const o=Oe(this),i=o.size!==0,r=o.clear();return i&&Wt(o,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=Rc(o,e,t)}),n}function xi(e,t){const n=Dc(e,t);return(s,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?s:Reflect.get(Fe(n,o)&&o in s?n:s,o,i)}const Nc={get:xi(!1,!1)},Fc={get:xi(!1,!0)},zc={get:xi(!0,!1)};const Al=new WeakMap,Ll=new WeakMap,Ol=new WeakMap,Bc=new WeakMap;function Hc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function jc(e){return e.__v_skip||!Object.isExtensible(e)?0:Hc(uc(e))}function Cs(e){return Qt(e)?e:$i(e,!1,Ac,Nc,Al)}function Vc(e){return $i(e,!1,Oc,Fc,Ll)}function Go(e){return $i(e,!0,Lc,zc,Ol)}function $i(e,t,n,s,o){if(!ze(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=jc(e);if(i===0)return e;const r=o.get(e);if(r)return r;const l=new Proxy(e,i===2?s:n);return o.set(e,l),l}function Jt(e){return Qt(e)?Jt(e.__v_raw):!!(e&&e.__v_isReactive)}function Qt(e){return!!(e&&e.__v_isReadonly)}function yt(e){return!!(e&&e.__v_isShallow)}function ro(e){return e?!!e.__v_raw:!1}function Oe(e){const t=e&&e.__v_raw;return t?Oe(t):e}function Si(e){return!Fe(e,"__v_skip")&&Object.isExtensible(e)&&hl(e,"__v_skip",!0),e}const Pt=e=>ze(e)?Cs(e):e,Fn=e=>ze(e)?Go(e):e;function qe(e){return e?e.__v_isRef===!0:!1}function me(e){return Uc(e,!1)}function Uc(e,t){return qe(e)?e:new Kc(e,t)}class Kc{constructor(t,n){this.dep=new ki,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Oe(t),this._value=n?t:Pt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||yt(t)||Qt(t);t=s?t:Oe(t),un(t,n)&&(this._rawValue=t,this._value=s?t:Pt(t),this.dep.trigger())}}function Y(e){return qe(e)?e.value:e}const Wc={get:(e,t,n)=>t==="__v_raw"?e:Y(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const o=e[t];return qe(o)&&!qe(n)?(o.value=n,!0):Reflect.set(e,t,n,s)}};function Rl(e){return Jt(e)?e:new Proxy(e,Wc)}function qc(e){const t=Ee(e)?new Array(e.length):{};for(const n in e)t[n]=Jc(e,n);return t}class Gc{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=Oe(t);let o=!0,i=t;if(!Ee(t)||!to(String(n)))do o=!ro(i)||yt(i);while(o&&(i=i.__v_raw));this._shallow=o}get value(){let t=this._object[this._key];return this._shallow&&(t=Y(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&qe(this._raw[this._key])){const n=this._object[this._key];if(qe(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return Cc(this._raw,this._key)}}function Jc(e,t,n){return new Gc(e,t,n)}class Yc{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ki(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=cs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ve!==this)return xl(this,!0),!0}get value(){const t=this.dep.track();return Cl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Xc(e,t,n=!1){let s,o;return Pe(e)?s=e:(s=e.get,o=e.set),new Yc(s,o,n)}const As={},Bs=new WeakMap;let xn;function Zc(e,t=!1,n=xn){if(n){let s=Bs.get(n);s||Bs.set(n,s=[]),s.push(e)}}function Qc(e,t,n=je){const{immediate:s,deep:o,once:i,scheduler:r,augmentJob:l,call:c}=n,p=V=>o?V:yt(V)||o===!1||o===0?qt(V,1):qt(V);let d,m,v,w,I=!1,S=!1;if(qe(e)?(m=()=>e.value,I=yt(e)):Jt(e)?(m=()=>p(e),I=!0):Ee(e)?(S=!0,I=e.some(V=>Jt(V)||yt(V)),m=()=>e.map(V=>{if(qe(V))return V.value;if(Jt(V))return p(V);if(Pe(V))return c?c(V,2):V()})):Pe(e)?t?m=c?()=>c(e,2):e:m=()=>{if(v){Xt();try{v()}finally{Zt()}}const V=xn;xn=d;try{return c?c(e,3,[w]):e(w)}finally{xn=V}}:m=Nt,t&&o){const V=m,Q=o===!0?1/0:o;m=()=>qt(V(),Q)}const _=bl(),C=()=>{d.stop(),_&&_.active&&gi(_.effects,d)};if(i&&t){const V=t;t=(...Q)=>{V(...Q),C()}}let z=S?new Array(e.length).fill(As):As;const K=V=>{if(!(!(d.flags&1)||!d.dirty&&!V))if(t){const Q=d.run();if(o||I||(S?Q.some((D,ae)=>un(D,z[ae])):un(Q,z))){v&&v();const D=xn;xn=d;try{const ae=[Q,z===As?void 0:S&&z[0]===As?[]:z,w];z=Q,c?c(t,3,ae):t(...ae)}finally{xn=D}}}else d.run()};return l&&l(K),d=new wl(m),d.scheduler=r?()=>r(K,!1):K,w=V=>Zc(V,!1,d),v=d.onStop=()=>{const V=Bs.get(d);if(V){if(c)c(V,4);else for(const Q of V)Q();Bs.delete(d)}},t?s?K(!0):z=d.run():r?r(K.bind(null,!0),!0):d.run(),C.pause=d.pause.bind(d),C.resume=d.resume.bind(d),C.stop=C,C}function qt(e,t=1/0,n){if(t<=0||!ze(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,qe(e))qt(e.value,t,n);else if(Ee(e))for(let s=0;s<e.length;s++)qt(e[s],t,n);else if(ul(e)||On(e))e.forEach(s=>{qt(s,t,n)});else if(pl(e)){for(const s in e)qt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&qt(e[s],t,n)}return e}/**
10
- * @vue/runtime-core v3.5.28
11
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
- * @license MIT
13
- **/function Ts(e,t,n,s){try{return s?e(...s):e()}catch(o){lo(o,t,n)}}function It(e,t,n,s){if(Pe(e)){const o=Ts(e,t,n,s);return o&&dl(o)&&o.catch(i=>{lo(i,t,n)}),o}if(Ee(e)){const o=[];for(let i=0;i<e.length;i++)o.push(It(e[i],t,n,s));return o}}function lo(e,t,n,s=!0){const o=t?t.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||je;if(t){let l=t.parent;const c=t.proxy,p=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const d=l.ec;if(d){for(let m=0;m<d.length;m++)if(d[m](e,c,p)===!1)return}l=l.parent}if(i){Xt(),Ts(i,null,10,[e,c,p]),Zt();return}}eu(e,n,o,s,r)}function eu(e,t,n,s=!0,o=!1){if(o)throw e;console.error(e)}const ut=[];let Ot=-1;const Rn=[];let cn=null,An=0;const Dl=Promise.resolve();let Hs=null;function Ue(e){const t=Hs||Dl;return e?t.then(this?e.bind(this):e):t}function tu(e){let t=Ot+1,n=ut.length;for(;t<n;){const s=t+n>>>1,o=ut[s],i=ds(o);i<e||i===e&&o.flags&2?t=s+1:n=s}return t}function Ci(e){if(!(e.flags&1)){const t=ds(e),n=ut[ut.length-1];!n||!(e.flags&2)&&t>=ds(n)?ut.push(e):ut.splice(tu(t),0,e),e.flags|=1,Nl()}}function Nl(){Hs||(Hs=Dl.then(zl))}function nu(e){Ee(e)?Rn.push(...e):cn&&e.id===-1?cn.splice(An+1,0,e):e.flags&1||(Rn.push(e),e.flags|=1),Nl()}function qi(e,t,n=Ot+1){for(;n<ut.length;n++){const s=ut[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;ut.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Fl(e){if(Rn.length){const t=[...new Set(Rn)].sort((n,s)=>ds(n)-ds(s));if(Rn.length=0,cn){cn.push(...t);return}for(cn=t,An=0;An<cn.length;An++){const n=cn[An];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}cn=null,An=0}}const ds=e=>e.id==null?e.flags&2?-1:1/0:e.id;function zl(e){try{for(Ot=0;Ot<ut.length;Ot++){const t=ut[Ot];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Ts(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ot<ut.length;Ot++){const t=ut[Ot];t&&(t.flags&=-2)}Ot=-1,ut.length=0,Fl(),Hs=null,(ut.length||Rn.length)&&zl()}}let nt=null,ao=null;function js(e){const t=nt;return nt=e,ao=e&&e.type.__scopeId||null,t}function su(e){ao=e}function ou(){ao=null}const iu=e=>ft;function ft(e,t=nt,n){if(!t||e._n)return e;const s=(...o)=>{s._d&&Ks(-1);const i=js(t);let r;try{r=e(...o)}finally{js(i),s._d&&Ks(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Be(e,t){if(nt===null)return e;const n=mo(nt),s=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[i,r,l,c=je]=t[o];i&&(Pe(i)&&(i={mounted:i,updated:i}),i.deep&&qt(r),s.push({dir:i,instance:n,value:r,oldValue:void 0,arg:l,modifiers:c}))}return e}function yn(e,t,n,s){const o=e.dirs,i=t&&t.dirs;for(let r=0;r<o.length;r++){const l=o[r];i&&(l.oldValue=i[r].value);let c=l.dir[s];c&&(Xt(),It(c,n,8,[e.el,l,e,t]),Zt())}}function sn(e,t){if(lt){let n=lt.provides;const s=lt.parent&&lt.parent.provides;s===n&&(n=lt.provides=Object.create(s)),n[e]=t}}function xt(e,t,n=!1){const s=Ms();if(s||Tn){let o=Tn?Tn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Pe(t)?t.call(s&&s.proxy):t}}function ru(){return!!(Ms()||Tn)}const lu=Symbol.for("v-scx"),au=()=>xt(lu);function cu(e,t){return Ti(e,null,t)}function Ke(e,t,n){return Ti(e,t,n)}function Ti(e,t,n=je){const{immediate:s,deep:o,flush:i,once:r}=n,l=Ze({},n),c=t&&s||!t&&i!=="post";let p;if(gs){if(i==="sync"){const w=au();p=w.__watcherHandles||(w.__watcherHandles=[])}else if(!c){const w=()=>{};return w.stop=Nt,w.resume=Nt,w.pause=Nt,w}}const d=lt;l.call=(w,I,S)=>It(w,d,I,S);let m=!1;i==="post"?l.scheduler=w=>{ht(w,d&&d.suspense)}:i!=="sync"&&(m=!0,l.scheduler=(w,I)=>{I?w():Ci(w)}),l.augmentJob=w=>{t&&(w.flags|=4),m&&(w.flags|=2,d&&(w.id=d.uid,w.i=d))};const v=Qc(e,t,l);return gs&&(p?p.push(v):c&&v()),v}function uu(e,t,n){const s=this.proxy,o=We(e)?e.includes(".")?Bl(s,e):()=>s[e]:e.bind(s,s);let i;Pe(t)?i=t:(i=t.handler,n=t);const r=Es(this),l=Ti(o,i.bind(s),n);return r(),l}function Bl(e,t){const n=t.split(".");return()=>{let s=e;for(let o=0;o<n.length&&s;o++)s=s[n[o]];return s}}const du=Symbol("_vte"),Hl=e=>e.__isTeleport,Rt=Symbol("_leaveCb"),Kn=Symbol("_enterCb");function fu(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Mn(()=>{e.isMounted=!0}),fo(()=>{e.isUnmounting=!0}),e}const bt=[Function,Array],jl={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:bt,onEnter:bt,onAfterEnter:bt,onEnterCancelled:bt,onBeforeLeave:bt,onLeave:bt,onAfterLeave:bt,onLeaveCancelled:bt,onBeforeAppear:bt,onAppear:bt,onAfterAppear:bt,onAppearCancelled:bt},Vl=e=>{const t=e.subTree;return t.component?Vl(t.component):t},pu={name:"BaseTransition",props:jl,setup(e,{slots:t}){const n=Ms(),s=fu();return()=>{const o=t.default&&Wl(t.default(),!0);if(!o||!o.length)return;const i=Ul(o),r=Oe(e),{mode:l}=r;if(s.isLeaving)return Po(i);const c=Gi(i);if(!c)return Po(i);let p=Jo(c,r,s,n,m=>p=m);c.type!==rt&&fs(c,p);let d=n.subTree&&Gi(n.subTree);if(d&&d.type!==rt&&!Sn(d,c)&&Vl(n).type!==rt){let m=Jo(d,r,s,n);if(fs(d,m),l==="out-in"&&c.type!==rt)return s.isLeaving=!0,m.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete m.afterLeave,d=void 0},Po(i);l==="in-out"&&c.type!==rt?m.delayLeave=(v,w,I)=>{const S=Kl(s,d);S[String(d.key)]=d,v[Rt]=()=>{w(),v[Rt]=void 0,delete p.delayedLeave,d=void 0},p.delayedLeave=()=>{I(),delete p.delayedLeave,d=void 0}}:d=void 0}else d&&(d=void 0);return i}}};function Ul(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==rt){t=n;break}}return t}const hu=pu;function Kl(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Jo(e,t,n,s,o){const{appear:i,mode:r,persisted:l=!1,onBeforeEnter:c,onEnter:p,onAfterEnter:d,onEnterCancelled:m,onBeforeLeave:v,onLeave:w,onAfterLeave:I,onLeaveCancelled:S,onBeforeAppear:_,onAppear:C,onAfterAppear:z,onAppearCancelled:K}=t,V=String(e.key),Q=Kl(n,e),D=(O,R)=>{O&&It(O,s,9,R)},ae=(O,R)=>{const de=R[1];D(O,R),Ee(O)?O.every(F=>F.length<=1)&&de():O.length<=1&&de()},ue={mode:r,persisted:l,beforeEnter(O){let R=c;if(!n.isMounted)if(i)R=_||c;else return;O[Rt]&&O[Rt](!0);const de=Q[V];de&&Sn(e,de)&&de.el[Rt]&&de.el[Rt](),D(R,[O])},enter(O){let R=p,de=d,F=m;if(!n.isMounted)if(i)R=C||p,de=z||d,F=K||m;else return;let te=!1;O[Kn]=B=>{te||(te=!0,B?D(F,[O]):D(de,[O]),ue.delayedLeave&&ue.delayedLeave(),O[Kn]=void 0)};const ce=O[Kn].bind(null,!1);R?ae(R,[O,ce]):ce()},leave(O,R){const de=String(e.key);if(O[Kn]&&O[Kn](!0),n.isUnmounting)return R();D(v,[O]);let F=!1;O[Rt]=ce=>{F||(F=!0,R(),ce?D(S,[O]):D(I,[O]),O[Rt]=void 0,Q[de]===e&&delete Q[de])};const te=O[Rt].bind(null,!1);Q[de]=e,w?ae(w,[O,te]):te()},clone(O){const R=Jo(O,t,n,s,o);return o&&o(R),R}};return ue}function Po(e){if(co(e))return e=hn(e),e.children=null,e}function Gi(e){if(!co(e))return Hl(e.type)&&e.children?Ul(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&Pe(n.default))return n.default()}}function fs(e,t){e.shapeFlag&6&&e.component?(e.transition=t,fs(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Wl(e,t=!1,n){let s=[],o=0;for(let i=0;i<e.length;i++){let r=e[i];const l=n==null?r.key:String(n)+String(r.key!=null?r.key:i);r.type===ve?(r.patchFlag&128&&o++,s=s.concat(Wl(r.children,t,l))):(t||r.type!==rt)&&s.push(l!=null?hn(r,{key:l}):r)}if(o>1)for(let i=0;i<s.length;i++)s[i].patchFlag=-2;return s}function Qe(e,t){return Pe(e)?Ze({name:e.name},t,{setup:e}):e}function ql(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ji(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Vs=new WeakMap;function ts(e,t,n,s,o=!1){if(Ee(e)){e.forEach((S,_)=>ts(S,t&&(Ee(t)?t[_]:t),n,s,o));return}if(Dn(s)&&!o){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ts(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?mo(s.component):s.el,r=o?null:i,{i:l,r:c}=e,p=t&&t.r,d=l.refs===je?l.refs={}:l.refs,m=l.setupState,v=Oe(m),w=m===je?cl:S=>Ji(d,S)?!1:Fe(v,S),I=(S,_)=>!(_&&Ji(d,_));if(p!=null&&p!==c){if(Yi(t),We(p))d[p]=null,w(p)&&(m[p]=null);else if(qe(p)){const S=t;I(p,S.k)&&(p.value=null),S.k&&(d[S.k]=null)}}if(Pe(c))Ts(c,l,12,[r,d]);else{const S=We(c),_=qe(c);if(S||_){const C=()=>{if(e.f){const z=S?w(c)?m[c]:d[c]:I()||!e.k?c.value:d[e.k];if(o)Ee(z)&&gi(z,i);else if(Ee(z))z.includes(i)||z.push(i);else if(S)d[c]=[i],w(c)&&(m[c]=d[c]);else{const K=[i];I(c,e.k)&&(c.value=K),e.k&&(d[e.k]=K)}}else S?(d[c]=r,w(c)&&(m[c]=r)):_&&(I(c,e.k)&&(c.value=r),e.k&&(d[e.k]=r))};if(r){const z=()=>{C(),Vs.delete(e)};z.id=-1,Vs.set(e,z),ht(z,n)}else Yi(e),C()}}}function Yi(e){const t=Vs.get(e);t&&(t.flags|=8,Vs.delete(e))}oo().requestIdleCallback;oo().cancelIdleCallback;const Dn=e=>!!e.type.__asyncLoader,co=e=>e.type.__isKeepAlive;function vu(e,t){Gl(e,"a",t)}function mu(e,t){Gl(e,"da",t)}function Gl(e,t,n=lt){const s=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(uo(t,s,n),n){let o=n.parent;for(;o&&o.parent;)co(o.parent.vnode)&&gu(s,t,n,o),o=o.parent}}function gu(e,t,n,s){const o=uo(t,e,s,!0);po(()=>{gi(s[t],o)},n)}function uo(e,t,n=lt,s=!1){if(n){const o=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...r)=>{Xt();const l=Es(n),c=It(t,n,e,r);return l(),Zt(),c});return s?o.unshift(i):o.push(i),i}}const tn=e=>(t,n=lt)=>{(!gs||e==="sp")&&uo(e,(...s)=>t(...s),n)},yu=tn("bm"),Mn=tn("m"),_u=tn("bu"),bu=tn("u"),fo=tn("bum"),po=tn("um"),wu=tn("sp"),ku=tn("rtg"),xu=tn("rtc");function $u(e,t=lt){uo("ec",e,t)}const Mi="components",Su="directives";function ps(e,t){return Ei(Mi,e,!0,t)||e}const Jl=Symbol.for("v-ndc");function Yl(e){return We(e)?Ei(Mi,e,!1)||e:e||Jl}function gn(e){return Ei(Su,e)}function Ei(e,t,n=!0,s=!1){const o=nt||lt;if(o){const i=o.type;if(e===Mi){const l=ad(i,!1);if(l&&(l===t||l===kt(t)||l===so(kt(t))))return i}const r=Xi(o[e]||i[e],t)||Xi(o.appContext[e],t);return!r&&s?i:r}}function Xi(e,t){return e&&(e[t]||e[kt(t)]||e[so(kt(t))])}function Te(e,t,n,s){let o;const i=n,r=Ee(e);if(r||We(e)){const l=r&&Jt(e);let c=!1,p=!1;l&&(c=!yt(e),p=Qt(e),e=io(e)),o=new Array(e.length);for(let d=0,m=e.length;d<m;d++)o[d]=t(c?p?Fn(Pt(e[d])):Pt(e[d]):e[d],d,void 0,i)}else if(typeof e=="number"){o=new Array(e);for(let l=0;l<e;l++)o[l]=t(l+1,l,void 0,i)}else if(ze(e))if(e[Symbol.iterator])o=Array.from(e,(l,c)=>t(l,c,void 0,i));else{const l=Object.keys(e);o=new Array(l.length);for(let c=0,p=l.length;c<p;c++){const d=l[c];o[c]=t(e[d],d,c,i)}}else o=[];return o}function hs(e,t,n={},s,o){if(nt.ce||nt.parent&&Dn(nt.parent)&&nt.parent.ce){const p=Object.keys(n).length>0;return t!=="default"&&(n.name=t),g(),dt(ve,null,[Re("slot",n,s)],p?-2:64)}let i=e[t];i&&i._c&&(i._d=!1),g();const r=i&&Xl(i(n)),l=n.key||r&&r.key,c=dt(ve,{key:(l&&!Et(l)?l:`_${t}`)+(!r&&s?"_fb":"")},r||[],r&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),i&&i._c&&(i._d=!0),c}function Xl(e){return e.some(t=>ms(t)?!(t.type===rt||t.type===ve&&!Xl(t.children)):!0)?e:null}const Yo=e=>e?_a(e)?mo(e):Yo(e.parent):null,ns=Ze(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Yo(e.parent),$root:e=>Yo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ql(e),$forceUpdate:e=>e.f||(e.f=()=>{Ci(e.update)}),$nextTick:e=>e.n||(e.n=Ue.bind(e.proxy)),$watch:e=>uu.bind(e)}),Io=(e,t)=>e!==je&&!e.__isScriptSetup&&Fe(e,t),Cu={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:o,props:i,accessCache:r,type:l,appContext:c}=e;if(t[0]!=="$"){const v=r[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return o[t];case 4:return n[t];case 3:return i[t]}else{if(Io(s,t))return r[t]=1,s[t];if(o!==je&&Fe(o,t))return r[t]=2,o[t];if(Fe(i,t))return r[t]=3,i[t];if(n!==je&&Fe(n,t))return r[t]=4,n[t];Xo&&(r[t]=0)}}const p=ns[t];let d,m;if(p)return t==="$attrs"&&it(e.attrs,"get",""),p(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==je&&Fe(n,t))return r[t]=4,n[t];if(m=c.config.globalProperties,Fe(m,t))return m[t]},set({_:e},t,n){const{data:s,setupState:o,ctx:i}=e;return Io(o,t)?(o[t]=n,!0):s!==je&&Fe(s,t)?(s[t]=n,!0):Fe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:o,props:i,type:r}},l){let c;return!!(n[l]||e!==je&&l[0]!=="$"&&Fe(e,l)||Io(t,l)||Fe(i,l)||Fe(s,l)||Fe(ns,l)||Fe(o.config.globalProperties,l)||(c=r.__cssModules)&&c[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Fe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Tu(){return Mu().slots}function Mu(e){const t=Ms();return t.setupContext||(t.setupContext=wa(t))}function Zi(e){return Ee(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Xo=!0;function Eu(e){const t=Ql(e),n=e.proxy,s=e.ctx;Xo=!1,t.beforeCreate&&Qi(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:r,watch:l,provide:c,inject:p,created:d,beforeMount:m,mounted:v,beforeUpdate:w,updated:I,activated:S,deactivated:_,beforeDestroy:C,beforeUnmount:z,destroyed:K,unmounted:V,render:Q,renderTracked:D,renderTriggered:ae,errorCaptured:ue,serverPrefetch:O,expose:R,inheritAttrs:de,components:F,directives:te,filters:ce}=t;if(p&&Pu(p,s,null),r)for(const oe in r){const W=r[oe];Pe(W)&&(s[oe]=W.bind(n))}if(o){const oe=o.call(n,n);ze(oe)&&(e.data=Cs(oe))}if(Xo=!0,i)for(const oe in i){const W=i[oe],re=Pe(W)?W.bind(n,n):Pe(W.get)?W.get.bind(n,n):Nt,we=!Pe(W)&&Pe(W.set)?W.set.bind(n):Nt,H=A({get:re,set:we});Object.defineProperty(s,oe,{enumerable:!0,configurable:!0,get:()=>H.value,set:T=>H.value=T})}if(l)for(const oe in l)Zl(l[oe],s,n,oe);if(c){const oe=Pe(c)?c.call(n):c;Reflect.ownKeys(oe).forEach(W=>{sn(W,oe[W])})}d&&Qi(d,e,"c");function se(oe,W){Ee(W)?W.forEach(re=>oe(re.bind(n))):W&&oe(W.bind(n))}if(se(yu,m),se(Mn,v),se(_u,w),se(bu,I),se(vu,S),se(mu,_),se($u,ue),se(xu,D),se(ku,ae),se(fo,z),se(po,V),se(wu,O),Ee(R))if(R.length){const oe=e.exposed||(e.exposed={});R.forEach(W=>{Object.defineProperty(oe,W,{get:()=>n[W],set:re=>n[W]=re,enumerable:!0})})}else e.exposed||(e.exposed={});Q&&e.render===Nt&&(e.render=Q),de!=null&&(e.inheritAttrs=de),F&&(e.components=F),te&&(e.directives=te),O&&ql(e)}function Pu(e,t,n=Nt){Ee(e)&&(e=Zo(e));for(const s in e){const o=e[s];let i;ze(o)?"default"in o?i=xt(o.from||s,o.default,!0):i=xt(o.from||s):i=xt(o),qe(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:r=>i.value=r}):t[s]=i}}function Qi(e,t,n){It(Ee(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Zl(e,t,n,s){let o=s.includes(".")?Bl(n,s):()=>n[s];if(We(e)){const i=t[e];Pe(i)&&Ke(o,i)}else if(Pe(e))Ke(o,e.bind(n));else if(ze(e))if(Ee(e))e.forEach(i=>Zl(i,t,n,s));else{const i=Pe(e.handler)?e.handler.bind(n):t[e.handler];Pe(i)&&Ke(o,i,e)}}function Ql(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:r}}=e.appContext,l=i.get(t);let c;return l?c=l:!o.length&&!n&&!s?c=t:(c={},o.length&&o.forEach(p=>Us(c,p,r,!0)),Us(c,t,r)),ze(t)&&i.set(t,c),c}function Us(e,t,n,s=!1){const{mixins:o,extends:i}=t;i&&Us(e,i,n,!0),o&&o.forEach(r=>Us(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const l=Iu[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const Iu={data:er,props:tr,emits:tr,methods:Xn,computed:Xn,beforeCreate:ct,created:ct,beforeMount:ct,mounted:ct,beforeUpdate:ct,updated:ct,beforeDestroy:ct,beforeUnmount:ct,destroyed:ct,unmounted:ct,activated:ct,deactivated:ct,errorCaptured:ct,serverPrefetch:ct,components:Xn,directives:Xn,watch:Lu,provide:er,inject:Au};function er(e,t){return t?e?function(){return Ze(Pe(e)?e.call(this,this):e,Pe(t)?t.call(this,this):t)}:t:e}function Au(e,t){return Xn(Zo(e),Zo(t))}function Zo(e){if(Ee(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ct(e,t){return e?[...new Set([].concat(e,t))]:t}function Xn(e,t){return e?Ze(Object.create(null),e,t):t}function tr(e,t){return e?Ee(e)&&Ee(t)?[...new Set([...e,...t])]:Ze(Object.create(null),Zi(e),Zi(t??{})):t}function Lu(e,t){if(!e)return t;if(!t)return e;const n=Ze(Object.create(null),e);for(const s in t)n[s]=ct(e[s],t[s]);return n}function ea(){return{app:null,config:{isNativeTag:cl,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ou=0;function Ru(e,t){return function(s,o=null){Pe(s)||(s=Ze({},s)),o!=null&&!ze(o)&&(o=null);const i=ea(),r=new WeakSet,l=[];let c=!1;const p=i.app={_uid:Ou++,_component:s,_props:o,_container:null,_context:i,_instance:null,version:ud,get config(){return i.config},set config(d){},use(d,...m){return r.has(d)||(d&&Pe(d.install)?(r.add(d),d.install(p,...m)):Pe(d)&&(r.add(d),d(p,...m))),p},mixin(d){return i.mixins.includes(d)||i.mixins.push(d),p},component(d,m){return m?(i.components[d]=m,p):i.components[d]},directive(d,m){return m?(i.directives[d]=m,p):i.directives[d]},mount(d,m,v){if(!c){const w=p._ceVNode||Re(s,o);return w.appContext=i,v===!0?v="svg":v===!1&&(v=void 0),e(w,d,v),c=!0,p._container=d,d.__vue_app__=p,mo(w.component)}},onUnmount(d){l.push(d)},unmount(){c&&(It(l,p._instance,16),e(null,p._container),delete p._container.__vue_app__)},provide(d,m){return i.provides[d]=m,p},runWithContext(d){const m=Tn;Tn=p;try{return d()}finally{Tn=m}}};return p}}let Tn=null;const Du=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${kt(t)}Modifiers`]||e[`${mn(t)}Modifiers`];function Nu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||je;let o=n;const i=t.startsWith("update:"),r=i&&Du(s,t.slice(7));r&&(r.trim&&(o=n.map(d=>We(d)?d.trim():d)),r.number&&(o=n.map(pc)));let l,c=s[l=$o(t)]||s[l=$o(kt(t))];!c&&i&&(c=s[l=$o(mn(t))]),c&&It(c,e,6,o);const p=s[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,It(p,e,6,o)}}const Fu=new WeakMap;function ta(e,t,n=!1){const s=n?Fu:t.emitsCache,o=s.get(e);if(o!==void 0)return o;const i=e.emits;let r={},l=!1;if(!Pe(e)){const c=p=>{const d=ta(p,t,!0);d&&(l=!0,Ze(r,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(ze(e)&&s.set(e,null),null):(Ee(i)?i.forEach(c=>r[c]=null):Ze(r,i),ze(e)&&s.set(e,r),r)}function ho(e,t){return!e||!eo(t)?!1:(t=t.slice(2).replace(/Once$/,""),Fe(e,t[0].toLowerCase()+t.slice(1))||Fe(e,mn(t))||Fe(e,t))}function nr(e){const{type:t,vnode:n,proxy:s,withProxy:o,propsOptions:[i],slots:r,attrs:l,emit:c,render:p,renderCache:d,props:m,data:v,setupState:w,ctx:I,inheritAttrs:S}=e,_=js(e);let C,z;try{if(n.shapeFlag&4){const V=o||s,Q=V;C=Dt(p.call(Q,V,d,m,w,v,I)),z=l}else{const V=t;C=Dt(V.length>1?V(m,{attrs:l,slots:r,emit:c}):V(m,null)),z=t.props?l:zu(l)}}catch(V){ss.length=0,lo(V,e,1),C=Re(rt)}let K=C;if(z&&S!==!1){const V=Object.keys(z),{shapeFlag:Q}=K;V.length&&Q&7&&(i&&V.some(mi)&&(z=Bu(z,i)),K=hn(K,z,!1,!0))}return n.dirs&&(K=hn(K,null,!1,!0),K.dirs=K.dirs?K.dirs.concat(n.dirs):n.dirs),n.transition&&fs(K,n.transition),C=K,js(_),C}const zu=e=>{let t;for(const n in e)(n==="class"||n==="style"||eo(n))&&((t||(t={}))[n]=e[n]);return t},Bu=(e,t)=>{const n={};for(const s in e)(!mi(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Hu(e,t,n){const{props:s,children:o,component:i}=e,{props:r,children:l,patchFlag:c}=t,p=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?sr(s,r,p):!!r;if(c&8){const d=t.dynamicProps;for(let m=0;m<d.length;m++){const v=d[m];if(na(r,s,v)&&!ho(p,v))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:s===r?!1:s?r?sr(s,r,p):!0:!!r;return!1}function sr(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let o=0;o<s.length;o++){const i=s[o];if(na(t,e,i)&&!ho(n,i))return!0}return!1}function na(e,t,n){const s=e[n],o=t[n];return n==="style"&&ze(s)&&ze(o)?!yi(s,o):s!==o}function ju({vnode:e,parent:t},n){for(;t;){const s=t.subTree;if(s.suspense&&s.suspense.activeBranch===e&&(s.el=e.el),s===e)(e=t.vnode).el=n,t=t.parent;else break}}const sa={},oa=()=>Object.create(sa),ia=e=>Object.getPrototypeOf(e)===sa;function Vu(e,t,n,s=!1){const o={},i=oa();e.propsDefaults=Object.create(null),ra(e,t,o,i);for(const r in e.propsOptions[0])r in o||(o[r]=void 0);n?e.props=s?o:Vc(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function Uu(e,t,n,s){const{props:o,attrs:i,vnode:{patchFlag:r}}=e,l=Oe(o),[c]=e.propsOptions;let p=!1;if((s||r>0)&&!(r&16)){if(r&8){const d=e.vnode.dynamicProps;for(let m=0;m<d.length;m++){let v=d[m];if(ho(e.emitsOptions,v))continue;const w=t[v];if(c)if(Fe(i,v))w!==i[v]&&(i[v]=w,p=!0);else{const I=kt(v);o[I]=Qo(c,l,I,w,e,!1)}else w!==i[v]&&(i[v]=w,p=!0)}}}else{ra(e,t,o,i)&&(p=!0);let d;for(const m in l)(!t||!Fe(t,m)&&((d=mn(m))===m||!Fe(t,d)))&&(c?n&&(n[m]!==void 0||n[d]!==void 0)&&(o[m]=Qo(c,l,m,void 0,e,!0)):delete o[m]);if(i!==l)for(const m in i)(!t||!Fe(t,m))&&(delete i[m],p=!0)}p&&Wt(e.attrs,"set","")}function ra(e,t,n,s){const[o,i]=e.propsOptions;let r=!1,l;if(t)for(let c in t){if(Zn(c))continue;const p=t[c];let d;o&&Fe(o,d=kt(c))?!i||!i.includes(d)?n[d]=p:(l||(l={}))[d]=p:ho(e.emitsOptions,c)||(!(c in s)||p!==s[c])&&(s[c]=p,r=!0)}if(i){const c=Oe(n),p=l||je;for(let d=0;d<i.length;d++){const m=i[d];n[m]=Qo(o,c,m,p[m],e,!Fe(p,m))}}return r}function Qo(e,t,n,s,o,i){const r=e[n];if(r!=null){const l=Fe(r,"default");if(l&&s===void 0){const c=r.default;if(r.type!==Function&&!r.skipFactory&&Pe(c)){const{propsDefaults:p}=o;if(n in p)s=p[n];else{const d=Es(o);s=p[n]=c.call(null,t),d()}}else s=c;o.ce&&o.ce._setProp(n,s)}r[0]&&(i&&!l?s=!1:r[1]&&(s===""||s===mn(n))&&(s=!0))}return s}const Ku=new WeakMap;function la(e,t,n=!1){const s=n?Ku:t.propsCache,o=s.get(e);if(o)return o;const i=e.props,r={},l=[];let c=!1;if(!Pe(e)){const d=m=>{c=!0;const[v,w]=la(m,t,!0);Ze(r,v),w&&l.push(...w)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!c)return ze(e)&&s.set(e,Ln),Ln;if(Ee(i))for(let d=0;d<i.length;d++){const m=kt(i[d]);or(m)&&(r[m]=je)}else if(i)for(const d in i){const m=kt(d);if(or(m)){const v=i[d],w=r[m]=Ee(v)||Pe(v)?{type:v}:Ze({},v),I=w.type;let S=!1,_=!0;if(Ee(I))for(let C=0;C<I.length;++C){const z=I[C],K=Pe(z)&&z.name;if(K==="Boolean"){S=!0;break}else K==="String"&&(_=!1)}else S=Pe(I)&&I.name==="Boolean";w[0]=S,w[1]=_,(S||Fe(w,"default"))&&l.push(m)}}const p=[r,l];return ze(e)&&s.set(e,p),p}function or(e){return e[0]!=="$"&&!Zn(e)}const Pi=e=>e==="_"||e==="_ctx"||e==="$stable",Ii=e=>Ee(e)?e.map(Dt):[Dt(e)],Wu=(e,t,n)=>{if(t._n)return t;const s=ft((...o)=>Ii(t(...o)),n);return s._c=!1,s},aa=(e,t,n)=>{const s=e._ctx;for(const o in e){if(Pi(o))continue;const i=e[o];if(Pe(i))t[o]=Wu(o,i,s);else if(i!=null){const r=Ii(i);t[o]=()=>r}}},ca=(e,t)=>{const n=Ii(t);e.slots.default=()=>n},ua=(e,t,n)=>{for(const s in t)(n||!Pi(s))&&(e[s]=t[s])},qu=(e,t,n)=>{const s=e.slots=oa();if(e.vnode.shapeFlag&32){const o=t._;o?(ua(s,t,n),n&&hl(s,"_",o,!0)):aa(t,s)}else t&&ca(e,t)},Gu=(e,t,n)=>{const{vnode:s,slots:o}=e;let i=!0,r=je;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:ua(o,t,n):(i=!t.$stable,aa(t,o)),r=t}else t&&(ca(e,t),r={default:1});if(i)for(const l in o)!Pi(l)&&r[l]==null&&delete o[l]},ht=Qu;function Ju(e){return Yu(e)}function Yu(e,t){const n=oo();n.__VUE__=!0;const{insert:s,remove:o,patchProp:i,createElement:r,createText:l,createComment:c,setText:p,setElementText:d,parentNode:m,nextSibling:v,setScopeId:w=Nt,insertStaticContent:I}=e,S=(a,f,E,q=null,N=null,J=null,pe=void 0,fe=null,ie=!!f.dynamicChildren)=>{if(a===f)return;a&&!Sn(a,f)&&(q=L(a),T(a,N,J,!0),a=null),f.patchFlag===-2&&(ie=!1,f.dynamicChildren=null);const{type:Z,ref:ke,shapeFlag:ge}=f;switch(Z){case vo:_(a,f,E,q);break;case rt:C(a,f,E,q);break;case Rs:a==null&&z(f,E,q,pe);break;case ve:F(a,f,E,q,N,J,pe,fe,ie);break;default:ge&1?Q(a,f,E,q,N,J,pe,fe,ie):ge&6?te(a,f,E,q,N,J,pe,fe,ie):(ge&64||ge&128)&&Z.process(a,f,E,q,N,J,pe,fe,ie,y)}ke!=null&&N?ts(ke,a&&a.ref,J,f||a,!f):ke==null&&a&&a.ref!=null&&ts(a.ref,null,J,a,!0)},_=(a,f,E,q)=>{if(a==null)s(f.el=l(f.children),E,q);else{const N=f.el=a.el;f.children!==a.children&&p(N,f.children)}},C=(a,f,E,q)=>{a==null?s(f.el=c(f.children||""),E,q):f.el=a.el},z=(a,f,E,q)=>{[a.el,a.anchor]=I(a.children,f,E,q,a.el,a.anchor)},K=({el:a,anchor:f},E,q)=>{let N;for(;a&&a!==f;)N=v(a),s(a,E,q),a=N;s(f,E,q)},V=({el:a,anchor:f})=>{let E;for(;a&&a!==f;)E=v(a),o(a),a=E;o(f)},Q=(a,f,E,q,N,J,pe,fe,ie)=>{if(f.type==="svg"?pe="svg":f.type==="math"&&(pe="mathml"),a==null)D(f,E,q,N,J,pe,fe,ie);else{const Z=a.el&&a.el._isVueCE?a.el:null;try{Z&&Z._beginPatch(),O(a,f,N,J,pe,fe,ie)}finally{Z&&Z._endPatch()}}},D=(a,f,E,q,N,J,pe,fe)=>{let ie,Z;const{props:ke,shapeFlag:ge,transition:$e,dirs:Ce}=a;if(ie=a.el=r(a.type,J,ke&&ke.is,ke),ge&8?d(ie,a.children):ge&16&&ue(a.children,ie,null,q,N,Ao(a,J),pe,fe),Ce&&yn(a,null,q,"created"),ae(ie,a,a.scopeId,pe,q),ke){for(const Ne in ke)Ne!=="value"&&!Zn(Ne)&&i(ie,Ne,null,ke[Ne],J,q);"value"in ke&&i(ie,"value",null,ke.value,J),(Z=ke.onVnodeBeforeMount)&&Lt(Z,q,a)}Ce&&yn(a,null,q,"beforeMount");const Ie=Xu(N,$e);Ie&&$e.beforeEnter(ie),s(ie,f,E),((Z=ke&&ke.onVnodeMounted)||Ie||Ce)&&ht(()=>{Z&&Lt(Z,q,a),Ie&&$e.enter(ie),Ce&&yn(a,null,q,"mounted")},N)},ae=(a,f,E,q,N)=>{if(E&&w(a,E),q)for(let J=0;J<q.length;J++)w(a,q[J]);if(N){let J=N.subTree;if(f===J||ha(J.type)&&(J.ssContent===f||J.ssFallback===f)){const pe=N.vnode;ae(a,pe,pe.scopeId,pe.slotScopeIds,N.parent)}}},ue=(a,f,E,q,N,J,pe,fe,ie=0)=>{for(let Z=ie;Z<a.length;Z++){const ke=a[Z]=fe?Kt(a[Z]):Dt(a[Z]);S(null,ke,f,E,q,N,J,pe,fe)}},O=(a,f,E,q,N,J,pe)=>{const fe=f.el=a.el;let{patchFlag:ie,dynamicChildren:Z,dirs:ke}=f;ie|=a.patchFlag&16;const ge=a.props||je,$e=f.props||je;let Ce;if(E&&_n(E,!1),(Ce=$e.onVnodeBeforeUpdate)&&Lt(Ce,E,f,a),ke&&yn(f,a,E,"beforeUpdate"),E&&_n(E,!0),(ge.innerHTML&&$e.innerHTML==null||ge.textContent&&$e.textContent==null)&&d(fe,""),Z?R(a.dynamicChildren,Z,fe,E,q,Ao(f,N),J):pe||W(a,f,fe,null,E,q,Ao(f,N),J,!1),ie>0){if(ie&16)de(fe,ge,$e,E,N);else if(ie&2&&ge.class!==$e.class&&i(fe,"class",null,$e.class,N),ie&4&&i(fe,"style",ge.style,$e.style,N),ie&8){const Ie=f.dynamicProps;for(let Ne=0;Ne<Ie.length;Ne++){const Ae=Ie[Ne],Je=ge[Ae],et=$e[Ae];(et!==Je||Ae==="value")&&i(fe,Ae,Je,et,N,E)}}ie&1&&a.children!==f.children&&d(fe,f.children)}else!pe&&Z==null&&de(fe,ge,$e,E,N);((Ce=$e.onVnodeUpdated)||ke)&&ht(()=>{Ce&&Lt(Ce,E,f,a),ke&&yn(f,a,E,"updated")},q)},R=(a,f,E,q,N,J,pe)=>{for(let fe=0;fe<f.length;fe++){const ie=a[fe],Z=f[fe],ke=ie.el&&(ie.type===ve||!Sn(ie,Z)||ie.shapeFlag&198)?m(ie.el):E;S(ie,Z,ke,null,q,N,J,pe,!0)}},de=(a,f,E,q,N)=>{if(f!==E){if(f!==je)for(const J in f)!Zn(J)&&!(J in E)&&i(a,J,f[J],null,N,q);for(const J in E){if(Zn(J))continue;const pe=E[J],fe=f[J];pe!==fe&&J!=="value"&&i(a,J,fe,pe,N,q)}"value"in E&&i(a,"value",f.value,E.value,N)}},F=(a,f,E,q,N,J,pe,fe,ie)=>{const Z=f.el=a?a.el:l(""),ke=f.anchor=a?a.anchor:l("");let{patchFlag:ge,dynamicChildren:$e,slotScopeIds:Ce}=f;Ce&&(fe=fe?fe.concat(Ce):Ce),a==null?(s(Z,E,q),s(ke,E,q),ue(f.children||[],E,ke,N,J,pe,fe,ie)):ge>0&&ge&64&&$e&&a.dynamicChildren&&a.dynamicChildren.length===$e.length?(R(a.dynamicChildren,$e,E,N,J,pe,fe),(f.key!=null||N&&f===N.subTree)&&da(a,f,!0)):W(a,f,E,ke,N,J,pe,fe,ie)},te=(a,f,E,q,N,J,pe,fe,ie)=>{f.slotScopeIds=fe,a==null?f.shapeFlag&512?N.ctx.activate(f,E,q,pe,ie):ce(f,E,q,N,J,pe,ie):B(a,f,ie)},ce=(a,f,E,q,N,J,pe)=>{const fe=a.component=od(a,q,N);if(co(a)&&(fe.ctx.renderer=y),id(fe,!1,pe),fe.asyncDep){if(N&&N.registerDep(fe,se,pe),!a.el){const ie=fe.subTree=Re(rt);C(null,ie,f,E),a.placeholder=ie.el}}else se(fe,a,f,E,N,J,pe)},B=(a,f,E)=>{const q=f.component=a.component;if(Hu(a,f,E))if(q.asyncDep&&!q.asyncResolved){oe(q,f,E);return}else q.next=f,q.update();else f.el=a.el,q.vnode=f},se=(a,f,E,q,N,J,pe)=>{const fe=()=>{if(a.isMounted){let{next:ge,bu:$e,u:Ce,parent:Ie,vnode:Ne}=a;{const U=fa(a);if(U){ge&&(ge.el=Ne.el,oe(a,ge,pe)),U.asyncDep.then(()=>{ht(()=>{a.isUnmounted||Z()},N)});return}}let Ae=ge,Je;_n(a,!1),ge?(ge.el=Ne.el,oe(a,ge,pe)):ge=Ne,$e&&So($e),(Je=ge.props&&ge.props.onVnodeBeforeUpdate)&&Lt(Je,Ie,ge,Ne),_n(a,!0);const et=nr(a),pt=a.subTree;a.subTree=et,S(pt,et,m(pt.el),L(pt),a,N,J),ge.el=et.el,Ae===null&&ju(a,et.el),Ce&&ht(Ce,N),(Je=ge.props&&ge.props.onVnodeUpdated)&&ht(()=>Lt(Je,Ie,ge,Ne),N)}else{let ge;const{el:$e,props:Ce}=f,{bm:Ie,m:Ne,parent:Ae,root:Je,type:et}=a,pt=Dn(f);_n(a,!1),Ie&&So(Ie),!pt&&(ge=Ce&&Ce.onVnodeBeforeMount)&&Lt(ge,Ae,f),_n(a,!0);{Je.ce&&Je.ce._hasShadowRoot()&&Je.ce._injectChildStyle(et);const U=a.subTree=nr(a);S(null,U,E,q,a,N,J),f.el=U.el}if(Ne&&ht(Ne,N),!pt&&(ge=Ce&&Ce.onVnodeMounted)){const U=f;ht(()=>Lt(ge,Ae,U),N)}(f.shapeFlag&256||Ae&&Dn(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&a.a&&ht(a.a,N),a.isMounted=!0,f=E=q=null}};a.scope.on();const ie=a.effect=new wl(fe);a.scope.off();const Z=a.update=ie.run.bind(ie),ke=a.job=ie.runIfDirty.bind(ie);ke.i=a,ke.id=a.uid,ie.scheduler=()=>Ci(ke),_n(a,!0),Z()},oe=(a,f,E)=>{f.component=a;const q=a.vnode.props;a.vnode=f,a.next=null,Uu(a,f.props,q,E),Gu(a,f.children,E),Xt(),qi(a),Zt()},W=(a,f,E,q,N,J,pe,fe,ie=!1)=>{const Z=a&&a.children,ke=a?a.shapeFlag:0,ge=f.children,{patchFlag:$e,shapeFlag:Ce}=f;if($e>0){if($e&128){we(Z,ge,E,q,N,J,pe,fe,ie);return}else if($e&256){re(Z,ge,E,q,N,J,pe,fe,ie);return}}Ce&8?(ke&16&&$(Z,N,J),ge!==Z&&d(E,ge)):ke&16?Ce&16?we(Z,ge,E,q,N,J,pe,fe,ie):$(Z,N,J,!0):(ke&8&&d(E,""),Ce&16&&ue(ge,E,q,N,J,pe,fe,ie))},re=(a,f,E,q,N,J,pe,fe,ie)=>{a=a||Ln,f=f||Ln;const Z=a.length,ke=f.length,ge=Math.min(Z,ke);let $e;for($e=0;$e<ge;$e++){const Ce=f[$e]=ie?Kt(f[$e]):Dt(f[$e]);S(a[$e],Ce,E,null,N,J,pe,fe,ie)}Z>ke?$(a,N,J,!0,!1,ge):ue(f,E,q,N,J,pe,fe,ie,ge)},we=(a,f,E,q,N,J,pe,fe,ie)=>{let Z=0;const ke=f.length;let ge=a.length-1,$e=ke-1;for(;Z<=ge&&Z<=$e;){const Ce=a[Z],Ie=f[Z]=ie?Kt(f[Z]):Dt(f[Z]);if(Sn(Ce,Ie))S(Ce,Ie,E,null,N,J,pe,fe,ie);else break;Z++}for(;Z<=ge&&Z<=$e;){const Ce=a[ge],Ie=f[$e]=ie?Kt(f[$e]):Dt(f[$e]);if(Sn(Ce,Ie))S(Ce,Ie,E,null,N,J,pe,fe,ie);else break;ge--,$e--}if(Z>ge){if(Z<=$e){const Ce=$e+1,Ie=Ce<ke?f[Ce].el:q;for(;Z<=$e;)S(null,f[Z]=ie?Kt(f[Z]):Dt(f[Z]),E,Ie,N,J,pe,fe,ie),Z++}}else if(Z>$e)for(;Z<=ge;)T(a[Z],N,J,!0),Z++;else{const Ce=Z,Ie=Z,Ne=new Map;for(Z=Ie;Z<=$e;Z++){const x=f[Z]=ie?Kt(f[Z]):Dt(f[Z]);x.key!=null&&Ne.set(x.key,Z)}let Ae,Je=0;const et=$e-Ie+1;let pt=!1,U=0;const j=new Array(et);for(Z=0;Z<et;Z++)j[Z]=0;for(Z=Ce;Z<=ge;Z++){const x=a[Z];if(Je>=et){T(x,N,J,!0);continue}let X;if(x.key!=null)X=Ne.get(x.key);else for(Ae=Ie;Ae<=$e;Ae++)if(j[Ae-Ie]===0&&Sn(x,f[Ae])){X=Ae;break}X===void 0?T(x,N,J,!0):(j[X-Ie]=Z+1,X>=U?U=X:pt=!0,S(x,f[X],E,null,N,J,pe,fe,ie),Je++)}const ye=pt?Zu(j):Ln;for(Ae=ye.length-1,Z=et-1;Z>=0;Z--){const x=Ie+Z,X=f[x],be=f[x+1],Se=x+1<ke?be.el||pa(be):q;j[Z]===0?S(null,X,E,Se,N,J,pe,fe,ie):pt&&(Ae<0||Z!==ye[Ae]?H(X,E,Se,2):Ae--)}}},H=(a,f,E,q,N=null)=>{const{el:J,type:pe,transition:fe,children:ie,shapeFlag:Z}=a;if(Z&6){H(a.component.subTree,f,E,q);return}if(Z&128){a.suspense.move(f,E,q);return}if(Z&64){pe.move(a,f,E,y);return}if(pe===ve){s(J,f,E);for(let ge=0;ge<ie.length;ge++)H(ie[ge],f,E,q);s(a.anchor,f,E);return}if(pe===Rs){K(a,f,E);return}if(q!==2&&Z&1&&fe)if(q===0)fe.beforeEnter(J),s(J,f,E),ht(()=>fe.enter(J),N);else{const{leave:ge,delayLeave:$e,afterLeave:Ce}=fe,Ie=()=>{a.ctx.isUnmounted?o(J):s(J,f,E)},Ne=()=>{J._isLeaving&&J[Rt](!0),ge(J,()=>{Ie(),Ce&&Ce()})};$e?$e(J,Ie,Ne):Ne()}else s(J,f,E)},T=(a,f,E,q=!1,N=!1)=>{const{type:J,props:pe,ref:fe,children:ie,dynamicChildren:Z,shapeFlag:ke,patchFlag:ge,dirs:$e,cacheIndex:Ce}=a;if(ge===-2&&(N=!1),fe!=null&&(Xt(),ts(fe,null,E,a,!0),Zt()),Ce!=null&&(f.renderCache[Ce]=void 0),ke&256){f.ctx.deactivate(a);return}const Ie=ke&1&&$e,Ne=!Dn(a);let Ae;if(Ne&&(Ae=pe&&pe.onVnodeBeforeUnmount)&&Lt(Ae,f,a),ke&6)ne(a.component,E,q);else{if(ke&128){a.suspense.unmount(E,q);return}Ie&&yn(a,null,f,"beforeUnmount"),ke&64?a.type.remove(a,f,E,y,q):Z&&!Z.hasOnce&&(J!==ve||ge>0&&ge&64)?$(Z,f,E,!1,!0):(J===ve&&ge&384||!N&&ke&16)&&$(ie,f,E),q&&P(a)}(Ne&&(Ae=pe&&pe.onVnodeUnmounted)||Ie)&&ht(()=>{Ae&&Lt(Ae,f,a),Ie&&yn(a,null,f,"unmounted")},E)},P=a=>{const{type:f,el:E,anchor:q,transition:N}=a;if(f===ve){ee(E,q);return}if(f===Rs){V(a);return}const J=()=>{o(E),N&&!N.persisted&&N.afterLeave&&N.afterLeave()};if(a.shapeFlag&1&&N&&!N.persisted){const{leave:pe,delayLeave:fe}=N,ie=()=>pe(E,J);fe?fe(a.el,J,ie):ie()}else J()},ee=(a,f)=>{let E;for(;a!==f;)E=v(a),o(a),a=E;o(f)},ne=(a,f,E)=>{const{bum:q,scope:N,job:J,subTree:pe,um:fe,m:ie,a:Z}=a;ir(ie),ir(Z),q&&So(q),N.stop(),J&&(J.flags|=8,T(pe,a,f,E)),fe&&ht(fe,f),ht(()=>{a.isUnmounted=!0},f)},$=(a,f,E,q=!1,N=!1,J=0)=>{for(let pe=J;pe<a.length;pe++)T(a[pe],f,E,q,N)},L=a=>{if(a.shapeFlag&6)return L(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const f=v(a.anchor||a.el),E=f&&f[du];return E?v(E):f};let G=!1;const k=(a,f,E)=>{let q;a==null?f._vnode&&(T(f._vnode,null,null,!0),q=f._vnode.component):S(f._vnode||null,a,f,null,null,null,E),f._vnode=a,G||(G=!0,qi(q),Fl(),G=!1)},y={p:S,um:T,m:H,r:P,mt:ce,mc:ue,pc:W,pbc:R,n:L,o:e};return{render:k,hydrate:void 0,createApp:Ru(k)}}function Ao({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function _n({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Xu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function da(e,t,n=!1){const s=e.children,o=t.children;if(Ee(s)&&Ee(o))for(let i=0;i<s.length;i++){const r=s[i];let l=o[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[i]=Kt(o[i]),l.el=r.el),!n&&l.patchFlag!==-2&&da(r,l)),l.type===vo&&(l.patchFlag===-1&&(l=o[i]=Kt(l)),l.el=r.el),l.type===rt&&!l.el&&(l.el=r.el)}}function Zu(e){const t=e.slice(),n=[0];let s,o,i,r,l;const c=e.length;for(s=0;s<c;s++){const p=e[s];if(p!==0){if(o=n[n.length-1],e[o]<p){t[s]=o,n.push(s);continue}for(i=0,r=n.length-1;i<r;)l=i+r>>1,e[n[l]]<p?i=l+1:r=l;p<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,r=n[i-1];i-- >0;)n[i]=r,r=t[r];return n}function fa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fa(t)}function ir(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function pa(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?pa(t.subTree):null}const ha=e=>e.__isSuspense;function Qu(e,t){t&&t.pendingBranch?Ee(e)?t.effects.push(...e):t.effects.push(e):nu(e)}const ve=Symbol.for("v-fgt"),vo=Symbol.for("v-txt"),rt=Symbol.for("v-cmt"),Rs=Symbol.for("v-stc"),ss=[];let gt=null;function g(e=!1){ss.push(gt=e?null:[])}function ed(){ss.pop(),gt=ss[ss.length-1]||null}let vs=1;function Ks(e,t=!1){vs+=e,e<0&&gt&&t&&(gt.hasOnce=!0)}function va(e){return e.dynamicChildren=vs>0?gt||Ln:null,ed(),vs>0&&gt&&gt.push(e),e}function b(e,t,n,s,o,i){return va(u(e,t,n,s,o,i,!0))}function dt(e,t,n,s,o){return va(Re(e,t,n,s,o,!0))}function ms(e){return e?e.__v_isVNode===!0:!1}function Sn(e,t){return e.type===t.type&&e.key===t.key}const ma=({key:e})=>e??null,Ds=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?We(e)||qe(e)||Pe(e)?{i:nt,r:e,k:t,f:!!n}:e:null);function u(e,t=null,n=null,s=0,o=null,i=e===ve?0:1,r=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ma(t),ref:t&&Ds(t),scopeId:ao,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:nt};return l?(Ai(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=We(n)?8:16),vs>0&&!r&&gt&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&gt.push(c),c}const Re=td;function td(e,t=null,n=null,s=0,o=null,i=!1){if((!e||e===Jl)&&(e=rt),ms(e)){const l=hn(e,t,!0);return n&&Ai(l,n),vs>0&&!i&&gt&&(l.shapeFlag&6?gt[gt.indexOf(e)]=l:gt.push(l)),l.patchFlag=-2,l}if(cd(e)&&(e=e.__vccOpts),t){t=ga(t);let{class:l,style:c}=t;l&&!We(l)&&(t.class=he(l)),ze(c)&&(ro(c)&&!Ee(c)&&(c=Ze({},c)),t.style=Me(c))}const r=We(e)?1:ha(e)?128:Hl(e)?64:ze(e)?4:Pe(e)?2:0;return u(e,t,n,s,o,r,i,!0)}function ga(e){return e?ro(e)||ia(e)?Ze({},e):e:null}function hn(e,t,n=!1,s=!1){const{props:o,ref:i,patchFlag:r,children:l,transition:c}=e,p=t?Li(o||{},t):o,d={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&ma(p),ref:t&&t.ref?n&&i?Ee(i)?i.concat(Ds(t)):[i,Ds(t)]:Ds(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ve?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&hn(e.ssContent),ssFallback:e.ssFallback&&hn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&s&&fs(d,c.clone(d)),d}function xe(e=" ",t=0){return Re(vo,null,e,t)}function ya(e,t){const n=Re(Rs,null,e);return n.staticCount=t,n}function le(e="",t=!1){return t?(g(),dt(rt,null,e)):Re(rt,null,e)}function Dt(e){return e==null||typeof e=="boolean"?Re(rt):Ee(e)?Re(ve,null,e.slice()):ms(e)?Kt(e):Re(vo,null,String(e))}function Kt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:hn(e)}function Ai(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Ee(t))n=16;else if(typeof t=="object")if(s&65){const o=t.default;o&&(o._c&&(o._d=!1),Ai(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!ia(t)?t._ctx=nt:o===3&&nt&&(nt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Pe(t)?(t={default:t,_ctx:nt},n=32):(t=String(t),s&64?(n=16,t=[xe(t)]):n=8);e.children=t,e.shapeFlag|=n}function Li(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const o in s)if(o==="class")t.class!==s.class&&(t.class=he([t.class,s.class]));else if(o==="style")t.style=Me([t.style,s.style]);else if(eo(o)){const i=t[o],r=s[o];r&&i!==r&&!(Ee(i)&&i.includes(r))&&(t[o]=i?[].concat(i,r):r)}else o!==""&&(t[o]=s[o])}return t}function Lt(e,t,n,s=null){It(e,t,7,[n,s])}const nd=ea();let sd=0;function od(e,t,n){const s=e.type,o=(t?t.appContext:e.appContext)||nd,i={uid:sd++,vnode:e,type:s,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new yl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:la(s,o),emitsOptions:ta(s,o),emit:null,emitted:null,propsDefaults:je,inheritAttrs:s.inheritAttrs,ctx:je,data:je,props:je,attrs:je,slots:je,refs:je,setupState:je,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Nu.bind(null,i),e.ce&&e.ce(i),i}let lt=null;const Ms=()=>lt||nt;let Ws,ei;{const e=oo(),t=(n,s)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(s),i=>{o.length>1?o.forEach(r=>r(i)):o[0](i)}};Ws=t("__VUE_INSTANCE_SETTERS__",n=>lt=n),ei=t("__VUE_SSR_SETTERS__",n=>gs=n)}const Es=e=>{const t=lt;return Ws(e),e.scope.on(),()=>{e.scope.off(),Ws(t)}},rr=()=>{lt&&lt.scope.off(),Ws(null)};function _a(e){return e.vnode.shapeFlag&4}let gs=!1;function id(e,t=!1,n=!1){t&&ei(t);const{props:s,children:o}=e.vnode,i=_a(e);Vu(e,s,i,t),qu(e,o,n||t);const r=i?rd(e,t):void 0;return t&&ei(!1),r}function rd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Cu);const{setup:s}=n;if(s){Xt();const o=e.setupContext=s.length>1?wa(e):null,i=Es(e),r=Ts(s,e,0,[e.props,o]),l=dl(r);if(Zt(),i(),(l||e.sp)&&!Dn(e)&&ql(e),l){if(r.then(rr,rr),t)return r.then(c=>{lr(e,c)}).catch(c=>{lo(c,e,0)});e.asyncDep=r}else lr(e,r)}else ba(e)}function lr(e,t,n){Pe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ze(t)&&(e.setupState=Rl(t)),ba(e)}function ba(e,t,n){const s=e.type;e.render||(e.render=s.render||Nt);{const o=Es(e);Xt();try{Eu(e)}finally{Zt(),o()}}}const ld={get(e,t){return it(e,"get",""),e[t]}};function wa(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ld),slots:e.slots,emit:e.emit,expose:t}}function mo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Rl(Si(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ns)return ns[n](e)},has(t,n){return n in t||n in ns}})):e.proxy}function ad(e,t=!0){return Pe(e)?e.displayName||e.name:e.name||t&&e.__name}function cd(e){return Pe(e)&&"__vccOpts"in e}const A=(e,t)=>Xc(e,t,gs);function Oi(e,t,n){try{Ks(-1);const s=arguments.length;return s===2?ze(t)&&!Ee(t)?ms(t)?Re(e,null,[t]):Re(e,t):Re(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&ms(n)&&(n=[n]),Re(e,t,n))}finally{Ks(1)}}const ud="3.5.28";/**
14
- * @vue/runtime-dom v3.5.28
15
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
- * @license MIT
17
- **/let ti;const ar=typeof window<"u"&&window.trustedTypes;if(ar)try{ti=ar.createPolicy("vue",{createHTML:e=>e})}catch{}const ka=ti?e=>ti.createHTML(e):e=>e,dd="http://www.w3.org/2000/svg",fd="http://www.w3.org/1998/Math/MathML",Ut=typeof document<"u"?document:null,cr=Ut&&Ut.createElement("template"),pd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const o=t==="svg"?Ut.createElementNS(dd,e):t==="mathml"?Ut.createElementNS(fd,e):n?Ut.createElement(e,{is:n}):Ut.createElement(e);return e==="select"&&s&&s.multiple!=null&&o.setAttribute("multiple",s.multiple),o},createText:e=>Ut.createTextNode(e),createComment:e=>Ut.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ut.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,o,i){const r=n?n.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===i||!(o=o.nextSibling)););else{cr.innerHTML=ka(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=cr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},nn="transition",Wn="animation",ys=Symbol("_vtc"),xa={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},hd=Ze({},jl,xa),vd=e=>(e.displayName="Transition",e.props=hd,e),zn=vd((e,{slots:t})=>Oi(hu,md(e),t)),bn=(e,t=[])=>{Ee(e)?e.forEach(n=>n(...t)):e&&e(...t)},ur=e=>e?Ee(e)?e.some(t=>t.length>1):e.length>1:!1;function md(e){const t={};for(const F in e)F in xa||(t[F]=e[F]);if(e.css===!1)return t;const{name:n="v",type:s,duration:o,enterFromClass:i=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:p=r,appearToClass:d=l,leaveFromClass:m=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:w=`${n}-leave-to`}=e,I=gd(o),S=I&&I[0],_=I&&I[1],{onBeforeEnter:C,onEnter:z,onEnterCancelled:K,onLeave:V,onLeaveCancelled:Q,onBeforeAppear:D=C,onAppear:ae=z,onAppearCancelled:ue=K}=t,O=(F,te,ce,B)=>{F._enterCancelled=B,wn(F,te?d:l),wn(F,te?p:r),ce&&ce()},R=(F,te)=>{F._isLeaving=!1,wn(F,m),wn(F,w),wn(F,v),te&&te()},de=F=>(te,ce)=>{const B=F?ae:z,se=()=>O(te,F,ce);bn(B,[te,se]),dr(()=>{wn(te,F?c:i),Vt(te,F?d:l),ur(B)||fr(te,s,S,se)})};return Ze(t,{onBeforeEnter(F){bn(C,[F]),Vt(F,i),Vt(F,r)},onBeforeAppear(F){bn(D,[F]),Vt(F,c),Vt(F,p)},onEnter:de(!1),onAppear:de(!0),onLeave(F,te){F._isLeaving=!0;const ce=()=>R(F,te);Vt(F,m),F._enterCancelled?(Vt(F,v),vr(F)):(vr(F),Vt(F,v)),dr(()=>{F._isLeaving&&(wn(F,m),Vt(F,w),ur(V)||fr(F,s,_,ce))}),bn(V,[F,ce])},onEnterCancelled(F){O(F,!1,void 0,!0),bn(K,[F])},onAppearCancelled(F){O(F,!0,void 0,!0),bn(ue,[F])},onLeaveCancelled(F){R(F),bn(Q,[F])}})}function gd(e){if(e==null)return null;if(ze(e))return[Lo(e.enter),Lo(e.leave)];{const t=Lo(e);return[t,t]}}function Lo(e){return hc(e)}function Vt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[ys]||(e[ys]=new Set)).add(t)}function wn(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[ys];n&&(n.delete(t),n.size||(e[ys]=void 0))}function dr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let yd=0;function fr(e,t,n,s){const o=e._endId=++yd,i=()=>{o===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:r,timeout:l,propCount:c}=_d(e,t);if(!r)return s();const p=r+"end";let d=0;const m=()=>{e.removeEventListener(p,v),i()},v=w=>{w.target===e&&++d>=c&&m()};setTimeout(()=>{d<c&&m()},l+1),e.addEventListener(p,v)}function _d(e,t){const n=window.getComputedStyle(e),s=I=>(n[I]||"").split(", "),o=s(`${nn}Delay`),i=s(`${nn}Duration`),r=pr(o,i),l=s(`${Wn}Delay`),c=s(`${Wn}Duration`),p=pr(l,c);let d=null,m=0,v=0;t===nn?r>0&&(d=nn,m=r,v=i.length):t===Wn?p>0&&(d=Wn,m=p,v=c.length):(m=Math.max(r,p),d=m>0?r>p?nn:Wn:null,v=d?d===nn?i.length:c.length:0);const w=d===nn&&/\b(?:transform|all)(?:,|$)/.test(s(`${nn}Property`).toString());return{type:d,timeout:m,propCount:v,hasTransform:w}}function pr(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>hr(n)+hr(e[s])))}function hr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function vr(e){return(e?e.ownerDocument:document).body.offsetHeight}function bd(e,t,n){const s=e[ys];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const qs=Symbol("_vod"),$a=Symbol("_vsh"),wd={name:"show",beforeMount(e,{value:t},{transition:n}){e[qs]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):qn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),qn(e,!0),s.enter(e)):s.leave(e,()=>{qn(e,!1)}):qn(e,t))},beforeUnmount(e,{value:t}){qn(e,t)}};function qn(e,t){e.style.display=t?e[qs]:"none",e[$a]=!t}const kd=Symbol(""),xd=/(?:^|;)\s*display\s*:/;function $d(e,t,n){const s=e.style,o=We(n);let i=!1;if(n&&!o){if(t)if(We(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&Ns(s,l,"")}else for(const r in t)n[r]==null&&Ns(s,r,"");for(const r in n)r==="display"&&(i=!0),Ns(s,r,n[r])}else if(o){if(t!==n){const r=s[kd];r&&(n+=";"+r),s.cssText=n,i=xd.test(n)}}else t&&e.removeAttribute("style");qs in e&&(e[qs]=i?s.display:"",e[$a]&&(s.display="none"))}const mr=/\s*!important$/;function Ns(e,t,n){if(Ee(n))n.forEach(s=>Ns(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Sd(e,t);mr.test(n)?e.setProperty(mn(s),n.replace(mr,""),"important"):e[s]=n}}const gr=["Webkit","Moz","ms"],Oo={};function Sd(e,t){const n=Oo[t];if(n)return n;let s=kt(t);if(s!=="filter"&&s in e)return Oo[t]=s;s=so(s);for(let o=0;o<gr.length;o++){const i=gr[o]+s;if(i in e)return Oo[t]=i}return t}const yr="http://www.w3.org/1999/xlink";function _r(e,t,n,s,o,i=wc(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(yr,t.slice(6,t.length)):e.setAttributeNS(yr,t,n):n==null||i&&!vl(n)?e.removeAttribute(t):e.setAttribute(t,i?"":Et(n)?String(n):n)}function br(e,t,n,s,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ka(n):n);return}const i=e.tagName;if(t==="value"&&i!=="PROGRESS"&&!i.includes("-")){const l=i==="OPTION"?e.getAttribute("value")||"":e.value,c=n==null?e.type==="checkbox"?"on":"":String(n);(l!==c||!("_value"in e))&&(e.value=c),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=vl(n):n==null&&l==="string"?(n="",r=!0):l==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(o||t)}function Cd(e,t,n,s){e.addEventListener(t,n,s)}function Td(e,t,n,s){e.removeEventListener(t,n,s)}const wr=Symbol("_vei");function Md(e,t,n,s,o=null){const i=e[wr]||(e[wr]={}),r=i[t];if(s&&r)r.value=s;else{const[l,c]=Ed(t);if(s){const p=i[t]=Ad(s,o);Cd(e,l,p,c)}else r&&(Td(e,l,r,c),i[t]=void 0)}}const kr=/(?:Once|Passive|Capture)$/;function Ed(e){let t;if(kr.test(e)){t={};let s;for(;s=e.match(kr);)e=e.slice(0,e.length-s[0].length),t[s[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):mn(e.slice(2)),t]}let Ro=0;const Pd=Promise.resolve(),Id=()=>Ro||(Pd.then(()=>Ro=0),Ro=Date.now());function Ad(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;It(Ld(s,n.value),t,5,[s])};return n.value=e,n.attached=Id(),n}function Ld(e,t){if(Ee(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>o=>!o._stopped&&s&&s(o))}else return t}const xr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Od=(e,t,n,s,o,i)=>{const r=o==="svg";t==="class"?bd(e,s,r):t==="style"?$d(e,n,s):eo(t)?mi(t)||Md(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Rd(e,t,s,r))?(br(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&_r(e,t,s,r,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!We(s))?br(e,kt(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),_r(e,t,s,r))};function Rd(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&xr(t)&&Pe(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return xr(t)&&We(n)?!1:t in e}const Dd=["ctrl","shift","alt","meta"],Nd={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Dd.some(n=>e[`${n}Key`]&&!t.includes(n))},dn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((o,...i)=>{for(let r=0;r<t.length;r++){const l=Nd[t[r]];if(l&&l(o,t))return}return e(o,...i)}))},Fd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Sa=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(o=>{if(!("key"in o))return;const i=mn(o.key);if(t.some(r=>r===i||Fd[r]===i))return e(o)}))},zd=Ze({patchProp:Od},pd);let $r;function Bd(){return $r||($r=Ju(zd))}const Ca=((...e)=>{const t=Bd().createApp(...e),{mount:n}=t;return t.mount=s=>{const o=jd(s);if(!o)return;const i=t._component;!Pe(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const r=n(o,!1,Hd(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),r},t});function Hd(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function jd(e){return We(e)?document.querySelector(e):e}/*!
18
- * pinia v2.3.1
19
- * (c) 2025 Eduardo San Martin Morote
20
- * @license MIT
21
- */let Ta;const go=e=>Ta=e,Ma=Symbol();function ni(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var os;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(os||(os={}));function Vd(){const e=_l(!0),t=e.run(()=>me({}));let n=[],s=[];const o=Si({install(i){go(o),o._a=i,i.provide(Ma,o),i.config.globalProperties.$pinia=o,s.forEach(r=>n.push(r)),s=[]},use(i){return this._a?n.push(i):s.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Ea=()=>{};function Sr(e,t,n,s=Ea){e.push(t);const o=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),s())};return!n&&bl()&&xc(o),o}function In(e,...t){e.slice().forEach(n=>{n(...t)})}const Ud=e=>e(),Cr=Symbol(),Do=Symbol();function si(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,s)=>e.set(s,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],o=e[n];ni(o)&&ni(s)&&e.hasOwnProperty(n)&&!qe(s)&&!Jt(s)?e[n]=si(o,s):e[n]=s}return e}const Kd=Symbol();function Wd(e){return!ni(e)||!e.hasOwnProperty(Kd)}const{assign:on}=Object;function qd(e){return!!(qe(e)&&e.effect)}function Gd(e,t,n,s){const{state:o,actions:i,getters:r}=t,l=n.state.value[e];let c;function p(){l||(n.state.value[e]=o?o():{});const d=qc(n.state.value[e]);return on(d,i,Object.keys(r||{}).reduce((m,v)=>(m[v]=Si(A(()=>{go(n);const w=n._s.get(e);return r[v].call(w,w)})),m),{}))}return c=Pa(e,p,t,n,s,!0),c}function Pa(e,t,n={},s,o,i){let r;const l=on({actions:{}},n),c={deep:!0};let p,d,m=[],v=[],w;const I=s.state.value[e];!i&&!I&&(s.state.value[e]={});let S;function _(ue){let O;p=d=!1,typeof ue=="function"?(ue(s.state.value[e]),O={type:os.patchFunction,storeId:e,events:w}):(si(s.state.value[e],ue),O={type:os.patchObject,payload:ue,storeId:e,events:w});const R=S=Symbol();Ue().then(()=>{S===R&&(p=!0)}),d=!0,In(m,O,s.state.value[e])}const C=i?function(){const{state:O}=n,R=O?O():{};this.$patch(de=>{on(de,R)})}:Ea;function z(){r.stop(),m=[],v=[],s._s.delete(e)}const K=(ue,O="")=>{if(Cr in ue)return ue[Do]=O,ue;const R=function(){go(s);const de=Array.from(arguments),F=[],te=[];function ce(oe){F.push(oe)}function B(oe){te.push(oe)}In(v,{args:de,name:R[Do],store:Q,after:ce,onError:B});let se;try{se=ue.apply(this&&this.$id===e?this:Q,de)}catch(oe){throw In(te,oe),oe}return se instanceof Promise?se.then(oe=>(In(F,oe),oe)).catch(oe=>(In(te,oe),Promise.reject(oe))):(In(F,se),se)};return R[Cr]=!0,R[Do]=O,R},V={_p:s,$id:e,$onAction:Sr.bind(null,v),$patch:_,$reset:C,$subscribe(ue,O={}){const R=Sr(m,ue,O.detached,()=>de()),de=r.run(()=>Ke(()=>s.state.value[e],F=>{(O.flush==="sync"?d:p)&&ue({storeId:e,type:os.direct,events:w},F)},on({},c,O)));return R},$dispose:z},Q=Cs(V);s._s.set(e,Q);const ae=(s._a&&s._a.runWithContext||Ud)(()=>s._e.run(()=>(r=_l()).run(()=>t({action:K}))));for(const ue in ae){const O=ae[ue];if(qe(O)&&!qd(O)||Jt(O))i||(I&&Wd(O)&&(qe(O)?O.value=I[ue]:si(O,I[ue])),s.state.value[e][ue]=O);else if(typeof O=="function"){const R=K(O,ue);ae[ue]=R,l.actions[ue]=O}}return on(Q,ae),on(Oe(Q),ae),Object.defineProperty(Q,"$state",{get:()=>s.state.value[e],set:ue=>{_(O=>{on(O,ue)})}}),s._p.forEach(ue=>{on(Q,r.run(()=>ue({store:Q,app:s._a,pinia:s,options:l})))}),I&&i&&n.hydrate&&n.hydrate(Q.$state,I),p=!0,d=!0,Q}/*! #__NO_SIDE_EFFECTS__ */function Jd(e,t,n){let s,o;const i=typeof t=="function";s=e,o=i?n:t;function r(l,c){const p=ru();return l=l||(p?xt(Ma,null):null),l&&go(l),l=Ta,l._s.has(s)||(i?Pa(s,t,o,l):Gd(s,o,l)),l._s.get(s)}return r.$id=s,r}const Yd=["top","right","bottom","left"],Tr=["start","end"],Mr=Yd.reduce((e,t)=>e.concat(t,t+"-"+Tr[0],t+"-"+Tr[1]),[]),_s=Math.min,$n=Math.max,Xd={left:"right",right:"left",bottom:"top",top:"bottom"},Zd={start:"end",end:"start"};function oi(e,t,n){return $n(e,_s(t,n))}function En(e,t){return typeof e=="function"?e(t):e}function Bt(e){return e.split("-")[0]}function Tt(e){return e.split("-")[1]}function Ia(e){return e==="x"?"y":"x"}function Ri(e){return e==="y"?"height":"width"}const Qd=new Set(["top","bottom"]);function Gt(e){return Qd.has(Bt(e))?"y":"x"}function Di(e){return Ia(Gt(e))}function Aa(e,t,n){n===void 0&&(n=!1);const s=Tt(e),o=Di(e),i=Ri(o);let r=o==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(r=Js(r)),[r,Js(r)]}function ef(e){const t=Js(e);return[Gs(e),t,Gs(t)]}function Gs(e){return e.replace(/start|end/g,t=>Zd[t])}const Er=["left","right"],Pr=["right","left"],tf=["top","bottom"],nf=["bottom","top"];function sf(e,t,n){switch(e){case"top":case"bottom":return n?t?Pr:Er:t?Er:Pr;case"left":case"right":return t?tf:nf;default:return[]}}function of(e,t,n,s){const o=Tt(e);let i=sf(Bt(e),n==="start",s);return o&&(i=i.map(r=>r+"-"+o),t&&(i=i.concat(i.map(Gs)))),i}function Js(e){return e.replace(/left|right|bottom|top/g,t=>Xd[t])}function rf(e){return{top:0,right:0,bottom:0,left:0,...e}}function La(e){return typeof e!="number"?rf(e):{top:e,right:e,bottom:e,left:e}}function is(e){const{x:t,y:n,width:s,height:o}=e;return{width:s,height:o,top:n,left:t,right:t+s,bottom:n+o,x:t,y:n}}function Ir(e,t,n){let{reference:s,floating:o}=e;const i=Gt(t),r=Di(t),l=Ri(r),c=Bt(t),p=i==="y",d=s.x+s.width/2-o.width/2,m=s.y+s.height/2-o.height/2,v=s[l]/2-o[l]/2;let w;switch(c){case"top":w={x:d,y:s.y-o.height};break;case"bottom":w={x:d,y:s.y+s.height};break;case"right":w={x:s.x+s.width,y:m};break;case"left":w={x:s.x-o.width,y:m};break;default:w={x:s.x,y:s.y}}switch(Tt(t)){case"start":w[r]-=v*(n&&p?-1:1);break;case"end":w[r]+=v*(n&&p?-1:1);break}return w}async function lf(e,t){var n;t===void 0&&(t={});const{x:s,y:o,platform:i,rects:r,elements:l,strategy:c}=e,{boundary:p="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:v=!1,padding:w=0}=En(t,e),I=La(w),_=l[v?m==="floating"?"reference":"floating":m],C=is(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(_)))==null||n?_:_.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:p,rootBoundary:d,strategy:c})),z=m==="floating"?{x:s,y:o,width:r.floating.width,height:r.floating.height}:r.reference,K=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),V=await(i.isElement==null?void 0:i.isElement(K))?await(i.getScale==null?void 0:i.getScale(K))||{x:1,y:1}:{x:1,y:1},Q=is(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:z,offsetParent:K,strategy:c}):z);return{top:(C.top-Q.top+I.top)/V.y,bottom:(Q.bottom-C.bottom+I.bottom)/V.y,left:(C.left-Q.left+I.left)/V.x,right:(Q.right-C.right+I.right)/V.x}}const af=async(e,t,n)=>{const{placement:s="bottom",strategy:o="absolute",middleware:i=[],platform:r}=n,l=i.filter(Boolean),c=await(r.isRTL==null?void 0:r.isRTL(t));let p=await r.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:m}=Ir(p,s,c),v=s,w={},I=0;for(let _=0;_<l.length;_++){var S;const{name:C,fn:z}=l[_],{x:K,y:V,data:Q,reset:D}=await z({x:d,y:m,initialPlacement:s,placement:v,strategy:o,middlewareData:w,rects:p,platform:{...r,detectOverflow:(S=r.detectOverflow)!=null?S:lf},elements:{reference:e,floating:t}});d=K??d,m=V??m,w={...w,[C]:{...w[C],...Q}},D&&I<=50&&(I++,typeof D=="object"&&(D.placement&&(v=D.placement),D.rects&&(p=D.rects===!0?await r.getElementRects({reference:e,floating:t,strategy:o}):D.rects),{x:d,y:m}=Ir(p,v,c)),_=-1)}return{x:d,y:m,placement:v,strategy:o,middlewareData:w}},cf=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:o,rects:i,platform:r,elements:l,middlewareData:c}=t,{element:p,padding:d=0}=En(e,t)||{};if(p==null)return{};const m=La(d),v={x:n,y:s},w=Di(o),I=Ri(w),S=await r.getDimensions(p),_=w==="y",C=_?"top":"left",z=_?"bottom":"right",K=_?"clientHeight":"clientWidth",V=i.reference[I]+i.reference[w]-v[w]-i.floating[I],Q=v[w]-i.reference[w],D=await(r.getOffsetParent==null?void 0:r.getOffsetParent(p));let ae=D?D[K]:0;(!ae||!await(r.isElement==null?void 0:r.isElement(D)))&&(ae=l.floating[K]||i.floating[I]);const ue=V/2-Q/2,O=ae/2-S[I]/2-1,R=_s(m[C],O),de=_s(m[z],O),F=R,te=ae-S[I]-de,ce=ae/2-S[I]/2+ue,B=oi(F,ce,te),se=!c.arrow&&Tt(o)!=null&&ce!==B&&i.reference[I]/2-(ce<F?R:de)-S[I]/2<0,oe=se?ce<F?ce-F:ce-te:0;return{[w]:v[w]+oe,data:{[w]:B,centerOffset:ce-B-oe,...se&&{alignmentOffset:oe}},reset:se}}});function uf(e,t,n){return(e?[...n.filter(o=>Tt(o)===e),...n.filter(o=>Tt(o)!==e)]:n.filter(o=>Bt(o)===o)).filter(o=>e?Tt(o)===e||(t?Gs(o)!==o:!1):!0)}const df=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,s,o;const{rects:i,middlewareData:r,placement:l,platform:c,elements:p}=t,{crossAxis:d=!1,alignment:m,allowedPlacements:v=Mr,autoAlignment:w=!0,...I}=En(e,t),S=m!==void 0||v===Mr?uf(m||null,w,v):v,_=await c.detectOverflow(t,I),C=((n=r.autoPlacement)==null?void 0:n.index)||0,z=S[C];if(z==null)return{};const K=Aa(z,i,await(c.isRTL==null?void 0:c.isRTL(p.floating)));if(l!==z)return{reset:{placement:S[0]}};const V=[_[Bt(z)],_[K[0]],_[K[1]]],Q=[...((s=r.autoPlacement)==null?void 0:s.overflows)||[],{placement:z,overflows:V}],D=S[C+1];if(D)return{data:{index:C+1,overflows:Q},reset:{placement:D}};const ae=Q.map(R=>{const de=Tt(R.placement);return[R.placement,de&&d?R.overflows.slice(0,2).reduce((F,te)=>F+te,0):R.overflows[0],R.overflows]}).sort((R,de)=>R[1]-de[1]),O=((o=ae.filter(R=>R[2].slice(0,Tt(R[0])?2:3).every(de=>de<=0))[0])==null?void 0:o[0])||ae[0][0];return O!==l?{data:{index:C+1,overflows:Q},reset:{placement:O}}:{}}}},ff=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:o,middlewareData:i,rects:r,initialPlacement:l,platform:c,elements:p}=t,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:v,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:I="none",flipAlignment:S=!0,..._}=En(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const C=Bt(o),z=Gt(l),K=Bt(l)===l,V=await(c.isRTL==null?void 0:c.isRTL(p.floating)),Q=v||(K||!S?[Js(l)]:ef(l)),D=I!=="none";!v&&D&&Q.push(...of(l,S,I,V));const ae=[l,...Q],ue=await c.detectOverflow(t,_),O=[];let R=((s=i.flip)==null?void 0:s.overflows)||[];if(d&&O.push(ue[C]),m){const ce=Aa(o,r,V);O.push(ue[ce[0]],ue[ce[1]])}if(R=[...R,{placement:o,overflows:O}],!O.every(ce=>ce<=0)){var de,F;const ce=(((de=i.flip)==null?void 0:de.index)||0)+1,B=ae[ce];if(B&&(!(m==="alignment"?z!==Gt(B):!1)||R.every(W=>Gt(W.placement)===z?W.overflows[0]>0:!0)))return{data:{index:ce,overflows:R},reset:{placement:B}};let se=(F=R.filter(oe=>oe.overflows[0]<=0).sort((oe,W)=>oe.overflows[1]-W.overflows[1])[0])==null?void 0:F.placement;if(!se)switch(w){case"bestFit":{var te;const oe=(te=R.filter(W=>{if(D){const re=Gt(W.placement);return re===z||re==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(re=>re>0).reduce((re,we)=>re+we,0)]).sort((W,re)=>W[1]-re[1])[0])==null?void 0:te[0];oe&&(se=oe);break}case"initialPlacement":se=l;break}if(o!==se)return{reset:{placement:se}}}return{}}}},pf=new Set(["left","top"]);async function hf(e,t){const{placement:n,platform:s,elements:o}=e,i=await(s.isRTL==null?void 0:s.isRTL(o.floating)),r=Bt(n),l=Tt(n),c=Gt(n)==="y",p=pf.has(r)?-1:1,d=i&&c?-1:1,m=En(t,e);let{mainAxis:v,crossAxis:w,alignmentAxis:I}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof I=="number"&&(w=l==="end"?I*-1:I),c?{x:w*d,y:v*p}:{x:v*p,y:w*d}}const vf=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:o,y:i,placement:r,middlewareData:l}=t,c=await hf(t,e);return r===((n=l.offset)==null?void 0:n.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:r}}}}},mf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:o,platform:i}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:c={fn:C=>{let{x:z,y:K}=C;return{x:z,y:K}}},...p}=En(e,t),d={x:n,y:s},m=await i.detectOverflow(t,p),v=Gt(Bt(o)),w=Ia(v);let I=d[w],S=d[v];if(r){const C=w==="y"?"top":"left",z=w==="y"?"bottom":"right",K=I+m[C],V=I-m[z];I=oi(K,I,V)}if(l){const C=v==="y"?"top":"left",z=v==="y"?"bottom":"right",K=S+m[C],V=S-m[z];S=oi(K,S,V)}const _=c.fn({...t,[w]:I,[v]:S});return{..._,data:{x:_.x-n,y:_.y-s,enabled:{[w]:r,[v]:l}}}}}},gf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:o,rects:i,platform:r,elements:l}=t,{apply:c=()=>{},...p}=En(e,t),d=await r.detectOverflow(t,p),m=Bt(o),v=Tt(o),w=Gt(o)==="y",{width:I,height:S}=i.floating;let _,C;m==="top"||m==="bottom"?(_=m,C=v===(await(r.isRTL==null?void 0:r.isRTL(l.floating))?"start":"end")?"left":"right"):(C=m,_=v==="end"?"top":"bottom");const z=S-d.top-d.bottom,K=I-d.left-d.right,V=_s(S-d[_],z),Q=_s(I-d[C],K),D=!t.middlewareData.shift;let ae=V,ue=Q;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(ue=K),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(ae=z),D&&!v){const R=$n(d.left,0),de=$n(d.right,0),F=$n(d.top,0),te=$n(d.bottom,0);w?ue=I-2*(R!==0||de!==0?R+de:$n(d.left,d.right)):ae=S-2*(F!==0||te!==0?F+te:$n(d.top,d.bottom))}await c({...t,availableWidth:ue,availableHeight:ae});const O=await r.getDimensions(l.floating);return I!==O.width||S!==O.height?{reset:{rects:!0}}:{}}}};function wt(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ft(e){return wt(e).getComputedStyle(e)}const Ar=Math.min,rs=Math.max,Ys=Math.round;function Oa(e){const t=Ft(e);let n=parseFloat(t.width),s=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,r=Ys(n)!==o||Ys(s)!==i;return r&&(n=o,s=i),{width:n,height:s,fallback:r}}function vn(e){return Da(e)?(e.nodeName||"").toLowerCase():""}let Ls;function Ra(){if(Ls)return Ls;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Ls=e.brands.map((t=>t.brand+"/"+t.version)).join(" "),Ls):navigator.userAgent}function zt(e){return e instanceof wt(e).HTMLElement}function fn(e){return e instanceof wt(e).Element}function Da(e){return e instanceof wt(e).Node}function Lr(e){return typeof ShadowRoot>"u"?!1:e instanceof wt(e).ShadowRoot||e instanceof ShadowRoot}function yo(e){const{overflow:t,overflowX:n,overflowY:s,display:o}=Ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!["inline","contents"].includes(o)}function yf(e){return["table","td","th"].includes(vn(e))}function ii(e){const t=/firefox/i.test(Ra()),n=Ft(e),s=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!=="none"||n.perspective!=="none"||!!s&&s!=="none"||t&&n.willChange==="filter"||t&&!!n.filter&&n.filter!=="none"||["transform","perspective"].some((o=>n.willChange.includes(o)))||["paint","layout","strict","content"].some((o=>{const i=n.contain;return i!=null&&i.includes(o)}))}function Na(){return!/^((?!chrome|android).)*safari/i.test(Ra())}function Ni(e){return["html","body","#document"].includes(vn(e))}function Fa(e){return fn(e)?e:e.contextElement}const za={x:1,y:1};function Nn(e){const t=Fa(e);if(!zt(t))return za;const n=t.getBoundingClientRect(),{width:s,height:o,fallback:i}=Oa(t);let r=(i?Ys(n.width):n.width)/s,l=(i?Ys(n.height):n.height)/o;return r&&Number.isFinite(r)||(r=1),l&&Number.isFinite(l)||(l=1),{x:r,y:l}}function bs(e,t,n,s){var o,i;t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),l=Fa(e);let c=za;t&&(s?fn(s)&&(c=Nn(s)):c=Nn(e));const p=l?wt(l):window,d=!Na()&&n;let m=(r.left+(d&&((o=p.visualViewport)==null?void 0:o.offsetLeft)||0))/c.x,v=(r.top+(d&&((i=p.visualViewport)==null?void 0:i.offsetTop)||0))/c.y,w=r.width/c.x,I=r.height/c.y;if(l){const S=wt(l),_=s&&fn(s)?wt(s):s;let C=S.frameElement;for(;C&&s&&_!==S;){const z=Nn(C),K=C.getBoundingClientRect(),V=getComputedStyle(C);K.x+=(C.clientLeft+parseFloat(V.paddingLeft))*z.x,K.y+=(C.clientTop+parseFloat(V.paddingTop))*z.y,m*=z.x,v*=z.y,w*=z.x,I*=z.y,m+=K.x,v+=K.y,C=wt(C).frameElement}}return{width:w,height:I,top:v,right:m+w,bottom:v+I,left:m,x:m,y:v}}function pn(e){return((Da(e)?e.ownerDocument:e.document)||window.document).documentElement}function _o(e){return fn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ba(e){return bs(pn(e)).left+_o(e).scrollLeft}function ws(e){if(vn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Lr(e)&&e.host||pn(e);return Lr(t)?t.host:t}function Ha(e){const t=ws(e);return Ni(t)?t.ownerDocument.body:zt(t)&&yo(t)?t:Ha(t)}function Xs(e,t){var n;t===void 0&&(t=[]);const s=Ha(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=wt(s);return o?t.concat(i,i.visualViewport||[],yo(s)?s:[]):t.concat(s,Xs(s))}function Or(e,t,n){return t==="viewport"?is((function(s,o){const i=wt(s),r=pn(s),l=i.visualViewport;let c=r.clientWidth,p=r.clientHeight,d=0,m=0;if(l){c=l.width,p=l.height;const v=Na();(v||!v&&o==="fixed")&&(d=l.offsetLeft,m=l.offsetTop)}return{width:c,height:p,x:d,y:m}})(e,n)):fn(t)?is((function(s,o){const i=bs(s,!0,o==="fixed"),r=i.top+s.clientTop,l=i.left+s.clientLeft,c=zt(s)?Nn(s):{x:1,y:1};return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:r*c.y}})(t,n)):is((function(s){const o=pn(s),i=_o(s),r=s.ownerDocument.body,l=rs(o.scrollWidth,o.clientWidth,r.scrollWidth,r.clientWidth),c=rs(o.scrollHeight,o.clientHeight,r.scrollHeight,r.clientHeight);let p=-i.scrollLeft+Ba(s);const d=-i.scrollTop;return Ft(r).direction==="rtl"&&(p+=rs(o.clientWidth,r.clientWidth)-l),{width:l,height:c,x:p,y:d}})(pn(e)))}function Rr(e){return zt(e)&&Ft(e).position!=="fixed"?e.offsetParent:null}function Dr(e){const t=wt(e);let n=Rr(e);for(;n&&yf(n)&&Ft(n).position==="static";)n=Rr(n);return n&&(vn(n)==="html"||vn(n)==="body"&&Ft(n).position==="static"&&!ii(n))?t:n||(function(s){let o=ws(s);for(;zt(o)&&!Ni(o);){if(ii(o))return o;o=ws(o)}return null})(e)||t}function _f(e,t,n){const s=zt(t),o=pn(t),i=bs(e,!0,n==="fixed",t);let r={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(s||!s&&n!=="fixed")if((vn(t)!=="body"||yo(o))&&(r=_o(t)),zt(t)){const c=bs(t,!0);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else o&&(l.x=Ba(o));return{x:i.left+r.scrollLeft-l.x,y:i.top+r.scrollTop-l.y,width:i.width,height:i.height}}const bf={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:s,strategy:o}=e;const i=n==="clippingAncestors"?(function(p,d){const m=d.get(p);if(m)return m;let v=Xs(p).filter((_=>fn(_)&&vn(_)!=="body")),w=null;const I=Ft(p).position==="fixed";let S=I?ws(p):p;for(;fn(S)&&!Ni(S);){const _=Ft(S),C=ii(S);(I?C||w:C||_.position!=="static"||!w||!["absolute","fixed"].includes(w.position))?w=_:v=v.filter((z=>z!==S)),S=ws(S)}return d.set(p,v),v})(t,this._c):[].concat(n),r=[...i,s],l=r[0],c=r.reduce(((p,d)=>{const m=Or(t,d,o);return p.top=rs(m.top,p.top),p.right=Ar(m.right,p.right),p.bottom=Ar(m.bottom,p.bottom),p.left=rs(m.left,p.left),p}),Or(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:s}=e;const o=zt(n),i=pn(n);if(n===i)return t;let r={scrollLeft:0,scrollTop:0},l={x:1,y:1};const c={x:0,y:0};if((o||!o&&s!=="fixed")&&((vn(n)!=="body"||yo(i))&&(r=_o(n)),zt(n))){const p=bs(n);l=Nn(n),c.x=p.x+n.clientLeft,c.y=p.y+n.clientTop}return{width:t.width*l.x,height:t.height*l.y,x:t.x*l.x-r.scrollLeft*l.x+c.x,y:t.y*l.y-r.scrollTop*l.y+c.y}},isElement:fn,getDimensions:function(e){return zt(e)?Oa(e):e.getBoundingClientRect()},getOffsetParent:Dr,getDocumentElement:pn,getScale:Nn,async getElementRects(e){let{reference:t,floating:n,strategy:s}=e;const o=this.getOffsetParent||Dr,i=this.getDimensions;return{reference:_f(t,await o(n),s),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Ft(e).direction==="rtl"},wf=(e,t,n)=>{const s=new Map,o={platform:bf,...n},i={...o.platform,_c:s};return af(e,t,{...o,platform:i})};function ja(e,t){for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]=="object"&&e[n]?ja(e[n],t[n]):e[n]=t[n])}const Mt={disabled:!1,distance:5,skidding:0,container:"body",boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:"absolute",preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:"top",triggers:["hover","focus","touch"],hideTriggers:e=>[...e,"click"],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:"..."},dropdown:{placement:"bottom",triggers:["click"],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:"dropdown",triggers:["hover","focus"],popperTriggers:["hover"],delay:{show:0,hide:400}}}};function ks(e,t){let n=Mt.themes[e]||{},s;do s=n[t],typeof s>"u"?n.$extend?n=Mt.themes[n.$extend]||{}:(n=null,s=Mt[t]):n=null;while(n);return s}function kf(e){const t=[e];let n=Mt.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Mt.themes[n.$extend]||{}):n=null;while(n);return t.map(s=>`v-popper--theme-${s}`)}function Nr(e){const t=[e];let n=Mt.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Mt.themes[n.$extend]||{}):n=null;while(n);return t}let Bn=!1;if(typeof window<"u"){Bn=!1;try{const e=Object.defineProperty({},"passive",{get(){Bn=!0}});window.addEventListener("test",null,e)}catch{}}let Va=!1;typeof window<"u"&&typeof navigator<"u"&&(Va=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);const Ua=["auto","top","bottom","left","right"].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Fr={hover:"mouseenter",focus:"focus",click:"click",touch:"touchstart",pointer:"pointerdown"},zr={hover:"mouseleave",focus:"blur",click:"click",touch:"touchend",pointer:"pointerup"};function Br(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1)}function No(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}const $t=[];let kn=null;const Hr={};function jr(e){let t=Hr[e];return t||(t=Hr[e]=[]),t}let ri=function(){};typeof window<"u"&&(ri=window.Element);function Le(e){return function(t){return ks(t.theme,e)}}const Fo="__floating-vue__popper",Ka=()=>Qe({name:"VPopper",provide(){return{[Fo]:{parentPopper:this}}},inject:{[Fo]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:Le("disabled")},positioningDisabled:{type:Boolean,default:Le("positioningDisabled")},placement:{type:String,default:Le("placement"),validator:e=>Ua.includes(e)},delay:{type:[String,Number,Object],default:Le("delay")},distance:{type:[Number,String],default:Le("distance")},skidding:{type:[Number,String],default:Le("skidding")},triggers:{type:Array,default:Le("triggers")},showTriggers:{type:[Array,Function],default:Le("showTriggers")},hideTriggers:{type:[Array,Function],default:Le("hideTriggers")},popperTriggers:{type:Array,default:Le("popperTriggers")},popperShowTriggers:{type:[Array,Function],default:Le("popperShowTriggers")},popperHideTriggers:{type:[Array,Function],default:Le("popperHideTriggers")},container:{type:[String,Object,ri,Boolean],default:Le("container")},boundary:{type:[String,ri],default:Le("boundary")},strategy:{type:String,validator:e=>["absolute","fixed"].includes(e),default:Le("strategy")},autoHide:{type:[Boolean,Function],default:Le("autoHide")},handleResize:{type:Boolean,default:Le("handleResize")},instantMove:{type:Boolean,default:Le("instantMove")},eagerMount:{type:Boolean,default:Le("eagerMount")},popperClass:{type:[String,Array,Object],default:Le("popperClass")},computeTransformOrigin:{type:Boolean,default:Le("computeTransformOrigin")},autoMinSize:{type:Boolean,default:Le("autoMinSize")},autoSize:{type:[Boolean,String],default:Le("autoSize")},autoMaxSize:{type:Boolean,default:Le("autoMaxSize")},autoBoundaryMaxSize:{type:Boolean,default:Le("autoBoundaryMaxSize")},preventOverflow:{type:Boolean,default:Le("preventOverflow")},overflowPadding:{type:[Number,String],default:Le("overflowPadding")},arrowPadding:{type:[Number,String],default:Le("arrowPadding")},arrowOverflow:{type:Boolean,default:Le("arrowOverflow")},flip:{type:Boolean,default:Le("flip")},shift:{type:Boolean,default:Le("shift")},shiftCrossAxis:{type:Boolean,default:Le("shiftCrossAxis")},noAutoFocus:{type:Boolean,default:Le("noAutoFocus")},disposeTimeout:{type:Number,default:Le("disposeTimeout")}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:"",strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join("_")}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId!=null?this.ariaId:this.randomId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide=="function"?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){var e;return(e=this[Fo])==null?void 0:e.parentPopper},hasPopperShowTriggerHover(){var e,t;return((e=this.popperTriggers)==null?void 0:e.includes("hover"))||((t=this.popperShowTriggers)==null?void 0:t.includes("hover"))}},watch:{shown:"$_autoShowHide",disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:"$_refreshListeners",deep:!0},positioningDisabled:"$_refreshListeners",...["placement","distance","skidding","boundary","strategy","overflowPadding","arrowPadding","preventOverflow","shift","shiftCrossAxis","flip"].reduce((e,t)=>(e[t]="$_computePosition",e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var s,o;(s=this.parentPopper)!=null&&s.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(((o=this.parentPopper)==null?void 0:o.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit("show"),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit("update:shown",!0))},hide({event:e=null,skipDelay:t=!1}={}){var n;if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}((n=this.parentPopper)==null?void 0:n.lockedChild)===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit("hide"),this.$emit("update:shown",!1)}},init(){var e;this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=((e=this.referenceNode)==null?void 0:e.call(this))??this.$el,this.$_targetNodes=this.targetNodes().filter(t=>t.nodeType===t.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(".v-popper__inner"),this.$_arrowNode=this.$_popperNode.querySelector(".v-popper__arrow-container"),this.$_swapTargetAttrs("title","data-original-title"),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs("data-original-title","title"))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit("resize"))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;const e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(vf({mainAxis:this.distance,crossAxis:this.skidding}));const t=this.placement.startsWith("auto");if(t?e.middleware.push(df({alignment:this.placement.split("-")[1]??""})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(mf({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(ff({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(cf({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:"arrowOverflow",fn:({placement:s,rects:o,middlewareData:i})=>{let r;const{centerOffset:l}=i.arrow;return s.startsWith("top")||s.startsWith("bottom")?r=Math.abs(l)>o.reference.width/2:r=Math.abs(l)>o.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){const s=this.autoSize?this.autoSize:this.autoMinSize?"min":null;e.middleware.push({name:"autoSize",fn:({rects:o,placement:i,middlewareData:r})=>{var l;if((l=r.autoSize)!=null&&l.skip)return{};let c,p;return i.startsWith("top")||i.startsWith("bottom")?c=o.reference.width:p=o.reference.height,this.$_innerNode.style[s==="min"?"minWidth":s==="max"?"maxWidth":"width"]=c!=null?`${c}px`:null,this.$_innerNode.style[s==="min"?"minHeight":s==="max"?"maxHeight":"height"]=p!=null?`${p}px`:null,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push(gf({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:s,availableHeight:o})=>{this.$_innerNode.style.maxWidth=s!=null?`${s}px`:null,this.$_innerNode.style.maxHeight=o!=null?`${o}px`:null}})));const n=await wf(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),kn&&this.instantMove&&kn.instantMove&&kn!==this.parentPopper){kn.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay("show"))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(kn=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay("hide"))},$_computeDelay(e){const t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await No(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Xs(this.$_referenceNode),...Xs(this.$_popperNode)],"scroll",()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){const t=this.$_referenceNode.getBoundingClientRect(),n=this.$_popperNode.querySelector(".v-popper__wrapper"),s=n.parentNode.getBoundingClientRect(),o=t.x+t.width/2-(s.left+n.offsetLeft),i=t.y+t.height/2-(s.top+n.offsetTop);this.result.transformOrigin=`${o}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":""});const e=this.showGroup;if(e){let t;for(let n=0;n<$t.length;n++)t=$t[n],t.showGroup!==e&&(t.hide(),t.$emit("close-group"))}$t.push(this),document.body.classList.add("v-popper--some-open");for(const t of Nr(this.theme))jr(t).push(this),document.body.classList.add(`v-popper--some-open--${t}`);this.$emit("apply-show"),this.classes.showFrom=!0,this.classes.showTo=!1,this.classes.hideFrom=!1,this.classes.hideTo=!1,await No(),this.classes.showFrom=!1,this.classes.showTo=!0,this.noAutoFocus||this.$_popperNode.focus()},async $_applyHide(e=!1){if(this.shownChildren.size>0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Br($t,this),$t.length===0&&document.body.classList.remove("v-popper--some-open");for(const n of Nr(this.theme)){const s=jr(n);Br(s,this),s.length===0&&document.body.classList.remove(`v-popper--some-open--${n}`)}kn===this&&(kn=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);const t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners("scroll"),this.$emit("apply-hide"),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await No(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e=="string"?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw new Error("No container for popover: "+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){const e=n=>{this.isShown&&!this.$_hideInProgress||(n.usedByTooltip=!0,!this.$_preventShow&&this.show({event:n}))};this.$_registerTriggerListeners(this.$_targetNodes,Fr,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Fr,this.popperTriggers,this.popperShowTriggers,e);const t=n=>{n.usedByTooltip||this.hide({event:n})};this.$_registerTriggerListeners(this.$_targetNodes,zr,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],zr,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(s=>s.addEventListener(t,n,Bn?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,s,o){let i=n;s!=null&&(i=typeof s=="function"?s(i):s),i.forEach(r=>{const l=t[r];l&&this.$_registerEventListeners(e,l,o)})},$_removeEventListeners(e){const t=[];this.$_events.forEach(n=>{const{targetNodes:s,eventType:o,handler:i}=n;!e||e===o?s.forEach(r=>r.removeEventListener(o,i)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit("close-directive"):this.$emit("auto-hide"),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(const n of this.$_targetNodes){const s=n.getAttribute(e);s&&(n.removeAttribute(e),n.setAttribute(t,s))}},$_applyAttrsToTarget(e){for(const t of this.$_targetNodes)for(const n in e){const s=e[n];s==null?t.removeAttribute(n):t.setAttribute(n,s)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){const e=this.$_referenceNode.getBoundingClientRect();if(ls>=e.left&&ls<=e.right&&as>=e.top&&as<=e.bottom){const t=this.$_popperNode.getBoundingClientRect(),n=ls-rn,s=as-ln,o=t.left+t.width/2-rn+(t.top+t.height/2)-ln+t.width+t.height,i=rn+n*o,r=ln+s*o;return Os(rn,ln,i,r,t.left,t.top,t.left,t.bottom)||Os(rn,ln,i,r,t.left,t.top,t.right,t.top)||Os(rn,ln,i,r,t.right,t.top,t.right,t.bottom)||Os(rn,ln,i,r,t.left,t.bottom,t.right,t.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<"u"&&typeof window<"u"){if(Va){const e=Bn?{passive:!0,capture:!0}:!0;document.addEventListener("touchstart",t=>Vr(t,!0),e),document.addEventListener("touchend",t=>Ur(t,!0),e)}else window.addEventListener("mousedown",e=>Vr(e,!1),!0),window.addEventListener("click",e=>Ur(e,!1),!0);window.addEventListener("resize",$f)}function Vr(e,t){if(Mt.autoHideOnMousedown)Wa(e,t);else for(let n=0;n<$t.length;n++){const s=$t[n];try{s.mouseDownContains=s.popperNode().contains(e.target)}catch{}}}function Ur(e,t){Mt.autoHideOnMousedown||Wa(e,t)}function Wa(e,t){const n={};for(let s=$t.length-1;s>=0;s--){const o=$t[s];try{const i=o.containsGlobalTarget=o.mouseDownContains||o.popperNode().contains(e.target);o.pendingHide=!1,requestAnimationFrame(()=>{if(o.pendingHide=!1,!n[o.randomId]&&Kr(o,i,e)){if(o.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&i){let l=o.parentPopper;for(;l;)n[l.randomId]=!0,l=l.parentPopper;return}let r=o.parentPopper;for(;r&&Kr(r,r.containsGlobalTarget,e);)r.$_handleGlobalClose(e,t),r=r.parentPopper}})}catch{}}}function Kr(e,t,n){return n.closeAllPopover||n.closePopover&&t||xf(e,n)&&!t}function xf(e,t){if(typeof e.autoHide=="function"){const n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function $f(){for(let e=0;e<$t.length;e++)$t[e].$_computePosition()}let rn=0,ln=0,ls=0,as=0;typeof window<"u"&&window.addEventListener("mousemove",e=>{rn=ls,ln=as,ls=e.clientX,as=e.clientY},Bn?{passive:!0}:void 0);function Os(e,t,n,s,o,i,r,l){const c=((r-o)*(t-i)-(l-i)*(e-o))/((l-i)*(n-e)-(r-o)*(s-t)),p=((n-e)*(t-i)-(s-t)*(e-o))/((l-i)*(n-e)-(r-o)*(s-t));return c>=0&&c<=1&&p>=0&&p<=1}const Sf={extends:Ka()},bo=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n};function Cf(e,t,n,s,o,i){return g(),b("div",{ref:"reference",class:he(["v-popper",{"v-popper--shown":e.slotData.isShown}])},[hs(e.$slots,"default",_c(ga(e.slotData)))],2)}const Tf=bo(Sf,[["render",Cf]]);function Mf(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);var n=e.indexOf("Trident/");if(n>0){var s=e.indexOf("rv:");return parseInt(e.substring(s+3,e.indexOf(".",s)),10)}var o=e.indexOf("Edge/");return o>0?parseInt(e.substring(o+5,e.indexOf(".",o)),10):-1}let Fs;function li(){li.init||(li.init=!0,Fs=Mf()!==-1)}var wo={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){li(),Ue(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const e=document.createElement("object");this._resizeObject=e,e.setAttribute("aria-hidden","true"),e.setAttribute("tabindex",-1),e.onload=this.addResizeHandlers,e.type="text/html",Fs&&this.$el.appendChild(e),e.data="about:blank",Fs||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!Fs&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const Ef=iu();su("data-v-b329ee4c");const Pf={class:"resize-observer",tabindex:"-1"};ou();const If=Ef((e,t,n,s,o,i)=>(g(),dt("div",Pf)));wo.render=If;wo.__scopeId="data-v-b329ee4c";wo.__file="src/components/ResizeObserver.vue";const qa=(e="theme")=>({computed:{themeClass(){return kf(this[e])}}}),Af=Qe({name:"VPopperContent",components:{ResizeObserver:wo},mixins:[qa()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:["hide","resize"],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),Lf=["id","aria-hidden","tabindex","data-popper-placement"],Of={ref:"inner",class:"v-popper__inner"},Rf=u("div",{class:"v-popper__arrow-outer"},null,-1),Df=u("div",{class:"v-popper__arrow-inner"},null,-1),Nf=[Rf,Df];function Ff(e,t,n,s,o,i){const r=ps("ResizeObserver");return g(),b("div",{id:e.popperId,ref:"popover",class:he(["v-popper__popper",[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:Me(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?"false":"true",tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||(t[2]=Sa(l=>e.autoHide&&e.$emit("hide"),["esc"]))},[u("div",{class:"v-popper__backdrop",onClick:t[0]||(t[0]=l=>e.autoHide&&e.$emit("hide"))}),u("div",{class:"v-popper__wrapper",style:Me(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[u("div",Of,[e.mounted?(g(),b(ve,{key:0},[u("div",null,[hs(e.$slots,"default")]),e.handleResize?(g(),dt(r,{key:0,onNotify:t[1]||(t[1]=l=>e.$emit("resize",l))})):le("",!0)],64)):le("",!0)],512),u("div",{ref:"arrow",class:"v-popper__arrow-container",style:Me(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},Nf,4)],4)],46,Lf)}const Ga=bo(Af,[["render",Ff]]),Ja={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}};let ai=function(){};typeof window<"u"&&(ai=window.Element);const zf=Qe({name:"VPopperWrapper",components:{Popper:Tf,PopperContent:Ga},mixins:[Ja,qa("finalTheme")],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,ai,Boolean],default:void 0},boundary:{type:[String,ai],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function Bf(e,t,n,s,o,i){const r=ps("PopperContent"),l=ps("Popper");return g(),dt(l,Li({ref:"popper"},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||(t[0]=()=>e.$emit("show")),onHide:t[1]||(t[1]=()=>e.$emit("hide")),"onUpdate:shown":t[2]||(t[2]=c=>e.$emit("update:shown",c)),onApplyShow:t[3]||(t[3]=()=>e.$emit("apply-show")),onApplyHide:t[4]||(t[4]=()=>e.$emit("apply-hide")),onCloseGroup:t[5]||(t[5]=()=>e.$emit("close-group")),onCloseDirective:t[6]||(t[6]=()=>e.$emit("close-directive")),onAutoHide:t[7]||(t[7]=()=>e.$emit("auto-hide")),onResize:t[8]||(t[8]=()=>e.$emit("resize"))}),{default:ft(({popperId:c,isShown:p,shouldMountContent:d,skipTransition:m,autoHide:v,show:w,hide:I,handleResize:S,onResize:_,classes:C,result:z})=>[hs(e.$slots,"default",{shown:p,show:w,hide:I}),Re(r,{ref:"popperContent","popper-id":c,theme:e.finalTheme,shown:p,mounted:d,"skip-transition":m,"auto-hide":v,"handle-resize":S,classes:C,result:z,onHide:I,onResize:_},{default:ft(()=>[hs(e.$slots,"popper",{shown:p,hide:I})]),_:2},1032,["popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:3},16,["theme","target-nodes","popper-node","class"])}const Fi=bo(zf,[["render",Bf]]),Hf={...Fi,name:"VDropdown",vPopperTheme:"dropdown"},jf={...Fi,name:"VMenu",vPopperTheme:"menu"},Vf={...Fi,name:"VTooltip",vPopperTheme:"tooltip"},Uf=Qe({name:"VTooltipDirective",components:{Popper:Ka(),PopperContent:Ga},mixins:[Ja],inheritAttrs:!1,props:{theme:{type:String,default:"tooltip"},html:{type:Boolean,default:e=>ks(e.theme,"html")},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>ks(e.theme,"loadingContent")},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content=="function"},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content=="function"&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;const t=++this.$_fetchId,n=this.content(this);n.then?n.then(s=>this.onResult(t,s)):this.onResult(t,n)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),Kf=["innerHTML"],Wf=["textContent"];function qf(e,t,n,s,o,i){const r=ps("PopperContent"),l=ps("Popper");return g(),dt(l,Li({ref:"popper"},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:ft(({popperId:c,isShown:p,shouldMountContent:d,skipTransition:m,autoHide:v,hide:w,handleResize:I,onResize:S,classes:_,result:C})=>[Re(r,{ref:"popperContent",class:he({"v-popper--tooltip-loading":e.loading}),"popper-id":c,theme:e.theme,shown:p,mounted:d,"skip-transition":m,"auto-hide":v,"handle-resize":I,classes:_,result:C,onHide:w,onResize:S},{default:ft(()=>[e.html?(g(),b("div",{key:0,innerHTML:e.finalContent},null,8,Kf)):(g(),b("div",{key:1,textContent:M(e.finalContent)},null,8,Wf))]),_:2},1032,["class","popper-id","theme","shown","mounted","skip-transition","auto-hide","handle-resize","classes","result","onHide","onResize"])]),_:1},16,["theme","target-nodes","popper-node","onApplyShow","onApplyHide"])}const Gf=bo(Uf,[["render",qf]]),Ya="v-popper--has-tooltip";function Jf(e,t){let n=e.placement;if(!n&&t)for(const s of Ua)t[s]&&(n=s);return n||(n=ks(e.theme||"tooltip","placement")),n}function Xa(e,t,n){let s;const o=typeof t;return o==="string"?s={content:t}:t&&o==="object"?s=t:s={content:!1},s.placement=Jf(s,n),s.targetNodes=()=>[e],s.referenceNode=()=>e,s}let zo,xs,Yf=0;function Xf(){if(zo)return;xs=me([]),zo=Ca({name:"VTooltipDirectiveApp",setup(){return{directives:xs}},render(){return this.directives.map(t=>Oi(Gf,{...t.options,shown:t.shown||t.options.shown,key:t.id}))},devtools:{hide:!0}});const e=document.createElement("div");document.body.appendChild(e),zo.mount(e)}function Zf(e,t,n){Xf();const s=me(Xa(e,t,n)),o=me(!1),i={id:Yf++,options:s,shown:o};return xs.value.push(i),e.classList&&e.classList.add(Ya),e.$_popper={options:s,item:i,show(){o.value=!0},hide(){o.value=!1}}}function Za(e){if(e.$_popper){const t=xs.value.indexOf(e.$_popper.item);t!==-1&&xs.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(Ya)}function Wr(e,{value:t,modifiers:n}){const s=Xa(e,t,n);if(!s.content||ks(s.theme||"tooltip","disabled"))Za(e);else{let o;e.$_popper?(o=e.$_popper,o.options.value=s):o=Zf(e,t,n),typeof t.shown<"u"&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?o.show():o.hide())}}const Qf={beforeMount:Wr,updated:Wr,beforeUnmount(e){Za(e)}};function qr(e){e.addEventListener("mousedown",Zs),e.addEventListener("click",Zs),e.addEventListener("touchstart",Qa,Bn?{passive:!0}:!1)}function Gr(e){e.removeEventListener("mousedown",Zs),e.removeEventListener("click",Zs),e.removeEventListener("touchstart",Qa),e.removeEventListener("touchend",ec),e.removeEventListener("touchcancel",tc)}function Zs(e){const t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function Qa(e){if(e.changedTouches.length===1){const t=e.currentTarget;t.$_vclosepopover_touch=!0;const n=e.changedTouches[0];t.$_vclosepopover_touchPoint=n,t.addEventListener("touchend",ec),t.addEventListener("touchcancel",tc)}}function ec(e){const t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){const n=e.changedTouches[0],s=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-s.screenY)<20&&Math.abs(n.screenX-s.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function tc(e){const t=e.currentTarget;t.$_vclosepopover_touch=!1}const ep={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>"u"||t)&&qr(e)},updated(e,{value:t,oldValue:n,modifiers:s}){e.$_closePopoverModifiers=s,t!==n&&(typeof t>"u"||t?qr(e):Gr(e))},beforeUnmount(e){Gr(e)}};function tp(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,ja(Mt,t),e.directive("tooltip",Qf),e.directive("close-popper",ep),e.component("VTooltip",Vf),e.component("VDropdown",Hf),e.component("VMenu",jf))}const np={version:"5.2.2",install:tp,options:Mt},jn="";async function sp(){const e=await fetch(`${jn}/api/requests?summary=true`);if(!e.ok)throw new Error(`GET /api/requests?summary=true failed: ${e.status}`);return e.json()}async function op(e){const t=await fetch(`${jn}/api/conversations/${encodeURIComponent(e)}`);if(!t.ok)throw new Error(`GET /api/conversations/${e} failed: ${t.status}`);return t.json()}async function ip(e){const t=await fetch(`${jn}/api/entries/${e}/detail`);if(t.status===404)return null;if(!t.ok)throw new Error(`GET /api/entries/${e}/detail failed: ${t.status}`);return(await t.json()).contextInfo??null}async function rp(e){const t=await fetch(`${jn}/api/conversations/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok)throw new Error(`DELETE conversation failed: ${t.status}`)}async function lp(){const e=await fetch(`${jn}/api/reset`,{method:"POST"});if(!e.ok)throw new Error(`POST /api/reset failed: ${e.status}`)}function ap(e,t,n){const s=new URLSearchParams;t&&s.set("conversation",t);const o=s.toString();return`${jn}/api/export/${e}${o?`?${o}`:""}`}const Ye={system_prompt:{label:"System prompt",color:"#2563eb"},tool_definitions:{label:"Tool definitions",color:"#db2777"},tool_results:{label:"Tool results",color:"#059669"},tool_calls:{label:"Tool calls",color:"#ec4899"},assistant_text:{label:"Assistant text",color:"#d97706"},user_text:{label:"User text",color:"#10b981"},thinking:{label:"Thinking",color:"#8b5cf6"},system_injections:{label:"System injections",color:"#6366f1"},images:{label:"Images",color:"#4b5563"},cache_markers:{label:"Cache markers",color:"#6b7280"},other:{label:"Other",color:"#4b5563"}};function cp(e){var t;return((t=Ye[e])==null?void 0:t.label)??e}function up(e,t="#475569"){var n;return((n=Ye[e])==null?void 0:n.color)??t}const Hn={system:["system_prompt","system_injections"],tools:["tool_definitions","tool_calls","tool_results"],conversation:["assistant_text","user_text","thinking"],other:["images","cache_markers","other"]},mt={system:{label:"System",color:"#2563eb"},tools:{label:"Tools",color:"#db2777"},conversation:{label:"Conversation",color:"#d97706"},other:{label:"Other",color:"#4b5563"}};function St(e){const t=e.role||"user",n=e.content||"",s=e.contentBlocks;if(s&&Array.isArray(s)){const o=s.some(l=>l.type==="tool_use"),i=s.some(l=>l.type==="tool_result"),r=s.some(l=>l.type==="thinking");if(i)return"tool_results";if(o)return"tool_calls";if(r)return"thinking"}return typeof n=="string"&&n.includes("<system-reminder>")?"system_injections":t==="assistant"?"assistant_text":t==="user"?"user_text":"other"}function ko(e){const t={};for(const n of e)if(n.contentBlocks)for(const s of n.contentBlocks)s.type==="tool_use"&&s.id&&s.name&&(t[s.id]=s.name);return t}function Bo(e,t={}){const n=e.contentBlocks;if(n&&Array.isArray(n))for(const s of n){if(s.type==="tool_use")return(s.name||"tool")+"("+(s.input?JSON.stringify(s.input).slice(0,60):"")+")";if(s.type==="tool_result"){const i=s.tool_use_id?t[s.tool_use_id]:null,r=typeof s.content=="string"?s.content:JSON.stringify(s.content||""),l=i?i+": ":"";return l+r.slice(0,80-l.length)}const o=s;if(o.type==="thinking")return(o.thinking||o.text||"").slice(0,80);if(s.type==="text"||s.type==="input_text")return(s.text||"").slice(0,80)}return(e.content||"").slice(0,80)}function dp(e){return e.contentBlocks&&e.contentBlocks.length>0?e.contentBlocks.map(t=>{if(t.type==="tool_use")return t.name+"("+JSON.stringify(t.input,null,2)+")";if(t.type==="tool_result")return typeof t.content=="string"?t.content:JSON.stringify(t.content,null,2);const n=t;return n.type==="thinking"?n.thinking||n.text||"":t.type==="text"||t.type==="input_text"?t.text||"":JSON.stringify(t,null,2)}).join(`
22
-
23
- `):e.content||""}function Ho(e){const t={role:e.role};if(e.contentBlocks&&e.contentBlocks.length>0)t.content=e.contentBlocks;else try{t.content=JSON.parse(e.content)}catch{t.content=e.content}return t._tokens=e.tokens,t}const fp=["tool_results","system_injections","tool_calls","thinking","assistant_text","user_text"];function nc(e){const t=new Map;for(let s=e.length-1;s>=0;s--){const o=e[s],i=St(o);t.has(i)||t.set(i,{items:[],tokens:0});const r=t.get(i);r.items.push({msg:o,origIdx:s}),r.tokens+=o.tokens||0}const n=[...fp];for(const s of t.keys())n.includes(s)||n.push(s);return n.filter(s=>t.has(s)).map(s=>({category:s,...t.get(s)}))}function Yt(e){if(e.length===0)return[];const t=new Map;for(const o of e){const i=o.agentKey||"_default";t.set(i,(t.get(i)||0)+1)}let n="_default",s=0;for(const[o,i]of t)i>s&&(n=o,s=i);return e.map(o=>({entry:o,isMain:(o.agentKey||"_default")===n}))}const Jr="context-lens-density",At=Jd("session",()=>{const e=me(0),t=me([]),n=me(new Map),s=me(0),o=me(!1),i=me(null),r=me(null),l=me(!1),c=me("dashboard"),p=me("overview"),d=me(null),m=me("live"),v=me(null),w=me(""),I=me(""),S=me("comfortable"),_=me(null),C=me(0),z=me(null),K=me(null),V=me(!1),Q=me(null),D=me(new Set),ae=me(!1),ue=me("main"),O=me("main"),R=me("absolute"),de=me(new Set),F=me(!0),te=me(!1),ce=me(new Set),B=new Map;function se(x){const X=new Set(ce.value);X.add(x),ce.value=X;const be=B.get(x);be&&clearTimeout(be),B.set(x,setTimeout(()=>{B.delete(x);const Se=new Set(ce.value);Se.delete(x),ce.value=Se},1500))}const oe=new Map,W=me(null),re=me(0),we=A(()=>t.value.map(x=>{const X=n.value.get(x.id);return X||{...x,agents:[],entries:[]}})),H=A(()=>[]),T=A(()=>{let x=we.value;return w.value&&(x=x.filter(X=>X.source===w.value)),I.value&&(x=x.filter(X=>{const be=n.value.get(X.id);if(be&&be.entries.length>0)return be.entries[0].contextInfo.model.includes(I.value);const Se=t.value.find(tt=>tt.id===X.id);return Se==null?void 0:Se.latestModel.includes(I.value)})),x}),P=A(()=>w.value?t.value.filter(x=>x.source===w.value):t.value),ee=A(()=>{const x=new Set;for(const X of t.value)X.source&&x.add(X.source);return Array.from(x).sort()}),ne=A(()=>{const x=new Set;for(const X of t.value)X.latestModel&&x.add(X.latestModel);return Array.from(x).sort()}),$=A(()=>d.value?n.value.get(d.value)??null:null),L=A(()=>{const x=$.value;if(!x||x.entries.length===0)return null;if(m.value==="live"){const Se=[...Yt([...x.entries].reverse())].reverse().find(tt=>tt.isMain);return(Se==null?void 0:Se.entry)??x.entries[0]}return x.entries.find(be=>be.id===v.value)??x.entries[0]}),G=A(()=>{let x=0;for(const X of t.value)x+=X.totalCost??0;return x}),k=A(()=>{let x=0;for(const X of t.value)x+=X.entryCount;return x+s.value});async function y(){o.value=!0,r.value=null;try{const x=await sp();e.value=x.revision,t.value=x.conversations,s.value=x.ungroupedCount;const X=new Set(x.conversations.map(be=>be.id));for(const be of n.value.keys())X.has(be)||n.value.delete(be);!d.value&&x.conversations.length>0&&c.value==="inspector"&&await f(x.conversations[0].id),d.value&&!X.has(d.value)&&(d.value=null,m.value="live",v.value=null,c.value==="inspector"&&(c.value="dashboard")),d.value&&X.has(d.value)&&await h(d.value)}catch(x){r.value=x instanceof Error?x.message:String(x)}finally{o.value=!1}}async function h(x){i.value=x;try{const X=await op(x),be=new Map(n.value);be.set(x,X),n.value=be}catch(X){console.warn(`Failed to load conversation ${x}:`,X)}finally{i.value=null}}function a(x){if(x.type==="connected"){l.value=!0,x.revision!==e.value&&y();return}x.conversationId&&se(x.conversationId),y(),x.conversationId&&d.value===x.conversationId&&h(x.conversationId)}async function f(x){d.value=x,m.value="live",v.value=null,n.value.has(x)||await h(x)}function E(){m.value="live",v.value=null}function q(x){m.value="pinned",v.value=x}function N(x){c.value=x}function J(x){p.value=x}function pe(x){w.value=x}function fe(x){I.value=x}function ie(x,X=!1){_.value=x,z.value=null,K.value=null,Q.value=null,V.value=X,C.value+=1}function Z(x,X){_.value=x,z.value=X,K.value=null,Q.value=null,C.value+=1}function ke(x){_.value=null,z.value=null,K.value=x,Q.value=null,C.value+=1}function ge(x){_.value="tool_results",z.value=null,K.value=null,Q.value=x,C.value+=1}function $e(x){const X=new Set(D.value);X.has(x)?X.delete(x):X.add(x),D.value=X}async function Ce(x){const X=x??D.value;if(X.size<2)return;D.value=new Set(X),ae.value=!0,c.value="compare";const be=[];for(const Se of X)n.value.has(Se)||be.push(h(Se));await Promise.all(be)}function Ie(x="dashboard"){ae.value=!1,D.value=new Set,c.value=x}function Ne(){_.value=null,z.value=null,K.value=null,V.value=!1,Q.value=null}async function Ae(x){if(oe.has(x))return oe.get(x);W.value=x;try{const X=await ip(x);if(X&&(oe.set(x,X),re.value++,oe.size>50)){const be=oe.keys().next().value;be!==void 0&&oe.delete(be)}return X}catch{return null}finally{W.value=null}}function Je(x){return oe.get(x)??null}async function et(x){try{await rp(x),t.value=t.value.filter(X=>X.id!==x),n.value.delete(x),d.value===x&&(t.value.length>0?await f(t.value[0].id):(d.value=null,m.value="live",v.value=null))}catch(X){r.value=X instanceof Error?X.message:String(X)}}async function pt(){try{await lp(),t.value=[],n.value=new Map,s.value=0,d.value=null,m.value="live",v.value=null,e.value=0}catch(x){r.value=x instanceof Error?x.message:String(x)}}function U(x){typeof document>"u"||document.documentElement.setAttribute("data-density",x)}function j(){if(typeof window>"u")return;const x=window.localStorage.getItem(Jr);x==="comfortable"||x==="compact"?S.value=x:S.value="comfortable",U(S.value)}function ye(x){S.value=x,typeof window<"u"&&window.localStorage.setItem(Jr,x),U(x)}return{revision:e,summaries:t,loadedConversations:n,conversations:we,ungrouped:H,loading:o,loadingSession:i,error:r,connected:l,view:c,inspectorTab:p,selectedSessionId:d,selectionMode:m,selectedEntryId:v,sourceFilter:w,modelFilter:I,density:S,messageFocusCategory:_,messageFocusToken:C,messageFocusTool:z,messageFocusIndex:K,messageFocusOpenDetail:V,messageFocusFile:Q,messagesMode:ue,timelineMode:O,timelineStackMode:R,timelineHiddenLegendKeys:de,timelineShowLimitOverlay:F,timelineShowCacheOverlay:te,recentlyUpdated:ce,compareSessionIds:D,compareMode:ae,filteredConversations:T,filteredSummaries:P,sources:ee,models:ne,selectedSession:$,selectedEntry:L,totalCost:G,totalRequests:k,load:y,loadConversationEntries:h,handleSSEEvent:a,selectSession:f,followLive:E,pinEntry:q,setView:N,setInspectorTab:J,setSourceFilter:pe,setModelFilter:fe,focusMessageCategory:ie,focusMessageTool:Z,focusMessageByIndex:ke,focusMessageFile:ge,clearMessageFocus:Ne,toggleCompareSession:$e,enterCompare:Ce,exitCompare:Ie,loadEntryDetail:Ae,getEntryDetail:Je,entryDetailLoading:W,entryDetailVersion:re,initializeDensity:j,setDensity:ye,deleteSession:et,reset:pt}});function pp(e,t){const n=me(!1);let s=null,o=null;function i(){s&&s.close(),s=new EventSource(e),s.onopen=()=>{n.value=!0},s.onmessage=l=>{try{const c=JSON.parse(l.data);t(c)}catch{}},s.onerror=()=>{n.value=!1,s==null||s.close(),s=null,o&&clearTimeout(o),o=setTimeout(i,2e3)}}function r(){o&&(clearTimeout(o),o=null),s&&(s.close(),s=null),n.value=!1}return i(),po(r),{connected:n,disconnect:r,reconnect:i}}function _e(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function _t(e){return e==null?"--":"$"+e.toFixed(2)}function ci(e){return e>=1e3?(e/1e3).toFixed(1)+"s":Math.round(e)+"ms"}function ui(e,t=!1){return(t?e:e*100).toFixed(1)+"%"}function en(e){if(!e)return"?";const t=e.match(/(opus|sonnet|haiku)-(\d+(?:\.\d+)?)/);if(t)return t[1]+"-"+t[2];const n=e.match(/(gpt-4o(?:-mini)?|gpt-4|gpt-3\.5)/);if(n)return n[1];const s=e.match(/(o[134](?:-mini)?)/);if(s)return s[1];const o=e.match(/(gemini-[\d.]+-(?:pro|flash)(?:-\w+)?)/);if(o)return o[1];const i=e.split(/[-_]/);return i.length>2?i.slice(0,3).join("-"):e}function $s(e){const t=(e||"").toLowerCase();return t.includes("claude")?"badge-claude":t.includes("codex")?"badge-codex":t.includes("aider")?"badge-aider":t.includes("kimi")?"badge-kimi":t==="pi"||t.startsWith("pi-")?"badge-pi":"badge-unknown"}function di(e){switch(e){case"good":return"#10b981";case"needs-work":return"#f59e0b";case"poor":return"#ef4444";default:return"#64748b"}}const hp={class:"toolbar"},vp={class:"session-model"},mp=["title"],gp=["title","aria-label"],yp={key:0,class:"session-id-toast"},_p={key:2,class:"toolbar-sep"},bp={class:"session-stat"},wp={class:"session-stat cost"},kp={key:3,class:"session-stat"},xp={class:"compare-label"},$p={class:"toolbar-right"},Sp={class:"toolbar-stat"},Cp={class:"toolbar-stat"},Tp={class:"toolbar-stat cost"},Mp={key:1,class:"toolbar-dropdown"},Ep={key:2,class:"toolbar-dropdown"},Pp=["disabled"],Ip=Qe({__name:"AppToolbar",setup(e){const t=At(),n=me(!1),s=me(!1),o=me(!1),i=A(()=>t.view==="inspector"&&!!t.selectedSession),r=A(()=>t.selectedSession),l=A(()=>t.totalRequests>0),c=A(()=>i.value&&!!t.selectedSessionId),p=A(()=>{const O=t.selectedSessionId;return O?t.summaries.find(R=>R.id===O)??null:null});function d(O){if(!O)return"";let R=O;/^\/home\/[^/]+(\/|$)/.test(R)?R=R.replace(/^\/home\/[^/]+/,"~"):/^\/Users\/[^/]+(\/|$)/.test(R)&&(R=R.replace(/^\/Users\/[^/]+/,"~"));const de=R.split("/");return de.length>3?de.slice(-3).join("/"):R}const m=A(()=>t.selectedSessionId??"");function v(O){return String(O).trim().replace(/[^a-zA-Z0-9._-]+/g,"_").replace(/^_+|_+$/g,"").slice(0,80)||"unknown"}function w(O,R){const de=O==="lhar"?"lhar":"lhar.json";return`context-lens-export-${`session-${v(R||"all")}`}-privacy-standard.${de}`}async function I(O,R){const de=await fetch(O);if(!de.ok)throw new Error(`Download failed: ${de.status}`);const F=await de.blob(),te=URL.createObjectURL(F);try{const ce=document.createElement("a");ce.href=te,ce.download=R,ce.style.display="none",document.body.appendChild(ce),ce.click(),document.body.removeChild(ce)}finally{URL.revokeObjectURL(te)}}async function S(O,R){const de=R==="session"?t.selectedSessionId??void 0:void 0,F=ap(O,de),te=w(O,de);try{await I(F,te)}catch{window.open(F,"_blank")}n.value=!1}function _(){n.value=!n.value,n.value&&(s.value=!1)}function C(){s.value=!s.value,s.value&&(n.value=!1)}function z(){confirm("Clear all captured data?")&&t.reset(),s.value=!1}function K(){const O=t.selectedSessionId;!O||!c.value||(confirm("Remove this session?")&&t.deleteSession(O),s.value=!1)}function V(){t.setView("dashboard")}async function Q(){const O=m.value;if(O){try{await navigator.clipboard.writeText(O),o.value=!0}catch{}setTimeout(()=>{o.value=!1},1400)}}function D(O){return O.length<=18?O:`${O.slice(0,8)}…${O.slice(-8)}`}function ae(O){return o.value?`Copied: ${O}`:`Session ID: ${O} (click to copy)`}function ue(O){(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),Q())}return(O,R)=>{var de,F,te,ce;return g(),b("header",hp,[u("a",{class:"toolbar-brand toolbar-brand-btn",href:"#sessions",onClick:dn(V,["prevent"])},[...R[7]||(R[7]=[ya('<svg class="logo-mark" width="18" height="18" viewBox="0 0 18 18" aria-hidden="true" data-v-12cb5120><circle cx="9" cy="9" r="7.5" fill="none" stroke="var(--accent-blue)" stroke-width="1" opacity="0.35" data-v-12cb5120></circle><circle cx="9" cy="9" r="4" fill="none" stroke="var(--accent-blue)" stroke-width="1" opacity="0.6" data-v-12cb5120></circle><circle cx="9" cy="9" r="1.5" fill="var(--accent-blue)" data-v-12cb5120></circle></svg><span class="brand-text" data-v-12cb5120>Context Lens</span>',2)])]),i.value&&r.value?(g(),b(ve,{key:0},[R[9]||(R[9]=u("span",{class:"toolbar-sep"},null,-1)),u("span",{class:he(["session-badge",Y($s)(r.value.source)])},M(r.value.source||"?"),3),u("span",vp,M(Y(en)(((de=p.value)==null?void 0:de.latestModel)??"")),1),r.value.workingDirectory?(g(),b("span",{key:0,class:"session-dir",title:r.value.workingDirectory},M(d(r.value.workingDirectory)),9,mp)):le("",!0),R[10]||(R[10]=u("span",{class:"toolbar-sep"},null,-1)),m.value?(g(),b("span",{key:1,class:he(["session-id",{copied:o.value}]),title:ae(m.value),role:"button",tabindex:"0","aria-label":ae(m.value),onClick:Q,onKeydown:ue},[xe(" SID "+M(D(m.value))+" ",1),o.value?(g(),b("span",yp,"Copied")):le("",!0)],42,gp)):le("",!0),m.value?(g(),b("span",_p)):le("",!0),u("span",bp,M(((F=p.value)==null?void 0:F.entryCount)??r.value.entries.length)+" turns",1),u("span",wp,M(Y(_t)(((te=p.value)==null?void 0:te.totalCost)??0)),1),(ce=p.value)!=null&&ce.healthScore?(g(),b("span",kp,[R[8]||(R[8]=xe(" Latest health ",-1)),u("span",{class:he(["session-health",{good:p.value.healthScore.rating==="good",warn:p.value.healthScore.rating==="needs-work",bad:p.value.healthScore.rating==="poor"}])},M(p.value.healthScore.overall),3)])):le("",!0)],64)):le("",!0),Y(t).compareMode?(g(),b(ve,{key:1},[R[13]||(R[13]=u("span",{class:"toolbar-sep"},null,-1)),u("span",xp,[R[11]||(R[11]=u("i",{class:"i-carbon-compare"},null,-1)),xe(" Comparing "+M(Y(t).compareSessionIds.size)+" sessions ",1)]),u("button",{class:"compare-exit-btn",onClick:R[0]||(R[0]=B=>Y(t).exitCompare())},[...R[12]||(R[12]=[u("i",{class:"i-carbon-close"},null,-1),xe(" Exit ",-1)])])],64)):le("",!0),u("div",$p,[u("span",{class:he(["connection",{live:Y(t).connected}])},[R[14]||(R[14]=u("span",{class:"connection-dot"},null,-1)),xe(" "+M(Y(t).connected?"Live":"Offline"),1)],2),i.value?le("",!0):(g(),b(ve,{key:0},[u("span",Sp,M(Y(t).conversations.length)+" session"+M(Y(t).conversations.length!==1?"s":""),1),u("span",Cp,M(Y(t).totalRequests)+" req"+M(Y(t).totalRequests!==1?"s":""),1),u("span",Tp,M(Y(_t)(Y(t).totalCost)),1)],64)),l.value?(g(),b("div",Mp,[u("button",{class:"toolbar-control",onClick:_},[...R[15]||(R[15]=[u("i",{class:"i-carbon-download"},null,-1),xe(" Export ",-1)])]),Re(zn,{name:"dropdown"},{default:ft(()=>[n.value?(g(),b("div",{key:0,class:"dropdown-menu",onMouseleave:R[5]||(R[5]=B=>n.value=!1)},[u("button",{class:"dropdown-item",onClick:R[1]||(R[1]=B=>S("lhar.json","all"))},[...R[16]||(R[16]=[u("i",{class:"i-carbon-document"},null,-1),xe(" All (.lhar.json)",-1)])]),u("button",{class:"dropdown-item",onClick:R[2]||(R[2]=B=>S("lhar","all"))},[...R[17]||(R[17]=[u("i",{class:"i-carbon-document"},null,-1),xe(" All (.lhar)",-1)])]),Y(t).selectedSessionId?(g(),b(ve,{key:0},[R[20]||(R[20]=u("div",{class:"dropdown-sep"},null,-1)),u("button",{class:"dropdown-item",onClick:R[3]||(R[3]=B=>S("lhar.json","session"))},[...R[18]||(R[18]=[u("i",{class:"i-carbon-document"},null,-1),xe(" Session (.lhar.json)",-1)])]),u("button",{class:"dropdown-item",onClick:R[4]||(R[4]=B=>S("lhar","session"))},[...R[19]||(R[19]=[u("i",{class:"i-carbon-document"},null,-1),xe(" Session (.lhar)",-1)])])],64)):le("",!0)],32)):le("",!0)]),_:1})])):le("",!0),l.value?(g(),b("div",Ep,[u("button",{class:"toolbar-control",onClick:C},[...R[21]||(R[21]=[u("i",{class:"i-carbon-overflow-menu-horizontal"},null,-1),xe(" Menu ",-1)])]),Re(zn,{name:"dropdown"},{default:ft(()=>[s.value?(g(),b("div",{key:0,class:"dropdown-menu",onMouseleave:R[6]||(R[6]=B=>s.value=!1)},[u("button",{class:"dropdown-item dropdown-item--danger",onClick:z},[...R[22]||(R[22]=[u("i",{class:"i-carbon-trash-can"},null,-1),xe(" Reset all ",-1)])]),u("button",{class:he(["dropdown-item dropdown-item--danger",{"dropdown-item--disabled":!c.value}]),disabled:!c.value,onClick:K},[...R[23]||(R[23]=[u("i",{class:"i-carbon-subtract-alt"},null,-1),xe(" Remove this session ",-1)])],10,Pp)],32)):le("",!0)]),_:1})])):le("",!0)])])}}}),at=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},Ap=at(Ip,[["__scopeId","data-v-12cb5120"]]),Lp=["value","placeholder"],Op=Qe({__name:"SearchInput",props:{modelValue:{},placeholder:{default:"Search…"},autoFocus:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=t,o=me(!1),i=me();function r(){var c;s("update:modelValue",""),(c=i.value)==null||c.focus()}function l(){var c;n.modelValue?s("update:modelValue",""):(c=i.value)==null||c.blur()}return cu(()=>{var c;n.autoFocus&&((c=i.value)==null||c.focus())}),(c,p)=>(g(),b("div",{class:he(["search-input-root",{focused:o.value,active:e.modelValue.length>0}]),onClick:p[3]||(p[3]=d=>{var m;return(m=i.value)==null?void 0:m.focus()})},[p[5]||(p[5]=u("i",{class:"i-carbon-search search-input-icon"},null,-1)),u("input",{ref_key:"inputRef",ref:i,value:e.modelValue,type:"text",class:"search-input-field",placeholder:e.placeholder,onInput:p[0]||(p[0]=d=>s("update:modelValue",d.target.value)),onFocus:p[1]||(p[1]=d=>o.value=!0),onBlur:p[2]||(p[2]=d=>o.value=!1),onKeydown:Sa(l,["escape"])},null,40,Lp),e.modelValue.length>0?(g(),b("button",{key:0,class:"search-input-clear",tabindex:"-1",title:"Clear",onClick:dn(r,["stop"])},[...p[4]||(p[4]=[u("i",{class:"i-carbon-close"},null,-1)])])):le("",!0),p[6]||(p[6]=u("div",{class:"search-input-accent"},null,-1))],2))}}),Rp=at(Op,[["__scopeId","data-v-70f5ee93"]]);function Gn(e){return e<=0?0:e>=1?1:e}function Dp(e,t){const n=e.healthScore,s=n?Gn((100-n.overall)/100):null,o=e.contextLimit?Gn(e.latestTotalTokens/e.contextLimit):0,i=s===null?o:Gn(s*.7+o*.3),r=t>0?Gn(e.totalCost/t):0,l=Gn(i*.7+r*.3);let c="Healthy",p="priority-healthy",d="prio-healthy";l>=.7?(c="Critical",p="priority-critical",d="prio-critical"):l>=.45&&(c="Warning",p="priority-warning",d="prio-warning");const m=`Priority ${Math.round(l*100)} = 0.7×risk(${Math.round(i*100)}) + 0.3×cost(${Math.round(r*100)}).`;return{risk:i,normalizedCost:r,score:l,label:c,toneClass:p,barClass:d,tooltip:m}}function sc(e,t,n){var w,I;const s=[],o=e.contextInfo,i=e.composition||[],r=i.reduce((S,_)=>S+_.tokens,0),l=ko(o.messages||[]),c=i.find(S=>S.category==="tool_results");if(c&&r>0&&c.pct>25){let S=0,_="";for(const C of o.messages||[])if(St(C)==="tool_results"&&C.tokens>S&&(S=C.tokens,C.contentBlocks)){for(const z of C.contentBlocks)if(z.type==="tool_result"&&z.tool_use_id&&l[z.tool_use_id]){_=l[z.tool_use_id];break}}if(S>2e3){const C=Math.round(S/r*100);s.push({severity:"high",title:`Large tool result${_?": "+_:""} (${_e(S)} tokens, ${C}% of context)`,detail:"This single result reduces space for conversation history and is re-sent every turn. You may want to truncate output or use summary flags.",impact:`${_e(S)} tok`})}}const p=i.find(S=>S.category==="tool_definitions");if(p&&p.pct>30){const S=new Set;for(const K of t)for(const V of K.contextInfo.messages||[])if(V.contentBlocks)for(const Q of V.contentBlocks)Q.type==="tool_use"&&Q.name&&S.add(Q.name);const _=[];if(o.tools)for(const K of o.tools){const V="name"in K?K.name:(w=K.function)==null?void 0:w.name;V&&_.push(V)}const C=_.filter(K=>!S.has(K)),z=_.length;if(z>S.size+3){const K=C.slice(0,5).join(", ")+(C.length>5?` +${C.length-5} more`:""),V=Math.round(p.tokens*C.length/z);s.push({severity:"high",title:`${S.size}/${z} tools used, ${C.length} idle`,detail:`Unused: ${K}. Definitions cost ~${_e(V)} tokens and are re-sent every turn. You may want to remove unused tools to free context.`,impact:`~${_e(V)} tok`})}}if(c&&c.pct>60){const S=i.find(K=>K.category==="user_text"),_=S?S.pct:0,C=new Map;for(const K of o.messages||[])if(St(K)==="tool_results"&&K.contentBlocks){for(const V of K.contentBlocks)if(V.type==="tool_result"&&V.tool_use_id){const Q=l[V.tool_use_id]||"unknown";C.set(Q,(C.get(Q)||0)+(K.tokens||0))}}const z=Array.from(C.entries()).sort((K,V)=>V[1]-K[1]).slice(0,3).map(([K,V])=>`${K} (${_e(V)})`).join(", ");s.push({severity:"med",title:`Tool results dominate: ${c.pct}% of context`,detail:`Top tools: ${z}. User text is only ${_}%. Large results crowd out conversation history.`,impact:"Structural"})}const d=e.contextLimit>0?Math.round(o.totalTokens/e.contextLimit*100):0;d>80?s.push({severity:"high",title:`Context utilization critical: ${d}%`,detail:`${_e(o.totalTokens)} of ${_e(e.contextLimit)} tokens. Overflow risk is elevated, and older messages may be dropped or summarized.`,impact:"Critical"}):d>60&&s.push({severity:"med",title:`Context utilization high: ${d}%`,detail:`${_e(o.totalTokens)} of ${_e(e.contextLimit)} tokens used.`,impact:"Monitor"});const m=t.indexOf(e);if(m>0){let S=-1;for(let _=m-1;_>=0;_--)if((I=n[_])!=null&&I.isMain){S=_;break}if(S>=0){const _=t[S].contextInfo.totalTokens;o.totalTokens<_*.7&&s.push({severity:"med",title:"Compaction detected",detail:`Tokens dropped ${_e(_)} → ${_e(o.totalTokens)}. Context was summarized or truncated — older details may be lost.`,impact:`-${_e(_-o.totalTokens)} tok`})}}const v=i.find(S=>S.category==="system_injections");v&&v.pct>5&&s.push({severity:"med",title:`System injections: ${v.pct}% of context`,detail:`${_e(v.tokens)} tokens of system-reminder blocks injected into messages. These are re-sent every turn, reducing space for actual conversation.`,impact:`${_e(v.tokens)} tok`});for(const S of e.securityAlerts||[]){const _=S.severity==="high"?"high":S.severity==="medium"?"med":"low",C=S.toolName?`tool result: ${S.toolName}`:`${S.role} message`;s.push({severity:_,title:`⚠ ${S.pattern.replace(/_/g," ")} in ${C} (msg ${S.messageIndex+1})`,detail:S.match,impact:S.severity,messageIndex:S.messageIndex,highlight:S.match})}return s}const Np={class:"kpi-row"},Fp={class:"kpi-card"},zp={class:"kpi-value"},Bp={class:"kpi-card"},Hp={class:"kpi-value accent-blue"},jp={class:"kpi-card"},Vp={class:"kpi-value"},Up={class:"kpi-card"},Kp={class:"kpi-value accent-green"},Wp={class:"kpi-card"},qp={class:"kpi-value accent-amber"},Gp={class:"section-head"},Jp={class:"section-count"},Yp={class:"filter-group"},Xp={key:0,class:"filter-dropdown"},Zp=["onClick"],Qp={class:"sort-group"},eh={class:"table-wrap"},th={class:"ledger"},nh={key:0,class:"col-select"},sh=["onClick"],oh={key:0,class:"col-select"},ih={class:"col-priority"},rh={class:"col-source"},lh={class:"col-model"},ah={class:"model-text"},ch={class:"col-dir"},uh=["title"],dh={class:"col-turns"},fh={class:"num"},ph={class:"col-context"},hh={class:"col-cost"},vh={class:"num green"},mh={class:"col-health"},gh={class:"health-cell"},yh={key:0,class:"health-tooltip"},_h={class:"health-tooltip-title"},bh={class:"health-audit-name"},wh={class:"col-spark"},kh=["innerHTML"],xh={class:"col-time"},$h=["title"],Sh={class:"col-arrow"},Ch=["href","onClick"],Th=["colspan"],Mh={class:"expand-content"},Eh={class:"expand-inner"},Ph={key:0,class:"expand-loading"},Ih={key:0,class:"expand-section"},Ah={class:"expand-section-label"},Lh={class:"comp-tape"},Oh=["title"],Rh={key:0,class:"comp-seg-label"},Dh={class:"expand-section"},Nh={class:"finding-text"},Fh={key:1,class:"finding"},zh={key:0,class:"compare-bar"},Bh={class:"compare-bar-text"},Hh={key:0,class:"dashboard-empty"},jh={key:1,class:"dashboard-empty"},Vh=Qe({__name:"DashboardView",setup(e){const t=At(),n=me("recent"),s=me(new Set),o=me(!1),i=me(""),r=me(!1);Ke(()=>t.compareSessionIds.size,h=>{h===0&&r.value&&(r.value=!1)});function l(){r.value=!r.value,r.value||(t.compareSessionIds=new Set)}function c(h){return t.compareSessionIds.has(h)}function p(h){r.value?t.toggleCompareSession(h):ne(h)}const d=A(()=>t.compareSessionIds.size),m=me(null),v=A(()=>{const h=new Set;for(const a of t.summaries)a.source&&h.add(a.source);return Array.from(h).sort()});function w(h){return m.value?m.value.has(h):!0}function I(h){if(!m.value){const f=new Set(v.value);f.delete(h),f.size>0&&(m.value=f);return}const a=new Set(m.value);if(a.has(h)){if(a.delete(h),a.size===0)return}else a.add(h);a.size===v.value.length?m.value=null:m.value=a}const S=A(()=>m.value!==null),_=A(()=>m.value?`Source (${m.value.size})`:"Source"),C=A(()=>{let h=t.summaries;m.value&&(h=h.filter(f=>m.value.has(f.source)));const a=i.value.trim().toLowerCase();return a&&(h=h.filter(f=>[f.id,f.source,f.label,f.workingDirectory??"",f.latestModel].join("\0").toLowerCase().includes(a))),h}),z=A(()=>{let h=0;for(const a of C.value)h=Math.max(h,a.totalCost);return h}),K=A(()=>{const h=new Map;for(const a of C.value)h.set(a.id,Dp(a,z.value));return h}),V=A(()=>{const h=[...C.value];return n.value==="priority"?h.sort((a,f)=>{var N,J;const E=((N=K.value.get(a.id))==null?void 0:N.score)??0;return(((J=K.value.get(f.id))==null?void 0:J.score)??0)-E}):n.value==="cost"&&h.sort((a,f)=>f.totalCost-a.totalCost),h}),Q=A(()=>C.value.length),D=A(()=>C.value.reduce((h,a)=>h+a.entryCount,0)),ae=A(()=>C.value.reduce((h,a)=>h+a.latestTotalTokens,0)),ue=A(()=>C.value.reduce((h,a)=>h+a.totalCost,0)),O=A(()=>{const h=C.value.filter(f=>{var E;return((E=f.healthScore)==null?void 0:E.overall)!=null});if(h.length===0)return 0;const a=h.reduce((f,E)=>{var q;return f+(((q=E.healthScore)==null?void 0:q.overall)??0)},0);return Math.round(a/h.length)});function R(h){return K.value.get(h)??{score:0,label:"Healthy",toneClass:"priority-healthy",barClass:"prio-healthy",risk:0,normalizedCost:0,tooltip:""}}function de(h){return h.contextLimit?h.latestTotalTokens/h.contextLimit:0}function F(h){return h>=.8?"util-high":h>=.6?"util-mid":"util-low"}function te(h){var f;const a=(f=h.healthScore)==null?void 0:f.rating;return a==="poor"?"health-bad":a==="needs-work"?"health-warn":"health-good"}function ce(h){return h>=90?"health-good":h>=50?"health-warn":"health-bad"}function B(h){const a=Date.now()-new Date(h).getTime();return a<6e4?"just now":a<36e5?`${Math.floor(a/6e4)}m ago`:a<864e5?`${Math.floor(a/36e5)}h ago`:`${Math.floor(a/864e5)}d ago`}function se(h){const a=new Date(h),f=a.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),E=a.toLocaleDateString("en-CA");return`${f} on ${E}`}function oe(h){if(!h)return"";let a=h;/^\/home\/[^/]+(\/|$)/.test(a)?a=a.replace(/^\/home\/[^/]+/,"~"):/^\/Users\/[^/]+(\/|$)/.test(a)&&(a=a.replace(/^\/Users\/[^/]+/,"~"));const f=a.split("/");return f.length>2?f.slice(-2).join("/"):a}function W(h){return h==="prio-critical"?"#ef4444":h==="prio-warning"?"#f59e0b":"#0ea5e9"}function re(h,a){if(h.length===0)return"";const f=72,E=22,q=Math.max(...h);if(q===0)return"";const N=h.map((fe,ie)=>{const Z=h.length<=1?f/2:ie/(h.length-1)*f,ke=E-fe/q*(E-4)-2;return`${Z.toFixed(1)},${ke.toFixed(1)}`}),J=N.join(" ")+` ${f},${E} 0,${E}`,pe="sg"+a.replace("#","");return`<svg viewBox="0 0 ${f} ${E}" preserveAspectRatio="none" style="display:block;width:100%;height:100%"><defs><linearGradient id="${pe}" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="${a}" stop-opacity="0.15"/><stop offset="100%" stop-color="${a}" stop-opacity="0.02"/></linearGradient></defs><polygon points="${J}" fill="url(#${pe})"/><polyline points="${N.join(" ")}" fill="none" stroke="${a}" stroke-width="1.5" stroke-linejoin="round" stroke-linecap="round"/><circle cx="${N[N.length-1].split(",")[0]}" cy="${N[N.length-1].split(",")[1]}" r="2" fill="${a}"/></svg>`}function we(h){const a=h.tokenHistory;if(!a||a.length<2)return"";const f=R(h.id);return re(a,W(f.barClass))}const H=[{key:"system_prompt",label:"System",color:"var(--cat-system, #3b82f6)"},{key:"tool_definitions",label:"Tool defs",color:"var(--cat-tools, #ec4899)"},{key:"tool_results",label:"Tool results",color:"var(--cat-tool-results, #10b981)"},{key:"assistant_text",label:"Assistant",color:"var(--cat-assistant, #f59e0b)"},{key:"user_text",label:"User",color:"var(--cat-user, #06b6d4)"},{key:"thinking",label:"Thinking",color:"var(--cat-thinking, #8b5cf6)"},{key:"system_injections",label:"Injections",color:"var(--cat-injections, #6366f1)"}];function T(h){const a=t.loadedConversations.get(h.id);return!a||a.entries.length===0?[]:a.entries[0].composition||[]}function P(h){const a=t.loadedConversations.get(h.id);if(!a||a.entries.length===0)return[];const f=a.entries[0],E=[...a.entries].reverse(),q=Yt(E);return sc(f,E,q)}function ee(h){return s.value.has(h)}async function ne(h){const a=new Set(s.value);a.has(h)?a.delete(h):(a.add(h),t.loadedConversations.has(h)||await t.loadConversationEntries(h)),s.value=a}function $(){s.value=new Set}function L(h){return`#session/${encodeURIComponent(h)}?tab=overview`}function G(h){t.setInspectorTab("overview"),t.selectSession(h),t.setView("inspector")}function k(){o.value=!1}function y(h){h.key==="Escape"&&$()}return(h,a)=>(g(),b("div",{class:"dashboard",onKeydown:y,tabindex:"-1",onClick:k},[u("div",Np,[u("div",Fp,[u("div",zp,M(Q.value),1),a[7]||(a[7]=u("div",{class:"kpi-label"},"Sessions",-1))]),u("div",Bp,[u("div",Hp,M(D.value),1),a[8]||(a[8]=u("div",{class:"kpi-label"},"Requests",-1))]),u("div",jp,[u("div",Vp,M(Y(_e)(ae.value)),1),a[9]||(a[9]=u("div",{class:"kpi-label"},"Total Tokens",-1))]),u("div",Up,[u("div",Kp,M(Y(_t)(ue.value)),1),a[10]||(a[10]=u("div",{class:"kpi-label"},"Total Cost",-1))]),u("div",Wp,[u("div",qp,M(O.value),1),a[11]||(a[11]=u("div",{class:"kpi-label"},"Avg Health",-1))])]),u("div",Gp,[a[15]||(a[15]=u("span",{class:"section-title"},"Sessions",-1)),u("span",Jp,M(C.value.length),1),Re(Rp,{modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=f=>i.value=f),placeholder:"Filter by ID, directory, model…"},null,8,["modelValue"]),u("div",Yp,[u("button",{class:he(["compare-toggle",{active:r.value}]),onClick:l,title:"Select sessions to compare"},[...a[12]||(a[12]=[u("i",{class:"i-carbon-compare"},null,-1),xe(" Compare ",-1)])],2),v.value.length>1?(g(),b("div",Xp,[u("button",{class:he(["filter-btn",{"has-filter":S.value}]),onClick:a[1]||(a[1]=dn(f=>o.value=!o.value,["stop"]))},[xe(M(_.value)+" ",1),a[13]||(a[13]=u("span",{class:"caret"},null,-1))],2),o.value?(g(),b("div",{key:0,class:"filter-menu",onClick:a[2]||(a[2]=dn(()=>{},["stop"]))},[(g(!0),b(ve,null,Te(v.value,f=>(g(),b("div",{key:f,class:he(["filter-option",{checked:w(f)}]),onClick:E=>I(f)},[a[14]||(a[14]=u("span",{class:"check"},[u("i",{class:"i-carbon-checkmark"})],-1)),u("span",{class:he(["source-badge",Y($s)(f)])},M(f),3)],10,Zp))),128))])):le("",!0)])):le("",!0),u("div",Qp,[u("button",{class:he(["sort-btn",{active:n.value==="recent"}]),onClick:a[3]||(a[3]=f=>n.value="recent")},"Recent",2),u("button",{class:he(["sort-btn",{active:n.value==="priority"}]),onClick:a[4]||(a[4]=f=>n.value="priority")},"Priority",2),u("button",{class:he(["sort-btn",{active:n.value==="cost"}]),onClick:a[5]||(a[5]=f=>n.value="cost")},"Cost",2)])])]),u("div",eh,[u("table",th,[u("thead",null,[u("tr",null,[r.value?(g(),b("th",nh)):le("",!0),a[16]||(a[16]=u("th",{class:"col-priority"},null,-1)),a[17]||(a[17]=u("th",{class:"col-source"},"Source",-1)),a[18]||(a[18]=u("th",{class:"col-model"},"Model",-1)),a[19]||(a[19]=u("th",{class:"col-dir"},"Directory",-1)),a[20]||(a[20]=u("th",{class:"col-turns"},"Turns",-1)),a[21]||(a[21]=u("th",{class:"col-context sorted"},"Context",-1)),a[22]||(a[22]=u("th",{class:"col-cost"},"Cost",-1)),a[23]||(a[23]=u("th",{class:"col-health"},"Health",-1)),a[24]||(a[24]=u("th",{class:"col-spark"},"Trend",-1)),a[25]||(a[25]=u("th",{class:"col-time"},"Time",-1)),a[26]||(a[26]=u("th",{class:"col-arrow"},null,-1))])]),u("tbody",null,[(g(!0),b(ve,null,Te(V.value,f=>{var E,q;return g(),b(ve,{key:f.id},[u("tr",{class:he(["main-row",{expanded:ee(f.id),selected:ee(f.id)||c(f.id),pulse:Y(t).recentlyUpdated.has(f.id)}]),onClick:N=>p(f.id)},[r.value?(g(),b("td",oh,[u("span",{class:he(["compare-check",{checked:c(f.id)}])},[...a[27]||(a[27]=[u("i",{class:"i-carbon-checkmark"},null,-1)])],2)])):le("",!0),u("td",ih,[u("div",{class:he(["priority-bar",R(f.id).barClass])},null,2)]),u("td",rh,[u("span",{class:he(["source-badge",Y($s)(f.source)])},M(f.source||"?"),3)]),u("td",lh,[u("span",ah,M(Y(en)(f.latestModel)),1)]),u("td",ch,[u("span",{class:"dir-text",title:f.workingDirectory??""},M(oe(f.workingDirectory)),9,uh)]),u("td",dh,[u("span",fh,M(f.entryCount),1)]),u("td",ph,[u("span",{class:he(["util-chip",F(de(f))])},M(Math.round(de(f)*100))+"% ",3)]),u("td",hh,[u("span",vh,M(Y(_t)(f.totalCost)),1)]),u("td",mh,[u("div",gh,[u("span",{class:he(["health-num",te(f)])},M(((E=f.healthScore)==null?void 0:E.overall)??"—"),3),(q=f.healthScore)!=null&&q.audits?(g(),b("div",yh,[u("div",_h,"Health Score: "+M(f.healthScore.overall),1),(g(!0),b(ve,null,Te(f.healthScore.audits,N=>(g(),b("div",{key:N.id,class:"health-audit-line"},[u("span",bh,M(N.name),1),u("span",{class:he(["health-audit-score",ce(N.score)])},M(N.score),3)]))),128))])):le("",!0)])]),u("td",wh,[u("div",{class:"inline-spark",innerHTML:we(f)},null,8,kh)]),u("td",xh,[u("span",{class:"time-text",title:se(f.latestTimestamp)},M(B(f.latestTimestamp)),9,$h)]),u("td",Sh,[u("a",{class:"inspect-btn",title:"Open in inspector",href:L(f.id),onClick:dn(N=>G(f.id),["prevent","stop"])},[...a[28]||(a[28]=[u("i",{class:"i-carbon-arrow-right"},null,-1)])],8,Ch)])],10,sh),u("tr",{class:he(["expand-row",{open:ee(f.id)}])},[u("td",{colspan:r.value?12:11},[u("div",Mh,[u("div",Eh,[Y(t).loadingSession===f.id?(g(),b("div",Ph," Loading… ")):(g(),b(ve,{key:1},[T(f).length>0?(g(),b("div",Ih,[u("div",Ah," Composition · "+M(Y(_e)(T(f).reduce((N,J)=>N+J.tokens,0)))+" tokens ",1),u("div",Lh,[(g(),b(ve,null,Te(H,N=>{var J,pe,fe,ie;return Be(u("div",{key:N.key,class:"comp-seg",style:Me({flex:((J=T(f).find(Z=>Z.category===N.key))==null?void 0:J.tokens)??0,background:N.color}),title:`${N.label}: ${((pe=T(f).find(Z=>Z.category===N.key))==null?void 0:pe.pct)??0}%`},[(((fe=T(f).find(Z=>Z.category===N.key))==null?void 0:fe.pct)??0)>=12?(g(),b("span",Rh,M(N.label),1)):le("",!0)],12,Oh),[[wd,(((ie=T(f).find(Z=>Z.category===N.key))==null?void 0:ie.tokens)??0)>0]])}),64))])])):le("",!0),u("div",Dh,[a[30]||(a[30]=u("div",{class:"expand-section-label"},"Findings",-1)),u("div",{class:he(["expand-findings",{"expand-findings--scroll":P(f).length>5}])},[P(f).length>0?(g(!0),b(ve,{key:0},Te(P(f),(N,J)=>(g(),b("div",{key:J,class:"finding"},[u("i",{class:he(["finding-icon",[`sev-${N.severity}`,N.severity==="high"?"i-carbon-warning-alt":N.severity==="med"?"i-carbon-information":"i-carbon-checkmark"]])},null,2),u("span",Nh,[xe(M(N.title)+" ",1),N.impact?(g(),b("span",{key:0,class:he(["finding-impact",`sev-${N.severity}`])},M(N.impact),3)):le("",!0)])]))),128)):(g(),b("div",Fh,[...a[29]||(a[29]=[u("i",{class:"finding-icon sev-low i-carbon-checkmark"},null,-1),u("span",{class:"finding-text muted"},"No issues detected.",-1)])]))],2)])],64))])])],8,Th)],2)],64)}),128))])])]),Re(zn,{name:"compare-bar"},{default:ft(()=>[r.value&&d.value>=2?(g(),b("div",zh,[u("span",Bh,M(d.value)+" sessions selected",1),u("button",{class:"compare-bar-btn",onClick:a[6]||(a[6]=f=>Y(t).enterCompare())},[...a[31]||(a[31]=[u("i",{class:"i-carbon-compare"},null,-1),xe(" Compare ",-1)])])])):le("",!0)]),_:1}),V.value.length===0&&(i.value||m.value)?(g(),b("div",Hh,[...a[32]||(a[32]=[u("div",{class:"empty-title"},"No matching sessions",-1),u("div",{class:"empty-sub"},"Try adjusting your search or filters",-1)])])):Y(t).summaries.length===0?(g(),b("div",jh,[...a[33]||(a[33]=[u("div",{class:"empty-title"},"No requests captured",-1),u("div",{class:"empty-sub"},[xe("Point API calls to "),u("code",null,"localhost:4040")],-1)])])):le("",!0)],32))}}),Uh=at(Vh,[["__scopeId","data-v-9ff64b6a"]]);function zi(e){var i,r;const t=e.composition||[],n=t.reduce((l,c)=>l+c.tokens,0),s=new Map(t.map(l=>[l.category,l.tokens])),o=[];for(const[l,c]of Object.entries(Hn)){let p=0;for(const d of c)p+=s.get(d)??0;p>0&&o.push({key:l,label:((i=mt[l])==null?void 0:i.label)??l,color:((r=mt[l])==null?void 0:r.color)??"#4b5563",tokens:p,pct:n>0?p/n*100:0})}return o.sort((l,c)=>c.tokens-l.tokens)}function Kh(e,t){const n=zi(e);if(t.size===0)return n;const s=n.filter(i=>!t.has(i.key)),o=s.reduce((i,r)=>i+r.tokens,0);return s.map(i=>({...i,pct:o>0?i.tokens/o*100:0}))}function jo(e,t){return t.size===0?e.contextInfo.totalTokens:zi(e).filter(s=>!t.has(s.key)).reduce((s,o)=>s+o.tokens,0)}function Wh(e,t){const n=t.findIndex(s=>s.entry.id===e);if(n<=0)return null;for(let s=n-1;s>=0;s--)if(t[s].isMain)return t[s].entry;return null}function qh(e,t){const n=t.findIndex(i=>i.entry.id===e);if(n<0)return 0;let s=n;for(let i=n;i>=0;i--)if(t[i].isMain){s=i;break}let o=0;for(let i=s+1;i<t.length&&!t[i].isMain;i++)o++;return o}function Gh(e,t){var o,i;const n=new Map,s=1800;for(const r of e){const l=[],c=Wh(r.entry.id,t);if(c&&r.isMain){const p=c.contextInfo.totalTokens,d=r.entry.contextInfo.totalTokens;p>0&&d<p*.75&&l.push({type:"compaction",label:"Compaction",detail:`${_e(p)} → ${_e(d)} total tokens`});const m=pi(c),v=pi(r.entry),w=m>0&&c.usage?c.usage.cacheReadTokens/m:null,I=v>0&&r.entry.usage?r.entry.usage.cacheReadTokens/v:null;if(w!==null&&I!==null){const C=I-w;Math.abs(C)>=.2&&l.push({type:"cache-shift",label:"Cache shift",detail:`${Math.round(w*100)}% → ${Math.round(I*100)}% hit rate`})}const S=((o=c.composition.find(C=>C.category==="tool_results"))==null?void 0:o.tokens)??0,_=((i=r.entry.composition.find(C=>C.category==="tool_results"))==null?void 0:i.tokens)??0;_-S>=s&&l.push({type:"tool-jump",label:"Tool jump",detail:`tool results +${_e(_-S)}`})}if(r.isMain){const p=qh(r.entry.id,t);p>=3&&l.push({type:"subagent-burst",label:"Subagent burst",detail:`${p} subagent calls in this turn`})}l.length>0&&n.set(r.entry.id,l)}return n}function Jh(e){return e==="compaction"?"C":e==="cache-shift"?"H":e==="subagent-burst"?"S":"T"}function Yh(e,t){const n=e.map(s=>`${s.label}: ${s.detail}`).join(" | ");return`Turn ${t}: ${n}`}function oc(e,t){const n=t.findIndex(D=>D.entry.id===e.id);if(n<0)return null;const s=e.agentKey||"_default";let o=null;for(let D=n-1;D>=0;D--){const ae=t[D].entry;if((ae.agentKey||"_default")===s){o=ae;break}}if(!o)return null;const i=o.composition||[],r=e.composition||[],l=o.contextInfo.totalTokens,p=e.contextInfo.totalTokens-l,d=new Set;for(const D of i)d.add(D.category);for(const D of r)d.add(D.category);const m=[];for(const D of d){const ae=i.find(te=>te.category===D),ue=r.find(te=>te.category===D),O=ae?ae.tokens:0,R=ue?ue.tokens:0,de=R-O,F=Ye[D]||{label:D};m.push({category:D,label:F.label,delta:de,prevTokens:O,currTokens:R})}const v=[];for(const D of[...m].sort((ae,ue)=>Math.abs(ue.delta)-Math.abs(ae.delta)))D.delta===0?v.push({type:"same",text:` ${D.label}: ${_e(D.currTokens)} (unchanged)`,category:D.category,delta:D.delta}):D.prevTokens===0?v.push({type:"add",text:`+ ${D.label}: ${_e(D.currTokens)} (new)`,category:D.category,delta:D.delta}):D.currTokens===0?v.push({type:"remove",text:`- ${D.label}: ${_e(D.prevTokens)} (removed)`,category:D.category,delta:D.delta}):D.delta>0?v.push({type:"add",text:`+ ${D.label}: ${_e(D.prevTokens)} → ${_e(D.currTokens)} (+${_e(D.delta)})`,category:D.category,delta:D.delta}):v.push({type:"remove",text:`- ${D.label}: ${_e(D.prevTokens)} → ${_e(D.currTokens)} (${_e(D.delta)})`,category:D.category,delta:D.delta});const w=new Map;for(const[D,ae]of Object.entries(Hn))for(const ue of ae)w.set(ue,D);const I=new Map,S=new Map;for(const D of m){const ae=w.get(D.category)??"other";I.set(ae,(I.get(ae)??0)+D.delta);const ue=S.get(ae);(!ue||Math.abs(D.delta)>ue.absDelta)&&S.set(ae,{category:D.category,absDelta:Math.abs(D.delta)})}const _=Array.from(I.entries()).map(([D,ae])=>{var ue,O;return{group:D,label:((ue=mt[D])==null?void 0:ue.label)??D,delta:ae,category:((O=S.get(D))==null?void 0:O.category)??""}}).filter(D=>D.delta!==0).sort((D,ae)=>Math.abs(ae.delta)-Math.abs(D.delta)),C=_.filter(D=>D.delta>0).slice(0,3),z=_.filter(D=>D.delta<0).slice(0,3);let K=0,V=0,Q=0;for(const D of t)(D.entry.agentKey||"_default")===s&&Q++,D.entry.id===o.id&&(K=Q),D.entry.id===e.id&&(V=Q);return{prevTurnNum:K,currTurnNum:V,delta:p,lines:v,topIncreases:C,topDecreases:z}}function Yr(e,t){const n=t?"0.85":"0.35";return/opus/i.test(e)?`rgba(251, 146, 60, ${n})`:/sonnet/i.test(e)?`rgba(96, 165, 250, ${n})`:/haiku/i.test(e)?`rgba(167, 139, 250, ${n})`:/gpt/i.test(e)?`rgba(16, 185, 129, ${n})`:`rgba(148, 163, 184, ${n})`}function Vo(e,t,n=3){return t===0?n:Math.max(n,Math.round(e/t*100))}function Uo(e,t=4){if(e===0)return[0];const n=e/t,s=Math.pow(10,Math.floor(Math.log10(n))),o=Math.ceil(n/s)*s,i=[];for(let r=0;r<=t;r++){const l=r*o;l<=e*1.1&&i.push(l)}return i}function Xh(e){return e>30?Math.ceil(e/15):1}function Zh(e){let t=0;return e.map(n=>(n.isMain&&t++,n.isMain?t:0))}function Qh(e,t){return`${t?"":"Sub "}${en(e.contextInfo.model)}: ${_e(e.contextInfo.totalTokens)} / ${_t(e.costUsd)}`}function ev(e,t){const n=zi(e),s=e.contextInfo.totalTokens,o=n.map(i=>`${i.key===t.key?"▸ ":" "}${i.label}: ${_e(i.tokens)} (${i.pct.toFixed(1)}%)`);return o.push(` Total: ${_e(s)}`),o.join(`
24
- `)}function Xr(e,t){return t==="cost"?_t(e):_e(e)}function fi(e){if(!e.usage)return null;const t=pi(e);return t===0?null:e.usage.cacheReadTokens/t}function pi(e){return e.usage?e.usage.inputTokens+e.usage.cacheReadTokens+e.usage.cacheWriteTokens:0}function ic(e){const t={turnsRemaining:null,growthPerTurn:0,sinceCompaction:0,contextLimit:0,currentTokens:0};if(e.length===0)return t;const n=e.filter(S=>S.isMain).map(S=>S.entry);if(n.length<2)return t;const o=n[n.length-1].contextLimit;if(o<=0)return t;let i=0;for(let S=1;S<n.length;S++){const _=n[S-1].contextInfo.totalTokens,C=n[S].contextInfo.totalTokens;_>0&&C<_*.75&&(i=S)}const r=n.slice(i);if(r.length<2)return t;const l=r[0].contextInfo.totalTokens,c=r[r.length-1].contextInfo.totalTokens,p=c-l,d=r.length-1,m=p/d,v=c,w=o-v;let I=null;return m>0&&(I=Math.floor(w/m),I<0&&(I=0)),{turnsRemaining:I,growthPerTurn:m,sinceCompaction:r.length,contextLimit:o,currentTokens:v}}function tv(e){var c,p;const t=Math.round(e.utilization*100),n=e.healthScore,s=[...e.composition].sort((d,m)=>m.tokens-d.tokens)[0],o=e.topDelta;let i="narrative-neutral",r=`Context is at ${t}% utilization.`;(n==null?void 0:n.rating)==="poor"||t>=85?(i="narrative-advisory",r=`Turn health is elevated risk (${n?n.overall+"/100":t+"% utilization"}).`):(n==null?void 0:n.rating)==="needs-work"||t>=65?(i="narrative-advisory",r=`Turn health shows moderate pressure (${n?n.overall+"/100":t+"% utilization"}).`):n&&(r=`Turn health is stable at ${n.overall}/100.`);const l=[];if(s&&l.push(`${((c=Ye[s.category])==null?void 0:c.label)??s.category} is the largest share (${Math.round(s.pct)}%).`),o){const d=((p=Ye[o.category])==null?void 0:p.label)??o.category,m=o.delta>0?"grew":"shrank";l.push(`${d} ${m} most vs previous main turn (${_e(Math.abs(o.delta))}).`)}return{toneClass:i,headline:r,detail:l.join(" ")}}const nv={Read:{paramKeys:["file_path","path"],kind:"read"},Write:{paramKeys:["file_path","path"],kind:"write"},Edit:{paramKeys:["file_path","path"],kind:"write"},MultiEdit:{paramKeys:["file_path","path"],kind:"write"},read_file:{paramKeys:["path","file_path"],kind:"read"},write_file:{paramKeys:["path","file_path"],kind:"write"},read:{paramKeys:["path","file_path"],kind:"read"},write:{paramKeys:["path","file_path"],kind:"write"},edit:{paramKeys:["path","file_path"],kind:"write"},replace:{paramKeys:["file_path","path"],kind:"write"},readFile:{paramKeys:["path","filePath","file_path"],kind:"read"},writeFile:{paramKeys:["path","filePath","file_path"],kind:"write"},editFile:{paramKeys:["path","filePath","file_path"],kind:"write"},create_file:{paramKeys:["path","file_path"],kind:"write"},patch:{paramKeys:["path","file_path"],kind:"write"}};function sv(e){const t=nv[e.name];if(!t)return null;const n=e.input;if(!n||typeof n!="object")return null;for(const s of t.paramKeys){const o=n[s];if(typeof o=="string"&&o.length>0)return{path:ov(o),kind:t.kind}}return null}function ov(e){let t=e.replace(/\/+/g,"/");return t.startsWith("./")&&(t=t.slice(2)),t.length>1&&t.endsWith("/")&&(t=t.slice(0,-1)),t}function rc(e,t){if(!t)return e;const n=t.endsWith("/")?t:t+"/";if(e.startsWith(n))return e.slice(n.length);const s=iv(e);return s?"~/"+e.slice(s.length):e}function iv(e){const t=e.match(/^(\/(?:home|Users)\/[^/]+\/)/);return t?t[1]:null}function rv(e,t){const n=new Map;for(const s of e){if(!s.contentBlocks)continue;const i=s.contentBlocks.filter(r=>r.type==="tool_use").length>0?(s.tokens||0)/s.contentBlocks.length:0;for(const r of s.contentBlocks){if(r.type!=="tool_use")continue;const l=r,c=sv(l);if(c&&l.id){const p=rc(c.path,t);n.set(l.id,{path:p,kind:c.kind,tokens:Math.round(i)})}}}return n}function lc(e,t){const n=new Set,s=new Map;function o(i){let r=s.get(i);return r||(r={path:i,tokens:0,reads:0,writes:0,toolResultTokens:0,toolCallTokens:0},s.set(i,r)),r}for(const i of e){const r=i.contextInfo.messages??[];if(r.length===0)continue;const l=rv(r,t);for(const[c,p]of l){if(n.has(c))continue;n.add(c);const d=o(p.path);d.toolCallTokens+=p.tokens,d.tokens+=p.tokens,p.kind==="read"?d.reads++:d.writes++}for(const c of r){if(!c.contentBlocks)continue;const p=c.contentBlocks.filter(m=>m.type==="tool_result");if(p.length===0)continue;const d=p.length>0?(c.tokens||0)/p.length:0;for(const m of p){if(m.type!=="tool_result")continue;const v=m.tool_use_id,w=l.get(v);if(!w||!n.has(v))continue;const I=o(w.path),S=Math.round(d);I.toolResultTokens+=S,I.tokens+=S}}}return Array.from(s.values()).filter(i=>i.tokens>0).sort((i,r)=>r.tokens-i.tokens)}function Bi(e){const t=e.split("/");return t[t.length-1]||e}function Zr(e){const t=e.lastIndexOf("/");return t<=0?"":e.slice(0,t)}const Qr=["#3b82f6","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899","#14b8a6","#6366f1","#84cc16"];function hi(e){return Qr[e%Qr.length]}function lv(e){var t=0,n=e.children,s=n&&n.length;if(!s)t=1;else for(;--s>=0;)t+=n[s].value;e.value=t}function av(){return this.eachAfter(lv)}function cv(e,t){let n=-1;for(const s of this)e.call(t,s,++n,this);return this}function uv(e,t){for(var n=this,s=[n],o,i,r=-1;n=s.pop();)if(e.call(t,n,++r,this),o=n.children)for(i=o.length-1;i>=0;--i)s.push(o[i]);return this}function dv(e,t){for(var n=this,s=[n],o=[],i,r,l,c=-1;n=s.pop();)if(o.push(n),i=n.children)for(r=0,l=i.length;r<l;++r)s.push(i[r]);for(;n=o.pop();)e.call(t,n,++c,this);return this}function fv(e,t){let n=-1;for(const s of this)if(e.call(t,s,++n,this))return s}function pv(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,s=t.children,o=s&&s.length;--o>=0;)n+=s[o].value;t.value=n})}function hv(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function vv(e){for(var t=this,n=mv(t,e),s=[t];t!==n;)t=t.parent,s.push(t);for(var o=s.length;e!==n;)s.splice(o,0,e),e=e.parent;return s}function mv(e,t){if(e===t)return e;var n=e.ancestors(),s=t.ancestors(),o=null;for(e=n.pop(),t=s.pop();e===t;)o=e,e=n.pop(),t=s.pop();return o}function gv(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function yv(){return Array.from(this)}function _v(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function bv(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*wv(){var e=this,t,n=[e],s,o,i;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,s=e.children)for(o=0,i=s.length;o<i;++o)n.push(s[o]);while(n.length)}function Hi(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=$v)):t===void 0&&(t=xv);for(var n=new Qs(e),s,o=[n],i,r,l,c;s=o.pop();)if((r=t(s.data))&&(c=(r=Array.from(r)).length))for(s.children=r,l=c-1;l>=0;--l)o.push(i=r[l]=new Qs(r[l])),i.parent=s,i.depth=s.depth+1;return n.eachBefore(Cv)}function kv(){return Hi(this).eachBefore(Sv)}function xv(e){return e.children}function $v(e){return Array.isArray(e)?e[1]:null}function Sv(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Cv(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Qs(e){this.data=e,this.depth=this.height=0,this.parent=null}Qs.prototype=Hi.prototype={constructor:Qs,count:av,each:cv,eachAfter:dv,eachBefore:uv,find:fv,sum:pv,sort:hv,path:vv,ancestors:gv,descendants:yv,leaves:_v,links:bv,copy:kv,[Symbol.iterator]:wv};function Tv(e){if(typeof e!="function")throw new Error;return e}function Jn(){return 0}function Yn(e){return function(){return e}}function Mv(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ev(e,t,n,s,o){for(var i=e.children,r,l=-1,c=i.length,p=e.value&&(s-t)/e.value;++l<c;)r=i[l],r.y0=n,r.y1=o,r.x0=t,r.x1=t+=r.value*p}function Pv(e,t,n,s,o){for(var i=e.children,r,l=-1,c=i.length,p=e.value&&(o-n)/e.value;++l<c;)r=i[l],r.x0=t,r.x1=s,r.y0=n,r.y1=n+=r.value*p}var Iv=(1+Math.sqrt(5))/2;function Av(e,t,n,s,o,i){for(var r=[],l=t.children,c,p,d=0,m=0,v=l.length,w,I,S=t.value,_,C,z,K,V,Q,D;d<v;){w=o-n,I=i-s;do _=l[m++].value;while(!_&&m<v);for(C=z=_,Q=Math.max(I/w,w/I)/(S*e),D=_*_*Q,V=Math.max(z/D,D/C);m<v;++m){if(_+=p=l[m].value,p<C&&(C=p),p>z&&(z=p),D=_*_*Q,K=Math.max(z/D,D/C),K>V){_-=p;break}V=K}r.push(c={value:_,dice:w<I,children:l.slice(d,m)}),c.dice?Ev(c,n,s,o,S?s+=I*_/S:i):Pv(c,n,s,S?n+=w*_/S:o,i),S-=_,d=m}return r}const Lv=(function e(t){function n(s,o,i,r,l){Av(t,s,o,i,r,l)}return n.ratio=function(s){return e((s=+s)>1?s:1)},n})(Iv);function Ov(){var e=Lv,t=!1,n=1,s=1,o=[0],i=Jn,r=Jn,l=Jn,c=Jn,p=Jn;function d(v){return v.x0=v.y0=0,v.x1=n,v.y1=s,v.eachBefore(m),o=[0],t&&v.eachBefore(Mv),v}function m(v){var w=o[v.depth],I=v.x0+w,S=v.y0+w,_=v.x1-w,C=v.y1-w;_<I&&(I=_=(I+_)/2),C<S&&(S=C=(S+C)/2),v.x0=I,v.y0=S,v.x1=_,v.y1=C,v.children&&(w=o[v.depth+1]=i(v)/2,I+=p(v)-w,S+=r(v)-w,_-=l(v)-w,C-=c(v)-w,_<I&&(I=_=(I+_)/2),C<S&&(S=C=(S+C)/2),e(v,I,S,_,C))}return d.round=function(v){return arguments.length?(t=!!v,d):t},d.size=function(v){return arguments.length?(n=+v[0],s=+v[1],d):[n,s]},d.tile=function(v){return arguments.length?(e=Tv(v),d):e},d.padding=function(v){return arguments.length?d.paddingInner(v).paddingOuter(v):d.paddingInner()},d.paddingInner=function(v){return arguments.length?(i=typeof v=="function"?v:Yn(+v),d):i},d.paddingOuter=function(v){return arguments.length?d.paddingTop(v).paddingRight(v).paddingBottom(v).paddingLeft(v):d.paddingTop()},d.paddingTop=function(v){return arguments.length?(r=typeof v=="function"?v:Yn(+v),d):r},d.paddingRight=function(v){return arguments.length?(l=typeof v=="function"?v:Yn(+v),d):l},d.paddingBottom=function(v){return arguments.length?(c=typeof v=="function"?v:Yn(+v),d):c},d.paddingLeft=function(v){return arguments.length?(p=typeof v=="function"?v:Yn(+v),d):p},d}const Rv={key:0,class:"panel panel--hero"},Dv={class:"panel-head"},Nv={class:"panel-sub"},Fv={class:"mode-toggle"},zv={class:"panel-body"},Bv={key:0,class:"treemap"},Hv=["onClick"],jv={class:"tm-label"},Vv={class:"tm-val"},Uv={key:1,class:"tm-label-compact"},Kv={key:2,class:"tm-pct"},Wv={key:1,class:"treemap treemap-simple"},qv=["onClick"],Gv={class:"tm-label"},Jv={class:"tm-val"},Yv={key:2,class:"treemap"},Xv=["onClick"],Zv={class:"tm-label"},Qv={class:"tm-val"},em={key:1,class:"tm-label-compact"},tm={key:2,class:"tm-pct"},nm={class:"legend"},sm={class:"legend-pct"},om={key:0,class:"legend-item"},im={class:"legend-file-path"},rm={class:"legend-pct"},lm={key:0,class:"legend-item"},am={class:"legend-pct"},el=5,tl=6,cm=Qe({__name:"CompositionTreemap",props:{entry:{},turnNum:{}},emits:["categoryClick","toolClick","fileClick"],setup(e,{emit:t}){const n=e,s=At(),o=t,i=me("detailed"),r=me(null),l=A(()=>{var ce;const F=((ce=n.entry)==null?void 0:ce.composition)||[],te=[];for(const[B,se]of Object.entries(Hn)){let oe=0;for(const W of se){const re=F.find(we=>we.category===W);re&&(oe+=re.tokens)}if(oe>0){const W=mt[B];te.push({key:B,label:W.label,color:W.color,tokens:oe})}}return te}),c=A(()=>{const F=n.entry;return F?F.composition.filter(te=>te.tokens>0).map(te=>{var ce,B;return{key:te.category,label:((ce=Ye[te.category])==null?void 0:ce.label)??te.category,color:((B=Ye[te.category])==null?void 0:B.color)??"#4b5563",tokens:te.tokens,category:te.category}}):[]});function p(F){const te=["#10b981","#34d399","#14b8a6","#2dd4bf","#10b981","#06b6d4","#0ea5e9"];return te[F%te.length]}const d=A(()=>{const F=n.entry;if(!F)return[];const te=F.contextInfo.messages||[],ce=ko(te),B=new Map;for(const se of te){if(St(se)!=="tool_results")continue;const oe=(se.contentBlocks||[]).filter(re=>re.type==="tool_result");if(oe.length===0)continue;const W=(se.tokens||0)/oe.length;for(const re of oe){const we=re.tool_use_id||"unknown",H=ce[we]||`tool:${we.slice(0,8)}`;B.set(H,(B.get(H)||0)+W)}}return Array.from(B.entries()).sort((se,oe)=>oe[1]-se[1]).map(([se,oe],W)=>({key:`tool-${se}-${W}`,label:se,color:p(W),tokens:Math.max(1,Math.round(oe)),category:"tool_results",toolName:se}))}),m=A(()=>r.value==="tool_results"&&d.value.length>0?d.value:c.value),v=A(()=>{const F=s.selectedSession;if(!F||F.entries.length===0)return[];const te=F.workingDirectory;return lc(F.entries,te).map((B,se)=>({key:`file-${B.path}-${se}`,label:Bi(B.path),color:hi(se),tokens:B.tokens,category:"files",toolName:B.path}))}),w=A(()=>V(v.value)),I=A(()=>v.value.length>0),S=A(()=>m.value.slice(0,el)),_=A(()=>m.value.slice(el)),C=A(()=>_.value.map(F=>`${F.label}: ${de(F.tokens)}`).join(`
25
- `)),z=A(()=>v.value.slice(0,tl)),K=A(()=>v.value.slice(tl).map(F=>`${F.toolName||F.label}: ${de(F.tokens)}`).join(`
26
- `));function V(F){if(F.length===0)return[];const te=F.reduce((se,oe)=>se+oe.tokens,0),ce=Hi({key:"root",label:"root",color:"#000000",tokens:0,children:F}).sum(se=>se.children&&se.children.length>0?0:Math.max(0,se.tokens||0));return Ov().size([100,100]).paddingInner(1).round(!0)(ce).leaves().map(se=>{const oe=se.data;return{key:oe.key,label:oe.label,color:oe.color,tokens:oe.tokens,category:oe.category,x:se.x0,y:se.y0,w:se.x1-se.x0,h:se.y1-se.y0,pct:te>0?oe.tokens/te*100:0}})}const Q=A(()=>V(m.value));function D(F){if(r.value===null&&F.category==="tool_results"&&d.value.length>1){r.value="tool_results";return}if(r.value==="tool_results"&&F.toolName){o("toolClick",F.toolName);return}o("categoryClick",F.category||"tool_results")}function ae(F){const te=n.entry;if(!te)return;const ce=Hn[F]||[];if(ce.length===0)return;let B=ce[0],se=-1;for(const oe of ce){const W=te.composition.find(we=>we.category===oe),re=(W==null?void 0:W.tokens)??0;re>se&&(se=re,B=oe)}o("categoryClick",B)}function ue(F){F.toolName&&o("fileClick",F.toolName)}function O(){r.value=null}const R=A(()=>{var F;return((F=n.entry)==null?void 0:F.contextInfo.totalTokens)??0});function de(F){return R.value===0?"":Math.round(F/R.value*100)+"%"}return Ke(()=>{var F;return(F=n.entry)==null?void 0:F.id},()=>{r.value=null}),(F,te)=>{const ce=gn("tooltip");return e.entry.composition.length>0?(g(),b("section",Rv,[u("div",Dv,[te[3]||(te[3]=u("span",{class:"panel-title"},"Composition",-1)),u("span",Nv,"Turn "+M(e.turnNum)+" · "+M(Y(_e)(e.entry.composition.reduce((B,se)=>B+se.tokens,0))),1),i.value==="detailed"&&r.value?(g(),b("button",{key:0,class:"treemap-back",onClick:O}," Back to categories ")):le("",!0),u("div",Fv,[u("button",{class:he({on:i.value==="detailed"}),onClick:te[0]||(te[0]=B=>i.value="detailed")},"Detail",2),u("button",{class:he({on:i.value==="simple"}),onClick:te[1]||(te[1]=B=>i.value="simple")},"Simple",2),I.value?(g(),b("button",{key:0,class:he({on:i.value==="files"}),onClick:te[2]||(te[2]=B=>i.value="files")},"Files",2)):le("",!0)])]),u("div",zv,[i.value==="detailed"?(g(),b("div",Bv,[(g(!0),b(ve,null,Te(Q.value,B=>Be((g(),b("button",{key:B.key,class:"tm-block tm-block-2d",style:Me({left:B.x+"%",top:B.y+"%",width:B.w+"%",height:B.h+"%",background:B.color}),onClick:se=>D(B)},[B.w>=18&&B.h>=16?(g(),b(ve,{key:0},[u("span",jv,M(B.label),1),u("span",Vv,M(Y(_e)(B.tokens)),1)],64)):B.w>=12&&B.h>=12?(g(),b("span",Uv,M(B.label.slice(0,8))+M(B.label.length>8?"…":""),1)):B.w>=8&&B.h>=8?(g(),b("span",Kv,M(Math.round(B.pct))+"%",1)):le("",!0)],12,Hv)),[[ce,`${B.label}: ${B.tokens.toLocaleString()} (${B.pct.toFixed(1)}%)`]])),128))])):i.value==="simple"?(g(),b("div",Wv,[(g(!0),b(ve,null,Te(l.value,B=>Be((g(),b("div",{key:B.key,class:he(["tm-block tm-block-simple",{"tm-block-narrow":B.tokens/e.entry.composition.reduce((se,oe)=>se+oe.tokens,0)<.15}]),style:Me({flex:B.tokens,background:B.color}),onClick:se=>ae(B.key)},[u("span",Gv,M(B.label),1),u("span",Jv,M(Y(_e)(B.tokens)),1)],14,qv)),[[ce,`${B.label}: ${B.tokens.toLocaleString()}`]])),128))])):i.value==="files"?(g(),b("div",Yv,[(g(!0),b(ve,null,Te(w.value,B=>Be((g(),b("button",{key:B.key,class:"tm-block tm-block-2d",style:Me({left:B.x+"%",top:B.y+"%",width:B.w+"%",height:B.h+"%",background:B.color}),onClick:se=>ue(B)},[B.w>=18&&B.h>=16?(g(),b(ve,{key:0},[u("span",Zv,M(B.label),1),u("span",Qv,M(Y(_e)(B.tokens)),1)],64)):B.w>=12&&B.h>=12?(g(),b("span",em,M(B.label.slice(0,8))+M(B.label.length>8?"…":""),1)):B.w>=8&&B.h>=8?(g(),b("span",tm,M(Math.round(B.pct))+"%",1)):le("",!0)],12,Xv)),[[ce,`${B.toolName||B.label}: ${B.tokens.toLocaleString()} (${B.pct.toFixed(1)}%)`]])),128))])):le("",!0),u("div",nm,[i.value==="detailed"?(g(),b(ve,{key:0},[(g(!0),b(ve,null,Te(S.value,B=>(g(),b("span",{key:`legend-${B.key}`,class:"legend-item"},[u("span",{class:"legend-dot",style:Me({background:B.color})},null,4),xe(" "+M(B.label)+" ",1),u("span",sm,M(de(B.tokens)),1)]))),128)),m.value.length>S.value.length?Be((g(),b("span",om,[xe(" +"+M(m.value.length-S.value.length)+" more ",1)])),[[ce,C.value]]):le("",!0)],64)):i.value==="files"?(g(),b(ve,{key:1},[(g(!0),b(ve,null,Te(z.value,B=>(g(),b("span",{key:`legend-file-${B.key}`,class:"legend-item"},[u("span",{class:"legend-dot",style:Me({background:B.color})},null,4),Be((g(),b("span",im,[xe(M(B.label),1)])),[[ce,B.toolName||B.label]]),u("span",rm,M(de(B.tokens)),1)]))),128)),v.value.length>z.value.length?Be((g(),b("span",lm,[xe(" +"+M(v.value.length-z.value.length)+" more ",1)])),[[ce,K.value]]):le("",!0)],64)):(g(!0),b(ve,{key:2},Te(l.value,B=>(g(),b("span",{key:B.key,class:"legend-item"},[u("span",{class:"legend-dot",style:Me({background:B.color})},null,4),xe(" "+M(B.label)+" ",1),u("span",am,M(de(B.tokens)),1)]))),128))])])])):le("",!0)}}}),um=at(cm,[["__scopeId","data-v-ac46df9b"]]),dm={key:0,class:"panel panel--secondary"},fm={class:"panel-head"},pm={class:"panel-sub"},hm={class:"panel-body diff-body"},vm={key:0,class:"diff-tapes"},mm={class:"diff-tape-row"},gm={class:"diff-tape-label"},ym={class:"diff-tape-track"},_m={class:"diff-tape-val"},bm={class:"diff-tape-row"},wm={class:"diff-tape-label"},km={class:"diff-tape-track"},xm={class:"diff-tape-val"},$m={key:1,class:"diff-summary-row"},Sm={key:0,class:"diff-summary-group"},Cm={class:"diff-summary-label"},Tm=["onClick"],Mm=["onClick"],Em={key:0,class:"diff-summary-group"},Pm={class:"diff-summary-label"},Im=["onClick"],Am={key:1,class:"diff-summary-group"},Lm={class:"diff-summary-label"},Om=["onClick"],Rm={key:2,class:"diff-hidden-wrap"},Dm={class:"diff-hidden-note"},Nm=["onClick"],Fm={key:1,class:"diff-empty"},zm=2e3,Bm=Qe({__name:"ContextDiffPanel",props:{diffData:{},currentEntry:{default:null},previousEntry:{default:null},showTapes:{type:Boolean,default:!1},hideUnchanged:{type:Boolean,default:!1},summaryMode:{default:"split"},combinedLabel:{default:"Drivers"},growthLabel:{default:"Growth drivers"},shrinkLabel:{default:"Shrink drivers"},deltaTone:{default:"good"},showWhenEmpty:{type:Boolean,default:!1},emptyText:{default:"First turn — no previous context."}},emits:["categoryClick"],setup(e,{emit:t}){const n=e,s=t,o=A(()=>!!n.diffData||n.showWhenEmpty),i=A(()=>{const w=n.diffData;return w?n.hideUnchanged?w.lines.filter(I=>I.type!=="same"):w.lines:[]}),r=A(()=>{const w=n.diffData,I=n.currentEntry;if(!w||!I)return[];const S=new Map(I.composition.map(_=>[_.category,_.tokens]));return w.lines.filter(_=>_.type==="same").map(_=>{var C;return{category:_.category,label:((C=Ye[_.category])==null?void 0:C.label)??_.category,tokens:S.get(_.category)??0}}).sort((_,C)=>C.tokens-_.tokens)}),l=A(()=>r.value.length===0?"":r.value.map(w=>`${w.label}: ${_e(w.tokens)}`).join(`
27
- `)),c=A(()=>{const w=n.diffData;if(!w)return"var(--text-dim)";const I=w.delta>=0;return n.deltaTone==="bad"?I?"var(--accent-red)":"var(--accent-green)":I?"var(--accent-green)":"var(--accent-red)"});function p(w){return Math.abs(w)>=zm}function d(w,I){return p(w)?I==="up"?"diff-tone-up":"diff-tone-down":"diff-tone-muted"}function m(w){return w.type==="same"?"diff-tone-muted":w.type==="add"?d(w.delta,"up"):d(w.delta,"down")}function v(w){s("categoryClick",w)}return(w,I)=>{const S=gn("tooltip");return o.value?(g(),b("section",dm,[u("div",fm,[I[0]||(I[0]=u("span",{class:"panel-title"},"Context Diff",-1)),e.diffData?(g(),b(ve,{key:0},[u("span",pm,"Turn "+M(e.diffData.prevTurnNum)+" → "+M(e.diffData.currTurnNum),1),u("span",{class:"diff-delta",style:Me({color:c.value})},M(e.diffData.delta>=0?"+":"")+M(Y(_e)(e.diffData.delta)),5)],64)):le("",!0)]),u("div",hm,[e.diffData?(g(),b(ve,{key:0},[e.showTapes&&e.currentEntry&&e.previousEntry?(g(),b("div",vm,[u("div",mm,[u("span",gm,"T"+M(e.diffData.prevTurnNum),1),u("div",ym,[(g(!0),b(ve,null,Te(e.previousEntry.composition,_=>{var C;return g(),b("div",{key:"prev-"+_.category,class:"diff-tape-seg",style:Me({flex:_.tokens,background:((C=Y(Ye)[_.category])==null?void 0:C.color)??"#475569"})},null,4)}),128))]),u("span",_m,M(Y(_e)(e.previousEntry.contextInfo.totalTokens)),1)]),u("div",bm,[u("span",wm,"T"+M(e.diffData.currTurnNum),1),u("div",km,[(g(!0),b(ve,null,Te(e.currentEntry.composition,_=>{var C;return g(),b("div",{key:"curr-"+_.category,class:"diff-tape-seg",style:Me({flex:_.tokens,background:((C=Y(Ye)[_.category])==null?void 0:C.color)??"#475569"})},null,4)}),128))]),u("span",xm,M(Y(_e)(e.currentEntry.contextInfo.totalTokens)),1)])])):le("",!0),e.diffData.topIncreases.length>0||e.diffData.topDecreases.length>0?(g(),b("div",$m,[e.summaryMode==="combined"?(g(),b("div",Sm,[u("span",Cm,M(e.combinedLabel),1),(g(!0),b(ve,null,Te(e.diffData.topIncreases,_=>(g(),b("button",{key:"inc-"+_.group,class:he(["diff-summary-chip",d(_.delta,"up")]),onClick:C=>v(_.category)},M(_.label)+" +"+M(Y(_e)(_.delta)),11,Tm))),128)),(g(!0),b(ve,null,Te(e.diffData.topDecreases,_=>(g(),b("button",{key:"dec-"+_.group,class:he(["diff-summary-chip",d(_.delta,"down")]),onClick:C=>v(_.category)},M(_.label)+" "+M(Y(_e)(_.delta)),11,Mm))),128))])):(g(),b(ve,{key:1},[e.diffData.topIncreases.length>0?(g(),b("div",Em,[u("span",Pm,M(e.growthLabel),1),(g(!0),b(ve,null,Te(e.diffData.topIncreases,_=>(g(),b("button",{key:"inc-"+_.group,class:he(["diff-summary-chip",d(_.delta,"up")]),onClick:C=>v(_.category)},M(_.label)+" +"+M(Y(_e)(_.delta)),11,Im))),128))])):le("",!0),e.diffData.topDecreases.length>0?(g(),b("div",Am,[u("span",Lm,M(e.shrinkLabel),1),(g(!0),b(ve,null,Te(e.diffData.topDecreases,_=>(g(),b("button",{key:"dec-"+_.group,class:he(["diff-summary-chip",d(_.delta,"down")]),onClick:C=>v(_.category)},M(_.label)+" "+M(Y(_e)(_.delta)),11,Om))),128))])):le("",!0)],64))])):le("",!0),e.hideUnchanged&&r.value.length>0?(g(),b("div",Rm,[Be((g(),b("span",Dm,[xe(M(r.value.length)+" unchanged "+M(r.value.length===1?"category":"categories")+" hidden ",1)])),[[S,l.value]])])):le("",!0),(g(!0),b(ve,null,Te(i.value,(_,C)=>(g(),b("button",{key:"line-"+C,class:he(["diff-line",["diff-"+_.type,m(_)]]),onClick:z=>v(_.category)},M(_.text),11,Nm))),128))],64)):(g(),b("span",Fm,M(e.emptyText),1))])])):le("",!0)}}}),ac=at(Bm,[["__scopeId","data-v-f23cde3c"]]),Hm={key:0,class:"panel panel--primary"},jm={class:"panel-head"},Vm={key:0,class:"finding-count"},Um={key:0,class:"audit-row"},Km=["onClick"],Wm={class:"rec-content"},qm={class:"rec-title"},Gm={class:"rec-detail"},Jm=Qe({__name:"HealthFindings",props:{entry:{},recommendations:{},auditTooltip:{type:Function}},emits:["recommendationClick"],setup(e,{emit:t}){const n=t;function s(o){o.messageIndex!=null&&n("recommendationClick",o)}return(o,i)=>{const r=gn("tooltip");return e.entry.healthScore||e.recommendations.length>0?(g(),b("section",Hm,[u("div",jm,[i[0]||(i[0]=u("span",{class:"panel-title"},"Findings",-1)),e.recommendations.length?(g(),b("span",Vm,M(e.recommendations.length),1)):le("",!0)]),e.entry.healthScore?(g(),b("div",Um,[(g(!0),b(ve,null,Te(e.entry.healthScore.audits,l=>Be((g(),b("span",{key:l.id,class:he(["audit-chip",l.score>=90?"audit-good":l.score>=50?"audit-warn":"audit-bad"])},[xe(M(l.name)+" ",1),u("b",null,M(l.score),1)],2)),[[r,e.auditTooltip(l)]])),128))])):le("",!0),e.recommendations.length>0?(g(),b("div",{key:1,class:he(["panel-body rec-list",{"rec-list--scroll":e.recommendations.length>3}])},[(g(!0),b(ve,null,Te(e.recommendations,(l,c)=>(g(),b("div",{key:c,class:he(["rec",{"rec-clickable":l.messageIndex!=null}]),onClick:p=>l.messageIndex!=null&&s(l)},[u("i",{class:he(["rec-icon",[`sev-${l.severity}`,l.severity==="high"?"i-carbon-warning-alt":l.severity==="med"?"i-carbon-information":"i-carbon-checkmark"]])},null,2),u("div",Wm,[u("div",qm,M(l.title),1),u("div",Gm,M(l.detail),1)]),u("span",{class:he(["rec-impact",`sev-${l.severity}`])},M(l.impact),3)],10,Km))),128))],2)):le("",!0)])):le("",!0)}}}),Ym=at(Jm,[["__scopeId","data-v-f1490cbd"]]),Xm={key:0,class:"overview"},Zm={class:"narrative-copy"},Qm={class:"narrative-title"},eg={class:"narrative-detail"},tg={class:"narrative-actions"},ng={class:"stats-grid"},sg={class:"stat-detail"},og={key:0,class:"stat-projection"},ig={key:1,class:"stat-projection stat-projection--warn"},rg={key:2,class:"stat-tape"},lg={key:3,class:"util-track"},ag={class:"stat-card"},cg={class:"stat-readout green"},ug={class:"stat-detail"},dg={class:"stat-card"},fg={class:"stat-readout"},pg={key:0,class:"stat-detail"},hg={key:0,class:"stat-card stat-card--health"},vg={class:"health-ring"},mg={width:"48",height:"48",viewBox:"0 0 48 48"},gg=["stroke","stroke-dasharray"],yg=["fill"],_g={key:1,class:"stat-card"},bg={class:"meta-row"},wg={key:0},kg={key:1},xg={key:2},$g={key:1,class:"panel panel--secondary"},Sg={class:"panel-head"},Cg={class:"panel-sub"},Tg={class:"panel-body msg-preview"},Mg=["onClick"],Eg={class:"msg-group-name"},Pg={class:"msg-group-count"},Ig={class:"msg-group-tokens"},Ag={class:"msg-group-pct"},Lg={class:"msg-group-bar"},Og={key:2,class:"panel panel--secondary"},Rg={class:"panel-head"},Dg={class:"panel-sub"},Ng={class:"panel-body file-preview"},Fg={class:"file-list"},zg=["onClick"],Bg={class:"file-path"},Hg={class:"file-dir"},jg={class:"file-ops"},Vg={key:0,class:"file-op file-op--read"},Ug={key:1,class:"file-op file-op--write"},Kg={class:"file-tokens"},Wg={class:"file-pct"},qg={class:"file-bar"},Gg=Qe({__name:"OverviewTab",setup(e){const t=At(),n=A(()=>t.selectedEntry),s=A(()=>t.selectedSession),o=A(()=>s.value?[...s.value.entries].reverse():[]),i=A(()=>{const T=n.value;return!T||!T.contextLimit?0:T.contextInfo.totalTokens/T.contextLimit}),r=A(()=>{const T=i.value;return T>=.9?"var(--accent-red)":T>=.7?"var(--accent-amber)":"var(--accent-blue)"}),l=A(()=>{const T=n.value;if(!(T!=null&&T.usage))return null;const P=T.usage.inputTokens+T.usage.cacheReadTokens+T.usage.cacheWriteTokens;return P===0?null:T.usage.cacheReadTokens/P}),c=A(()=>Yt(o.value)),p=A(()=>ic(c.value)),d=A(()=>{const T=n.value;if(!T)return 0;const P=c.value,ee=P.findIndex(ne=>ne.entry.id===T.id);return ee<0?0:P.slice(0,ee+1).reduce((ne,$)=>ne+($.isMain?1:0),0)}),m=A(()=>{const T=n.value;if(!T)return[];const P=o.value,ee=c.value;return sc(T,P,ee)}),v=A(()=>{const T=n.value;if(!T)return null;const P=c.value,ee=P.findIndex(ne=>ne.entry.id===T.id);if(ee<0)return null;for(let ne=ee-1;ne>=0;ne--)if(P[ne].isMain)return P[ne].entry;return null}),w=A(()=>{const T=n.value,P=v.value;if(!T||!P)return[];const ee=new Map(P.composition.map(L=>[L.category,L.tokens])),ne=new Map(T.composition.map(L=>[L.category,L.tokens])),$=new Set([...ee.keys(),...ne.keys()]);return Array.from($).map(L=>{const G=ee.get(L)??0,k=ne.get(L)??0;return{category:L,delta:k-G}}).filter(L=>L.delta!==0).sort((L,G)=>Math.abs(G.delta)-Math.abs(L.delta))}),I=A(()=>{var $;const T=n.value;if(!(($=T==null?void 0:T.composition)!=null&&$.length))return null;const P=T.composition.reduce((L,G)=>L+G.tokens,0);if(P===0)return null;const ee={};for(const[L,G]of Object.entries(Hn))for(const k of G)ee[k]=L;const ne=new Map;for(const L of T.composition){const G=ee[L.category]??L.category;ne.set(G,(ne.get(G)||0)+L.tokens)}return[...ne.entries()].sort((L,G)=>G[1]-L[1]).map(([L,G])=>{var k;return{key:L,color:((k=mt[L])==null?void 0:k.color)??"#475569",pct:G/P*100}})}),S=A(()=>{const T=n.value;return!T||c.value.length===0?null:oc(T,c.value)}),_=A(()=>{var T;return((T=n.value)==null?void 0:T.contextInfo.messages)||[]}),C=A(()=>nc(_.value)),z=A(()=>C.value.reduce((T,P)=>T+P.tokens,0)),K=A(()=>{var T;return((T=n.value)==null?void 0:T.contextInfo.totalTokens)??0}),V=A(()=>{const T=n.value;return T?tv({utilization:i.value,healthScore:T.healthScore,composition:T.composition,topDelta:w.value[0]??null}):null});function Q(T){t.setInspectorTab(T)}function D(){t.setInspectorTab("messages")}function ae(T,P=!0){D(),t.focusMessageCategory(T,P)}function ue(){D()}function O(T){D(),t.focusMessageTool("tool_results",T)}function R(T){T.messageIndex!=null&&(D(),t.focusMessageByIndex(T.messageIndex))}function de(T){if(!(/growth/i.test(T.id)||/growth/i.test(T.name)))return T.description;const ee=T.description||"";if(!/first turn/i.test(ee)||d.value<=1)return ee;const ne=n.value,$=v.value;if(!ne||!$||!ne.contextLimit)return ee;const L=ne.contextInfo.totalTokens-$.contextInfo.totalTokens,G=Math.abs(L),k=G/ne.contextLimit*100;return`Compared with previous main turn, context ${L>=0?"grew":"shrunk"} by ${_e(G)} (${k.toFixed(1)}% of limit).`}function F(T){return cp(T)}function te(T){return up(T)}function ce(T){return K.value>0?Math.round(T/K.value*100):0}function B(T){return K.value>0?`${T/K.value*100}%`:"0%"}const se=A(()=>{const T=s.value;if(!T||T.entries.length===0)return[];const P=T.workingDirectory;return lc(T.entries,P)}),oe=A(()=>se.value.reduce((T,P)=>T+P.tokens,0));function W(T){return oe.value>0?Math.round(T/oe.value*100):0}function re(T){return oe.value>0?`${T/oe.value*100}%`:"0%"}function we(T){D(),t.focusMessageFile(T)}function H(T){we(T)}return(T,P)=>{var ne;const ee=gn("tooltip");return n.value?(g(),b("div",Xm,[V.value?(g(),b("section",{key:0,class:he(["health-narrative",V.value.toneClass])},[u("div",Zm,[u("div",Qm,M(V.value.headline),1),u("div",eg,M(V.value.detail),1)]),u("div",tg,[u("button",{class:"narrative-action",onClick:P[0]||(P[0]=$=>Q("messages"))},[...P[4]||(P[4]=[u("i",{class:"i-carbon-chat"},null,-1),xe(" Review Messages ",-1)])]),u("button",{class:"narrative-action",onClick:P[1]||(P[1]=$=>Q("timeline"))},[...P[5]||(P[5]=[u("i",{class:"i-carbon-activity"},null,-1),xe(" View Timeline ",-1)])])])],2)):le("",!0),u("div",ng,[u("div",{class:"stat-card stat-card--spine",style:Me({"--spine-color":r.value})},[u("div",{class:"stat-readout",style:Me({color:r.value})},M(Y(ui)(i.value)),5),P[7]||(P[7]=u("div",{class:"stat-label"},"Context",-1)),u("div",sg,M(Y(_e)(n.value.contextInfo.totalTokens))+" / "+M(Y(_e)(n.value.contextLimit)),1),p.value.turnsRemaining!==null&&p.value.turnsRemaining>0?Be((g(),b("div",og,[xe(" ~"+M(p.value.turnsRemaining)+" turns left ",1)])),[[ee,`Growing ~${Y(_e)(Math.round(p.value.growthPerTurn))}/turn over ${p.value.sinceCompaction} turns`]]):p.value.turnsRemaining===0?Be((g(),b("div",ig,[...P[6]||(P[6]=[xe(" At limit ",-1)])])),[[ee,"Context window is at or near the limit"]]):le("",!0),I.value?(g(),b("div",rg,[(g(!0),b(ve,null,Te(I.value,$=>(g(),b("div",{key:$.key,class:"stat-tape-seg",style:Me({flex:$.pct,background:$.color})},null,4))),128))])):(g(),b("div",lg,[u("div",{class:"util-fill",style:Me({width:Math.min(i.value*100,100)+"%",background:r.value})},null,4)]))],4),u("div",ag,[u("div",cg,M(Y(_t)(n.value.costUsd)),1),P[8]||(P[8]=u("div",{class:"stat-label"},"Turn cost",-1)),u("div",ug,M(Y(_t)(((ne=s.value)==null?void 0:ne.entries.reduce(($,L)=>$+(L.costUsd??0),0))??0))+" session",1)]),u("div",dg,[u("div",fg,M(n.value.usage?Y(_e)(n.value.usage.outputTokens):"—"),1),P[9]||(P[9]=u("div",{class:"stat-label"},"Output",-1)),n.value.timings?(g(),b("div",pg,M(Y(ci)(n.value.timings.total_ms)),1)):le("",!0)]),n.value.healthScore?(g(),b("div",hg,[u("div",vg,[(g(),b("svg",mg,[P[10]||(P[10]=u("circle",{cx:"24",cy:"24",r:"19",fill:"none",stroke:"var(--border-dim)","stroke-width":"3","stroke-dasharray":`${89.5} 30`,"stroke-linecap":"round",transform:"rotate(135 24 24)"},null,-1)),u("circle",{cx:"24",cy:"24",r:"19",fill:"none",stroke:Y(di)(n.value.healthScore.rating),"stroke-width":"3","stroke-dasharray":`${89.5*(n.value.healthScore.overall/100)} ${119.4-89.5*(n.value.healthScore.overall/100)}`,"stroke-linecap":"round",transform:"rotate(135 24 24)",style:{transition:"stroke-dasharray 0.6s ease"}},null,8,gg),u("text",{x:"24",y:"25","text-anchor":"middle","dominant-baseline":"central",fill:Y(di)(n.value.healthScore.rating),"font-family":"var(--font-display)","font-size":"13","font-weight":"700"},M(n.value.healthScore.overall),9,yg)]))]),P[11]||(P[11]=u("div",{class:"stat-label"},"Health",-1))])):(g(),b("div",_g,[...P[12]||(P[12]=[u("div",{class:"stat-readout dim"},"—",-1),u("div",{class:"stat-label"},"Health",-1)])]))]),u("div",bg,[u("span",null,M(n.value.contextInfo.messages.length)+" messages",1),l.value!==null?(g(),b("span",wg," cache "+M(Y(ui)(l.value))+" hit ("+M(Y(_e)(n.value.usage.cacheReadTokens))+"r / "+M(Y(_e)(n.value.usage.cacheWriteTokens))+"w) ",1)):le("",!0),n.value.stopReason?(g(),b("span",kg,"stop: "+M(n.value.stopReason),1)):le("",!0),n.value.responseModel&&n.value.responseModel!==n.value.contextInfo.model?(g(),b("span",xg," model: "+M(n.value.responseModel),1)):le("",!0)]),Re(um,{entry:n.value,"turn-num":d.value,onCategoryClick:P[2]||(P[2]=$=>ae($,!1)),onToolClick:O,onFileClick:H},null,8,["entry","turn-num"]),Re(Ym,{entry:n.value,recommendations:m.value,"audit-tooltip":de,onRecommendationClick:R},null,8,["entry","recommendations"]),Re(ac,{"diff-data":S.value,"current-entry":n.value,"previous-entry":v.value,"show-tapes":!0,"hide-unchanged":!0,"summary-mode":"combined","delta-tone":"bad",onCategoryClick:P[3]||(P[3]=$=>ae($,!1))},null,8,["diff-data","current-entry","previous-entry"]),C.value.length?(g(),b("section",$g,[u("div",Sg,[P[13]||(P[13]=u("span",{class:"panel-title"},"Messages",-1)),u("span",Cg,M(_.value.length)+" messages · "+M(Y(_e)(z.value)),1)]),u("div",Tg,[(g(!0),b(ve,null,Te(C.value,$=>(g(),b("div",{key:$.category,class:"msg-group-row",onClick:L=>ae($.category,!1)},[u("span",{class:"msg-group-dot",style:Me({background:te($.category)})},null,4),u("span",Eg,M(F($.category)),1),u("span",Pg,M($.items.length),1),u("span",Ig,M(Y(_e)($.tokens)),1),u("span",Ag,M(ce($.tokens))+"%",1),u("div",Lg,[u("div",{class:"msg-group-bar-fill",style:Me({width:B($.tokens),background:te($.category)})},null,4)])],8,Mg))),128)),u("button",{class:"msg-view-all",onClick:ue},"View all messages ›")])])):le("",!0),se.value.length>0?(g(),b("section",Og,[u("div",Rg,[P[14]||(P[14]=u("span",{class:"panel-title"},"Files",-1)),u("span",Dg,M(se.value.length)+" files · "+M(Y(_e)(oe.value)),1)]),u("div",Ng,[u("div",Fg,[(g(!0),b(ve,null,Te(se.value,($,L)=>(g(),b("div",{key:$.path,class:"file-row",onClick:G=>we($.path)},[u("span",{class:"file-dot",style:Me({background:Y(hi)(L)})},null,4),Be((g(),b("span",Bg,[u("span",Hg,M(Y(Zr)($.path)?Y(Zr)($.path)+"/":""),1),xe(M(Y(Bi)($.path)),1)])),[[ee,$.path]]),u("span",jg,[$.reads>0?Be((g(),b("span",Vg,[xe(M($.reads)+"r",1)])),[[ee,`${$.reads} read${$.reads>1?"s":""}`]]):le("",!0),$.writes>0?Be((g(),b("span",Ug,[xe(M($.writes)+"w",1)])),[[ee,`${$.writes} write/edit${$.writes>1?"s":""}`]]):le("",!0)]),u("span",Kg,M(Y(_e)($.tokens)),1),u("span",Wg,M(W($.tokens))+"%",1),u("div",qg,[u("div",{class:"file-bar-fill",style:Me({width:re($.tokens),background:Y(hi)(L)})},null,4)])],8,zg))),128))])])])):le("",!0)])):le("",!0)}}}),Jg=at(Gg,[["__scopeId","data-v-ab5256cd"]]),Yg={__name:"splitpanes",props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],setup(e,{emit:t}){const n=t,s=e,o=Tu(),i=me([]),r=A(()=>i.value.reduce(($,L)=>($[~~L.id]=L)&&$,{})),l=A(()=>i.value.length),c=me(null),p=me(!1),d=me({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),m=me({splitter:null,timeoutId:null}),v=A(()=>({[`splitpanes splitpanes--${s.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":d.value.dragging})),w=()=>{document.addEventListener("mousemove",_,{passive:!1}),document.addEventListener("mouseup",C),"ontouchstart"in window&&(document.addEventListener("touchmove",_,{passive:!1}),document.addEventListener("touchend",C))},I=()=>{document.removeEventListener("mousemove",_,{passive:!1}),document.removeEventListener("mouseup",C),"ontouchstart"in window&&(document.removeEventListener("touchmove",_,{passive:!1}),document.removeEventListener("touchend",C))},S=($,L)=>{const G=$.target.closest(".splitpanes__splitter");if(G){const{left:k,top:y}=G.getBoundingClientRect(),{clientX:h,clientY:a}="ontouchstart"in window&&$.touches?$.touches[0]:$;d.value.cursorOffset=s.horizontal?a-y:h-k}w(),d.value.mouseDown=!0,d.value.activeSplitter=L},_=$=>{d.value.mouseDown&&($.preventDefault(),d.value.dragging=!0,requestAnimationFrame(()=>{ae(Q($)),n("resize",i.value.map(L=>({min:L.min,max:L.max,size:L.size})))}))},C=()=>{d.value.dragging&&n("resized",i.value.map($=>({min:$.min,max:$.max,size:$.size}))),d.value.mouseDown=!1,setTimeout(()=>{d.value.dragging=!1,I()},100)},z=($,L)=>{"ontouchstart"in window&&($.preventDefault(),s.dblClickSplitter&&(m.value.splitter===L?(clearTimeout(m.value.timeoutId),m.value.timeoutId=null,K($,L),m.value.splitter=null):(m.value.splitter=L,m.value.timeoutId=setTimeout(()=>m.value.splitter=null,500)))),d.value.dragging||n("splitter-click",i.value[L])},K=($,L)=>{let G=0;i.value=i.value.map((k,y)=>(k.size=y===L?k.max:k.min,y!==L&&(G+=k.min),k)),i.value[L].size-=G,n("pane-maximize",i.value[L]),n("resized",i.value.map(k=>({min:k.min,max:k.max,size:k.size})))},V=($,L)=>{n("pane-click",r.value[L])},Q=$=>{const L=c.value.getBoundingClientRect(),{clientX:G,clientY:k}="ontouchstart"in window&&$.touches?$.touches[0]:$;return{x:G-(s.horizontal?0:d.value.cursorOffset)-L.left,y:k-(s.horizontal?d.value.cursorOffset:0)-L.top}},D=$=>{$=$[s.horizontal?"y":"x"];const L=c.value[s.horizontal?"clientHeight":"clientWidth"];return s.rtl&&!s.horizontal&&($=L-$),$*100/L},ae=$=>{const L=d.value.activeSplitter;let G={prevPanesSize:O(L),nextPanesSize:R(L),prevReachedMinPanes:0,nextReachedMinPanes:0};const k=0+(s.pushOtherPanes?0:G.prevPanesSize),y=100-(s.pushOtherPanes?0:G.nextPanesSize),h=Math.max(Math.min(D($),y),k);let a=[L,L+1],f=i.value[a[0]]||null,E=i.value[a[1]]||null;const q=f.max<100&&h>=f.max+G.prevPanesSize,N=E.max<100&&h<=100-(E.max+R(L+1));if(q||N){q?(f.size=f.max,E.size=Math.max(100-f.max-G.prevPanesSize-G.nextPanesSize,0)):(f.size=Math.max(100-E.max-G.prevPanesSize-R(L+1),0),E.size=E.max);return}if(s.pushOtherPanes){const J=ue(G,h);if(!J)return;({sums:G,panesToResize:a}=J),f=i.value[a[0]]||null,E=i.value[a[1]]||null}f!==null&&(f.size=Math.min(Math.max(h-G.prevPanesSize-G.prevReachedMinPanes,f.min),f.max)),E!==null&&(E.size=Math.min(Math.max(100-h-G.nextPanesSize-G.nextReachedMinPanes,E.min),E.max))},ue=($,L)=>{const G=d.value.activeSplitter,k=[G,G+1];return L<$.prevPanesSize+i.value[k[0]].min&&(k[0]=de(G).index,$.prevReachedMinPanes=0,k[0]<G&&i.value.forEach((y,h)=>{h>k[0]&&h<=G&&(y.size=y.min,$.prevReachedMinPanes+=y.min)}),$.prevPanesSize=O(k[0]),k[0]===void 0)?($.prevReachedMinPanes=0,i.value[0].size=i.value[0].min,i.value.forEach((y,h)=>{h>0&&h<=G&&(y.size=y.min,$.prevReachedMinPanes+=y.min)}),i.value[k[1]].size=100-$.prevReachedMinPanes-i.value[0].min-$.prevPanesSize-$.nextPanesSize,null):L>100-$.nextPanesSize-i.value[k[1]].min&&(k[1]=F(G).index,$.nextReachedMinPanes=0,k[1]>G+1&&i.value.forEach((y,h)=>{h>G&&h<k[1]&&(y.size=y.min,$.nextReachedMinPanes+=y.min)}),$.nextPanesSize=R(k[1]-1),k[1]===void 0)?($.nextReachedMinPanes=0,i.value.forEach((y,h)=>{h<l.value-1&&h>=G+1&&(y.size=y.min,$.nextReachedMinPanes+=y.min)}),i.value[k[0]].size=100-$.prevPanesSize-R(k[0]-1),null):{sums:$,panesToResize:k}},O=$=>i.value.reduce((L,G,k)=>L+(k<$?G.size:0),0),R=$=>i.value.reduce((L,G,k)=>L+(k>$+1?G.size:0),0),de=$=>[...i.value].reverse().find(L=>L.index<$&&L.size>L.min)||{},F=$=>i.value.find(L=>L.index>$+1&&L.size>L.min)||{},te=()=>{var $;Array.from((($=c.value)==null?void 0:$.children)||[]).forEach(L=>{const G=L.classList.contains("splitpanes__pane"),k=L.classList.contains("splitpanes__splitter");!G&&!k&&(L.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},ce=($,L,G=!1)=>{const k=$-1,y=document.createElement("div");y.classList.add("splitpanes__splitter"),G||(y.onmousedown=h=>S(h,k),typeof window<"u"&&"ontouchstart"in window&&(y.ontouchstart=h=>S(h,k)),y.onclick=h=>z(h,k+1)),s.dblClickSplitter&&(y.ondblclick=h=>K(h,k+1)),L.parentNode.insertBefore(y,L)},B=$=>{$.onmousedown=void 0,$.onclick=void 0,$.ondblclick=void 0,$.remove()},se=()=>{var $;const L=Array.from((($=c.value)==null?void 0:$.children)||[]);L.forEach(k=>{k.className.includes("splitpanes__splitter")&&B(k)});let G=0;L.forEach(k=>{k.className.includes("splitpanes__pane")&&(!G&&s.firstSplitter?ce(G,k,!0):G&&ce(G,k),G++)})},oe=({uid:$,...L})=>{const G=r.value[$];Object.entries(L).forEach(([k,y])=>G[k]=y)},W=$=>{var L;let G=-1;Array.from(((L=c.value)==null?void 0:L.children)||[]).some(k=>(k.className.includes("splitpanes__pane")&&G++,k.isSameNode($.el))),i.value.splice(G,0,{...$,index:G}),i.value.forEach((k,y)=>k.index=y),p.value&&Ue(()=>{se(),we({addedPane:i.value[G]}),n("pane-add",{index:G,panes:i.value.map(k=>({min:k.min,max:k.max,size:k.size}))})})},re=$=>{const L=i.value.findIndex(k=>k.id===$),G=i.value.splice(L,1)[0];i.value.forEach((k,y)=>k.index=y),Ue(()=>{se(),we({removedPane:{...G}}),n("pane-remove",{removed:G,panes:i.value.map(k=>({min:k.min,max:k.max,size:k.size}))})})},we=($={})=>{!$.addedPane&&!$.removedPane?T():i.value.some(L=>L.givenSize!==null||L.min||L.max<100)?P($):H(),p.value&&n("resized",i.value.map(L=>({min:L.min,max:L.max,size:L.size})))},H=()=>{const $=100/l.value;let L=0;const G=[],k=[];i.value.forEach(y=>{y.size=Math.max(Math.min($,y.max),y.min),L-=y.size,y.size>=y.max&&G.push(y.id),y.size<=y.min&&k.push(y.id)}),L>.1&&ee(L,G,k)},T=()=>{let $=100;const L=[],G=[];let k=0;i.value.forEach(h=>{$-=h.size,h.givenSize!==null&&k++,h.size>=h.max&&L.push(h.id),h.size<=h.min&&G.push(h.id)});let y=100;$>.1&&(i.value.forEach(h=>{h.givenSize===null&&(h.size=Math.max(Math.min($/(l.value-k),h.max),h.min)),y-=h.size}),y>.1&&ee(y,L,G))},P=({addedPane:$,removedPane:L}={})=>{let G=100/l.value,k=0;const y=[],h=[];(($==null?void 0:$.givenSize)??null)!==null&&(G=(100-$.givenSize)/(l.value-1).value),i.value.forEach(a=>{k-=a.size,a.size>=a.max&&y.push(a.id),a.size<=a.min&&h.push(a.id)}),!(Math.abs(k)<.1)&&(i.value.forEach(a=>{($==null?void 0:$.givenSize)!==null&&($==null?void 0:$.id)===a.id||(a.size=Math.max(Math.min(G,a.max),a.min)),k-=a.size,a.size>=a.max&&y.push(a.id),a.size<=a.min&&h.push(a.id)}),k>.1&&ee(k,y,h))},ee=($,L,G)=>{let k;$>0?k=$/(l.value-L.length):k=$/(l.value-G.length),i.value.forEach((y,h)=>{if($>0&&!L.includes(y.id)){const a=Math.max(Math.min(y.size+k,y.max),y.min),f=a-y.size;$-=f,y.size=a}else if(!G.includes(y.id)){const a=Math.max(Math.min(y.size+k,y.max),y.min),f=a-y.size;$-=f,y.size=a}}),Math.abs($)>.1&&Ue(()=>{p.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})};Ke(()=>s.firstSplitter,()=>se()),Ke(()=>s.dblClickSplitter,$=>{[...c.value.querySelectorAll(".splitpanes__splitter")].forEach((L,G)=>{L.ondblclick=$?k=>K(k,G):void 0})}),fo(()=>p.value=!1),Mn(()=>{te(),se(),we(),n("ready"),p.value=!0});const ne=()=>{var $;return Oi("div",{ref:c,class:v.value},($=o.default)==null?void 0:$.call(o))};return sn("panes",i),sn("indexedPanes",r),sn("horizontal",A(()=>s.horizontal)),sn("requestUpdate",oe),sn("onPaneAdd",W),sn("onPaneRemove",re),sn("onPaneClick",V),($,L)=>(g(),dt(Yl(ne)))}},nl={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(e){var t;const n=e,s=xt("requestUpdate"),o=xt("onPaneAdd"),i=xt("horizontal"),r=xt("onPaneRemove"),l=xt("onPaneClick"),c=(t=Ms())==null?void 0:t.uid,p=xt("indexedPanes"),d=A(()=>p.value[c]),m=me(null),v=A(()=>{const _=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(_,I.value),w.value)}),w=A(()=>{const _=parseFloat(n.minSize);return isNaN(_)?0:_}),I=A(()=>{const _=parseFloat(n.maxSize);return isNaN(_)?100:_}),S=A(()=>{var _;return`${i.value?"height":"width"}: ${(_=d.value)==null?void 0:_.size}%`});return Mn(()=>{o({id:c,el:m.value,min:w.value,max:I.value,givenSize:n.size===void 0?null:v.value,size:v.value})}),Ke(()=>v.value,_=>s({uid:c,size:_})),Ke(()=>w.value,_=>s({uid:c,min:_})),Ke(()=>I.value,_=>s({uid:c,max:_})),fo(()=>r(c)),(_,C)=>(g(),b("div",{ref_key:"paneEl",ref:m,class:"splitpanes__pane",onClick:C[0]||(C[0]=z=>Y(l)(z,_._.uid)),style:Me(S.value)},[hs(_.$slots,"default")],4))}};function Xg(){const e=Cs(new Set);function t(r){e.has(r)?e.delete(r):e.add(r)}function n(r){return e.has(r)}function s(r){e.add(r)}function o(r){e.delete(r)}function i(){e.clear()}return{expanded:e,toggle:t,isExpanded:n,expand:s,collapse:o,collapseAll:i}}const Zg="modulepreload",Qg=function(e){return"/"+e},sl={},ey=function(t,n,s){let o=Promise.resolve();if(n&&n.length>0){let r=function(p){return Promise.all(p.map(d=>Promise.resolve(d).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));o=r(n.map(p=>{if(p=Qg(p),p in sl)return;sl[p]=!0;const d=p.endsWith(".css"),m=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${m}`))return;const v=document.createElement("link");if(v.rel=d?"stylesheet":Zg,d||(v.as="script"),v.crossOrigin="",v.href=p,c&&v.setAttribute("nonce",c),document.head.appendChild(v),d)return new Promise((w,I)=>{v.addEventListener("load",w),v.addEventListener("error",()=>I(new Error(`Unable to preload CSS for ${p}`)))})}))}function i(r){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=r,window.dispatchEvent(l),!l.defaultPrevented)throw r}return o.then(r=>{for(const l of r||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},ty={class:"detail-header"},ny={class:"header-top"},sy={class:"nav-btns"},oy=["disabled"],iy=["disabled"],ry={key:0,class:"header-meta"},ly={class:"detail-tabs"},ay={key:0,class:"block-sep"},cy=["innerHTML"],uy={class:"raw-header"},dy=["innerHTML"],fy={class:"detail-footer"},py={class:"meta-key"},hy=["title"],ol=5e4,il=500,vy=2e4,my=450,gy=Qe({__name:"DetailPane",props:{entry:{},messages:{},selectedIndex:{}},emits:["close","navigate"],setup(e,{emit:t}){const n=e,s=t,o=me("rendered"),i=me(!1),r=me(null);let l=null,c=null;const p=new Map,d=new Set,m=me(0),v=A(()=>{var k;return((k=n.messages[n.selectedIndex])==null?void 0:k.msg)??null}),w=A(()=>ko(n.entry.contextInfo.messages||[])),I=A(()=>{const k=v.value;if(!k)return"";const y=St(k);let a=(Ye[y]||{label:y}).label;if(k.contentBlocks)for(const f of k.contentBlocks){if(f.type==="tool_use"){a=`Tool Call — ${f.name||"unknown"}`;break}if(f.type==="tool_result"){const q=f.tool_use_id?w.value[f.tool_use_id]:null;a=`Tool Result${q?" — "+q:""}`;break}if(f.type==="thinking"){a="Thinking";break}}return a}),S=A(()=>{if(!v.value)return"";const k=St(v.value);return(Ye[k]||{color:"#4b5563"}).color}),_=A(()=>!v.value||!n.entry.contextInfo.totalTokens?"0":((v.value.tokens||0)/n.entry.contextInfo.totalTokens*100).toFixed(1)),C=A(()=>n.selectedIndex>0),z=A(()=>n.selectedIndex<n.messages.length-1);Ke(()=>n.selectedIndex,()=>{o.value="rendered",i.value=!1,Ue(()=>{r.value&&(r.value.scrollTop=0)}),Ue(()=>{$()})}),Ke([o,i],()=>{Ue(()=>{$()})}),Ke(v,()=>{Ue(()=>{$()})},{immediate:!0});function K(k){const y=n.selectedIndex+k;y>=0&&y<n.messages.length&&s("navigate",y)}function V(k){k.key==="Escape"&&(s("close"),k.preventDefault()),(k.key==="ArrowUp"||k.key==="k")&&(K(-1),k.preventDefault()),(k.key==="ArrowDown"||k.key==="j")&&(K(1),k.preventDefault())}const Q=me("Copy");async function D(){if(!v.value)return;const k=o.value==="raw"?JSON.stringify(Ho(v.value),null,2):dp(v.value);await navigator.clipboard.writeText(k),Q.value="Copied!",setTimeout(()=>{Q.value="Copy"},1500)}function ae(k){if(i.value)return{text:k,truncated:!1};if(k.length>ol)return{text:k.slice(0,ol),truncated:!0};const y=k.split(`
28
- `);return y.length>il?{text:y.slice(0,il).join(`
29
- `),truncated:!0}:{text:k,truncated:!1}}function ue(k){let y=2166136261;for(let h=0;h<k.length;h++)y^=k.charCodeAt(h),y=Math.imul(y,16777619);return(y>>>0).toString(36)}function O(k){return k.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function R(k,y,h){let a="",f=0;y.lastIndex=0;let E=y.exec(k);for(;E;){const q=E.index,N=E[0];a+=O(k.slice(f,q)),a+=h(N,q),f=q+N.length,E=y.exec(k)}return a+=O(k.slice(f)),a}function de(k){return R(k,/"(?:\\.|[^"\\])*"(?=\s*:)?|"(?:\\.|[^"\\])*"|\btrue\b|\bfalse\b|\bnull\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,(h,a)=>{if(h.startsWith('"')){const f=k.slice(a+h.length);return`<span class="${/^\s*:/.test(f)?"syn-key":"syn-str"}">${O(h)}</span>`}return h==="true"||h==="false"?`<span class="syn-bool">${h}</span>`:h==="null"?`<span class="syn-null">${h}</span>`:`<span class="syn-num">${h}</span>`})}function F(k){return R(k,/<!--[\s\S]*?-->|<\/?[\w:.-]+(?:\s+[\w:.-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'))?)*\s*\/?>/g,h=>{if(h.startsWith("<!--"))return`<span class="syn-com">${O(h)}</span>`;const a=/^<(\/?)([\w:.-]+)([\s\S]*?)(\/?)>$/.exec(h);if(!a)return`<span class="syn-tag">${O(h)}</span>`;const f=a[1]?"/":"",E=a[2],q=a[3]||"",N=a[4]?"/":"";let J="";const pe=/([\w:.-]+)(\s*=\s*)(".*?"|'.*?')/g;let fe=0,ie=pe.exec(q);for(;ie;)J+=O(q.slice(fe,ie.index)),J+=`<span class="syn-attr">${O(ie[1])}</span>`,J+=O(ie[2]),J+=`<span class="syn-str">${O(ie[3])}</span>`,fe=ie.index+ie[0].length,ie=pe.exec(q);return J+=O(q.slice(fe)),`<span class="syn-punc">&lt;${f}</span><span class="syn-tag">${O(E)}</span>${J}<span class="syn-punc">${N}&gt;</span>`})}function te(k){return R(k,/```[\s\S]*?```|`[^`\n]+`|^#{1,6}\s.+$|^\s*[-*+]\s.+$|^\s*\d+\.\s.+$|^>\s.+$|\*\*[^*\n]+\*\*|__[^_\n]+__|\*[^*\n]+\*|_[^_\n]+_|~~[^~\n]+~~|\[[^\]]+\]\([^)]+\)/gm,h=>h.startsWith("```")||h.startsWith("`")?`<span class="syn-code">${O(h)}</span>`:h.startsWith("#")?`<span class="syn-heading">${O(h)}</span>`:/^\s*[-*+]\s/.test(h)||/^\s*\d+\.\s/.test(h)?`<span class="syn-list">${O(h)}</span>`:h.startsWith(">")?`<span class="syn-quote">${O(h)}</span>`:h.startsWith("[")?`<span class="syn-link">${O(h)}</span>`:`<span class="syn-em">${O(h)}</span>`)}function ce(k){return R(k,/\/\/.*$|\/\*[\s\S]*?\*\/|"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`(?:\\.|[^`\\])*`|\b(?:const|let|var|function|return|if|else|for|while|switch|case|break|continue|try|catch|finally|class|extends|new|import|from|export|async|await|interface|type|public|private|protected|throw|in|of|typeof|instanceof|true|false|null|undefined)\b|-?\d+(?:\.\d+)?/gm,h=>h.startsWith("//")||h.startsWith("/*")?`<span class="syn-com">${O(h)}</span>`:h.startsWith('"')||h.startsWith("'")||h.startsWith("`")?`<span class="syn-str">${O(h)}</span>`:/^-?\d/.test(h)?`<span class="syn-num">${h}</span>`:h==="true"||h==="false"?`<span class="syn-bool">${h}</span>`:h==="null"||h==="undefined"?`<span class="syn-null">${h}</span>`:`<span class="syn-keyword">${h}</span>`)}function B(k){const y=k.trim();if(!(y.startsWith("{")||y.startsWith("[")))return!1;try{return JSON.parse(y),!0}catch{return!1}}function se(k){const y=k.trim();return y.startsWith("<")?/<[\w:.-]+[\s>]/.test(y)&&/<\/[\w:.-]+>/.test(y):!1}function oe(k){return/(^#{1,6}\s)|(^\s*[-*+]\s)|(^\s*\d+\.\s)|(```)|(`[^`\n]+`)|(\[[^\]]+\]\([^)]+\))|(^>\s)|(\*\*[^*\n]+\*\*)/m.test(k)}function W(k){return/[{}();]|(^\s*(const|let|var|function|if|for|while|class|import|export)\s)/m.test(k)}function re(k,y=!1){return y||B(k)?"json":se(k)?"xml":oe(k)?"markdown":W(k)?"code":"text"}function we(k,y=!1){const h=re(k,y);return h==="json"?de(k):h==="xml"?F(k):h==="markdown"?te(k):h==="code"?ce(k):O(k)}function H(k){return k==="json"?"json":k==="xml"?"xml":k==="markdown"?"markdown":k==="code"?"typescript":null}function T(k,y){return!(y==="text"||k.length>vy||k.split(`
30
- `).length>my)}async function P(){if(!l){if(c)return c;c=(async()=>{l=await(await ey(()=>import("./index-BxdAuPdU.js"),[])).createHighlighter({themes:["github-dark"],langs:["json","xml","markdown","typescript"]})})(),await c}}async function ee(k,y,h){if(!T(k,y)||p.has(h)||d.has(h))return;const a=H(y);if(a){d.add(h);try{if(await P(),!l)return;const f=l.codeToHtml(k,{lang:a,theme:"github-dark"});p.set(h,f),m.value+=1}catch{}finally{d.delete(h)}}}function ne(k,y=!1){m.value;const h=re(k,y),a=`${h}:${ue(k)}`;if(T(k,h)){const f=p.get(a);if(f)return f;ee(k,h,a)}return we(k,y)}function $(){const k=v.value;if(!k)return;if(o.value==="raw"){const h=JSON.stringify(Ho(k),null,2),a=ae(h).text,f=re(a,!0);ee(a,f,`${f}:${ue(a)}`);return}const y=L();for(const h of y){const a=ae(h.content).text,f=re(a,h.isJson);ee(a,f,`${f}:${ue(a)}`)}}function L(){const k=v.value;if(!k)return[];const y=k.contentBlocks;return y&&y.length>0?y.map(h=>{if(h.type==="tool_use"){const f=h.input?JSON.stringify(h.input,null,2):"{}";return{type:"tool_use",label:`tool_use: ${h.name||"?"}`,labelClass:"lbl-tool-use",content:f,isJson:!0}}if(h.type==="tool_result"){const f=h.tool_use_id?w.value[h.tool_use_id]:null,E=typeof h.content=="string"?h.content:JSON.stringify(h.content,null,2);return{type:"tool_result",label:`tool_result${f?": "+f:""}`,labelClass:"lbl-tool-result",content:E,isJson:!1}}const a=h;return a.type==="thinking"?{type:"thinking",label:"thinking",labelClass:"lbl-thinking",content:a.thinking||a.text||"",isJson:!1}:h.type==="text"||h.type==="input_text"?{type:h.type,label:h.type,labelClass:"lbl-text",content:h.text||"",isJson:!1}:h.type==="image"?{type:"image",label:"image",labelClass:"lbl-image",content:"[Image content]",isJson:!1}:{type:"unknown",label:"block",labelClass:"lbl-text",content:`[Unknown block type: ${h.type||"unspecified"}]`,isJson:!1}}):[{type:"text",label:"",labelClass:"",content:k.content||"",isJson:!1}]}const G=A(()=>{const k=v.value;if(!k)return[];const y=[["Role",k.role],["Tokens",_e(k.tokens||0)],["% context",_.value+"%"],["Model",n.entry.contextInfo.model||"?"]];if(k.contentBlocks){for(const h of k.contentBlocks)if(h.type==="tool_use"&&(y.push(["tool_use_id",h.id||"?"]),y.push(["tool_name",h.name||"?"])),h.type==="tool_result"&&h.tool_use_id){y.push(["tool_use_id",h.tool_use_id]);const a=w.value[h.tool_use_id];a&&y.push(["tool_name",a])}}return y.push(["Position",`${n.selectedIndex+1} / ${n.messages.length}`]),y});return(k,y)=>{const h=gn("tooltip");return g(),b("div",{class:"detail",tabindex:"0",onKeydown:V},[u("div",ty,[u("div",ny,[u("span",{class:"detail-title",style:Me({color:S.value})},M(I.value),5),u("div",sy,[Be((g(),b("button",{disabled:!C.value,onClick:y[0]||(y[0]=a=>K(-1))},[...y[6]||(y[6]=[u("i",{class:"i-carbon-chevron-up"},null,-1)])],8,oy)),[[h,"↑ Previous"]]),Be((g(),b("button",{disabled:!z.value,onClick:y[1]||(y[1]=a=>K(1))},[...y[7]||(y[7]=[u("i",{class:"i-carbon-chevron-down"},null,-1)])],8,iy)),[[h,"↓ Next"]])]),Be((g(),b("button",{class:"close-btn",onClick:y[2]||(y[2]=a=>k.$emit("close"))},[...y[8]||(y[8]=[u("i",{class:"i-carbon-close"},null,-1)])])),[[h,"Close (Esc)"]])]),v.value?(g(),b("div",ry,[u("span",null,[u("b",null,M(v.value.role),1)]),u("span",null,M(Y(_e)(v.value.tokens||0))+" tok",1),u("span",null,M(_.value)+"%",1),u("span",null,M(e.selectedIndex+1)+"/"+M(e.messages.length),1)])):le("",!0)]),u("div",ly,[u("button",{class:he({on:o.value==="rendered"}),onClick:y[3]||(y[3]=a=>o.value="rendered")},"Rendered",2),u("button",{class:he({on:o.value==="raw"}),onClick:y[4]||(y[4]=a=>o.value="raw")},"Raw",2)]),u("div",{ref_key:"contentEl",ref:r,class:"detail-body"},[o.value==="rendered"&&v.value?(g(!0),b(ve,{key:0},Te(L(),(a,f)=>(g(),b(ve,{key:f},[f>0?(g(),b("hr",ay)):le("",!0),a.label?(g(),b("div",{key:1,class:he(["block-label",a.labelClass])},M(a.label),3)):le("",!0),u("div",{class:he(["block-content syntax rich-html",`kind-${re(ae(a.content).text,a.isJson)}`]),innerHTML:ne(ae(a.content).text,a.isJson)},null,10,cy),ae(a.content).truncated?(g(),b("button",{key:2,class:"show-more",onClick:y[5]||(y[5]=E=>i.value=!0)}," Show full content… ")):le("",!0)],64))),128)):o.value==="raw"&&v.value?(g(),b(ve,{key:1},[u("div",uy,[u("button",{class:he(["copy-btn",{copied:Q.value==="Copied!"}]),onClick:D},[y[9]||(y[9]=u("i",{class:"i-carbon-copy"},null,-1)),xe(" "+M(Q.value),1)],2)]),u("div",{class:"block-content syntax rich-html kind-json",innerHTML:ne(JSON.stringify(Y(Ho)(v.value),null,2),!0)},null,8,dy)],64)):le("",!0)],512),u("div",fy,[y[10]||(y[10]=u("div",{class:"meta-header"},"Metadata",-1)),(g(!0),b(ve,null,Te(G.value,([a,f])=>(g(),b(ve,{key:a},[u("span",py,M(a),1),u("span",{class:"meta-val",title:f},M(f),9,hy)],64))),128))])],32)}}}),yy=at(gy,[["__scopeId","data-v-b5106f07"]]),_y={class:"msg-toolbar"},by={class:"message-view-toggle"},wy={key:0,class:"message-view-toggle agent-toggle"},ky={key:0,class:"heavy-strip"},xy={class:"heavy-actions"},$y=["onClick"],Sy={class:"heavy-category"},Cy={class:"heavy-preview"},Ty={class:"heavy-tokens"},My={key:1,class:"focus-strip"},Ey={key:0},Py={key:1},Iy=["data-category"],Ay=["onClick"],Ly={class:"group-name"},Oy={class:"group-stats"},Ry={class:"group-bar-track"},Dy=["data-tool-name","onClick"],Ny={class:"msg-role"},Fy={class:"msg-preview"},zy={key:0,class:"focus-strip"},By={class:"focus-file-name"},Hy={class:"focus-file-count"},jy={class:"chrono-list"},Vy=["onClick"],Uy={class:"chrono-gutter subagent-gutter"},Ky={class:"chrono-preview subagent-preview"},Wy={class:"chrono-tok subagent-model"},qy={class:"chrono-turn-label"},Gy={key:2,class:"chrono-future-sep"},Jy=["onClick"],Yy={class:"chrono-gutter"},Xy={class:"chrono-type"},Zy={class:"chrono-preview"},Qy=Qe({__name:"MessagesTab",setup(e){const t=At(),n=A(()=>t.selectedEntry),s=A(()=>t.selectedSession),{isExpanded:o,toggle:i,expand:r}=Xg(),l=me(null),c=me("chrono"),p=me(!1),d=me(0),m=me(null),v=me(1),w=me(null),I=me([]),S=me(0),_=A(()=>ko(z.value)),C=A(()=>{const U=s.value;return!U||U.entries.length<=1?!1:Yt([...U.entries].reverse()).some(ye=>!ye.isMain)}),z=A(()=>{var j;if(!n.value)return[];t.entryDetailVersion;const U=t.getEntryDetail(n.value.id);return(j=U==null?void 0:U.messages)!=null&&j.length?U.messages:n.value.contextInfo.messages||[]}),K=A(()=>!s.value||s.value.entries.length===0?null:s.value.entries[0]),V=A(()=>{var j;if(!K.value)return[];t.entryDetailVersion;const U=t.getEntryDetail(K.value.id);return(j=U==null?void 0:U.messages)!=null&&j.length?U.messages:K.value.contextInfo.messages||[]}),Q=A(()=>z.value.length),D=A(()=>t.selectionMode!=="pinned"?!1:V.value.length>Q.value),ae=A(()=>{if(!D.value)return z.value.map((j,ye)=>({msg:j,origIdx:ye,future:!1}));const U=[];for(let j=0;j<z.value.length;j++)U.push({msg:z.value[j],origIdx:j,future:!1});for(let j=z.value.length;j<V.value.length;j++)U.push({msg:V.value[j],origIdx:j,future:!0});return U}),ue=A(()=>{const U=ae.value,j=new Set;U.length>0&&j.add(0);let ye=!1;for(let x=0;x<U.length;x++){const X=U[x].msg.role;X==="assistant"?ye=!0:X==="user"&&ye&&(j.add(x),ye=!1)}return j}),O=A(()=>{const U=s.value,j=n.value;if(!U||!j||t.messagesMode!=="all")return new Map;const ye=Yt([...U.entries].reverse()),x=[],X=[];let be=[];for(const De of ye)De.isMain?(x.push(De.entry),x.length>1&&X.push([...be]),be=[]):x.length>0&&be.push(De.entry);X.push([...be]);const Se=x.findIndex(De=>De.id===j.id);if(Se<0)return new Map;const tt=Array.from(ue.value).sort((De,Ge)=>De-Ge),Ht=F.value,Vn=new Map;for(let De=0;De<=Se&&De<X.length;De++){const Ge=X[De];if(Ge.length===0)continue;const Xe=De+1-Ht;Xe<0||Xe<tt.length&&Vn.set(tt[Xe],Ge)}return Vn}),R=A(()=>{const U=s.value,j=n.value;if(!U||!j)return 1;const ye=Yt([...U.entries].reverse());let x=0;for(const X of ye)if(X.isMain&&x++,X.entry.id===j.id)return x;return 1}),de=A(()=>{const U=Q.value;let j=0;for(const ye of ue.value)ye<U&&j++;return j}),F=A(()=>Math.max(0,R.value-de.value)),te=A(()=>{const U=new Map;let j=F.value;for(const ye of ue.value)j++,U.set(ye,j);return U}),ce=A(()=>nc(z.value)),B=A(()=>{if(c.value==="chrono")return we.value;const U=[];for(const j of ce.value)for(const ye of j.items)U.push(ye);return U}),se=A(()=>w.value!==null),oe=A(()=>se.value?w.value:n.value),W=A(()=>se.value?I.value:B.value),re=A(()=>se.value?S.value:d.value),we=A(()=>z.value.map((U,j)=>({msg:U,origIdx:j}))),H=A(()=>{const U=[];let j=0;for(const ye of ae.value)ye.future||(j+=ye.msg.tokens||0),U.push(j);return U}),T=A(()=>{var U;return((U=n.value)==null?void 0:U.contextInfo.totalTokens)??0}),P=A(()=>{const U=[];for(const j of ce.value)for(const ye of j.items)U.push({origIdx:ye.origIdx,category:j.category,preview:Bo(ye.msg,_.value)||"(empty)",tokens:ye.msg.tokens||0});return U.filter(j=>j.tokens>0).sort((j,ye)=>ye.tokens-j.tokens).slice(0,3)}),ee=A(()=>t.messageFocusTool),ne=A(()=>t.messageFocusCategory),$=A(()=>t.messageFocusFile),L=A(()=>{var x;const U=t.messageFocusCategory;if(!U)return null;const j=new Set(ce.value.map(X=>X.category));if(j.has(U))return U;const ye={assistant_text:["tool_calls","thinking","assistant_text","user_text"],tool_definitions:["tool_calls","tool_results","system_injections"],system_prompt:["system_injections","assistant_text","user_text"],images:["user_text","assistant_text","tool_results"],cache_markers:["tool_results","assistant_text","user_text"],other:["assistant_text","user_text","tool_results"]};for(const X of ye[U]||[])if(j.has(X))return X;return((x=ce.value[0])==null?void 0:x.category)??null}),G=A(()=>!!ne.value&&!!L.value&&ne.value!==L.value);function k(){w.value=null,I.value=[]}function y(U){k(),d.value=U,E(U),p.value=!0}function h(){p.value=!1,k()}function a(U){U.key==="Escape"&&p.value&&(h(),U.preventDefault(),U.stopPropagation())}function f(U){var X;const j=(U.contentBlocks||[])[0];if(!j)return`${U.role}|${U.tokens||0}|${((X=U.content)==null?void 0:X.slice(0,160))||""}`;if(j.type==="tool_result"){const be=typeof j.content=="string"?j.content:JSON.stringify(j.content||"");return`${U.role}|${U.tokens||0}|tool_result|${j.tool_use_id||""}|${be.slice(0,160)}`}if(j.type==="tool_use")return`${U.role}|${U.tokens||0}|tool_use|${j.id||""}|${j.name||""}|${JSON.stringify(j.input||{}).slice(0,120)}`;const ye=j,x=String(ye.text||ye.thinking||"").slice(0,160);return`${U.role}|${U.tokens||0}|${String(ye.type||"other")}|${x}`}function E(U){const j=B.value[U];if(!j)return;const ye=f(j.msg);m.value=ye;let x=0;for(let X=0;X<=U;X++)f(B.value[X].msg)===ye&&(x+=1);v.value=Math.max(1,x)}function q(){const U=m.value;if(!U)return-1;let j=0;for(let ye=0;ye<B.value.length;ye++)if(f(B.value[ye].msg)===U&&(j+=1,j===v.value))return ye;return-1}function N(U){se.value?S.value=U:(d.value=U,E(U))}function J(U,j){let ye=0;for(let x=0;x<ce.value.length;x++){if(x===U)return ye+j;ye+=ce.value[x].items.length}return 0}function pe(U){const j=B.value.findIndex(ye=>ye.origIdx===U);if(j>=0){if(c.value==="category"){const ye=z.value[U];if(ye){const x=St(ye);r(x)}}y(j)}}function fe(U){const j=St(U);return(Ye[j]||{color:"#4b5563"}).color}function ie(U){const j=St(U);return(Ye[j]||{label:j}).label}function Z(U){var x;if(!s.value)return;const j=s.value.entries;let ye=null;for(let X=j.length-1;X>=0;X--)if((((x=j[X].contextInfo.messages)==null?void 0:x.length)??0)>U){ye=j[X];break}ye||(ye=j[0]),t.pinEntry(ye.id)}async function ke(U){var be;const j=s.value;if(!j)return;const ye=j.entries.find(Se=>Se.id===U);if(!ye)return;await t.loadEntryDetail(U),t.entryDetailVersion;const x=t.getEntryDetail(U),X=(be=x==null?void 0:x.messages)!=null&&be.length?x.messages:ye.contextInfo.messages||[];w.value=ye,I.value=X.map((Se,tt)=>({msg:Se,origIdx:tt})),S.value=0,p.value=!0}function ge(U){if(St(U)!=="tool_results")return null;for(const j of U.contentBlocks||[])if(j.type==="tool_result")return j.tool_use_id&&_.value[j.tool_use_id]||null;return null}function $e(U){const j=ee.value;if(!j)return{};const ye=ge(U);if(!ye)return{"tool-muted":!0};const x=ye.trim().toLowerCase(),X=j.trim().toLowerCase();return{"tool-focused":x===X,"tool-muted":x!==X}}async function Ce(){const U=L.value,j=t.messageFocusIndex,ye=t.messageFocusOpenDetail,x=t.messageFocusTool,X=t.messageFocusFile;t.clearMessageFocus();const be=j;if(be!=null){if(c.value==="chrono"){for(let De=0;De<4;De++){await Ue(),pe(be),await Ue();const Ge=l.value;if(Ge){const He=Array.from(Ge.querySelectorAll(".chrono-row")).find(st=>st.classList.contains("selected"));if(He){He.scrollIntoView({block:"center",behavior:"smooth"});return}}}return}for(let De=0;De<4;De++){await Ue();for(const Ge of ce.value)if(Ge.items.find(He=>He.origIdx===be)){r(Ge.category),await Ue(),await Ue(),pe(be),await Ue();const He=l.value;if(He){const vt=Array.from(He.querySelectorAll(".msg-row")).find(xo=>xo.classList.contains("selected"));vt&&vt.scrollIntoView({block:"center",behavior:"smooth"})}return}}return}if(X){t.messageFocusFile=X,c.value="chrono",await Ue();const De=z.value,Ge=new Set;for(const He of De)if(He.contentBlocks){for(const st of He.contentBlocks)if(st.type==="tool_use"){const vt=st;Je(vt)===X&&Ge.add(vt.id)}}let Xe=-1;for(let He=0;He<De.length;He++){const st=De[He];if(st.contentBlocks){for(const vt of st.contentBlocks){if(vt.type==="tool_result"&&Ge.has(vt.tool_use_id)){Xe=He;break}if(vt.type==="tool_use"&&Je(vt)===X&&Xe<0){Xe=He;break}}if(Xe>=0)break}}if(Xe>=0)for(let He=0;He<4;He++){await Ue();const st=l.value;if(!st)continue;const vt=Array.from(st.querySelectorAll(".chrono-row"));if(vt[Xe]){vt[Xe].scrollIntoView({block:"center",behavior:"smooth"});return}}return}const Se=U;if(!Se)return;const tt=ye;if(tt?c.value="chrono":c.value="category",c.value==="chrono"){for(let De=0;De<4;De++){await Ue();const Ge=l.value;if(!Ge)continue;const Xe=Array.from(Ge.querySelectorAll(".chrono-row"));let He=-1;for(let st=z.value.length-1;st>=0;st--)if(St(z.value[st])===Se){He=st;break}if(He>=0&&Xe[He]){Xe[He].scrollIntoView({block:"center",behavior:"smooth"}),tt&&(await Ue(),pe(He));return}}return}let Ht=null;for(let De=0;De<4;De++){if(await Ue(),Ht=l.value,!Ht)continue;r(Se),await Ue();const Ge=Ht.querySelector(`[data-category="${Se}"]`);if(Ge){Ge.scrollIntoView({block:"center",behavior:"smooth"});break}}if(!Ht)return;const Vn=x;if(Vn){const De=Array.from(Ht.querySelectorAll(".msg-row")),Ge=Vn.trim().toLowerCase(),Xe=De.find(He=>(He.getAttribute("data-tool-name")||"").trim().toLowerCase()===Ge);Xe&&Xe.scrollIntoView({block:"center",behavior:"smooth"})}}function Ie(){t.focusMessageCategory(L.value||t.messageFocusCategory||"tool_results")}function Ne(){t.clearMessageFocus()}const Ae=A(()=>{const U=$.value;if(!U)return new Set;const j=z.value,ye=new Set,x=new Set;for(let X=0;X<j.length;X++){const be=j[X];if(be.contentBlocks){for(const Se of be.contentBlocks)if(Se.type==="tool_use"){const tt=Se;Je(tt)===U&&(x.add(tt.id),ye.add(X))}}}for(let X=0;X<j.length;X++){const be=j[X];if(be.contentBlocks)for(const Se of be.contentBlocks)Se.type==="tool_result"&&x.has(Se.tool_use_id)&&ye.add(X)}return ye});function Je(U){var x;const j=U.input,ye=(x=t.selectedSession)==null?void 0:x.workingDirectory;if(j&&typeof j=="object")for(const X of["file_path","path","filePath"]){const be=j[X];if(typeof be=="string"&&be.length>0){let Se=be.replace(/\/+/g,"/");return Se.startsWith("./")&&(Se=Se.slice(2)),Se.length>1&&Se.endsWith("/")&&(Se=Se.slice(0,-1)),rc(Se,ye)}}return null}function et(U){if(!$.value)return{};const ye=Ae.value;return{"file-focused":ye.has(U),"file-muted":!ye.has(U)}}const pt=A(()=>{const U=$.value;return U?Bi(U):""});return Ke(()=>t.messageFocusToken,async()=>{await Ce()},{immediate:!0}),Ke(()=>t.inspectorTab,async U=>{U==="messages"&&await Ce()}),Ke(()=>{var U;return(U=n.value)==null?void 0:U.id},async U=>{U!=null&&await t.loadEntryDetail(U)},{immediate:!0}),Ke(()=>{var U;return(U=K.value)==null?void 0:U.id},async U=>{var j;U!=null&&U!==((j=n.value)==null?void 0:j.id)&&await t.loadEntryDetail(U)},{immediate:!0}),Mn(async()=>{t.inspectorTab==="messages"&&t.messageFocusCategory&&await Ce()}),Ke(B,()=>{if(!p.value||se.value)return;const U=q();if(U>=0&&U!==d.value){d.value=U;return}d.value>=B.value.length&&(d.value=Math.max(0,B.value.length-1),E(d.value))}),(U,j)=>{const ye=gn("tooltip");return n.value?(g(),b("div",{key:0,class:"messages-tab",onKeydown:a},[Re(Y(Yg),{class:"default-theme","push-other-panes":!1},{default:ft(()=>[Re(Y(nl),{"min-size":25,size:p.value?42:100},{default:ft(()=>[u("div",{ref_key:"msgListEl",ref:l,class:"msg-list"},[u("div",_y,[u("div",by,[u("button",{class:he({on:c.value==="chrono"}),onClick:j[0]||(j[0]=x=>c.value="chrono")},"Chronological",2),u("button",{class:he({on:c.value==="category"}),onClick:j[1]||(j[1]=x=>c.value="category")},"By Category",2)]),C.value&&c.value==="chrono"?(g(),b("div",wy,[u("button",{class:he({on:Y(t).messagesMode==="main"}),onClick:j[2]||(j[2]=x=>Y(t).messagesMode="main")},"Main",2),u("button",{class:he({on:Y(t).messagesMode==="all"}),onClick:j[3]||(j[3]=x=>Y(t).messagesMode="all")},"All",2)])):le("",!0)]),c.value==="category"?(g(),b(ve,{key:0},[P.value.length>0?(g(),b("div",ky,[j[4]||(j[4]=u("div",{class:"heavy-title"},"Top heavy messages",-1)),u("div",xy,[(g(!0),b(ve,null,Te(P.value,x=>(g(),b("button",{key:x.origIdx,class:"heavy-action",onClick:X=>pe(x.origIdx)},[u("span",Sy,M((Y(Ye)[x.category]||{label:x.category}).label),1),u("span",Cy,M(x.preview),1),u("span",Ty,M(Y(_e)(x.tokens)),1)],8,$y))),128))])])):le("",!0),ee.value||G.value?(g(),b("div",My,[ee.value?(g(),b("span",Ey,[j[5]||(j[5]=xe(" Filtered tool: ",-1)),u("b",null,M(ee.value),1)])):le("",!0),G.value?(g(),b("span",Py,[j[6]||(j[6]=xe(" Showing ",-1)),u("b",null,M((Y(Ye)[L.value||""]||{label:L.value}).label),1),j[7]||(j[7]=xe(" for ",-1)),u("b",null,M((Y(Ye)[ne.value||""]||{label:ne.value}).label),1),j[8]||(j[8]=xe(". ",-1))])):le("",!0),ee.value?(g(),b("button",{key:2,class:"focus-clear",onClick:dn(Ie,["stop"])},"Show all")):le("",!0)])):le("",!0),(g(!0),b(ve,null,Te(ce.value,(x,X)=>(g(),b("div",{key:x.category,class:"msg-group","data-category":x.category},[u("div",{class:"group-head",onClick:be=>Y(i)(x.category)},[u("i",{class:he(["group-arrow",Y(o)(x.category)||L.value===x.category?"i-carbon-chevron-down":"i-carbon-chevron-right"])},null,2),u("span",{class:"group-dot",style:Me({background:(Y(Ye)[x.category]||{color:"#4b5563"}).color})},null,4),u("span",Ly,M((Y(Ye)[x.category]||{label:x.category}).label),1),u("span",Oy,[xe(M(x.items.length)+" ",1),j[9]||(j[9]=u("span",{class:"group-sep"},"·",-1)),xe(" "+M(Y(_e)(x.tokens))+" ",1),j[10]||(j[10]=u("span",{class:"group-sep"},"·",-1)),xe(" "+M(T.value>0?Math.round(x.tokens/T.value*100):0)+"% ",1)]),u("div",Ry,[u("div",{class:"group-bar-fill",style:Me({width:(T.value>0?Math.round(x.tokens/T.value*100):0)+"%",background:(Y(Ye)[x.category]||{color:"#4b5563"}).color})},null,4)])],8,Ay),u("div",{class:he(["group-items",{open:Y(o)(x.category)||L.value===x.category}])},[(g(!0),b(ve,null,Te(x.items,(be,Se)=>{var tt;return g(),b("div",{key:be.origIdx,class:he(["msg-row",[$e(be.msg),{selected:p.value&&!se.value&&((tt=B.value[d.value])==null?void 0:tt.origIdx)===be.origIdx}]]),"data-tool-name":ge(be.msg)||"",onClick:Ht=>y(J(X,Se))},[u("span",Ny,M(be.msg.role==="user"?"›":be.msg.role==="assistant"?"‹":"·"),1),u("span",Fy,M(Y(Bo)(be.msg,_.value)||"(empty)"),1),u("span",{class:he(["msg-tok",{hot:(be.msg.tokens||0)>2e3}])},M(Y(_e)(be.msg.tokens||0)),3)],10,Dy)}),128))],2)],8,Iy))),128))],64)):c.value==="chrono"?(g(),b(ve,{key:1},[$.value?(g(),b("div",zy,[u("span",null,[j[11]||(j[11]=xe(" Filtered file: ",-1)),Be((g(),b("b",By,[xe(M(pt.value),1)])),[[ye,$.value]]),u("span",Hy,"("+M(Ae.value.size)+" messages)",1)]),u("button",{class:"focus-clear",onClick:dn(Ne,["stop"])},"Show all")])):le("",!0),u("div",jy,[(g(!0),b(ve,null,Te(ae.value,(x,X)=>{var be;return g(),b(ve,{key:X},[O.value.has(X)?(g(!0),b(ve,{key:0},Te(O.value.get(X),Se=>Be((g(),b("div",{key:"sub-"+Se.id,class:"chrono-subagent-row",onClick:tt=>ke(Se.id)},[u("span",Uy,M(Y(_e)(Se.contextInfo.totalTokens)),1),j[12]||(j[12]=u("span",{class:"chrono-cat-dot subagent-dot"},null,-1)),j[13]||(j[13]=u("span",{class:"chrono-type subagent-type"},"subagent",-1)),u("span",Ky,M(Se.agentLabel),1),u("span",Wy,M(Y(en)(Se.contextInfo.model)),1)],8,Vy)),[[ye,"Click to view subagent context"]])),128)):le("",!0),te.value.has(X)?(g(),b("div",{key:1,class:he(["chrono-turn-marker",{future:x.future}])},[u("span",qy,"Turn "+M(te.value.get(X)),1),j[14]||(j[14]=u("span",{class:"chrono-turn-line"},null,-1))],2)):le("",!0),x.future&&X===Q.value?(g(),b("div",Gy,[...j[15]||(j[15]=[u("span",{class:"chrono-future-line"},null,-1),u("span",{class:"chrono-future-label"},"After this turn",-1),u("span",{class:"chrono-future-line"},null,-1)])])):le("",!0),u("div",{class:he(["chrono-row",[et(x.origIdx),{selected:!x.future&&p.value&&!se.value&&((be=B.value[d.value])==null?void 0:be.origIdx)===x.origIdx,future:x.future}]]),style:Me({"--cat-border":fe(x.msg)}),onClick:Se=>x.future?Z(x.origIdx):y(x.origIdx)},[Be((g(),b("span",Yy,[xe(M(x.future?"":Y(_e)(H.value[X])),1)])),[[ye,x.future?"Click to jump to this turn":`Cumulative: ${Y(_e)(H.value[X])} of ${Y(_e)(T.value)}`]]),u("span",{class:"chrono-cat-dot",style:Me({background:fe(x.msg)})},null,4),u("span",Xy,M(ie(x.msg)),1),u("span",Zy,M(Y(Bo)(x.msg,_.value)||"(empty)"),1),u("span",{class:he(["chrono-tok",{hot:!x.future&&(x.msg.tokens||0)>2e3}])},M(Y(_e)(x.msg.tokens||0)),3)],14,Jy)],64)}),128))])],64)):le("",!0)],512)]),_:1},8,["size"]),p.value?(g(),dt(Y(nl),{key:0,"min-size":25,size:58},{default:ft(()=>[Re(yy,{entry:oe.value,messages:W.value,"selected-index":re.value,onClose:h,onNavigate:N},null,8,["entry","messages","selected-index"])]),_:1})):le("",!0)]),_:1})],32)):le("",!0)}}}),e0=at(Qy,[["__scopeId","data-v-c0d2a74a"]]),t0={key:0,class:"timeline-tab"},n0={class:"timeline-scope-controls"},s0={class:"scope-toggle"},o0=["onClick"],i0={class:"panel panel--hero"},r0={class:"panel-head"},l0={class:"panel-controls"},a0={class:"mode-toggle"},c0={class:"panel-body"},u0={class:"chart-container"},d0={class:"y-axis"},f0=["onClick"],p0=["viewBox"],h0=["points"],v0=["aria-label"],m0={class:"chart-legend"},g0=["onClick"],y0={key:0,class:"projection-badge"},_0={key:1,class:"projection-badge projection-badge--warn"},b0={class:"panel panel--secondary panel--spine panel--cost"},w0={class:"panel-head"},k0={class:"panel-sub"},x0={class:"panel-body"},$0={class:"chart-container"},S0={class:"y-axis"},C0=["onClick"],T0={class:"chart-legend"},M0=Qe({__name:"TimelineTab",setup(e){const t=At(),n=A({get:()=>t.timelineMode,set:y=>{t.timelineMode=y}}),s=A({get:()=>t.timelineStackMode,set:y=>{t.timelineStackMode=y}}),o=A({get:()=>t.timelineHiddenLegendKeys,set:y=>{t.timelineHiddenLegendKeys=y}}),i=A({get:()=>t.timelineShowLimitOverlay,set:y=>{t.timelineShowLimitOverlay=y}}),r=A({get:()=>t.timelineShowCacheOverlay,set:y=>{t.timelineShowCacheOverlay=y}}),l=me(null),c=me(null),p=A(()=>t.selectedSession),d=A(()=>t.selectedEntry),m=A(()=>p.value?Yt([...p.value.entries].reverse()):[]),v=A(()=>n.value==="main"?m.value.filter(y=>y.isMain):m.value),w=A(()=>{let y=0;for(const h of v.value){const a=h.entry.contextInfo.totalTokens;a>y&&(y=a)}return y}),I=A(()=>{let y=0;for(const h of v.value){const a=h.entry.costUsd??0;a>y&&(y=a)}return y}),S=A(()=>v.value.length<=40),_=A(()=>Uo(Q.value)),C=A(()=>Zh(v.value)),z=A(()=>Gh(v.value,m.value)),K=A(()=>v.value.map((y,h)=>{const a=z.value.get(y.entry.id)||[],f=a[0]||null,E=C.value[h]||h+1;return{entryId:y.entry.id,firstEvent:f,title:f?Yh(a,E):""}}));function V(y){const h=new Set(o.value);h.has(y)?h.delete(y):h.add(y),o.value=h}const Q=A(()=>{if(o.value.size===0)return w.value;let y=0;for(const h of v.value){const a=jo(h.entry,o.value);a>y&&(y=a)}return y});function D(y){const h=jo(y.entry,o.value);return Vo(h,Q.value)}function ae(y){return Kh(y.entry,o.value)}function ue(y){return Vo(y.entry.costUsd??0,I.value)}function O(y){t.pinEntry(y.id)}function R(y){t.setInspectorTab("messages"),t.focusMessageCategory(y)}const de=A(()=>Xh(v.value.length)),F=A(()=>{const y=d.value;if(y&&y.contextLimit>0)return y.contextLimit;const h=v.value;return h.length>0?h[h.length-1].entry.contextLimit:0}),te=A(()=>{const y=Q.value;return i.value?Math.max(y,F.value):y}),ce=A(()=>{const y=te.value,h=F.value;return y===0||h===0?-1:(1-h/y)*100});function B(y){if(s.value==="normalized")return 100;if(!i.value)return D(y);const h=jo(y.entry,o.value);return Vo(h,te.value)}const se=A(()=>Uo(te.value)),oe=A(()=>Uo(I.value)),W=[0,25,50,75,100],re=A(()=>{const y=d.value;return y?oc(y,m.value):null}),we=A(()=>{const y=new Map;for(const h of v.value){const a=en(h.entry.contextInfo.model);y.has(a)||y.set(a,Yr(h.entry.contextInfo.model,!0))}return Array.from(y.entries()).map(([h,a])=>({name:h,color:a}))}),H=A(()=>Object.entries(mt).map(([y,h])=>({key:y,name:h.label,color:h.color}))),T=A(()=>{const y=v.value;if(y.length===0)return-1;if(n.value!=="all")return y.length-1;for(let h=y.length-1;h>=0;h--)if(y[h].isMain)return h;return-1}),P=A(()=>{const y=v.value,h=T.value;if(h<0)return!1;for(let a=0;a<=h;a++)if(!(n.value==="all"&&!y[a].isMain)&&fi(y[a].entry)!==null)return!0;return!1}),ee=A(()=>{const y=Math.max(0,T.value+1);return y===0?"0 0 1 100":`0 0 ${y} 100`}),ne=A(()=>{const y=v.value.length,h=Math.max(0,T.value+1);return y===0||h===0?"0%":`${h/y*100}%`}),$=A(()=>{const y=v.value,h=T.value;if(y.length===0||h<0)return"";const a=[];for(let f=0;f<=h;f++){if(n.value==="all"&&!y[f].isMain)continue;const E=fi(y[f].entry);if(E===null)continue;const q=f+.5,N=(1-E)*100;a.push(`${q.toFixed(3)},${N.toFixed(2)}`)}return a.join(" ")}),L=A(()=>ic(m.value));function G(y){y&&(y.scrollLeft=y.scrollWidth)}function k(){Ue(()=>{G(l.value),G(c.value)})}return Mn(()=>{k()}),Ke(()=>{var y,h;return[((y=p.value)==null?void 0:y.id)??"",n.value,v.value.length,((h=v.value[v.value.length-1])==null?void 0:h.entry.id)??""]},()=>{k()},{immediate:!0}),(y,h)=>{const a=gn("tooltip");return p.value?(g(),b("div",t0,[u("div",n0,[h[4]||(h[4]=u("span",{class:"scope-label"},"Scope",-1)),u("div",s0,[(g(),b(ve,null,Te(["main","all"],f=>u("button",{key:"scope-"+f,class:he({on:n.value===f}),onClick:E=>n.value=f},M(f==="all"?"All turns":"Main turns"),11,o0)),64))])]),u("section",i0,[u("div",r0,[h[9]||(h[9]=u("span",{class:"panel-title"},"Token Timeline",-1)),u("div",l0,[P.value?(g(),b("button",{key:0,class:he(["overlay-toggle",{on:r.value}]),onClick:h[0]||(h[0]=f=>r.value=!r.value)},[...h[5]||(h[5]=[u("span",{class:"legend-dot legend-dot--cache"},null,-1),xe(" Cache ",-1)])],2)):le("",!0),s.value==="absolute"?(g(),b("button",{key:1,class:he(["overlay-toggle",{on:i.value}]),onClick:h[1]||(h[1]=f=>i.value=!i.value)},[...h[6]||(h[6]=[u("span",{class:"legend-dot legend-dot--dashed"},null,-1),xe(" Limit ",-1)])],2)):le("",!0),u("div",a0,[Be((g(),b("button",{class:he({on:s.value==="absolute"}),onClick:h[2]||(h[2]=f=>s.value="absolute")},[...h[7]||(h[7]=[u("i",{class:"i-carbon-chart-column mode-icon"},null,-1),xe(" Abs ",-1)])],2)),[[a,"Absolute token counts"]]),Be((g(),b("button",{class:he({on:s.value==="normalized"}),onClick:h[3]||(h[3]=f=>s.value="normalized")},[...h[8]||(h[8]=[u("i",{class:"i-carbon-chart-maximum mode-icon"},null,-1),xe(" Pct ",-1)])],2)),[[a,"Normalized to 100% per turn"]])])])]),u("div",c0,[u("div",u0,[u("div",d0,[s.value==="normalized"?(g(!0),b(ve,{key:0},Te([...W].reverse(),f=>(g(),b("span",{key:"norm-"+f},M(f)+"%",1))),128)):(g(!0),b(ve,{key:1},Te([...i.value?se.value:_.value].reverse(),f=>(g(),b("span",{key:f},M(Y(Xr)(f,"tokens")),1))),128))]),u("div",{ref_key:"tokenChartScrollEl",ref:l,class:"chart-scroll"},[u("div",{class:he(["bars-wrap",{sparse:S.value}])},[u("div",{class:he(["bars",{sparse:S.value}])},[(g(!0),b(ve,null,Te(v.value,(f,E)=>{var q;return g(),b("div",{key:f.entry.id,class:he(["bar",{active:((q=d.value)==null?void 0:q.id)===f.entry.id,normalized:s.value==="normalized"}]),style:Me({height:B(f)+"%"}),onClick:N=>O(f.entry)},[(g(!0),b(ve,null,Te(ae(f),N=>Be((g(),b("div",{key:f.entry.id+"-"+N.key,class:"bar-segment",style:Me({height:N.pct+"%",background:N.color})},null,4)),[[a,Y(ev)(f.entry,N)]])),128))],14,f0)}),128))],2),s.value==="absolute"&&i.value&&ce.value>=0?(g(),b("div",{key:0,class:"limit-line",style:Me({top:ce.value+"%"})},null,4)):le("",!0),r.value&&$.value?(g(),b("svg",{key:1,class:"cache-line-svg",viewBox:ee.value,style:Me({width:ne.value}),preserveAspectRatio:"none"},[u("polyline",{points:$.value,fill:"none",stroke:"var(--accent-cyan)","stroke-width":"1.5","vector-effect":"non-scaling-stroke","stroke-linejoin":"round","stroke-linecap":"round",opacity:"0.7"},null,8,h0)],12,p0)):le("",!0)],2),u("div",{class:he(["events",{sparse:S.value}])},[(g(!0),b(ve,null,Te(K.value,f=>(g(),b("div",{key:"evt-"+f.entryId,class:"event-slot"},[f.firstEvent?Be((g(),b("button",{key:0,class:he(["event-marker",`event-marker--${f.firstEvent.type}`]),type:"button","aria-label":f.title},[xe(M(Y(Jh)(f.firstEvent.type)),1)],10,v0)),[[a,f.title]]):le("",!0)]))),128))],2),u("div",{class:he(["labels",{sparse:S.value}])},[(g(!0),b(ve,null,Te(C.value,(f,E)=>(g(),b("div",{key:E,class:"label"},M(f&&(de.value<=1||f%de.value===0)?f:""),1))),128))],2)],512)]),u("div",m0,[(g(!0),b(ve,null,Te(H.value,f=>(g(),b("button",{key:f.key,class:he(["legend-item legend-item--interactive",{"legend-item--hidden":o.value.has(f.key)}]),onClick:E=>V(f.key)},[u("span",{class:"legend-dot",style:Me({background:o.value.has(f.key)?"var(--text-ghost)":f.color})},null,4),xe(" "+M(f.name),1)],10,g0))),128)),L.value.turnsRemaining!==null&&L.value.turnsRemaining>0?Be((g(),b("span",y0,[xe(" ~"+M(L.value.turnsRemaining)+" turns remaining ",1)])),[[a,`Growing ~${Y(_e)(Math.round(L.value.growthPerTurn))}/turn over ${L.value.sinceCompaction} turns since last compaction`]]):L.value.turnsRemaining===0?Be((g(),b("span",_0,[...h[10]||(h[10]=[xe(" At limit ",-1)])])),[[a,"Context window is at or near the limit"]]):le("",!0)])])]),u("section",b0,[u("div",w0,[h[11]||(h[11]=u("span",{class:"panel-title"},"Cost Timeline",-1)),u("span",k0,"Scope: "+M(n.value==="main"?"Main turns only":"All turns"),1)]),u("div",x0,[u("div",$0,[u("div",S0,[(g(!0),b(ve,null,Te([...oe.value].reverse(),f=>(g(),b("span",{key:"cost-"+f},M(Y(Xr)(f,"cost")),1))),128))]),u("div",{ref_key:"costChartScrollEl",ref:c,class:"chart-scroll"},[u("div",{class:he(["bars-wrap",{sparse:S.value}])},[u("div",{class:he(["bars",{sparse:S.value}])},[(g(!0),b(ve,null,Te(v.value,f=>{var E;return Be((g(),b("div",{key:"cost-"+f.entry.id,class:he(["bar",{active:((E=d.value)==null?void 0:E.id)===f.entry.id}]),style:Me({height:ue(f)+"%"}),onClick:q=>O(f.entry)},[u("div",{class:"bar-cost",style:Me({background:Y(Yr)(f.entry.contextInfo.model,f.isMain)})},null,4)],14,C0)),[[a,Y(Qh)(f.entry,f.isMain)]])}),128))],2)],2),u("div",{class:he(["labels",{sparse:S.value}])},[(g(!0),b(ve,null,Te(C.value,(f,E)=>(g(),b("div",{key:"cost-label-"+E,class:"label"},M(f&&(de.value<=1||f%de.value===0)?f:""),1))),128))],2)],512)]),u("div",T0,[(g(!0),b(ve,null,Te(we.value,f=>(g(),b("span",{key:f.name,class:"legend-item"},[u("span",{class:"legend-dot",style:Me({background:f.color})},null,4),xe(" "+M(f.name),1)]))),128))])])]),Re(ac,{"diff-data":re.value,"show-when-empty":!!d.value,onCategoryClick:R},null,8,["diff-data","show-when-empty"])])):le("",!0)}}}),E0=at(M0,[["__scopeId","data-v-8510f6fe"]]),P0=["aria-label","aria-valuemax","aria-valuenow"],I0={class:"scrubber-controls"},A0=["disabled"],L0={class:"readout-num"},O0={class:"readout-total"},R0=["disabled"],D0={class:"spark-bars"},N0={class:"tt-row tt-turn"},F0={class:"tt-row"},z0={class:"tt-row tt-dim"},B0=Qe({__name:"TurnScrubber",setup(e){const t=At(),n=me(null),s=me(!1),o=me(null),i=A(()=>t.selectedSession),r=A(()=>t.selectedEntry),l=A(()=>i.value?Yt([...i.value.entries].reverse()):[]),c=A(()=>l.value.filter(W=>W.isMain)),p=A(()=>c.value.map(W=>W.entry)),d=A(()=>c.value.map(W=>!W.isMain)),m=A(()=>p.value.length),v=A(()=>{const W=r.value;if(!W)return-1;let re=-1;for(const we of l.value)if(we.isMain&&re++,we.entry.id===W.id)return re;return-1}),w=A(()=>{let W=0;for(const re of p.value)re.contextInfo.totalTokens>W&&(W=re.contextInfo.totalTokens);return W}),I=A(()=>{const W=w.value;return W===0?p.value.map(()=>({height:.15,tokens:0,cost:0,model:"",utilization:0})):p.value.map(re=>({height:Math.max(.08,re.contextInfo.totalTokens/W),tokens:re.contextInfo.totalTokens,cost:re.costUsd??0,model:en(re.contextInfo.model),utilization:re.contextLimit>0?re.contextInfo.totalTokens/re.contextLimit:0}))}),S=A(()=>t.selectionMode!=="pinned"||v.value<0?!1:v.value<m.value-1),_=A(()=>S.value?Math.max(0,m.value-1-v.value):0),C=A(()=>S.value?_.value/m.value>=.12:!1),z=A(()=>((v.value+1)/m.value+1)/2*100),K=A(()=>{const W=[];let re=0,we=-1;for(const H of l.value)H.isMain?(we>=0&&W.push(re),re=0,we++):re++;return we>=0&&W.push(re),W}),V=A(()=>{if(o.value===null||o.value<0||o.value>=p.value.length)return null;const W=p.value[o.value],re=I.value[o.value],we=K.value[o.value]||0;return{turn:o.value+1,tokens:_e(W.contextInfo.totalTokens),cost:_t(W.costUsd),model:re.model,subs:we,isSub:d.value[o.value]||!1}});function Q(W){de(W)&&t.pinEntry(p.value[W].id)}function D(){t.followLive()}function ae(){const W=v.value-1;de(W)&&Q(W)}function ue(){const W=v.value+1;de(W)&&Q(W)}function O(){r.value&&t.pinEntry(r.value.id)}function R(W){const re=n.value;if(!re||m.value===0)return-1;const we=re.getBoundingClientRect(),T=Math.max(0,Math.min(W.clientX-we.left,we.width))/we.width;return Math.min(Math.floor(T*m.value),m.value-1)}function de(W){return W>=0&&W<m.value}function F(W){var we,H;if(m.value===0)return;s.value=!0;const re=R(W);de(re)&&Q(re),(H=(we=W.target)==null?void 0:we.setPointerCapture)==null||H.call(we,W.pointerId)}function te(W){const re=R(W);o.value=de(re)?re:null,s.value&&de(re)&&Q(re)}function ce(W){var re,we;s.value=!1,(we=(re=W.target)==null?void 0:re.releasePointerCapture)==null||we.call(re,W.pointerId)}function B(){o.value=null}function se(W){W.key==="ArrowLeft"||W.key==="ArrowUp"?(W.preventDefault(),ae()):W.key==="ArrowRight"||W.key==="ArrowDown"?(W.preventDefault(),ue()):W.key==="Home"?(W.preventDefault(),Q(0)):W.key==="End"?(W.preventDefault(),m.value>0&&Q(m.value-1)):W.key==="Escape"&&(W.preventDefault(),D())}function oe(W){return W>=.9?"var(--accent-red)":W>=.7?"var(--accent-amber)":"var(--accent-blue)"}return(W,re)=>i.value&&r.value&&m.value>=1?(g(),b("div",{key:0,class:"scrubber",role:"slider","aria-label":`Turn scrubber: turn ${v.value+1} of ${m.value}`,"aria-valuemin":1,"aria-valuemax":m.value,"aria-valuenow":v.value+1,tabindex:"0",onKeydown:se},[u("div",I0,[u("button",{class:"ctrl-btn",disabled:v.value<=0,onClick:ae,title:"Previous turn (←)","aria-label":"Previous turn"},[...re[0]||(re[0]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("path",{d:"M7 1L3 5L7 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,A0),u("span",{class:he(["turn-readout",Y(t).selectionMode==="live"?"is-live":"is-pinned"])},[re[1]||(re[1]=u("span",{class:"readout-dot"},null,-1)),u("span",L0,M(v.value+1),1),re[2]||(re[2]=u("span",{class:"readout-sep"},"/",-1)),u("span",O0,M(m.value),1)],2),u("button",{class:"ctrl-btn",disabled:v.value<0||v.value>=m.value-1,onClick:ue,title:"Next turn (→)","aria-label":"Next turn"},[...re[3]||(re[3]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("path",{d:"M3 1L7 5L3 9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1)])],8,R0)]),u("div",{ref_key:"trackEl",ref:n,class:"scrubber-track",onPointerdown:F,onPointermove:te,onPointerup:ce,onPointerleave:B},[u("div",D0,[(g(!0),b(ve,null,Te(I.value,(we,H)=>(g(),b("div",{key:H,class:he(["spark-col",{active:H===v.value,hover:H===o.value&&H!==v.value,past:Y(t).selectionMode==="pinned"&&H>v.value,"is-sub":d.value[H]}])},[u("div",{class:"spark-bar",style:Me({height:we.height*100+"%","--bar-color":oe(we.utilization)})},null,4),K.value[H]>0?(g(),b("div",{key:0,class:he(["sub-dot",{"sub-burst":K.value[H]>=3}])},null,2)):le("",!0)],2))),128))]),v.value>=0?(g(),b("div",{key:0,class:he(["playhead",{live:Y(t).selectionMode==="live"}]),style:Me({left:(v.value+.5)/m.value*100+"%"})},[...re[4]||(re[4]=[u("div",{class:"playhead-line"},null,-1),u("div",{class:"playhead-head"},null,-1)])],6)):le("",!0),C.value?(g(),b("div",{key:1,class:"new-turns-badge",style:Me({left:z.value+"%"}),onClick:dn(D,["stop"])}," +"+M(_.value)+" new ",5)):le("",!0),Re(zn,{name:"tooltip-fade"},{default:ft(()=>[V.value&&o.value!==v.value?(g(),b("div",{key:0,class:"scrub-tooltip",style:Me({left:Math.min(Math.max((o.value+.5)/m.value*100,8),92)+"%"})},[u("div",N0,"T"+M(V.value.turn)+M(V.value.isSub?" (sub)":""),1),u("div",F0,M(V.value.tokens)+" · "+M(V.value.cost),1),u("div",z0,M(V.value.model)+M(V.value.subs>0?` · ${V.value.subs} sub`:""),1)],4)):le("",!0)]),_:1})],544),Y(t).selectionMode==="live"?(g(),b("button",{key:0,class:"action-btn action-pin",onClick:O,title:"Pin current turn to scrub history"},[...re[5]||(re[5]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("circle",{cx:"5",cy:"5",r:"3.5",stroke:"currentColor","stroke-width":"1"}),u("circle",{cx:"5",cy:"5",r:"1.5",fill:"currentColor"})],-1),xe(" Pin ",-1)])])):(g(),b("button",{key:1,class:"action-btn action-return",onClick:D,title:"Return to live (Esc)"},[...re[6]||(re[6]=[u("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none"},[u("path",{d:"M2 5H8M8 5L5.5 2.5M8 5L5.5 7.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),xe(" Live ",-1)])]))],40,P0)):le("",!0)}}),H0=at(B0,[["__scopeId","data-v-865993b3"]]),j0={class:"tab-bar"},V0=["onClick"],U0={class:"tab-content"},K0=Qe({__name:"InspectorPanel",setup(e){const t=At(),n=[{id:"overview",label:"Overview",icon:"i-carbon-dashboard"},{id:"messages",label:"Messages",icon:"i-carbon-chat"},{id:"timeline",label:"Timeline",icon:"i-carbon-activity"}],s={overview:Jg,messages:e0,timeline:E0},o=A(()=>s[t.inspectorTab]);function i(l){l==="messages"&&t.clearMessageFocus(),t.setInspectorTab(l)}function r(l){l.key==="Escape"&&!l.defaultPrevented&&t.setView("dashboard")}return(l,c)=>(g(),b("div",{class:"inspector",onKeydown:r,tabindex:"-1"},[Re(H0),u("div",j0,[(g(),b(ve,null,Te(n,p=>u("button",{key:p.id,class:he(["tab-btn",{active:Y(t).inspectorTab===p.id}]),onClick:d=>i(p.id)},[u("i",{class:he(p.icon)},null,2),xe(" "+M(p.label),1)],10,V0)),64))]),u("div",U0,[(g(),dt(Yl(o.value),{key:Y(t).inspectorTab}))])],32))}}),W0=at(K0,[["__scopeId","data-v-74dad8d1"]]),q0={class:"session-rail","aria-label":"Sessions"},G0={class:"rail-scroll"},J0=["onClick"],Y0={class:"tile-meta"},X0=Qe({__name:"SessionRail",setup(e){const t=At();function n(c){t.selectSession(c),t.setView("inspector")}function s(){t.setView("dashboard")}function o(c){const p=en(c.latestModel),d=c.entryCount+(c.entryCount===1?" turn":" turns"),m=_t(c.totalCost),v=c.healthScore?`
31
- Health ${c.healthScore.overall}/100 (${c.healthScore.rating})`:"",w=c.workingDirectory?`
32
- ${c.workingDirectory}`:"";return`${c.source} · ${p}
33
- ${d} · ${m}${v}${w}`}function i(c){return c.contextLimit?Math.min(100,Math.round(c.latestTotalTokens/c.contextLimit*100)):0}function r(c){const p=i(c);return p>=80?"high":p>=60?"mid":"low"}const l={delay:{show:50,hide:0},placement:"right"};return(c,p)=>{const d=gn("tooltip");return g(),b("nav",q0,[Be((g(),b("button",{class:"rail-back",onClick:s},[...p[0]||(p[0]=[u("i",{class:"i-carbon-grid grid-icon"},null,-1)])])),[[d,{content:"Dashboard",...l}]]),p[1]||(p[1]=u("span",{class:"rail-label"},"SESSIONS",-1)),u("div",G0,[(g(!0),b(ve,null,Te(Y(t).summaries,m=>Be((g(),b("button",{key:m.id,class:he(["rail-tile",{active:m.id===Y(t).selectedSessionId,pulse:Y(t).recentlyUpdated.has(m.id)}]),onClick:v=>n(m.id)},[u("span",{class:he(["tile-source",Y($s)(m.source)])},M(m.source||"?"),3),u("span",Y0,M(m.entryCount)+"t",1),u("span",{class:he(["tile-util",r(m)])},M(i(m))+"%",3)],10,J0)),[[d,{content:o(m),...l}]])),128))])])}}}),Z0=at(X0,[["__scopeId","data-v-fe0c47d1"]]),Q0={class:"compare-view"},e_={class:"compare-header"},t_={class:"compare-title"},n_={class:"compare-count"},s_={class:"legend"},o_={class:"lanes"},i_=["onMouseenter"],r_={class:"lane-header"},l_={class:"lane-identity"},a_={class:"lane-index"},c_={class:"lane-model"},u_={key:0,class:"lane-dir"},d_={class:"lane-metrics"},f_={class:"lm-cell"},p_={class:"lm-value"},h_={key:0,class:"lm-winner"},v_={class:"lm-cell"},m_={class:"lm-value green"},g_={key:0,class:"lm-winner"},y_={class:"lm-cell"},__={key:0,class:"lm-winner"},b_={class:"lm-cell"},w_={key:1,class:"lm-value ghost"},k_={key:0,class:"lm-cell"},x_={class:"lm-value dim"},$_={key:1,class:"lm-cell"},S_={class:"lm-value dim"},C_={key:0,class:"lm-winner"},T_={class:"lm-cell"},M_={class:"lm-value dim"},E_=["href","onClick"],P_={class:"lane-body"},I_={class:"turn-track"},A_=["title","href","onMouseenter","onClick"],L_={class:"turn-num"},O_={key:0,class:"turns-empty"},R_={key:0,class:"sparkline-col"},D_={class:"sparkline-cell"},N_={class:"sparkline",viewBox:"0 0 100 100",preserveAspectRatio:"none"},F_=["y1","y2"],z_=["d"],B_=["d"],H_={class:"sparkline-val"},j_={class:"sparkline-cell"},V_={class:"sparkline sparkline--cost",viewBox:"0 0 100 100",preserveAspectRatio:"none"},U_=["d"],K_=["d"],W_={class:"sparkline-val"},q_={key:0,class:"comp-row"},G_={class:"comp-tape"},J_=["title"],Y_={key:0,class:"comp-seg-label"},X_={class:"comp-total"},rl="#ef4444",ll="#9ca3af",Z_=Qe({__name:"CompareView",setup(e){const t=At(),n=me(null),s=me(null),o=me(null),i=A(()=>{const H=Object.entries(mt).map(([T,P])=>({key:T,label:P.label,color:P.color}));return H.push({key:"error",label:"Error",color:rl}),H.push({key:"stall",label:"Stall",color:ll}),H});function r(H){const T={};for(const[P,ee]of Object.entries(Hn)){T[P]=0;for(const ne of ee){const $=H.find(L=>L.category===ne);$&&(T[P]+=$.tokens)}}return T}function l(H){const T=r(H);let P="other",ee=0;for(const[ne,$]of Object.entries(T))$>ee&&(P=ne,ee=$);return P}function c(H){const T=r(H),P=Object.values(T).reduce((ee,ne)=>ee+ne,0);return P===0?[]:Object.entries(T).filter(([,ee])=>ee>0).sort((ee,ne)=>ne[1]-ee[1]).map(([ee,ne])=>{var $;return{key:ee,color:(($=mt[ee])==null?void 0:$.color)??"#475569",pct:ne/P*100}})}function p(H){const T=new Map;for(const ne of H){const $=ne.agentKey||"_default";T.set($,(T.get($)||0)+1)}let P="_default",ee=0;for(const[ne,$]of T)$>ee&&(P=ne,ee=$);return P}function d(H){const T=p(H.entries);return H.entries.filter(ee=>(ee.agentKey||"_default")===T).sort((ee,ne)=>new Date(ee.timestamp).getTime()-new Date(ne.timestamp).getTime()).map((ee,ne)=>{var y;const $=(ee.httpStatus??200)>=400,L=ee.stopReason==="max_tokens",G=l(ee.composition);let k;return $?k=rl:L?k=ll:k=((y=mt[G])==null?void 0:y.color)??mt.other.color,{turnNumber:ne+1,entry:ee,dominantGroup:G,color:k,isError:$,isStall:L,tokens:ee.contextInfo.totalTokens,costUsd:ee.costUsd??0,segments:c(ee.composition)}})}function m(H){if(!H)return"";let T=H;/^\/home\/[^/]+(\/|$)/.test(T)?T=T.replace(/^\/home\/[^/]+/,"~"):/^\/Users\/[^/]+(\/|$)/.test(T)&&(T=T.replace(/^\/Users\/[^/]+/,"~"));const P=T.split("/");return P.length>2?P.slice(-2).join("/"):T}function v(H){for(let T=H.length-1;T>=0;T--){const P=fi(H[T].entry);if(P!==null)return P}return null}const w=A(()=>{const H=[];for(const T of t.compareSessionIds){const P=t.loadedConversations.get(T),ee=t.summaries.find(Z=>Z.id===T);if(!P&&!ee)continue;const ne=P?d(P):[],$=P?P.entries.reduce((Z,ke)=>Z+(ke.costUsd??0),0):(ee==null?void 0:ee.totalCost)??0,L=P?P.entries.reduce((Z,ke)=>{var ge;return Z+(((ge=ke.timings)==null?void 0:ge.total_ms)??0)},0):0,G=ne.length>0?ne[ne.length-1].entry:null,k=ne.map(Z=>Z.tokens),y=ne.map(Z=>Z.costUsd),h=P?(G==null?void 0:G.healthScore)??(ee==null?void 0:ee.healthScore):ee==null?void 0:ee.healthScore,a=(G==null?void 0:G.contextInfo.totalTokens)??(ee==null?void 0:ee.latestTotalTokens)??0,f=(G==null?void 0:G.contextLimit)??(ee==null?void 0:ee.contextLimit)??2e5,E=(ee==null?void 0:ee.latestModel)??(G==null?void 0:G.contextInfo.model)??"",q=(ee==null?void 0:ee.source)??(P==null?void 0:P.source)??"",N=(ee==null?void 0:ee.workingDirectory)??(P==null?void 0:P.workingDirectory)??null,J=P?P.entries.reduce((Z,ke)=>{var ge;return Z+(((ge=ke.usage)==null?void 0:ge.outputTokens)??0)},0):0,pe=G?c(G.composition):[],fe=v(ne),ie=J>0&&$>0?$/J*1e3:null;H.push({id:T,source:q,model:E,directory:m(N),turnCount:ne.length,totalCost:$,totalDurationMs:L,finalTokens:a,contextLimit:f,healthRating:(h==null?void 0:h.rating)??"unknown",healthScore:(h==null?void 0:h.overall)??0,turns:ne,tokenHistory:k,costHistory:y,utilization:f>0?a/f:0,outputTokens:J,cacheRate:fe,costPerOutputK:ie,finalComposition:pe})}return H}),I=A(()=>{let H=0;for(const T of w.value)for(const P of T.turns)P.tokens>H&&(H=P.tokens);return H||1}),S=A(()=>{let H=0;for(const T of w.value)for(const P of T.turns)P.costUsd>H&&(H=P.costUsd);return H||.01}),_=A(()=>{let H=0;for(const T of w.value){H=Math.max(H,T.contextLimit);for(const P of T.tokenHistory)P>H&&(H=P)}return H||1});function C(H){const ne=8+H/I.value*24;return Math.round(ne)+"px"}function z(H){return H<=0?0:.15+H/S.value*.85}function K(H,T){if(H.length===0)return"";const P=100,ee=100,ne=H.length>1?P/(H.length-1):0;return H.map(($,L)=>{const G=H.length===1?P/2:L*ne,k=ee-$/T*ee;return`${L===0?"M":"L"}${G.toFixed(1)},${k.toFixed(1)}`}).join(" ")}function V(H,T){if(H.length===0)return"";const P=100,ee=100,ne=H.length>1?P/(H.length-1):0,$=H.map((k,y)=>{const h=H.length===1?P/2:y*ne,a=ee-k/T*ee;return`${y===0?"M":"L"}${h.toFixed(1)},${a.toFixed(1)}`}).join(" "),L=H.length===1?P/2:(H.length-1)*ne,G=H.length===1?P/2:0;return`${$} L${L.toFixed(1)},${ee} L${G.toFixed(1)},${ee} Z`}function Q(H){const T=_.value;return 100-H/T*100}const D=A(()=>{let H=0;for(const T of w.value)for(const P of T.costHistory)P>H&&(H=P);return H||.01});function ae(H,T){return n.value===null||T===n.value?1:H===s.value?.3:.4}function ue(H){var P;const T=[`Turn ${H.turnNumber}`,`Model: ${en(H.entry.contextInfo.model)}`,`Context: ${_e(H.entry.contextInfo.totalTokens)}`,`Cost: ${_t(H.entry.costUsd)}`,`Dominant: ${((P=mt[H.dominantGroup])==null?void 0:P.label)??H.dominantGroup}`];return H.entry.timings&&T.push(`Duration: ${ci(H.entry.timings.total_ms)}`),H.entry.stopReason&&T.push(`Stop: ${H.entry.stopReason}`),H.isError&&T.push(`HTTP ${H.entry.httpStatus}`),T.join(`
34
- `)}function O(H,T){return`#session/${encodeURIComponent(H)}?tab=overview&turn=${T}`}function R(H){return`#session/${encodeURIComponent(H)}?tab=overview`}function de(H,T){n.value=T,s.value=H}function F(){n.value=null,s.value=null}function te(H,T,P){H.ctrlKey||H.metaKey||H.button===1||(H.preventDefault(),t.exitCompare("inspector"),t.selectSession(T),t.pinEntry(P.entry.id))}function ce(H,T){H.ctrlKey||H.metaKey||H.button===1||(H.preventDefault(),t.exitCompare("inspector"),t.setInspectorTab("overview"),t.selectSession(T))}function B(){t.exitCompare("dashboard")}function se(H){return H>=.8?"util-high":H>=.6?"util-mid":"util-low"}function oe(H){o.value=H}function W(){o.value=null}function re(H){return H>=.01?"$"+H.toFixed(2)+"/K":"$"+H.toFixed(3)+"/K"}const we=A(()=>{const H=w.value;if(H.length<2)return null;const T=H.map(h=>h.totalCost),P=H.map(h=>h.finalTokens),ee=H.map(h=>h.turnCount),ne=H.map(h=>h.costPerOutputK),$=Math.min(...T),L=Math.min(...P),G=Math.min(...ee),k=ne.filter(h=>h!==null),y=k.length>0?Math.min(...k):null;return H.map(h=>({isCheapest:h.totalCost<=$,isLeanest:h.finalTokens<=L,isFewest:h.turnCount<=G,isMostEfficient:y!==null&&h.costPerOutputK!==null&&h.costPerOutputK<=y}))});return(H,T)=>(g(),b("div",Q0,[u("header",e_,[u("button",{class:"back-btn",onClick:B},[...T[0]||(T[0]=[u("i",{class:"i-carbon-arrow-left"},null,-1),xe(" Dashboard ",-1)])]),u("h1",t_,[T[1]||(T[1]=xe(" Compare ",-1)),u("span",n_,M(w.value.length)+" sessions",1)]),u("div",s_,[(g(!0),b(ve,null,Te(i.value,P=>(g(),b("span",{key:P.key,class:"legend-chip"},[u("span",{class:"legend-swatch",style:Me({background:P.color})},null,4),xe(" "+M(P.label),1)]))),128))])]),u("div",o_,[(g(!0),b(ve,null,Te(w.value,(P,ee)=>(g(),b("div",{key:P.id,class:he(["lane",{"lane--focused":o.value===P.id,"lane--dimmed":o.value!==null&&o.value!==P.id}]),onMouseenter:ne=>oe(P.id),onMouseleave:W},[u("div",r_,[u("div",l_,[u("div",a_,M(ee+1),1),u("span",{class:he(["source-badge",Y($s)(P.source)])},M(P.source||"?"),3),u("span",c_,M(Y(en)(P.model)),1),P.directory?(g(),b("span",u_,M(P.directory),1)):le("",!0)]),u("div",d_,[u("div",f_,[u("span",p_,M(P.turnCount),1),T[2]||(T[2]=u("span",{class:"lm-key"},"turns",-1)),we.value&&we.value[ee].isFewest?(g(),b("span",h_)):le("",!0)]),u("div",v_,[u("span",m_,M(Y(_t)(P.totalCost)),1),T[3]||(T[3]=u("span",{class:"lm-key"},"cost",-1)),we.value&&we.value[ee].isCheapest?(g(),b("span",g_)):le("",!0)]),u("div",y_,[u("span",{class:he(["lm-value",se(P.utilization)])},M(Math.round(P.utilization*100))+"% ",3),T[4]||(T[4]=u("span",{class:"lm-key"},"context",-1)),we.value&&we.value[ee].isLeanest?(g(),b("span",__)):le("",!0)]),u("div",b_,[P.healthRating!=="unknown"?(g(),b("span",{key:0,class:"lm-value lm-health",style:Me({color:Y(di)(P.healthRating)})},M(P.healthScore),5)):(g(),b("span",w_,"--")),T[5]||(T[5]=u("span",{class:"lm-key"},"health",-1))]),P.cacheRate!==null?(g(),b("div",k_,[u("span",x_,M(Y(ui)(P.cacheRate)),1),T[6]||(T[6]=u("span",{class:"lm-key"},"cache",-1))])):le("",!0),P.costPerOutputK!==null?(g(),b("div",$_,[u("span",S_,M(re(P.costPerOutputK)),1),T[7]||(T[7]=u("span",{class:"lm-key"},"$/out",-1)),we.value&&we.value[ee].isMostEfficient?(g(),b("span",C_)):le("",!0)])):le("",!0),u("div",T_,[u("span",M_,M(P.totalDurationMs>0?Y(ci)(P.totalDurationMs):"--"),1),T[8]||(T[8]=u("span",{class:"lm-key"},"duration",-1))])]),u("a",{class:"inspect-btn",title:"Open in inspector",href:R(P.id),onClick:ne=>ce(ne,P.id)},[...T[9]||(T[9]=[u("i",{class:"i-carbon-arrow-right"},null,-1)])],8,E_)]),u("div",P_,[u("div",I_,[(g(!0),b(ve,null,Te(P.turns,ne=>(g(),b("a",{key:ne.turnNumber,class:he(["turn-col",{"turn-col--error":ne.isError,"turn-col--stall":ne.isStall,"turn-col--crosslit":n.value===ne.turnNumber&&s.value!==P.id}]),style:Me({opacity:ae(P.id,ne.turnNumber)}),title:ue(ne),href:O(P.id,ne.turnNumber),onMouseenter:$=>de(P.id,ne.turnNumber),onMouseleave:F,onClick:$=>te($,P.id,ne)},[u("div",{class:"turn-bar",style:Me({height:C(ne.tokens)})},[(g(!0),b(ve,null,Te(ne.segments,$=>(g(),b("div",{key:$.key,class:"turn-seg",style:Me({flex:$.pct,background:$.color})},null,4))),128))],4),u("div",{class:"cost-dot",style:Me({opacity:z(ne.costUsd)})},null,4),u("span",L_,M(ne.turnNumber),1)],46,A_))),128)),P.turns.length===0?(g(),b("div",O_," Loading... ")):le("",!0)]),P.tokenHistory.length>1?(g(),b("div",R_,[u("div",D_,[(g(),b("svg",N_,[u("line",{x1:"0",y1:Q(P.contextLimit),x2:"100",y2:Q(P.contextLimit),class:"sparkline-limit"},null,8,F_),u("path",{d:V(P.tokenHistory,_.value),class:"sparkline-area"},null,8,z_),u("path",{d:K(P.tokenHistory,_.value),class:"sparkline-line"},null,8,B_)])),u("span",H_,[xe(M(Y(_e)(P.finalTokens)),1),T[10]||(T[10]=u("span",{class:"sparkline-sep"},"/",-1)),xe(M(Y(_e)(P.contextLimit)),1)])]),u("div",j_,[(g(),b("svg",V_,[u("path",{d:V(P.costHistory,D.value),class:"sparkline-area sparkline-area--cost"},null,8,U_),u("path",{d:K(P.costHistory,D.value),class:"sparkline-line sparkline-line--cost"},null,8,K_)])),u("span",W_,M(Y(_t)(P.totalCost))+" total",1)])])):le("",!0)]),P.finalComposition.length>0?(g(),b("div",q_,[u("div",G_,[(g(!0),b(ve,null,Te(P.finalComposition,ne=>{var $,L;return g(),b("div",{key:ne.key,class:"comp-seg",style:Me({flex:ne.pct,background:ne.color}),title:`${(($=Y(mt)[ne.key])==null?void 0:$.label)??ne.key}: ${Math.round(ne.pct)}%`},[ne.pct>=18?(g(),b("span",Y_,M(((L=Y(mt)[ne.key])==null?void 0:L.label)??ne.key),1)):le("",!0)],12,J_)}),128))]),u("span",X_,M(Y(_e)(P.finalTokens)),1)])):le("",!0)],42,i_))),128))])]))}}),Q_=at(Z_,[["__scopeId","data-v-f1fe8711"]]),eb={},tb={class:"empty"};function nb(e,t){return g(),b("div",tb,[...t[0]||(t[0]=[ya('<svg class="empty-icon" width="48" height="48" viewBox="0 0 48 48" aria-hidden="true" data-v-213dcf0e><circle cx="24" cy="24" r="20" fill="none" stroke="var(--border-mid)" stroke-width="1" data-v-213dcf0e></circle><circle cx="24" cy="24" r="10" fill="none" stroke="var(--border-bright)" stroke-width="0.8" data-v-213dcf0e></circle><circle cx="24" cy="24" r="3" fill="var(--accent-blue)" opacity="0.4" data-v-213dcf0e></circle></svg><div class="empty-title" data-v-213dcf0e>No requests captured yet</div><div class="empty-sub" data-v-213dcf0e> Start a tool through the CLI to capture traffic: </div><div class="empty-examples" data-v-213dcf0e><code data-v-213dcf0e>context-lens claude</code><code data-v-213dcf0e>context-lens codex</code><code data-v-213dcf0e>context-lens gemini</code></div>',4)])])}const sb=at(eb,[["render",nb],["__scopeId","data-v-213dcf0e"]]),ob={class:"app"},ib={class:"app-body"},rb={key:0,class:"app-loading"},lb={class:"main-content"},ab={key:"inspector",class:"inspector-content"},cb={key:1,class:"loading-placeholder"},al="#sessions",ub=Qe({__name:"App",setup(e){const t=At(),n=me(!1),s=me(!1),o=["overview","messages","timeline"];let i=null;const r=me(null),l=A(()=>{const _=t.view,C=r.value;return C===null?"view-instant":C==="dashboard"&&_==="inspector"?"view-slide-forward":C==="inspector"&&_==="dashboard"?"view-slide-back":"view-instant"});Ke(()=>t.view,(_,C)=>{r.value!==null?r.value=C:r.value=_});const{connected:c}=pp("/api/events",_=>{t.handleSSEEvent(_)});Ke(c,_=>{t.connected=_});function p(_){const C=_.match(/^#session\/([^?]+)(?:\?(.*))?$/);if(!C)return{sessionId:null,tab:null,turn:null};const K=decodeURIComponent(C[1]).trim()||null;if(!K)return{sessionId:null,tab:null,turn:null};const V=new URLSearchParams(C[2]??""),Q=V.get("tab"),D=Q&&o.includes(Q)?Q:null,ae=V.get("turn"),ue=ae?Number.parseInt(ae,10):NaN,O=Number.isFinite(ue)&&ue>0?ue:null;return{sessionId:K,tab:D,turn:O}}function d(_){return Yt([..._.entries].reverse()).filter(C=>C.isMain).map(C=>C.entry)}function m(){if(t.selectionMode!=="pinned")return null;const _=t.selectedSession;if(!_)return null;const C=d(_);if(C.length===0)return null;const z=t.selectedEntryId;if(z==null)return null;const K=C.findIndex(Q=>Q.id===z);if(K<0)return null;const V=K+1;return V<C.length?V:null}function v(_){const C=_.match(/^#compare\/(.+)$/);return C?C[1].split(",").map(z=>decodeURIComponent(z.trim())).filter(Boolean):null}async function w(){n.value=!0;try{const _=window.location.hash||"",C=v(_);if(C&&C.length>=2){const Q=C.filter(D=>t.summaries.some(ae=>ae.id===D));if(Q.length>=2){await t.enterCompare(new Set(Q));return}}const{sessionId:z,tab:K,turn:V}=p(_);if(z){if(!t.summaries.some(D=>D.id===z)){t.setView("dashboard");return}if(await t.selectSession(z),K&&t.setInspectorTab(K),V!=null&&t.selectedSession){const D=d(t.selectedSession);if(D.length>0){const ae=Math.min(Math.max(V,1),D.length);ae<D.length?t.pinEntry(D[ae-1].id):t.followLive()}else t.followLive()}else t.followLive();t.setView("inspector");return}t.setView("dashboard")}finally{n.value=!1}}function I(){if(n.value)return;let _=al;if(t.view==="compare"&&t.compareSessionIds.size>=2)_=`#compare/${Array.from(t.compareSessionIds).map(z=>encodeURIComponent(z)).join(",")}`;else if(t.view==="inspector"&&t.selectedSessionId){const C=new URLSearchParams;C.set("tab",t.inspectorTab);const z=m();z!=null&&C.set("turn",String(z));const K=C.toString();_=`#session/${encodeURIComponent(t.selectedSessionId)}${K?`?${K}`:""}`}window.location.hash!==_&&(window.location.hash=_)}function S(){w()}return Ke(()=>{var _;return[t.view,t.selectedSessionId,t.inspectorTab,t.selectionMode,t.selectedEntryId,(_=t.selectedSession)==null?void 0:_.entries.length,t.compareMode,t.compareSessionIds.size]},()=>{I()}),Mn(async()=>{try{t.initializeDensity(),await t.load(),window.location.hash||(window.location.hash=al),await w(),window.addEventListener("hashchange",S),i=setInterval(()=>{document.hidden||t.load()},5e3)}finally{s.value=!0}}),po(()=>{window.removeEventListener("hashchange",S),i&&(clearInterval(i),i=null)}),(_,C)=>(g(),b("div",ob,[Re(Ap),u("div",ib,[s.value?(g(),b(ve,{key:1},[Re(zn,{name:"rail-slide"},{default:ft(()=>[Y(t).view==="inspector"?(g(),dt(Z0,{key:0})):le("",!0)]),_:1}),u("div",lb,[Re(zn,{name:l.value},{default:ft(()=>[Y(t).view==="dashboard"?(g(),dt(Uh,{key:"dashboard"})):Y(t).view==="compare"?(g(),dt(Q_,{key:"compare"})):Y(t).view==="inspector"?(g(),b("div",ab,[Y(t).selectedSession?(g(),dt(W0,{key:0})):(g(),b("div",cb,[...C[1]||(C[1]=[u("div",{class:"loading-spinner"},null,-1)])]))])):(g(),dt(sb,{key:"empty"}))]),_:1},8,["name"])])],64)):(g(),b("div",rb,[...C[0]||(C[0]=[u("div",{class:"loading-spinner"},null,-1)])]))])]))}}),db=at(ub,[["__scopeId","data-v-766f3b5b"]]),ji=Ca(db);ji.use(Vd());ji.use(np);ji.mount("#app");export{ey as _};