@hienlh/ppm 0.19.5 → 0.19.7

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 (454) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/CLAUDE.md +15 -0
  3. package/assets/skills/ppm/SKILL.md +1 -1
  4. package/assets/skills/ppm/references/http-api.md +1 -1
  5. package/dist/web/assets/accounts-settings-section-D65EHybd.js +1 -0
  6. package/dist/web/assets/{ai-resource-editor-TVV8rOsT.js → ai-resource-editor-DmOGQ_1E.js} +1 -1
  7. package/dist/web/assets/{ai-settings-section-CutZAI-J.js → ai-settings-section-DP53HaV9.js} +1 -1
  8. package/dist/web/assets/{ai-settings-section-Whh5k2zL.js → ai-settings-section-Dlv_XYy3.js} +1 -1
  9. package/dist/web/assets/{angular-html-BuHNQIbQ.js → angular-html-C8nsn2VC.js} +1 -1
  10. package/dist/web/assets/{angular-ts-DHRWoLc-.js → angular-ts-Caw9nRCH.js} +1 -1
  11. package/dist/web/assets/{apl-C1VSWVei.js → apl-Dhu1LORF.js} +1 -1
  12. package/dist/web/assets/{appearance-settings-section-DbkXixUe.js → appearance-settings-section-WuJwZW7v.js} +1 -1
  13. package/dist/web/assets/architecture-PBZL5I3N-BZBxtErN.js +1 -0
  14. package/dist/web/assets/{astro-RX-rChsZ.js → astro-DwkX9sLZ.js} +1 -1
  15. package/dist/web/assets/{audio-preview-CCd1jdje.js → audio-preview-CkGZO8Uy.js} +1 -1
  16. package/dist/web/assets/{blade-CZ6bxMbK.js → blade-D1fC9Osx.js} +1 -1
  17. package/dist/web/assets/{bsl-BhgCXLWk.js → bsl-pur-PRip.js} +1 -1
  18. package/dist/web/assets/{cairo-BrwygPkn.js → cairo-DDJs9amR.js} +1 -1
  19. package/dist/web/assets/chat-tab-B3tKoaUT.js +15 -0
  20. package/dist/web/assets/{cobol-C5TGW1Ir.js → cobol-Bo0usdoM.js} +1 -1
  21. package/dist/web/assets/code-editor-8BjOSWul.js +7 -0
  22. package/dist/web/assets/{coffee-CFgKlmgI.js → coffee-DBBsbX1e.js} +1 -1
  23. package/dist/web/assets/{conflict-editor-B-HnPZX7.js → conflict-editor-D2JPf7dR.js} +1 -1
  24. package/dist/web/assets/{cpp-BhG5q3-d.js → cpp-6CTO78A-.js} +1 -1
  25. package/dist/web/assets/{crystal-DvuI7_tY.js → crystal-DAlvpAP7.js} +1 -1
  26. package/dist/web/assets/{csv-preview-CMIxkng3.js → csv-preview-DfHSVE7o.js} +1 -1
  27. package/dist/web/assets/{data-grid-overlay-editor-DP1xkog4.js → data-grid-overlay-editor-iRrpAV0e.js} +1 -1
  28. package/dist/web/assets/{database-viewer-CM6O4tar.js → database-viewer-BwSf-V1L.js} +1 -1
  29. package/dist/web/assets/{diff-viewer-nL4cAp1u.js → diff-viewer-CQU6j7uQ.js} +1 -1
  30. package/dist/web/assets/{edge-BSIEsmlI.js → edge-D0tZrpC7.js} +1 -1
  31. package/dist/web/assets/{edit-diff-preview-DeHb85DN.js → edit-diff-preview-DUgmjNre.js} +1 -1
  32. package/dist/web/assets/{elixir-BF-lrGXM.js → elixir-C1E6-o4G.js} +1 -1
  33. package/dist/web/assets/{elm-8mCsJOeN.js → elm-BKyTfeQX.js} +1 -1
  34. package/dist/web/assets/{erb-Dw5PUVKa.js → erb-Cdnr4BMI.js} +1 -1
  35. package/dist/web/assets/{erlang-BvjBIA6O.js → erlang-N1237mFq.js} +1 -1
  36. package/dist/web/assets/{esm-Bt9OwSnU.js → esm-ClNnmD9t.js} +1 -1
  37. package/dist/web/assets/{explorer-body-CuLBY282.js → explorer-body-B2FmdPAx.js} +2 -2
  38. package/dist/web/assets/{explorer-window-content-Cr8HYEIZ.js → explorer-window-content-CtSMepys.js} +1 -1
  39. package/dist/web/assets/{extension-manager-section-D_E1LteV.js → extension-manager-section-CBRXxG8W.js} +1 -1
  40. package/dist/web/assets/{extension-webview-BKVWrl6R.js → extension-webview-yfMof39w.js} +1 -1
  41. package/dist/web/assets/{files-settings-section-DzuWb19a.js → files-settings-section-Dxn0H4jj.js} +1 -1
  42. package/dist/web/assets/{fortran-fixed-form-CRjUJe9K.js → fortran-fixed-form-D_f9tVv0.js} +1 -1
  43. package/dist/web/assets/{fsharp-CjUIHIHp.js → fsharp-DEJmdhc2.js} +1 -1
  44. package/dist/web/assets/{gdresource-x_NUQFrZ.js → gdresource-Dmmrx2gP.js} +1 -1
  45. package/dist/web/assets/general-settings-section-C3ccyyOe.js +1 -0
  46. package/dist/web/assets/{git-commit-BOpxSbns.js → git-commit-qwJ867ig.js} +1 -1
  47. package/dist/web/assets/{git-log-panel-DRLGWrO2.js → git-log-panel-d2XBsNFP.js} +1 -1
  48. package/dist/web/assets/{git-rebase-BW4xlK7k.js → git-rebase-Dkv8Zw86.js} +1 -1
  49. package/dist/web/assets/gitGraph-HDMCJU4V-BHxJbXfV.js +1 -0
  50. package/dist/web/assets/{glide-data-grid-CUtOJQyB.js → glide-data-grid-5Un6IKEP.js} +7 -7
  51. package/dist/web/assets/{glimmer-js-CT9jrmFj.js → glimmer-js-CcrXn8lQ.js} +1 -1
  52. package/dist/web/assets/{glimmer-ts-CjQT1lxK.js → glimmer-ts-CLab3lU7.js} +1 -1
  53. package/dist/web/assets/{glsl-DsFJvtg5.js → glsl-DXhkG9dU.js} +1 -1
  54. package/dist/web/assets/{graphql-Dhlnmkn_.js → graphql-Cuqsx8r3.js} +1 -1
  55. package/dist/web/assets/group-chat-tab-COcbheaZ.js +1 -0
  56. package/dist/web/assets/{hack-BKHbsJ7u.js → hack-C_CBVdBc.js} +1 -1
  57. package/dist/web/assets/{haml-C1Ih25Y2.js → haml-CBWfzZpv.js} +1 -1
  58. package/dist/web/assets/{handlebars-CaFitvmC.js → handlebars-4e8OR-VI.js} +1 -1
  59. package/dist/web/assets/{html-BwpKIE6V.js → html-C5X4urn_.js} +1 -1
  60. package/dist/web/assets/{html-derivative-uuTEquZU.js → html-derivative-nH-jXfsL.js} +1 -1
  61. package/dist/web/assets/{http-Cv4Pg5cR.js → http-CQgaG7eu.js} +1 -1
  62. package/dist/web/assets/{hurl-DubkI6TG.js → hurl-B8gidJhu.js} +1 -1
  63. package/dist/web/assets/{hxml-B9OVZFAB.js → hxml-BAK94GX8.js} +1 -1
  64. package/dist/web/assets/{image-preview-DRbZ0FA2.js → image-preview-1kGj4W9R.js} +1 -1
  65. package/dist/web/assets/{index-C_s5DxFQ.js → index-DB-bD6Cx.js} +24 -24
  66. package/dist/web/assets/index-N-pnuwFP.css +2 -0
  67. package/dist/web/assets/info-3K5VOQVL-DI4p3vbH.js +1 -0
  68. package/dist/web/assets/{jinja-BHb1jyl6.js → jinja-BuAjvj8M.js} +1 -1
  69. package/dist/web/assets/{jira-watcher-section-B2-_4QW_.js → jira-watcher-section-BmDvZZ76.js} +1 -1
  70. package/dist/web/assets/{jison-CtpfXDzp.js → jison-Dhhs26-L.js} +1 -1
  71. package/dist/web/assets/{julia-TYjgpazU.js → julia-gZavIyll.js} +1 -1
  72. package/dist/web/assets/{just-D27bzZuW.js → just-DDHrFReO.js} +1 -1
  73. package/dist/web/assets/{keybindings-store-ehg0D6FR.js → keybindings-store-DAMW7K3e.js} +1 -1
  74. package/dist/web/assets/{keyboard-shortcuts-section-DMVcFwLJ.js → keyboard-shortcuts-section-BsZKKzf2.js} +1 -1
  75. package/dist/web/assets/{latex-D_MzopTn.js → latex-BdGZa8ov.js} +1 -1
  76. package/dist/web/assets/{liquid-BG_FG0Pe.js → liquid-urFfd9Fr.js} +1 -1
  77. package/dist/web/assets/{lua-Bl29oC2L.js → lua-CcS6tnB5.js} +1 -1
  78. package/dist/web/assets/{markdown-renderer-pDOFHEG7.js → markdown-renderer-BtrHvth9.js} +3 -3
  79. package/dist/web/assets/{markdown-renderer-CKIBtz-k.js → markdown-renderer-Dy4Vz3VW.js} +1 -1
  80. package/dist/web/assets/{marko-D-HI7dbm.js → marko-CSQqk4oG.js} +1 -1
  81. package/dist/web/assets/{mdc-y444JQTQ.js → mdc-CYIe80m_.js} +1 -1
  82. package/dist/web/assets/{mobile-bottom-sheet-BD5b7KJF.js → mobile-bottom-sheet-B3uDlD79.js} +1 -1
  83. package/dist/web/assets/{mobile-explorer-sheet-DFGPwNp0.js → mobile-explorer-sheet-BL1t1Ptr.js} +1 -1
  84. package/dist/web/assets/{nextflow-C5sKcldC.js → nextflow-C-W8vX8I.js} +1 -1
  85. package/dist/web/assets/{nginx-bXnEC3wm.js → nginx-COGi5you.js} +1 -1
  86. package/dist/web/assets/{nim-pevhf4WD.js → nim-CPitYGel.js} +1 -1
  87. package/dist/web/assets/{notification-store-CwLJtN2t.js → notification-store-DIwuBHMP.js} +1 -1
  88. package/dist/web/assets/{notifications-settings-section-C66s2JId.js → notifications-settings-section-CpnG8Ep4.js} +1 -1
  89. package/dist/web/assets/{number-overlay-editor-B7WINIW4.js → number-overlay-editor-C_eD-Bdr.js} +1 -1
  90. package/dist/web/assets/{overview-panel-mhN0qw6Q.js → overview-panel-Cm2HRtEz.js} +1 -1
  91. package/dist/web/assets/packet-RMMSAZCW-YNQWTi_-.js +1 -0
  92. package/dist/web/assets/{pdf-preview-0AwTBfeC.js → pdf-preview-9Olujr_E.js} +1 -1
  93. package/dist/web/assets/{perl-B1KUtMnW.js → perl-B0yW3hbb.js} +1 -1
  94. package/dist/web/assets/{php-BGmVZBAJ.js → php-BNMYN5Jp.js} +1 -1
  95. package/dist/web/assets/pie-UPGHQEXC-E3Wiw76n.js +1 -0
  96. package/dist/web/assets/{postgres-viewer-hDHYMHmG.js → postgres-viewer-qQtI_Qan.js} +3 -3
  97. package/dist/web/assets/{ppmbot-settings-section-DV6TMOfs.js → ppmbot-settings-section-C_yNqYo1.js} +1 -1
  98. package/dist/web/assets/{process-table-CmvwqGrQ.js → process-table-DH95ASxx.js} +1 -1
  99. package/dist/web/assets/proxy-settings-section-7OpR2hAD.js +1 -0
  100. package/dist/web/assets/{pug-BfN8CpEH.js → pug-CP5fxsxD.js} +1 -1
  101. package/dist/web/assets/{qml-D6fRdLZt.js → qml-CHGpQosY.js} +1 -1
  102. package/dist/web/assets/{query-audit-section-BgXdBaE1.js → query-audit-section-CHncxP-Z.js} +1 -1
  103. package/dist/web/assets/radar-KQ55EAFF-BPQJUKON.js +1 -0
  104. package/dist/web/assets/{razor-fg-9AScR.js → razor-Cfe0AYo4.js} +1 -1
  105. package/dist/web/assets/remote-desktop-mobile-sheet-Db21Gh-Y.js +2 -0
  106. package/dist/web/assets/{remote-desktop-mobile-view-DO5NJufM.js → remote-desktop-mobile-view-CiKtuPVS.js} +1 -1
  107. package/dist/web/assets/{remote-desktop-readiness-gate-CODu8fsP.js → remote-desktop-readiness-gate-BSBIPU4d.js} +1 -1
  108. package/dist/web/assets/{remote-desktop-window-content-DVhp7Y9T.js → remote-desktop-window-content-CJOxXllZ.js} +1 -1
  109. package/dist/web/assets/{rst-BZgx076b.js → rst-DxSSGshb.js} +1 -1
  110. package/dist/web/assets/{ruby-iUkWDcLo.js → ruby-rbK5SsJa.js} +1 -1
  111. package/dist/web/assets/{sas-CLXO0lZ6.js → sas-DDM28fbb.js} +1 -1
  112. package/dist/web/assets/schedules-settings-section-Q5X3kNJ8.js +1 -0
  113. package/dist/web/assets/{scss-DQqteGaG.js → scss-TDl-6ro4.js} +1 -1
  114. package/dist/web/assets/settings-body-5804QGDH.js +2 -0
  115. package/dist/web/assets/settings-store-DWUx3865.js +2 -0
  116. package/dist/web/assets/settings-tab-DgJP4K6b.js +1 -0
  117. package/dist/web/assets/settings-window-content-lyNwahx3.js +1 -0
  118. package/dist/web/assets/{shaderlab-CeMTqagR.js → shaderlab-CCvmDgGS.js} +1 -1
  119. package/dist/web/assets/{shellsession-BAkquZAV.js → shellsession-BzKS9yKh.js} +1 -1
  120. package/dist/web/assets/{soy-Bxm9Ez55.js → soy-QfO35nDh.js} +1 -1
  121. package/dist/web/assets/{sparql-C1phwdLc.js → sparql-D29RDfp2.js} +1 -1
  122. package/dist/web/assets/sql-query-editor-DH3H3gvx.js +1 -0
  123. package/dist/web/assets/{sqlite-viewer-Cy-H-h03.js → sqlite-viewer-DkmaTXae.js} +1 -1
  124. package/dist/web/assets/{stata-DGNMQdEb.js → stata-Be6j_SNv.js} +1 -1
  125. package/dist/web/assets/streaming-store-DDst3zA7.js +1 -0
  126. package/dist/web/assets/{surrealql-ByVrV320.js → surrealql-CykFjgNG.js} +1 -1
  127. package/dist/web/assets/{svelte-CNWjIMhl.js → svelte-CdBF8z4-.js} +1 -1
  128. package/dist/web/assets/system-monitor-body-KuahlPOb.js +2 -0
  129. package/dist/web/assets/system-monitor-tab-BK-nYh25.js +1 -0
  130. package/dist/web/assets/{system-monitor-window-content-5Kkti6yp.js → system-monitor-window-content-C5TkD158.js} +1 -1
  131. package/dist/web/assets/{tab-host-window-content-BnwmQM0I.js → tab-host-window-content-BwDnxvbx.js} +1 -1
  132. package/dist/web/assets/team-member-sheet-Cg82OxYB.js +2 -0
  133. package/dist/web/assets/{team-member-window-content-CHevmy9F.js → team-member-window-content-FxBRzgMW.js} +1 -1
  134. package/dist/web/assets/{templ-Cf0gQL4I.js → templ-BVHE2CNb.js} +1 -1
  135. package/dist/web/assets/{terminal-tab-DVb1AfrI.js → terminal-tab-Bro7kJBK.js} +2 -2
  136. package/dist/web/assets/{tex-BTIqPw_R.js → tex-C8XwrbBw.js} +1 -1
  137. package/dist/web/assets/{tool-cards-DIF_JcFj.js → tool-cards-BDmz33Y9.js} +5 -5
  138. package/dist/web/assets/treemap-KZPCXAKY-C2CvKBQR.js +1 -0
  139. package/dist/web/assets/{ts-tags-B8dN_Yf6.js → ts-tags-BIHk5AM0.js} +1 -1
  140. package/dist/web/assets/{twig-BgemonbJ.js → twig-YcE6Q2Ox.js} +1 -1
  141. package/dist/web/assets/{use-accounts-data--JHaCIoT.js → use-accounts-data-CvfdFWm3.js} +1 -1
  142. package/dist/web/assets/use-monaco-theme-D3Owwbo5.js +1 -0
  143. package/dist/web/assets/{use-remote-desktop-display-choice-DJFX_arw.js → use-remote-desktop-display-choice-DOg4xZ-8.js} +1 -1
  144. package/dist/web/assets/{use-websocket-DufdN3ZA.js → use-websocket-4y-ICdd7.js} +1 -1
  145. package/dist/web/assets/{vendor-mermaid-BKWscKt0.js → vendor-mermaid-CKKtYuTV.js} +1 -1
  146. package/dist/web/assets/{video-preview-DExfNDxI.js → video-preview-C70-MurL.js} +1 -1
  147. package/dist/web/assets/{vue-html-DYEQFAiK.js → vue-html-D1y9feOj.js} +1 -1
  148. package/dist/web/assets/{vue-D3D4lbXz.js → vue-q7m01V0h.js} +1 -1
  149. package/dist/web/assets/{vue-vine-D0OPNscN.js → vue-vine-DrIGs03v.js} +1 -1
  150. package/dist/web/assets/{xml-DHaWgpya.js → xml-oyvc1920.js} +1 -1
  151. package/dist/web/assets/{xsl-DVRN8JsA.js → xsl-BbIGdNPF.js} +1 -1
  152. package/dist/web/index.html +12 -11
  153. package/dist/web/sw.js +1 -1
  154. package/package.json +1 -1
  155. package/src/providers/registry.ts +6 -2
  156. package/src/server/routes/proxy.ts +6 -4
  157. package/src/server/routes/settings.ts +1 -0
  158. package/src/services/config.service.ts +28 -0
  159. package/src/services/db.service.ts +6 -0
  160. package/src/web/app.tsx +8 -0
  161. package/src/web/components/layout/status-bar.tsx +3 -0
  162. package/src/web/components/layout/wake-lock-indicator.tsx +50 -0
  163. package/src/web/components/settings/accounts/account-bucket-row.tsx +4 -4
  164. package/src/web/components/settings/accounts/codex-accounts-section.tsx +2 -8
  165. package/src/web/components/settings/accounts/codex-usage-rows.tsx +26 -0
  166. package/src/web/components/settings/accounts/use-codex-accounts.ts +12 -1
  167. package/src/web/components/settings/general-settings-section.tsx +37 -3
  168. package/src/web/components/settings/proxy-settings-section.tsx +27 -13
  169. package/src/web/components/settings/proxy-test-section.tsx +45 -17
  170. package/src/web/hooks/use-wake-lock.ts +148 -0
  171. package/src/web/lib/proxy-endpoints.ts +39 -0
  172. package/src/web/stores/settings-store.ts +12 -0
  173. package/src/web/stores/wake-lock-store.ts +21 -0
  174. package/dist/web/assets/accounts-settings-section-CmLGNwUl.js +0 -1
  175. package/dist/web/assets/architecture-PBZL5I3N-Ca5IpdzP.js +0 -1
  176. package/dist/web/assets/chat-tab-BYuPaeUJ.js +0 -15
  177. package/dist/web/assets/code-editor-4Lk47HbX.js +0 -7
  178. package/dist/web/assets/general-settings-section-c096J38r.js +0 -1
  179. package/dist/web/assets/gitGraph-HDMCJU4V-BloZfB0Q.js +0 -1
  180. package/dist/web/assets/group-chat-tab-Cano41wo.js +0 -1
  181. package/dist/web/assets/index-nP3uxXvR.css +0 -2
  182. package/dist/web/assets/info-3K5VOQVL-c0W8wp5o.js +0 -1
  183. package/dist/web/assets/packet-RMMSAZCW-D_BoHr_M.js +0 -1
  184. package/dist/web/assets/pie-UPGHQEXC-BaLfuEf8.js +0 -1
  185. package/dist/web/assets/proxy-settings-section-DjtXwOV_.js +0 -1
  186. package/dist/web/assets/radar-KQ55EAFF-DBIZEaIU.js +0 -1
  187. package/dist/web/assets/remote-desktop-mobile-sheet-Cakf7i6s.js +0 -2
  188. package/dist/web/assets/schedules-settings-section-IfwILuXE.js +0 -1
  189. package/dist/web/assets/settings-body-NYJVObzu.js +0 -2
  190. package/dist/web/assets/settings-store-Brjd0QnO.js +0 -2
  191. package/dist/web/assets/settings-tab-CPOI69SL.js +0 -1
  192. package/dist/web/assets/settings-window-content-BuuLt4qg.js +0 -1
  193. package/dist/web/assets/sql-query-editor-BSwL4jf9.js +0 -1
  194. package/dist/web/assets/system-monitor-body-B3jG3f5P.js +0 -2
  195. package/dist/web/assets/system-monitor-tab-Dt4wtPR0.js +0 -1
  196. package/dist/web/assets/team-member-sheet-B4TEEtVT.js +0 -2
  197. package/dist/web/assets/treemap-KZPCXAKY-DFiG9UYW.js +0 -1
  198. package/dist/web/assets/use-monaco-theme-xqDIVJcg.js +0 -1
  199. /package/dist/web/assets/{abap-h3QyH8MW.js → abap-Cq9nYQyd.js} +0 -0
  200. /package/dist/web/assets/{actionscript-3-mkxkq-FN.js → actionscript-3-DL8rUIy0.js} +0 -0
  201. /package/dist/web/assets/{ada-DhISK_EH.js → ada-BY8TLuhY.js} +0 -0
  202. /package/dist/web/assets/{andromeeda-DnlWWesX.js → andromeeda-CyVfHsS0.js} +0 -0
  203. /package/dist/web/assets/{apache-P5AK3sfA.js → apache-DTQUy73x.js} +0 -0
  204. /package/dist/web/assets/{apex-CJUPehg2.js → apex-CiSZngrZ.js} +0 -0
  205. /package/dist/web/assets/{api-settings-CTMdz_VF.js → api-settings-BVfemzZW.js} +0 -0
  206. /package/dist/web/assets/{api-themes-Cknp3Q-P.js → api-themes-BoOJPqwM.js} +0 -0
  207. /package/dist/web/assets/{applescript-Dx6GGbay.js → applescript-CzuRDd3h.js} +0 -0
  208. /package/dist/web/assets/{apply-theme-DxTXOAcV.js → apply-theme-r8tKDrCR.js} +0 -0
  209. /package/dist/web/assets/{ara-95Kx3qKb.js → ara-CSFV93kR.js} +0 -0
  210. /package/dist/web/assets/{asciidoc-Dp0RbIej.js → asciidoc-hOQNnXhz.js} +0 -0
  211. /package/dist/web/assets/{asm-C82coUjU.js → asm-DdG53NGR.js} +0 -0
  212. /package/dist/web/assets/{aurora-x-BFc3zeop.js → aurora-x-DJ7ORZG6.js} +0 -0
  213. /package/dist/web/assets/{awk-ChjC0icr.js → awk-B3FFpX_J.js} +0 -0
  214. /package/dist/web/assets/{ayu-dark-DYfUf_PB.js → ayu-dark-D_P1CfTe.js} +0 -0
  215. /package/dist/web/assets/{ayu-light-Bh6O0plO.js → ayu-light-Cz3YLUqH.js} +0 -0
  216. /package/dist/web/assets/{ayu-mirage-DlNhHTGq.js → ayu-mirage-JcMq5tgJ.js} +0 -0
  217. /package/dist/web/assets/{ballerina-Ceoll3Sk.js → ballerina-7Hs4Rfpk.js} +0 -0
  218. /package/dist/web/assets/{bat-C7QS6Lfq.js → bat-COgQdnFA.js} +0 -0
  219. /package/dist/web/assets/{beancount-5NMEAZgs.js → beancount-BJ3CutBG.js} +0 -0
  220. /package/dist/web/assets/{berry-BBL83Vbk.js → berry-D7so2Cui.js} +0 -0
  221. /package/dist/web/assets/{bibtex-L7rPkPSG.js → bibtex-Ct3acHa1.js} +0 -0
  222. /package/dist/web/assets/{bicep-BOwHIINh.js → bicep-jXDwCQcm.js} +0 -0
  223. /package/dist/web/assets/{bird2-CWLsMom2.js → bird2-CjLD2cna.js} +0 -0
  224. /package/dist/web/assets/{button-BZtEJcUv.js → button-2WCAS8dI.js} +0 -0
  225. /package/dist/web/assets/{c-CD4Ku5Cr.js → c-CdgZojnL.js} +0 -0
  226. /package/dist/web/assets/{c3-CpMl-w3G.js → c3-DtpZYego.js} +0 -0
  227. /package/dist/web/assets/{cadence-CvgF6ehN.js → cadence-CPLkixoh.js} +0 -0
  228. /package/dist/web/assets/{can-open-in-ppm-j3jh7fUo.js → can-open-in-ppm-BntPywsy.js} +0 -0
  229. /package/dist/web/assets/{catppuccin-frappe-eo_dTm3F.js → catppuccin-frappe-Xt0_qJa9.js} +0 -0
  230. /package/dist/web/assets/{catppuccin-latte-DoiMCU_7.js → catppuccin-latte-CJnbLec5.js} +0 -0
  231. /package/dist/web/assets/{catppuccin-macchiato-UQxsK2Vh.js → catppuccin-macchiato-BPHP1wYB.js} +0 -0
  232. /package/dist/web/assets/{catppuccin-mocha-J0i-8RNy.js → catppuccin-mocha-ssWJodGc.js} +0 -0
  233. /package/dist/web/assets/{clarity-DXYM8-SA.js → clarity-DB0408F6.js} +0 -0
  234. /package/dist/web/assets/{clojure-DzamsL69.js → clojure-dpRPlAO4.js} +0 -0
  235. /package/dist/web/assets/{cmake-CR6RP_T_.js → cmake-r2VkeX9y.js} +0 -0
  236. /package/dist/web/assets/{codeowners-D1s6-IyY.js → codeowners-v5nQqHiB.js} +0 -0
  237. /package/dist/web/assets/{codeql-DAqNWMkS.js → codeql-BSSEhKRR.js} +0 -0
  238. /package/dist/web/assets/{common-lisp-8e-KtitB.js → common-lisp-BXb2MMMA.js} +0 -0
  239. /package/dist/web/assets/{coq-UEq0WUcO.js → coq-BjBNi73X.js} +0 -0
  240. /package/dist/web/assets/{csharp-wxJ0TuCm.js → csharp-CdPjZRbV.js} +0 -0
  241. /package/dist/web/assets/{css-Cerub-yB.js → css-BuxbQOHL.js} +0 -0
  242. /package/dist/web/assets/{csv-Bh9_WD_h.js → csv-Dj-eoZwH.js} +0 -0
  243. /package/dist/web/assets/{csv-parser-BPIDt6ni.js → csv-parser-CBbALsFU.js} +0 -0
  244. /package/dist/web/assets/{cue-rzM1ztqU.js → cue-Dz73VksN.js} +0 -0
  245. /package/dist/web/assets/{cypher-DGaTQ8m0.js → cypher-CkVkDywZ.js} +0 -0
  246. /package/dist/web/assets/{d-DbkZGuhB.js → d-oU51Pbpf.js} +0 -0
  247. /package/dist/web/assets/{dark-plus-BO2bzZcA.js → dark-plus-DcwvjjfO.js} +0 -0
  248. /package/dist/web/assets/{dart-BDhCoqVg.js → dart-DGvu8mcX.js} +0 -0
  249. /package/dist/web/assets/{data-grid-types-CdAg-4W1.js → data-grid-types-B6kUrF-M.js} +0 -0
  250. /package/dist/web/assets/{dax-Bh03stWh.js → dax-BmbjKQ90.js} +0 -0
  251. /package/dist/web/assets/{desktop-BOdr_fwq.js → desktop-IRBSiFfh.js} +0 -0
  252. /package/dist/web/assets/{diff-Bb_gTsS2.js → diff-Bdik2JR8.js} +0 -0
  253. /package/dist/web/assets/{dist-DonmFWG8.js → dist-Bv4zQpS1.js} +0 -0
  254. /package/dist/web/assets/{dist-BUMDu0av.js → dist-C8YPBIOb.js} +0 -0
  255. /package/dist/web/assets/{docker-BDsTF5ce.js → docker-Bgdl0H8I.js} +0 -0
  256. /package/dist/web/assets/{docx-preview-CWIDVNZn.js → docx-preview-Bgw838ry.js} +0 -0
  257. /package/dist/web/assets/{dotenv-CbCWp9Ti.js → dotenv-COe5NdnA.js} +0 -0
  258. /package/dist/web/assets/{dracula-Cd1fxvoX.js → dracula-DjURaSAa.js} +0 -0
  259. /package/dist/web/assets/{dracula-soft-B7eXkfXG.js → dracula-soft-Do7d0bo-.js} +0 -0
  260. /package/dist/web/assets/{dream-maker-XlzuS21R.js → dream-maker-DYwQvJIj.js} +0 -0
  261. /package/dist/web/assets/{emacs-lisp-CXV1Ki_7.js → emacs-lisp-BXjlHyDW.js} +0 -0
  262. /package/dist/web/assets/{everforest-dark-DuqR60Dg.js → everforest-dark-h8Q2loiX.js} +0 -0
  263. /package/dist/web/assets/{everforest-light-q4BPnenD.js → everforest-light-CdsJiL-9.js} +0 -0
  264. /package/dist/web/assets/{fennel-B-e0TX2Q.js → fennel-D0CBtOvY.js} +0 -0
  265. /package/dist/web/assets/{fish-Bzb6-TtF.js → fish-DzayfrMj.js} +0 -0
  266. /package/dist/web/assets/{fluent-B-szH2-f.js → fluent-CatjkUfx.js} +0 -0
  267. /package/dist/web/assets/{format-bytes-CKXk9k2d.js → format-bytes-BulRSULX.js} +0 -0
  268. /package/dist/web/assets/{fortran-free-form-OS6SGYC0.js → fortran-free-form-DM04ud0b.js} +0 -0
  269. /package/dist/web/assets/{gdscript-FYq4OP2d.js → gdscript-BLN5iZwf.js} +0 -0
  270. /package/dist/web/assets/{gdshader-BpG6P8rw.js → gdshader-BK-1iZQs.js} +0 -0
  271. /package/dist/web/assets/{genie-BS9RLAna.js → genie-BGPOFWDN.js} +0 -0
  272. /package/dist/web/assets/{gherkin-B_9FdtGs.js → gherkin-CdVOJ_JY.js} +0 -0
  273. /package/dist/web/assets/{github-dark-cfaIlnBV.js → github-dark-B_xW8TaY.js} +0 -0
  274. /package/dist/web/assets/{github-dark-default-B2Wv65He.js → github-dark-default-h_iKq7CX.js} +0 -0
  275. /package/dist/web/assets/{github-dark-dimmed-CtM9X76s.js → github-dark-dimmed-nKDYE62T.js} +0 -0
  276. /package/dist/web/assets/{github-dark-high-contrast-DLHyk0tG.js → github-dark-high-contrast-l8I771QT.js} +0 -0
  277. /package/dist/web/assets/{github-light-DWEI10iG.js → github-light-DNhjkg8Z.js} +0 -0
  278. /package/dist/web/assets/{github-light-default-DcJkK1YN.js → github-light-default-DQ06uS3g.js} +0 -0
  279. /package/dist/web/assets/{github-light-high-contrast-Bcx9iKDt.js → github-light-high-contrast-qc2sZCVN.js} +0 -0
  280. /package/dist/web/assets/{gleam-DVpiM6b2.js → gleam-DPPatkNH.js} +0 -0
  281. /package/dist/web/assets/{gn-B80DNc0i.js → gn-BnzGQTy5.js} +0 -0
  282. /package/dist/web/assets/{gnuplot-D9i3MaT-.js → gnuplot-Ct1leoo3.js} +0 -0
  283. /package/dist/web/assets/{go-CwCBf_Pt.js → go-qysCdbrn.js} +0 -0
  284. /package/dist/web/assets/{groovy-D7mEfwmW.js → groovy-BkWIdrRQ.js} +0 -0
  285. /package/dist/web/assets/{gruvbox-dark-hard-C4R4MOoH.js → gruvbox-dark-hard-L6Iiybbl.js} +0 -0
  286. /package/dist/web/assets/{gruvbox-dark-medium-CZnFC0s8.js → gruvbox-dark-medium-DbD3yl0b.js} +0 -0
  287. /package/dist/web/assets/{gruvbox-dark-soft-DFcJlEBl.js → gruvbox-dark-soft-Ban2cHK3.js} +0 -0
  288. /package/dist/web/assets/{gruvbox-light-hard-B6IF_1L-.js → gruvbox-light-hard-CK_SjS3e.js} +0 -0
  289. /package/dist/web/assets/{gruvbox-light-medium-C19AZJv2.js → gruvbox-light-medium-Bjgvhc2w.js} +0 -0
  290. /package/dist/web/assets/{gruvbox-light-soft-BAnpDm9B.js → gruvbox-light-soft-EWnyYGUu.js} +0 -0
  291. /package/dist/web/assets/{haskell-CsXSYXRG.js → haskell-rT1N9nYr.js} +0 -0
  292. /package/dist/web/assets/{haxe-B1uyiI9t.js → haxe-Bbc91axo.js} +0 -0
  293. /package/dist/web/assets/{hcl-DlYKn5q9.js → hcl-D-3qJA4v.js} +0 -0
  294. /package/dist/web/assets/{hjson-C_0VMGJJ.js → hjson-DWtewcyQ.js} +0 -0
  295. /package/dist/web/assets/{hlsl-zt2PEzbg.js → hlsl-C7t6hCrO.js} +0 -0
  296. /package/dist/web/assets/{horizon-bright-CqI2qTim.js → horizon-bright-CRNyrJy8.js} +0 -0
  297. /package/dist/web/assets/{horizon-6wQfyOK0.js → horizon-zJAGUQ3j.js} +0 -0
  298. /package/dist/web/assets/{houston-BljpHDoG.js → houston-BFKa4W1-.js} +0 -0
  299. /package/dist/web/assets/{hy-XzuL55dw.js → hy-W1hNjMBM.js} +0 -0
  300. /package/dist/web/assets/{image-gallery-Cj8nd4xW.js → image-gallery-BycaVWOu.js} +0 -0
  301. /package/dist/web/assets/{imba-CqhhjBrP.js → imba-CPphaV-V.js} +0 -0
  302. /package/dist/web/assets/{ini-CiFDi6cY.js → ini-CayaZ4vW.js} +0 -0
  303. /package/dist/web/assets/{java-OsQgTL5-.js → java-BPAE_9Ej.js} +0 -0
  304. /package/dist/web/assets/{javascript-qWAOScxl.js → javascript-C5SKIVqe.js} +0 -0
  305. /package/dist/web/assets/{json-RiAKsaD1.js → json-C-0EUYmu.js} +0 -0
  306. /package/dist/web/assets/{json5-BeCnS3H2.js → json5-BqVetEZL.js} +0 -0
  307. /package/dist/web/assets/{jsonc-CbTW1Mka.js → jsonc-DnjIzkUB.js} +0 -0
  308. /package/dist/web/assets/{jsonl-BLSi_669.js → jsonl-rbV-3EqO.js} +0 -0
  309. /package/dist/web/assets/{jsonnet-C3xAggou.js → jsonnet-9hvXw4qr.js} +0 -0
  310. /package/dist/web/assets/{jssm-CLdiagC9.js → jssm-1ifXyIhu.js} +0 -0
  311. /package/dist/web/assets/{jsx-lYE1lb50.js → jsx-hPumywTY.js} +0 -0
  312. /package/dist/web/assets/{kanagawa-dragon-Cd1vcrpD.js → kanagawa-dragon-BCPjmoMO.js} +0 -0
  313. /package/dist/web/assets/{kanagawa-lotus-Dw3QKtk9.js → kanagawa-lotus-DN2VNjy7.js} +0 -0
  314. /package/dist/web/assets/{kanagawa-wave-DIq5Zv5G.js → kanagawa-wave-B8RZEsgc.js} +0 -0
  315. /package/dist/web/assets/{kdl-BfDV0825.js → kdl-CkvjWQIa.js} +0 -0
  316. /package/dist/web/assets/{kotlin-DONxR4wD.js → kotlin-D8cnRi5o.js} +0 -0
  317. /package/dist/web/assets/{kusto-BDP63Fh5.js → kusto-CmeeBEJG.js} +0 -0
  318. /package/dist/web/assets/{laserwave-BeBrWApL.js → laserwave--rtV8Mv9.js} +0 -0
  319. /package/dist/web/assets/{lean-DOZc0N1A.js → lean-CS-Pyi42.js} +0 -0
  320. /package/dist/web/assets/{less-C3H9NlDv.js → less-Ddi_7qGm.js} +0 -0
  321. /package/dist/web/assets/{lib-xrSJ4EZX.js → lib-DIrxSyLb.js} +0 -0
  322. /package/dist/web/assets/{libesm-DLBE59ul.js → libesm-CYLrAeW3.js} +0 -0
  323. /package/dist/web/assets/{light-plus-C_kTL608.js → light-plus-CrEjpkkX.js} +0 -0
  324. /package/dist/web/assets/{llvm-Dsp27U3P.js → llvm-Cm7ZXmAO.js} +0 -0
  325. /package/dist/web/assets/{log-BywQaTCy.js → log-lW2sYxtp.js} +0 -0
  326. /package/dist/web/assets/{logo-BirJgciO.js → logo-B-PiRb53.js} +0 -0
  327. /package/dist/web/assets/{luau-Btrz5kJB.js → luau-8St0pC-R.js} +0 -0
  328. /package/dist/web/assets/{make-Kl7nFQrS.js → make-DbNdhH54.js} +0 -0
  329. /package/dist/web/assets/{markdown-qsC4P8S-.js → markdown-CYocYSGd.js} +0 -0
  330. /package/dist/web/assets/{material-theme-CC__ui3p.js → material-theme-CVBF1Cbi.js} +0 -0
  331. /package/dist/web/assets/{material-theme-darker-D4FxG2FZ.js → material-theme-darker-HFrlNZD8.js} +0 -0
  332. /package/dist/web/assets/{material-theme-lighter-zGqiWcxn.js → material-theme-lighter-BM-uz2ft.js} +0 -0
  333. /package/dist/web/assets/{material-theme-ocean-CZIdTTB1.js → material-theme-ocean-PbvUez8m.js} +0 -0
  334. /package/dist/web/assets/{material-theme-palenight-CEIs0GcK.js → material-theme-palenight-B22Ck6qd.js} +0 -0
  335. /package/dist/web/assets/{matlab-Cf0aUjN9.js → matlab-GFFNzucw.js} +0 -0
  336. /package/dist/web/assets/{mdx-CIsXjH86.js → mdx-BVnJzMDx.js} +0 -0
  337. /package/dist/web/assets/{media-url-VzecHk9g.js → media-url-DBmHJRft.js} +0 -0
  338. /package/dist/web/assets/{mermaid-B06WO9Qc.js → mermaid-BlCmSTCM.js} +0 -0
  339. /package/dist/web/assets/{min-dark-z8fyp0FT.js → min-dark-B0PwlAfC.js} +0 -0
  340. /package/dist/web/assets/{min-light-Dr-qesbW.js → min-light-C_H2ABKu.js} +0 -0
  341. /package/dist/web/assets/{mipsasm-CWHzYLcE.js → mipsasm-C3rf2fo6.js} +0 -0
  342. /package/dist/web/assets/{mojo-D9zXrKmv.js → mojo-CDRuzM3o.js} +0 -0
  343. /package/dist/web/assets/{monokai-4b-AKOpX.js → monokai-KiebNy_Y.js} +0 -0
  344. /package/dist/web/assets/{moonbit-Dl4dhOZJ.js → moonbit-CdVUHoWl.js} +0 -0
  345. /package/dist/web/assets/{move-DTYKJmXy.js → move-Dq9iKZRY.js} +0 -0
  346. /package/dist/web/assets/{narrat-DnvXOS-o.js → narrat-7y5L5sGM.js} +0 -0
  347. /package/dist/web/assets/{nextflow-groovy-Di8QnEXg.js → nextflow-groovy-Cwcbkcrx.js} +0 -0
  348. /package/dist/web/assets/{night-owl-Czh0yq-H.js → night-owl-TBgLPzj4.js} +0 -0
  349. /package/dist/web/assets/{night-owl-light-D_OpZqOR.js → night-owl-light-Dehb9My2.js} +0 -0
  350. /package/dist/web/assets/{nix-2MvcjpK3.js → nix-BKj-gzoX.js} +0 -0
  351. /package/dist/web/assets/{nord-CG_r4cyk.js → nord-BF_r8PeX.js} +0 -0
  352. /package/dist/web/assets/{nushell-DINskMcU.js → nushell-CeAjk9_E.js} +0 -0
  353. /package/dist/web/assets/{objective-c-Dv7BIicR.js → objective-c-Xl1OMcDp.js} +0 -0
  354. /package/dist/web/assets/{objective-cpp-CpqsCxPb.js → objective-cpp-C4ZgzrRq.js} +0 -0
  355. /package/dist/web/assets/{ocaml-DwTsYSmW.js → ocaml-CGj8IYTq.js} +0 -0
  356. /package/dist/web/assets/{odin-G-4O4k4t.js → odin-C4veqvW2.js} +0 -0
  357. /package/dist/web/assets/{one-dark-pro-13Pv5SjI.js → one-dark-pro-gAcWejsV.js} +0 -0
  358. /package/dist/web/assets/{one-light-Bi2e86mS.js → one-light-B7E-UUXy.js} +0 -0
  359. /package/dist/web/assets/{openscad-D0WsOTij.js → openscad-C-wN9BEv.js} +0 -0
  360. /package/dist/web/assets/{pascal-DmDStuXr.js → pascal-C8WBtxMs.js} +0 -0
  361. /package/dist/web/assets/{pkl-Bl6Qjtuo.js → pkl-BBfF4G2A.js} +0 -0
  362. /package/dist/web/assets/{plastic-UeSVSjTI.js → plastic-DFOAb89P.js} +0 -0
  363. /package/dist/web/assets/{plsql-DreFC689.js → plsql-BS2CEMMV.js} +0 -0
  364. /package/dist/web/assets/{po-ZIjccxsX.js → po-BKJDtPmy.js} +0 -0
  365. /package/dist/web/assets/{poimandres-CvQHJPrI.js → poimandres-Cg3hL13e.js} +0 -0
  366. /package/dist/web/assets/{polar-BrMB0Kgh.js → polar-B9ebiXUU.js} +0 -0
  367. /package/dist/web/assets/{postcss-pgUsil1T.js → postcss-B5REwNY_.js} +0 -0
  368. /package/dist/web/assets/{powerquery-CTsZkCg_.js → powerquery-stc0Gzkf.js} +0 -0
  369. /package/dist/web/assets/{powershell-CcwVuBAp.js → powershell-jgd0ahJN.js} +0 -0
  370. /package/dist/web/assets/{prisma-spjnAI5W.js → prisma-CWuZjRhI.js} +0 -0
  371. /package/dist/web/assets/{prolog-ChCkZpDO.js → prolog-D5zNFE63.js} +0 -0
  372. /package/dist/web/assets/{proto-wVGqK4gB.js → proto-B-6RrU7n.js} +0 -0
  373. /package/dist/web/assets/{puppet-CED7iwPQ.js → puppet-DONP8TDR.js} +0 -0
  374. /package/dist/web/assets/{purescript-u9lGiQKV.js → purescript-DDJITf-A.js} +0 -0
  375. /package/dist/web/assets/{python-DeqTx6ef.js → python-bmWy9j1-.js} +0 -0
  376. /package/dist/web/assets/{qmldir-BH1uoPrX.js → qmldir-CKDwMt7X.js} +0 -0
  377. /package/dist/web/assets/{qss-CUVKA_13.js → qss-DptQQzBn.js} +0 -0
  378. /package/dist/web/assets/{r-BqdPzqYH.js → r-BorKpJ8r.js} +0 -0
  379. /package/dist/web/assets/{racket-C2eTgPN3.js → racket-BaHpYVsZ.js} +0 -0
  380. /package/dist/web/assets/{raku-uAay1sWx.js → raku-DFJIV4k_.js} +0 -0
  381. /package/dist/web/assets/{red-DTZP1ZfC.js → red-70oJGrkb.js} +0 -0
  382. /package/dist/web/assets/{reg-Cdk3YsxY.js → reg-C4g235Dv.js} +0 -0
  383. /package/dist/web/assets/{regexp-Bpa2aS7K.js → regexp-Cw1UVmti.js} +0 -0
  384. /package/dist/web/assets/{rel-bNsb1-3L.js → rel-DeLhIz5L.js} +0 -0
  385. /package/dist/web/assets/{resolve-theme-DQk_YcsT.js → resolve-theme-b_yGlUFQ.js} +0 -0
  386. /package/dist/web/assets/{riscv-DSaubByW.js → riscv-ChnTiBRK.js} +0 -0
  387. /package/dist/web/assets/{ron-DbQzYM6i.js → ron-C5IWeqDn.js} +0 -0
  388. /package/dist/web/assets/{rose-pine-C7RsprTu.js → rose-pine-DCR0ohYW.js} +0 -0
  389. /package/dist/web/assets/{rose-pine-dawn-VP976YzL.js → rose-pine-dawn-DvGZs1PR.js} +0 -0
  390. /package/dist/web/assets/{rose-pine-moon-XHZNhOqd.js → rose-pine-moon-BWACHjeS.js} +0 -0
  391. /package/dist/web/assets/{rosmsg-BVQlx0Lj.js → rosmsg-CQlIVazE.js} +0 -0
  392. /package/dist/web/assets/{run-in-terminal-bKRwuO2z.js → run-in-terminal-DHAvC1AG.js} +0 -0
  393. /package/dist/web/assets/{rust-VHaQ3rh3.js → rust-DGGVzWI8.js} +0 -0
  394. /package/dist/web/assets/{sass-CO-kMkwD.js → sass-bj1C0rFI.js} +0 -0
  395. /package/dist/web/assets/{scala-cY0GXkiz.js → scala-MU1tLKDi.js} +0 -0
  396. /package/dist/web/assets/{scheme-D4LNZE0X.js → scheme-CeGXtv7t.js} +0 -0
  397. /package/dist/web/assets/{sdbl-Bh2Fd2cn.js → sdbl-D0HLSGKp.js} +0 -0
  398. /package/dist/web/assets/{send-to-chat-S8LCNX7V.js → send-to-chat-BOyUWNKw.js} +0 -0
  399. /package/dist/web/assets/{separator-DqGg3f9c.js → separator-BzGoTlR7.js} +0 -0
  400. /package/dist/web/assets/{shellscript-KKclmCnt.js → shellscript-DkYiDvh1.js} +0 -0
  401. /package/dist/web/assets/{slack-dark-D6YQ-fqf.js → slack-dark-YqeHiGWH.js} +0 -0
  402. /package/dist/web/assets/{slack-ochin-CDf66CDj.js → slack-ochin-9Oe0DljJ.js} +0 -0
  403. /package/dist/web/assets/{smalltalk-D2OH_QIl.js → smalltalk-CaaxedR7.js} +0 -0
  404. /package/dist/web/assets/{snazzy-light-CQeF8G1K.js → snazzy-light-C8s2FHNC.js} +0 -0
  405. /package/dist/web/assets/{solarized-dark-LTPf1iLZ.js → solarized-dark-0ryY6oN3.js} +0 -0
  406. /package/dist/web/assets/{solarized-light-Ose1n88k.js → solarized-light-bltgZeNh.js} +0 -0
  407. /package/dist/web/assets/{solidity-lFuOMHki.js → solidity-DOf5HmLZ.js} +0 -0
  408. /package/dist/web/assets/{splunk-Bov-sB5S.js → splunk-D1u4WHDW.js} +0 -0
  409. /package/dist/web/assets/{sql-BKyZ6wmk.js → sql-G8uQZljX.js} +0 -0
  410. /package/dist/web/assets/{ssh-config-CqJoMGMb.js → ssh-config-rbXvly7Q.js} +0 -0
  411. /package/dist/web/assets/{stylus-Bf5pWRLI.js → stylus-Cii1iADy.js} +0 -0
  412. /package/dist/web/assets/{swift-D5d1hn_u.js → swift-DpIgonN4.js} +0 -0
  413. /package/dist/web/assets/{synthwave-84-B4c6YAgO.js → synthwave-84-DjGLzU2b.js} +0 -0
  414. /package/dist/web/assets/{system-verilog-D7fXyDsI.js → system-verilog-_Z0M0Hs1.js} +0 -0
  415. /package/dist/web/assets/{systemd-oNagzlBK.js → systemd-BhyDCh9P.js} +0 -0
  416. /package/dist/web/assets/{talonscript-C6Nqm9Dm.js → talonscript-CNchgCRD.js} +0 -0
  417. /package/dist/web/assets/{tasl-CaWy-cBX.js → tasl-m--W7Pyr.js} +0 -0
  418. /package/dist/web/assets/{tcl-C435P5Mq.js → tcl-gY-M_2BC.js} +0 -0
  419. /package/dist/web/assets/{terraform-CVDxqdPf.js → terraform-CB6CzMwo.js} +0 -0
  420. /package/dist/web/assets/{tokyo-night-Uhs17tQ3.js → tokyo-night-COh9oRYi.js} +0 -0
  421. /package/dist/web/assets/{toml-j6fPOJ6P.js → toml-Bg2bsY-v.js} +0 -0
  422. /package/dist/web/assets/{tsv-h78O6xrL.js → tsv-DceGDiJC.js} +0 -0
  423. /package/dist/web/assets/{tsx-Bol-vCrQ.js → tsx-EccDYa7i.js} +0 -0
  424. /package/dist/web/assets/{turtle-Dw8eFf04.js → turtle-C_l2JhvX.js} +0 -0
  425. /package/dist/web/assets/{typescript-Dtz7DPci.js → typescript-C1ytmMcr.js} +0 -0
  426. /package/dist/web/assets/{typespec-BIOQ7dMP.js → typespec-De2ztzG5.js} +0 -0
  427. /package/dist/web/assets/{typst-CoaGMjzu.js → typst-DNcS7gSr.js} +0 -0
  428. /package/dist/web/assets/{use-blob-url-Gfi69PtP.js → use-blob-url-De-ZtcpX.js} +0 -0
  429. /package/dist/web/assets/{use-open-team-member-CruUTqzD.js → use-open-team-member-DWhhWdmJ.js} +0 -0
  430. /package/dist/web/assets/{use-visual-viewport-rnvuooQZ.js → use-visual-viewport-D9O48HQt.js} +0 -0
  431. /package/dist/web/assets/{v-BoqFdpJ7.js → v-DSMUsdMO.js} +0 -0
  432. /package/dist/web/assets/{vala-COBpNnCC.js → vala-BEazLpkO.js} +0 -0
  433. /package/dist/web/assets/{vb-DxI86znh.js → vb-CV9pEJzW.js} +0 -0
  434. /package/dist/web/assets/{vendor-xterm-BaMOj65g.js → vendor-xterm-cuGQmUjN.js} +0 -0
  435. /package/dist/web/assets/{verilog-DcTAamuQ.js → verilog-DhXkLVMk.js} +0 -0
  436. /package/dist/web/assets/{vesper-DO298JSv.js → vesper-n4IltYq-.js} +0 -0
  437. /package/dist/web/assets/{vhdl-Dq-bDVSN.js → vhdl-CePjFbvs.js} +0 -0
  438. /package/dist/web/assets/{viml-zHTRWuQh.js → viml-ChndFsm5.js} +0 -0
  439. /package/dist/web/assets/{vitesse-black-jlYMJCBf.js → vitesse-black-BytVdvhC.js} +0 -0
  440. /package/dist/web/assets/{vitesse-dark-DS0sUlSZ.js → vitesse-dark-83Wech0N.js} +0 -0
  441. /package/dist/web/assets/{vitesse-light-HSeZ2YhG.js → vitesse-light-Xg4wbeMO.js} +0 -0
  442. /package/dist/web/assets/{vyper-BQfKVO3M.js → vyper-eW1NC3FG.js} +0 -0
  443. /package/dist/web/assets/{wasm-B6mCuI8h.js → wasm-Bhucqu1z.js} +0 -0
  444. /package/dist/web/assets/{wasm-B1xp9bLp.js → wasm-BucxKwBZ.js} +0 -0
  445. /package/dist/web/assets/{wenyan-CfpS05sP.js → wenyan-BJFBuXuH.js} +0 -0
  446. /package/dist/web/assets/{wgsl-14GDsWRD.js → wgsl-6z4FUyMK.js} +0 -0
  447. /package/dist/web/assets/{wikitext-Ccbq5EVX.js → wikitext-BoDU6teJ.js} +0 -0
  448. /package/dist/web/assets/{window-pip-registry-BEN0QNSW.js → window-pip-registry-CSLhJfpL.js} +0 -0
  449. /package/dist/web/assets/{wit-C19hb3R5.js → wit-DerMPpgt.js} +0 -0
  450. /package/dist/web/assets/{wolfram-B-ZSwGwP.js → wolfram-D78v0Ap-.js} +0 -0
  451. /package/dist/web/assets/{ws-auth-Dawx17PM.js → ws-auth-ZSZkAT6p.js} +0 -0
  452. /package/dist/web/assets/{yaml-mw_JUeio.js → yaml-C4TIgIw4.js} +0 -0
  453. /package/dist/web/assets/{zenscript-WbzDRjvF.js → zenscript-BydW-dLC.js} +0 -0
  454. /package/dist/web/assets/{zig-F0vvImTJ.js → zig-b9lTqL5E.js} +0 -0
