cognova 0.2.2 → 0.2.3

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 (508) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/-AsXrBBy.js +1 -0
  3. package/.output/public/_nuxt/2W1RPpXM.js +71 -0
  4. package/.output/public/_nuxt/{C4pxqdgg.js → 5UFq_rDn.js} +1 -1
  5. package/.output/public/_nuxt/5Zh-9l8_.js +1 -0
  6. package/.output/public/_nuxt/{DK9jxJ0g.js → 90UksHlj.js} +1 -1
  7. package/.output/public/_nuxt/{9IQmsEjr.js → 9QKmiSP_.js} +1 -1
  8. package/.output/public/_nuxt/{BOj6t-oo.js → ARbTpeGy.js} +1 -1
  9. package/.output/public/_nuxt/{DyRelyfs.js → ApfLnl06.js} +1 -1
  10. package/.output/public/_nuxt/{DznawRFW.js → B-2BuR5g.js} +1 -1
  11. package/.output/public/_nuxt/B4u7Mczo.js +1 -0
  12. package/.output/public/_nuxt/{DAQhmSv4.js → B5dI_yLq.js} +1 -1
  13. package/.output/public/_nuxt/{Bm9LyG4F.js → B6fnZcA6.js} +1 -1
  14. package/.output/public/_nuxt/{9QnH0xQM.js → B7uMSBlN.js} +1 -1
  15. package/.output/public/_nuxt/BBiRyPlN.js +1 -0
  16. package/.output/public/_nuxt/{iBGCpHdw.js → BF7413u4.js} +2 -2
  17. package/.output/public/_nuxt/{4MiwzAAt.js → BGtUoCgi.js} +2 -2
  18. package/.output/public/_nuxt/{CxuZBC8n.js → BHe4VLtR.js} +1 -1
  19. package/.output/public/_nuxt/{D3RiUGdz.js → BIMBp1Tj.js} +1 -1
  20. package/.output/public/_nuxt/{g20UHUCv.js → BIvPdoE3.js} +1 -1
  21. package/.output/public/_nuxt/BKaRtCjP.js +1 -0
  22. package/.output/public/_nuxt/BLmc9T7l.js +1 -0
  23. package/.output/public/_nuxt/BMdnU6BF.js +1 -0
  24. package/.output/public/_nuxt/{CKkC3Ptm.js → BOgdaA_8.js} +1 -1
  25. package/.output/public/_nuxt/{BffWCM73.js → BQZfTrUg.js} +1 -1
  26. package/.output/public/_nuxt/BQnublTW.js +1 -0
  27. package/.output/public/_nuxt/BSsvedap.js +1 -0
  28. package/.output/public/_nuxt/{Ci7UEZQh.js → BVypxKRT.js} +1 -1
  29. package/.output/public/_nuxt/{CYP_MLH8.js → BWqJFnZy.js} +1 -1
  30. package/.output/public/_nuxt/BXxYdXMr.js +1 -0
  31. package/.output/public/_nuxt/{D_3Rq1BS.js → B_17gAr_.js} +1 -1
  32. package/.output/public/_nuxt/B_qzFVK_.js +1 -0
  33. package/.output/public/_nuxt/{BqKFIuRj.js → BbRPwpIX.js} +1 -1
  34. package/.output/public/_nuxt/BhrzKbv9.js +1 -0
  35. package/.output/public/_nuxt/{Cqy_L_ip.js → Bl6LNGlA.js} +1 -1
  36. package/.output/public/_nuxt/{Fukkqjkf.js → BlPToGni.js} +1 -1
  37. package/.output/public/_nuxt/{DHKLCQRG.js → BlwHr46F.js} +1 -1
  38. package/.output/public/_nuxt/{C6aqGHu1.js → BnmwiZbF.js} +1 -1
  39. package/.output/public/_nuxt/BqtxLJaf.js +1 -0
  40. package/.output/public/_nuxt/{eko-0FUm.js → BrEXdify.js} +1 -1
  41. package/.output/public/_nuxt/{D3e44mCL.js → BtNnS4m3.js} +1 -1
  42. package/.output/public/_nuxt/{BCtfQCzC.js → BtVIBBUN.js} +1 -1
  43. package/.output/public/_nuxt/Bw5h4Jaf.js +1 -0
  44. package/.output/public/_nuxt/{FvlxxmNk.js → Bwcpy7gC.js} +2 -2
  45. package/.output/public/_nuxt/{Db2v8O7O.js → C0TUK31m.js} +1 -1
  46. package/.output/public/_nuxt/C1T4GK6c.js +1 -0
  47. package/.output/public/_nuxt/C2ANDZen.js +1 -0
  48. package/.output/public/_nuxt/{CqU2XbzO.js → C2RZSTuy.js} +1 -1
  49. package/.output/public/_nuxt/C3dYlP5x.js +1 -0
  50. package/.output/public/_nuxt/{m5kGCDpI.js → C3sh_tLi.js} +3 -3
  51. package/.output/public/_nuxt/{BjjCvHLT.js → C4zyxZG7.js} +1 -1
  52. package/.output/public/_nuxt/{C3FxIITy.js → C5I-XBZT.js} +1 -1
  53. package/.output/public/_nuxt/{yuf23kh9.js → CC4Goztu.js} +1 -1
  54. package/.output/public/_nuxt/CC77iplr.js +1 -0
  55. package/.output/public/_nuxt/{xuzLdW-o.js → CFyD2NHP.js} +1 -1
  56. package/.output/public/_nuxt/{CsJ9KhQ4.js → CGQDTeaO.js} +1 -1
  57. package/.output/public/_nuxt/{DnjGH3SQ.js → CHpwuMSk.js} +1 -1
  58. package/.output/public/_nuxt/CLzcRUcs.js +1 -0
  59. package/.output/public/_nuxt/CM2phu_3.js +1 -0
  60. package/.output/public/_nuxt/{Cr8ixbr1.js → CQpYRq61.js} +1 -1
  61. package/.output/public/_nuxt/{C0JKNMDO.js → CUN4bYcg.js} +1 -1
  62. package/.output/public/_nuxt/{CmzH6R-N.js → CXoITXft.js} +19 -19
  63. package/.output/public/_nuxt/CYjcQPl-.js +1 -0
  64. package/.output/public/_nuxt/{DGX0tzL8.js → CZ32KfaS.js} +1 -1
  65. package/.output/public/_nuxt/CclZMdca.js +1 -0
  66. package/.output/public/_nuxt/{C69W7k2j.js → CdpT_Vb6.js} +1 -1
  67. package/.output/public/_nuxt/CflRLvFC.js +1 -0
  68. package/.output/public/_nuxt/{gBC9k4Qj.js → CkqNv7sq.js} +2 -2
  69. package/.output/public/_nuxt/ClXDAYjE.js +1 -0
  70. package/.output/public/_nuxt/CrZGoMo_.js +1 -0
  71. package/.output/public/_nuxt/{BZXMQuYP.js → CvJtd2Af.js} +1 -1
  72. package/.output/public/_nuxt/{DKZxeXDQ.js → Cwtd8e-P.js} +1 -1
  73. package/.output/public/_nuxt/{nIU2F7ia.js → Cx44SSNp.js} +3 -3
  74. package/.output/public/_nuxt/{BzOqrmGa.js → CxEVzuCn.js} +3 -3
  75. package/.output/public/_nuxt/{Dy_Cq5LQ.js → CzIMQevQ.js} +1 -1
  76. package/.output/public/_nuxt/{D6t3dcTl.js → D0P9llU7.js} +1 -1
  77. package/.output/public/_nuxt/{JJ3634gV.js → D1DYuOOm.js} +1 -1
  78. package/.output/public/_nuxt/{BAIz-dEB.js → D1dDc8Vw.js} +1 -1
  79. package/.output/public/_nuxt/{DSRrg8JT.js → D1r0uqf3.js} +1 -1
  80. package/.output/public/_nuxt/{CNnJrDvu.js → D3a8R1T6.js} +1 -1
  81. package/.output/public/_nuxt/{B1X4Bzcy.js → D5EZbuub.js} +1 -1
  82. package/.output/public/_nuxt/D9V13KTK.js +1 -0
  83. package/.output/public/_nuxt/DAE2hbP7.js +1 -0
  84. package/.output/public/_nuxt/{Cvp7FI3T.js → DAIbdyS6.js} +1 -1
  85. package/.output/public/_nuxt/{EuOqK1A6.js → DAvlXjt0.js} +1 -1
  86. package/.output/public/_nuxt/DBKzwexZ.js +1 -0
  87. package/.output/public/_nuxt/{wCGVE8_e.js → DEATxnaF.js} +1 -1
  88. package/.output/public/_nuxt/{cABRLVee.js → DFg8PvHV.js} +1 -1
  89. package/.output/public/_nuxt/DM4MyqI-.js +1 -0
  90. package/.output/public/_nuxt/{Cdt3I3Go.js → DNE7kw9s.js} +1 -1
  91. package/.output/public/_nuxt/DO0oG4fG.js +1 -0
  92. package/.output/public/_nuxt/{B6S_ob86.js → DPFugPaB.js} +1 -1
  93. package/.output/public/_nuxt/{DJjDvbZE.js → DQlXU6_H.js} +1 -1
  94. package/.output/public/_nuxt/DQvuQpwh.js +1 -0
  95. package/.output/public/_nuxt/{sf57orEk.js → DRlG_bnX.js} +1 -1
  96. package/.output/public/_nuxt/{C6RC3lA1.js → DSQj-oMk.js} +1 -1
  97. package/.output/public/_nuxt/{CeIVm4A3.js → DU6ewLkE.js} +1 -1
  98. package/.output/public/_nuxt/{Cp2MA0cm.js → DWhzQg7B.js} +1 -1
  99. package/.output/public/_nuxt/{DJMS2og1.js → D_vK6VPK.js} +1 -1
  100. package/.output/public/_nuxt/{CihWZmJe.js → DaBp0Gba.js} +2 -2
  101. package/.output/public/_nuxt/DaH2FbAy.js +1 -0
  102. package/.output/public/_nuxt/{CtYFj7k1.js → DaJo0CeV.js} +1 -1
  103. package/.output/public/_nuxt/DauLdT7p.js +1 -0
  104. package/.output/public/_nuxt/{DG-T44jj.js → DdPA4eTX.js} +1 -1
  105. package/.output/public/_nuxt/{YuTZB7sD.js → DeAGWdWK.js} +1 -1
  106. package/.output/public/_nuxt/{CitkKxhw.js → DfF1qofg.js} +1 -1
  107. package/.output/public/_nuxt/{Daz4MeL6.js → DiGBA-aA.js} +1 -1
  108. package/.output/public/_nuxt/DiJxF69i.js +1 -0
  109. package/.output/public/_nuxt/{DIoI0uJm.js → DkBIU-1F.js} +1 -1
  110. package/.output/public/_nuxt/DmAM6bZ0.js +1 -0
  111. package/.output/public/_nuxt/DmeAKr3J.js +1 -0
  112. package/.output/public/_nuxt/DmmTnMzZ.js +1 -0
  113. package/.output/public/_nuxt/{Lwdv_RKd.js → DqsUSndS.js} +1 -1
  114. package/.output/public/_nuxt/Dvw-hR3Y.js +1 -0
  115. package/.output/public/_nuxt/{CVgTJeSq.js → Dz6sfh81.js} +1 -1
  116. package/.output/public/_nuxt/{BYjadNrw.js → FNhYm5FX.js} +1 -1
  117. package/.output/public/_nuxt/{Nb2jBtYT.js → HOeKUnra.js} +1 -1
  118. package/.output/public/_nuxt/{CtchsY6e.js → IR1jkN7B.js} +1 -1
  119. package/.output/public/_nuxt/{DCzfkCGa.js → MpTk6K7N.js} +1 -1
  120. package/.output/public/_nuxt/NZ7Wz6LP.js +1 -0
  121. package/.output/public/_nuxt/{DfQu3kEw.js → PqWbiAD2.js} +1 -1
  122. package/.output/public/_nuxt/{Jez9DHn7.js → Tu4FhMRc.js} +1 -1
  123. package/.output/public/_nuxt/{B3y_Qqox.js → UKPXYG4z.js} +1 -1
  124. package/.output/public/_nuxt/{BlAZO7nq.js → UO2Y9Nve.js} +1 -1
  125. package/.output/public/_nuxt/{KKK6HVeG.js → XHiJSquP.js} +1 -1
  126. package/.output/public/_nuxt/YGWAImQo.js +1 -0
  127. package/.output/public/_nuxt/{ghuJ76mD.js → ZR87XvwB.js} +1 -1
  128. package/.output/public/_nuxt/{yNrp2XvX.js → _E89BQAO.js} +1 -1
  129. package/.output/public/_nuxt/{C_BdYLzz.js → aiXk7zRt.js} +1 -1
  130. package/.output/public/_nuxt/builds/latest.json +1 -1
  131. package/.output/public/_nuxt/builds/meta/91727fcc-bf7f-407f-9b1e-092017fcfee0.json +1 -0
  132. package/.output/public/_nuxt/cL7whuPe.js +1 -0
  133. package/.output/public/_nuxt/{BasgsT_S.js → ct6_k5IW.js} +1 -1
  134. package/.output/public/_nuxt/entry._7ZkP07A.css +1 -0
  135. package/.output/public/_nuxt/{DTDgHTuh.js → fEUQvmn8.js} +2 -2
  136. package/.output/public/_nuxt/{FNC8XZTk.js → gGlaVUMD.js} +1 -1
  137. package/.output/public/_nuxt/gjmGkVlL.js +1 -0
  138. package/.output/public/_nuxt/{IRSbVPIu.js → m5001Uvl.js} +1 -1
  139. package/.output/public/_nuxt/{_CYZi8HN.js → mQkFCz_M.js} +1 -1
  140. package/.output/public/_nuxt/{BxXOsXrM.js → p9l1LjVc.js} +10 -10
  141. package/.output/public/_nuxt/{BsEZoHd1.js → qR_K5W8V.js} +1 -1
  142. package/.output/public/_nuxt/{BrNqhp1a.js → t_9QQ4MF.js} +7 -7
  143. package/.output/public/_nuxt/{pcUI-zuY.js → uc4c4mfb.js} +1 -1
  144. package/.output/public/_nuxt/{usage.vakN1lvi.css → usage.BDeyCZwW.css} +1 -1
  145. package/.output/public/_nuxt/wPSLEMBw.js +1 -0
  146. package/.output/public/_nuxt/xKRwul0f.js +1 -0
  147. package/.output/public/_nuxt/{BWhMnjID.js → xgpiGSxb.js} +1 -1
  148. package/.output/public/_nuxt/xxnk7j0F.js +1 -0
  149. package/.output/public/favicon.svg +1 -0
  150. package/.output/server/chunks/build/A-BWukSPjS.mjs +1 -0
  151. package/.output/server/chunks/build/Accordion-BaJYea6e.mjs +1 -0
  152. package/.output/server/chunks/build/AccordionItem-DdG2zgcN.mjs +1 -0
  153. package/.output/server/chunks/build/Badge-BrU9UkCv.mjs +1 -0
  154. package/.output/server/chunks/build/Blockquote-DND8wTkU.mjs +1 -0
  155. package/.output/server/chunks/build/Callout-1halpaEg.mjs +1 -0
  156. package/.output/server/chunks/build/Card-BHCSDKDt.mjs +1 -0
  157. package/.output/server/chunks/build/CardGroup-BOuJcNGp.mjs +1 -0
  158. package/.output/server/chunks/build/Caution-BP3y-TcC.mjs +1 -0
  159. package/.output/server/chunks/build/Code-B1xkAS5a.mjs +1 -0
  160. package/.output/server/chunks/build/CodeCollapse-BIhaNa22.mjs +1 -0
  161. package/.output/server/chunks/build/CodeGroup-BviYyCuo.mjs +1 -0
  162. package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +2 -1
  163. package/.output/server/chunks/build/CodePreview-D8PsCQ6m.mjs +1 -0
  164. package/.output/server/chunks/build/CodeTree-BUTLupmL.mjs +1 -0
  165. package/.output/server/chunks/build/Collapsible-BIvXNaSq.mjs +1 -0
  166. package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +1 -1
  167. package/.output/server/chunks/build/EditorToolbar-DIfb5arC.mjs +1 -1
  168. package/.output/server/chunks/build/Em-DsIz_BnD.mjs +1 -0
  169. package/.output/server/chunks/build/Field-cwwmSQDT.mjs +1 -0
  170. package/.output/server/chunks/build/FieldGroup-CAIpQv8s.mjs +1 -0
  171. package/.output/server/chunks/build/H1-BbFNsPyP.mjs +1 -0
  172. package/.output/server/chunks/build/H2-vHTl_pWr.mjs +1 -0
  173. package/.output/server/chunks/build/H3-7eTcfO3s.mjs +1 -0
  174. package/.output/server/chunks/build/H4-C89p_PKO.mjs +1 -0
  175. package/.output/server/chunks/build/Hr-Bm8RlL3O.mjs +1 -0
  176. package/.output/server/chunks/build/Icon-Dp9iy0BI.mjs +1 -0
  177. package/.output/server/chunks/build/Img-CWLmvN1t.mjs +2 -1
  178. package/.output/server/chunks/build/Kbd-CQG6I_Ch.mjs +1 -0
  179. package/.output/server/chunks/build/Li-Bw1QUaGv.mjs +1 -0
  180. package/.output/server/chunks/build/MDC-Dx0YPDhe.mjs +1 -1
  181. package/.output/server/chunks/build/Note-CHkjm9jm.mjs +1 -0
  182. package/.output/server/chunks/build/Ol-D-fPnfFM.mjs +1 -0
  183. package/.output/server/chunks/build/P-B5YI1V9y.mjs +1 -0
  184. package/.output/server/chunks/build/Pre-ChiJcf3C.mjs +1 -0
  185. package/.output/server/chunks/build/ProseH5-DahJyv8h.mjs +1 -0
  186. package/.output/server/chunks/build/ProseH6-C4Is5h6c.mjs +1 -0
  187. package/.output/server/chunks/build/Select-BB1oLrCD.mjs +1 -1
  188. package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +1 -1
  189. package/.output/server/chunks/build/Steps-BZpvXfzb.mjs +1 -0
  190. package/.output/server/chunks/build/Strong-DXJqOWL3.mjs +1 -0
  191. package/.output/server/chunks/build/Table-BSrLZ7dt.mjs +1 -0
  192. package/.output/server/chunks/build/Table-DCwTlhCj.mjs +1 -1
  193. package/.output/server/chunks/build/Tabs-Dk3nvOFF.mjs +1 -0
  194. package/.output/server/chunks/build/TabsItem-CDhyuBtJ.mjs +1 -0
  195. package/.output/server/chunks/build/Tbody-CjMT5oH-.mjs +1 -0
  196. package/.output/server/chunks/build/Td-ZBVaEjFN.mjs +1 -0
  197. package/.output/server/chunks/build/Th-D317icbd.mjs +1 -0
  198. package/.output/server/chunks/build/Thead-Ca_ZESTK.mjs +1 -0
  199. package/.output/server/chunks/build/Tip-CP3oTARR.mjs +1 -0
  200. package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +1 -1
  201. package/.output/server/chunks/build/Tr-6jI8j9gD.mjs +1 -0
  202. package/.output/server/chunks/build/{docs-Dk2JnYq3.mjs → Tree-DUhXKd8y.mjs} +46 -2235
  203. package/.output/server/chunks/build/Tree-DUhXKd8y.mjs.map +1 -0
  204. package/.output/server/chunks/build/Ul-BUGj_CPb.mjs +1 -0
  205. package/.output/server/chunks/build/Warning-BJ8G6cxC.mjs +1 -0
  206. package/.output/server/chunks/build/_id_-DN00UDdO.mjs +1 -0
  207. package/.output/server/chunks/build/_id_-DN00UDdO.mjs.map +1 -1
  208. package/.output/server/chunks/build/_name_-BnS_KEfX.mjs +1592 -0
  209. package/.output/server/chunks/build/_name_-BnS_KEfX.mjs.map +1 -0
  210. package/.output/server/chunks/build/{_uuid_-0UgdUhfY.mjs → _uuid_-DfJaumTE.mjs} +5 -4
  211. package/.output/server/chunks/build/{_uuid_-0UgdUhfY.mjs.map → _uuid_-DfJaumTE.mjs.map} +1 -1
  212. package/.output/server/chunks/build/auth-BGPNH2QJ.mjs +20 -0
  213. package/.output/server/chunks/build/auth-BGPNH2QJ.mjs.map +1 -0
  214. package/.output/server/chunks/build/auth-CvD7MqKW.mjs +1 -0
  215. package/.output/server/chunks/build/auth-CvD7MqKW.mjs.map +1 -1
  216. package/.output/server/chunks/build/chat-CZMiB68R.mjs +1 -0
  217. package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +1 -1
  218. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  219. package/.output/server/chunks/build/cookie-C_iulBi6.mjs +1 -1
  220. package/.output/server/chunks/build/{dashboard-YEscLBQN.mjs → dashboard-CLk1NlbR.mjs} +15 -4
  221. package/.output/server/chunks/build/dashboard-CLk1NlbR.mjs.map +1 -0
  222. package/.output/server/chunks/build/{dashboard-CpMVYnDV.mjs → dashboard-CiVTAZuF.mjs} +12 -4
  223. package/.output/server/chunks/build/{dashboard-CpMVYnDV.mjs.map → dashboard-CiVTAZuF.mjs.map} +1 -1
  224. package/.output/server/chunks/build/docs-ChGwOPg5.mjs +2204 -0
  225. package/.output/server/chunks/build/docs-ChGwOPg5.mjs.map +1 -0
  226. package/.output/server/chunks/build/error-404-BzbcNcdU.mjs +1 -0
  227. package/.output/server/chunks/build/error-500-uCDjGRW8.mjs +1 -0
  228. package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -1
  229. package/.output/server/chunks/build/{hooks-DP8WoUPS.mjs → hooks-D328DcO6.mjs} +3 -2
  230. package/.output/server/chunks/build/hooks-D328DcO6.mjs.map +1 -0
  231. package/.output/server/chunks/build/{index-DVx-QlhP.mjs → index-Byt-3Yq6.mjs} +3 -2
  232. package/.output/server/chunks/build/{index-DVx-QlhP.mjs.map → index-Byt-3Yq6.mjs.map} +1 -1
  233. package/.output/server/chunks/build/{index-Ba_bPJgk.mjs → index-C9PuieXh.mjs} +3 -2
  234. package/.output/server/chunks/build/index-C9PuieXh.mjs.map +1 -0
  235. package/.output/server/chunks/build/index-C_LcBBgO.mjs +1508 -0
  236. package/.output/server/chunks/build/index-C_LcBBgO.mjs.map +1 -0
  237. package/.output/server/chunks/build/index-CxDxc9fm.mjs +1 -1
  238. package/.output/server/chunks/build/index-DzdvIi8V.mjs +1 -0
  239. package/.output/server/chunks/build/library-CbWcF5wT.mjs +601 -0
  240. package/.output/server/chunks/build/library-CbWcF5wT.mjs.map +1 -0
  241. package/.output/server/chunks/build/{login-BAysbpyX.mjs → login-DnnElTl2.mjs} +15 -7
  242. package/.output/server/chunks/build/{login-BAysbpyX.mjs.map → login-DnnElTl2.mjs.map} +1 -1
  243. package/.output/server/chunks/build/memories-BqA719O1.mjs +1 -0
  244. package/.output/server/chunks/build/memories-BqA719O1.mjs.map +1 -1
  245. package/.output/server/chunks/build/server.mjs +62 -34
  246. package/.output/server/chunks/build/server.mjs.map +1 -1
  247. package/.output/server/chunks/build/settings-DdkKCJ00.mjs +1 -0
  248. package/.output/server/chunks/build/settings-DdkKCJ00.mjs.map +1 -1
  249. package/.output/server/chunks/build/styles.mjs +2 -2
  250. package/.output/server/chunks/build/{tasks-DiOi1HG_.mjs → tasks-DnAFqbtt.mjs} +3 -2
  251. package/.output/server/chunks/build/tasks-DnAFqbtt.mjs.map +1 -0
  252. package/.output/server/chunks/build/{usage-H_mcd_fz.mjs → usage-CSrBh4Or.mjs} +159 -44
  253. package/.output/server/chunks/build/{usage-H_mcd_fz.mjs.map → usage-CSrBh4Or.mjs.map} +1 -1
  254. package/.output/server/chunks/build/{usePreferences-CzC8fRzd.mjs → usePreferences-DH1QjxOj.mjs} +7 -1
  255. package/.output/server/chunks/build/usePreferences-DH1QjxOj.mjs.map +1 -0
  256. package/.output/server/chunks/build/{view-Dc8mvzCB.mjs → view-n2sYa4Zh.mjs} +4 -3
  257. package/.output/server/chunks/build/{view-Dc8mvzCB.mjs.map → view-n2sYa4Zh.mjs.map} +1 -1
  258. package/.output/server/chunks/build/virtual_nuxt__Users_tony_Documents_GitHub_second-brain_node_modules_.cache_nuxt_.nuxt_mdc-imports-PtwWlZ2H.mjs +1 -0
  259. package/.output/server/chunks/nitro/nitro.mjs +1247 -824
  260. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  261. package/.output/server/chunks/routes/_ws/chat.mjs +2 -1
  262. package/.output/server/chunks/routes/_ws/chat.mjs.map +1 -1
  263. package/.output/server/chunks/routes/api/agents/_id/cancel.post.mjs +1 -0
  264. package/.output/server/chunks/routes/api/agents/_id/cancel.post.mjs.map +1 -1
  265. package/.output/server/chunks/routes/api/agents/_id/run.post.mjs +1 -0
  266. package/.output/server/chunks/routes/api/agents/_id/run.post.mjs.map +1 -1
  267. package/.output/server/chunks/routes/api/agents/_id/runs.get.mjs +1 -0
  268. package/.output/server/chunks/routes/api/agents/_id/runs.get.mjs.map +1 -1
  269. package/.output/server/chunks/routes/api/agents/_id/stats.get.mjs +1 -0
  270. package/.output/server/chunks/routes/api/agents/_id/stats.get.mjs.map +1 -1
  271. package/.output/server/chunks/routes/api/agents/_id_.delete.mjs +1 -0
  272. package/.output/server/chunks/routes/api/agents/_id_.delete.mjs.map +1 -1
  273. package/.output/server/chunks/routes/api/agents/_id_.get.mjs +1 -0
  274. package/.output/server/chunks/routes/api/agents/_id_.get.mjs.map +1 -1
  275. package/.output/server/chunks/routes/api/agents/_id_.patch.mjs +1 -0
  276. package/.output/server/chunks/routes/api/agents/_id_.patch.mjs.map +1 -1
  277. package/.output/server/chunks/routes/api/agents/stats.get.mjs +1 -0
  278. package/.output/server/chunks/routes/api/agents/stats.get.mjs.map +1 -1
  279. package/.output/server/chunks/routes/api/auth/_...all_.mjs +1 -0
  280. package/.output/server/chunks/routes/api/auth/_...all_.mjs.map +1 -1
  281. package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs +1 -0
  282. package/.output/server/chunks/routes/api/conversations/_id_.delete.mjs.map +1 -1
  283. package/.output/server/chunks/routes/api/conversations/_id_.get.mjs +1 -0
  284. package/.output/server/chunks/routes/api/conversations/_id_.get.mjs.map +1 -1
  285. package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +1 -0
  286. package/.output/server/chunks/routes/api/dashboard/overview.get.mjs.map +1 -1
  287. package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +1 -0
  288. package/.output/server/chunks/routes/api/documents/_id/public.get.mjs.map +1 -1
  289. package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +1 -0
  290. package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs.map +1 -1
  291. package/.output/server/chunks/routes/api/documents/by-path.post.mjs +1 -0
  292. package/.output/server/chunks/routes/api/documents/by-path.post.mjs.map +1 -1
  293. package/.output/server/chunks/routes/api/documents/index.delete.mjs +1 -0
  294. package/.output/server/chunks/routes/api/documents/index.delete.mjs.map +1 -1
  295. package/.output/server/chunks/routes/api/documents/index.put.mjs +1 -0
  296. package/.output/server/chunks/routes/api/documents/index.put.mjs.map +1 -1
  297. package/.output/server/chunks/routes/api/fs/delete.post.mjs +1 -0
  298. package/.output/server/chunks/routes/api/fs/delete.post.mjs.map +1 -1
  299. package/.output/server/chunks/routes/api/fs/list.get.mjs +1 -0
  300. package/.output/server/chunks/routes/api/fs/list.get.mjs.map +1 -1
  301. package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +1 -0
  302. package/.output/server/chunks/routes/api/fs/mkdir.post.mjs.map +1 -1
  303. package/.output/server/chunks/routes/api/fs/move.post.mjs +1 -0
  304. package/.output/server/chunks/routes/api/fs/move.post.mjs.map +1 -1
  305. package/.output/server/chunks/routes/api/fs/read.post.mjs +1 -0
  306. package/.output/server/chunks/routes/api/fs/read.post.mjs.map +1 -1
  307. package/.output/server/chunks/routes/api/fs/rename.post.mjs +1 -0
  308. package/.output/server/chunks/routes/api/fs/rename.post.mjs.map +1 -1
  309. package/.output/server/chunks/routes/api/fs/write.post.mjs +1 -0
  310. package/.output/server/chunks/routes/api/fs/write.post.mjs.map +1 -1
  311. package/.output/server/chunks/routes/api/health.get.mjs +1 -0
  312. package/.output/server/chunks/routes/api/health.get.mjs.map +1 -1
  313. package/.output/server/chunks/routes/api/home.get.mjs +1 -0
  314. package/.output/server/chunks/routes/api/home.get.mjs.map +1 -1
  315. package/.output/server/chunks/routes/api/hooks/index.get.mjs +1 -0
  316. package/.output/server/chunks/routes/api/hooks/index.get.mjs.map +1 -1
  317. package/.output/server/chunks/routes/api/hooks/index.post.mjs +1 -0
  318. package/.output/server/chunks/routes/api/hooks/index.post.mjs.map +1 -1
  319. package/.output/server/chunks/routes/api/hooks/stats.get.mjs +1 -0
  320. package/.output/server/chunks/routes/api/hooks/stats.get.mjs.map +1 -1
  321. package/.output/server/chunks/routes/api/index.get.mjs +1 -0
  322. package/.output/server/chunks/routes/api/index.get.mjs.map +1 -1
  323. package/.output/server/chunks/routes/api/index.get2.mjs +1 -0
  324. package/.output/server/chunks/routes/api/index.get2.mjs.map +1 -1
  325. package/.output/server/chunks/routes/api/index.get3.mjs +1 -0
  326. package/.output/server/chunks/routes/api/index.get3.mjs.map +1 -1
  327. package/.output/server/chunks/routes/api/index.get4.mjs +1 -0
  328. package/.output/server/chunks/routes/api/index.get4.mjs.map +1 -1
  329. package/.output/server/chunks/routes/api/index.get5.mjs +1 -0
  330. package/.output/server/chunks/routes/api/index.get5.mjs.map +1 -1
  331. package/.output/server/chunks/routes/api/index.get6.mjs +1 -0
  332. package/.output/server/chunks/routes/api/index.get6.mjs.map +1 -1
  333. package/.output/server/chunks/routes/api/index.get7.mjs +40 -38
  334. package/.output/server/chunks/routes/api/index.get7.mjs.map +1 -1
  335. package/.output/server/chunks/routes/api/index.get8.mjs +33 -38
  336. package/.output/server/chunks/routes/api/index.get8.mjs.map +1 -1
  337. package/.output/server/chunks/routes/api/index.get9.mjs +83 -0
  338. package/.output/server/chunks/routes/api/index.get9.mjs.map +1 -0
  339. package/.output/server/chunks/routes/api/index.post.mjs +1 -0
  340. package/.output/server/chunks/routes/api/index.post.mjs.map +1 -1
  341. package/.output/server/chunks/routes/api/index.post2.mjs +1 -0
  342. package/.output/server/chunks/routes/api/index.post2.mjs.map +1 -1
  343. package/.output/server/chunks/routes/api/index.post3.mjs +1 -0
  344. package/.output/server/chunks/routes/api/index.post3.mjs.map +1 -1
  345. package/.output/server/chunks/routes/api/index.post4.mjs +1 -0
  346. package/.output/server/chunks/routes/api/index.post4.mjs.map +1 -1
  347. package/.output/server/chunks/routes/api/index.put.mjs +1 -0
  348. package/.output/server/chunks/routes/api/index.put.mjs.map +1 -1
  349. package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +1 -0
  350. package/.output/server/chunks/routes/api/memory/_id_.delete.mjs.map +1 -1
  351. package/.output/server/chunks/routes/api/memory/context.get.mjs +1 -0
  352. package/.output/server/chunks/routes/api/memory/context.get.mjs.map +1 -1
  353. package/.output/server/chunks/routes/api/memory/extract.post.mjs +2 -1
  354. package/.output/server/chunks/routes/api/memory/extract.post.mjs.map +1 -1
  355. package/.output/server/chunks/routes/api/memory/search.get.mjs +1 -0
  356. package/.output/server/chunks/routes/api/memory/search.get.mjs.map +1 -1
  357. package/.output/server/chunks/routes/api/memory/store.post.mjs +1 -0
  358. package/.output/server/chunks/routes/api/memory/store.post.mjs.map +1 -1
  359. package/.output/server/chunks/routes/api/projects/index.delete.mjs +1 -0
  360. package/.output/server/chunks/routes/api/projects/index.delete.mjs.map +1 -1
  361. package/.output/server/chunks/routes/api/projects/index.get.mjs +1 -0
  362. package/.output/server/chunks/routes/api/projects/index.get.mjs.map +1 -1
  363. package/.output/server/chunks/routes/api/projects/index.put.mjs +1 -0
  364. package/.output/server/chunks/routes/api/projects/index.put.mjs.map +1 -1
  365. package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +1 -0
  366. package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs.map +1 -1
  367. package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +1 -0
  368. package/.output/server/chunks/routes/api/secrets/_key_.get.mjs.map +1 -1
  369. package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +1 -0
  370. package/.output/server/chunks/routes/api/secrets/_key_.put.mjs.map +1 -1
  371. package/.output/server/chunks/routes/api/skills/_name/export.get.mjs +72 -0
  372. package/.output/server/chunks/routes/api/skills/_name/export.get.mjs.map +1 -0
  373. package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs +73 -0
  374. package/.output/server/chunks/routes/api/skills/_name/files/create.post.mjs.map +1 -0
  375. package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs +71 -0
  376. package/.output/server/chunks/routes/api/skills/_name/files/delete.post.mjs.map +1 -0
  377. package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs +69 -0
  378. package/.output/server/chunks/routes/api/skills/_name/files/read.post.mjs.map +1 -0
  379. package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs +69 -0
  380. package/.output/server/chunks/routes/api/skills/_name/files/write.post.mjs.map +1 -0
  381. package/.output/server/chunks/routes/api/skills/_name/index.get.mjs +60 -0
  382. package/.output/server/chunks/routes/api/skills/_name/index.get.mjs.map +1 -0
  383. package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs +87 -0
  384. package/.output/server/chunks/routes/api/skills/_name/rename.post.mjs.map +1 -0
  385. package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs +62 -0
  386. package/.output/server/chunks/routes/api/skills/_name/toggle.post.mjs.map +1 -0
  387. package/.output/server/chunks/routes/api/skills/create.post.mjs +79 -0
  388. package/.output/server/chunks/routes/api/skills/create.post.mjs.map +1 -0
  389. package/.output/server/chunks/routes/api/skills/generate.post.mjs +143 -0
  390. package/.output/server/chunks/routes/api/skills/generate.post.mjs.map +1 -0
  391. package/.output/server/chunks/routes/api/skills/import.post.mjs +96 -0
  392. package/.output/server/chunks/routes/api/skills/import.post.mjs.map +1 -0
  393. package/.output/server/chunks/routes/api/skills/index.get.mjs +82 -0
  394. package/.output/server/chunks/routes/api/skills/index.get.mjs.map +1 -0
  395. package/.output/server/chunks/routes/api/skills/index.get2.mjs +83 -0
  396. package/.output/server/chunks/routes/api/skills/index.get2.mjs.map +1 -0
  397. package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs +72 -0
  398. package/.output/server/chunks/routes/api/skills/library/check-updates.get.mjs.map +1 -0
  399. package/.output/server/chunks/routes/api/skills/library/install.post.mjs +90 -0
  400. package/.output/server/chunks/routes/api/skills/library/install.post.mjs.map +1 -0
  401. package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +1 -0
  402. package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs.map +1 -1
  403. package/.output/server/chunks/routes/api/tasks/index.delete.mjs +1 -0
  404. package/.output/server/chunks/routes/api/tasks/index.delete.mjs.map +1 -1
  405. package/.output/server/chunks/routes/api/tasks/index.get.mjs +1 -0
  406. package/.output/server/chunks/routes/api/tasks/index.get.mjs.map +1 -1
  407. package/.output/server/chunks/routes/api/tasks/index.put.mjs +1 -0
  408. package/.output/server/chunks/routes/api/tasks/index.put.mjs.map +1 -1
  409. package/.output/server/chunks/routes/api/tasks/tags.get.mjs +1 -0
  410. package/.output/server/chunks/routes/api/tasks/tags.get.mjs.map +1 -1
  411. package/.output/server/chunks/routes/api/usage/stats.get.mjs +4 -1
  412. package/.output/server/chunks/routes/api/usage/stats.get.mjs.map +1 -1
  413. package/.output/server/chunks/routes/api/user/email.patch.mjs +2 -1
  414. package/.output/server/chunks/routes/api/user/email.patch.mjs.map +1 -1
  415. package/.output/server/chunks/routes/notifications.mjs +2 -1
  416. package/.output/server/chunks/routes/notifications.mjs.map +1 -1
  417. package/.output/server/chunks/routes/renderer.mjs +2 -2
  418. package/.output/server/chunks/routes/terminal.mjs +2 -1
  419. package/.output/server/chunks/routes/terminal.mjs.map +1 -1
  420. package/.output/server/index.mjs +2 -1
  421. package/.output/server/index.mjs.map +1 -1
  422. package/.output/server/node_modules/adm-zip/adm-zip.js +949 -0
  423. package/.output/server/node_modules/adm-zip/headers/entryHeader.js +374 -0
  424. package/.output/server/node_modules/adm-zip/headers/index.js +2 -0
  425. package/.output/server/node_modules/adm-zip/headers/mainHeader.js +130 -0
  426. package/.output/server/node_modules/adm-zip/methods/deflater.js +33 -0
  427. package/.output/server/node_modules/adm-zip/methods/index.js +3 -0
  428. package/.output/server/node_modules/adm-zip/methods/inflater.js +34 -0
  429. package/.output/server/node_modules/adm-zip/methods/zipcrypto.js +175 -0
  430. package/.output/server/node_modules/adm-zip/package.json +49 -0
  431. package/.output/server/node_modules/adm-zip/util/constants.js +142 -0
  432. package/.output/server/node_modules/adm-zip/util/decoder.js +5 -0
  433. package/.output/server/node_modules/adm-zip/util/errors.js +63 -0
  434. package/.output/server/node_modules/adm-zip/util/fattr.js +76 -0
  435. package/.output/server/node_modules/adm-zip/util/index.js +5 -0
  436. package/.output/server/node_modules/adm-zip/util/utils.js +336 -0
  437. package/.output/server/node_modules/adm-zip/zipEntry.js +405 -0
  438. package/.output/server/node_modules/adm-zip/zipFile.js +446 -0
  439. package/.output/server/package.json +2 -1
  440. package/README.md +3 -0
  441. package/app/app.vue +1 -1
  442. package/app/components/dashboard/StatCards.vue +21 -2
  443. package/app/components/usage/UsageCostChart.client.vue +59 -23
  444. package/app/components/usage/UsageCostChart.server.vue +1 -0
  445. package/app/components/usage/UsageSourceDonut.client.vue +17 -5
  446. package/app/components/usage/UsageSourceDonut.server.vue +1 -0
  447. package/app/components/usage/UsageTopConsumers.vue +13 -3
  448. package/app/composables/usePreferences.ts +9 -1
  449. package/app/layouts/auth.vue +0 -10
  450. package/app/pages/login.vue +18 -8
  451. package/app/pages/skills/[name].vue +12 -0
  452. package/app/pages/skills/index.vue +47 -0
  453. package/app/pages/usage.vue +43 -16
  454. package/dist/cli/index.js +12 -13
  455. package/package.json +5 -3
  456. package/server/api/skills/[name]/export.get.ts +45 -0
  457. package/server/api/skills/import.post.ts +87 -0
  458. package/server/api/usage/stats.get.ts +4 -2
  459. package/shared/types/index.ts +2 -1
  460. package/.output/public/_nuxt/5ZXA0Ckq.js +0 -1
  461. package/.output/public/_nuxt/BIIJhjQO.js +0 -1
  462. package/.output/public/_nuxt/BIckl6wA.js +0 -1
  463. package/.output/public/_nuxt/BJ3o57WW.js +0 -1
  464. package/.output/public/_nuxt/BNetzZzF.js +0 -1
  465. package/.output/public/_nuxt/BS0ofHJK.js +0 -1
  466. package/.output/public/_nuxt/B_3_hrpn.js +0 -1
  467. package/.output/public/_nuxt/BaBZjmMC.js +0 -1
  468. package/.output/public/_nuxt/BaMqDm5u.js +0 -1
  469. package/.output/public/_nuxt/BhzMoffi.js +0 -1
  470. package/.output/public/_nuxt/BlhFigLL.js +0 -1
  471. package/.output/public/_nuxt/BoIxv-gM.js +0 -1
  472. package/.output/public/_nuxt/Br19oYkq.js +0 -1
  473. package/.output/public/_nuxt/C0kh_F7v.js +0 -1
  474. package/.output/public/_nuxt/C61KgSco.js +0 -1
  475. package/.output/public/_nuxt/CJUdYEdO.js +0 -1
  476. package/.output/public/_nuxt/CVJQGP1Q.js +0 -1
  477. package/.output/public/_nuxt/CWMUi89H.js +0 -1
  478. package/.output/public/_nuxt/Cdu2qGgq.js +0 -1
  479. package/.output/public/_nuxt/CeIu7z4p.js +0 -1
  480. package/.output/public/_nuxt/D2689qk4.js +0 -1
  481. package/.output/public/_nuxt/D31L7Ks6.js +0 -1
  482. package/.output/public/_nuxt/DB359q8R.js +0 -1
  483. package/.output/public/_nuxt/DHG66LPS.js +0 -1
  484. package/.output/public/_nuxt/DJ5V-y_x.js +0 -1
  485. package/.output/public/_nuxt/DLETdGFL.js +0 -1
  486. package/.output/public/_nuxt/DOICd-Ld.js +0 -1
  487. package/.output/public/_nuxt/DPEcH-gi.js +0 -65
  488. package/.output/public/_nuxt/Db8-_gO7.js +0 -1
  489. package/.output/public/_nuxt/DgV-EDJ9.js +0 -1
  490. package/.output/public/_nuxt/Dp2X5R2m.js +0 -1
  491. package/.output/public/_nuxt/DqB723Z0.js +0 -1
  492. package/.output/public/_nuxt/Q8Ps7oN5.js +0 -1
  493. package/.output/public/_nuxt/SXTDhzp6.js +0 -1
  494. package/.output/public/_nuxt/Sg2Lwc46.js +0 -1
  495. package/.output/public/_nuxt/_J_7XIn-.js +0 -1
  496. package/.output/public/_nuxt/builds/meta/a1e9100c-1a4f-4f7e-bb53-9dbe0d07effb.json +0 -1
  497. package/.output/public/_nuxt/entry.CGxIBGAf.css +0 -1
  498. package/.output/public/_nuxt/inmzPrjz.js +0 -1
  499. package/.output/public/_nuxt/oIX-ZDN6.js +0 -1
  500. package/.output/server/chunks/build/auth-CDHRohj4.mjs +0 -77
  501. package/.output/server/chunks/build/auth-CDHRohj4.mjs.map +0 -1
  502. package/.output/server/chunks/build/dashboard-YEscLBQN.mjs.map +0 -1
  503. package/.output/server/chunks/build/docs-Dk2JnYq3.mjs.map +0 -1
  504. package/.output/server/chunks/build/hooks-DP8WoUPS.mjs.map +0 -1
  505. package/.output/server/chunks/build/index-Ba_bPJgk.mjs.map +0 -1
  506. package/.output/server/chunks/build/tasks-DiOi1HG_.mjs.map +0 -1
  507. package/.output/server/chunks/build/usePreferences-CzC8fRzd.mjs.map +0 -1
  508. /package/.output/public/_nuxt/{useCopyToClipboard.Be_IvFWy.css → CodeEditor.Be_IvFWy.css} +0 -0