@@ -1,9 +1,9 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-renderer-CKIBtz-k.js","assets/vendor-mermaid-BKWscKt0.js","assets/rolldown-runtime-FhOqtrmT.js","assets/vendor-ui-CaeeFO0B.js","assets/vendor-markdown-Ls5AcU91.js","assets/markdown-renderer-pDOFHEG7.js","assets/index-C_s5DxFQ.js","assets/button-BZtEJcUv.js","assets/utils-C9OjCrou.js","assets/createLucideIcon-D8pyde1A.js","assets/arrow-left-CyFcsyzD.js","assets/bot-D6sx11y0.js","assets/check-DN75Ucvz.js","assets/chevron-down-Dp0rpHb8.js","assets/chevron-right-De-Wz5Lz.js","assets/chevron-up-8PbsNiJp.js","assets/circle-BCy0AUCo.js","assets/clock-C1CQUQPZ.js","assets/sparkles-Dh-_J2Rd.js","assets/copy-BewHj66E.js","assets/database-Y3ESDK4-.js","assets/download-DG3_9xXy.js","assets/use-coarse-long-press-BmI_GVW5.js","assets/eye-off-GjXVuAOn.js","assets/eye-gWwaF4Lg.js","assets/loader-circle-DPMrnLQ2.js","assets/monitor-C835ucWH.js","assets/x-YDu4m2Iq.js","assets/api-client-oY1tC3tM.js","assets/react-X4jUntEf.js","assets/window-store-DGKf9rPG.js","assets/window-pip-registry-BEN0QNSW.js","assets/panel-store-BRrnDO_i.js","assets/context-menu-C13b1uT3.js","assets/portal-container-context-a399Hd9F.js","assets/mobile-bottom-sheet-BD5b7KJF.js","assets/use-visual-viewport-rnvuooQZ.js","assets/use-is-mobile-CYW3FJFE.js","assets/project-store-BuY7rxn_.js","assets/ws-auth-Dawx17PM.js","assets/settings-store-Brjd0QnO.js","assets/tab-store-PZsP5ZwG.js","assets/apply-theme-DxTXOAcV.js","assets/resolve-theme-DQk_YcsT.js","assets/index-nP3uxXvR.css","assets/image-gallery-Cj8nd4xW.js","assets/run-in-terminal-bKRwuO2z.js","assets/edit-diff-preview-DeHb85DN.js","assets/libesm-DLBE59ul.js"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t,x as n}from"./vendor-markdown-Ls5AcU91.js";import{t as r}from"./createLucideIcon-D8pyde1A.js";import{n as i,t as a}from"./circle-question-mark-CzR7YRc-.js";import{t as o}from"./bot-D6sx11y0.js";import{t as s}from"./chevron-down-Dp0rpHb8.js";import{t as c}from"./chevron-right-De-Wz5Lz.js";import{t as l}from"./clock-C1CQUQPZ.js";import{t as u}from"./code-DJgYrFzm.js";import{n as d,t as f}from"./sparkles-Dh-_J2Rd.js";import{t as p}from"./loader-circle-DPMrnLQ2.js";import{t as m}from"./send-Bb0jtcR6.js";import{q as h}from"./vendor-mermaid-BKWscKt0.js";import{t as g}from"./utils-C9OjCrou.js";import{t as _}from"./tab-store-PZsP5ZwG.js";import{An as v,Cr as y,Er as b,Fn as x,Ft as S,Or as C,Un as w,pr as T,r as E,tn as D}from"./index-C_s5DxFQ.js";import{t as ee}from"./use-blob-url-Gfi69PtP.js";import{r as O,t as k}from"./image-gallery-Cj8nd4xW.js";var A=r(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),j=r(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),M=r(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),N=r(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),P=r(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),F=r(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),te=r(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),I=r(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),L=e(t(),1),R=n(),ne=(0,L.lazy)(()=>h(()=>import(`./markdown-renderer-CKIBtz-k.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])));function z({content:e,maxHeight:t=`max-h-48`}){return(0,R.jsx)(L.Suspense,{fallback:(0,R.jsx)(`div`,{className:`animate-pulse h-4 bg-muted rounded`}),children:(0,R.jsx)(ne,{content:e,className:`text-text-secondary overflow-auto ${t}`})})}var B={task_assignment:{label:`task`,className:`bg-primary/20 text-primary`},idle_notification:{label:`idle`,className:`bg-warning/20 text-warning`},completion:{label:`done`,className:`bg-success/20 text-success`},shutdown_request:{label:`shutdown`,className:`bg-error/20 text-error`},shutdown_approved:{label:`shutdown ✓`,className:`bg-text-3/20 text-text-3`},shutdown_response:{label:`shutdown reply`,className:`bg-text-3/20 text-text-3`},plan_approval_request:{label:`plan review`,className:`bg-primary/20 text-primary`},plan_approval_response:{label:`plan reply`,className:`bg-primary/20 text-primary`}},re=new Set([`to`,`message`,`summary`,`notify_when_idle`,`recipient`,`content`,`type`]),V=e=>typeof e==`string`?e:e==null?``:String(e);function H(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;return typeof t.type!=`string`||!t.type?null:{type:t.type,request_id:typeof t.request_id==`string`?t.request_id:void 0,approve:typeof t.approve==`boolean`?t.approve:void 0,reason:typeof t.reason==`string`?t.reason:void 0,feedback:typeof t.feedback==`string`?t.feedback:void 0}}function ie(e){let t=e.trim();if(!t.startsWith(`{`))return null;try{return H(JSON.parse(t))}catch{return null}}function U(e){let t=V(e.to)||V(e.recipient),n=e.message??e.content,r=H(n)??ie(V(n)),i=r?``:V(n),a=V(e.type),o=r?.type||(a&&a!==`message`?a:`message`),s=V(e.summary).trim(),c=Object.entries(e).filter(([e])=>!re.has(e)).map(([e,t])=>({key:e,value:typeof t==`string`?t:JSON.stringify(t)??``}));return{to:t,summary:s||void 0,text:i,firstLine:i.split(`
3
- `).map(e=>e.trim()).find(e=>e.length>0)??``,protocol:r??void 0,kind:o,notifyWhenIdle:e.notify_when_idle===!0,extras:c}}function W(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(Array.isArray(t)){let e=V(t.find(e=>e&&typeof e==`object`&&e.type===`text`)?.text);if(!e)return null;try{t=JSON.parse(e)}catch{return null}}if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t;if(typeof n.success!=`boolean`)return null;let r=n.pin&&typeof n.pin==`object`?n.pin:null;return{ok:n.success,detail:V(n.message)||V(n.error)||void 0,peer:r&&V(r.name)||void 0,ref:r&&V(r.ref)||void 0}}function ae({kind:e}){if(e===`message`)return null;let t=B[e];return(0,R.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] ${t?.className??`bg-panel-2 text-text-3`}`,children:t?.label??e})}function oe({name:e,input:t}){let n=U(t),r=n.summary||n.firstLine||(n.protocol?n.kind:``),a=r.length>72?`${r.slice(0,72)}…`:r;return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[(0,R.jsx)(i,{className:`size-3 inline`}),` `,n.to||`unknown`,a?` · ${a}`:``]}),n.notifyWhenIdle&&(0,R.jsx)(l,{className:`size-3 inline ml-1 text-text-3`})]})}function se({input:e}){let t=U(e);return(0,R.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`text-text-subtle`,children:`To`}),(0,R.jsx)(`span`,{className:`font-medium text-text-primary`,children:t.to||`unknown`}),(0,R.jsx)(ae,{kind:t.kind}),t.notifyWhenIdle&&(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] bg-panel-2 text-text-3`,children:[(0,R.jsx)(l,{className:`size-3`}),` notify when idle`]})]}),!!t.text&&(0,R.jsx)(z,{content:t.text,maxHeight:`max-h-40`}),t.protocol&&(0,R.jsxs)(`div`,{className:`space-y-0.5 text-text-secondary`,children:[t.protocol.approve!=null&&(0,R.jsxs)(`p`,{children:[t.protocol.approve?`Approved`:`Rejected`,t.protocol.request_id?(0,R.jsxs)(`span`,{className:`text-text-subtle font-mono`,children:[` · `,t.protocol.request_id]}):null]}),!!t.protocol.reason&&(0,R.jsx)(`p`,{className:`text-text-subtle`,children:t.protocol.reason}),!!t.protocol.feedback&&(0,R.jsx)(`p`,{className:`text-text-subtle`,children:t.protocol.feedback})]}),t.extras.length>0&&(0,R.jsx)(`div`,{className:`space-y-0.5`,children:t.extras.map(e=>(0,R.jsxs)(`p`,{className:`text-text-subtle`,children:[(0,R.jsx)(`span`,{className:`font-mono`,children:e.key}),`: `,e.value]},e.key))})]})}function ce({output:e}){let[t,n]=(0,L.useState)(!1),r=W(e);return r?(0,R.jsxs)(`div`,{className:`border-t border-border pt-1.5 space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[r.ok?(0,R.jsx)(b,{className:`size-3 text-success shrink-0`}):(0,R.jsx)(A,{className:`size-3 text-error shrink-0`}),(0,R.jsx)(`span`,{className:r.ok?`text-success`:`text-error`,children:r.ok?`Delivered`:`Not delivered`}),!!r.detail&&(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[`· `,r.detail]}),!!r.ref&&(0,R.jsxs)(`span`,{className:`text-text-3 font-mono text-[10px]`,children:[`[`,r.ref,`]`]})]}),(0,R.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`flex items-center gap-1 text-[10px] text-text-subtle hover:text-text-secondary transition-colors`,children:[(0,R.jsx)(u,{className:`size-3`}),t?`Hide`:`Show`,` raw`]}),t&&(0,R.jsx)(`pre`,{className:`overflow-x-auto text-text-subtle font-mono max-h-40 whitespace-pre-wrap break-all text-[10px]`,children:e})]}):null}var le=new Set([`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.bmp`,`.avif`,`.ico`]);function ue(e){let t=e.lastIndexOf(`.`);return t===-1?!1:le.has(e.slice(t).toLowerCase())}var de=/^\[image(?: · [\d.]+(?:B|KB|MB))?\]$/;function fe(e){if(!e.startsWith(`[`))return!1;let t;try{t=JSON.parse(e)}catch{return!1}return Array.isArray(t)?t.some(e=>{let t=e;return t?.type===`text`&&typeof t.text==`string`&&de.test(t.text)}):!1}var pe=`Async agent launched successfully`;function me(e){return!!e&&e.includes(pe)}var he=`text-[var(--img-meta-label)] @max-[470px]:hidden`,ge=[`60%`,`45%`,`80%`];function _e({aspect:e,actions:t}){return(0,R.jsxs)(`div`,{className:`grid grid-cols-[132px_1fr] items-start gap-[14px] overflow-hidden rounded-lg border border-border bg-panel p-[14px] @max-[470px]:grid-cols-[64px_1fr] @max-[470px]:gap-[11px] @max-[470px]:p-[11px]`,children:[(0,R.jsx)(`div`,{className:`img-skeleton rounded-lg`,style:{aspectRatio:e}}),(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-[9px]`,children:[(0,R.jsx)(`div`,{className:`img-skeleton h-[13px] w-2/5 rounded @max-[470px]:hidden`}),(0,R.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-[14px] gap-y-[4px] font-mono text-[11.5px] @max-[470px]:grid-cols-[1fr]`,children:[`dimensions`,`size`,`path`].map((e,t)=>(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(`dt`,{className:he,children:e}),(0,R.jsx)(`dd`,{className:`flex items-center`,children:(0,R.jsx)(`span`,{className:`img-skeleton h-[11px] rounded`,style:{width:ge[t]}})})]},e))}),t]})]})}function ve({code:e,onRetry:t}){return(0,R.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-border bg-panel px-2.5 py-2 font-mono text-[12px] text-text-2`,children:[(0,R.jsx)(C,{className:`size-3 shrink-0`}),(0,R.jsxs)(`span`,{className:`truncate`,children:[`preview unavailable`,e?` · ${e}`:``]}),(0,R.jsx)(`button`,{type:`button`,onClick:t,className:`ml-auto shrink-0 text-accent`,children:`retry`})]})}var ye=.62;function be(e,t){let n=e.w/e.h;if(n>2.4)return{variant:`band`,aspect:n,fit:`contain`};let r=Math.max(ye,n),i=t/r;return e.w<t&&e.h<i?{variant:`split`,aspect:r,fit:`native`}:{variant:`split`,aspect:r,fit:n<.62?`contain`:`cover`}}function xe(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}function Se(e,t){let n=`${e.w} × ${e.h} px`;return t===`native`?`${n} · shown 1:1`:n}var G=new Map;function Ce(e){return G.get(e)}function we(e,t){G.set(e,t)}var Te=4/5,K=`text-[var(--img-meta-label)] @max-[470px]:hidden`,q=`truncate text-text @max-[470px]:text-text-2`,J=`h-[30px] @max-[470px]:h-[36px] shrink-0 rounded-[7px] px-[9px] font-mono text-[11.5px] text-text-2 bg-[var(--img-ghost)] border border-[var(--img-ghost-border)] backdrop-blur-[6px] transition-colors can-hover:hover:bg-[var(--img-ghost-hover)] can-hover:hover:border-[var(--img-ghost-hover-border)] can-hover:hover:text-text`;function Ee({filePath:e,projectName:t}){let[n,r]=(0,L.useState)(0),{blobUrl:i,blob:a,error:o,errorCode:s}=ee(e,t,void 0,n),[c,l]=(0,L.useState)(()=>Ce(e)),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(!1),m=E(e=>e.open),{openTab:h}=_(S(e=>({openTab:e.openTab}))),v=g(e);(0,L.useEffect)(()=>{if(!f)return;let e=setTimeout(()=>p(!1),1200);return()=>clearTimeout(e)},[f]);let y=t=>{let n={w:t.naturalWidth,h:t.naturalHeight};if(!n.w||!n.h)return d(!0);we(e,n),l(n)},b=()=>{d(!1),r(e=>e+1)};if(o||u)return(0,R.jsx)(`div`,{className:`border-t border-border pt-1.5`,children:(0,R.jsx)(ve,{code:u?void 0:s??void 0,onRetry:b})});let x=c?be(c,132):null,C=x?.aspect??Te,w=(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-[6px]`,children:[(0,R.jsxs)(`button`,{type:`button`,onClick:T,className:J,children:[(0,R.jsx)(`span`,{className:`@max-[470px]:hidden`,children:`open in editor`}),(0,R.jsx)(`span`,{className:`hidden @max-[470px]:inline`,children:`open`})]}),(0,R.jsx)(`button`,{type:`button`,onClick:A,className:J,children:f?`copied`:`copy path`}),(0,R.jsx)(`button`,{type:`button`,onClick:j,className:J,children:`full size`})]});function T(){t&&h({type:`editor`,title:v,metadata:{filePath:e,projectName:t},projectId:t,closable:!0})}function A(){D(e).then(()=>p(!0))}function j(e){i&&m(i,v,O(e.currentTarget))}if(!i||!x||!c)return(0,R.jsxs)(`div`,{className:`@container border-t border-border pt-1.5`,children:[i&&(0,R.jsx)(`img`,{src:i,alt:``,className:`hidden`,onLoad:e=>y(e.currentTarget),onError:()=>d(!0)}),(0,R.jsx)(_e,{aspect:C,actions:w})]});let M=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`dt`,{className:K,children:`dimensions`}),(0,R.jsx)(`dd`,{className:q,children:Se(c,x.fit)}),a&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`dt`,{className:K,children:`size`}),(0,R.jsxs)(`dd`,{className:q,children:[xe(a.size),a.type?` · ${a.type}`:``]})]}),(0,R.jsx)(`dt`,{className:K,children:`path`}),(0,R.jsx)(`dd`,{dir:`rtl`,className:`${q} text-left`,children:e})]}),N=(0,R.jsx)(`img`,{src:i,alt:v,[k]:``,onLoad:e=>y(e.currentTarget),onError:()=>d(!0),className:x.fit===`cover`?`size-full object-cover`:x.fit===`contain`?`size-full object-contain`:`max-h-full max-w-full`});return(0,R.jsx)(`div`,{className:`@container border-t border-border pt-1.5`,children:(0,R.jsxs)(`div`,{className:`relative overflow-hidden rounded-lg border border-border p-[14px] @max-[470px]:p-[11px]`,children:[(0,R.jsx)(`img`,{"aria-hidden":`true`,alt:``,src:i,className:`absolute inset-0 size-full object-cover`,style:{filter:`var(--img-backdrop)`,transform:`scale(1.3)`}}),(0,R.jsx)(`div`,{className:`absolute inset-0`,style:{background:`var(--img-veil)`}}),x.variant===`band`?(0,R.jsxs)(`div`,{className:`relative grid gap-[11px]`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:j,title:`Open ${v}`,className:`img-checkerboard w-full cursor-zoom-in overflow-hidden rounded-lg border border-[var(--img-plate-border)]`,style:{aspectRatio:x.aspect},children:N}),(0,R.jsx)(`dl`,{className:`grid grid-cols-[auto_auto_1fr] gap-x-[18px] font-mono text-[11.5px] [&_dt]:hidden`,children:M}),w]}):(0,R.jsxs)(`div`,{className:`relative grid grid-cols-[132px_1fr] items-start gap-[14px] @max-[470px]:grid-cols-[64px_1fr] @max-[470px]:gap-[11px]`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:j,title:`Open ${v}`,className:`cursor-zoom-in overflow-hidden rounded-lg border border-[var(--img-plate-border)] bg-[var(--img-plate)] shadow-[var(--img-plate-shadow)] ${x.fit===`cover`?``:`img-checkerboard flex items-center justify-center`}`,style:{aspectRatio:x.aspect},children:N}),(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-[9px]`,children:[(0,R.jsx)(`p`,{className:`truncate text-[13px] font-semibold text-text @max-[470px]:hidden`,children:v}),(0,R.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-[14px] gap-y-[4px] font-mono text-[11.5px] @max-[470px]:grid-cols-[1fr]`,children:M}),w]})]})]})})}function Y(e,t){if(e!==`Agent`&&e!==`Task`)return null;let n=t.name;return typeof n==`string`&&n.trim()?n.trim():null}function De(e,t,n=!1){if(t&&(e===`Bash`||e===`PowerShell`))return{Icon:x,cls:`bg-error/15 text-error`};if(n)return{Icon:v,cls:`bg-accent-2/15 text-accent-2`};switch(e){case`Read`:case`Glob`:case`LS`:return{Icon:P,cls:`bg-accent-wash text-primary`};case`Grep`:case`Search`:case`WebSearch`:case`ToolSearch`:return{Icon:w,cls:`bg-accent-wash text-primary`};case`WebFetch`:case`Fetch`:return{Icon:T,cls:`bg-info/15 text-info`};case`Edit`:case`MultiEdit`:case`NotebookEdit`:return{Icon:M,cls:`bg-accent-2/15 text-accent-2`};case`Write`:return{Icon:N,cls:`bg-success/15 text-success`};case`Bash`:case`PowerShell`:return{Icon:x,cls:`bg-panel-2 text-text-2`};case`TodoWrite`:return{Icon:te,cls:`bg-warning/15 text-warning`};case`Task`:case`Agent`:return{Icon:o,cls:`bg-accent-wash text-primary`};case`SendMessage`:return{Icon:m,cls:`bg-info/15 text-info`};case`AskUserQuestion`:return{Icon:a,cls:`bg-accent-wash text-primary`};case`ExitPlanMode`:return{Icon:j,cls:`bg-accent-wash text-primary`};case`Skill`:return{Icon:f,cls:`bg-accent-2/15 text-accent-2`};case`ImageGen`:return{Icon:F,cls:`bg-accent-2/15 text-accent-2`};default:return{Icon:u,cls:`bg-panel-2 text-text-2`}}}function Oe(e){let t=e.type===`approval_request`;return{toolName:e.type===`tool_use`?e.tool:t?e.tool??`Tool`:`Tool`,input:e.type===`tool_use`?e.input:t?e.input??{}:{}}}var ke=new Set([`Read`,`ImageGen`]);function X(e){if(e.type!==`tool_use`||!ke.has(e.tool))return null;let t=e.input?.file_path;return typeof t!=`string`||!/^(\/|[A-Za-z]:[/\\])/.test(t)?null:ue(t)?t:null}function Z({tool:e,result:t,completed:n,projectName:r,bashPartialOutput:i}){let[a,o]=(0,L.useState)(()=>{let n=(e.type,e.tool),r=t?.type===`tool_result`&&!!t.isError;return(n===`Edit`||n===`MultiEdit`)&&!r?!0:!!X(e)});if(e.type===`error`)return(0,R.jsxs)(`div`,{className:`flex items-center gap-2 rounded bg-error/10 border border-error/20 px-2 py-1.5 text-xs text-error`,children:[(0,R.jsx)(C,{className:`size-3`}),(0,R.jsx)(`span`,{children:e.message})]});let{toolName:l,input:u}=Oe(e),d=t?.type===`tool_result`,f=d&&!!t.isError,m=l===`AskUserQuestion`&&!!u?.answers,h=e.type===`approval_request`&&e.approved!=null,g=(l===`Agent`||l===`Task`)&&e.type===`tool_use`,_=g?e.children:void 0,v=_&&_.length>0,y=g&&e.type===`tool_use`?e.bgStatus:void 0,x=g&&(y!=null||d&&!f&&me(String(t.output??``)))&&y==null,S=y===`failed`||y===`stopped`,w=x?!1:d||m||h||n,T=[`Edit`,`MultiEdit`,`Write`,`NotebookEdit`].includes(l),E=X(e),D=d&&fe(String(t.output??``)),ee=!!E,O=e.type===`tool_use`?e.toolUseId:void 0,k=(l===`Bash`||l===`PowerShell`)&&!d&&O?i?.current?.get(O):void 0,j=!!k;(0,L.useEffect)(()=>{j&&!a&&o(!0)},[j]);let M=(0,L.useRef)(!1);(0,L.useEffect)(()=>{f&&(l===`Edit`||l===`MultiEdit`)&&!M.current&&(M.current=!0,o(!1))},[f,l]);let{Icon:N,cls:P}=De(l,f,!!Y(l,u)),F=l===`AskUserQuestion`||l===`ExitPlanMode`||g;return(0,R.jsxs)(`div`,{"data-tool-ref":O,className:`rounded-[11px] border overflow-hidden text-xs bg-panel ${F?`border-accent-wash-border`:`border-border`}`,children:[(0,R.jsxs)(`button`,{onClick:()=>o(!a),className:`flex items-center gap-2.5 px-2.5 py-2 w-full text-left hover:bg-panel-2/40 transition-colors min-w-0`,children:[(0,R.jsx)(`span`,{className:`inline-flex items-center justify-center size-6 rounded-[7px] shrink-0 ${P}`,children:(0,R.jsx)(N,{className:`size-3.5`})}),(0,R.jsx)(`span`,{className:`truncate text-text font-medium`,children:(0,R.jsx)(Ae,{name:l,input:u})}),(0,R.jsxs)(`span`,{className:`ml-auto flex items-center gap-2 shrink-0`,children:[j&&(0,R.jsxs)(`span`,{className:`text-[10px] text-warning`,children:[k.lineCount,` line`,k.lineCount===1?``:`s`,` streaming…`]}),v&&!j&&(0,R.jsxs)(`span`,{className:`text-[10px] text-text-3 font-mono`,children:[_.length,` steps`]}),x&&(0,R.jsx)(`span`,{className:`text-[10px] text-primary`,children:`running…`}),f||S?(0,R.jsx)(A,{className:`size-3.5 text-error`}):w?(0,R.jsx)(b,{className:`size-3.5 text-success`}):(0,R.jsx)(p,{className:`size-3.5 text-primary animate-spin`}),a?(0,R.jsx)(s,{className:`size-3 text-text-3`}):(0,R.jsx)(c,{className:`size-3 text-text-3`})]})]}),a&&(0,R.jsxs)(`div`,{className:`px-2 pb-2 space-y-1.5 select-text`,children:[(e.type===`tool_use`||e.type===`approval_request`)&&(0,R.jsx)(je,{name:l,input:u,projectName:r,toolUseId:O}),k&&(0,R.jsx)(Ie,{content:k.content,lineCount:k.lineCount}),v&&(0,R.jsx)(Fe,{events:_,projectName:r}),E&&(0,R.jsx)(Ee,{filePath:E,projectName:r??``}),d&&!(T&&!f)&&!(D&&!f)&&!(ee&&!f)&&(0,R.jsx)(Ne,{toolName:l,output:t.output})]})]})}function Ae({name:e,input:t}){let n=e=>String(e??``);switch(e){case`Read`:case`Write`:case`Edit`:case`MultiEdit`:case`NotebookEdit`:return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle`,children:g(n(t.file_path))})]});case`Bash`:case`PowerShell`:{let r=t.description?n(t.description):n(t.command);return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle${t.description?``:` font-mono`}`,children:$(r,60)})]})}case`Glob`:return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsx)(`span`,{className:`font-mono text-text-subtle`,children:n(t.pattern)})]});case`Grep`:return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsx)(`span`,{className:`font-mono text-text-subtle`,children:$(n(t.pattern),40)})]});case`WebSearch`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(w,{className:`size-3 inline`}),` `,e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.query),50)})]});case`WebFetch`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(T,{className:`size-3 inline`}),` `,e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.url),50)})]});case`ToolSearch`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(w,{className:`size-3 inline`}),` `,e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.query),50)})]});case`ImageGen`:{let e=(n(t.prompt).split(`
4
- `).find(e=>e.trim())??``)||g(n(t.file_path));return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(F,{className:`size-3 inline`}),` Image`,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[` `,$(e,50)]})]})}case`Agent`:case`Task`:{let r=Y(e,t),i=$(n(t.description||t.prompt),r?44:60);return(0,R.jsxs)(R.Fragment,{children:[!r&&(0,R.jsx)(o,{className:`size-3 inline`}),` `,e,` `,r&&(0,R.jsx)(`span`,{className:`text-text-primary font-medium`,children:r}),(0,R.jsx)(`span`,{className:`text-text-subtle`,children:r?` · ${i}`:i})]})}case`SendMessage`:return(0,R.jsx)(oe,{name:e,input:t});case`TodoWrite`:{let n=Array.isArray(t.todos)?t.todos:[],r=n.filter(e=>e.status===`completed`).length;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(I,{className:`size-3 inline`}),` `,e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[r,`/`,n.length,` done`]})]})}case`AskUserQuestion`:{let n=Array.isArray(t.questions)?t.questions:[],r=!!t.answers;return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[n.length,` question`,n.length===1?``:`s`,r?` ✓`:``]})]})}case`ScheduleWakeup`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(l,{className:`size-3 inline`}),` `,e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[`in `,Be(Number(t.delaySeconds)),t.reason?` — ${$(n(t.reason),50)}`:``]})]});case`TaskCreate`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(I,{className:`size-3 inline`}),` `,e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.subject),60)})]});case`TaskUpdate`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(I,{className:`size-3 inline`}),` `,e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[`#`,n(t.taskId),` → `,n(t.status)]})]});case`TaskStop`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(I,{className:`size-3 inline`}),` `,e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[`#`,n(t.taskId),` stopped`]})]});default:return(0,R.jsx)(R.Fragment,{children:e})}}function je({name:e,input:t,projectName:n,toolUseId:r}){let i=e=>String(e??``),{openTab:a}=_(S(e=>({openTab:e.openTab}))),o=e=>{n&&a({type:`editor`,title:g(e),metadata:{filePath:e,projectName:n},projectId:n,closable:!0})},s=(e,t,r)=>{a({type:`git-diff`,title:`Diff ${g(e)}`,metadata:{filePath:e,projectName:n,original:t,modified:r},projectId:n??null,closable:!0})};switch(e){case`Bash`:case`PowerShell`:return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[!!t.description&&(0,R.jsx)(`p`,{className:`text-text-subtle italic`,children:i(t.description)}),(0,R.jsx)(`pre`,{className:`font-mono text-text-secondary overflow-x-auto whitespace-pre-wrap break-all`,children:i(t.command)})]});case`Read`:case`Write`:case`Edit`:case`MultiEdit`:case`NotebookEdit`:{let n=i(t.notebook_path||t.file_path),a=e===`Edit`&&(!!t.old_string||!!t.new_string),c=e=>r?`${r}-${e}`:void 0;return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,R.jsxs)(`button`,{type:`button`,className:`font-mono text-text-secondary break-all hover:text-primary hover:underline text-left flex items-center gap-1 min-w-0`,onClick:()=>o(n),title:`Open file in editor`,children:[(0,R.jsx)(y,{className:`size-3 shrink-0`}),n]}),a&&(0,R.jsxs)(`button`,{type:`button`,className:`text-text-subtle hover:text-primary hover:underline flex items-center gap-1 shrink-0 whitespace-nowrap`,onClick:()=>s(n,i(t.old_string),i(t.new_string)),title:`View diff in new tab`,children:[(0,R.jsx)(d,{className:`size-3 shrink-0`}),`View Diff`]})]}),a&&(0,R.jsx)(`div`,{"data-edit-ref":c(0),children:(0,R.jsx)(ze,{oldStr:i(t.old_string),newStr:i(t.new_string),filePath:n})}),e===`MultiEdit`&&Array.isArray(t.edits)&&(0,R.jsx)(`div`,{className:`space-y-1.5`,children:t.edits.map((e,t)=>(0,R.jsxs)(`div`,{"data-edit-ref":c(t),className:`space-y-0.5`,children:[(0,R.jsxs)(`p`,{className:`text-text-subtle text-[10px]`,children:[`Edit `,t+1]}),(0,R.jsx)(ze,{oldStr:i(e.old_string),newStr:i(e.new_string),filePath:n})]},t))}),e===`Write`&&!!t.content&&(0,R.jsx)(`pre`,{"data-edit-ref":c(0),className:`font-mono text-text-subtle overflow-x-auto max-h-32 whitespace-pre-wrap`,children:$(i(t.content),300)})]})}case`Glob`:return(0,R.jsxs)(`p`,{className:`font-mono text-text-secondary`,children:[i(t.pattern),t.path?` in ${i(t.path)}`:``]});case`Grep`:return(0,R.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,R.jsxs)(`p`,{className:`font-mono text-text-secondary`,children:[`/`,i(t.pattern),`/`]}),!!t.path&&(0,R.jsxs)(`p`,{className:`text-text-subtle`,children:[`in `,i(t.path)]})]});case`TodoWrite`:return(0,R.jsx)(Me,{todos:t.todos??[]});case`Agent`:case`Task`:{let n=Y(e,t);return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[!!n&&(0,R.jsxs)(`p`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`text-text-subtle`,children:`Name`}),(0,R.jsx)(`span`,{className:`font-medium text-text-primary`,children:n}),(0,R.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] bg-accent-2/15 text-accent-2`,children:`teammate`}),t.isolation===`worktree`&&(0,R.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] bg-panel-2 text-text-3`,children:`worktree`})]}),!!t.description&&(0,R.jsx)(`p`,{className:`text-text-secondary font-medium`,children:i(t.description)}),!!t.subagent_type&&(0,R.jsxs)(`p`,{className:`text-text-subtle`,children:[`Type: `,i(t.subagent_type)]}),!!t.prompt&&(0,R.jsx)(z,{content:i(t.prompt),maxHeight:`max-h-48`})]})}case`SendMessage`:return(0,R.jsx)(se,{input:t});case`ToolSearch`:return(0,R.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,R.jsx)(`p`,{className:`font-mono text-text-secondary`,children:i(t.query)}),!!t.max_results&&(0,R.jsxs)(`p`,{className:`text-text-subtle`,children:[`Max results: `,i(t.max_results)]})]});case`WebFetch`:return(0,R.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,R.jsxs)(`a`,{href:i(t.url),target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-primary hover:underline break-all flex items-center gap-1`,children:[(0,R.jsx)(T,{className:`size-3 shrink-0`}),i(t.url)]}),!!t.prompt&&(0,R.jsx)(`p`,{className:`text-text-subtle`,children:$(i(t.prompt),100)})]});case`AskUserQuestion`:{let e=t.questions??[],n=t.answers??{};return(0,R.jsx)(`div`,{className:`space-y-2`,children:e.map((e,t)=>(0,R.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,R.jsxs)(`p`,{className:`text-text-primary font-medium`,children:[e.header?`${e.header}: `:``,e.question]}),(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.options.map((t,r)=>(0,R.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-xs border ${(n[e.question]??``).split(`, `).includes(t.label)?`border-primary bg-primary/20 text-text-primary`:`border-border text-text-subtle`}`,children:t.label},r))}),n[e.question]&&(0,R.jsxs)(`p`,{className:`text-foreground text-xs`,children:[`Answer: `,n[e.question]]})]},t))})}case`ScheduleWakeup`:{let e=Number(t.delaySeconds)||0;return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`p`,{className:`text-text-secondary`,children:[(0,R.jsx)(l,{className:`size-3 inline mr-1`}),`Wake in `,(0,R.jsx)(`span`,{className:`font-medium text-text-primary`,children:Be(e)}),(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[` (`,e,`s)`]})]}),!!t.reason&&(0,R.jsx)(`p`,{className:`text-text-secondary italic`,children:i(t.reason)}),!!t.prompt&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-text-subtle text-[10px] mb-0.5`,children:`Prompt on wake`}),(0,R.jsx)(z,{content:i(t.prompt),maxHeight:`max-h-48`})]})]})}case`TaskCreate`:return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsx)(`p`,{className:`text-text-primary font-medium`,children:i(t.subject)}),!!t.description&&(0,R.jsx)(`p`,{className:`text-text-subtle`,children:i(t.description)}),!!t.activeForm&&(0,R.jsx)(`p`,{className:`text-text-subtle italic`,children:i(t.activeForm)})]});case`TaskUpdate`:return(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsxs)(`span`,{className:`font-mono text-text-secondary`,children:[`#`,i(t.taskId)]}),(0,R.jsx)(Q,{status:i(t.status)})]});case`TaskStop`:return(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsxs)(`span`,{className:`font-mono text-text-secondary`,children:[`#`,i(t.taskId)]}),(0,R.jsx)(Q,{status:`stopped`})]});case`ImageGen`:return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[!!t.prompt&&(0,R.jsx)(`p`,{className:`text-text-secondary whitespace-pre-wrap`,children:i(t.prompt)}),t.transparentBackground===!0&&(0,R.jsx)(`p`,{className:`text-text-subtle`,children:`Transparent background`})]});default:return(0,R.jsx)(`pre`,{className:`overflow-x-auto text-text-secondary font-mono whitespace-pre-wrap break-all`,children:JSON.stringify(t,null,2)})}}function Q({status:e}){return(0,R.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] border ${e===`completed`?`text-success border-success/30 bg-success/10`:e===`in_progress`?`text-warning border-warning/30 bg-warning/10`:`text-text-subtle border-border bg-surface`}`,children:e})}function Me({todos:e}){return(0,R.jsx)(`div`,{className:`space-y-0.5`,children:e.map((e,t)=>(0,R.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,R.jsx)(`span`,{className:`shrink-0 mt-0.5 ${e.status===`completed`?`text-success`:e.status===`in_progress`?`text-warning`:`text-text-subtle`}`,children:e.status===`completed`?`✓`:e.status===`in_progress`?`▶`:`○`}),(0,R.jsx)(`span`,{className:e.status===`completed`?`line-through text-text-subtle`:`text-text-secondary`,children:e.content})]},t))})}function Ne({toolName:e,output:t}){let[n,r]=(0,L.useState)(!1),i=(0,L.useMemo)(()=>{if(e!==`Agent`&&e!==`Task`)return null;try{let e=JSON.parse(t);if(Array.isArray(e)){let t=e.filter(e=>e.type===`text`&&e.text).map(e=>e.text).join(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-renderer-Dy4Vz3VW.js","assets/vendor-mermaid-CKKtYuTV.js","assets/rolldown-runtime-FhOqtrmT.js","assets/vendor-ui-CaeeFO0B.js","assets/vendor-markdown-Ls5AcU91.js","assets/markdown-renderer-BtrHvth9.js","assets/index-DB-bD6Cx.js","assets/button-2WCAS8dI.js","assets/utils-C9OjCrou.js","assets/createLucideIcon-D8pyde1A.js","assets/arrow-left-CyFcsyzD.js","assets/bot-D6sx11y0.js","assets/check-DN75Ucvz.js","assets/chevron-down-Dp0rpHb8.js","assets/chevron-right-De-Wz5Lz.js","assets/chevron-up-8PbsNiJp.js","assets/circle-BCy0AUCo.js","assets/clock-C1CQUQPZ.js","assets/sparkles-Dh-_J2Rd.js","assets/copy-BewHj66E.js","assets/database-Y3ESDK4-.js","assets/download-DG3_9xXy.js","assets/use-coarse-long-press-BmI_GVW5.js","assets/eye-off-GjXVuAOn.js","assets/eye-gWwaF4Lg.js","assets/loader-circle-DPMrnLQ2.js","assets/monitor-C835ucWH.js","assets/x-YDu4m2Iq.js","assets/api-client-oY1tC3tM.js","assets/react-X4jUntEf.js","assets/window-store-DGKf9rPG.js","assets/window-pip-registry-CSLhJfpL.js","assets/panel-store-BRrnDO_i.js","assets/context-menu-C13b1uT3.js","assets/portal-container-context-a399Hd9F.js","assets/mobile-bottom-sheet-B3uDlD79.js","assets/use-visual-viewport-D9O48HQt.js","assets/use-is-mobile-CYW3FJFE.js","assets/project-store-BuY7rxn_.js","assets/ws-auth-ZSZkAT6p.js","assets/settings-store-DWUx3865.js","assets/streaming-store-DDst3zA7.js","assets/tab-store-PZsP5ZwG.js","assets/apply-theme-r8tKDrCR.js","assets/resolve-theme-b_yGlUFQ.js","assets/index-N-pnuwFP.css","assets/image-gallery-BycaVWOu.js","assets/run-in-terminal-DHAvC1AG.js","assets/edit-diff-preview-DUgmjNre.js","assets/libesm-CYLrAeW3.js"])))=>i.map(i=>d[i]);
2
+ import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t,x as n}from"./vendor-markdown-Ls5AcU91.js";import{t as r}from"./createLucideIcon-D8pyde1A.js";import{n as i,t as a}from"./circle-question-mark-CzR7YRc-.js";import{t as o}from"./bot-D6sx11y0.js";import{t as s}from"./chevron-down-Dp0rpHb8.js";import{t as c}from"./chevron-right-De-Wz5Lz.js";import{t as l}from"./clock-C1CQUQPZ.js";import{t as u}from"./code-DJgYrFzm.js";import{n as d,t as f}from"./sparkles-Dh-_J2Rd.js";import{t as p}from"./loader-circle-DPMrnLQ2.js";import{t as m}from"./send-Bb0jtcR6.js";import{q as h}from"./vendor-mermaid-CKKtYuTV.js";import{t as g}from"./utils-C9OjCrou.js";import{t as _}from"./tab-store-PZsP5ZwG.js";import{An as v,Dr as y,Fn as b,It as x,Wn as S,kr as C,mr as w,nn as T,r as E,wr as D}from"./index-DB-bD6Cx.js";import{t as ee}from"./use-blob-url-De-ZtcpX.js";import{r as O,t as k}from"./image-gallery-BycaVWOu.js";var A=r(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),j=r(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),M=r(`file-pen`,[[`path`,{d:`M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34`,key:`o6klzx`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z`,key:`zhnas1`}]]),N=r(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),P=r(`file-search`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`circle`,{cx:`11.5`,cy:`14.5`,r:`2.5`,key:`1bq0ko`}],[`path`,{d:`M13.3 16.3 15 18`,key:`2quom7`}]]),F=r(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),te=r(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),I=r(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),L=e(t(),1),R=n(),ne=(0,L.lazy)(()=>h(()=>import(`./markdown-renderer-Dy4Vz3VW.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])));function z({content:e,maxHeight:t=`max-h-48`}){return(0,R.jsx)(L.Suspense,{fallback:(0,R.jsx)(`div`,{className:`animate-pulse h-4 bg-muted rounded`}),children:(0,R.jsx)(ne,{content:e,className:`text-text-secondary overflow-auto ${t}`})})}var B={task_assignment:{label:`task`,className:`bg-primary/20 text-primary`},idle_notification:{label:`idle`,className:`bg-warning/20 text-warning`},completion:{label:`done`,className:`bg-success/20 text-success`},shutdown_request:{label:`shutdown`,className:`bg-error/20 text-error`},shutdown_approved:{label:`shutdown ✓`,className:`bg-text-3/20 text-text-3`},shutdown_response:{label:`shutdown reply`,className:`bg-text-3/20 text-text-3`},plan_approval_request:{label:`plan review`,className:`bg-primary/20 text-primary`},plan_approval_response:{label:`plan reply`,className:`bg-primary/20 text-primary`}},re=new Set([`to`,`message`,`summary`,`notify_when_idle`,`recipient`,`content`,`type`]),V=e=>typeof e==`string`?e:e==null?``:String(e);function H(e){if(!e||typeof e!=`object`||Array.isArray(e))return null;let t=e;return typeof t.type!=`string`||!t.type?null:{type:t.type,request_id:typeof t.request_id==`string`?t.request_id:void 0,approve:typeof t.approve==`boolean`?t.approve:void 0,reason:typeof t.reason==`string`?t.reason:void 0,feedback:typeof t.feedback==`string`?t.feedback:void 0}}function ie(e){let t=e.trim();if(!t.startsWith(`{`))return null;try{return H(JSON.parse(t))}catch{return null}}function U(e){let t=V(e.to)||V(e.recipient),n=e.message??e.content,r=H(n)??ie(V(n)),i=r?``:V(n),a=V(e.type),o=r?.type||(a&&a!==`message`?a:`message`),s=V(e.summary).trim(),c=Object.entries(e).filter(([e])=>!re.has(e)).map(([e,t])=>({key:e,value:typeof t==`string`?t:JSON.stringify(t)??``}));return{to:t,summary:s||void 0,text:i,firstLine:i.split(`
3
+ `).map(e=>e.trim()).find(e=>e.length>0)??``,protocol:r??void 0,kind:o,notifyWhenIdle:e.notify_when_idle===!0,extras:c}}function W(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(Array.isArray(t)){let e=V(t.find(e=>e&&typeof e==`object`&&e.type===`text`)?.text);if(!e)return null;try{t=JSON.parse(e)}catch{return null}}if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t;if(typeof n.success!=`boolean`)return null;let r=n.pin&&typeof n.pin==`object`?n.pin:null;return{ok:n.success,detail:V(n.message)||V(n.error)||void 0,peer:r&&V(r.name)||void 0,ref:r&&V(r.ref)||void 0}}function ae({kind:e}){if(e===`message`)return null;let t=B[e];return(0,R.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] ${t?.className??`bg-panel-2 text-text-3`}`,children:t?.label??e})}function oe({name:e,input:t}){let n=U(t),r=n.summary||n.firstLine||(n.protocol?n.kind:``),a=r.length>72?`${r.slice(0,72)}…`:r;return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[(0,R.jsx)(i,{className:`size-3 inline`}),` `,n.to||`unknown`,a?` · ${a}`:``]}),n.notifyWhenIdle&&(0,R.jsx)(l,{className:`size-3 inline ml-1 text-text-3`})]})}function se({input:e}){let t=U(e);return(0,R.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`text-text-subtle`,children:`To`}),(0,R.jsx)(`span`,{className:`font-medium text-text-primary`,children:t.to||`unknown`}),(0,R.jsx)(ae,{kind:t.kind}),t.notifyWhenIdle&&(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] bg-panel-2 text-text-3`,children:[(0,R.jsx)(l,{className:`size-3`}),` notify when idle`]})]}),!!t.text&&(0,R.jsx)(z,{content:t.text,maxHeight:`max-h-40`}),t.protocol&&(0,R.jsxs)(`div`,{className:`space-y-0.5 text-text-secondary`,children:[t.protocol.approve!=null&&(0,R.jsxs)(`p`,{children:[t.protocol.approve?`Approved`:`Rejected`,t.protocol.request_id?(0,R.jsxs)(`span`,{className:`text-text-subtle font-mono`,children:[` · `,t.protocol.request_id]}):null]}),!!t.protocol.reason&&(0,R.jsx)(`p`,{className:`text-text-subtle`,children:t.protocol.reason}),!!t.protocol.feedback&&(0,R.jsx)(`p`,{className:`text-text-subtle`,children:t.protocol.feedback})]}),t.extras.length>0&&(0,R.jsx)(`div`,{className:`space-y-0.5`,children:t.extras.map(e=>(0,R.jsxs)(`p`,{className:`text-text-subtle`,children:[(0,R.jsx)(`span`,{className:`font-mono`,children:e.key}),`: `,e.value]},e.key))})]})}function ce({output:e}){let[t,n]=(0,L.useState)(!1),r=W(e);return r?(0,R.jsxs)(`div`,{className:`border-t border-border pt-1.5 space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[r.ok?(0,R.jsx)(y,{className:`size-3 text-success shrink-0`}):(0,R.jsx)(A,{className:`size-3 text-error shrink-0`}),(0,R.jsx)(`span`,{className:r.ok?`text-success`:`text-error`,children:r.ok?`Delivered`:`Not delivered`}),!!r.detail&&(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[`· `,r.detail]}),!!r.ref&&(0,R.jsxs)(`span`,{className:`text-text-3 font-mono text-[10px]`,children:[`[`,r.ref,`]`]})]}),(0,R.jsxs)(`button`,{type:`button`,onClick:()=>n(!t),className:`flex items-center gap-1 text-[10px] text-text-subtle hover:text-text-secondary transition-colors`,children:[(0,R.jsx)(u,{className:`size-3`}),t?`Hide`:`Show`,` raw`]}),t&&(0,R.jsx)(`pre`,{className:`overflow-x-auto text-text-subtle font-mono max-h-40 whitespace-pre-wrap break-all text-[10px]`,children:e})]}):null}var le=new Set([`.png`,`.jpg`,`.jpeg`,`.gif`,`.webp`,`.bmp`,`.avif`,`.ico`]);function ue(e){let t=e.lastIndexOf(`.`);return t===-1?!1:le.has(e.slice(t).toLowerCase())}var de=/^\[image(?: · [\d.]+(?:B|KB|MB))?\]$/;function fe(e){if(!e.startsWith(`[`))return!1;let t;try{t=JSON.parse(e)}catch{return!1}return Array.isArray(t)?t.some(e=>{let t=e;return t?.type===`text`&&typeof t.text==`string`&&de.test(t.text)}):!1}var pe=`Async agent launched successfully`;function me(e){return!!e&&e.includes(pe)}var he=`text-[var(--img-meta-label)] @max-[470px]:hidden`,ge=[`60%`,`45%`,`80%`];function _e({aspect:e,actions:t}){return(0,R.jsxs)(`div`,{className:`grid grid-cols-[132px_1fr] items-start gap-[14px] overflow-hidden rounded-lg border border-border bg-panel p-[14px] @max-[470px]:grid-cols-[64px_1fr] @max-[470px]:gap-[11px] @max-[470px]:p-[11px]`,children:[(0,R.jsx)(`div`,{className:`img-skeleton rounded-lg`,style:{aspectRatio:e}}),(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-[9px]`,children:[(0,R.jsx)(`div`,{className:`img-skeleton h-[13px] w-2/5 rounded @max-[470px]:hidden`}),(0,R.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-[14px] gap-y-[4px] font-mono text-[11.5px] @max-[470px]:grid-cols-[1fr]`,children:[`dimensions`,`size`,`path`].map((e,t)=>(0,R.jsxs)(L.Fragment,{children:[(0,R.jsx)(`dt`,{className:he,children:e}),(0,R.jsx)(`dd`,{className:`flex items-center`,children:(0,R.jsx)(`span`,{className:`img-skeleton h-[11px] rounded`,style:{width:ge[t]}})})]},e))}),t]})]})}function ve({code:e,onRetry:t}){return(0,R.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-border bg-panel px-2.5 py-2 font-mono text-[12px] text-text-2`,children:[(0,R.jsx)(C,{className:`size-3 shrink-0`}),(0,R.jsxs)(`span`,{className:`truncate`,children:[`preview unavailable`,e?` · ${e}`:``]}),(0,R.jsx)(`button`,{type:`button`,onClick:t,className:`ml-auto shrink-0 text-accent`,children:`retry`})]})}var ye=.62;function be(e,t){let n=e.w/e.h;if(n>2.4)return{variant:`band`,aspect:n,fit:`contain`};let r=Math.max(ye,n),i=t/r;return e.w<t&&e.h<i?{variant:`split`,aspect:r,fit:`native`}:{variant:`split`,aspect:r,fit:n<.62?`contain`:`cover`}}function xe(e){return e>=1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:e>=1024?`${Math.round(e/1024)} KB`:`${e} B`}function Se(e,t){let n=`${e.w} × ${e.h} px`;return t===`native`?`${n} · shown 1:1`:n}var G=new Map;function Ce(e){return G.get(e)}function we(e,t){G.set(e,t)}var Te=4/5,K=`text-[var(--img-meta-label)] @max-[470px]:hidden`,q=`truncate text-text @max-[470px]:text-text-2`,J=`h-[30px] @max-[470px]:h-[36px] shrink-0 rounded-[7px] px-[9px] font-mono text-[11.5px] text-text-2 bg-[var(--img-ghost)] border border-[var(--img-ghost-border)] backdrop-blur-[6px] transition-colors can-hover:hover:bg-[var(--img-ghost-hover)] can-hover:hover:border-[var(--img-ghost-hover-border)] can-hover:hover:text-text`;function Ee({filePath:e,projectName:t}){let[n,r]=(0,L.useState)(0),{blobUrl:i,blob:a,error:o,errorCode:s}=ee(e,t,void 0,n),[c,l]=(0,L.useState)(()=>Ce(e)),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(!1),m=E(e=>e.open),{openTab:h}=_(x(e=>({openTab:e.openTab}))),v=g(e);(0,L.useEffect)(()=>{if(!f)return;let e=setTimeout(()=>p(!1),1200);return()=>clearTimeout(e)},[f]);let y=t=>{let n={w:t.naturalWidth,h:t.naturalHeight};if(!n.w||!n.h)return d(!0);we(e,n),l(n)},b=()=>{d(!1),r(e=>e+1)};if(o||u)return(0,R.jsx)(`div`,{className:`border-t border-border pt-1.5`,children:(0,R.jsx)(ve,{code:u?void 0:s??void 0,onRetry:b})});let S=c?be(c,132):null,C=S?.aspect??Te,w=(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-[6px]`,children:[(0,R.jsxs)(`button`,{type:`button`,onClick:D,className:J,children:[(0,R.jsx)(`span`,{className:`@max-[470px]:hidden`,children:`open in editor`}),(0,R.jsx)(`span`,{className:`hidden @max-[470px]:inline`,children:`open`})]}),(0,R.jsx)(`button`,{type:`button`,onClick:A,className:J,children:f?`copied`:`copy path`}),(0,R.jsx)(`button`,{type:`button`,onClick:j,className:J,children:`full size`})]});function D(){t&&h({type:`editor`,title:v,metadata:{filePath:e,projectName:t},projectId:t,closable:!0})}function A(){T(e).then(()=>p(!0))}function j(e){i&&m(i,v,O(e.currentTarget))}if(!i||!S||!c)return(0,R.jsxs)(`div`,{className:`@container border-t border-border pt-1.5`,children:[i&&(0,R.jsx)(`img`,{src:i,alt:``,className:`hidden`,onLoad:e=>y(e.currentTarget),onError:()=>d(!0)}),(0,R.jsx)(_e,{aspect:C,actions:w})]});let M=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`dt`,{className:K,children:`dimensions`}),(0,R.jsx)(`dd`,{className:q,children:Se(c,S.fit)}),a&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`dt`,{className:K,children:`size`}),(0,R.jsxs)(`dd`,{className:q,children:[xe(a.size),a.type?` · ${a.type}`:``]})]}),(0,R.jsx)(`dt`,{className:K,children:`path`}),(0,R.jsx)(`dd`,{dir:`rtl`,className:`${q} text-left`,children:e})]}),N=(0,R.jsx)(`img`,{src:i,alt:v,[k]:``,onLoad:e=>y(e.currentTarget),onError:()=>d(!0),className:S.fit===`cover`?`size-full object-cover`:S.fit===`contain`?`size-full object-contain`:`max-h-full max-w-full`});return(0,R.jsx)(`div`,{className:`@container border-t border-border pt-1.5`,children:(0,R.jsxs)(`div`,{className:`relative overflow-hidden rounded-lg border border-border p-[14px] @max-[470px]:p-[11px]`,children:[(0,R.jsx)(`img`,{"aria-hidden":`true`,alt:``,src:i,className:`absolute inset-0 size-full object-cover`,style:{filter:`var(--img-backdrop)`,transform:`scale(1.3)`}}),(0,R.jsx)(`div`,{className:`absolute inset-0`,style:{background:`var(--img-veil)`}}),S.variant===`band`?(0,R.jsxs)(`div`,{className:`relative grid gap-[11px]`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:j,title:`Open ${v}`,className:`img-checkerboard w-full cursor-zoom-in overflow-hidden rounded-lg border border-[var(--img-plate-border)]`,style:{aspectRatio:S.aspect},children:N}),(0,R.jsx)(`dl`,{className:`grid grid-cols-[auto_auto_1fr] gap-x-[18px] font-mono text-[11.5px] [&_dt]:hidden`,children:M}),w]}):(0,R.jsxs)(`div`,{className:`relative grid grid-cols-[132px_1fr] items-start gap-[14px] @max-[470px]:grid-cols-[64px_1fr] @max-[470px]:gap-[11px]`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:j,title:`Open ${v}`,className:`cursor-zoom-in overflow-hidden rounded-lg border border-[var(--img-plate-border)] bg-[var(--img-plate)] shadow-[var(--img-plate-shadow)] ${S.fit===`cover`?``:`img-checkerboard flex items-center justify-center`}`,style:{aspectRatio:S.aspect},children:N}),(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-[9px]`,children:[(0,R.jsx)(`p`,{className:`truncate text-[13px] font-semibold text-text @max-[470px]:hidden`,children:v}),(0,R.jsx)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-[14px] gap-y-[4px] font-mono text-[11.5px] @max-[470px]:grid-cols-[1fr]`,children:M}),w]})]})]})})}function Y(e,t){if(e!==`Agent`&&e!==`Task`)return null;let n=t.name;return typeof n==`string`&&n.trim()?n.trim():null}function De(e,t,n=!1){if(t&&(e===`Bash`||e===`PowerShell`))return{Icon:b,cls:`bg-error/15 text-error`};if(n)return{Icon:v,cls:`bg-accent-2/15 text-accent-2`};switch(e){case`Read`:case`Glob`:case`LS`:return{Icon:P,cls:`bg-accent-wash text-primary`};case`Grep`:case`Search`:case`WebSearch`:case`ToolSearch`:return{Icon:S,cls:`bg-accent-wash text-primary`};case`WebFetch`:case`Fetch`:return{Icon:w,cls:`bg-info/15 text-info`};case`Edit`:case`MultiEdit`:case`NotebookEdit`:return{Icon:M,cls:`bg-accent-2/15 text-accent-2`};case`Write`:return{Icon:N,cls:`bg-success/15 text-success`};case`Bash`:case`PowerShell`:return{Icon:b,cls:`bg-panel-2 text-text-2`};case`TodoWrite`:return{Icon:te,cls:`bg-warning/15 text-warning`};case`Task`:case`Agent`:return{Icon:o,cls:`bg-accent-wash text-primary`};case`SendMessage`:return{Icon:m,cls:`bg-info/15 text-info`};case`AskUserQuestion`:return{Icon:a,cls:`bg-accent-wash text-primary`};case`ExitPlanMode`:return{Icon:j,cls:`bg-accent-wash text-primary`};case`Skill`:return{Icon:f,cls:`bg-accent-2/15 text-accent-2`};case`ImageGen`:return{Icon:F,cls:`bg-accent-2/15 text-accent-2`};default:return{Icon:u,cls:`bg-panel-2 text-text-2`}}}function Oe(e){let t=e.type===`approval_request`;return{toolName:e.type===`tool_use`?e.tool:t?e.tool??`Tool`:`Tool`,input:e.type===`tool_use`?e.input:t?e.input??{}:{}}}var ke=new Set([`Read`,`ImageGen`]);function X(e){if(e.type!==`tool_use`||!ke.has(e.tool))return null;let t=e.input?.file_path;return typeof t!=`string`||!/^(\/|[A-Za-z]:[/\\])/.test(t)?null:ue(t)?t:null}function Z({tool:e,result:t,completed:n,projectName:r,bashPartialOutput:i}){let[a,o]=(0,L.useState)(()=>{let n=(e.type,e.tool),r=t?.type===`tool_result`&&!!t.isError;return(n===`Edit`||n===`MultiEdit`)&&!r?!0:!!X(e)});if(e.type===`error`)return(0,R.jsxs)(`div`,{className:`flex items-center gap-2 rounded bg-error/10 border border-error/20 px-2 py-1.5 text-xs text-error`,children:[(0,R.jsx)(C,{className:`size-3`}),(0,R.jsx)(`span`,{children:e.message})]});let{toolName:l,input:u}=Oe(e),d=t?.type===`tool_result`,f=d&&!!t.isError,m=l===`AskUserQuestion`&&!!u?.answers,h=e.type===`approval_request`&&e.approved!=null,g=(l===`Agent`||l===`Task`)&&e.type===`tool_use`,_=g?e.children:void 0,v=_&&_.length>0,b=g&&e.type===`tool_use`?e.bgStatus:void 0,x=g&&(b!=null||d&&!f&&me(String(t.output??``)))&&b==null,S=b===`failed`||b===`stopped`,w=x?!1:d||m||h||n,T=[`Edit`,`MultiEdit`,`Write`,`NotebookEdit`].includes(l),E=X(e),D=d&&fe(String(t.output??``)),ee=!!E,O=e.type===`tool_use`?e.toolUseId:void 0,k=(l===`Bash`||l===`PowerShell`)&&!d&&O?i?.current?.get(O):void 0,j=!!k;(0,L.useEffect)(()=>{j&&!a&&o(!0)},[j]);let M=(0,L.useRef)(!1);(0,L.useEffect)(()=>{f&&(l===`Edit`||l===`MultiEdit`)&&!M.current&&(M.current=!0,o(!1))},[f,l]);let{Icon:N,cls:P}=De(l,f,!!Y(l,u)),F=l===`AskUserQuestion`||l===`ExitPlanMode`||g;return(0,R.jsxs)(`div`,{"data-tool-ref":O,className:`rounded-[11px] border overflow-hidden text-xs bg-panel ${F?`border-accent-wash-border`:`border-border`}`,children:[(0,R.jsxs)(`button`,{onClick:()=>o(!a),className:`flex items-center gap-2.5 px-2.5 py-2 w-full text-left hover:bg-panel-2/40 transition-colors min-w-0`,children:[(0,R.jsx)(`span`,{className:`inline-flex items-center justify-center size-6 rounded-[7px] shrink-0 ${P}`,children:(0,R.jsx)(N,{className:`size-3.5`})}),(0,R.jsx)(`span`,{className:`truncate text-text font-medium`,children:(0,R.jsx)(Ae,{name:l,input:u})}),(0,R.jsxs)(`span`,{className:`ml-auto flex items-center gap-2 shrink-0`,children:[j&&(0,R.jsxs)(`span`,{className:`text-[10px] text-warning`,children:[k.lineCount,` line`,k.lineCount===1?``:`s`,` streaming…`]}),v&&!j&&(0,R.jsxs)(`span`,{className:`text-[10px] text-text-3 font-mono`,children:[_.length,` steps`]}),x&&(0,R.jsx)(`span`,{className:`text-[10px] text-primary`,children:`running…`}),f||S?(0,R.jsx)(A,{className:`size-3.5 text-error`}):w?(0,R.jsx)(y,{className:`size-3.5 text-success`}):(0,R.jsx)(p,{className:`size-3.5 text-primary animate-spin`}),a?(0,R.jsx)(s,{className:`size-3 text-text-3`}):(0,R.jsx)(c,{className:`size-3 text-text-3`})]})]}),a&&(0,R.jsxs)(`div`,{className:`px-2 pb-2 space-y-1.5 select-text`,children:[(e.type===`tool_use`||e.type===`approval_request`)&&(0,R.jsx)(je,{name:l,input:u,projectName:r,toolUseId:O}),k&&(0,R.jsx)(Ie,{content:k.content,lineCount:k.lineCount}),v&&(0,R.jsx)(Fe,{events:_,projectName:r}),E&&(0,R.jsx)(Ee,{filePath:E,projectName:r??``}),d&&!(T&&!f)&&!(D&&!f)&&!(ee&&!f)&&(0,R.jsx)(Ne,{toolName:l,output:t.output})]})]})}function Ae({name:e,input:t}){let n=e=>String(e??``);switch(e){case`Read`:case`Write`:case`Edit`:case`MultiEdit`:case`NotebookEdit`:return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle`,children:g(n(t.file_path))})]});case`Bash`:case`PowerShell`:{let r=t.description?n(t.description):n(t.command);return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle${t.description?``:` font-mono`}`,children:$(r,60)})]})}case`Glob`:return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsx)(`span`,{className:`font-mono text-text-subtle`,children:n(t.pattern)})]});case`Grep`:return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsx)(`span`,{className:`font-mono text-text-subtle`,children:$(n(t.pattern),40)})]});case`WebSearch`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(S,{className:`size-3 inline`}),` `,e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.query),50)})]});case`WebFetch`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(w,{className:`size-3 inline`}),` `,e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.url),50)})]});case`ToolSearch`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(S,{className:`size-3 inline`}),` `,e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.query),50)})]});case`ImageGen`:{let e=(n(t.prompt).split(`
4
+ `).find(e=>e.trim())??``)||g(n(t.file_path));return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(F,{className:`size-3 inline`}),` Image`,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[` `,$(e,50)]})]})}case`Agent`:case`Task`:{let r=Y(e,t),i=$(n(t.description||t.prompt),r?44:60);return(0,R.jsxs)(R.Fragment,{children:[!r&&(0,R.jsx)(o,{className:`size-3 inline`}),` `,e,` `,r&&(0,R.jsx)(`span`,{className:`text-text-primary font-medium`,children:r}),(0,R.jsx)(`span`,{className:`text-text-subtle`,children:r?` · ${i}`:i})]})}case`SendMessage`:return(0,R.jsx)(oe,{name:e,input:t});case`TodoWrite`:{let n=Array.isArray(t.todos)?t.todos:[],r=n.filter(e=>e.status===`completed`).length;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(I,{className:`size-3 inline`}),` `,e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[r,`/`,n.length,` done`]})]})}case`AskUserQuestion`:{let n=Array.isArray(t.questions)?t.questions:[],r=!!t.answers;return(0,R.jsxs)(R.Fragment,{children:[e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[n.length,` question`,n.length===1?``:`s`,r?` ✓`:``]})]})}case`ScheduleWakeup`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(l,{className:`size-3 inline`}),` `,e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[`in `,Be(Number(t.delaySeconds)),t.reason?` — ${$(n(t.reason),50)}`:``]})]});case`TaskCreate`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(I,{className:`size-3 inline`}),` `,e,` `,(0,R.jsx)(`span`,{className:`text-text-subtle`,children:$(n(t.subject),60)})]});case`TaskUpdate`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(I,{className:`size-3 inline`}),` `,e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[`#`,n(t.taskId),` → `,n(t.status)]})]});case`TaskStop`:return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(I,{className:`size-3 inline`}),` `,e,` `,(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[`#`,n(t.taskId),` stopped`]})]});default:return(0,R.jsx)(R.Fragment,{children:e})}}function je({name:e,input:t,projectName:n,toolUseId:r}){let i=e=>String(e??``),{openTab:a}=_(x(e=>({openTab:e.openTab}))),o=e=>{n&&a({type:`editor`,title:g(e),metadata:{filePath:e,projectName:n},projectId:n,closable:!0})},s=(e,t,r)=>{a({type:`git-diff`,title:`Diff ${g(e)}`,metadata:{filePath:e,projectName:n,original:t,modified:r},projectId:n??null,closable:!0})};switch(e){case`Bash`:case`PowerShell`:return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[!!t.description&&(0,R.jsx)(`p`,{className:`text-text-subtle italic`,children:i(t.description)}),(0,R.jsx)(`pre`,{className:`font-mono text-text-secondary overflow-x-auto whitespace-pre-wrap break-all`,children:i(t.command)})]});case`Read`:case`Write`:case`Edit`:case`MultiEdit`:case`NotebookEdit`:{let n=i(t.notebook_path||t.file_path),a=e===`Edit`&&(!!t.old_string||!!t.new_string),c=e=>r?`${r}-${e}`:void 0;return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,R.jsxs)(`button`,{type:`button`,className:`font-mono text-text-secondary break-all hover:text-primary hover:underline text-left flex items-center gap-1 min-w-0`,onClick:()=>o(n),title:`Open file in editor`,children:[(0,R.jsx)(D,{className:`size-3 shrink-0`}),n]}),a&&(0,R.jsxs)(`button`,{type:`button`,className:`text-text-subtle hover:text-primary hover:underline flex items-center gap-1 shrink-0 whitespace-nowrap`,onClick:()=>s(n,i(t.old_string),i(t.new_string)),title:`View diff in new tab`,children:[(0,R.jsx)(d,{className:`size-3 shrink-0`}),`View Diff`]})]}),a&&(0,R.jsx)(`div`,{"data-edit-ref":c(0),children:(0,R.jsx)(ze,{oldStr:i(t.old_string),newStr:i(t.new_string),filePath:n})}),e===`MultiEdit`&&Array.isArray(t.edits)&&(0,R.jsx)(`div`,{className:`space-y-1.5`,children:t.edits.map((e,t)=>(0,R.jsxs)(`div`,{"data-edit-ref":c(t),className:`space-y-0.5`,children:[(0,R.jsxs)(`p`,{className:`text-text-subtle text-[10px]`,children:[`Edit `,t+1]}),(0,R.jsx)(ze,{oldStr:i(e.old_string),newStr:i(e.new_string),filePath:n})]},t))}),e===`Write`&&!!t.content&&(0,R.jsx)(`pre`,{"data-edit-ref":c(0),className:`font-mono text-text-subtle overflow-x-auto max-h-32 whitespace-pre-wrap`,children:$(i(t.content),300)})]})}case`Glob`:return(0,R.jsxs)(`p`,{className:`font-mono text-text-secondary`,children:[i(t.pattern),t.path?` in ${i(t.path)}`:``]});case`Grep`:return(0,R.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,R.jsxs)(`p`,{className:`font-mono text-text-secondary`,children:[`/`,i(t.pattern),`/`]}),!!t.path&&(0,R.jsxs)(`p`,{className:`text-text-subtle`,children:[`in `,i(t.path)]})]});case`TodoWrite`:return(0,R.jsx)(Me,{todos:t.todos??[]});case`Agent`:case`Task`:{let n=Y(e,t);return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[!!n&&(0,R.jsxs)(`p`,{className:`flex flex-wrap items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`text-text-subtle`,children:`Name`}),(0,R.jsx)(`span`,{className:`font-medium text-text-primary`,children:n}),(0,R.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] bg-accent-2/15 text-accent-2`,children:`teammate`}),t.isolation===`worktree`&&(0,R.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] bg-panel-2 text-text-3`,children:`worktree`})]}),!!t.description&&(0,R.jsx)(`p`,{className:`text-text-secondary font-medium`,children:i(t.description)}),!!t.subagent_type&&(0,R.jsxs)(`p`,{className:`text-text-subtle`,children:[`Type: `,i(t.subagent_type)]}),!!t.prompt&&(0,R.jsx)(z,{content:i(t.prompt),maxHeight:`max-h-48`})]})}case`SendMessage`:return(0,R.jsx)(se,{input:t});case`ToolSearch`:return(0,R.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,R.jsx)(`p`,{className:`font-mono text-text-secondary`,children:i(t.query)}),!!t.max_results&&(0,R.jsxs)(`p`,{className:`text-text-subtle`,children:[`Max results: `,i(t.max_results)]})]});case`WebFetch`:return(0,R.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,R.jsxs)(`a`,{href:i(t.url),target:`_blank`,rel:`noopener noreferrer`,className:`font-mono text-primary hover:underline break-all flex items-center gap-1`,children:[(0,R.jsx)(w,{className:`size-3 shrink-0`}),i(t.url)]}),!!t.prompt&&(0,R.jsx)(`p`,{className:`text-text-subtle`,children:$(i(t.prompt),100)})]});case`AskUserQuestion`:{let e=t.questions??[],n=t.answers??{};return(0,R.jsx)(`div`,{className:`space-y-2`,children:e.map((e,t)=>(0,R.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,R.jsxs)(`p`,{className:`text-text-primary font-medium`,children:[e.header?`${e.header}: `:``,e.question]}),(0,R.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.options.map((t,r)=>(0,R.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-xs border ${(n[e.question]??``).split(`, `).includes(t.label)?`border-primary bg-primary/20 text-text-primary`:`border-border text-text-subtle`}`,children:t.label},r))}),n[e.question]&&(0,R.jsxs)(`p`,{className:`text-foreground text-xs`,children:[`Answer: `,n[e.question]]})]},t))})}case`ScheduleWakeup`:{let e=Number(t.delaySeconds)||0;return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsxs)(`p`,{className:`text-text-secondary`,children:[(0,R.jsx)(l,{className:`size-3 inline mr-1`}),`Wake in `,(0,R.jsx)(`span`,{className:`font-medium text-text-primary`,children:Be(e)}),(0,R.jsxs)(`span`,{className:`text-text-subtle`,children:[` (`,e,`s)`]})]}),!!t.reason&&(0,R.jsx)(`p`,{className:`text-text-secondary italic`,children:i(t.reason)}),!!t.prompt&&(0,R.jsxs)(`div`,{children:[(0,R.jsx)(`p`,{className:`text-text-subtle text-[10px] mb-0.5`,children:`Prompt on wake`}),(0,R.jsx)(z,{content:i(t.prompt),maxHeight:`max-h-48`})]})]})}case`TaskCreate`:return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[(0,R.jsx)(`p`,{className:`text-text-primary font-medium`,children:i(t.subject)}),!!t.description&&(0,R.jsx)(`p`,{className:`text-text-subtle`,children:i(t.description)}),!!t.activeForm&&(0,R.jsx)(`p`,{className:`text-text-subtle italic`,children:i(t.activeForm)})]});case`TaskUpdate`:return(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsxs)(`span`,{className:`font-mono text-text-secondary`,children:[`#`,i(t.taskId)]}),(0,R.jsx)(Q,{status:i(t.status)})]});case`TaskStop`:return(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,R.jsxs)(`span`,{className:`font-mono text-text-secondary`,children:[`#`,i(t.taskId)]}),(0,R.jsx)(Q,{status:`stopped`})]});case`ImageGen`:return(0,R.jsxs)(`div`,{className:`space-y-1`,children:[!!t.prompt&&(0,R.jsx)(`p`,{className:`text-text-secondary whitespace-pre-wrap`,children:i(t.prompt)}),t.transparentBackground===!0&&(0,R.jsx)(`p`,{className:`text-text-subtle`,children:`Transparent background`})]});default:return(0,R.jsx)(`pre`,{className:`overflow-x-auto text-text-secondary font-mono whitespace-pre-wrap break-all`,children:JSON.stringify(t,null,2)})}}function Q({status:e}){return(0,R.jsx)(`span`,{className:`inline-block rounded px-1.5 py-0.5 text-[10px] border ${e===`completed`?`text-success border-success/30 bg-success/10`:e===`in_progress`?`text-warning border-warning/30 bg-warning/10`:`text-text-subtle border-border bg-surface`}`,children:e})}function Me({todos:e}){return(0,R.jsx)(`div`,{className:`space-y-0.5`,children:e.map((e,t)=>(0,R.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,R.jsx)(`span`,{className:`shrink-0 mt-0.5 ${e.status===`completed`?`text-success`:e.status===`in_progress`?`text-warning`:`text-text-subtle`}`,children:e.status===`completed`?`✓`:e.status===`in_progress`?`▶`:`○`}),(0,R.jsx)(`span`,{className:e.status===`completed`?`line-through text-text-subtle`:`text-text-secondary`,children:e.content})]},t))})}function Ne({toolName:e,output:t}){let[n,r]=(0,L.useState)(!1),i=(0,L.useMemo)(()=>{if(e!==`Agent`&&e!==`Task`)return null;try{let e=JSON.parse(t);if(Array.isArray(e)){let t=e.filter(e=>e.type===`text`&&e.text).map(e=>e.text).join(`
5
5
 
6
6
  `);if(t)return t}if(typeof e==`string`)return e}catch{if(t&&!t.startsWith(`[{`))return t}return null},[e,t]);return e===`SendMessage`&&W(t)?(0,R.jsx)(ce,{output:t}):i?(0,R.jsxs)(`div`,{className:`border-t border-border pt-1.5 space-y-1`,children:[(0,R.jsx)(z,{content:i,maxHeight:`max-h-60`}),(0,R.jsxs)(`button`,{type:`button`,onClick:()=>r(!n),className:`flex items-center gap-1 text-[10px] text-text-subtle hover:text-text-secondary transition-colors`,children:[(0,R.jsx)(u,{className:`size-3`}),n?`Hide`:`Show`,` raw`]}),n&&(0,R.jsx)(`pre`,{className:`overflow-x-auto text-text-subtle font-mono max-h-40 whitespace-pre-wrap break-all text-[10px]`,children:t})]}):(0,R.jsx)(Pe,{output:t})}function Pe({output:e}){let t=e.split(`
7
7
  `).length,n=t>3||e.length>200,[r,i]=(0,L.useState)(n);return(0,R.jsxs)(`div`,{className:`border-t border-border pt-1.5`,children:[n&&(0,R.jsxs)(`button`,{type:`button`,onClick:()=>i(!r),className:`flex items-center gap-1 text-[10px] text-text-subtle hover:text-text-secondary transition-colors mb-1`,children:[r?(0,R.jsx)(c,{className:`size-3`}):(0,R.jsx)(s,{className:`size-3`}),`Output (`,t,` lines)`]}),(0,R.jsx)(`pre`,{className:`overflow-x-auto text-text-subtle font-mono whitespace-pre-wrap break-all ${r?`max-h-16 overflow-hidden`:`max-h-60`}`,children:e})]})}function Fe({events:e,projectName:t,className:n}){let r=[],i=``;for(let t of e)if(t.type===`text`)i+=t.content;else if(t.type===`tool_use`)i&&=(r.push({kind:`text`,content:i}),``),r.push({kind:`tool`,tool:t});else if(t.type===`tool_result`){let e=t.toolUseId,n=e?r.find(t=>t.kind===`tool`&&t.tool.type===`tool_use`&&t.tool.toolUseId===e&&!t.result):r.findLast(e=>e.kind===`tool`&&!e.result);n&&(n.result=t)}i&&r.push({kind:`text`,content:i});let a=(0,L.useRef)(null),o=(0,L.useRef)(!1);return(0,L.useEffect)(()=>{a.current&&!o.current&&(a.current.scrollTop=a.current.scrollHeight)},[r.length]),(0,R.jsx)(`div`,{ref:a,onScroll:e=>{let t=e.currentTarget;o.current=t.scrollTop+t.clientHeight<t.scrollHeight-20},className:n??`border-l-2 border-accent/20 pl-2 space-y-1 mt-1 max-h-64 md:max-h-96 overflow-y-auto`,children:r.map((e,n)=>e.kind===`text`?(0,R.jsx)(`div`,{className:`text-text-secondary text-[11px]`,children:(0,R.jsx)(z,{content:e.content,maxHeight:`max-h-24`})},`st-${n}`):(0,R.jsx)(Z,{tool:e.tool,result:e.result,completed:!!e.result,projectName:t},`sc-${n}`))})}function Ie({content:e,lineCount:t}){let n=(0,L.useRef)(null),r=(0,L.useRef)(!1);return(0,L.useEffect)(()=>{n.current&&!r.current&&(n.current.scrollTop=n.current.scrollHeight)},[e]),(0,R.jsxs)(`div`,{className:`border-t border-border pt-1.5`,children:[(0,R.jsxs)(`div`,{className:`flex items-center gap-1 text-[10px] text-warning mb-1`,children:[(0,R.jsx)(p,{className:`size-3 animate-spin`}),(0,R.jsxs)(`span`,{children:[`Output (`,t,` line`,t===1?``:`s`,`, streaming...)`]})]}),(0,R.jsx)(`pre`,{ref:n,onScroll:e=>{let t=e.currentTarget;r.current=t.scrollTop+t.clientHeight<t.scrollHeight-20},className:`overflow-x-auto overflow-y-auto max-h-60 text-text-subtle font-mono whitespace-pre-wrap break-all text-[11px]`,children:e.split(`
8
8
  `).slice(-200).join(`
9
- `)})]})}var Le=h(()=>import(`./edit-diff-preview-DeHb85DN.js`),__vite__mapDeps([47,2,4,48])),Re=(0,L.lazy)(()=>Le);function ze(e){return(0,R.jsx)(L.Suspense,{fallback:(0,R.jsx)(`div`,{className:`animate-pulse h-8 bg-muted rounded`}),children:(0,R.jsx)(Re,{...e})})}function $(e,t=50){return e?e.length>t?e.slice(0,t)+`…`:e:``}function Be(e){if(!Number.isFinite(e)||e<=0)return`0s`;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.round(e%60),i=[];return t&&i.push(`${t}h`),n&&i.push(`${n}m`),(r||i.length===0)&&i.push(`${r}s`),i.join(` `)}export{j as a,I as i,Z as n,A as o,B as r,Fe as t};
9
+ `)})]})}var Le=h(()=>import(`./edit-diff-preview-DUgmjNre.js`),__vite__mapDeps([48,2,4,49])),Re=(0,L.lazy)(()=>Le);function ze(e){return(0,R.jsx)(L.Suspense,{fallback:(0,R.jsx)(`div`,{className:`animate-pulse h-8 bg-muted rounded`}),children:(0,R.jsx)(Re,{...e})})}function $(e,t=50){return e?e.length>t?e.slice(0,t)+`…`:e:``}function Be(e){if(!Number.isFinite(e)||e<=0)return`0s`;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.round(e%60),i=[];return t&&i.push(`${t}h`),n&&i.push(`${n}m`),(r||i.length===0)&&i.push(`${r}s`),i.join(` `)}export{j as a,I as i,Z as n,A as o,B as r,Fe as t};
@@ -0,0 +1 @@
1
+ import{P as e}from"./vendor-mermaid-CKKtYuTV.js";export{e as createTreemapServices};
@@ -1 +1 @@
1
- import{t as e}from"./javascript-qWAOScxl.js";import{t}from"./css-Cerub-yB.js";import{t as n}from"./html-BwpKIE6V.js";import{t as r}from"./xml-DHaWgpya.js";import{t as i}from"./typescript-Dtz7DPci.js";import{t as a}from"./sql-BKyZ6wmk.js";import{t as o}from"./glsl-DsFJvtg5.js";var s=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string, L:source.vue -comment -string, L:source.svelte -comment -string, L:source.php -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-css","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)css)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)css))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)css) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.css"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-css","embeddedLangs":["typescript","css","javascript"]}')),c=[...i,...t,...e,s],l=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-glsl","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)glsl)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)glsl))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)glsl) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-glsl","embeddedLangs":["typescript","glsl","javascript"]}')),u=[...i,...o,...e,l],d=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-html","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(html|template|inline-html|inline-template)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*(html|template|inline-html|inline-template))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(html|template|inline-html|inline-template) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]},{"begin":"(\\\\$\\\\(`)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(`\\\\))","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-html","embeddedLangs":["typescript","html","javascript"]}')),f=[...i,...n,...e,d],p=Object.freeze(JSON.parse('{"injectTo":["source.ts","source.js"],"injectionSelector":"L:source -comment -string","name":"es-tag-sql","patterns":[{"__COMMENT__":"Literals tagged with an sql function (including optional accessors and types), e.g. sql<User>(\'user-by-id\')`SELECT ...`","begin":"(?:([$_[:alpha:]][$_[:alnum:]]*)(?:\\\\s*(\\\\??\\\\.)\\\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*\\\\s*(\\\\??\\\\.))?\\\\s*(#?(?i)sql|sqlFragment(?-i))\\\\s*(?=(?:(\\\\?\\\\.\\\\s*)|(!))?((<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?\\\\())","beginCaptures":{"1":{"name":"meta.function-call.ts variable.other.object.ts"},"2":{"name":"meta.function-call.ts punctuation.accessor.optional.ts"},"3":{"name":"meta.function-call.ts variable.other.object.ts"},"4":{"name":"meta.function-call.ts punctuation.accessor.optional.ts"},"5":{"name":"meta.function-call.ts entity.name.function.ts"}},"end":"(?<=(`|\\\\)\\\\s*[^`\\\\s]))","patterns":[{"include":"source.ts#comment"},{"include":"source.ts#function-call-optionals"},{"include":"source.ts#type-arguments"},{"include":"source.ts#paren-expression"},{"include":"#embedded-sql"}]},{"__COMMENT__":"Literals tagged with an sql comment, e.g. /*sql*/`SELECT ...`","begin":"(/\\\\*\\\\s*(?i)sql(?-i)\\\\s*\\\\*/)\\\\s*(?=`)","beginCaptures":{"1":{"name":"comment.block.ts"}},"end":"(?<=`)","patterns":[{"include":"#embedded-sql"}]},{"__COMMENT__":"Literals tagged with sql (including optional accessors and types), e.g. my.object?.sql<User>`SELECT ...`. This is based on the 1st #template-call pattern in TypeScript.tmLanguage.json","begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)(#?(?i)sql|sqlFragment(?-i))(<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","end":"(?<=`)","name":"string.template.ts","patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)(#?(?i)sql|sqlFragment(?-i)))","end":"(?=(<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","patterns":[{"include":"source.ts#support-function-call-identifiers"},{"match":"(#?(?i)sql|sqlFragment(?-i))","name":"entity.name.function.tagged-template.ts"}]},{"include":"source.ts#type-arguments"},{"include":"#embedded-sql"}]},{"__COMMENT__":"Literals tagged with sql (including optional types), e.g. sql<User>`SELECT ...`. This is based on the 2nd #template-call pattern in TypeScript.tmLanguage.json","begin":"\\\\b((?i)sql|sqlFragment(?-i))\\\\s*(?=(<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?<=`)","name":"string.template.ts","patterns":[{"include":"source.ts#type-arguments"},{"include":"#embedded-sql"}]},{"__COMMENT__":"Literals tagged with sql, e.g. sql`SELECT ...`. This is based on the 2nd #template pattern in TypeScript.tmLanguage.json","begin":"\\\\b((?i)sql|sqlFragment(?-i))\\\\s*(?=`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?<=`)","name":"string.template.ts","patterns":[{"include":"#embedded-sql"}]}],"repository":{"embedded-sql":{"begin":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.template.begin.js"}},"contentName":"meta.embedded.block.sql","end":"`","endCaptures":{"0":{"name":"punctuation.definition.string.template.end.js"}},"name":"string.template.ts","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]}},"scopeName":"inline.tagged-template-sql","embeddedLangs":["typescript","sql"]}')),m=[...i,...a,p],h=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-xml","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(xml|svg|inline-svg|inline-xml)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(\\\\s*((?:|inline-)xml))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(xml|svg|inline-svg|inline-xml) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"text.xml"}]}],"scopeName":"inline.es6-xml","embeddedLangs":["xml"]}')),g=[...r,h],_=Object.freeze(JSON.parse(`{"displayName":"TypeScript with Tags","name":"ts-tags","patterns":[{"include":"source.ts"}],"scopeName":"source.ts.tags","embeddedLangs":["typescript","es-tag-css","es-tag-glsl","es-tag-html","es-tag-sql","es-tag-xml"],"aliases":["lit"]}`)),v=[...i,...c,...u,...f,...m,...g,_];export{v as default};
1
+ import{t as e}from"./javascript-C5SKIVqe.js";import{t}from"./css-BuxbQOHL.js";import{t as n}from"./html-C5X4urn_.js";import{t as r}from"./xml-oyvc1920.js";import{t as i}from"./typescript-C1ytmMcr.js";import{t as a}from"./sql-G8uQZljX.js";import{t as o}from"./glsl-DXhkG9dU.js";var s=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string, L:source.vue -comment -string, L:source.svelte -comment -string, L:source.php -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-css","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)css)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)css))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)css) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.css"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-css","embeddedLangs":["typescript","css","javascript"]}')),c=[...i,...t,...e,s],l=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-glsl","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)glsl)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)glsl))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)glsl) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-glsl","embeddedLangs":["typescript","glsl","javascript"]}')),u=[...i,...o,...e,l],d=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-html","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(html|template|inline-html|inline-template)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*(html|template|inline-html|inline-template))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(html|template|inline-html|inline-template) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]},{"begin":"(\\\\$\\\\(`)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(`\\\\))","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-html","embeddedLangs":["typescript","html","javascript"]}')),f=[...i,...n,...e,d],p=Object.freeze(JSON.parse('{"injectTo":["source.ts","source.js"],"injectionSelector":"L:source -comment -string","name":"es-tag-sql","patterns":[{"__COMMENT__":"Literals tagged with an sql function (including optional accessors and types), e.g. sql<User>(\'user-by-id\')`SELECT ...`","begin":"(?:([$_[:alpha:]][$_[:alnum:]]*)(?:\\\\s*(\\\\??\\\\.)\\\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*\\\\s*(\\\\??\\\\.))?\\\\s*(#?(?i)sql|sqlFragment(?-i))\\\\s*(?=(?:(\\\\?\\\\.\\\\s*)|(!))?((<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?\\\\())","beginCaptures":{"1":{"name":"meta.function-call.ts variable.other.object.ts"},"2":{"name":"meta.function-call.ts punctuation.accessor.optional.ts"},"3":{"name":"meta.function-call.ts variable.other.object.ts"},"4":{"name":"meta.function-call.ts punctuation.accessor.optional.ts"},"5":{"name":"meta.function-call.ts entity.name.function.ts"}},"end":"(?<=(`|\\\\)\\\\s*[^`\\\\s]))","patterns":[{"include":"source.ts#comment"},{"include":"source.ts#function-call-optionals"},{"include":"source.ts#type-arguments"},{"include":"source.ts#paren-expression"},{"include":"#embedded-sql"}]},{"__COMMENT__":"Literals tagged with an sql comment, e.g. /*sql*/`SELECT ...`","begin":"(/\\\\*\\\\s*(?i)sql(?-i)\\\\s*\\\\*/)\\\\s*(?=`)","beginCaptures":{"1":{"name":"comment.block.ts"}},"end":"(?<=`)","patterns":[{"include":"#embedded-sql"}]},{"__COMMENT__":"Literals tagged with sql (including optional accessors and types), e.g. my.object?.sql<User>`SELECT ...`. This is based on the 1st #template-call pattern in TypeScript.tmLanguage.json","begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)(#?(?i)sql|sqlFragment(?-i))(<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","end":"(?<=`)","name":"string.template.ts","patterns":[{"begin":"(?=(([$_[:alpha:]][$_[:alnum:]]*\\\\s*\\\\??\\\\.\\\\s*)*|(\\\\??\\\\.\\\\s*)?)(#?(?i)sql|sqlFragment(?-i)))","end":"(?=(<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)?`)","patterns":[{"include":"source.ts#support-function-call-identifiers"},{"match":"(#?(?i)sql|sqlFragment(?-i))","name":"entity.name.function.tagged-template.ts"}]},{"include":"source.ts#type-arguments"},{"include":"#embedded-sql"}]},{"__COMMENT__":"Literals tagged with sql (including optional types), e.g. sql<User>`SELECT ...`. This is based on the 2nd #template-call pattern in TypeScript.tmLanguage.json","begin":"\\\\b((?i)sql|sqlFragment(?-i))\\\\s*(?=(<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))(([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>|<\\\\s*(((keyof|infer|awaited|typeof|readonly)\\\\s+)|(([$_[:alpha:]][$_[:alnum:]]*|(\\\\{([^{}]|(\\\\{([^{}]|\\\\{[^{}]*})*}))*})|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(\\\\[([^]\\\\[]|(\\\\[([^]\\\\[]|\\\\[[^]\\\\[]*])*]))*])|(\'([^\'\\\\\\\\]|\\\\\\\\.)*\')|(\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\")|(`([^\\\\\\\\`]|\\\\\\\\.)*`))(?=\\\\s*([,.<>\\\\[]|=>|&(?!&)|\\\\|(?!\\\\|)))))([^(<>]|(\\\\(([^()]|(\\\\(([^()]|\\\\([^()]*\\\\))*\\\\)))*\\\\))|(?<==)>)*(?<!=)>))*(?<!=)>)*(?<!=)>\\\\s*)`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?<=`)","name":"string.template.ts","patterns":[{"include":"source.ts#type-arguments"},{"include":"#embedded-sql"}]},{"__COMMENT__":"Literals tagged with sql, e.g. sql`SELECT ...`. This is based on the 2nd #template pattern in TypeScript.tmLanguage.json","begin":"\\\\b((?i)sql|sqlFragment(?-i))\\\\s*(?=`)","beginCaptures":{"1":{"name":"entity.name.function.tagged-template.ts"}},"end":"(?<=`)","name":"string.template.ts","patterns":[{"include":"#embedded-sql"}]}],"repository":{"embedded-sql":{"begin":"`","beginCaptures":{"0":{"name":"punctuation.definition.string.template.begin.js"}},"contentName":"meta.embedded.block.sql","end":"`","endCaptures":{"0":{"name":"punctuation.definition.string.template.end.js"}},"name":"string.template.ts","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]}},"scopeName":"inline.tagged-template-sql","embeddedLangs":["typescript","sql"]}')),m=[...i,...a,p],h=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-xml","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(xml|svg|inline-svg|inline-xml)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(\\\\s*((?:|inline-)xml))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(xml|svg|inline-svg|inline-xml) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"text.xml"}]}],"scopeName":"inline.es6-xml","embeddedLangs":["xml"]}')),g=[...r,h],_=Object.freeze(JSON.parse(`{"displayName":"TypeScript with Tags","name":"ts-tags","patterns":[{"include":"source.ts"}],"scopeName":"source.ts.tags","embeddedLangs":["typescript","es-tag-css","es-tag-glsl","es-tag-html","es-tag-sql","es-tag-xml"],"aliases":["lit"]}`)),v=[...i,...c,...u,...f,...m,...g,_];export{v as default};
@@ -1 +1 @@
1
- import{t as e}from"./javascript-qWAOScxl.js";import{t}from"./css-Cerub-yB.js";import{t as n}from"./scss-DQqteGaG.js";import r from"./python-DeqTx6ef.js";import i from"./ruby-iUkWDcLo.js";import a from"./php-BGmVZBAJ.js";var o=Object.freeze(JSON.parse(`{"displayName":"Twig","fileTypes":["twig","html.twig"],"firstLineMatch":"<!(?i:DOCTYPE)|<(?i:html)|<\\\\?(?i:php)|\\\\{\\\\{|\\\\{%|\\\\{#","foldingStartMarker":"(<(?i:body|div|dl|fieldset|form|head|li|ol|script|select|style|table|tbody|tfoot|thead|tr|ul)\\\\b.*?>|<!--(?!.*--\\\\s*>)|^<!-- #tminclude (?>.*?-->)$|\\\\{%\\\\s+(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim))","foldingStopMarker":"(</(?i:body|div|dl|fieldset|form|head|li|ol|script|select|style|table|tbody|tfoot|thead|tr|ul)>|^(?!.*?<!--).*?--\\\\s*>|^<!-- end tminclude -->$|\\\\{%\\\\s+end(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim))","name":"twig","patterns":[{"begin":"(<)([0-:A-Za-z]++)(?=[^>]*></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.html"}},"end":"(>(<)/)(\\\\2)(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"meta.scope.between-tag-pair.html"},"3":{"name":"entity.name.tag.html"},"4":{"name":"punctuation.definition.tag.html"}},"name":"meta.tag.any.html","patterns":[{"include":"#tag-stuff"}]},{"begin":"(<\\\\?)(xml)","captures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.xml.html"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml.html","patterns":[{"include":"#tag-generic-attribute"},{"include":"#string-double-quoted"},{"include":"#string-single-quoted"}]},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.html"}},"end":"--\\\\s*>","name":"comment.block.html","patterns":[{"match":"--","name":"invalid.illegal.bad-comments-or-CDATA.html"},{"include":"#embedded-code"}]},{"begin":"<!","captures":{"0":{"name":"punctuation.definition.tag.html"}},"end":">","name":"meta.tag.sgml.html","patterns":[{"begin":"(?i:DOCTYPE)","captures":{"1":{"name":"entity.name.tag.doctype.html"}},"end":"(?=>)","name":"meta.tag.sgml.doctype.html","patterns":[{"match":"\\"[^\\">]*\\"","name":"string.quoted.double.doctype.identifiers-and-DTDs.html"}]},{"begin":"\\\\[CDATA\\\\[","end":"]](?=>)","name":"constant.other.inline-data.html"},{"match":"(\\\\s*)(?!--|>)\\\\S(\\\\s*)","name":"invalid.illegal.bad-comments-or-CDATA.html"}]},{"include":"#embedded-code"},{"begin":"(?:^\\\\s+)?(<)((?i:style))\\\\b(?![^>]*/>)","captures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.style.html"},"3":{"name":"punctuation.definition.tag.html"}},"end":"(</)((?i:style))(>)(?:\\\\s*\\\\n)?","name":"source.css.embedded.html","patterns":[{"include":"#tag-stuff"},{"begin":"(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"}},"end":"(?=</(?i:style))","patterns":[{"include":"#embedded-code"},{"include":"source.css"}]}]},{"begin":"(?:^\\\\s+)?(<)((?i:script))\\\\b(?![^>]*/>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.script.html"}},"end":"(?<=</(script|SCRIPT))(>)(?:\\\\s*\\\\n)?","endCaptures":{"2":{"name":"punctuation.definition.tag.html"}},"name":"source.js.embedded.html","patterns":[{"include":"#tag-stuff"},{"begin":"(?<!</(?:script|SCRIPT))(>)","captures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.script.html"}},"end":"(</)((?i:script))","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.js"}},"match":"(//).*?((?=<\/script)|$\\\\n?)","name":"comment.line.double-slash.js"},{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.js"}},"end":"\\\\*/|(?=<\/script)","name":"comment.block.js"},{"include":"#php"},{"include":"#twig-print-tag"},{"include":"#twig-statement-tag"},{"include":"#twig-comment-tag"},{"include":"source.js"}]}]},{"begin":"(?i)(?<=\\\\{%\\\\s(?:|include)js\\\\s%})","end":"(?i)(?=\\\\{%\\\\send(?:|include)js\\\\s%})","name":"source.js.embedded.twig","patterns":[{"include":"source.js"}]},{"begin":"(?i)(?<=\\\\{%\\\\s(?:|include|includehires)css\\\\s%})","end":"(?i)(?=\\\\{%\\\\send(?:|include|includehires)css\\\\s%})","name":"source.css.embedded.twig","patterns":[{"include":"source.css"}]},{"begin":"(?i)(?<=\\\\{%\\\\s(?:|include|includehires)scss\\\\s%})","end":"(?i)(?=\\\\{%\\\\send(?:|include|includehires)scss\\\\s%})","name":"source.css.scss.embedded.twig","patterns":[{"include":"source.css.scss"}]},{"begin":"(</?)((?i:body|head|html))\\\\b","captures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.structure.any.html"}},"end":"(>)","name":"meta.tag.structure.any.html","patterns":[{"include":"#tag-stuff"}]},{"begin":"(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre))\\\\b","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.block.any.html"}},"end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.block.any.html","patterns":[{"include":"#tag-stuff"}]},{"begin":"(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|[qs]|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var))\\\\b","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.inline.any.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.any.html","patterns":[{"include":"#tag-stuff"}]},{"begin":"(</?)([0-:A-Za-z]+)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.other.html"}},"end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.html","patterns":[{"include":"#tag-stuff"}]},{"include":"#entities"},{"match":"<>","name":"invalid.illegal.incomplete.html"},{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"},{"include":"#twig-print-tag"},{"include":"#twig-statement-tag"},{"include":"#twig-comment-tag"}],"repository":{"embedded-code":{"patterns":[{"include":"#ruby"},{"include":"#php"},{"include":"#twig-print-tag"},{"include":"#twig-statement-tag"},{"include":"#twig-comment-tag"},{"include":"#python"}]},"entities":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}},"match":"(&)([0-9A-Za-z]+|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.html"},{"match":"&","name":"invalid.illegal.bad-ampersand.html"}]},"php":{"begin":"(?=(^\\\\s*)?<\\\\?)","end":"(?!(^\\\\s*)?<\\\\?)","patterns":[{"include":"source.php"}]},"python":{"begin":"^\\\\s*<\\\\?python(?!.*\\\\?>)","end":"\\\\?>(?:\\\\s*$\\\\n)?","name":"source.python.embedded.html","patterns":[{"include":"source.python"}]},"ruby":{"patterns":[{"begin":"<%+#","captures":{"0":{"name":"punctuation.definition.comment.erb"}},"end":"%>","name":"comment.block.erb"},{"begin":"<%+(?!>)=?","captures":{"0":{"name":"punctuation.section.embedded.ruby"}},"end":"-?%>","name":"source.ruby.embedded.html","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.ruby"}},"match":"(#).*?(?=-?%>)","name":"comment.line.number-sign.ruby"},{"include":"source.ruby"}]},{"begin":"<\\\\?r(?!>)=?","captures":{"0":{"name":"punctuation.section.embedded.ruby.nitro"}},"end":"-?\\\\?>","name":"source.ruby.nitro.embedded.html","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.ruby.nitro"}},"match":"(#).*?(?=-?\\\\?>)","name":"comment.line.number-sign.ruby.nitro"},{"include":"source.ruby"}]}]},"string-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#embedded-code"},{"include":"#entities"}]},"string-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.single.html","patterns":[{"include":"#embedded-code"},{"include":"#entities"}]},"tag-generic-attribute":{"match":"\\\\b([-:A-Za-z]+)","name":"entity.other.attribute-name.html"},"tag-id-attribute":{"begin":"\\\\b(id)\\\\b\\\\s*(=)","captures":{"1":{"name":"entity.other.attribute-name.id.html"},"2":{"name":"punctuation.separator.key-value.html"}},"end":"(?<=[\\"'])","name":"meta.attribute-with-value.id.html","patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"meta.toc-list.id.html","end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#embedded-code"},{"include":"#entities"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"meta.toc-list.id.html","end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.single.html","patterns":[{"include":"#embedded-code"},{"include":"#entities"}]}]},"tag-stuff":{"patterns":[{"include":"#tag-id-attribute"},{"include":"#tag-generic-attribute"},{"include":"#string-double-quoted"},{"include":"#string-single-quoted"},{"include":"#embedded-code"}]},"twig-arrays":{"begin":"(?<=[(,:\\\\[{\\\\s])\\\\[","beginCaptures":{"0":{"name":"punctuation.section.array.begin.twig"}},"end":"]","endCaptures":{"0":{"name":"punctuation.section.array.end.twig"}},"name":"meta.array.twig","patterns":[{"include":"#twig-arrays"},{"include":"#twig-hashes"},{"include":"#twig-constants"},{"include":"#twig-operators"},{"include":"#twig-strings"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"match":",","name":"punctuation.separator.object.twig"}]},"twig-comment-tag":{"begin":"\\\\{#-?","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.twig"}},"end":"-?#}","endCaptures":{"0":{"name":"punctuation.definition.comment.end.twig"}},"name":"comment.block.twig"},"twig-constants":{"patterns":[{"match":"(?i)(?<=[(,:\\\\[{\\\\s])(?:true|false|null|none)(?=[]),}\\\\s])","name":"constant.language.twig"},{"match":"(?<=[(,:\\\\[{\\\\s]|\\\\.\\\\.|\\\\*\\\\*)[0-9]+(?:\\\\.[0-9]+)?(?=[]),}\\\\s]|\\\\.\\\\.|\\\\*\\\\*)","name":"constant.numeric.twig"}]},"twig-filters":{"captures":{"1":{"name":"support.function.twig"}},"match":"(?<=[]\\"')0-9A-Z_a-z\\\\x7F-ÿ]\\\\||\\\\{%\\\\sfilter\\\\s)(abs|capitalize|e(?:scape)?|first|join|(?:json|url)_encode|keys|last|length|lower|nl2br|number_format|raw|reverse|round|sort|striptags|title|trim|upper)(?=[]),:|}\\\\s]|\\\\.\\\\.|\\\\*\\\\*)"},"twig-filters-ud":{"captures":{"1":{"name":"meta.function-call.other.twig"}},"match":"(?<=[]\\"')0-9A-Z_a-z\\\\x7F-ÿ]\\\\||\\\\{%\\\\sfilter\\\\s)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)"},"twig-filters-warg":{"begin":"(?<=[]\\"')0-9A-Z_a-z\\\\x7F-ÿ]\\\\||\\\\{%\\\\sfilter\\\\s)(batch|convert_encoding|date|date_modify|default|e(?:scape)?|format|join|merge|number_format|replace|round|slice|split|trim)(\\\\()","beginCaptures":{"1":{"name":"support.function.twig"},"2":{"name":"punctuation.definition.parameters.begin.twig"}},"contentName":"meta.function.arguments.twig","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.twig"}},"patterns":[{"include":"#twig-constants"},{"include":"#twig-operators"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"},{"include":"#twig-hashes"}]},"twig-filters-warg-ud":{"begin":"(?<=[]\\"')0-9A-Z_a-z\\\\x7F-ÿ]\\\\||\\\\{%\\\\sfilter\\\\s)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(\\\\()","beginCaptures":{"1":{"name":"meta.function-call.other.twig"},"2":{"name":"punctuation.definition.parameters.begin.twig"}},"contentName":"meta.function.arguments.twig","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.twig"}},"patterns":[{"include":"#twig-constants"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"},{"include":"#twig-hashes"}]},"twig-functions":{"captures":{"1":{"name":"support.function.twig"}},"match":"(?<=is\\\\s)(defined|empty|even|iterable|odd)"},"twig-functions-warg":{"begin":"(?<=[(,:\\\\[{\\\\s])(attribute|block|constant|cycle|date|divisible by|dump|include|max|min|parent|random|range|same as|source|template_from_string)(\\\\()","beginCaptures":{"1":{"name":"support.function.twig"},"2":{"name":"punctuation.definition.parameters.begin.twig"}},"contentName":"meta.function.arguments.twig","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.twig"}},"patterns":[{"include":"#twig-constants"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"}]},"twig-hashes":{"begin":"(?<=[(,:\\\\[{\\\\s])\\\\{","beginCaptures":{"0":{"name":"punctuation.section.hash.begin.twig"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.hash.end.twig"}},"name":"meta.hash.twig","patterns":[{"include":"#twig-hashes"},{"include":"#twig-arrays"},{"include":"#twig-constants"},{"include":"#twig-operators"},{"include":"#twig-strings"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"match":":","name":"punctuation.separator.key-value.twig"},{"match":",","name":"punctuation.separator.object.twig"}]},"twig-keywords":{"match":"(?<=\\\\s)((?:end)?(?:autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)|as|do|else|elseif|extends|flush|from|ignore missing|import|include|only|use|with)(?=\\\\s)","name":"keyword.control.twig"},"twig-macros":{"begin":"(?<=[(,:\\\\[{\\\\s])([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(?:(\\\\.)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*))?(\\\\()","beginCaptures":{"1":{"name":"meta.function-call.twig"},"2":{"name":"punctuation.separator.property.twig"},"3":{"name":"variable.other.property.twig"},"4":{"name":"punctuation.definition.parameters.begin.twig"}},"contentName":"meta.function.arguments.twig","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.twig"}},"patterns":[{"include":"#twig-constants"},{"include":"#twig-operators"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"},{"include":"#twig-hashes"}]},"twig-objects":{"captures":{"1":{"name":"variable.other.twig"}},"match":"(?<=[(,:\\\\[{\\\\s])([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(?=[](),.:\\\\[|}\\\\s])"},"twig-operators":{"patterns":[{"captures":{"1":{"name":"keyword.operator.arithmetic.twig"}},"match":"(?<=\\\\s)([-+]|//?|%|\\\\*\\\\*?)(?=\\\\s)"},{"captures":{"1":{"name":"keyword.operator.assignment.twig"}},"match":"(?<=\\\\s)([=~])(?=\\\\s)"},{"captures":{"1":{"name":"keyword.operator.bitwise.twig"}},"match":"(?<=\\\\s)(b-(?:and|or|xor))(?=\\\\s)"},{"captures":{"1":{"name":"keyword.operator.comparison.twig"}},"match":"(?<=\\\\s)([!=]=|<=?|>=?|(?:not )?in|is(?: not)?|(?:ends|starts) with|matches)(?=\\\\s)"},{"captures":{"1":{"name":"keyword.operator.logical.twig"}},"match":"(?<=\\\\s)([:?]|\\\\?:|\\\\?\\\\?|and|not|or)(?=\\\\s)"},{"captures":{"0":{"name":"keyword.operator.other.twig"}},"match":"(?<=[]\\"')0-9A-Z_a-z\\\\x7F-ÿ])\\\\.\\\\.(?=[\\"'0-9A-Z_a-z\\\\x7F-ÿ])"},{"captures":{"0":{"name":"keyword.operator.other.twig"}},"match":"(?<=[]\\"')0-9A-Z_a-z}\\\\x7F-ÿ])\\\\|(?=[A-Z_a-z\\\\x7F-ÿ])"}]},"twig-print-tag":{"begin":"\\\\{\\\\{-?","beginCaptures":{"0":{"name":"punctuation.section.tag.twig"}},"end":"-?}}","endCaptures":{"0":{"name":"punctuation.section.tag.twig"}},"name":"meta.tag.template.value.twig","patterns":[{"include":"#twig-constants"},{"include":"#twig-operators"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"},{"include":"#twig-hashes"}]},"twig-properties":{"patterns":[{"captures":{"1":{"name":"punctuation.separator.property.twig"},"2":{"name":"variable.other.property.twig"}},"match":"(?<=[0-9A-Z_a-z\\\\x7F-ÿ])(\\\\.)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(?=[]),.:\\\\[|}\\\\s])"},{"begin":"(?<=[0-9A-Z_a-z\\\\x7F-ÿ])(\\\\.)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(\\\\()","beginCaptures":{"1":{"name":"punctuation.separator.property.twig"},"2":{"name":"variable.other.property.twig"},"3":{"name":"punctuation.definition.parameters.begin.twig"}},"contentName":"meta.function.arguments.twig","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.twig"}},"patterns":[{"include":"#twig-constants"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"}]},{"captures":{"1":{"name":"punctuation.section.array.begin.twig"},"2":{"name":"variable.other.property.twig"},"3":{"name":"punctuation.section.array.end.twig"},"4":{"name":"punctuation.section.array.begin.twig"},"5":{"name":"variable.other.property.twig"},"6":{"name":"punctuation.section.array.end.twig"},"7":{"name":"punctuation.section.array.begin.twig"},"8":{"name":"variable.other.property.twig"},"9":{"name":"punctuation.section.array.end.twig"}},"match":"(?<=[]0-9A-Z_a-z\\\\x7F-ÿ])(?:(\\\\[)('[A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*')(])|(\\\\[)(\\"[A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*\\")(])|(\\\\[)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(]))"}]},"twig-statement-tag":{"begin":"\\\\{%-?","beginCaptures":{"0":{"name":"punctuation.section.tag.twig"}},"end":"-?%}","endCaptures":{"0":{"name":"punctuation.section.tag.twig"}},"name":"meta.tag.template.block.twig","patterns":[{"include":"#twig-constants"},{"include":"#twig-keywords"},{"include":"#twig-operators"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-strings"},{"include":"#twig-arrays"},{"include":"#twig-hashes"}]},"twig-strings":{"patterns":[{"begin":"(?:(?<!\\\\\\\\)|(?<=\\\\\\\\\\\\\\\\))'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.twig"}},"end":"(?:(?<!\\\\\\\\)|(?<=\\\\\\\\\\\\\\\\))'","endCaptures":{"0":{"name":"punctuation.definition.string.end.twig"}},"name":"string.quoted.single.twig"},{"begin":"(?:(?<!\\\\\\\\)|(?<=\\\\\\\\\\\\\\\\))\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.twig"}},"end":"(?:(?<!\\\\\\\\)|(?<=\\\\\\\\\\\\\\\\))\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.twig"}},"name":"string.quoted.double.twig"}]}},"scopeName":"text.html.twig","embeddedLangs":["css","javascript","scss","php","python","ruby"]}`)),s=[...t,...e,...n,...a,...r,...i,o];export{s as default};
1
+ import{t as e}from"./javascript-C5SKIVqe.js";import{t}from"./css-BuxbQOHL.js";import{t as n}from"./scss-TDl-6ro4.js";import r from"./python-bmWy9j1-.js";import i from"./ruby-rbK5SsJa.js";import a from"./php-BNMYN5Jp.js";var o=Object.freeze(JSON.parse(`{"displayName":"Twig","fileTypes":["twig","html.twig"],"firstLineMatch":"<!(?i:DOCTYPE)|<(?i:html)|<\\\\?(?i:php)|\\\\{\\\\{|\\\\{%|\\\\{#","foldingStartMarker":"(<(?i:body|div|dl|fieldset|form|head|li|ol|script|select|style|table|tbody|tfoot|thead|tr|ul)\\\\b.*?>|<!--(?!.*--\\\\s*>)|^<!-- #tminclude (?>.*?-->)$|\\\\{%\\\\s+(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim))","foldingStopMarker":"(</(?i:body|div|dl|fieldset|form|head|li|ol|script|select|style|table|tbody|tfoot|thead|tr|ul)>|^(?!.*?<!--).*?--\\\\s*>|^<!-- end tminclude -->$|\\\\{%\\\\s+end(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim))","name":"twig","patterns":[{"begin":"(<)([0-:A-Za-z]++)(?=[^>]*></\\\\2>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.html"}},"end":"(>(<)/)(\\\\2)(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"meta.scope.between-tag-pair.html"},"3":{"name":"entity.name.tag.html"},"4":{"name":"punctuation.definition.tag.html"}},"name":"meta.tag.any.html","patterns":[{"include":"#tag-stuff"}]},{"begin":"(<\\\\?)(xml)","captures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.xml.html"}},"end":"(\\\\?>)","name":"meta.tag.preprocessor.xml.html","patterns":[{"include":"#tag-generic-attribute"},{"include":"#string-double-quoted"},{"include":"#string-single-quoted"}]},{"begin":"<!--","captures":{"0":{"name":"punctuation.definition.comment.html"}},"end":"--\\\\s*>","name":"comment.block.html","patterns":[{"match":"--","name":"invalid.illegal.bad-comments-or-CDATA.html"},{"include":"#embedded-code"}]},{"begin":"<!","captures":{"0":{"name":"punctuation.definition.tag.html"}},"end":">","name":"meta.tag.sgml.html","patterns":[{"begin":"(?i:DOCTYPE)","captures":{"1":{"name":"entity.name.tag.doctype.html"}},"end":"(?=>)","name":"meta.tag.sgml.doctype.html","patterns":[{"match":"\\"[^\\">]*\\"","name":"string.quoted.double.doctype.identifiers-and-DTDs.html"}]},{"begin":"\\\\[CDATA\\\\[","end":"]](?=>)","name":"constant.other.inline-data.html"},{"match":"(\\\\s*)(?!--|>)\\\\S(\\\\s*)","name":"invalid.illegal.bad-comments-or-CDATA.html"}]},{"include":"#embedded-code"},{"begin":"(?:^\\\\s+)?(<)((?i:style))\\\\b(?![^>]*/>)","captures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.style.html"},"3":{"name":"punctuation.definition.tag.html"}},"end":"(</)((?i:style))(>)(?:\\\\s*\\\\n)?","name":"source.css.embedded.html","patterns":[{"include":"#tag-stuff"},{"begin":"(>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"}},"end":"(?=</(?i:style))","patterns":[{"include":"#embedded-code"},{"include":"source.css"}]}]},{"begin":"(?:^\\\\s+)?(<)((?i:script))\\\\b(?![^>]*/>)","beginCaptures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.script.html"}},"end":"(?<=</(script|SCRIPT))(>)(?:\\\\s*\\\\n)?","endCaptures":{"2":{"name":"punctuation.definition.tag.html"}},"name":"source.js.embedded.html","patterns":[{"include":"#tag-stuff"},{"begin":"(?<!</(?:script|SCRIPT))(>)","captures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.script.html"}},"end":"(</)((?i:script))","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.js"}},"match":"(//).*?((?=<\/script)|$\\\\n?)","name":"comment.line.double-slash.js"},{"begin":"/\\\\*","captures":{"0":{"name":"punctuation.definition.comment.js"}},"end":"\\\\*/|(?=<\/script)","name":"comment.block.js"},{"include":"#php"},{"include":"#twig-print-tag"},{"include":"#twig-statement-tag"},{"include":"#twig-comment-tag"},{"include":"source.js"}]}]},{"begin":"(?i)(?<=\\\\{%\\\\s(?:|include)js\\\\s%})","end":"(?i)(?=\\\\{%\\\\send(?:|include)js\\\\s%})","name":"source.js.embedded.twig","patterns":[{"include":"source.js"}]},{"begin":"(?i)(?<=\\\\{%\\\\s(?:|include|includehires)css\\\\s%})","end":"(?i)(?=\\\\{%\\\\send(?:|include|includehires)css\\\\s%})","name":"source.css.embedded.twig","patterns":[{"include":"source.css"}]},{"begin":"(?i)(?<=\\\\{%\\\\s(?:|include|includehires)scss\\\\s%})","end":"(?i)(?=\\\\{%\\\\send(?:|include|includehires)scss\\\\s%})","name":"source.css.scss.embedded.twig","patterns":[{"include":"source.css.scss"}]},{"begin":"(</?)((?i:body|head|html))\\\\b","captures":{"1":{"name":"punctuation.definition.tag.html"},"2":{"name":"entity.name.tag.structure.any.html"}},"end":"(>)","name":"meta.tag.structure.any.html","patterns":[{"include":"#tag-stuff"}]},{"begin":"(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre))\\\\b","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.block.any.html"}},"end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.block.any.html","patterns":[{"include":"#tag-stuff"}]},{"begin":"(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|[qs]|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var))\\\\b","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.inline.any.html"}},"end":"((?: ?/)?>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.inline.any.html","patterns":[{"include":"#tag-stuff"}]},{"begin":"(</?)([0-:A-Za-z]+)","beginCaptures":{"1":{"name":"punctuation.definition.tag.begin.html"},"2":{"name":"entity.name.tag.other.html"}},"end":"(>)","endCaptures":{"1":{"name":"punctuation.definition.tag.end.html"}},"name":"meta.tag.other.html","patterns":[{"include":"#tag-stuff"}]},{"include":"#entities"},{"match":"<>","name":"invalid.illegal.incomplete.html"},{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"},{"include":"#twig-print-tag"},{"include":"#twig-statement-tag"},{"include":"#twig-comment-tag"}],"repository":{"embedded-code":{"patterns":[{"include":"#ruby"},{"include":"#php"},{"include":"#twig-print-tag"},{"include":"#twig-statement-tag"},{"include":"#twig-comment-tag"},{"include":"#python"}]},"entities":{"patterns":[{"captures":{"1":{"name":"punctuation.definition.entity.html"},"3":{"name":"punctuation.definition.entity.html"}},"match":"(&)([0-9A-Za-z]+|#[0-9]+|#x\\\\h+)(;)","name":"constant.character.entity.html"},{"match":"&","name":"invalid.illegal.bad-ampersand.html"}]},"php":{"begin":"(?=(^\\\\s*)?<\\\\?)","end":"(?!(^\\\\s*)?<\\\\?)","patterns":[{"include":"source.php"}]},"python":{"begin":"^\\\\s*<\\\\?python(?!.*\\\\?>)","end":"\\\\?>(?:\\\\s*$\\\\n)?","name":"source.python.embedded.html","patterns":[{"include":"source.python"}]},"ruby":{"patterns":[{"begin":"<%+#","captures":{"0":{"name":"punctuation.definition.comment.erb"}},"end":"%>","name":"comment.block.erb"},{"begin":"<%+(?!>)=?","captures":{"0":{"name":"punctuation.section.embedded.ruby"}},"end":"-?%>","name":"source.ruby.embedded.html","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.ruby"}},"match":"(#).*?(?=-?%>)","name":"comment.line.number-sign.ruby"},{"include":"source.ruby"}]},{"begin":"<\\\\?r(?!>)=?","captures":{"0":{"name":"punctuation.section.embedded.ruby.nitro"}},"end":"-?\\\\?>","name":"source.ruby.nitro.embedded.html","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.ruby.nitro"}},"match":"(#).*?(?=-?\\\\?>)","name":"comment.line.number-sign.ruby.nitro"},{"include":"source.ruby"}]}]},"string-double-quoted":{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#embedded-code"},{"include":"#entities"}]},"string-single-quoted":{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.single.html","patterns":[{"include":"#embedded-code"},{"include":"#entities"}]},"tag-generic-attribute":{"match":"\\\\b([-:A-Za-z]+)","name":"entity.other.attribute-name.html"},"tag-id-attribute":{"begin":"\\\\b(id)\\\\b\\\\s*(=)","captures":{"1":{"name":"entity.other.attribute-name.id.html"},"2":{"name":"punctuation.separator.key-value.html"}},"end":"(?<=[\\"'])","name":"meta.attribute-with-value.id.html","patterns":[{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"meta.toc-list.id.html","end":"\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.double.html","patterns":[{"include":"#embedded-code"},{"include":"#entities"}]},{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.html"}},"contentName":"meta.toc-list.id.html","end":"'","endCaptures":{"0":{"name":"punctuation.definition.string.end.html"}},"name":"string.quoted.single.html","patterns":[{"include":"#embedded-code"},{"include":"#entities"}]}]},"tag-stuff":{"patterns":[{"include":"#tag-id-attribute"},{"include":"#tag-generic-attribute"},{"include":"#string-double-quoted"},{"include":"#string-single-quoted"},{"include":"#embedded-code"}]},"twig-arrays":{"begin":"(?<=[(,:\\\\[{\\\\s])\\\\[","beginCaptures":{"0":{"name":"punctuation.section.array.begin.twig"}},"end":"]","endCaptures":{"0":{"name":"punctuation.section.array.end.twig"}},"name":"meta.array.twig","patterns":[{"include":"#twig-arrays"},{"include":"#twig-hashes"},{"include":"#twig-constants"},{"include":"#twig-operators"},{"include":"#twig-strings"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"match":",","name":"punctuation.separator.object.twig"}]},"twig-comment-tag":{"begin":"\\\\{#-?","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.twig"}},"end":"-?#}","endCaptures":{"0":{"name":"punctuation.definition.comment.end.twig"}},"name":"comment.block.twig"},"twig-constants":{"patterns":[{"match":"(?i)(?<=[(,:\\\\[{\\\\s])(?:true|false|null|none)(?=[]),}\\\\s])","name":"constant.language.twig"},{"match":"(?<=[(,:\\\\[{\\\\s]|\\\\.\\\\.|\\\\*\\\\*)[0-9]+(?:\\\\.[0-9]+)?(?=[]),}\\\\s]|\\\\.\\\\.|\\\\*\\\\*)","name":"constant.numeric.twig"}]},"twig-filters":{"captures":{"1":{"name":"support.function.twig"}},"match":"(?<=[]\\"')0-9A-Z_a-z\\\\x7F-ÿ]\\\\||\\\\{%\\\\sfilter\\\\s)(abs|capitalize|e(?:scape)?|first|join|(?:json|url)_encode|keys|last|length|lower|nl2br|number_format|raw|reverse|round|sort|striptags|title|trim|upper)(?=[]),:|}\\\\s]|\\\\.\\\\.|\\\\*\\\\*)"},"twig-filters-ud":{"captures":{"1":{"name":"meta.function-call.other.twig"}},"match":"(?<=[]\\"')0-9A-Z_a-z\\\\x7F-ÿ]\\\\||\\\\{%\\\\sfilter\\\\s)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)"},"twig-filters-warg":{"begin":"(?<=[]\\"')0-9A-Z_a-z\\\\x7F-ÿ]\\\\||\\\\{%\\\\sfilter\\\\s)(batch|convert_encoding|date|date_modify|default|e(?:scape)?|format|join|merge|number_format|replace|round|slice|split|trim)(\\\\()","beginCaptures":{"1":{"name":"support.function.twig"},"2":{"name":"punctuation.definition.parameters.begin.twig"}},"contentName":"meta.function.arguments.twig","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.twig"}},"patterns":[{"include":"#twig-constants"},{"include":"#twig-operators"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"},{"include":"#twig-hashes"}]},"twig-filters-warg-ud":{"begin":"(?<=[]\\"')0-9A-Z_a-z\\\\x7F-ÿ]\\\\||\\\\{%\\\\sfilter\\\\s)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(\\\\()","beginCaptures":{"1":{"name":"meta.function-call.other.twig"},"2":{"name":"punctuation.definition.parameters.begin.twig"}},"contentName":"meta.function.arguments.twig","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.twig"}},"patterns":[{"include":"#twig-constants"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"},{"include":"#twig-hashes"}]},"twig-functions":{"captures":{"1":{"name":"support.function.twig"}},"match":"(?<=is\\\\s)(defined|empty|even|iterable|odd)"},"twig-functions-warg":{"begin":"(?<=[(,:\\\\[{\\\\s])(attribute|block|constant|cycle|date|divisible by|dump|include|max|min|parent|random|range|same as|source|template_from_string)(\\\\()","beginCaptures":{"1":{"name":"support.function.twig"},"2":{"name":"punctuation.definition.parameters.begin.twig"}},"contentName":"meta.function.arguments.twig","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.twig"}},"patterns":[{"include":"#twig-constants"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"}]},"twig-hashes":{"begin":"(?<=[(,:\\\\[{\\\\s])\\\\{","beginCaptures":{"0":{"name":"punctuation.section.hash.begin.twig"}},"end":"}","endCaptures":{"0":{"name":"punctuation.section.hash.end.twig"}},"name":"meta.hash.twig","patterns":[{"include":"#twig-hashes"},{"include":"#twig-arrays"},{"include":"#twig-constants"},{"include":"#twig-operators"},{"include":"#twig-strings"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"match":":","name":"punctuation.separator.key-value.twig"},{"match":",","name":"punctuation.separator.object.twig"}]},"twig-keywords":{"match":"(?<=\\\\s)((?:end)?(?:autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)|as|do|else|elseif|extends|flush|from|ignore missing|import|include|only|use|with)(?=\\\\s)","name":"keyword.control.twig"},"twig-macros":{"begin":"(?<=[(,:\\\\[{\\\\s])([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(?:(\\\\.)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*))?(\\\\()","beginCaptures":{"1":{"name":"meta.function-call.twig"},"2":{"name":"punctuation.separator.property.twig"},"3":{"name":"variable.other.property.twig"},"4":{"name":"punctuation.definition.parameters.begin.twig"}},"contentName":"meta.function.arguments.twig","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.twig"}},"patterns":[{"include":"#twig-constants"},{"include":"#twig-operators"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"},{"include":"#twig-hashes"}]},"twig-objects":{"captures":{"1":{"name":"variable.other.twig"}},"match":"(?<=[(,:\\\\[{\\\\s])([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(?=[](),.:\\\\[|}\\\\s])"},"twig-operators":{"patterns":[{"captures":{"1":{"name":"keyword.operator.arithmetic.twig"}},"match":"(?<=\\\\s)([-+]|//?|%|\\\\*\\\\*?)(?=\\\\s)"},{"captures":{"1":{"name":"keyword.operator.assignment.twig"}},"match":"(?<=\\\\s)([=~])(?=\\\\s)"},{"captures":{"1":{"name":"keyword.operator.bitwise.twig"}},"match":"(?<=\\\\s)(b-(?:and|or|xor))(?=\\\\s)"},{"captures":{"1":{"name":"keyword.operator.comparison.twig"}},"match":"(?<=\\\\s)([!=]=|<=?|>=?|(?:not )?in|is(?: not)?|(?:ends|starts) with|matches)(?=\\\\s)"},{"captures":{"1":{"name":"keyword.operator.logical.twig"}},"match":"(?<=\\\\s)([:?]|\\\\?:|\\\\?\\\\?|and|not|or)(?=\\\\s)"},{"captures":{"0":{"name":"keyword.operator.other.twig"}},"match":"(?<=[]\\"')0-9A-Z_a-z\\\\x7F-ÿ])\\\\.\\\\.(?=[\\"'0-9A-Z_a-z\\\\x7F-ÿ])"},{"captures":{"0":{"name":"keyword.operator.other.twig"}},"match":"(?<=[]\\"')0-9A-Z_a-z}\\\\x7F-ÿ])\\\\|(?=[A-Z_a-z\\\\x7F-ÿ])"}]},"twig-print-tag":{"begin":"\\\\{\\\\{-?","beginCaptures":{"0":{"name":"punctuation.section.tag.twig"}},"end":"-?}}","endCaptures":{"0":{"name":"punctuation.section.tag.twig"}},"name":"meta.tag.template.value.twig","patterns":[{"include":"#twig-constants"},{"include":"#twig-operators"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"},{"include":"#twig-hashes"}]},"twig-properties":{"patterns":[{"captures":{"1":{"name":"punctuation.separator.property.twig"},"2":{"name":"variable.other.property.twig"}},"match":"(?<=[0-9A-Z_a-z\\\\x7F-ÿ])(\\\\.)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(?=[]),.:\\\\[|}\\\\s])"},{"begin":"(?<=[0-9A-Z_a-z\\\\x7F-ÿ])(\\\\.)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(\\\\()","beginCaptures":{"1":{"name":"punctuation.separator.property.twig"},"2":{"name":"variable.other.property.twig"},"3":{"name":"punctuation.definition.parameters.begin.twig"}},"contentName":"meta.function.arguments.twig","end":"\\\\)","endCaptures":{"0":{"name":"punctuation.definition.parameters.end.twig"}},"patterns":[{"include":"#twig-constants"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-strings"},{"include":"#twig-arrays"}]},{"captures":{"1":{"name":"punctuation.section.array.begin.twig"},"2":{"name":"variable.other.property.twig"},"3":{"name":"punctuation.section.array.end.twig"},"4":{"name":"punctuation.section.array.begin.twig"},"5":{"name":"variable.other.property.twig"},"6":{"name":"punctuation.section.array.end.twig"},"7":{"name":"punctuation.section.array.begin.twig"},"8":{"name":"variable.other.property.twig"},"9":{"name":"punctuation.section.array.end.twig"}},"match":"(?<=[]0-9A-Z_a-z\\\\x7F-ÿ])(?:(\\\\[)('[A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*')(])|(\\\\[)(\\"[A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*\\")(])|(\\\\[)([A-Z_a-z\\\\x7F-ÿ][0-9A-Z_a-z\\\\x7F-ÿ]*)(]))"}]},"twig-statement-tag":{"begin":"\\\\{%-?","beginCaptures":{"0":{"name":"punctuation.section.tag.twig"}},"end":"-?%}","endCaptures":{"0":{"name":"punctuation.section.tag.twig"}},"name":"meta.tag.template.block.twig","patterns":[{"include":"#twig-constants"},{"include":"#twig-keywords"},{"include":"#twig-operators"},{"include":"#twig-functions-warg"},{"include":"#twig-functions"},{"include":"#twig-macros"},{"include":"#twig-filters-warg"},{"include":"#twig-filters"},{"include":"#twig-filters-warg-ud"},{"include":"#twig-filters-ud"},{"include":"#twig-objects"},{"include":"#twig-properties"},{"include":"#twig-strings"},{"include":"#twig-arrays"},{"include":"#twig-hashes"}]},"twig-strings":{"patterns":[{"begin":"(?:(?<!\\\\\\\\)|(?<=\\\\\\\\\\\\\\\\))'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.twig"}},"end":"(?:(?<!\\\\\\\\)|(?<=\\\\\\\\\\\\\\\\))'","endCaptures":{"0":{"name":"punctuation.definition.string.end.twig"}},"name":"string.quoted.single.twig"},{"begin":"(?:(?<!\\\\\\\\)|(?<=\\\\\\\\\\\\\\\\))\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.twig"}},"end":"(?:(?<!\\\\\\\\)|(?<=\\\\\\\\\\\\\\\\))\\"","endCaptures":{"0":{"name":"punctuation.definition.string.end.twig"}},"name":"string.quoted.double.twig"}]}},"scopeName":"text.html.twig","embeddedLangs":["css","javascript","scss","php","python","ruby"]}`)),s=[...t,...e,...n,...a,...r,...i,o];export{s as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t,x as n}from"./vendor-markdown-Ls5AcU91.js";import{t as r}from"./download-DG3_9xXy.js";import{t as i}from"./eye-gWwaF4Lg.js";import{t as a}from"./x-YDu4m2Iq.js";import{t as o}from"./button-BZtEJcUv.js";import{Kn as s,Pn as c,W as l}from"./index-C_s5DxFQ.js";import{getAccounts as u,getActiveAccount as d,getAllAccountUsages as f}from"./api-settings-CTMdz_VF.js";function p(e){return e>=90?`text-error`:e>=70?`text-warning`:`text-success`}function m(e){return e>=90?`bg-error`:e>=70?`bg-warning`:`bg-success`}function h(e){if(!e)return null;let t=null;if(e.resetsInMinutes!=null)t=e.resetsInMinutes;else if(e.resetsInHours!=null)t=Math.round(e.resetsInHours*60);else if(e.resetsAt){let n=new Date(e.resetsAt).getTime()-Date.now();t=n>0?Math.ceil(n/6e4):0}if(t==null)return null;if(t<=0)return`now`;let n=Math.floor(t/1440),r=Math.floor(t%1440/60),i=t%60;return n>0?i>0?`${n}d ${r}h ${i}m`:r>0?`${n}d ${r}h`:`${n}d`:r>0?i>0?`${r}h ${i}m`:`${r}h`:`${i}m`}function g(e){let t=e-Date.now();if(t<=0)return`expired`;let n=Math.ceil(t/6e4),r=Math.floor(n/60),i=Math.floor(r/24);return i>0?`${i}d ${r%24}h`:r>0?`${r}h ${n%60}m`:`${n}m`}function _(e){if(!e)return{label:`unknown`,tip:`No account info available`,color:`text-text-subtle`};if(!e.expiresAt)return{label:`key`,tip:`API key (no expiry)`,color:`text-text-subtle`};let t=e.expiresAt*1e3<Date.now();return t&&e.hasRefreshToken?{label:`expired`,tip:`Token expired but has refresh token — will auto-renew`,color:`text-warning`}:t?{label:`expired`,tip:`Token expired, no refresh token`,color:`text-error`}:e.hasRefreshToken?{label:`long-lived`,tip:`OAuth token with refresh — long-lived`,color:`text-success`}:{label:`temp`,tip:`Temporary token without refresh — will expire`,color:`text-warning`}}function v(e){if(!e)return null;let t=Math.round((Date.now()-e)/1e3);if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60),i=n%60;return r<24?i>0?`${r}h ${i}m ago`:`${r}h ago`:`${Math.floor(r/24)}d ago`}var y=n();function b({label:e,pct:t,reset:n}){return(0,y.jsxs)(`div`,{className:`space-y-1`,"data-testid":`account-usage-bar`,children:[(0,y.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,y.jsx)(`span`,{className:`text-xs font-medium text-text-primary`,children:e}),n&&(0,y.jsxs)(`span`,{className:`text-[10px] text-text-subtle`,title:`Resets in`,children:[`↻ `,n]})]}),(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`div`,{className:`flex-1 h-2 rounded-full bg-border overflow-hidden`,children:t!=null&&(0,y.jsx)(`div`,{className:`h-full rounded-full transition-all ${m(t)}`,style:{width:`${Math.min(t,100)}%`}})}),(0,y.jsx)(`span`,{className:`text-xs font-medium tabular-nums w-10 text-right ${t==null?`text-text-subtle`:p(t)}`,children:t==null?`—`:`${t}%`})]})]})}function x({label:e,bucket:t}){return t?(0,y.jsx)(b,{label:e,pct:Math.round(t.utilization*100),reset:h(t)}):null}function S({description:e,onRefresh:t,refreshing:n,disabled:r,actions:i}){return(0,y.jsxs)(`section`,{className:`space-y-2`,children:[(0,y.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,y.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e}),(0,y.jsx)(o,{variant:`ghost`,size:`icon`,className:`size-8 shrink-0 cursor-pointer`,onClick:t,disabled:r||n,title:`Refresh`,"aria-label":`Refresh accounts`,children:(0,y.jsx)(s,{className:`size-4 ${n?`animate-spin`:``}`})})]}),(0,y.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:i})]})}function C({message:e,onDismiss:t}){return e?(0,y.jsxs)(`div`,{className:`flex items-start gap-2 text-xs p-2 rounded bg-muted`,role:`status`,children:[(0,y.jsx)(`span`,{className:`flex-1`,children:e}),(0,y.jsx)(`button`,{onClick:t,className:`shrink-0 text-muted-foreground hover:text-foreground cursor-pointer`,"aria-label":`Dismiss message`,children:(0,y.jsx)(a,{className:`size-3.5`})})]}):null}function w({children:e}){return(0,y.jsx)(`div`,{className:`flex gap-2 overflow-x-auto pb-1 -mx-1 px-1 snap-x snap-mandatory scrollbar-thin`,children:e})}function T({active:e,flash:t,dense:n,children:r,...i}){return(0,y.jsx)(`div`,{...i,className:[`rounded-md border transition-colors duration-500`,n?`p-2.5 space-y-1.5`:`p-3 space-y-2`,t?`bg-primary/10 border-primary/40`:``,e?`border-primary/30 bg-primary/5`:`border-border/50`,i.className??``].filter(Boolean).join(` `),children:r})}var E={readOnly:`min-w-[220px]`,withActions:`min-w-[300px]`};function D({entry:e,isActive:t,accountInfo:n,onToggle:a,toggling:o,onDelete:s,onExport:u,onViewProfile:d,flash:f,layout:p=`list`}){let{usage:m}=e,h=m.session||m.weekly||m.weeklyOpus||m.weeklySonnet,b=n?.status??e.accountStatus,S=!!(n&&!n.hasRefreshToken&&n.expiresAt&&n.expiresAt<Math.floor(Date.now()/1e3)),C=_(n),w=p===`list`?``:p===`grid`?`flex flex-col justify-evenly overflow-hidden min-h-0`:`shrink-0 snap-start ${a||s||u||d?E.withActions:E.readOnly}`;return(0,y.jsxs)(T,{active:t,flash:f,dense:p!==`list`,className:[w,S?`opacity-50`:``].filter(Boolean).join(` `)||void 0,"data-testid":`account-card`,"data-account-id":e.accountId,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`text-sm font-medium truncate flex-1 min-w-0`,children:e.accountLabel??e.accountId.slice(0,8)}),t&&(0,y.jsx)(`span`,{className:`text-[10px] text-primary shrink-0 font-medium`,children:`Active`}),S&&(0,y.jsx)(`span`,{className:`text-[10px] text-error shrink-0 font-medium`,children:`Expired`}),!e.isOAuth&&!S&&(0,y.jsx)(`span`,{className:`text-[10px] text-text-subtle shrink-0`,children:`API key`}),(0,y.jsxs)(`div`,{className:`flex items-center gap-0.5 shrink-0`,children:[!S&&d&&n?.profileData&&(0,y.jsx)(`button`,{className:`p-2 rounded cursor-pointer text-text-subtle hover:text-foreground hover:bg-surface-elevated transition-colors`,onClick:()=>d(n.profileData,e.accountId),title:`View profile`,"aria-label":`View profile`,children:(0,y.jsx)(i,{className:`size-4`})}),!S&&u&&e.isOAuth&&(0,y.jsx)(`button`,{className:`p-2 rounded cursor-pointer text-text-subtle hover:text-primary hover:bg-surface-elevated transition-colors`,onClick:()=>u(e.accountId),title:`Export this account`,"aria-label":`Export this account`,children:(0,y.jsx)(r,{className:`size-4`})}),!S&&a&&(0,y.jsx)(l,{checked:b!==`disabled`,onCheckedChange:()=>a(e.accountId,b),disabled:o||b===`cooldown`,"aria-label":b===`disabled`?`Enable account`:`Disable account`,className:`cursor-pointer`}),s&&(0,y.jsx)(`button`,{className:`p-2 rounded cursor-pointer text-text-subtle hover:text-error hover:bg-surface-elevated transition-colors`,onClick:()=>s(e.accountId,e.accountLabel??e.accountId.slice(0,8)),title:`Remove account`,"aria-label":`Remove account`,children:(0,y.jsx)(c,{className:`size-4`})})]})]}),h?(0,y.jsxs)(`div`,{className:`space-y-2`,children:[(0,y.jsx)(x,{label:`5-Hour Session`,bucket:m.session}),(0,y.jsx)(x,{label:`Weekly`,bucket:m.weekly}),(0,y.jsx)(x,{label:`Weekly (Opus)`,bucket:m.weeklyOpus}),(0,y.jsx)(x,{label:`Weekly (Sonnet)`,bucket:m.weeklySonnet})]}):(0,y.jsx)(`p`,{className:`text-xs text-text-subtle`,children:e.isOAuth?`No usage data yet`:`Usage tracking not available for API keys`}),(0,y.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] text-text-subtle flex-wrap`,children:[m.lastFetchedAt&&(0,y.jsxs)(`span`,{title:`Last usage data update`,children:[`↻ `,v(new Date(m.lastFetchedAt).getTime())]}),n?.expiresAt&&n.expiresAt*1e3>Date.now()&&(0,y.jsxs)(`span`,{title:`Token expires in`,children:[`⏱ `,g(n.expiresAt*1e3)]}),(0,y.jsxs)(`span`,{className:C.color,title:C.tip,children:[`© `,C.label]})]})]})}var O=e(t(),1);function k(e){let t=e.usage;return[t.session?.utilization,t.weekly?.utilization,t.weeklyOpus?.utilization,t.weeklySonnet?.utilization].join(`|`)}function A(e=!0){let[t,n]=(0,O.useState)([]),[r,i]=(0,O.useState)([]),[a,o]=(0,O.useState)(null),[s,c]=(0,O.useState)(!0),[l,p]=(0,O.useState)(!1),[m,h]=(0,O.useState)(new Set),g=(0,O.useRef)([]),_=(0,O.useRef)(void 0),v=(0,O.useCallback)(async()=>{let e=g.current.length>0;e?p(!0):c(!0);let[t,r,a]=await Promise.allSettled([f(),u(),d()]);if(t.status===`fulfilled`){let r=t.value;if(e){let e=new Map(g.current.map(e=>[e.accountId,k(e)])),t=new Set(r.filter(t=>e.get(t.accountId)!==k(t)).map(e=>e.accountId));t.size>0&&(h(t),clearTimeout(_.current),_.current=setTimeout(()=>h(new Set),1500))}g.current=r,n(r)}r.status===`fulfilled`&&i(r.value),a.status===`fulfilled`&&o(a.value?.id??null),c(!1),p(!1)},[]);return(0,O.useEffect)(()=>(e&&v(),()=>clearTimeout(_.current)),[e,v]),{usages:t,accounts:r,activeAccountId:a,initialLoading:s,refreshing:l,flashIds:m,reload:v}}export{S as a,b as c,T as i,v as l,D as n,C as o,w as r,x as s,A as t};
1
+ import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t,x as n}from"./vendor-markdown-Ls5AcU91.js";import{t as r}from"./download-DG3_9xXy.js";import{t as i}from"./eye-gWwaF4Lg.js";import{t as a}from"./x-YDu4m2Iq.js";import{t as o}from"./button-2WCAS8dI.js";import{G as s,Pn as c,qn as l}from"./index-DB-bD6Cx.js";import{getAccounts as u,getActiveAccount as d,getAllAccountUsages as f}from"./api-settings-BVfemzZW.js";function p(e){return e>=90?`text-error`:e>=70?`text-warning`:`text-success`}function m(e){return e>=90?`bg-error`:e>=70?`bg-warning`:`bg-success`}function h(e){if(!e)return null;let t=null;if(e.resetsInMinutes!=null)t=e.resetsInMinutes;else if(e.resetsInHours!=null)t=Math.round(e.resetsInHours*60);else if(e.resetsAt){let n=new Date(e.resetsAt).getTime()-Date.now();t=n>0?Math.ceil(n/6e4):0}if(t==null)return null;if(t<=0)return`now`;let n=Math.floor(t/1440),r=Math.floor(t%1440/60),i=t%60;return n>0?i>0?`${n}d ${r}h ${i}m`:r>0?`${n}d ${r}h`:`${n}d`:r>0?i>0?`${r}h ${i}m`:`${r}h`:`${i}m`}function g(e){let t=e-Date.now();if(t<=0)return`expired`;let n=Math.ceil(t/6e4),r=Math.floor(n/60),i=Math.floor(r/24);return i>0?`${i}d ${r%24}h`:r>0?`${r}h ${n%60}m`:`${n}m`}function _(e){if(!e)return{label:`unknown`,tip:`No account info available`,color:`text-text-subtle`};if(!e.expiresAt)return{label:`key`,tip:`API key (no expiry)`,color:`text-text-subtle`};let t=e.expiresAt*1e3<Date.now();return t&&e.hasRefreshToken?{label:`expired`,tip:`Token expired but has refresh token — will auto-renew`,color:`text-warning`}:t?{label:`expired`,tip:`Token expired, no refresh token`,color:`text-error`}:e.hasRefreshToken?{label:`long-lived`,tip:`OAuth token with refresh — long-lived`,color:`text-success`}:{label:`temp`,tip:`Temporary token without refresh — will expire`,color:`text-warning`}}function v(e){if(!e)return null;let t=Math.round((Date.now()-e)/1e3);if(t<5)return`just now`;if(t<60)return`${t}s ago`;let n=Math.floor(t/60);if(n<60)return`${n}m ago`;let r=Math.floor(n/60),i=n%60;return r<24?i>0?`${r}h ${i}m ago`:`${r}h ago`:`${Math.floor(r/24)}d ago`}var y=n();function b({label:e,pct:t,reset:n}){return(0,y.jsxs)(`div`,{className:`space-y-1`,"data-testid":`account-usage-bar`,children:[(0,y.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,y.jsx)(`span`,{className:`text-xs font-medium text-text-primary`,children:e}),n&&(0,y.jsxs)(`span`,{className:`text-[10px] text-text-subtle`,title:`Resets in`,children:[`↻ `,n]})]}),(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`div`,{className:`flex-1 h-2 rounded-full bg-border overflow-hidden`,children:t!=null&&(0,y.jsx)(`div`,{className:`h-full rounded-full transition-all ${m(t)}`,style:{width:`${Math.min(t,100)}%`}})}),(0,y.jsx)(`span`,{className:`text-xs font-medium tabular-nums w-10 text-right ${t==null?`text-text-subtle`:p(t)}`,children:t==null?`—`:`${t}%`})]})]})}function x({label:e,bucket:t}){return t?(0,y.jsx)(b,{label:e,pct:Math.round(t.utilization*100),reset:h(t)}):null}function S({description:e,onRefresh:t,refreshing:n,disabled:r,actions:i}){return(0,y.jsxs)(`section`,{className:`space-y-2`,children:[(0,y.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,y.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e}),(0,y.jsx)(o,{variant:`ghost`,size:`icon`,className:`size-8 shrink-0 cursor-pointer`,onClick:t,disabled:r||n,title:`Refresh`,"aria-label":`Refresh accounts`,children:(0,y.jsx)(l,{className:`size-4 ${n?`animate-spin`:``}`})})]}),(0,y.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:i})]})}function C({message:e,onDismiss:t}){return e?(0,y.jsxs)(`div`,{className:`flex items-start gap-2 text-xs p-2 rounded bg-muted`,role:`status`,children:[(0,y.jsx)(`span`,{className:`flex-1`,children:e}),(0,y.jsx)(`button`,{onClick:t,className:`shrink-0 text-muted-foreground hover:text-foreground cursor-pointer`,"aria-label":`Dismiss message`,children:(0,y.jsx)(a,{className:`size-3.5`})})]}):null}function w({children:e}){return(0,y.jsx)(`div`,{className:`flex gap-2 overflow-x-auto pb-1 -mx-1 px-1 snap-x snap-mandatory scrollbar-thin`,children:e})}function T({active:e,flash:t,dense:n,children:r,...i}){return(0,y.jsx)(`div`,{...i,className:[`rounded-md border transition-colors duration-500`,n?`p-2.5 space-y-1.5`:`p-3 space-y-2`,t?`bg-primary/10 border-primary/40`:``,e?`border-primary/30 bg-primary/5`:`border-border/50`,i.className??``].filter(Boolean).join(` `),children:r})}var E={readOnly:`min-w-[220px]`,withActions:`min-w-[300px]`};function D({entry:e,isActive:t,accountInfo:n,onToggle:a,toggling:o,onDelete:l,onExport:u,onViewProfile:d,flash:f,layout:p=`list`}){let{usage:m}=e,h=m.session||m.weekly||m.weeklyOpus||m.weeklySonnet,b=n?.status??e.accountStatus,S=!!(n&&!n.hasRefreshToken&&n.expiresAt&&n.expiresAt<Math.floor(Date.now()/1e3)),C=_(n),w=p===`list`?``:p===`grid`?`flex flex-col justify-evenly overflow-hidden min-h-0`:`shrink-0 snap-start ${a||l||u||d?E.withActions:E.readOnly}`;return(0,y.jsxs)(T,{active:t,flash:f,dense:p!==`list`,className:[w,S?`opacity-50`:``].filter(Boolean).join(` `)||void 0,"data-testid":`account-card`,"data-account-id":e.accountId,children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(`span`,{className:`text-sm font-medium truncate flex-1 min-w-0`,children:e.accountLabel??e.accountId.slice(0,8)}),t&&(0,y.jsx)(`span`,{className:`text-[10px] text-primary shrink-0 font-medium`,children:`Active`}),S&&(0,y.jsx)(`span`,{className:`text-[10px] text-error shrink-0 font-medium`,children:`Expired`}),!e.isOAuth&&!S&&(0,y.jsx)(`span`,{className:`text-[10px] text-text-subtle shrink-0`,children:`API key`}),(0,y.jsxs)(`div`,{className:`flex items-center gap-0.5 shrink-0`,children:[!S&&d&&n?.profileData&&(0,y.jsx)(`button`,{className:`p-2 rounded cursor-pointer text-text-subtle hover:text-foreground hover:bg-surface-elevated transition-colors`,onClick:()=>d(n.profileData,e.accountId),title:`View profile`,"aria-label":`View profile`,children:(0,y.jsx)(i,{className:`size-4`})}),!S&&u&&e.isOAuth&&(0,y.jsx)(`button`,{className:`p-2 rounded cursor-pointer text-text-subtle hover:text-primary hover:bg-surface-elevated transition-colors`,onClick:()=>u(e.accountId),title:`Export this account`,"aria-label":`Export this account`,children:(0,y.jsx)(r,{className:`size-4`})}),!S&&a&&(0,y.jsx)(s,{checked:b!==`disabled`,onCheckedChange:()=>a(e.accountId,b),disabled:o||b===`cooldown`,"aria-label":b===`disabled`?`Enable account`:`Disable account`,className:`cursor-pointer`}),l&&(0,y.jsx)(`button`,{className:`p-2 rounded cursor-pointer text-text-subtle hover:text-error hover:bg-surface-elevated transition-colors`,onClick:()=>l(e.accountId,e.accountLabel??e.accountId.slice(0,8)),title:`Remove account`,"aria-label":`Remove account`,children:(0,y.jsx)(c,{className:`size-4`})})]})]}),h?(0,y.jsxs)(`div`,{className:`space-y-2`,children:[(0,y.jsx)(x,{label:`5-Hour Session`,bucket:m.session}),(0,y.jsx)(x,{label:`Weekly`,bucket:m.weekly}),(0,y.jsx)(x,{label:`Weekly (Opus)`,bucket:m.weeklyOpus}),(0,y.jsx)(x,{label:`Weekly (Sonnet)`,bucket:m.weeklySonnet})]}):(0,y.jsx)(`p`,{className:`text-xs text-text-subtle`,children:e.isOAuth?`No usage data yet`:`Usage tracking not available for API keys`}),(0,y.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] text-text-subtle flex-wrap`,children:[m.lastFetchedAt&&(0,y.jsxs)(`span`,{title:`Last usage data update`,children:[`↻ `,v(new Date(m.lastFetchedAt).getTime())]}),n?.expiresAt&&n.expiresAt*1e3>Date.now()&&(0,y.jsxs)(`span`,{title:`Token expires in`,children:[`⏱ `,g(n.expiresAt*1e3)]}),(0,y.jsxs)(`span`,{className:C.color,title:C.tip,children:[`© `,C.label]})]})]})}var O=e(t(),1);function k(e){let t=e.usage;return[t.session?.utilization,t.weekly?.utilization,t.weeklyOpus?.utilization,t.weeklySonnet?.utilization].join(`|`)}function A(e=!0){let[t,n]=(0,O.useState)([]),[r,i]=(0,O.useState)([]),[a,o]=(0,O.useState)(null),[s,c]=(0,O.useState)(!0),[l,p]=(0,O.useState)(!1),[m,h]=(0,O.useState)(new Set),g=(0,O.useRef)([]),_=(0,O.useRef)(void 0),v=(0,O.useCallback)(async()=>{let e=g.current.length>0;e?p(!0):c(!0);let[t,r,a]=await Promise.allSettled([f(),u(),d()]);if(t.status===`fulfilled`){let r=t.value;if(e){let e=new Map(g.current.map(e=>[e.accountId,k(e)])),t=new Set(r.filter(t=>e.get(t.accountId)!==k(t)).map(e=>e.accountId));t.size>0&&(h(t),clearTimeout(_.current),_.current=setTimeout(()=>h(new Set),1500))}g.current=r,n(r)}r.status===`fulfilled`&&i(r.value),a.status===`fulfilled`&&o(a.value?.id??null),c(!1),p(!1)},[]);return(0,O.useEffect)(()=>(e&&v(),()=>clearTimeout(_.current)),[e,v]),{usages:t,accounts:r,activeAccountId:a,initialLoading:s,refreshing:l,flashIds:m,reload:v}}export{S as a,b as c,T as i,v as l,D as n,C as o,w as r,x as s,A as t,h as u};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t}from"./vendor-markdown-Ls5AcU91.js";import{t as n}from"./settings-store-DWUx3865.js";import{r,t as i}from"./apply-theme-r8tKDrCR.js";import{t as a}from"./resolve-theme-b_yGlUFQ.js";import{o}from"./index-DB-bD6Cx.js";var s=e(t(),1);function c(){let e=n(e=>e.themeStyle),t=n(e=>e.themeMode),c=n(e=>e.customThemeId),l=n(e=>e.customThemes),u=()=>o(r()??a(e,t,l,c)),[d,f]=(0,s.useState)(u);return(0,s.useEffect)(()=>{f(u());let e=()=>f(u());return window.addEventListener(i,e),()=>window.removeEventListener(i,e)},[e,t,c,l]),d}export{c as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t,x as n}from"./vendor-markdown-Ls5AcU91.js";import{t as r}from"./createLucideIcon-D8pyde1A.js";import{n as i}from"./api-client-oY1tC3tM.js";import{t as a}from"./settings-store-Brjd0QnO.js";import{t as o}from"./ws-auth-Dawx17PM.js";import{v as s}from"./index-C_s5DxFQ.js";var c=r(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),l=r(`monitor-x`,[[`path`,{d:`m14.5 12.5-5-5`,key:`1jahn5`}],[`path`,{d:`m9.5 12.5 5-5`,key:`1k2t7b`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}]]);function u(e,t,n=`8081`){let r=o(`/ws/remote-desktop`),i=e.protocol===`https:`?`wss:`:`ws:`;return t&&e.protocol!==`https:`?`ws://${e.hostname}:${n}${r}`:`${i}//${e.host}${r}`}var d=30;function f(e,t=d){return Math.round(e*1e6/t)}var p=e(t(),1);function m(e,t){return t||e}function h(e){let[t,n]=(0,p.useState)(`idle`),[r,i]=(0,p.useState)(null),a=(0,p.useRef)(null),o=(0,p.useRef)(null),s=(0,p.useRef)(!1),c=(0,p.useRef)(0),l=(0,p.useRef)(0),u=(0,p.useRef)(null),d=(0,p.useRef)(!1),h=(0,p.useCallback)(e=>{n(`error`),i(e)},[]),g=(0,p.useCallback)(async t=>{if(u.current=t,typeof VideoDecoder>`u`){n(`unsupported`),i(`This browser has no WebCodecs VideoDecoder — try Chrome, Edge, or Safari 16.4+.`);return}let r={codec:t,optimizeForLatency:!0};try{if(!(await VideoDecoder.isConfigSupported(r)).supported){n(`unsupported`),i(`This browser's decoder does not support ${t}.`);return}}catch(e){h(e.message);return}a.current?.close(),s.current=!1,l.current=0;let f=new VideoDecoder({output:t=>{c.current+=1;let n=e.current;n&&((n.width!==t.displayWidth||n.height!==t.displayHeight)&&(n.width=t.displayWidth,n.height=t.displayHeight),o.current||=n.getContext(`2d`),o.current?.drawImage(t,0,0,n.width,n.height)),t.close()},error:e=>_(e.message)});try{f.configure(r)}catch(e){h(e.message);return}a.current=f,d.current=!0,n(`ready`),i(null)},[e,h]),_=(0,p.useCallback)(e=>{if(!d.current)return;let t=u.current;if(!t){h(e);return}try{a.current?.close()}catch{}a.current=null,g(t)},[g,h]);return{status:t,errorMessage:r,configure:g,decodeAccessUnit:(0,p.useCallback)((e,t)=>{let n=a.current;if(!(!n||n.state!==`configured`)&&m(s.current,t)){t&&(s.current=!0);try{n.decode(new EncodedVideoChunk({type:t?`key`:`delta`,timestamp:f(l.current++),data:e}))}catch(e){_(e.message)}}},[_]),reset:(0,p.useCallback)(()=>{d.current=!1;try{a.current?.close()}catch{}a.current=null,s.current=!1,c.current=0,l.current=0,n(`idle`),i(null)},[]),getFrameCount:(0,p.useCallback)(()=>c.current,[])}}var g=5e3;function _(e,{displayId:t}={}){let n=(0,p.useRef)(null),r=(0,p.useRef)(0),[a,o]=(0,p.useState)(`connecting`),[s,c]=(0,p.useState)(null),[l,d]=(0,p.useState)(0),f=h(e),m=(0,p.useCallback)(e=>{let t=n.current;t?.readyState===WebSocket.OPEN&&t.send(JSON.stringify(e))},[]);(0,p.useEffect)(()=>{let e=!1,a=null;o(`connecting`),c(null),r.current=0,f.reset(),(async()=>{let s;try{s=(await i.post(`/api/remote-desktop/session`)).nonce}catch(t){e||(o(`error`),c(t.message));return}if(e)return;let l=u(window.location,!1,void 0),d=new WebSocket(l);d.binaryType=`arraybuffer`,n.current=d,d.onopen=()=>{d.send(JSON.stringify({type:`auth`,nonce:s,...t?{displayId:t}:{}})),a=setInterval(()=>m({type:`ping`}),g)},d.onmessage=t=>{if(typeof t.data==`string`){let n;try{n=JSON.parse(t.data)}catch{return}n.type===`config`&&typeof n.codec==`string`?f.configure(n.codec).then(()=>{e||o(`streaming`)}):n.type===`error`&&(o(`error`),c(typeof n.message==`string`?n.message:`Server error`));return}let n=new Uint8Array(t.data);n.length<1||(r.current+=n.length,f.decodeAccessUnit(n.subarray(1),n[0]===1))},d.onerror=()=>{e||(o(`error`),c(`WebSocket error`))},d.onclose=()=>{e||o(e=>e===`error`?e:`closed`)}})();let s=()=>{if(document.hidden||e)return;let t=n.current;t&&t.readyState===WebSocket.OPEN?t.send(JSON.stringify({type:`ping`})):d(e=>e+1)};return document.addEventListener(`visibilitychange`,s),()=>{e=!0,document.removeEventListener(`visibilitychange`,s),a&&clearInterval(a);try{n.current?.close()}catch{}n.current=null;try{f.reset()}catch{}}},[l,t]);let _=(0,p.useCallback)(()=>d(e=>e+1),[]),v=(0,p.useCallback)(()=>r.current,[]);return{connState:a,errorMessage:s,decoderStatus:f.status,decoderErrorMessage:f.errorMessage,sendMessage:m,reconnect:_,getTotalBytes:v,getFrameCount:f.getFrameCount}}function v(e){return Math.min(Math.max(e,0),1)}function y(e,t,n){let r=n.width>0?(e-n.left)/n.width:0,i=n.height>0?(t-n.top)/n.height:0;return{xFrac:v(r),yFrac:v(i)}}function b(e,t,n,r){let i=r.scale||1,a=n.left+n.width/2,o=n.top+n.height/2;return y(a+(e-a-r.panX)/i,o+(t-o-r.panY)/i,n)}function x(e,t,n){if(t<=0||n<=0||e.width<=0||e.height<=0)return e;let r=e.width/e.height,i=t/n;if(i>r){let t=e.width/i;return{left:e.left,top:e.top+(e.height-t)/2,width:e.width,height:t}}let a=e.height*i;return{left:e.left+(e.width-a)/2,top:e.top,width:a,height:e.height}}var S={fps:0,kbps:0};function C(e,t){let n=t.atMs-e.atMs;if(n<=0)return S;let r=n/1e3,i=Math.max(0,t.frameCount-e.frameCount),a=Math.max(0,t.totalBytes-e.totalBytes);return{fps:i/r,kbps:a/1024/r}}var w=n(),T=500;function E({canvasRef:e,getFrameCount:t,getTotalBytes:n,positionClassName:r=`left-1 top-1`}){let i=a(e=>e.remoteDesktopStatsVisible),[o,s]=(0,p.useState)({fps:0,kbps:0,width:0,height:0}),c=(0,p.useRef)({frameCount:0,totalBytes:0,atMs:0});return(0,p.useEffect)(()=>{if(!i)return;c.current={frameCount:t(),totalBytes:n(),atMs:performance.now()};let r=setInterval(()=>{let r={frameCount:t(),totalBytes:n(),atMs:performance.now()},{fps:i,kbps:a}=C(c.current,r);c.current=r;let o=e.current;s({fps:i,kbps:a,width:o?.width??0,height:o?.height??0})},T);return()=>clearInterval(r)},[i,e,t,n]),i?(0,w.jsxs)(`div`,{className:`pointer-events-none absolute z-40 rounded bg-black/60 px-1.5 py-0.5 font-mono text-[10px] text-white/80 ${r}`,"data-testid":`remote-desktop-stats-overlay`,children:[Math.round(o.fps),` fps · `,Math.round(o.kbps),` KB/s · `,o.width,`×`,o.height]}):null}function D(){let{caps:e}=s(!1),t=e?.displays??[],[n,r]=(0,p.useState)(void 0),i=t.find(e=>e.id===n)??t.find(e=>e.primary)??t[0];return{displays:t,displayId:n,current:i,select:r,next:(0,p.useCallback)(()=>{t.length<2||r(t[(t.findIndex(e=>e.id===i?.id)+1)%t.length]?.id)},[t,i])}}export{x as a,c,b as i,E as n,_ as o,y as r,l as s,D as t};
1
+ import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t,x as n}from"./vendor-markdown-Ls5AcU91.js";import{t as r}from"./createLucideIcon-D8pyde1A.js";import{n as i}from"./api-client-oY1tC3tM.js";import{t as a}from"./settings-store-DWUx3865.js";import{t as o}from"./ws-auth-ZSZkAT6p.js";import{y as s}from"./index-DB-bD6Cx.js";var c=r(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),l=r(`monitor-x`,[[`path`,{d:`m14.5 12.5-5-5`,key:`1jahn5`}],[`path`,{d:`m9.5 12.5 5-5`,key:`1k2t7b`}],[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}]]);function u(e,t,n=`8081`){let r=o(`/ws/remote-desktop`),i=e.protocol===`https:`?`wss:`:`ws:`;return t&&e.protocol!==`https:`?`ws://${e.hostname}:${n}${r}`:`${i}//${e.host}${r}`}var d=30;function f(e,t=d){return Math.round(e*1e6/t)}var p=e(t(),1);function m(e,t){return t||e}function h(e){let[t,n]=(0,p.useState)(`idle`),[r,i]=(0,p.useState)(null),a=(0,p.useRef)(null),o=(0,p.useRef)(null),s=(0,p.useRef)(!1),c=(0,p.useRef)(0),l=(0,p.useRef)(0),u=(0,p.useRef)(null),d=(0,p.useRef)(!1),h=(0,p.useCallback)(e=>{n(`error`),i(e)},[]),g=(0,p.useCallback)(async t=>{if(u.current=t,typeof VideoDecoder>`u`){n(`unsupported`),i(`This browser has no WebCodecs VideoDecoder — try Chrome, Edge, or Safari 16.4+.`);return}let r={codec:t,optimizeForLatency:!0};try{if(!(await VideoDecoder.isConfigSupported(r)).supported){n(`unsupported`),i(`This browser's decoder does not support ${t}.`);return}}catch(e){h(e.message);return}a.current?.close(),s.current=!1,l.current=0;let f=new VideoDecoder({output:t=>{c.current+=1;let n=e.current;n&&((n.width!==t.displayWidth||n.height!==t.displayHeight)&&(n.width=t.displayWidth,n.height=t.displayHeight),o.current||=n.getContext(`2d`),o.current?.drawImage(t,0,0,n.width,n.height)),t.close()},error:e=>_(e.message)});try{f.configure(r)}catch(e){h(e.message);return}a.current=f,d.current=!0,n(`ready`),i(null)},[e,h]),_=(0,p.useCallback)(e=>{if(!d.current)return;let t=u.current;if(!t){h(e);return}try{a.current?.close()}catch{}a.current=null,g(t)},[g,h]);return{status:t,errorMessage:r,configure:g,decodeAccessUnit:(0,p.useCallback)((e,t)=>{let n=a.current;if(!(!n||n.state!==`configured`)&&m(s.current,t)){t&&(s.current=!0);try{n.decode(new EncodedVideoChunk({type:t?`key`:`delta`,timestamp:f(l.current++),data:e}))}catch(e){_(e.message)}}},[_]),reset:(0,p.useCallback)(()=>{d.current=!1;try{a.current?.close()}catch{}a.current=null,s.current=!1,c.current=0,l.current=0,n(`idle`),i(null)},[]),getFrameCount:(0,p.useCallback)(()=>c.current,[])}}var g=5e3;function _(e,{displayId:t}={}){let n=(0,p.useRef)(null),r=(0,p.useRef)(0),[a,o]=(0,p.useState)(`connecting`),[s,c]=(0,p.useState)(null),[l,d]=(0,p.useState)(0),f=h(e),m=(0,p.useCallback)(e=>{let t=n.current;t?.readyState===WebSocket.OPEN&&t.send(JSON.stringify(e))},[]);(0,p.useEffect)(()=>{let e=!1,a=null;o(`connecting`),c(null),r.current=0,f.reset(),(async()=>{let s;try{s=(await i.post(`/api/remote-desktop/session`)).nonce}catch(t){e||(o(`error`),c(t.message));return}if(e)return;let l=u(window.location,!1,void 0),d=new WebSocket(l);d.binaryType=`arraybuffer`,n.current=d,d.onopen=()=>{d.send(JSON.stringify({type:`auth`,nonce:s,...t?{displayId:t}:{}})),a=setInterval(()=>m({type:`ping`}),g)},d.onmessage=t=>{if(typeof t.data==`string`){let n;try{n=JSON.parse(t.data)}catch{return}n.type===`config`&&typeof n.codec==`string`?f.configure(n.codec).then(()=>{e||o(`streaming`)}):n.type===`error`&&(o(`error`),c(typeof n.message==`string`?n.message:`Server error`));return}let n=new Uint8Array(t.data);n.length<1||(r.current+=n.length,f.decodeAccessUnit(n.subarray(1),n[0]===1))},d.onerror=()=>{e||(o(`error`),c(`WebSocket error`))},d.onclose=()=>{e||o(e=>e===`error`?e:`closed`)}})();let s=()=>{if(document.hidden||e)return;let t=n.current;t&&t.readyState===WebSocket.OPEN?t.send(JSON.stringify({type:`ping`})):d(e=>e+1)};return document.addEventListener(`visibilitychange`,s),()=>{e=!0,document.removeEventListener(`visibilitychange`,s),a&&clearInterval(a);try{n.current?.close()}catch{}n.current=null;try{f.reset()}catch{}}},[l,t]);let _=(0,p.useCallback)(()=>d(e=>e+1),[]),v=(0,p.useCallback)(()=>r.current,[]);return{connState:a,errorMessage:s,decoderStatus:f.status,decoderErrorMessage:f.errorMessage,sendMessage:m,reconnect:_,getTotalBytes:v,getFrameCount:f.getFrameCount}}function v(e){return Math.min(Math.max(e,0),1)}function y(e,t,n){let r=n.width>0?(e-n.left)/n.width:0,i=n.height>0?(t-n.top)/n.height:0;return{xFrac:v(r),yFrac:v(i)}}function b(e,t,n,r){let i=r.scale||1,a=n.left+n.width/2,o=n.top+n.height/2;return y(a+(e-a-r.panX)/i,o+(t-o-r.panY)/i,n)}function x(e,t,n){if(t<=0||n<=0||e.width<=0||e.height<=0)return e;let r=e.width/e.height,i=t/n;if(i>r){let t=e.width/i;return{left:e.left,top:e.top+(e.height-t)/2,width:e.width,height:t}}let a=e.height*i;return{left:e.left+(e.width-a)/2,top:e.top,width:a,height:e.height}}var S={fps:0,kbps:0};function C(e,t){let n=t.atMs-e.atMs;if(n<=0)return S;let r=n/1e3,i=Math.max(0,t.frameCount-e.frameCount),a=Math.max(0,t.totalBytes-e.totalBytes);return{fps:i/r,kbps:a/1024/r}}var w=n(),T=500;function E({canvasRef:e,getFrameCount:t,getTotalBytes:n,positionClassName:r=`left-1 top-1`}){let i=a(e=>e.remoteDesktopStatsVisible),[o,s]=(0,p.useState)({fps:0,kbps:0,width:0,height:0}),c=(0,p.useRef)({frameCount:0,totalBytes:0,atMs:0});return(0,p.useEffect)(()=>{if(!i)return;c.current={frameCount:t(),totalBytes:n(),atMs:performance.now()};let r=setInterval(()=>{let r={frameCount:t(),totalBytes:n(),atMs:performance.now()},{fps:i,kbps:a}=C(c.current,r);c.current=r;let o=e.current;s({fps:i,kbps:a,width:o?.width??0,height:o?.height??0})},T);return()=>clearInterval(r)},[i,e,t,n]),i?(0,w.jsxs)(`div`,{className:`pointer-events-none absolute z-40 rounded bg-black/60 px-1.5 py-0.5 font-mono text-[10px] text-white/80 ${r}`,"data-testid":`remote-desktop-stats-overlay`,children:[Math.round(o.fps),` fps · `,Math.round(o.kbps),` KB/s · `,o.width,`×`,o.height]}):null}function D(){let{caps:e}=s(!1),t=e?.displays??[],[n,r]=(0,p.useState)(void 0),i=t.find(e=>e.id===n)??t.find(e=>e.primary)??t[0];return{displays:t,displayId:n,current:i,select:r,next:(0,p.useCallback)(()=>{t.length<2||r(t[(t.findIndex(e=>e.id===i?.id)+1)%t.length]?.id)},[t,i])}}export{x as a,c,b as i,E as n,_ as o,y as r,l as s,D as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t}from"./vendor-markdown-Ls5AcU91.js";import{i as n}from"./index-C_s5DxFQ.js";var r=e(t(),1);function i({url:e,onMessage:t,autoConnect:i=!0}){let a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let r=new n(e);return a.current=r,t&&r.onMessage(t),i&&r.connect(),()=>{r.disconnect(),a.current=null}},[e,i]),{send:(0,r.useCallback)(e=>{a.current?.send(e)},[]),connect:(0,r.useCallback)(()=>{a.current?.connect()},[]),disconnect:(0,r.useCallback)(()=>{a.current?.disconnect()},[])}}export{i as t};
1
+ import{o as e}from"./rolldown-runtime-FhOqtrmT.js";import{S as t}from"./vendor-markdown-Ls5AcU91.js";import{i as n}from"./index-DB-bD6Cx.js";var r=e(t(),1);function i({url:e,onMessage:t,autoConnect:i=!0}){let a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let r=new n(e);return a.current=r,t&&r.onMessage(t),i&&r.connect(),()=>{r.disconnect(),a.current=null}},[e,i]),{send:(0,r.useCallback)(e=>{a.current?.send(e)},[]),connect:(0,r.useCallback)(()=>{a.current?.connect()},[]),disconnect:(0,r.useCallback)(()=>{a.current?.disconnect()},[])}}export{i as t};