@@ -0,0 +1,2204 @@
1
+ import { _ as _sfc_main$1$1, a as _sfc_main$5 } from './DashboardNavbar-Cpq8yKA0.mjs';
2
+ import { _ as _sfc_main$9 } from './Input-CV2hlBHo.mjs';
3
+ import { _ as _sfc_main$a } from './Separator-CYbxFNTe.mjs';
4
+ import { _ as _sfc_main$1$2, a as _sfc_main$b } from './Tree-DUhXKd8y.mjs';
5
+ import { Q as useRoute, g as _sfc_main$d, _ as _sfc_main$8, b as useLocale, e as useAppConfig, t as tv, i as useToast, z as __nuxt_component_3$1 } from './server.mjs';
6
+ import { _ as _sfc_main$c } from './Modal-Z_SoWhh-.mjs';
7
+ import { _ as _sfc_main$e } from './Card-G40WAFiH.mjs';
8
+ import { defineComponent, mergeProps, withCtx, createVNode, unref, createBlock, createCommentVNode, openBlock, createTextVNode, ref, computed, isRef, toDisplayString, withKeys, withAsyncContext, useSSRContext } from 'vue';
9
+ import { ssrRenderAttrs, ssrRenderComponent, ssrRenderClass, ssrInterpolate } from 'vue/server-renderer';
10
+ import { useForwardProps } from 'reka-ui';
11
+ import { useDebounceFn, reactiveOmit } from '@vueuse/core';
12
+ import { u as useDashboard } from './DashboardSidebarToggle-Chnqv04k.mjs';
13
+ import { _ as _sfc_main$6 } from './ColorModeButton-CiS8E1tc.mjs';
14
+ import { _ as _sfc_main$7 } from './Drawer-zOHju6ul.mjs';
15
+ import { _ as _sfc_main$f } from './Switch-GWdksmY6.mjs';
16
+ import { _ as _sfc_main$h } from './FormField-Caux_FCv.mjs';
17
+ import { _ as _sfc_main$i } from './SelectMenu-DPssg6zD.mjs';
18
+ import { _ as _sfc_main$j } from './InputTags-VS4G6txn.mjs';
19
+ import { _ as _sfc_main$1$3, a as _sfc_main$g } from './EditorToolbar-DIfb5arC.mjs';
20
+ import { _ as __nuxt_component_5, u as useCopyToClipboard } from './useCopyToClipboard-vi6FYyyZ.mjs';
21
+ import { ah as isMarkdownFile, ai as detectLanguage } from '../nitro/nitro.mjs';
22
+ import { u as useFetch } from './fetch-BB7Qzkwe.mjs';
23
+ import { u as usePreferences } from './usePreferences-DH1QjxOj.mjs';
24
+ import 'reka-ui/namespaced';
25
+ import './Kbd-Daq7k0fm.mjs';
26
+ import './virtualizer-rkZfhL1t.mjs';
27
+ import 'vue-router';
28
+ import 'tailwindcss/colors';
29
+ import '@iconify/vue';
30
+ import 'tailwind-variants';
31
+ import '@iconify/utils/lib/css/icon';
32
+ import 'perfect-debounce';
33
+ import '../routes/renderer.mjs';
34
+ import 'vue-bundle-renderer/runtime';
35
+ import 'unhead/server';
36
+ import 'devalue';
37
+ import 'unhead/plugins';
38
+ import 'unhead/utils';
39
+ import './cookie-C_iulBi6.mjs';
40
+ import './ssr-Bqnw2a-w.mjs';
41
+ import 'vaul-vue';
42
+ import '@tiptap/core';
43
+ import '@tiptap/extension-horizontal-rule';
44
+ import '@tiptap/extension-image';
45
+ import '@tiptap/extension-mention';
46
+ import '@tiptap/extension-placeholder';
47
+ import '@tiptap/markdown';
48
+ import '@tiptap/starter-kit';
49
+ import '@tiptap/vue-3';
50
+ import '@tiptap/vue-3/menus';
51
+ import './DropdownMenu-BBrV9nXz.mjs';
52
+ import './Tooltip-TRyl6dje.mjs';
53
+ import '@anthropic-ai/claude-agent-sdk';
54
+ import 'crypto';
55
+ import 'module';
56
+ import 'path';
57
+ import 'os';
58
+ import 'node:http';
59
+ import 'node:https';
60
+ import 'node:crypto';
61
+ import 'stream';
62
+ import 'events';
63
+ import 'http';
64
+ import 'buffer';
65
+ import 'zlib';
66
+ import 'https';
67
+ import 'net';
68
+ import 'tls';
69
+ import 'url';
70
+ import 'node:events';
71
+ import 'node:buffer';
72
+ import 'node:fs';
73
+ import 'node:path';
74
+ import 'fs';
75
+ import 'drizzle-orm/postgres-js/migrator';
76
+ import 'drizzle-orm';
77
+ import 'drizzle-orm/postgres-js';
78
+ import 'postgres';
79
+ import 'drizzle-orm/pg-core';
80
+ import 'better-auth';
81
+ import 'better-auth/adapters/drizzle';
82
+ import 'chokidar';
83
+ import 'fs/promises';
84
+ import 'gray-matter';
85
+ import 'cron';
86
+ import 'node:url';
87
+ import '@iconify/utils';
88
+ import 'consola';
89
+ import '@vue/shared';
90
+
91
+ function useFileTree() {
92
+ const items = ref([]);
93
+ const selectedFile = ref(null);
94
+ const loading = ref(false);
95
+ const error = ref(null);
96
+ const searchQuery = ref("");
97
+ function fileEntryToTreeItem(entry, expandRoot = false) {
98
+ const icon = entry.type === "directory" ? void 0 : getFileIcon(entry.name);
99
+ return {
100
+ id: entry.path,
101
+ label: entry.name,
102
+ icon,
103
+ path: entry.path,
104
+ type: entry.type,
105
+ defaultExpanded: expandRoot,
106
+ children: entry.children?.map((child) => fileEntryToTreeItem(child))
107
+ };
108
+ }
109
+ function getFileIcon(filename) {
110
+ const ext = filename.split(".").pop()?.toLowerCase();
111
+ switch (ext) {
112
+ case "md":
113
+ return "i-lucide-file-text";
114
+ case "ts":
115
+ case "tsx":
116
+ return "i-lucide-file-code";
117
+ case "js":
118
+ case "jsx":
119
+ return "i-lucide-file-code";
120
+ case "vue":
121
+ return "i-lucide-file-code";
122
+ case "json":
123
+ return "i-lucide-file-json";
124
+ case "css":
125
+ case "scss":
126
+ return "i-lucide-file-code";
127
+ case "png":
128
+ case "jpg":
129
+ case "jpeg":
130
+ case "gif":
131
+ case "svg":
132
+ return "i-lucide-file-image";
133
+ default:
134
+ return "i-lucide-file";
135
+ }
136
+ }
137
+ async function loadTree(path = "/") {
138
+ loading.value = true;
139
+ error.value = null;
140
+ try {
141
+ const response = await $fetch("/api/fs/list", {
142
+ query: { path, recursive: "true" }
143
+ });
144
+ items.value = response.data.map((entry) => fileEntryToTreeItem(entry, true));
145
+ } catch (e) {
146
+ error.value = "Failed to load file tree";
147
+ console.error("Failed to load file tree:", e);
148
+ } finally {
149
+ loading.value = false;
150
+ }
151
+ }
152
+ async function readFile(path) {
153
+ try {
154
+ const response = await $fetch("/api/fs/read", {
155
+ method: "POST",
156
+ body: { path }
157
+ });
158
+ return response.data;
159
+ } catch (e) {
160
+ console.error("Failed to read file:", e);
161
+ throw e;
162
+ }
163
+ }
164
+ async function writeFile(path, content) {
165
+ try {
166
+ const response = await $fetch("/api/fs/write", {
167
+ method: "POST",
168
+ body: { path, content }
169
+ });
170
+ return response.data;
171
+ } catch (e) {
172
+ console.error("Failed to write file:", e);
173
+ throw e;
174
+ }
175
+ }
176
+ async function createFile(parentPath, filename) {
177
+ const path = parentPath === "/" ? `/${filename}` : `${parentPath}/${filename}`;
178
+ await writeFile(path, "");
179
+ await loadTree();
180
+ return path;
181
+ }
182
+ async function createFolder(parentPath, foldername) {
183
+ const path = parentPath === "/" ? `/${foldername}` : `${parentPath}/${foldername}`;
184
+ try {
185
+ await $fetch("/api/fs/mkdir", {
186
+ method: "POST",
187
+ body: { path }
188
+ });
189
+ await loadTree();
190
+ return path;
191
+ } catch (e) {
192
+ console.error("Failed to create folder:", e);
193
+ throw e;
194
+ }
195
+ }
196
+ async function renameItem(oldPath, newName) {
197
+ const parts = oldPath.split("/");
198
+ parts.pop();
199
+ const newPath = [...parts, newName].join("/");
200
+ try {
201
+ await $fetch("/api/fs/rename", {
202
+ method: "POST",
203
+ body: { oldPath, newPath }
204
+ });
205
+ await loadTree();
206
+ return newPath;
207
+ } catch (e) {
208
+ console.error("Failed to rename:", e);
209
+ throw e;
210
+ }
211
+ }
212
+ async function deleteItem(path) {
213
+ try {
214
+ await $fetch("/api/fs/delete", {
215
+ method: "POST",
216
+ body: { path }
217
+ });
218
+ if (selectedFile.value === path) {
219
+ selectedFile.value = null;
220
+ }
221
+ await loadTree();
222
+ } catch (e) {
223
+ console.error("Failed to delete:", e);
224
+ throw e;
225
+ }
226
+ }
227
+ async function moveItem(sourcePath, destinationPath) {
228
+ try {
229
+ const response = await $fetch("/api/fs/move", {
230
+ method: "POST",
231
+ body: { sourcePath, destinationPath }
232
+ });
233
+ await loadTree();
234
+ return response.data.newPath;
235
+ } catch (e) {
236
+ console.error("Failed to move:", e);
237
+ throw e;
238
+ }
239
+ }
240
+ const filteredItems = computed(() => {
241
+ if (!searchQuery.value) return items.value;
242
+ const query = searchQuery.value.toLowerCase();
243
+ function filterTree(items2) {
244
+ return items2.reduce((acc, item) => {
245
+ const matches = item.label.toLowerCase().includes(query);
246
+ const filteredChildren = item.children ? filterTree(item.children) : [];
247
+ if (matches || filteredChildren.length > 0) {
248
+ acc.push({
249
+ ...item,
250
+ children: filteredChildren.length > 0 ? filteredChildren : item.children,
251
+ defaultExpanded: filteredChildren.length > 0 || matches
252
+ });
253
+ }
254
+ return acc;
255
+ }, []);
256
+ }
257
+ return filterTree(items.value);
258
+ });
259
+ return {
260
+ items,
261
+ filteredItems,
262
+ selectedFile,
263
+ loading,
264
+ error,
265
+ searchQuery,
266
+ loadTree,
267
+ readFile,
268
+ writeFile,
269
+ createFile,
270
+ createFolder,
271
+ renameItem,
272
+ deleteItem,
273
+ moveItem
274
+ };
275
+ }
276
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
277
+ __name: "FileTree",
278
+ __ssrInlineRender: true,
279
+ emits: ["select"],
280
+ setup(__props, { emit: __emit }) {
281
+ const emit = __emit;
282
+ const {
283
+ filteredItems,
284
+ selectedFile,
285
+ loading,
286
+ searchQuery,
287
+ createFile,
288
+ createFolder,
289
+ renameItem,
290
+ deleteItem,
291
+ moveItem
292
+ } = useFileTree();
293
+ const draggedItem = ref(null);
294
+ const dropTarget = ref(null);
295
+ function handleDragStart(event, item) {
296
+ draggedItem.value = item;
297
+ if (event.dataTransfer) {
298
+ event.dataTransfer.effectAllowed = "move";
299
+ event.dataTransfer.setData("text/plain", item.path);
300
+ }
301
+ }
302
+ function handleDragOver(event, item) {
303
+ if (!draggedItem.value) return;
304
+ if (item.type !== "directory") return;
305
+ if (draggedItem.value.path === item.path) return;
306
+ if (item.path.startsWith(draggedItem.value.path + "/")) return;
307
+ event.preventDefault();
308
+ dropTarget.value = item;
309
+ }
310
+ function handleDragLeave() {
311
+ dropTarget.value = null;
312
+ }
313
+ function handleDragEnd() {
314
+ draggedItem.value = null;
315
+ dropTarget.value = null;
316
+ }
317
+ async function handleDrop(event, item) {
318
+ event.preventDefault();
319
+ if (!draggedItem.value || item.type !== "directory") return;
320
+ try {
321
+ await moveItem(draggedItem.value.path, item.path);
322
+ } catch {
323
+ }
324
+ draggedItem.value = null;
325
+ dropTarget.value = null;
326
+ }
327
+ const contextMenuTarget = ref(null);
328
+ const showNewFileModal = ref(false);
329
+ const showNewFolderModal = ref(false);
330
+ const showRenameModal = ref(false);
331
+ const showDeleteConfirm = ref(false);
332
+ const newItemName = ref("");
333
+ const contextMenuItems = computed(() => [
334
+ [{
335
+ label: "New File",
336
+ icon: "i-lucide-file-plus",
337
+ onSelect: () => {
338
+ newItemName.value = "";
339
+ showNewFileModal.value = true;
340
+ }
341
+ }, {
342
+ label: "New Folder",
343
+ icon: "i-lucide-folder-plus",
344
+ onSelect: () => {
345
+ newItemName.value = "";
346
+ showNewFolderModal.value = true;
347
+ }
348
+ }],
349
+ [{
350
+ label: "Rename",
351
+ icon: "i-lucide-pencil",
352
+ onSelect: () => {
353
+ if (contextMenuTarget.value) {
354
+ newItemName.value = contextMenuTarget.value.label;
355
+ showRenameModal.value = true;
356
+ }
357
+ }
358
+ }, {
359
+ label: "Delete",
360
+ icon: "i-lucide-trash-2",
361
+ color: "error",
362
+ onSelect: () => {
363
+ showDeleteConfirm.value = true;
364
+ }
365
+ }]
366
+ ]);
367
+ function handleSelect(item) {
368
+ if (item.type === "file") {
369
+ selectedFile.value = item.path;
370
+ emit("select", item.path);
371
+ }
372
+ }
373
+ async function handleCreateFile() {
374
+ if (!newItemName.value.trim()) return;
375
+ const parentPath = contextMenuTarget.value?.type === "directory" ? contextMenuTarget.value.path : "/";
376
+ let filename = newItemName.value.trim();
377
+ if (!filename.includes(".")) {
378
+ filename += ".md";
379
+ }
380
+ try {
381
+ const path = await createFile(parentPath, filename);
382
+ selectedFile.value = path;
383
+ emit("select", path);
384
+ } catch {
385
+ }
386
+ showNewFileModal.value = false;
387
+ newItemName.value = "";
388
+ }
389
+ async function handleCreateFolder() {
390
+ if (!newItemName.value.trim()) return;
391
+ const parentPath = contextMenuTarget.value?.type === "directory" ? contextMenuTarget.value.path : "/";
392
+ try {
393
+ await createFolder(parentPath, newItemName.value.trim());
394
+ } catch {
395
+ }
396
+ showNewFolderModal.value = false;
397
+ newItemName.value = "";
398
+ }
399
+ async function handleRename() {
400
+ if (!contextMenuTarget.value || !newItemName.value.trim()) return;
401
+ try {
402
+ await renameItem(contextMenuTarget.value.path, newItemName.value.trim());
403
+ } catch {
404
+ }
405
+ showRenameModal.value = false;
406
+ newItemName.value = "";
407
+ }
408
+ async function handleDelete() {
409
+ if (!contextMenuTarget.value) return;
410
+ try {
411
+ await deleteItem(contextMenuTarget.value.path);
412
+ } catch {
413
+ }
414
+ showDeleteConfirm.value = false;
415
+ }
416
+ return (_ctx, _push, _parent, _attrs) => {
417
+ const _component_UInput = _sfc_main$9;
418
+ const _component_USeparator = _sfc_main$a;
419
+ const _component_UContextMenu = _sfc_main$1$2;
420
+ const _component_UIcon = _sfc_main$d;
421
+ const _component_UTree = _sfc_main$b;
422
+ const _component_UModal = _sfc_main$c;
423
+ const _component_UCard = _sfc_main$e;
424
+ const _component_UButton = _sfc_main$8;
425
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "h-full flex flex-col" }, _attrs))}><div class="-mt-1 pb-2">`);
426
+ _push(ssrRenderComponent(_component_UInput, {
427
+ modelValue: unref(searchQuery),
428
+ "onUpdate:modelValue": ($event) => isRef(searchQuery) ? searchQuery.value = $event : null,
429
+ placeholder: "Search files...",
430
+ icon: "i-lucide-search",
431
+ size: "sm",
432
+ class: "w-full"
433
+ }, null, _parent));
434
+ _push(`</div>`);
435
+ _push(ssrRenderComponent(_component_USeparator, { class: "mt-2" }, null, _parent));
436
+ _push(ssrRenderComponent(_component_UContextMenu, {
437
+ items: unref(contextMenuItems),
438
+ class: "flex-1 h-full overflow-auto p-2",
439
+ onContextmenu: ($event) => contextMenuTarget.value = null
440
+ }, {
441
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
442
+ if (_push2) {
443
+ if (unref(loading)) {
444
+ _push2(`<div class="flex items-center justify-center py-8"${_scopeId}>`);
445
+ _push2(ssrRenderComponent(_component_UIcon, {
446
+ name: "i-lucide-loader-2",
447
+ class: "size-6 animate-spin text-dimmed"
448
+ }, null, _parent2, _scopeId));
449
+ _push2(`</div>`);
450
+ } else if (unref(filteredItems).length === 0) {
451
+ _push2(`<div class="h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"${_scopeId}>`);
452
+ _push2(ssrRenderComponent(_component_UIcon, {
453
+ name: "i-lucide-folder-open",
454
+ class: "size-8 mx-auto mb-2 opacity-50"
455
+ }, null, _parent2, _scopeId));
456
+ _push2(`<p${_scopeId}>No files found</p><p class="text-xs mt-1"${_scopeId}> Right-click to create a file </p></div>`);
457
+ } else {
458
+ _push2(ssrRenderComponent(_component_UTree, {
459
+ items: unref(filteredItems),
460
+ "get-key": (item) => item.id,
461
+ color: "primary",
462
+ "expanded-icon": "i-lucide-folder-open",
463
+ "collapsed-icon": "i-lucide-folder",
464
+ onSelect: (_e, item) => handleSelect(item)
465
+ }, {
466
+ item: withCtx(({ item, expanded }, _push3, _parent3, _scopeId2) => {
467
+ if (_push3) {
468
+ _push3(`<div class="${ssrRenderClass([{
469
+ "bg-primary/10 rounded": unref(dropTarget)?.path === item.path
470
+ }, "flex items-center gap-2 w-full"])}" draggable="true"${_scopeId2}>`);
471
+ if (item.children?.length) {
472
+ _push3(ssrRenderComponent(_component_UIcon, {
473
+ name: expanded ? "i-lucide-folder-open" : "i-lucide-folder",
474
+ class: "size-4 shrink-0 text-dimmed"
475
+ }, null, _parent3, _scopeId2));
476
+ } else if (item.icon) {
477
+ _push3(ssrRenderComponent(_component_UIcon, {
478
+ name: item.icon,
479
+ class: "size-4 shrink-0 text-dimmed"
480
+ }, null, _parent3, _scopeId2));
481
+ } else {
482
+ _push3(ssrRenderComponent(_component_UIcon, {
483
+ name: "i-lucide-file",
484
+ class: "size-4 shrink-0 text-dimmed"
485
+ }, null, _parent3, _scopeId2));
486
+ }
487
+ _push3(`<span class="truncate"${_scopeId2}>${ssrInterpolate(item.label)}</span></div>`);
488
+ } else {
489
+ return [
490
+ createVNode("div", {
491
+ class: ["flex items-center gap-2 w-full", {
492
+ "bg-primary/10 rounded": unref(dropTarget)?.path === item.path
493
+ }],
494
+ draggable: "true",
495
+ onContextmenu: ($event) => contextMenuTarget.value = item,
496
+ onDragstart: ($event) => handleDragStart($event, item),
497
+ onDragover: ($event) => handleDragOver($event, item),
498
+ onDragleave: handleDragLeave,
499
+ onDragend: handleDragEnd,
500
+ onDrop: ($event) => handleDrop($event, item)
501
+ }, [
502
+ item.children?.length ? (openBlock(), createBlock(_component_UIcon, {
503
+ key: 0,
504
+ name: expanded ? "i-lucide-folder-open" : "i-lucide-folder",
505
+ class: "size-4 shrink-0 text-dimmed"
506
+ }, null, 8, ["name"])) : item.icon ? (openBlock(), createBlock(_component_UIcon, {
507
+ key: 1,
508
+ name: item.icon,
509
+ class: "size-4 shrink-0 text-dimmed"
510
+ }, null, 8, ["name"])) : (openBlock(), createBlock(_component_UIcon, {
511
+ key: 2,
512
+ name: "i-lucide-file",
513
+ class: "size-4 shrink-0 text-dimmed"
514
+ })),
515
+ createVNode("span", { class: "truncate" }, toDisplayString(item.label), 1)
516
+ ], 42, ["onContextmenu", "onDragstart", "onDragover", "onDrop"])
517
+ ];
518
+ }
519
+ }),
520
+ _: 1
521
+ }, _parent2, _scopeId));
522
+ }
523
+ } else {
524
+ return [
525
+ unref(loading) ? (openBlock(), createBlock("div", {
526
+ key: 0,
527
+ class: "flex items-center justify-center py-8"
528
+ }, [
529
+ createVNode(_component_UIcon, {
530
+ name: "i-lucide-loader-2",
531
+ class: "size-6 animate-spin text-dimmed"
532
+ })
533
+ ])) : unref(filteredItems).length === 0 ? (openBlock(), createBlock("div", {
534
+ key: 1,
535
+ class: "h-full min-h-32 flex flex-col items-center justify-center text-dimmed text-sm"
536
+ }, [
537
+ createVNode(_component_UIcon, {
538
+ name: "i-lucide-folder-open",
539
+ class: "size-8 mx-auto mb-2 opacity-50"
540
+ }),
541
+ createVNode("p", null, "No files found"),
542
+ createVNode("p", { class: "text-xs mt-1" }, " Right-click to create a file ")
543
+ ])) : (openBlock(), createBlock(_component_UTree, {
544
+ key: 2,
545
+ items: unref(filteredItems),
546
+ "get-key": (item) => item.id,
547
+ color: "primary",
548
+ "expanded-icon": "i-lucide-folder-open",
549
+ "collapsed-icon": "i-lucide-folder",
550
+ onSelect: (_e, item) => handleSelect(item)
551
+ }, {
552
+ item: withCtx(({ item, expanded }) => [
553
+ createVNode("div", {
554
+ class: ["flex items-center gap-2 w-full", {
555
+ "bg-primary/10 rounded": unref(dropTarget)?.path === item.path
556
+ }],
557
+ draggable: "true",
558
+ onContextmenu: ($event) => contextMenuTarget.value = item,
559
+ onDragstart: ($event) => handleDragStart($event, item),
560
+ onDragover: ($event) => handleDragOver($event, item),
561
+ onDragleave: handleDragLeave,
562
+ onDragend: handleDragEnd,
563
+ onDrop: ($event) => handleDrop($event, item)
564
+ }, [
565
+ item.children?.length ? (openBlock(), createBlock(_component_UIcon, {
566
+ key: 0,
567
+ name: expanded ? "i-lucide-folder-open" : "i-lucide-folder",
568
+ class: "size-4 shrink-0 text-dimmed"
569
+ }, null, 8, ["name"])) : item.icon ? (openBlock(), createBlock(_component_UIcon, {
570
+ key: 1,
571
+ name: item.icon,
572
+ class: "size-4 shrink-0 text-dimmed"
573
+ }, null, 8, ["name"])) : (openBlock(), createBlock(_component_UIcon, {
574
+ key: 2,
575
+ name: "i-lucide-file",
576
+ class: "size-4 shrink-0 text-dimmed"
577
+ })),
578
+ createVNode("span", { class: "truncate" }, toDisplayString(item.label), 1)
579
+ ], 42, ["onContextmenu", "onDragstart", "onDragover", "onDrop"])
580
+ ]),
581
+ _: 1
582
+ }, 8, ["items", "get-key", "onSelect"]))
583
+ ];
584
+ }
585
+ }),
586
+ _: 1
587
+ }, _parent));
588
+ _push(ssrRenderComponent(_component_UModal, {
589
+ open: unref(showNewFileModal),
590
+ "onUpdate:open": ($event) => isRef(showNewFileModal) ? showNewFileModal.value = $event : null
591
+ }, {
592
+ content: withCtx((_, _push2, _parent2, _scopeId) => {
593
+ if (_push2) {
594
+ _push2(ssrRenderComponent(_component_UCard, null, {
595
+ header: withCtx((_2, _push3, _parent3, _scopeId2) => {
596
+ if (_push3) {
597
+ _push3(`<div class="flex items-center gap-2"${_scopeId2}>`);
598
+ _push3(ssrRenderComponent(_component_UIcon, {
599
+ name: "i-lucide-file-plus",
600
+ class: "size-5"
601
+ }, null, _parent3, _scopeId2));
602
+ _push3(`<span class="font-semibold"${_scopeId2}>New File</span></div>`);
603
+ } else {
604
+ return [
605
+ createVNode("div", { class: "flex items-center gap-2" }, [
606
+ createVNode(_component_UIcon, {
607
+ name: "i-lucide-file-plus",
608
+ class: "size-5"
609
+ }),
610
+ createVNode("span", { class: "font-semibold" }, "New File")
611
+ ])
612
+ ];
613
+ }
614
+ }),
615
+ footer: withCtx((_2, _push3, _parent3, _scopeId2) => {
616
+ if (_push3) {
617
+ _push3(`<div class="flex justify-end gap-2"${_scopeId2}>`);
618
+ _push3(ssrRenderComponent(_component_UButton, {
619
+ color: "neutral",
620
+ variant: "ghost",
621
+ onClick: ($event) => showNewFileModal.value = false
622
+ }, {
623
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
624
+ if (_push4) {
625
+ _push4(` Cancel `);
626
+ } else {
627
+ return [
628
+ createTextVNode(" Cancel ")
629
+ ];
630
+ }
631
+ }),
632
+ _: 1
633
+ }, _parent3, _scopeId2));
634
+ _push3(ssrRenderComponent(_component_UButton, { onClick: handleCreateFile }, {
635
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
636
+ if (_push4) {
637
+ _push4(` Create `);
638
+ } else {
639
+ return [
640
+ createTextVNode(" Create ")
641
+ ];
642
+ }
643
+ }),
644
+ _: 1
645
+ }, _parent3, _scopeId2));
646
+ _push3(`</div>`);
647
+ } else {
648
+ return [
649
+ createVNode("div", { class: "flex justify-end gap-2" }, [
650
+ createVNode(_component_UButton, {
651
+ color: "neutral",
652
+ variant: "ghost",
653
+ onClick: ($event) => showNewFileModal.value = false
654
+ }, {
655
+ default: withCtx(() => [
656
+ createTextVNode(" Cancel ")
657
+ ]),
658
+ _: 1
659
+ }, 8, ["onClick"]),
660
+ createVNode(_component_UButton, { onClick: handleCreateFile }, {
661
+ default: withCtx(() => [
662
+ createTextVNode(" Create ")
663
+ ]),
664
+ _: 1
665
+ })
666
+ ])
667
+ ];
668
+ }
669
+ }),
670
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
671
+ if (_push3) {
672
+ _push3(ssrRenderComponent(_component_UInput, {
673
+ modelValue: unref(newItemName),
674
+ "onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
675
+ placeholder: "filename.md",
676
+ autofocus: "",
677
+ onKeyup: handleCreateFile
678
+ }, null, _parent3, _scopeId2));
679
+ } else {
680
+ return [
681
+ createVNode(_component_UInput, {
682
+ modelValue: unref(newItemName),
683
+ "onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
684
+ placeholder: "filename.md",
685
+ autofocus: "",
686
+ onKeyup: withKeys(handleCreateFile, ["enter"])
687
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
688
+ ];
689
+ }
690
+ }),
691
+ _: 1
692
+ }, _parent2, _scopeId));
693
+ } else {
694
+ return [
695
+ createVNode(_component_UCard, null, {
696
+ header: withCtx(() => [
697
+ createVNode("div", { class: "flex items-center gap-2" }, [
698
+ createVNode(_component_UIcon, {
699
+ name: "i-lucide-file-plus",
700
+ class: "size-5"
701
+ }),
702
+ createVNode("span", { class: "font-semibold" }, "New File")
703
+ ])
704
+ ]),
705
+ footer: withCtx(() => [
706
+ createVNode("div", { class: "flex justify-end gap-2" }, [
707
+ createVNode(_component_UButton, {
708
+ color: "neutral",
709
+ variant: "ghost",
710
+ onClick: ($event) => showNewFileModal.value = false
711
+ }, {
712
+ default: withCtx(() => [
713
+ createTextVNode(" Cancel ")
714
+ ]),
715
+ _: 1
716
+ }, 8, ["onClick"]),
717
+ createVNode(_component_UButton, { onClick: handleCreateFile }, {
718
+ default: withCtx(() => [
719
+ createTextVNode(" Create ")
720
+ ]),
721
+ _: 1
722
+ })
723
+ ])
724
+ ]),
725
+ default: withCtx(() => [
726
+ createVNode(_component_UInput, {
727
+ modelValue: unref(newItemName),
728
+ "onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
729
+ placeholder: "filename.md",
730
+ autofocus: "",
731
+ onKeyup: withKeys(handleCreateFile, ["enter"])
732
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
733
+ ]),
734
+ _: 1
735
+ })
736
+ ];
737
+ }
738
+ }),
739
+ _: 1
740
+ }, _parent));
741
+ _push(ssrRenderComponent(_component_UModal, {
742
+ open: unref(showNewFolderModal),
743
+ "onUpdate:open": ($event) => isRef(showNewFolderModal) ? showNewFolderModal.value = $event : null
744
+ }, {
745
+ content: withCtx((_, _push2, _parent2, _scopeId) => {
746
+ if (_push2) {
747
+ _push2(ssrRenderComponent(_component_UCard, null, {
748
+ header: withCtx((_2, _push3, _parent3, _scopeId2) => {
749
+ if (_push3) {
750
+ _push3(`<div class="flex items-center gap-2"${_scopeId2}>`);
751
+ _push3(ssrRenderComponent(_component_UIcon, {
752
+ name: "i-lucide-folder-plus",
753
+ class: "size-5"
754
+ }, null, _parent3, _scopeId2));
755
+ _push3(`<span class="font-semibold"${_scopeId2}>New Folder</span></div>`);
756
+ } else {
757
+ return [
758
+ createVNode("div", { class: "flex items-center gap-2" }, [
759
+ createVNode(_component_UIcon, {
760
+ name: "i-lucide-folder-plus",
761
+ class: "size-5"
762
+ }),
763
+ createVNode("span", { class: "font-semibold" }, "New Folder")
764
+ ])
765
+ ];
766
+ }
767
+ }),
768
+ footer: withCtx((_2, _push3, _parent3, _scopeId2) => {
769
+ if (_push3) {
770
+ _push3(`<div class="flex justify-end gap-2"${_scopeId2}>`);
771
+ _push3(ssrRenderComponent(_component_UButton, {
772
+ color: "neutral",
773
+ variant: "ghost",
774
+ onClick: ($event) => showNewFolderModal.value = false
775
+ }, {
776
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
777
+ if (_push4) {
778
+ _push4(` Cancel `);
779
+ } else {
780
+ return [
781
+ createTextVNode(" Cancel ")
782
+ ];
783
+ }
784
+ }),
785
+ _: 1
786
+ }, _parent3, _scopeId2));
787
+ _push3(ssrRenderComponent(_component_UButton, { onClick: handleCreateFolder }, {
788
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
789
+ if (_push4) {
790
+ _push4(` Create `);
791
+ } else {
792
+ return [
793
+ createTextVNode(" Create ")
794
+ ];
795
+ }
796
+ }),
797
+ _: 1
798
+ }, _parent3, _scopeId2));
799
+ _push3(`</div>`);
800
+ } else {
801
+ return [
802
+ createVNode("div", { class: "flex justify-end gap-2" }, [
803
+ createVNode(_component_UButton, {
804
+ color: "neutral",
805
+ variant: "ghost",
806
+ onClick: ($event) => showNewFolderModal.value = false
807
+ }, {
808
+ default: withCtx(() => [
809
+ createTextVNode(" Cancel ")
810
+ ]),
811
+ _: 1
812
+ }, 8, ["onClick"]),
813
+ createVNode(_component_UButton, { onClick: handleCreateFolder }, {
814
+ default: withCtx(() => [
815
+ createTextVNode(" Create ")
816
+ ]),
817
+ _: 1
818
+ })
819
+ ])
820
+ ];
821
+ }
822
+ }),
823
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
824
+ if (_push3) {
825
+ _push3(ssrRenderComponent(_component_UInput, {
826
+ modelValue: unref(newItemName),
827
+ "onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
828
+ placeholder: "folder-name",
829
+ autofocus: "",
830
+ onKeyup: handleCreateFolder
831
+ }, null, _parent3, _scopeId2));
832
+ } else {
833
+ return [
834
+ createVNode(_component_UInput, {
835
+ modelValue: unref(newItemName),
836
+ "onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
837
+ placeholder: "folder-name",
838
+ autofocus: "",
839
+ onKeyup: withKeys(handleCreateFolder, ["enter"])
840
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
841
+ ];
842
+ }
843
+ }),
844
+ _: 1
845
+ }, _parent2, _scopeId));
846
+ } else {
847
+ return [
848
+ createVNode(_component_UCard, null, {
849
+ header: withCtx(() => [
850
+ createVNode("div", { class: "flex items-center gap-2" }, [
851
+ createVNode(_component_UIcon, {
852
+ name: "i-lucide-folder-plus",
853
+ class: "size-5"
854
+ }),
855
+ createVNode("span", { class: "font-semibold" }, "New Folder")
856
+ ])
857
+ ]),
858
+ footer: withCtx(() => [
859
+ createVNode("div", { class: "flex justify-end gap-2" }, [
860
+ createVNode(_component_UButton, {
861
+ color: "neutral",
862
+ variant: "ghost",
863
+ onClick: ($event) => showNewFolderModal.value = false
864
+ }, {
865
+ default: withCtx(() => [
866
+ createTextVNode(" Cancel ")
867
+ ]),
868
+ _: 1
869
+ }, 8, ["onClick"]),
870
+ createVNode(_component_UButton, { onClick: handleCreateFolder }, {
871
+ default: withCtx(() => [
872
+ createTextVNode(" Create ")
873
+ ]),
874
+ _: 1
875
+ })
876
+ ])
877
+ ]),
878
+ default: withCtx(() => [
879
+ createVNode(_component_UInput, {
880
+ modelValue: unref(newItemName),
881
+ "onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
882
+ placeholder: "folder-name",
883
+ autofocus: "",
884
+ onKeyup: withKeys(handleCreateFolder, ["enter"])
885
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
886
+ ]),
887
+ _: 1
888
+ })
889
+ ];
890
+ }
891
+ }),
892
+ _: 1
893
+ }, _parent));
894
+ _push(ssrRenderComponent(_component_UModal, {
895
+ open: unref(showRenameModal),
896
+ "onUpdate:open": ($event) => isRef(showRenameModal) ? showRenameModal.value = $event : null
897
+ }, {
898
+ content: withCtx((_, _push2, _parent2, _scopeId) => {
899
+ if (_push2) {
900
+ _push2(ssrRenderComponent(_component_UCard, null, {
901
+ header: withCtx((_2, _push3, _parent3, _scopeId2) => {
902
+ if (_push3) {
903
+ _push3(`<div class="flex items-center gap-2"${_scopeId2}>`);
904
+ _push3(ssrRenderComponent(_component_UIcon, {
905
+ name: "i-lucide-pencil",
906
+ class: "size-5"
907
+ }, null, _parent3, _scopeId2));
908
+ _push3(`<span class="font-semibold"${_scopeId2}>Rename</span></div>`);
909
+ } else {
910
+ return [
911
+ createVNode("div", { class: "flex items-center gap-2" }, [
912
+ createVNode(_component_UIcon, {
913
+ name: "i-lucide-pencil",
914
+ class: "size-5"
915
+ }),
916
+ createVNode("span", { class: "font-semibold" }, "Rename")
917
+ ])
918
+ ];
919
+ }
920
+ }),
921
+ footer: withCtx((_2, _push3, _parent3, _scopeId2) => {
922
+ if (_push3) {
923
+ _push3(`<div class="flex justify-end gap-2"${_scopeId2}>`);
924
+ _push3(ssrRenderComponent(_component_UButton, {
925
+ color: "neutral",
926
+ variant: "ghost",
927
+ onClick: ($event) => showRenameModal.value = false
928
+ }, {
929
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
930
+ if (_push4) {
931
+ _push4(` Cancel `);
932
+ } else {
933
+ return [
934
+ createTextVNode(" Cancel ")
935
+ ];
936
+ }
937
+ }),
938
+ _: 1
939
+ }, _parent3, _scopeId2));
940
+ _push3(ssrRenderComponent(_component_UButton, { onClick: handleRename }, {
941
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
942
+ if (_push4) {
943
+ _push4(` Rename `);
944
+ } else {
945
+ return [
946
+ createTextVNode(" Rename ")
947
+ ];
948
+ }
949
+ }),
950
+ _: 1
951
+ }, _parent3, _scopeId2));
952
+ _push3(`</div>`);
953
+ } else {
954
+ return [
955
+ createVNode("div", { class: "flex justify-end gap-2" }, [
956
+ createVNode(_component_UButton, {
957
+ color: "neutral",
958
+ variant: "ghost",
959
+ onClick: ($event) => showRenameModal.value = false
960
+ }, {
961
+ default: withCtx(() => [
962
+ createTextVNode(" Cancel ")
963
+ ]),
964
+ _: 1
965
+ }, 8, ["onClick"]),
966
+ createVNode(_component_UButton, { onClick: handleRename }, {
967
+ default: withCtx(() => [
968
+ createTextVNode(" Rename ")
969
+ ]),
970
+ _: 1
971
+ })
972
+ ])
973
+ ];
974
+ }
975
+ }),
976
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
977
+ if (_push3) {
978
+ _push3(ssrRenderComponent(_component_UInput, {
979
+ modelValue: unref(newItemName),
980
+ "onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
981
+ placeholder: "new-name",
982
+ autofocus: "",
983
+ onKeyup: handleRename
984
+ }, null, _parent3, _scopeId2));
985
+ } else {
986
+ return [
987
+ createVNode(_component_UInput, {
988
+ modelValue: unref(newItemName),
989
+ "onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
990
+ placeholder: "new-name",
991
+ autofocus: "",
992
+ onKeyup: withKeys(handleRename, ["enter"])
993
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
994
+ ];
995
+ }
996
+ }),
997
+ _: 1
998
+ }, _parent2, _scopeId));
999
+ } else {
1000
+ return [
1001
+ createVNode(_component_UCard, null, {
1002
+ header: withCtx(() => [
1003
+ createVNode("div", { class: "flex items-center gap-2" }, [
1004
+ createVNode(_component_UIcon, {
1005
+ name: "i-lucide-pencil",
1006
+ class: "size-5"
1007
+ }),
1008
+ createVNode("span", { class: "font-semibold" }, "Rename")
1009
+ ])
1010
+ ]),
1011
+ footer: withCtx(() => [
1012
+ createVNode("div", { class: "flex justify-end gap-2" }, [
1013
+ createVNode(_component_UButton, {
1014
+ color: "neutral",
1015
+ variant: "ghost",
1016
+ onClick: ($event) => showRenameModal.value = false
1017
+ }, {
1018
+ default: withCtx(() => [
1019
+ createTextVNode(" Cancel ")
1020
+ ]),
1021
+ _: 1
1022
+ }, 8, ["onClick"]),
1023
+ createVNode(_component_UButton, { onClick: handleRename }, {
1024
+ default: withCtx(() => [
1025
+ createTextVNode(" Rename ")
1026
+ ]),
1027
+ _: 1
1028
+ })
1029
+ ])
1030
+ ]),
1031
+ default: withCtx(() => [
1032
+ createVNode(_component_UInput, {
1033
+ modelValue: unref(newItemName),
1034
+ "onUpdate:modelValue": ($event) => isRef(newItemName) ? newItemName.value = $event : null,
1035
+ placeholder: "new-name",
1036
+ autofocus: "",
1037
+ onKeyup: withKeys(handleRename, ["enter"])
1038
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
1039
+ ]),
1040
+ _: 1
1041
+ })
1042
+ ];
1043
+ }
1044
+ }),
1045
+ _: 1
1046
+ }, _parent));
1047
+ _push(ssrRenderComponent(_component_UModal, {
1048
+ open: unref(showDeleteConfirm),
1049
+ "onUpdate:open": ($event) => isRef(showDeleteConfirm) ? showDeleteConfirm.value = $event : null
1050
+ }, {
1051
+ content: withCtx((_, _push2, _parent2, _scopeId) => {
1052
+ if (_push2) {
1053
+ _push2(ssrRenderComponent(_component_UCard, null, {
1054
+ header: withCtx((_2, _push3, _parent3, _scopeId2) => {
1055
+ if (_push3) {
1056
+ _push3(`<div class="flex items-center gap-2 text-error"${_scopeId2}>`);
1057
+ _push3(ssrRenderComponent(_component_UIcon, {
1058
+ name: "i-lucide-trash-2",
1059
+ class: "size-5"
1060
+ }, null, _parent3, _scopeId2));
1061
+ _push3(`<span class="font-semibold"${_scopeId2}>Delete</span></div>`);
1062
+ } else {
1063
+ return [
1064
+ createVNode("div", { class: "flex items-center gap-2 text-error" }, [
1065
+ createVNode(_component_UIcon, {
1066
+ name: "i-lucide-trash-2",
1067
+ class: "size-5"
1068
+ }),
1069
+ createVNode("span", { class: "font-semibold" }, "Delete")
1070
+ ])
1071
+ ];
1072
+ }
1073
+ }),
1074
+ footer: withCtx((_2, _push3, _parent3, _scopeId2) => {
1075
+ if (_push3) {
1076
+ _push3(`<div class="flex justify-end gap-2"${_scopeId2}>`);
1077
+ _push3(ssrRenderComponent(_component_UButton, {
1078
+ color: "neutral",
1079
+ variant: "ghost",
1080
+ onClick: ($event) => showDeleteConfirm.value = false
1081
+ }, {
1082
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1083
+ if (_push4) {
1084
+ _push4(` Cancel `);
1085
+ } else {
1086
+ return [
1087
+ createTextVNode(" Cancel ")
1088
+ ];
1089
+ }
1090
+ }),
1091
+ _: 1
1092
+ }, _parent3, _scopeId2));
1093
+ _push3(ssrRenderComponent(_component_UButton, {
1094
+ color: "error",
1095
+ onClick: handleDelete
1096
+ }, {
1097
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
1098
+ if (_push4) {
1099
+ _push4(` Delete `);
1100
+ } else {
1101
+ return [
1102
+ createTextVNode(" Delete ")
1103
+ ];
1104
+ }
1105
+ }),
1106
+ _: 1
1107
+ }, _parent3, _scopeId2));
1108
+ _push3(`</div>`);
1109
+ } else {
1110
+ return [
1111
+ createVNode("div", { class: "flex justify-end gap-2" }, [
1112
+ createVNode(_component_UButton, {
1113
+ color: "neutral",
1114
+ variant: "ghost",
1115
+ onClick: ($event) => showDeleteConfirm.value = false
1116
+ }, {
1117
+ default: withCtx(() => [
1118
+ createTextVNode(" Cancel ")
1119
+ ]),
1120
+ _: 1
1121
+ }, 8, ["onClick"]),
1122
+ createVNode(_component_UButton, {
1123
+ color: "error",
1124
+ onClick: handleDelete
1125
+ }, {
1126
+ default: withCtx(() => [
1127
+ createTextVNode(" Delete ")
1128
+ ]),
1129
+ _: 1
1130
+ })
1131
+ ])
1132
+ ];
1133
+ }
1134
+ }),
1135
+ default: withCtx((_2, _push3, _parent3, _scopeId2) => {
1136
+ if (_push3) {
1137
+ _push3(`<p${_scopeId2}> Are you sure you want to delete <strong${_scopeId2}>${ssrInterpolate(unref(contextMenuTarget)?.label)}</strong>? </p>`);
1138
+ if (unref(contextMenuTarget)?.type === "directory") {
1139
+ _push3(`<p class="text-sm text-dimmed mt-1"${_scopeId2}> This will delete all files and folders inside. </p>`);
1140
+ } else {
1141
+ _push3(`<!---->`);
1142
+ }
1143
+ } else {
1144
+ return [
1145
+ createVNode("p", null, [
1146
+ createTextVNode(" Are you sure you want to delete "),
1147
+ createVNode("strong", null, toDisplayString(unref(contextMenuTarget)?.label), 1),
1148
+ createTextVNode("? ")
1149
+ ]),
1150
+ unref(contextMenuTarget)?.type === "directory" ? (openBlock(), createBlock("p", {
1151
+ key: 0,
1152
+ class: "text-sm text-dimmed mt-1"
1153
+ }, " This will delete all files and folders inside. ")) : createCommentVNode("", true)
1154
+ ];
1155
+ }
1156
+ }),
1157
+ _: 1
1158
+ }, _parent2, _scopeId));
1159
+ } else {
1160
+ return [
1161
+ createVNode(_component_UCard, null, {
1162
+ header: withCtx(() => [
1163
+ createVNode("div", { class: "flex items-center gap-2 text-error" }, [
1164
+ createVNode(_component_UIcon, {
1165
+ name: "i-lucide-trash-2",
1166
+ class: "size-5"
1167
+ }),
1168
+ createVNode("span", { class: "font-semibold" }, "Delete")
1169
+ ])
1170
+ ]),
1171
+ footer: withCtx(() => [
1172
+ createVNode("div", { class: "flex justify-end gap-2" }, [
1173
+ createVNode(_component_UButton, {
1174
+ color: "neutral",
1175
+ variant: "ghost",
1176
+ onClick: ($event) => showDeleteConfirm.value = false
1177
+ }, {
1178
+ default: withCtx(() => [
1179
+ createTextVNode(" Cancel ")
1180
+ ]),
1181
+ _: 1
1182
+ }, 8, ["onClick"]),
1183
+ createVNode(_component_UButton, {
1184
+ color: "error",
1185
+ onClick: handleDelete
1186
+ }, {
1187
+ default: withCtx(() => [
1188
+ createTextVNode(" Delete ")
1189
+ ]),
1190
+ _: 1
1191
+ })
1192
+ ])
1193
+ ]),
1194
+ default: withCtx(() => [
1195
+ createVNode("p", null, [
1196
+ createTextVNode(" Are you sure you want to delete "),
1197
+ createVNode("strong", null, toDisplayString(unref(contextMenuTarget)?.label), 1),
1198
+ createTextVNode("? ")
1199
+ ]),
1200
+ unref(contextMenuTarget)?.type === "directory" ? (openBlock(), createBlock("p", {
1201
+ key: 0,
1202
+ class: "text-sm text-dimmed mt-1"
1203
+ }, " This will delete all files and folders inside. ")) : createCommentVNode("", true)
1204
+ ]),
1205
+ _: 1
1206
+ })
1207
+ ];
1208
+ }
1209
+ }),
1210
+ _: 1
1211
+ }, _parent));
1212
+ _push(`</div>`);
1213
+ };
1214
+ }
1215
+ });
1216
+ const _sfc_setup$4 = _sfc_main$4.setup;
1217
+ _sfc_main$4.setup = (props, ctx) => {
1218
+ const ssrContext = useSSRContext();
1219
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/files/FileTree.vue");
1220
+ return _sfc_setup$4 ? _sfc_setup$4(props, ctx) : void 0;
1221
+ };
1222
+ const __nuxt_component_1 = Object.assign(_sfc_main$4, { __name: "FilesFileTree" });
1223
+ const theme = {
1224
+ "base": "hidden lg:flex",
1225
+ "variants": {
1226
+ "side": {
1227
+ "left": "",
1228
+ "right": ""
1229
+ }
1230
+ }
1231
+ };
1232
+ const _sfc_main$3 = {
1233
+ __name: "UDashboardSidebarCollapse",
1234
+ __ssrInlineRender: true,
1235
+ props: {
1236
+ color: { type: null, required: false, default: "neutral" },
1237
+ variant: { type: null, required: false, default: "ghost" },
1238
+ side: { type: String, required: false, default: "left" },
1239
+ label: { type: String, required: false },
1240
+ activeColor: { type: null, required: false },
1241
+ activeVariant: { type: null, required: false },
1242
+ size: { type: null, required: false },
1243
+ square: { type: Boolean, required: false },
1244
+ block: { type: Boolean, required: false },
1245
+ loadingAuto: { type: Boolean, required: false },
1246
+ onClick: { type: [Function, Array], required: false },
1247
+ class: { type: null, required: false },
1248
+ ui: { type: null, required: false },
1249
+ icon: { type: null, required: false },
1250
+ avatar: { type: Object, required: false },
1251
+ leading: { type: Boolean, required: false },
1252
+ leadingIcon: { type: null, required: false },
1253
+ trailing: { type: Boolean, required: false },
1254
+ trailingIcon: { type: null, required: false },
1255
+ loading: { type: Boolean, required: false },
1256
+ loadingIcon: { type: null, required: false },
1257
+ as: { type: null, required: false },
1258
+ type: { type: null, required: false },
1259
+ disabled: { type: Boolean, required: false },
1260
+ exactActiveClass: { type: String, required: false },
1261
+ viewTransition: { type: Boolean, required: false }
1262
+ },
1263
+ setup(__props) {
1264
+ const props = __props;
1265
+ const buttonProps = useForwardProps(reactiveOmit(props, "icon", "side", "class"));
1266
+ const { t } = useLocale();
1267
+ const appConfig = useAppConfig();
1268
+ const { sidebarCollapsed, collapseSidebar } = useDashboard({ sidebarCollapsed: ref(false), collapseSidebar: () => {
1269
+ } });
1270
+ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.dashboardSidebarCollapse || {} }));
1271
+ return (_ctx, _push, _parent, _attrs) => {
1272
+ _push(ssrRenderComponent(_sfc_main$8, mergeProps({
1273
+ ...unref(buttonProps),
1274
+ "icon": props.icon || (unref(sidebarCollapsed) ? unref(appConfig).ui.icons.panelOpen : unref(appConfig).ui.icons.panelClose),
1275
+ "aria-label": unref(sidebarCollapsed) ? unref(t)("dashboardSidebarCollapse.expand") : unref(t)("dashboardSidebarCollapse.collapse"),
1276
+ ..._ctx.$attrs
1277
+ }, {
1278
+ class: ui.value({ class: props.class, side: props.side }),
1279
+ onClick: ($event) => unref(collapseSidebar)?.(!unref(sidebarCollapsed))
1280
+ }, _attrs), null, _parent));
1281
+ };
1282
+ }
1283
+ };
1284
+ const _sfc_setup$3 = _sfc_main$3.setup;
1285
+ _sfc_main$3.setup = (props, ctx) => {
1286
+ const ssrContext = useSSRContext();
1287
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("../node_modules/.pnpm/@nuxt+ui@4.3.0_2329ed002e1dfb3a5ad728629f2842a0/node_modules/@nuxt/ui/dist/runtime/components/DashboardSidebarCollapse.vue");
1288
+ return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
1289
+ };
1290
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
1291
+ __name: "DocumentMetadata",
1292
+ __ssrInlineRender: true,
1293
+ props: {
1294
+ metadata: {},
1295
+ projects: {}
1296
+ },
1297
+ emits: ["update:metadata"],
1298
+ setup(__props, { emit: __emit }) {
1299
+ const props = __props;
1300
+ const emit = __emit;
1301
+ const visibilityOptions = [
1302
+ {
1303
+ label: "Hidden",
1304
+ value: "hidden",
1305
+ icon: "i-lucide-lock",
1306
+ description: "Hidden behind authentication and never viewable by the public"
1307
+ },
1308
+ {
1309
+ label: "Private",
1310
+ value: "private",
1311
+ icon: "i-lucide-eye-off",
1312
+ description: "Viewable by anyone with the link, but will not be indexed by search engines"
1313
+ },
1314
+ {
1315
+ label: "Public",
1316
+ value: "public",
1317
+ icon: "i-lucide-eye",
1318
+ description: "Viewable to the public and indexed by search engines"
1319
+ }
1320
+ ];
1321
+ const visibility = computed(() => {
1322
+ if (!props.metadata.shared) return "hidden";
1323
+ return props.metadata.shareType || "private";
1324
+ });
1325
+ const selectedVisibility = computed(
1326
+ () => visibilityOptions.find((o) => o.value === visibility.value)
1327
+ );
1328
+ const localTags = computed({
1329
+ get: () => props.metadata.tags || [],
1330
+ set: (value) => emit("update:metadata", { tags: value })
1331
+ });
1332
+ function handleProjectChange(projectId) {
1333
+ emit("update:metadata", { projectId: projectId || void 0 });
1334
+ }
1335
+ function handleVisibilityChange(value) {
1336
+ if (value === "hidden") {
1337
+ emit("update:metadata", { shared: false, shareType: void 0 });
1338
+ } else {
1339
+ emit("update:metadata", { shared: true, shareType: value });
1340
+ }
1341
+ }
1342
+ const projectOptions = computed(() => [
1343
+ { label: "None", value: void 0 },
1344
+ ...props.projects.map((p) => ({ label: p.name, value: p.id }))
1345
+ ]);
1346
+ return (_ctx, _push, _parent, _attrs) => {
1347
+ const _component_UFormField = _sfc_main$h;
1348
+ const _component_USelectMenu = _sfc_main$i;
1349
+ const _component_UIcon = _sfc_main$d;
1350
+ const _component_UInputTags = _sfc_main$j;
1351
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "border-b border-default px-4 py-3 bg-elevated/50" }, _attrs))}><div class="flex flex-wrap items-start gap-3">`);
1352
+ _push(ssrRenderComponent(_component_UFormField, {
1353
+ label: "Project",
1354
+ class: "w-40"
1355
+ }, {
1356
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
1357
+ if (_push2) {
1358
+ _push2(ssrRenderComponent(_component_USelectMenu, {
1359
+ "model-value": __props.metadata.projectId,
1360
+ items: unref(projectOptions),
1361
+ "value-key": "value",
1362
+ placeholder: "None",
1363
+ class: "w-full",
1364
+ "search-input": false,
1365
+ "onUpdate:modelValue": handleProjectChange
1366
+ }, null, _parent2, _scopeId));
1367
+ } else {
1368
+ return [
1369
+ createVNode(_component_USelectMenu, {
1370
+ "model-value": __props.metadata.projectId,
1371
+ items: unref(projectOptions),
1372
+ "value-key": "value",
1373
+ placeholder: "None",
1374
+ class: "w-full",
1375
+ "search-input": false,
1376
+ "onUpdate:modelValue": handleProjectChange
1377
+ }, null, 8, ["model-value", "items"])
1378
+ ];
1379
+ }
1380
+ }),
1381
+ _: 1
1382
+ }, _parent));
1383
+ _push(ssrRenderComponent(_component_UFormField, {
1384
+ label: "Visibility",
1385
+ class: "w-44"
1386
+ }, {
1387
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
1388
+ if (_push2) {
1389
+ _push2(ssrRenderComponent(_component_USelectMenu, {
1390
+ "model-value": unref(visibility),
1391
+ items: visibilityOptions,
1392
+ "value-key": "value",
1393
+ class: "w-full",
1394
+ "search-input": false,
1395
+ "onUpdate:modelValue": handleVisibilityChange
1396
+ }, {
1397
+ leading: withCtx((_2, _push3, _parent3, _scopeId2) => {
1398
+ if (_push3) {
1399
+ if (unref(selectedVisibility)) {
1400
+ _push3(ssrRenderComponent(_component_UIcon, {
1401
+ name: unref(selectedVisibility).icon,
1402
+ class: "size-4 text-dimmed"
1403
+ }, null, _parent3, _scopeId2));
1404
+ } else {
1405
+ _push3(`<!---->`);
1406
+ }
1407
+ } else {
1408
+ return [
1409
+ unref(selectedVisibility) ? (openBlock(), createBlock(_component_UIcon, {
1410
+ key: 0,
1411
+ name: unref(selectedVisibility).icon,
1412
+ class: "size-4 text-dimmed"
1413
+ }, null, 8, ["name"])) : createCommentVNode("", true)
1414
+ ];
1415
+ }
1416
+ }),
1417
+ item: withCtx(({ item }, _push3, _parent3, _scopeId2) => {
1418
+ if (_push3) {
1419
+ _push3(`<div class="flex items-start gap-2 py-0.5"${_scopeId2}>`);
1420
+ _push3(ssrRenderComponent(_component_UIcon, {
1421
+ name: item.icon,
1422
+ class: "size-4 mt-0.5 shrink-0"
1423
+ }, null, _parent3, _scopeId2));
1424
+ _push3(`<div class="min-w-0"${_scopeId2}><div class="font-medium"${_scopeId2}>${ssrInterpolate(item.label)}</div><div class="text-xs text-dimmed truncate"${_scopeId2}>${ssrInterpolate(item.description)}</div></div></div>`);
1425
+ } else {
1426
+ return [
1427
+ createVNode("div", { class: "flex items-start gap-2 py-0.5" }, [
1428
+ createVNode(_component_UIcon, {
1429
+ name: item.icon,
1430
+ class: "size-4 mt-0.5 shrink-0"
1431
+ }, null, 8, ["name"]),
1432
+ createVNode("div", { class: "min-w-0" }, [
1433
+ createVNode("div", { class: "font-medium" }, toDisplayString(item.label), 1),
1434
+ createVNode("div", { class: "text-xs text-dimmed truncate" }, toDisplayString(item.description), 1)
1435
+ ])
1436
+ ])
1437
+ ];
1438
+ }
1439
+ }),
1440
+ _: 1
1441
+ }, _parent2, _scopeId));
1442
+ } else {
1443
+ return [
1444
+ createVNode(_component_USelectMenu, {
1445
+ "model-value": unref(visibility),
1446
+ items: visibilityOptions,
1447
+ "value-key": "value",
1448
+ class: "w-full",
1449
+ "search-input": false,
1450
+ "onUpdate:modelValue": handleVisibilityChange
1451
+ }, {
1452
+ leading: withCtx(() => [
1453
+ unref(selectedVisibility) ? (openBlock(), createBlock(_component_UIcon, {
1454
+ key: 0,
1455
+ name: unref(selectedVisibility).icon,
1456
+ class: "size-4 text-dimmed"
1457
+ }, null, 8, ["name"])) : createCommentVNode("", true)
1458
+ ]),
1459
+ item: withCtx(({ item }) => [
1460
+ createVNode("div", { class: "flex items-start gap-2 py-0.5" }, [
1461
+ createVNode(_component_UIcon, {
1462
+ name: item.icon,
1463
+ class: "size-4 mt-0.5 shrink-0"
1464
+ }, null, 8, ["name"]),
1465
+ createVNode("div", { class: "min-w-0" }, [
1466
+ createVNode("div", { class: "font-medium" }, toDisplayString(item.label), 1),
1467
+ createVNode("div", { class: "text-xs text-dimmed truncate" }, toDisplayString(item.description), 1)
1468
+ ])
1469
+ ])
1470
+ ]),
1471
+ _: 1
1472
+ }, 8, ["model-value"])
1473
+ ];
1474
+ }
1475
+ }),
1476
+ _: 1
1477
+ }, _parent));
1478
+ _push(ssrRenderComponent(_component_UFormField, {
1479
+ label: "Tags",
1480
+ class: "flex-1 min-w-48"
1481
+ }, {
1482
+ default: withCtx((_, _push2, _parent2, _scopeId) => {
1483
+ if (_push2) {
1484
+ _push2(ssrRenderComponent(_component_UInputTags, {
1485
+ modelValue: unref(localTags),
1486
+ "onUpdate:modelValue": ($event) => isRef(localTags) ? localTags.value = $event : null,
1487
+ placeholder: "Add tags...",
1488
+ class: "w-full"
1489
+ }, null, _parent2, _scopeId));
1490
+ } else {
1491
+ return [
1492
+ createVNode(_component_UInputTags, {
1493
+ modelValue: unref(localTags),
1494
+ "onUpdate:modelValue": ($event) => isRef(localTags) ? localTags.value = $event : null,
1495
+ placeholder: "Add tags...",
1496
+ class: "w-full"
1497
+ }, null, 8, ["modelValue", "onUpdate:modelValue"])
1498
+ ];
1499
+ }
1500
+ }),
1501
+ _: 1
1502
+ }, _parent));
1503
+ _push(`</div></div>`);
1504
+ };
1505
+ }
1506
+ });
1507
+ const _sfc_setup$2 = _sfc_main$2.setup;
1508
+ _sfc_main$2.setup = (props, ctx) => {
1509
+ const ssrContext = useSSRContext();
1510
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/editor/DocumentMetadata.vue");
1511
+ return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
1512
+ };
1513
+ const __nuxt_component_3 = Object.assign(_sfc_main$2, { __name: "EditorDocumentMetadata" });
1514
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
1515
+ __name: "DocumentEditor",
1516
+ __ssrInlineRender: true,
1517
+ props: {
1518
+ document: {},
1519
+ body: {},
1520
+ metadata: {},
1521
+ filePath: {},
1522
+ saveStatus: {},
1523
+ isDirty: { type: Boolean },
1524
+ metadataDirty: { type: Boolean }
1525
+ },
1526
+ emits: ["update:body", "update:metadata", "save"],
1527
+ async setup(__props, { emit: __emit }) {
1528
+ let __temp, __restore;
1529
+ const props = __props;
1530
+ const emit = __emit;
1531
+ const { data: projectsData } = ([__temp, __restore] = withAsyncContext(() => useFetch("/api/projects", "$c96-63t_ij")), __temp = await __temp, __restore(), __temp);
1532
+ const projects = computed(() => projectsData.value?.data || []);
1533
+ const showMetadata = ref(true);
1534
+ const { editorMode } = usePreferences();
1535
+ const isEditorMode = computed({
1536
+ get: () => editorMode.value === "editor",
1537
+ set: (v) => editorMode.value = v ? "editor" : "code"
1538
+ });
1539
+ const isMarkdown = computed(
1540
+ () => props.document.fileType === "markdown" || isMarkdownFile(props.filePath)
1541
+ );
1542
+ computed(() => detectLanguage(props.filePath));
1543
+ const showModeToggle = computed(() => isMarkdown.value);
1544
+ const toolbarItems = [
1545
+ [
1546
+ { kind: "heading", level: 1, icon: "i-lucide-heading-1" },
1547
+ { kind: "heading", level: 2, icon: "i-lucide-heading-2" },
1548
+ { kind: "heading", level: 3, icon: "i-lucide-heading-3" }
1549
+ ],
1550
+ [
1551
+ { kind: "mark", mark: "bold", icon: "i-lucide-bold" },
1552
+ { kind: "mark", mark: "italic", icon: "i-lucide-italic" },
1553
+ { kind: "mark", mark: "code", icon: "i-lucide-code" }
1554
+ ],
1555
+ [
1556
+ { kind: "bulletList", icon: "i-lucide-list" },
1557
+ { kind: "orderedList", icon: "i-lucide-list-ordered" },
1558
+ { kind: "blockquote", icon: "i-lucide-quote" }
1559
+ ],
1560
+ [
1561
+ { kind: "link", icon: "i-lucide-link" },
1562
+ { kind: "codeBlock", icon: "i-lucide-file-code" },
1563
+ { kind: "horizontalRule", icon: "i-lucide-minus" }
1564
+ ],
1565
+ [
1566
+ { kind: "undo", icon: "i-lucide-undo" },
1567
+ { kind: "redo", icon: "i-lucide-redo" }
1568
+ ]
1569
+ ];
1570
+ const saveStatusIcon = computed(() => {
1571
+ switch (props.saveStatus) {
1572
+ case "saving":
1573
+ return "i-lucide-loader-2";
1574
+ case "saved":
1575
+ return "i-lucide-check";
1576
+ case "error":
1577
+ return "i-lucide-alert-circle";
1578
+ default:
1579
+ return props.isDirty || props.metadataDirty ? "i-lucide-circle-dot" : null;
1580
+ }
1581
+ });
1582
+ const saveStatusText = computed(() => {
1583
+ switch (props.saveStatus) {
1584
+ case "saving":
1585
+ return "Saving...";
1586
+ case "saved":
1587
+ return "Saved";
1588
+ case "error":
1589
+ return "Error saving";
1590
+ default:
1591
+ return props.isDirty || props.metadataDirty ? "Unsaved changes" : "";
1592
+ }
1593
+ });
1594
+ const editorContent = computed(() => props.body || void 0);
1595
+ function handleBodyUpdate(value) {
1596
+ emit("update:body", value);
1597
+ }
1598
+ function handleMetadataUpdate(updates) {
1599
+ emit("update:metadata", updates);
1600
+ }
1601
+ const toast = useToast();
1602
+ const shareUrl = computed(() => {
1603
+ if (!props.document?.id) return "";
1604
+ return `${(void 0).location.origin}/view/${props.document.id}`;
1605
+ });
1606
+ const linkCopied = ref(false);
1607
+ const showShareModal = ref(false);
1608
+ function handleShareClick() {
1609
+ if (props.metadata.shared) {
1610
+ copyShareLink();
1611
+ } else {
1612
+ showShareModal.value = true;
1613
+ }
1614
+ }
1615
+ const { copy } = useCopyToClipboard();
1616
+ async function copyShareLink() {
1617
+ const ok = await copy(shareUrl.value);
1618
+ if (ok) {
1619
+ linkCopied.value = true;
1620
+ toast.add({ title: "Link copied!", icon: "i-lucide-check", color: "success" });
1621
+ setTimeout(() => {
1622
+ linkCopied.value = false;
1623
+ }, 2e3);
1624
+ } else {
1625
+ toast.add({ title: "Failed to copy link", icon: "i-lucide-x", color: "error" });
1626
+ }
1627
+ }
1628
+ function setVisibility(shared, shareType) {
1629
+ emit("update:metadata", { shared, shareType: shareType ?? void 0 });
1630
+ showShareModal.value = false;
1631
+ if (shared) {
1632
+ setTimeout(() => copyShareLink(), 100);
1633
+ }
1634
+ }
1635
+ return (_ctx, _push, _parent, _attrs) => {
1636
+ const _component_UIcon = _sfc_main$d;
1637
+ const _component_USwitch = _sfc_main$f;
1638
+ const _component_UButton = _sfc_main$8;
1639
+ const _component_EditorDocumentMetadata = __nuxt_component_3;
1640
+ const _component_UEditor = _sfc_main$1$3;
1641
+ const _component_UEditorToolbar = _sfc_main$g;
1642
+ const _component_ClientOnly = __nuxt_component_3$1;
1643
+ const _component_EditorCodeEditorFallback = __nuxt_component_5;
1644
+ const _component_UModal = _sfc_main$c;
1645
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "h-full flex flex-col" }, _attrs))}><div class="border-b border-default py-2 flex items-center justify-between"><div class="flex items-center gap-2 text-sm text-dimmed min-w-0">`);
1646
+ _push(ssrRenderComponent(_component_UIcon, {
1647
+ name: "i-lucide-file-text",
1648
+ class: "size-4 shrink-0"
1649
+ }, null, _parent));
1650
+ _push(`<span class="truncate">${ssrInterpolate(__props.filePath)}</span></div>`);
1651
+ if (unref(showModeToggle)) {
1652
+ _push(`<div class="w-40">`);
1653
+ _push(ssrRenderComponent(_component_USwitch, {
1654
+ modelValue: unref(isEditorMode),
1655
+ "onUpdate:modelValue": ($event) => isRef(isEditorMode) ? isEditorMode.value = $event : null,
1656
+ "unchecked-icon": "i-lucide-code",
1657
+ "checked-icon": "i-lucide-pencil",
1658
+ label: unref(isEditorMode) ? "Editor Mode" : "Code Mode",
1659
+ ui: { base: "data-[state=unchecked]:bg-info", icon: "group-data-[state=unchecked]:text-info" }
1660
+ }, null, _parent));
1661
+ _push(`</div>`);
1662
+ } else {
1663
+ _push(`<!---->`);
1664
+ }
1665
+ _push(`<div class="flex items-center gap-3">`);
1666
+ _push(ssrRenderComponent(_component_UButton, {
1667
+ icon: unref(linkCopied) ? "i-lucide-check" : "i-lucide-share",
1668
+ size: "xs",
1669
+ variant: "ghost",
1670
+ class: "rounded-full",
1671
+ onClick: handleShareClick
1672
+ }, null, _parent));
1673
+ _push(ssrRenderComponent(_component_UButton, {
1674
+ icon: unref(showMetadata) ? "i-lucide-panel-top-close" : "i-lucide-panel-top-open",
1675
+ size: "xs",
1676
+ variant: "ghost",
1677
+ class: "rounded-full",
1678
+ onClick: ($event) => showMetadata.value = !unref(showMetadata)
1679
+ }, null, _parent));
1680
+ if (unref(saveStatusIcon)) {
1681
+ _push(`<div class="flex items-center gap-1 text-sm text-dimmed">`);
1682
+ _push(ssrRenderComponent(_component_UIcon, {
1683
+ name: unref(saveStatusIcon),
1684
+ class: [
1685
+ "size-4",
1686
+ __props.saveStatus === "saving" && "animate-spin",
1687
+ __props.saveStatus === "error" && "text-error"
1688
+ ]
1689
+ }, null, _parent));
1690
+ _push(`<span>${ssrInterpolate(unref(saveStatusText))}</span></div>`);
1691
+ } else {
1692
+ _push(`<!---->`);
1693
+ }
1694
+ _push(`</div></div>`);
1695
+ if (unref(showMetadata)) {
1696
+ _push(ssrRenderComponent(_component_EditorDocumentMetadata, {
1697
+ metadata: __props.metadata,
1698
+ projects: unref(projects),
1699
+ "onUpdate:metadata": handleMetadataUpdate
1700
+ }, null, _parent));
1701
+ } else {
1702
+ _push(`<!---->`);
1703
+ }
1704
+ if (unref(isMarkdown) && unref(isEditorMode)) {
1705
+ _push(ssrRenderComponent(_component_UEditor, {
1706
+ "model-value": unref(editorContent),
1707
+ "content-type": "markdown",
1708
+ placeholder: "Start writing...",
1709
+ class: "markdown-editor w-full min-h-64 flex-1",
1710
+ "onUpdate:modelValue": handleBodyUpdate
1711
+ }, {
1712
+ default: withCtx(({ editor }, _push2, _parent2, _scopeId) => {
1713
+ if (_push2) {
1714
+ _push2(ssrRenderComponent(_component_UEditorToolbar, {
1715
+ editor,
1716
+ items: toolbarItems,
1717
+ class: "border-b border-default"
1718
+ }, null, _parent2, _scopeId));
1719
+ } else {
1720
+ return [
1721
+ createVNode(_component_UEditorToolbar, {
1722
+ editor,
1723
+ items: toolbarItems,
1724
+ class: "border-b border-default"
1725
+ }, null, 8, ["editor"])
1726
+ ];
1727
+ }
1728
+ }),
1729
+ _: 1
1730
+ }, _parent));
1731
+ } else {
1732
+ _push(ssrRenderComponent(_component_ClientOnly, null, {
1733
+ fallback: withCtx((_, _push2, _parent2, _scopeId) => {
1734
+ if (_push2) {
1735
+ _push2(ssrRenderComponent(_component_EditorCodeEditorFallback, { class: "flex-1" }, null, _parent2, _scopeId));
1736
+ } else {
1737
+ return [
1738
+ createVNode(_component_EditorCodeEditorFallback, { class: "flex-1" })
1739
+ ];
1740
+ }
1741
+ })
1742
+ }, _parent));
1743
+ }
1744
+ _push(ssrRenderComponent(_component_UModal, {
1745
+ open: unref(showShareModal),
1746
+ "onUpdate:open": ($event) => isRef(showShareModal) ? showShareModal.value = $event : null,
1747
+ title: "Share Document",
1748
+ description: "Choose how you want to share this document"
1749
+ }, {
1750
+ body: withCtx((_, _push2, _parent2, _scopeId) => {
1751
+ if (_push2) {
1752
+ _push2(`<div class="space-y-4"${_scopeId}><div class="${ssrRenderClass([{ "border-primary bg-elevated": !__props.metadata.shared }, "p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors"])}"${_scopeId}><div class="flex items-center gap-3"${_scopeId}>`);
1753
+ _push2(ssrRenderComponent(_component_UIcon, {
1754
+ name: "i-lucide-eye-off",
1755
+ class: "size-5 text-dimmed"
1756
+ }, null, _parent2, _scopeId));
1757
+ _push2(`<div${_scopeId}><div class="font-medium"${_scopeId}> Hidden </div><div class="text-sm text-dimmed"${_scopeId}> Only you can view this document. Not accessible via link. </div></div></div></div><div class="${ssrRenderClass([{ "border-primary bg-elevated": __props.metadata.shared && __props.metadata.shareType === "private" }, "p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors"])}"${_scopeId}><div class="flex items-center gap-3"${_scopeId}>`);
1758
+ _push2(ssrRenderComponent(_component_UIcon, {
1759
+ name: "i-lucide-link",
1760
+ class: "size-5 text-dimmed"
1761
+ }, null, _parent2, _scopeId));
1762
+ _push2(`<div${_scopeId}><div class="font-medium"${_scopeId}> Private (Link Only) </div><div class="text-sm text-dimmed"${_scopeId}> Anyone with the link can view. Not indexed by search engines. </div></div></div></div><div class="${ssrRenderClass([{ "border-primary bg-elevated": __props.metadata.shared && __props.metadata.shareType === "public" }, "p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors"])}"${_scopeId}><div class="flex items-center gap-3"${_scopeId}>`);
1763
+ _push2(ssrRenderComponent(_component_UIcon, {
1764
+ name: "i-lucide-globe",
1765
+ class: "size-5 text-dimmed"
1766
+ }, null, _parent2, _scopeId));
1767
+ _push2(`<div${_scopeId}><div class="font-medium"${_scopeId}> Public </div><div class="text-sm text-dimmed"${_scopeId}> Visible to everyone. Indexed by search engines. </div></div></div></div></div>`);
1768
+ } else {
1769
+ return [
1770
+ createVNode("div", { class: "space-y-4" }, [
1771
+ createVNode("div", {
1772
+ class: ["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors", { "border-primary bg-elevated": !__props.metadata.shared }],
1773
+ onClick: ($event) => setVisibility(false, null)
1774
+ }, [
1775
+ createVNode("div", { class: "flex items-center gap-3" }, [
1776
+ createVNode(_component_UIcon, {
1777
+ name: "i-lucide-eye-off",
1778
+ class: "size-5 text-dimmed"
1779
+ }),
1780
+ createVNode("div", null, [
1781
+ createVNode("div", { class: "font-medium" }, " Hidden "),
1782
+ createVNode("div", { class: "text-sm text-dimmed" }, " Only you can view this document. Not accessible via link. ")
1783
+ ])
1784
+ ])
1785
+ ], 10, ["onClick"]),
1786
+ createVNode("div", {
1787
+ class: ["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors", { "border-primary bg-elevated": __props.metadata.shared && __props.metadata.shareType === "private" }],
1788
+ onClick: ($event) => setVisibility(true, "private")
1789
+ }, [
1790
+ createVNode("div", { class: "flex items-center gap-3" }, [
1791
+ createVNode(_component_UIcon, {
1792
+ name: "i-lucide-link",
1793
+ class: "size-5 text-dimmed"
1794
+ }),
1795
+ createVNode("div", null, [
1796
+ createVNode("div", { class: "font-medium" }, " Private (Link Only) "),
1797
+ createVNode("div", { class: "text-sm text-dimmed" }, " Anyone with the link can view. Not indexed by search engines. ")
1798
+ ])
1799
+ ])
1800
+ ], 10, ["onClick"]),
1801
+ createVNode("div", {
1802
+ class: ["p-4 border border-default rounded-lg cursor-pointer hover:bg-elevated transition-colors", { "border-primary bg-elevated": __props.metadata.shared && __props.metadata.shareType === "public" }],
1803
+ onClick: ($event) => setVisibility(true, "public")
1804
+ }, [
1805
+ createVNode("div", { class: "flex items-center gap-3" }, [
1806
+ createVNode(_component_UIcon, {
1807
+ name: "i-lucide-globe",
1808
+ class: "size-5 text-dimmed"
1809
+ }),
1810
+ createVNode("div", null, [
1811
+ createVNode("div", { class: "font-medium" }, " Public "),
1812
+ createVNode("div", { class: "text-sm text-dimmed" }, " Visible to everyone. Indexed by search engines. ")
1813
+ ])
1814
+ ])
1815
+ ], 10, ["onClick"])
1816
+ ])
1817
+ ];
1818
+ }
1819
+ }),
1820
+ _: 1
1821
+ }, _parent));
1822
+ _push(`</div>`);
1823
+ };
1824
+ }
1825
+ });
1826
+ const _sfc_setup$1 = _sfc_main$1.setup;
1827
+ _sfc_main$1.setup = (props, ctx) => {
1828
+ const ssrContext = useSSRContext();
1829
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/editor/DocumentEditor.vue");
1830
+ return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
1831
+ };
1832
+ const __nuxt_component_8 = Object.assign(_sfc_main$1, { __name: "EditorDocumentEditor" });
1833
+ function useDocument() {
1834
+ const document = ref(null);
1835
+ const metadata = ref(null);
1836
+ const body = ref("");
1837
+ const filePath = ref(null);
1838
+ const loading = ref(false);
1839
+ const saveStatus = ref("idle");
1840
+ const isDirty = ref(false);
1841
+ const metadataDirty = ref(false);
1842
+ const debouncedSaveBody = useDebounceFn(async () => {
1843
+ if (!document.value || !isDirty.value) return;
1844
+ await saveDocument({ body: body.value });
1845
+ }, 2e3);
1846
+ const debouncedSaveMetadata = useDebounceFn(async () => {
1847
+ if (!document.value || !metadataDirty.value) return;
1848
+ await saveDocument();
1849
+ }, 500);
1850
+ async function loadDocument(path) {
1851
+ loading.value = true;
1852
+ filePath.value = path;
1853
+ isDirty.value = false;
1854
+ metadataDirty.value = false;
1855
+ saveStatus.value = "idle";
1856
+ try {
1857
+ const response = await $fetch("/api/documents/by-path", {
1858
+ method: "POST",
1859
+ body: { path }
1860
+ });
1861
+ document.value = response.data.document;
1862
+ metadata.value = response.data.metadata;
1863
+ body.value = response.data.body || "";
1864
+ } catch (e) {
1865
+ console.error("Failed to load document:", e);
1866
+ document.value = null;
1867
+ metadata.value = null;
1868
+ body.value = "";
1869
+ } finally {
1870
+ loading.value = false;
1871
+ }
1872
+ }
1873
+ function updateBody(newBody) {
1874
+ if (body.value !== newBody) {
1875
+ body.value = newBody;
1876
+ isDirty.value = true;
1877
+ debouncedSaveBody();
1878
+ }
1879
+ }
1880
+ function updateMetadata(updates) {
1881
+ if (!metadata.value) return;
1882
+ metadata.value = { ...metadata.value, ...updates };
1883
+ metadataDirty.value = true;
1884
+ debouncedSaveMetadata();
1885
+ }
1886
+ async function saveDocument(updates = {}) {
1887
+ if (!document.value) return;
1888
+ saveStatus.value = "saving";
1889
+ try {
1890
+ const payload = { ...updates };
1891
+ if (metadataDirty.value && metadata.value) {
1892
+ payload.title = metadata.value.title;
1893
+ payload.tags = metadata.value.tags;
1894
+ payload.projectId = metadata.value.projectId;
1895
+ payload.shared = metadata.value.shared;
1896
+ payload.shareType = metadata.value.shareType;
1897
+ }
1898
+ if (isDirty.value && updates.body === void 0)
1899
+ payload.body = body.value;
1900
+ const response = await $fetch(`/api/documents/${document.value.id}`, {
1901
+ method: "PUT",
1902
+ body: payload
1903
+ });
1904
+ document.value = response.data.document;
1905
+ metadata.value = response.data.metadata;
1906
+ body.value = response.data.body || "";
1907
+ isDirty.value = false;
1908
+ metadataDirty.value = false;
1909
+ saveStatus.value = "saved";
1910
+ setTimeout(() => {
1911
+ if (saveStatus.value === "saved")
1912
+ saveStatus.value = "idle";
1913
+ }, 2e3);
1914
+ } catch (e) {
1915
+ console.error("Failed to save document:", e);
1916
+ saveStatus.value = "error";
1917
+ }
1918
+ }
1919
+ async function saveNow() {
1920
+ if (!isDirty.value && !metadataDirty.value) return;
1921
+ await saveDocument({ body: body.value });
1922
+ }
1923
+ function closeDocument() {
1924
+ document.value = null;
1925
+ metadata.value = null;
1926
+ body.value = "";
1927
+ filePath.value = null;
1928
+ isDirty.value = false;
1929
+ metadataDirty.value = false;
1930
+ saveStatus.value = "idle";
1931
+ }
1932
+ return {
1933
+ document,
1934
+ metadata,
1935
+ body,
1936
+ filePath,
1937
+ loading,
1938
+ saveStatus,
1939
+ isDirty,
1940
+ metadataDirty,
1941
+ loadDocument,
1942
+ updateBody,
1943
+ updateMetadata,
1944
+ saveDocument,
1945
+ saveNow,
1946
+ closeDocument
1947
+ };
1948
+ }
1949
+ const _sfc_main = /* @__PURE__ */ defineComponent({
1950
+ __name: "docs",
1951
+ __ssrInlineRender: true,
1952
+ setup(__props) {
1953
+ useRoute();
1954
+ const {
1955
+ document,
1956
+ metadata,
1957
+ body,
1958
+ filePath,
1959
+ loading,
1960
+ saveStatus,
1961
+ isDirty,
1962
+ metadataDirty,
1963
+ loadDocument,
1964
+ updateBody,
1965
+ updateMetadata,
1966
+ saveNow
1967
+ } = useDocument();
1968
+ const { lastDocumentPath } = usePreferences();
1969
+ async function handleFileSelect(path) {
1970
+ await loadDocument(path);
1971
+ lastDocumentPath.value = path;
1972
+ }
1973
+ return (_ctx, _push, _parent, _attrs) => {
1974
+ const _component_UDashboardPanel = _sfc_main$1$1;
1975
+ const _component_FilesFileTree = __nuxt_component_1;
1976
+ const _component_UDashboardNavbar = _sfc_main$5;
1977
+ const _component_UDashboardSidebarCollapse = _sfc_main$3;
1978
+ const _component_UColorModeButton = _sfc_main$6;
1979
+ const _component_UDrawer = _sfc_main$7;
1980
+ const _component_UButton = _sfc_main$8;
1981
+ const _component_UIcon = _sfc_main$d;
1982
+ const _component_EditorDocumentEditor = __nuxt_component_8;
1983
+ _push(`<div${ssrRenderAttrs(mergeProps({ class: "flex flex-1 min-w-0" }, _attrs))}>`);
1984
+ _push(ssrRenderComponent(_component_UDashboardPanel, {
1985
+ id: "docs-filetree",
1986
+ collapsible: "",
1987
+ resizable: "",
1988
+ "min-size": 12,
1989
+ "default-size": 16,
1990
+ "max-size": 24,
1991
+ class: "hidden lg:flex"
1992
+ }, {
1993
+ body: withCtx((_, _push2, _parent2, _scopeId) => {
1994
+ if (_push2) {
1995
+ _push2(ssrRenderComponent(_component_FilesFileTree, {
1996
+ class: "h-full",
1997
+ onSelect: handleFileSelect
1998
+ }, null, _parent2, _scopeId));
1999
+ } else {
2000
+ return [
2001
+ createVNode(_component_FilesFileTree, {
2002
+ class: "h-full",
2003
+ onSelect: handleFileSelect
2004
+ })
2005
+ ];
2006
+ }
2007
+ }),
2008
+ _: 1
2009
+ }, _parent));
2010
+ _push(ssrRenderComponent(_component_UDashboardPanel, {
2011
+ id: "docs-editor",
2012
+ grow: "",
2013
+ ui: { body: "sm:py-0" }
2014
+ }, {
2015
+ header: withCtx((_, _push2, _parent2, _scopeId) => {
2016
+ if (_push2) {
2017
+ _push2(ssrRenderComponent(_component_UDashboardNavbar, null, {
2018
+ title: withCtx((_2, _push3, _parent3, _scopeId2) => {
2019
+ if (_push3) {
2020
+ _push3(ssrRenderComponent(_component_UDashboardSidebarCollapse, null, null, _parent3, _scopeId2));
2021
+ _push3(` Editor `);
2022
+ } else {
2023
+ return [
2024
+ createVNode(_component_UDashboardSidebarCollapse),
2025
+ createTextVNode(" Editor ")
2026
+ ];
2027
+ }
2028
+ }),
2029
+ right: withCtx((_2, _push3, _parent3, _scopeId2) => {
2030
+ if (_push3) {
2031
+ _push3(ssrRenderComponent(_component_UColorModeButton, null, null, _parent3, _scopeId2));
2032
+ _push3(ssrRenderComponent(_component_UDrawer, null, {
2033
+ content: withCtx((_3, _push4, _parent4, _scopeId3) => {
2034
+ if (_push4) {
2035
+ _push4(ssrRenderComponent(_component_FilesFileTree, {
2036
+ class: "h-full",
2037
+ onSelect: handleFileSelect
2038
+ }, null, _parent4, _scopeId3));
2039
+ } else {
2040
+ return [
2041
+ createVNode(_component_FilesFileTree, {
2042
+ class: "h-full",
2043
+ onSelect: handleFileSelect
2044
+ })
2045
+ ];
2046
+ }
2047
+ }),
2048
+ default: withCtx((_3, _push4, _parent4, _scopeId3) => {
2049
+ if (_push4) {
2050
+ _push4(ssrRenderComponent(_component_UButton, {
2051
+ icon: "i-lucide-folder-tree",
2052
+ class: "block lg:hidden"
2053
+ }, null, _parent4, _scopeId3));
2054
+ } else {
2055
+ return [
2056
+ createVNode(_component_UButton, {
2057
+ icon: "i-lucide-folder-tree",
2058
+ class: "block lg:hidden"
2059
+ })
2060
+ ];
2061
+ }
2062
+ }),
2063
+ _: 1
2064
+ }, _parent3, _scopeId2));
2065
+ } else {
2066
+ return [
2067
+ createVNode(_component_UColorModeButton),
2068
+ createVNode(_component_UDrawer, null, {
2069
+ content: withCtx(() => [
2070
+ createVNode(_component_FilesFileTree, {
2071
+ class: "h-full",
2072
+ onSelect: handleFileSelect
2073
+ })
2074
+ ]),
2075
+ default: withCtx(() => [
2076
+ createVNode(_component_UButton, {
2077
+ icon: "i-lucide-folder-tree",
2078
+ class: "block lg:hidden"
2079
+ })
2080
+ ]),
2081
+ _: 1
2082
+ })
2083
+ ];
2084
+ }
2085
+ }),
2086
+ _: 1
2087
+ }, _parent2, _scopeId));
2088
+ } else {
2089
+ return [
2090
+ createVNode(_component_UDashboardNavbar, null, {
2091
+ title: withCtx(() => [
2092
+ createVNode(_component_UDashboardSidebarCollapse),
2093
+ createTextVNode(" Editor ")
2094
+ ]),
2095
+ right: withCtx(() => [
2096
+ createVNode(_component_UColorModeButton),
2097
+ createVNode(_component_UDrawer, null, {
2098
+ content: withCtx(() => [
2099
+ createVNode(_component_FilesFileTree, {
2100
+ class: "h-full",
2101
+ onSelect: handleFileSelect
2102
+ })
2103
+ ]),
2104
+ default: withCtx(() => [
2105
+ createVNode(_component_UButton, {
2106
+ icon: "i-lucide-folder-tree",
2107
+ class: "block lg:hidden"
2108
+ })
2109
+ ]),
2110
+ _: 1
2111
+ })
2112
+ ]),
2113
+ _: 1
2114
+ })
2115
+ ];
2116
+ }
2117
+ }),
2118
+ body: withCtx((_, _push2, _parent2, _scopeId) => {
2119
+ if (_push2) {
2120
+ if (unref(loading)) {
2121
+ _push2(`<div class="flex-1 flex items-center justify-center h-full"${_scopeId}>`);
2122
+ _push2(ssrRenderComponent(_component_UIcon, {
2123
+ name: "i-lucide-loader-2",
2124
+ class: "size-6 animate-spin text-dimmed"
2125
+ }, null, _parent2, _scopeId));
2126
+ _push2(`</div>`);
2127
+ } else if (!unref(filePath)) {
2128
+ _push2(`<div class="flex-1 flex items-center justify-center h-full text-dimmed"${_scopeId}><div class="text-center"${_scopeId}>`);
2129
+ _push2(ssrRenderComponent(_component_UIcon, {
2130
+ name: "i-lucide-file-text",
2131
+ class: "size-32 mx-auto mb-4 opacity-50"
2132
+ }, null, _parent2, _scopeId));
2133
+ _push2(`<p${_scopeId}>Select a file to edit</p></div></div>`);
2134
+ } else if (unref(metadata) && unref(document)) {
2135
+ _push2(ssrRenderComponent(_component_EditorDocumentEditor, {
2136
+ key: unref(filePath),
2137
+ document: unref(document),
2138
+ body: unref(body),
2139
+ metadata: unref(metadata),
2140
+ "file-path": unref(filePath),
2141
+ "save-status": unref(saveStatus),
2142
+ "is-dirty": unref(isDirty),
2143
+ "metadata-dirty": unref(metadataDirty),
2144
+ class: "h-full",
2145
+ "onUpdate:body": unref(updateBody),
2146
+ "onUpdate:metadata": unref(updateMetadata),
2147
+ onSave: unref(saveNow)
2148
+ }, null, _parent2, _scopeId));
2149
+ } else {
2150
+ _push2(`<!---->`);
2151
+ }
2152
+ } else {
2153
+ return [
2154
+ unref(loading) ? (openBlock(), createBlock("div", {
2155
+ key: 0,
2156
+ class: "flex-1 flex items-center justify-center h-full"
2157
+ }, [
2158
+ createVNode(_component_UIcon, {
2159
+ name: "i-lucide-loader-2",
2160
+ class: "size-6 animate-spin text-dimmed"
2161
+ })
2162
+ ])) : !unref(filePath) ? (openBlock(), createBlock("div", {
2163
+ key: 1,
2164
+ class: "flex-1 flex items-center justify-center h-full text-dimmed"
2165
+ }, [
2166
+ createVNode("div", { class: "text-center" }, [
2167
+ createVNode(_component_UIcon, {
2168
+ name: "i-lucide-file-text",
2169
+ class: "size-32 mx-auto mb-4 opacity-50"
2170
+ }),
2171
+ createVNode("p", null, "Select a file to edit")
2172
+ ])
2173
+ ])) : unref(metadata) && unref(document) ? (openBlock(), createBlock(_component_EditorDocumentEditor, {
2174
+ key: unref(filePath),
2175
+ document: unref(document),
2176
+ body: unref(body),
2177
+ metadata: unref(metadata),
2178
+ "file-path": unref(filePath),
2179
+ "save-status": unref(saveStatus),
2180
+ "is-dirty": unref(isDirty),
2181
+ "metadata-dirty": unref(metadataDirty),
2182
+ class: "h-full",
2183
+ "onUpdate:body": unref(updateBody),
2184
+ "onUpdate:metadata": unref(updateMetadata),
2185
+ onSave: unref(saveNow)
2186
+ }, null, 8, ["document", "body", "metadata", "file-path", "save-status", "is-dirty", "metadata-dirty", "onUpdate:body", "onUpdate:metadata", "onSave"])) : createCommentVNode("", true)
2187
+ ];
2188
+ }
2189
+ }),
2190
+ _: 1
2191
+ }, _parent));
2192
+ _push(`</div>`);
2193
+ };
2194
+ }
2195
+ });
2196
+ const _sfc_setup = _sfc_main.setup;
2197
+ _sfc_main.setup = (props, ctx) => {
2198
+ const ssrContext = useSSRContext();
2199
+ (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/docs.vue");
2200
+ return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
2201
+ };
2202
+
2203
+ export { _sfc_main as default };
2204
+ //# sourceMappingURL=docs-ChGwOPg5.mjs.map