cognova 0.1.10 → 0.2.2
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.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{BLIw7q7e.js → 4MiwzAAt.js} +2 -2
- package/.output/public/_nuxt/{B8gRcrNP.js → 5ZXA0Ckq.js} +1 -1
- package/.output/public/_nuxt/9IQmsEjr.js +1 -0
- package/.output/public/_nuxt/{DlmPGBGX.js → 9QnH0xQM.js} +1 -1
- package/.output/public/_nuxt/{Qi4Arc25.js → B1X4Bzcy.js} +1 -1
- package/.output/public/_nuxt/{kuWCWJ92.js → B3y_Qqox.js} +1 -1
- package/.output/public/_nuxt/{CJVO4EWp.js → B6S_ob86.js} +1 -1
- package/.output/public/_nuxt/{xdp-pGVh.js → BAIz-dEB.js} +1 -1
- package/.output/public/_nuxt/{DIF41aNz.js → BCtfQCzC.js} +1 -1
- package/.output/public/_nuxt/BIIJhjQO.js +1 -0
- package/.output/public/_nuxt/{QOhiCNXN.js → BIckl6wA.js} +1 -1
- package/.output/public/_nuxt/{CqsT2LL7.js → BJ3o57WW.js} +1 -1
- package/.output/public/_nuxt/BNetzZzF.js +1 -0
- package/.output/public/_nuxt/{C5jkgqcy.js → BOj6t-oo.js} +1 -1
- package/.output/public/_nuxt/BS0ofHJK.js +1 -0
- package/.output/public/_nuxt/{CdKHIoKZ.js → BWhMnjID.js} +1 -1
- package/.output/public/_nuxt/{BUjpjVNI.js → BYjadNrw.js} +1 -1
- package/.output/public/_nuxt/{DLkyutNs.js → BZXMQuYP.js} +1 -1
- package/.output/public/_nuxt/B_3_hrpn.js +1 -0
- package/.output/public/_nuxt/BaBZjmMC.js +1 -0
- package/.output/public/_nuxt/BaMqDm5u.js +1 -0
- package/.output/public/_nuxt/{DwSbu8wg.js → BasgsT_S.js} +1 -1
- package/.output/public/_nuxt/{B4nb4eka.js → BffWCM73.js} +1 -1
- package/.output/public/_nuxt/{BxaDmjPM.js → BhzMoffi.js} +1 -1
- package/.output/public/_nuxt/{DjzaeRs8.js → BjjCvHLT.js} +1 -1
- package/.output/public/_nuxt/{CtJTw_81.js → BlAZO7nq.js} +1 -1
- package/.output/public/_nuxt/{C6nLQFo5.js → BlhFigLL.js} +1 -1
- package/.output/public/_nuxt/{CiJs9fhO.js → Bm9LyG4F.js} +1 -1
- package/.output/public/_nuxt/BoIxv-gM.js +1 -0
- package/.output/public/_nuxt/{C8xYfk_L.js → BqKFIuRj.js} +1 -1
- package/.output/public/_nuxt/Br19oYkq.js +1 -0
- package/.output/public/_nuxt/{htEHZODo.js → BrNqhp1a.js} +3 -3
- package/.output/public/_nuxt/{DFKQfGt8.js → BsEZoHd1.js} +1 -1
- package/.output/public/_nuxt/{CmF_IsFj.js → BxXOsXrM.js} +3 -3
- package/.output/public/_nuxt/{q7M6chAB.js → BzOqrmGa.js} +3 -3
- package/.output/public/_nuxt/{DT_NtxcV.js → C0JKNMDO.js} +1 -1
- package/.output/public/_nuxt/{BOb3QiPL.js → C0kh_F7v.js} +1 -1
- package/.output/public/_nuxt/{D472oOJg.js → C3FxIITy.js} +1 -1
- package/.output/public/_nuxt/{Bh7WRSzZ.js → C4pxqdgg.js} +1 -1
- package/.output/public/_nuxt/{ByWk4RVe.js → C61KgSco.js} +1 -1
- package/.output/public/_nuxt/{TjI_tk0y.js → C69W7k2j.js} +1 -1
- package/.output/public/_nuxt/{uqOLgWHD.js → C6RC3lA1.js} +1 -1
- package/.output/public/_nuxt/{DvA5meSv.js → C6aqGHu1.js} +1 -1
- package/.output/public/_nuxt/{CQM_5Ht0.js → CJUdYEdO.js} +1 -1
- package/.output/public/_nuxt/{BzWvPP8W.js → CKkC3Ptm.js} +1 -1
- package/.output/public/_nuxt/CNnJrDvu.js +1 -0
- package/.output/public/_nuxt/{Bf2SSE6Q.js → CVJQGP1Q.js} +1 -1
- package/.output/public/_nuxt/{0p0wrrYN.js → CVgTJeSq.js} +1 -1
- package/.output/public/_nuxt/CWMUi89H.js +1 -0
- package/.output/public/_nuxt/{DUYrX_jl.js → CYP_MLH8.js} +1 -1
- package/.output/public/_nuxt/{DEDt4pMc.js → C_BdYLzz.js} +1 -1
- package/.output/public/_nuxt/{CU3_Ewk2.js → Cdt3I3Go.js} +1 -1
- package/.output/public/_nuxt/{DX5y-Dpt.js → Cdu2qGgq.js} +1 -1
- package/.output/public/_nuxt/{DQunOghN.js → CeIVm4A3.js} +1 -1
- package/.output/public/_nuxt/CeIu7z4p.js +1 -0
- package/.output/public/_nuxt/{B73gh0JS.js → Ci7UEZQh.js} +1 -1
- package/.output/public/_nuxt/{C7NKjT6R.js → CihWZmJe.js} +2 -2
- package/.output/public/_nuxt/{902fefRh.js → CitkKxhw.js} +1 -1
- package/.output/public/_nuxt/{DH_IrAcJ.js → CmzH6R-N.js} +2 -2
- package/.output/public/_nuxt/{CgPM54k_.js → Cp2MA0cm.js} +1 -1
- package/.output/public/_nuxt/{hfaTbWV_.js → CqU2XbzO.js} +1 -1
- package/.output/public/_nuxt/{CuxiR1jN.js → Cqy_L_ip.js} +1 -1
- package/.output/public/_nuxt/{BFmbqknL.js → Cr8ixbr1.js} +1 -1
- package/.output/public/_nuxt/{BkiRMhMm.js → CsJ9KhQ4.js} +1 -1
- package/.output/public/_nuxt/{Dhvv7eaa.js → CtYFj7k1.js} +1 -1
- package/.output/public/_nuxt/{DG0VCYsy.js → CtchsY6e.js} +1 -1
- package/.output/public/_nuxt/{pqmDf_cQ.js → Cvp7FI3T.js} +1 -1
- package/.output/public/_nuxt/{38G-HXi8.js → CxuZBC8n.js} +5 -5
- package/.output/public/_nuxt/D2689qk4.js +1 -0
- package/.output/public/_nuxt/{Dw5YM8ji.js → D31L7Ks6.js} +1 -1
- package/.output/public/_nuxt/{DYTkcgRd.js → D3RiUGdz.js} +1 -1
- package/.output/public/_nuxt/{Csa19Lyu.js → D3e44mCL.js} +1 -1
- package/.output/public/_nuxt/{DmXY_FiQ.js → D6t3dcTl.js} +1 -1
- package/.output/public/_nuxt/{ChNxcBlH.js → DAQhmSv4.js} +1 -1
- package/.output/public/_nuxt/{BFtDSgo7.js → DB359q8R.js} +1 -1
- package/.output/public/_nuxt/{CrUNulhU.js → DCzfkCGa.js} +1 -1
- package/.output/public/_nuxt/{Cn1H4f01.js → DG-T44jj.js} +1 -1
- package/.output/public/_nuxt/{CAGIVdiL.js → DGX0tzL8.js} +1 -1
- package/.output/public/_nuxt/DHG66LPS.js +1 -0
- package/.output/public/_nuxt/{BV0QyLX9.js → DHKLCQRG.js} +1 -1
- package/.output/public/_nuxt/{DFs-kxzi.js → DIoI0uJm.js} +1 -1
- package/.output/public/_nuxt/{koWn-xAZ.js → DJ5V-y_x.js} +1 -1
- package/.output/public/_nuxt/{HUnwr3r4.js → DJMS2og1.js} +1 -1
- package/.output/public/_nuxt/{CjfarCg3.js → DJjDvbZE.js} +1 -1
- package/.output/public/_nuxt/DK9jxJ0g.js +1 -0
- package/.output/public/_nuxt/{BjN5vE4c.js → DKZxeXDQ.js} +1 -1
- package/.output/public/_nuxt/{CcWl1F-m.js → DLETdGFL.js} +1 -1
- package/.output/public/_nuxt/DOICd-Ld.js +1 -0
- package/.output/public/_nuxt/{bX88p2Mb.js → DPEcH-gi.js} +3 -3
- package/.output/public/_nuxt/{DDqY0xzR.js → DSRrg8JT.js} +1 -1
- package/.output/public/_nuxt/{B67bSHkr.js → DTDgHTuh.js} +2 -2
- package/.output/public/_nuxt/{BYzrgyQu.js → D_3Rq1BS.js} +1 -1
- package/.output/public/_nuxt/{TQO0uTDM.js → Daz4MeL6.js} +1 -1
- package/.output/public/_nuxt/{DxkqpACx.js → Db2v8O7O.js} +1 -1
- package/.output/public/_nuxt/{CHa8PuBL.js → Db8-_gO7.js} +1 -1
- package/.output/public/_nuxt/{BUEnkhcM.js → DfQu3kEw.js} +1 -1
- package/.output/public/_nuxt/{hDpBJf9-.js → DgV-EDJ9.js} +1 -1
- package/.output/public/_nuxt/{D1CNUSvv.js → DnjGH3SQ.js} +1 -1
- package/.output/public/_nuxt/Dp2X5R2m.js +1 -0
- package/.output/public/_nuxt/DqB723Z0.js +1 -0
- package/.output/public/_nuxt/{DcIiuvW-.js → DyRelyfs.js} +1 -1
- package/.output/public/_nuxt/{sgWRawF5.js → Dy_Cq5LQ.js} +1 -1
- package/.output/public/_nuxt/{B4T7pJz5.js → DznawRFW.js} +1 -1
- package/.output/public/_nuxt/EuOqK1A6.js +1 -0
- package/.output/public/_nuxt/{Dn4PGlE2.js → FNC8XZTk.js} +1 -1
- package/.output/public/_nuxt/{ZToTf_46.js → Fukkqjkf.js} +1 -1
- package/.output/public/_nuxt/{D5aulRKh.js → FvlxxmNk.js} +2 -2
- package/.output/public/_nuxt/{C2IkB9Vg.js → IRSbVPIu.js} +1 -1
- package/.output/public/_nuxt/{QESaAMMF.js → JJ3634gV.js} +1 -1
- package/.output/public/_nuxt/{DGUr7xQ7.js → Jez9DHn7.js} +1 -1
- package/.output/public/_nuxt/{DPdR3tu5.js → KKK6HVeG.js} +1 -1
- package/.output/public/_nuxt/{D0bh5qKf.js → Lwdv_RKd.js} +1 -1
- package/.output/public/_nuxt/{BkRZ4-cg.js → Nb2jBtYT.js} +1 -1
- package/.output/public/_nuxt/Q8Ps7oN5.js +1 -0
- package/.output/public/_nuxt/SXTDhzp6.js +1 -0
- package/.output/public/_nuxt/{GC9cY_vb.js → Sg2Lwc46.js} +1 -1
- package/.output/public/_nuxt/{GI6TTFJt.js → YuTZB7sD.js} +1 -1
- package/.output/public/_nuxt/{D2_L0Ze1.js → _CYZi8HN.js} +1 -1
- package/.output/public/_nuxt/_J_7XIn-.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/a1e9100c-1a4f-4f7e-bb53-9dbe0d07effb.json +1 -0
- package/.output/public/_nuxt/{DZNG1AbU.js → cABRLVee.js} +1 -1
- package/.output/public/_nuxt/eko-0FUm.js +1 -0
- package/.output/public/_nuxt/entry.CGxIBGAf.css +1 -0
- package/.output/public/_nuxt/{BIjt_cIY.js → g20UHUCv.js} +1 -1
- package/.output/public/_nuxt/{HIlTvc-2.js → gBC9k4Qj.js} +1 -1
- package/.output/public/_nuxt/{IQoLFBX8.js → ghuJ76mD.js} +1 -1
- package/.output/public/_nuxt/{BGYWH_3A.js → iBGCpHdw.js} +2 -2
- package/.output/public/_nuxt/{uUGV1V-6.js → inmzPrjz.js} +1 -1
- package/.output/public/_nuxt/{CgHipF8Q.js → m5kGCDpI.js} +1 -1
- package/.output/public/_nuxt/{Bj0OFhNx.js → nIU2F7ia.js} +3 -3
- package/.output/public/_nuxt/{Dcv_tyzb.js → oIX-ZDN6.js} +1 -1
- package/.output/public/_nuxt/{B7NSgclV.js → pcUI-zuY.js} +1 -1
- package/.output/public/_nuxt/{DpF6VoC4.js → sf57orEk.js} +1 -1
- package/.output/public/_nuxt/{DS_mF4Ol.js → wCGVE8_e.js} +1 -1
- package/.output/public/_nuxt/{KAzeBbaL.js → xuzLdW-o.js} +1 -1
- package/.output/public/_nuxt/{ytKsJZlj.js → yNrp2XvX.js} +1 -1
- package/.output/public/_nuxt/{B3mdl0Ae.js → yuf23kh9.js} +1 -1
- package/.output/server/chunks/build/{_uuid_-DAZ5CM0C.mjs → _uuid_-0UgdUhfY.mjs} +6 -5
- package/.output/server/chunks/build/{_uuid_-DAZ5CM0C.mjs.map → _uuid_-0UgdUhfY.mjs.map} +1 -1
- package/.output/server/chunks/build/chat-CZMiB68R.mjs.map +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/dashboard-YEscLBQN.mjs +1109 -0
- package/.output/server/chunks/build/dashboard-YEscLBQN.mjs.map +1 -0
- package/.output/server/chunks/build/{docs-CFAI1clt.mjs → docs-Dk2JnYq3.mjs} +6 -5
- package/.output/server/chunks/build/{docs-CFAI1clt.mjs.map → docs-Dk2JnYq3.mjs.map} +1 -1
- package/.output/server/chunks/build/server.mjs +3 -3
- package/.output/server/chunks/build/settings-DdkKCJ00.mjs +1 -1
- package/.output/server/chunks/build/styles.mjs +4 -4
- package/.output/server/chunks/build/{CodeEditorFallback-DfYly7f5.mjs → useCopyToClipboard-vi6FYyyZ.mjs} +29 -2
- package/.output/server/chunks/build/useCopyToClipboard-vi6FYyyZ.mjs.map +1 -0
- package/.output/server/chunks/build/useNotificationBus-BG5JNQf1.mjs +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +819 -824
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs +149 -0
- package/.output/server/chunks/routes/api/dashboard/overview.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/documents/_id/public.get.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/_id/restore.post.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/by-path.post.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/documents/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/delete.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/list.get.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/mkdir.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/move.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/rename.post.mjs +1 -1
- package/.output/server/chunks/routes/api/fs/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/health.get.mjs +1 -1
- package/.output/server/chunks/routes/api/home.get.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/hooks/stats.get.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get6.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get7.mjs +1 -1
- package/.output/server/chunks/routes/api/index.get8.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post2.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
- package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
- package/.output/server/chunks/routes/api/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/context.get.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/extract.post.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/search.get.mjs +1 -1
- package/.output/server/chunks/routes/api/memory/store.post.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/projects/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/secrets/_key_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/_id/restore.post.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/index.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/index.put.mjs +1 -1
- package/.output/server/chunks/routes/api/tasks/tags.get.mjs +1 -1
- package/.output/server/chunks/routes/api/usage/stats.get.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/Claude/CLAUDE.md +9 -4
- package/Claude/skills/environment/SKILL.md +6 -0
- package/Claude/skills/memory/SKILL.md +6 -0
- package/Claude/skills/project/SKILL.md +6 -0
- package/Claude/skills/secret/SKILL.md +85 -0
- package/Claude/skills/secret/secret.py +146 -0
- package/Claude/skills/skill-creator/SKILL.md +30 -0
- package/Claude/skills/task/SKILL.md +6 -0
- package/app/components/dashboard/RecentChats.vue +93 -0
- package/app/components/dashboard/RecentDocs.vue +108 -0
- package/app/components/dashboard/StatCards.vue +82 -0
- package/app/components/dashboard/UpcomingTasks.vue +119 -0
- package/app/components/dashboard/UsageSummary.vue +94 -0
- package/app/components/editor/DocumentEditor.vue +5 -3
- package/app/components/skills/Card.vue +82 -0
- package/app/components/skills/CreateModal.vue +156 -0
- package/app/components/skills/Editor.vue +135 -0
- package/app/components/skills/FileTree.vue +336 -0
- package/app/components/skills/LibraryCard.vue +122 -0
- package/app/components/skills/RenameModal.vue +84 -0
- package/app/composables/useCopyToClipboard.ts +37 -0
- package/app/layouts/dashboard.vue +7 -0
- package/app/pages/chat.vue +11 -1
- package/app/pages/dashboard.vue +65 -64
- package/app/pages/skills/[name].vue +198 -0
- package/app/pages/skills/index.vue +157 -0
- package/app/pages/skills/library.vue +209 -0
- package/app/pages/view/[uuid].vue +4 -3
- package/dist/cli/index.js +23 -23
- package/nuxt.config.ts +9 -0
- package/package.json +1 -1
- package/server/api/dashboard/overview.get.ts +133 -0
- package/server/api/skills/[name]/files/create.post.ts +45 -0
- package/server/api/skills/[name]/files/delete.post.ts +45 -0
- package/server/api/skills/[name]/files/index.get.ts +28 -0
- package/server/api/skills/[name]/files/read.post.ts +41 -0
- package/server/api/skills/[name]/files/write.post.ts +42 -0
- package/server/api/skills/[name]/index.get.ts +54 -0
- package/server/api/skills/[name]/rename.post.ts +64 -0
- package/server/api/skills/[name]/toggle.post.ts +32 -0
- package/server/api/skills/create.post.ts +51 -0
- package/server/api/skills/generate.post.ts +126 -0
- package/server/api/skills/index.get.ts +57 -0
- package/server/api/skills/library/check-updates.get.ts +46 -0
- package/server/api/skills/library/index.get.ts +56 -0
- package/server/api/skills/library/install.post.ts +73 -0
- package/server/db/schema.ts +17 -0
- package/server/drizzle/migrations/0012_good_deadpool.sql +12 -0
- package/server/drizzle/migrations/0013_swift_snowbird.sql +1 -0
- package/server/drizzle/migrations/meta/0012_snapshot.json +1713 -0
- package/server/drizzle/migrations/meta/0013_snapshot.json +1720 -0
- package/server/drizzle/migrations/meta/_journal.json +14 -0
- package/server/middleware/auth.ts +0 -1
- package/server/plugins/05.skills-catalog.ts +105 -0
- package/server/utils/skills-path.ts +197 -0
- package/shared/types/index.ts +102 -0
- package/.output/public/_nuxt/BAWOIJ__.js +0 -1
- package/.output/public/_nuxt/B_paJhyq.js +0 -1
- package/.output/public/_nuxt/BdYiqlvd.js +0 -1
- package/.output/public/_nuxt/BpiqBbAF.js +0 -1
- package/.output/public/_nuxt/BqDfJ2hd.js +0 -1
- package/.output/public/_nuxt/BxgB0-mq.js +0 -1
- package/.output/public/_nuxt/C1hs5K_e.js +0 -1
- package/.output/public/_nuxt/C4Ncdd9K.js +0 -1
- package/.output/public/_nuxt/CAQ2bGHm.js +0 -1
- package/.output/public/_nuxt/CCpQAJpz.js +0 -1
- package/.output/public/_nuxt/CXXD-owe.js +0 -1
- package/.output/public/_nuxt/CcRijyCZ.js +0 -1
- package/.output/public/_nuxt/CoEfPCKj.js +0 -1
- package/.output/public/_nuxt/D08h2e32.js +0 -1
- package/.output/public/_nuxt/D_t_j6EB.js +0 -1
- package/.output/public/_nuxt/DaZy6Ki2.js +0 -1
- package/.output/public/_nuxt/DdrudNqf.js +0 -1
- package/.output/public/_nuxt/DdtmJxeb.js +0 -1
- package/.output/public/_nuxt/Dgv5fJ6Q.js +0 -1
- package/.output/public/_nuxt/DhIluGHO.js +0 -1
- package/.output/public/_nuxt/DuRk5Dc_.js +0 -1
- package/.output/public/_nuxt/VFwvl1mU.js +0 -1
- package/.output/public/_nuxt/builds/meta/555978fa-172f-4d0d-8238-88f8b610f712.json +0 -1
- package/.output/public/_nuxt/entry.DPbNaeQT.css +0 -1
- package/.output/public/_nuxt/hZV7Z8Ig.js +0 -1
- package/.output/public/_nuxt/lK0inMQ6.js +0 -1
- package/.output/server/chunks/build/CodeEditorFallback-DfYly7f5.mjs.map +0 -1
- package/.output/server/chunks/build/dashboard-DtbGchTa.mjs +0 -277
- package/.output/server/chunks/build/dashboard-DtbGchTa.mjs.map +0 -1
- /package/.output/public/_nuxt/{language-detection.Be_IvFWy.css → useCopyToClipboard.Be_IvFWy.css} +0 -0
|
@@ -85,6 +85,20 @@
|
|
|
85
85
|
"when": 1771384095170,
|
|
86
86
|
"tag": "0011_tearful_johnny_storm",
|
|
87
87
|
"breakpoints": true
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"idx": 12,
|
|
91
|
+
"version": "7",
|
|
92
|
+
"when": 1771472797273,
|
|
93
|
+
"tag": "0012_good_deadpool",
|
|
94
|
+
"breakpoints": true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"idx": 13,
|
|
98
|
+
"version": "7",
|
|
99
|
+
"when": 1771518918468,
|
|
100
|
+
"tag": "0013_swift_snowbird",
|
|
101
|
+
"breakpoints": true
|
|
88
102
|
}
|
|
89
103
|
]
|
|
90
104
|
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { eq } from 'drizzle-orm'
|
|
2
|
+
import { waitForDb } from '~~/server/utils/db-state'
|
|
3
|
+
import { getDb } from '~~/server/db'
|
|
4
|
+
import * as schema from '~~/server/db/schema'
|
|
5
|
+
|
|
6
|
+
const REGISTRY_URL = 'https://raw.githubusercontent.com/Patrity/cognova-skills/main/registry.json'
|
|
7
|
+
const SYNC_INTERVAL_MS = 30 * 60 * 1000 // 30 minutes
|
|
8
|
+
|
|
9
|
+
interface RegistryEntry {
|
|
10
|
+
name: string
|
|
11
|
+
description: string
|
|
12
|
+
version: string
|
|
13
|
+
author: string
|
|
14
|
+
tags: string[]
|
|
15
|
+
requiresSecrets: string[]
|
|
16
|
+
files: string[]
|
|
17
|
+
updatedAt: string
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function syncRegistry() {
|
|
21
|
+
try {
|
|
22
|
+
const response = await fetch(REGISTRY_URL)
|
|
23
|
+
if (!response.ok) {
|
|
24
|
+
console.warn(`[skills-catalog] Failed to fetch registry: ${response.status}`)
|
|
25
|
+
return
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const entries: RegistryEntry[] = await response.json()
|
|
29
|
+
if (!Array.isArray(entries)) {
|
|
30
|
+
console.warn('[skills-catalog] Invalid registry format')
|
|
31
|
+
return
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const db = getDb()
|
|
35
|
+
const now = new Date()
|
|
36
|
+
|
|
37
|
+
for (const entry of entries) {
|
|
38
|
+
if (!entry.name || !entry.description || !entry.version) continue
|
|
39
|
+
|
|
40
|
+
await db.insert(schema.skillsCatalog)
|
|
41
|
+
.values({
|
|
42
|
+
name: entry.name,
|
|
43
|
+
description: entry.description,
|
|
44
|
+
version: entry.version,
|
|
45
|
+
author: entry.author || '',
|
|
46
|
+
tags: entry.tags || [],
|
|
47
|
+
requiresSecrets: entry.requiresSecrets || [],
|
|
48
|
+
files: entry.files || [],
|
|
49
|
+
updatedAt: new Date(entry.updatedAt || now),
|
|
50
|
+
syncedAt: now
|
|
51
|
+
})
|
|
52
|
+
.onConflictDoUpdate({
|
|
53
|
+
target: schema.skillsCatalog.name,
|
|
54
|
+
set: {
|
|
55
|
+
description: entry.description,
|
|
56
|
+
version: entry.version,
|
|
57
|
+
author: entry.author || '',
|
|
58
|
+
tags: entry.tags || [],
|
|
59
|
+
requiresSecrets: entry.requiresSecrets || [],
|
|
60
|
+
files: entry.files || [],
|
|
61
|
+
updatedAt: new Date(entry.updatedAt || now),
|
|
62
|
+
syncedAt: now
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Remove skills no longer in registry
|
|
68
|
+
const catalogItems = await db.query.skillsCatalog.findMany()
|
|
69
|
+
const registryNames = new Set(entries.map(e => e.name))
|
|
70
|
+
for (const item of catalogItems) {
|
|
71
|
+
if (!registryNames.has(item.name)) {
|
|
72
|
+
await db.delete(schema.skillsCatalog)
|
|
73
|
+
.where(eq(schema.skillsCatalog.id, item.id))
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
console.log(`[skills-catalog] Synced ${entries.length} skills from registry`)
|
|
78
|
+
} catch (error) {
|
|
79
|
+
console.warn('[skills-catalog] Registry sync failed:', error)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
let syncTimer: ReturnType<typeof setInterval> | null = null
|
|
84
|
+
|
|
85
|
+
export default defineNitroPlugin(async (nitroApp) => {
|
|
86
|
+
const dbAvailable = await waitForDb(10000)
|
|
87
|
+
if (!dbAvailable) {
|
|
88
|
+
console.log('[skills-catalog] Database not available, skipping')
|
|
89
|
+
return
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Initial sync after a short delay
|
|
93
|
+
setTimeout(() => syncRegistry(), 10000)
|
|
94
|
+
|
|
95
|
+
// Periodic sync
|
|
96
|
+
syncTimer = setInterval(() => syncRegistry(), SYNC_INTERVAL_MS)
|
|
97
|
+
|
|
98
|
+
nitroApp.hooks.hook('close', () => {
|
|
99
|
+
if (syncTimer) {
|
|
100
|
+
clearInterval(syncTimer)
|
|
101
|
+
syncTimer = null
|
|
102
|
+
}
|
|
103
|
+
console.log('[skills-catalog] Cleanup complete')
|
|
104
|
+
})
|
|
105
|
+
})
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { homedir } from 'os'
|
|
2
|
+
import { join } from 'path'
|
|
3
|
+
import type { SkillMeta, SkillFile } from '~~/shared/types'
|
|
4
|
+
|
|
5
|
+
const CORE_SKILLS = ['memory', 'task', 'project', 'secret', 'environment']
|
|
6
|
+
|
|
7
|
+
export function getSkillsDir(): string {
|
|
8
|
+
return join(homedir(), '.claude', 'skills')
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function getInactiveSkillsDir(): string {
|
|
12
|
+
return join(homedir(), '.claude', 'inactive-skills')
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function getSkillPath(name: string, active: boolean = true): string {
|
|
16
|
+
const base = active ? getSkillsDir() : getInactiveSkillsDir()
|
|
17
|
+
return join(base, name)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function isCoreSkill(name: string): boolean {
|
|
21
|
+
return CORE_SKILLS.includes(name)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Parse SKILL.md YAML frontmatter into SkillMeta.
|
|
26
|
+
* Handles both top-level and metadata-nested custom fields.
|
|
27
|
+
*/
|
|
28
|
+
export function parseSkillFrontmatter(content: string): SkillMeta {
|
|
29
|
+
const defaults: SkillMeta = {
|
|
30
|
+
name: '',
|
|
31
|
+
description: '',
|
|
32
|
+
version: '',
|
|
33
|
+
author: '',
|
|
34
|
+
tags: [],
|
|
35
|
+
allowedTools: [],
|
|
36
|
+
requiresSecrets: [],
|
|
37
|
+
repository: '',
|
|
38
|
+
installedFrom: '',
|
|
39
|
+
disableModelInvocation: false,
|
|
40
|
+
userInvocable: true,
|
|
41
|
+
context: '',
|
|
42
|
+
agent: ''
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const match = content.match(/^---\n([\s\S]*?)\n---/)
|
|
46
|
+
if (!match?.[1]) return defaults
|
|
47
|
+
|
|
48
|
+
const yaml = match[1]
|
|
49
|
+
const result = { ...defaults }
|
|
50
|
+
|
|
51
|
+
// Simple YAML parser for flat + one-level nested keys
|
|
52
|
+
let inMetadata = false
|
|
53
|
+
for (const line of yaml.split('\n')) {
|
|
54
|
+
// Check for metadata block
|
|
55
|
+
if (line === 'metadata:') {
|
|
56
|
+
inMetadata = true
|
|
57
|
+
continue
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Nested under metadata (indented)
|
|
61
|
+
if (inMetadata && /^\s{2}\S/.test(line)) {
|
|
62
|
+
const nested = line.trim()
|
|
63
|
+
const colonIdx = nested.indexOf(':')
|
|
64
|
+
if (colonIdx === -1) continue
|
|
65
|
+
const key = nested.slice(0, colonIdx).trim()
|
|
66
|
+
const val = nested.slice(colonIdx + 1).trim()
|
|
67
|
+
assignMetaField(result, key, val)
|
|
68
|
+
continue
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// End of metadata block if we hit a non-indented line
|
|
72
|
+
if (inMetadata && /^\S/.test(line))
|
|
73
|
+
inMetadata = false
|
|
74
|
+
|
|
75
|
+
// Top-level key
|
|
76
|
+
const colonIdx = line.indexOf(':')
|
|
77
|
+
if (colonIdx === -1) continue
|
|
78
|
+
const key = line.slice(0, colonIdx).trim()
|
|
79
|
+
const val = line.slice(colonIdx + 1).trim()
|
|
80
|
+
assignTopLevelField(result, key, val)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
return result
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function assignTopLevelField(result: SkillMeta, key: string, val: string): void {
|
|
87
|
+
switch (key) {
|
|
88
|
+
case 'name':
|
|
89
|
+
result.name = unquote(val)
|
|
90
|
+
break
|
|
91
|
+
case 'description':
|
|
92
|
+
result.description = unquote(val)
|
|
93
|
+
break
|
|
94
|
+
case 'allowed-tools':
|
|
95
|
+
result.allowedTools = val.split(',').map(s => s.trim()).filter(Boolean)
|
|
96
|
+
break
|
|
97
|
+
case 'disable-model-invocation':
|
|
98
|
+
result.disableModelInvocation = val === 'true'
|
|
99
|
+
break
|
|
100
|
+
case 'user-invocable':
|
|
101
|
+
result.userInvocable = val !== 'false'
|
|
102
|
+
break
|
|
103
|
+
case 'context':
|
|
104
|
+
result.context = unquote(val)
|
|
105
|
+
break
|
|
106
|
+
case 'agent':
|
|
107
|
+
result.agent = unquote(val)
|
|
108
|
+
break
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function assignMetaField(result: SkillMeta, key: string, val: string): void {
|
|
113
|
+
switch (key) {
|
|
114
|
+
case 'version':
|
|
115
|
+
result.version = unquote(val)
|
|
116
|
+
break
|
|
117
|
+
case 'author':
|
|
118
|
+
result.author = unquote(val)
|
|
119
|
+
break
|
|
120
|
+
case 'tags':
|
|
121
|
+
result.tags = parseYamlArray(val)
|
|
122
|
+
break
|
|
123
|
+
case 'requires-secrets':
|
|
124
|
+
result.requiresSecrets = parseYamlArray(val)
|
|
125
|
+
break
|
|
126
|
+
case 'repository':
|
|
127
|
+
result.repository = unquote(val)
|
|
128
|
+
break
|
|
129
|
+
case 'installed-from':
|
|
130
|
+
result.installedFrom = unquote(val)
|
|
131
|
+
break
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function unquote(s: string): string {
|
|
136
|
+
if ((s.startsWith('"') && s.endsWith('"'))
|
|
137
|
+
|| (s.startsWith('\'') && s.endsWith('\'')))
|
|
138
|
+
return s.slice(1, -1)
|
|
139
|
+
return s
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function parseYamlArray(val: string): string[] {
|
|
143
|
+
// Handle inline array: ["key1", "key2"] or [key1, key2]
|
|
144
|
+
if (val.startsWith('[') && val.endsWith(']')) {
|
|
145
|
+
const inner = val.slice(1, -1).trim()
|
|
146
|
+
if (!inner) return []
|
|
147
|
+
return inner.split(',').map(s => unquote(s.trim())).filter(Boolean)
|
|
148
|
+
}
|
|
149
|
+
return []
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Build a file tree for a skill directory.
|
|
154
|
+
* Excludes __pycache__ and .pyc files.
|
|
155
|
+
*/
|
|
156
|
+
export async function buildSkillFileTree(dirPath: string): Promise<SkillFile[]> {
|
|
157
|
+
const { readdir, stat } = await import('fs/promises')
|
|
158
|
+
const entries = await readdir(dirPath).catch(() => [])
|
|
159
|
+
const files: SkillFile[] = []
|
|
160
|
+
|
|
161
|
+
for (const entry of entries) {
|
|
162
|
+
if (entry === '__pycache__' || entry.endsWith('.pyc'))
|
|
163
|
+
continue
|
|
164
|
+
|
|
165
|
+
const fullPath = join(dirPath, entry)
|
|
166
|
+
const stats = await stat(fullPath).catch(() => null)
|
|
167
|
+
if (!stats) continue
|
|
168
|
+
|
|
169
|
+
if (stats.isDirectory()) {
|
|
170
|
+
const children = await buildSkillFileTree(fullPath)
|
|
171
|
+
files.push({ name: entry, path: entry, type: 'directory', children })
|
|
172
|
+
} else {
|
|
173
|
+
files.push({ name: entry, path: entry, type: 'file' })
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// Sort: directories first, then alphabetical
|
|
178
|
+
files.sort((a, b) => {
|
|
179
|
+
if (a.type !== b.type) return a.type === 'directory' ? -1 : 1
|
|
180
|
+
return a.name.localeCompare(b.name)
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
return files
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Validate a skill name for filesystem safety.
|
|
188
|
+
*/
|
|
189
|
+
export function validateSkillName(name: string): string | null {
|
|
190
|
+
if (!name || name.length > 64)
|
|
191
|
+
return 'Name must be 1-64 characters'
|
|
192
|
+
if (!/^[a-z0-9][a-z0-9_-]*$/.test(name))
|
|
193
|
+
return 'Name must start with a letter/digit and contain only lowercase letters, digits, hyphens, and underscores'
|
|
194
|
+
if (name === '_lib')
|
|
195
|
+
return '_lib is reserved'
|
|
196
|
+
return null
|
|
197
|
+
}
|
package/shared/types/index.ts
CHANGED
|
@@ -415,6 +415,108 @@ export interface UsageStats {
|
|
|
415
415
|
topConsumers: { name: string, source: TokenUsageSource, cost: number, calls: number }[]
|
|
416
416
|
}
|
|
417
417
|
|
|
418
|
+
// === Dashboard ===
|
|
419
|
+
|
|
420
|
+
export interface DashboardOverview {
|
|
421
|
+
tasks: {
|
|
422
|
+
todoCount: number
|
|
423
|
+
inProgressCount: number
|
|
424
|
+
upcoming: Array<{
|
|
425
|
+
id: string
|
|
426
|
+
title: string
|
|
427
|
+
status: TaskStatus
|
|
428
|
+
priority: number
|
|
429
|
+
dueDate: string | null
|
|
430
|
+
projectName: string | null
|
|
431
|
+
projectColor: string | null
|
|
432
|
+
}>
|
|
433
|
+
}
|
|
434
|
+
conversations: Array<{
|
|
435
|
+
id: string
|
|
436
|
+
sessionId: string
|
|
437
|
+
title: string | null
|
|
438
|
+
messageCount: number
|
|
439
|
+
startedAt: string
|
|
440
|
+
}>
|
|
441
|
+
documents: Array<{
|
|
442
|
+
id: string
|
|
443
|
+
title: string
|
|
444
|
+
path: string
|
|
445
|
+
modifiedAt: string | null
|
|
446
|
+
projectName: string | null
|
|
447
|
+
projectColor: string | null
|
|
448
|
+
}>
|
|
449
|
+
usage: {
|
|
450
|
+
totalCost7d: number
|
|
451
|
+
totalCalls7d: number
|
|
452
|
+
totalInputTokens7d: number
|
|
453
|
+
totalOutputTokens7d: number
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// === Skills ===
|
|
458
|
+
|
|
459
|
+
export interface SkillMeta {
|
|
460
|
+
name: string
|
|
461
|
+
description: string
|
|
462
|
+
version: string
|
|
463
|
+
author: string
|
|
464
|
+
tags: string[]
|
|
465
|
+
allowedTools: string[]
|
|
466
|
+
requiresSecrets: string[]
|
|
467
|
+
repository: string
|
|
468
|
+
installedFrom: string
|
|
469
|
+
disableModelInvocation: boolean
|
|
470
|
+
userInvocable: boolean
|
|
471
|
+
context: string
|
|
472
|
+
agent: string
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export interface SkillListItem {
|
|
476
|
+
name: string
|
|
477
|
+
description: string
|
|
478
|
+
version: string
|
|
479
|
+
author: string
|
|
480
|
+
active: boolean
|
|
481
|
+
core: boolean
|
|
482
|
+
allowedTools: string[]
|
|
483
|
+
requiresSecrets: string[]
|
|
484
|
+
installedFrom: string
|
|
485
|
+
fileCount: number
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
export interface SkillDetail extends SkillListItem {
|
|
489
|
+
meta: SkillMeta
|
|
490
|
+
files: SkillFile[]
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export interface SkillFile {
|
|
494
|
+
name: string
|
|
495
|
+
path: string
|
|
496
|
+
type: 'file' | 'directory'
|
|
497
|
+
children?: SkillFile[]
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
// === Skills Library ===
|
|
501
|
+
|
|
502
|
+
// First tag must be 'community' or 'official'. Up to 4 additional free-form tags.
|
|
503
|
+
export type SkillSourceTag = 'community' | 'official'
|
|
504
|
+
|
|
505
|
+
export interface SkillCatalogItem {
|
|
506
|
+
id: string
|
|
507
|
+
name: string
|
|
508
|
+
description: string
|
|
509
|
+
version: string
|
|
510
|
+
author: string
|
|
511
|
+
tags: string[]
|
|
512
|
+
requiresSecrets: string[]
|
|
513
|
+
files: string[]
|
|
514
|
+
updatedAt: string
|
|
515
|
+
installed?: boolean
|
|
516
|
+
installedVersion?: string
|
|
517
|
+
hasUpdate?: boolean
|
|
518
|
+
}
|
|
519
|
+
|
|
418
520
|
// === Hook Events ===
|
|
419
521
|
|
|
420
522
|
export type HookEventType
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as L,C as t,a as V,a_ as oe,Q as _,R as c,S as h,T as F,a2 as W,V as T,a3 as S,a5 as ct,aQ as Se,aO as je,a0 as $e,aR as Fe,e as H,aP as Le,f as Ge,bi as Ke,a8 as N,k as ce,Z as tt,bh as qe,am as Be,b_ as ft,q as ve,a1 as Re,b$ as vt,bj as mt,an as at,bP as gt,ah as ie,E as ht,$ as bt,G,ai as Pe,at as lt,aV as yt,h as _t,aj as it,O as xt,bB as Ct,aM as _e,aI as ot,ba as qt,a9 as ye,ad as de,aN as Ee,b6 as St,aS as pe,ap as We,aq as It,L as wt,N as kt,aH as zt,aJ as Lt,aB as be,aT as Ve,aE as Et,au as Ft,av as Bt,ak as Ye,bQ as At,c0 as Tt,aF as Vt,U as z,aa as ze,_ as Oe,aw as Qe,bV as Ot,bW as Je,D as Kt,aG as Pt}from"./CmF_IsFj.js";import{a as Dt,u as $t,F as Rt}from"./B8gRcrNP.js";import{c as Nt,a as Mt,b as Ht,P as Gt}from"./BkRZ4-cg.js";import{u as rt}from"./pqmDf_cQ.js";import{f as De}from"./D2_L0Ze1.js";import{u as jt}from"./C1hs5K_e.js";import{u as Ut,g as Wt}from"./CqsT2LL7.js";import{g as Yt,M as Qt}from"./BFtDSgo7.js";import{V as Jt}from"./HUnwr3r4.js";import{u as Ie}from"./CcRijyCZ.js";import{u as Xt}from"./BGYWH_3A.js";import{c as Xe}from"./CAGIVdiL.js";import{_ as Zt}from"./D08h2e32.js";function st(s){const o=L(()=>t(s)),a=L(()=>new Intl.Collator("en",{usage:"search",...o.value}));return{startsWith:(u,p)=>p.length===0?!0:(u=u.normalize("NFC"),p=p.normalize("NFC"),a.value.compare(u.slice(0,p.length),p)===0),endsWith:(u,p)=>p.length===0?!0:(u=u.normalize("NFC"),p=p.normalize("NFC"),a.value.compare(u.slice(-p.length),p)===0),contains:(u,p)=>{if(p.length===0)return!0;u=u.normalize("NFC"),p=p.normalize("NFC");let v=0;const k=p.length;for(;v+k<=u.length;v++){const C=u.slice(v,v+k);if(a.value.compare(p,C)===0)return!0}return!1}}}function ea(){return{ALT:"Alt",ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",BACKSPACE:"Backspace",CAPS_LOCK:"CapsLock",CONTROL:"Control",DELETE:"Delete",END:"End",ENTER:"Enter",ESCAPE:"Escape",F1:"F1",F10:"F10",F11:"F11",F12:"F12",F2:"F2",F3:"F3",F4:"F4",F5:"F5",F6:"F6",F7:"F7",F8:"F8",F9:"F9",HOME:"Home",META:"Meta",PAGE_DOWN:"PageDown",PAGE_UP:"PageUp",SHIFT:"Shift",SPACE:" ",TAB:"Tab",CTRL:"Control",ASTERISK:"*",SPACE_CODE:"Space"}}var ta=V({__name:"ComboboxAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const{forwardRef:o}=oe();return(a,e)=>(c(),_(t(Nt),{"as-child":"",reference:a.reference},{default:h(()=>[F(t(W),T({ref:t(o),"as-child":a.asChild,as:a.as},a.$attrs),{default:h(()=>[S(a.$slots,"default")]),_:3},16,["as-child","as"])]),_:3},8,["reference"]))}}),aa=ta;function Ze(s){return s?.querySelector("[data-state=checked]")}function la(s,o,a){return s===void 0?!1:Array.isArray(s)?s.some(e=>fe(e,o,a)):fe(s,o,a)}function fe(s,o,a){return s===void 0||o===void 0?!1:typeof s=="string"?s===o:typeof a=="function"?a(s,o):typeof a=="string"?s?.[a]===o?.[a]:ct(s,o)}const[Ae,ia]=Se("ListboxRoot");var oa=V({__name:"ListboxRoot",props:{modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},orientation:{type:String,required:!1,default:"vertical"},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},selectionBehavior:{type:String,required:!1,default:"toggle"},highlightOnHover:{type:Boolean,required:!1},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","entryFocus","leave"],setup(s,{expose:o,emit:a}){const e=s,l=a,{multiple:i,highlightOnHover:u,orientation:p,disabled:v,selectionBehavior:k,dir:C}=je(e),{getItems:I}=$e({isProvider:!0}),{handleTypeaheadSearch:f}=Ut(),{primitiveElement:m,currentElement:n}=Fe(),q=ea(),$=rt(C),P=jt(n),M=H(),Y=H(!1),j=H(!0),w=Le(e,"modelValue",l,{defaultValue:e.defaultValue??(i.value?[]:void 0),passive:e.modelValue===void 0,deep:!0});function xe(d){if(Y.value=!0,e.multiple){const y=Array.isArray(w.value)?[...w.value]:[],x=y.findIndex(E=>fe(E,d,e.by));e.selectionBehavior==="toggle"?(x===-1?y.push(d):y.splice(x,1),w.value=y):(w.value=[d],M.value=d)}else e.selectionBehavior==="toggle"&&fe(w.value,d,e.by)?w.value=void 0:w.value=d;setTimeout(()=>{Y.value=!1},1)}const O=H(null),se=H(null),Q=H(!1),ee=H(!1),ne=Ke(),me=Ke(),J=Ke();function te(){return I().map(d=>d.ref).filter(d=>d.dataset.disabled!=="")}function R(d,y=!0){if(!d)return;O.value=d,j.value&&O.value.focus(),y&&O.value.scrollIntoView({block:"nearest"});const x=I().find(E=>E.ref===d);l("highlight",x)}function B(d){if(Q.value)J.trigger(d);else{const y=I().find(x=>fe(x.value,d,e.by));y&&(O.value=y.ref,R(y.ref))}}function X(d){O.value&&O.value.isConnected&&(d.preventDefault(),d.stopPropagation(),ee.value||O.value.click())}function Z(d){if(j.value){if(Y.value=!0,Q.value)me.trigger(d);else{const y=d.altKey||d.ctrlKey||d.metaKey;if(y&&d.key==="a"&&i.value){const x=I(),E=x.map(ue=>ue.value);w.value=[...E],d.preventDefault(),R(x[x.length-1].ref)}else if(!y){const x=f(d.key,I());x&&R(x)}}setTimeout(()=>{Y.value=!1},1)}}function ae(){ee.value=!0}function ge(){ce(()=>{ee.value=!1})}function le(){ce(()=>{const d=new KeyboardEvent("keydown",{key:"PageUp"});Ce(d)})}function g(d){const y=O.value;y?.isConnected&&(se.value=y),O.value=null,l("leave",d)}function Ne(d){const y=new CustomEvent("listbox.entryFocus",{bubbles:!1,cancelable:!0});if(d.currentTarget?.dispatchEvent(y),l("entryFocus",y),!y.defaultPrevented)if(se.value)R(se.value);else{const x=te()?.[0];R(x)}}function Ce(d){const y=Yt(d,p.value,$.value);if(!y)return;let x=te();if(O.value){if(y==="last")x.reverse();else if(y==="prev"||y==="next"){y==="prev"&&x.reverse();const E=x.indexOf(O.value);x=x.slice(E+1)}we(d,x[0])}if(x.length){const E=!O.value&&y==="prev"?x.length-1:0;R(x[E])}if(Q.value)return me.trigger(d)}function we(d,y){if(!(Q.value||e.selectionBehavior!=="replace"||!i.value||!Array.isArray(w.value)||(d.altKey||d.ctrlKey||d.metaKey)&&!d.shiftKey)&&d.shiftKey){const E=I().filter(he=>he.ref.dataset.disabled!=="");let ue=E.find(he=>he.ref===y)?.value;if(d.key===q.END?ue=E[E.length-1].value:d.key===q.HOME&&(ue=E[0].value),!ue||!M.value)return;const Me=De(E.map(he=>he.value),M.value,ue);w.value=Me}}async function ke(d){if(await ce(),Q.value)ne.trigger(d);else{const y=te(),x=y.find(E=>E.dataset.state==="checked");x?R(x):y.length&&R(y[0])}}return Ge(w,()=>{Y.value||ce(()=>{ke()})},{immediate:!0,deep:!0}),o({highlightedElement:O,highlightItem:B,highlightFirstItem:le,highlightSelected:ke,getItems:I}),ia({modelValue:w,onValueChange:xe,multiple:i,orientation:p,dir:$,disabled:v,highlightOnHover:u,highlightedElement:O,isVirtual:Q,virtualFocusHook:ne,virtualKeydownHook:me,virtualHighlightHook:J,by:e.by,firstValue:M,selectionBehavior:k,focusable:j,onLeave:g,onEnter:Ne,changeHighlight:R,onKeydownEnter:X,onKeydownNavigation:Ce,onKeydownTypeAhead:Z,onCompositionStart:ae,onCompositionEnd:ge,highlightFirstItem:le}),(d,y)=>(c(),_(t(W),{ref_key:"primitiveElement",ref:m,as:d.as,"as-child":d.asChild,dir:t($),"data-disabled":t(v)?"":void 0,onPointerleave:g,onFocusout:y[0]||(y[0]=async x=>{const E=x.relatedTarget||x.target;await ce(),O.value&&t(n)&&!t(n).contains(E)&&g(x)})},{default:h(()=>[S(d.$slots,"default",{modelValue:t(w)}),t(P)&&d.name?(c(),_(t(Jt),{key:0,name:d.name,value:t(w),disabled:t(v),required:d.required},null,8,["name","value","disabled","required"])):N("v-if",!0)]),_:3},8,["as","as-child","dir","data-disabled"]))}}),ra=oa,sa=V({__name:"ListboxContent",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const{CollectionSlot:o}=$e(),a=Ae(),e=tt(!1,10);return(l,i)=>(c(),_(t(o),null,{default:h(()=>[F(t(W),{role:"listbox",as:l.as,"as-child":l.asChild,tabindex:t(a).focusable.value?t(a).highlightedElement.value?"-1":"0":"-1","aria-orientation":t(a).orientation.value,"aria-multiselectable":!!t(a).multiple.value,"data-orientation":t(a).orientation.value,onMousedown:i[0]||(i[0]=Be(u=>e.value=!0,["left"])),onFocus:i[1]||(i[1]=u=>{t(e)||t(a).onEnter(u)}),onKeydown:[i[2]||(i[2]=qe(u=>{t(a).orientation.value==="vertical"&&(u.key==="ArrowLeft"||u.key==="ArrowRight")||t(a).orientation.value==="horizontal"&&(u.key==="ArrowUp"||u.key==="ArrowDown")||(u.preventDefault(),t(a).focusable.value&&t(a).onKeydownNavigation(u))},["down","up","left","right","home","end"])),qe(t(a).onKeydownEnter,["enter"]),t(a).onKeydownTypeAhead]},{default:h(()=>[S(l.$slots,"default")]),_:3},8,["as","as-child","tabindex","aria-orientation","aria-multiselectable","data-orientation","onKeydown"])]),_:3}))}}),na=sa,ua=V({__name:"ListboxFilter",props:{modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(s,{emit:o}){const a=s,l=Le(a,"modelValue",o,{defaultValue:"",passive:a.modelValue===void 0}),i=Ae(),{primitiveElement:u,currentElement:p}=Fe(),v=L(()=>a.disabled||i.disabled.value||!1),k=H();return ft(()=>k.value=i.highlightedElement.value?.id),ve(()=>{i.focusable.value=!1,setTimeout(()=>{a.autoFocus&&p.value?.focus()},1)}),Re(()=>{i.focusable.value=!0}),(C,I)=>(c(),_(t(W),{ref_key:"primitiveElement",ref:u,as:C.as,"as-child":C.asChild,value:t(l),disabled:v.value?"":void 0,"data-disabled":v.value?"":void 0,"aria-disabled":v.value??void 0,"aria-activedescendant":k.value,type:"text",onKeydown:[qe(Be(t(i).onKeydownNavigation,["prevent"]),["down","up","home","end"]),qe(t(i).onKeydownEnter,["enter"])],onInput:I[0]||(I[0]=f=>{l.value=f.target.value,t(i).highlightFirstItem()}),onCompositionstart:t(i).onCompositionStart,onCompositionend:t(i).onCompositionEnd},{default:h(()=>[S(C.$slots,"default",{modelValue:t(l)})]),_:3},8,["as","as-child","value","disabled","data-disabled","aria-disabled","aria-activedescendant","onKeydown","onCompositionstart","onCompositionend"]))}}),da=ua;const[gl,pa]=Se("ListboxGroup");var ca=V({__name:"ListboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const o=s,a=Ie(void 0,"reka-listbox-group");return pa({id:a}),(e,l)=>(c(),_(t(W),T({role:"group"},o,{"aria-labelledby":t(a)}),{default:h(()=>[S(e.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),fa=ca;const va="listbox.select",[ma,ga]=Se("ListboxItem");var ha=V({__name:"ListboxItem",props:{value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},emits:["select"],setup(s,{emit:o}){const a=s,e=o,l=Ie(void 0,"reka-listbox-item"),{CollectionItem:i}=$e(),{forwardRef:u,currentElement:p}=oe(),v=Ae(),k=L(()=>p.value===v.highlightedElement.value),C=L(()=>la(v.modelValue.value,a.value,v.by)),I=L(()=>v.disabled.value||a.disabled);async function f(n){e("select",n),!n?.defaultPrevented&&!I.value&&n&&(v.onValueChange(a.value),v.changeHighlight(p.value))}function m(n){const q={originalEvent:n,value:a.value};mt(va,f,q)}return ga({isSelected:C}),(n,q)=>(c(),_(t(i),{value:n.value},{default:h(()=>[vt([k.value,C.value],()=>F(t(W),T({id:t(l)},n.$attrs,{ref:t(u),role:"option",tabindex:t(v).focusable.value?k.value?"0":"-1":-1,"aria-selected":C.value,as:n.as,"as-child":n.asChild,disabled:I.value?"":void 0,"data-disabled":I.value?"":void 0,"data-highlighted":k.value?"":void 0,"data-state":C.value?"checked":"unchecked",onClick:m,onKeydown:qe(Be(m,["prevent"]),["space"]),onPointermove:q[0]||(q[0]=()=>{t(v).highlightedElement.value!==t(p)&&t(v).highlightOnHover.value&&!t(v).focusable.value&&t(v).changeHighlight(t(p),!1)})}),{default:h(()=>[S(n.$slots,"default")]),_:3},16,["id","tabindex","aria-selected","as","as-child","disabled","data-disabled","data-highlighted","data-state","onKeydown"]),q,1)]),_:3},8,["value"]))}}),ba=ha,ya=V({__name:"ListboxItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(s){const o=s;oe();const a=ma();return(e,l)=>t(a).isSelected.value?(c(),_(t(W),T({key:0,"aria-hidden":"true"},o),{default:h(()=>[S(e.$slots,"default")]),_:3},16)):N("v-if",!0)}}),_a=ya,xa=V({__name:"ListboxVirtualizer",props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:Number,required:!1},textContent:{type:Function,required:!1}},setup(s){const o=s,a=at(),e=Ae(),l=gt(),{getItems:i}=$e();e.isVirtual.value=!0;const u=L(()=>{const f=l.value;if(f){const m=window.getComputedStyle(f);return{start:Number.parseFloat(m.paddingBlockStart||m.paddingTop),end:Number.parseFloat(m.paddingBlockEnd||m.paddingBottom)}}else return{start:0,end:0}}),p=Xt({get scrollPaddingStart(){return u.value.start},get scrollPaddingEnd(){return u.value.end},get count(){return o.options.length},get horizontal(){return e.orientation.value==="horizontal"},estimateSize(){return o.estimateSize??28},getScrollElement(){return l.value},overscan:o.overscan??12}),v=L(()=>p.value.getVirtualItems().map(f=>{const m=a.default({option:o.options[f.index],virtualizer:p.value,virtualItem:f})[0],n=m.type===ie&&Array.isArray(m.children)?m.children[0]:m;return{item:f,is:ht(n,{key:`${f.key}`,"data-index":f.index,"aria-setsize":o.options.length,"aria-posinset":f.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${f.start}px)`,overflowAnchor:"none"}})}}));e.virtualFocusHook.on(f=>{const m=o.options.findIndex(n=>Array.isArray(e.modelValue.value)?fe(n,e.modelValue.value[0],e.by):fe(n,e.modelValue.value,e.by));m!==-1?(f?.preventDefault(),p.value.scrollToIndex(m,{align:"start"}),requestAnimationFrame(()=>{const n=Ze(l.value);n&&(e.changeHighlight(n),f&&n?.focus())})):e.highlightFirstItem()}),e.virtualHighlightHook.on(f=>{const m=o.options.findIndex(n=>fe(n,f,e.by));p.value.scrollToIndex(m,{align:"start"}),requestAnimationFrame(()=>{const n=Ze(l.value);n&&e.changeHighlight(n)})});const k=tt("",1e3),C=L(()=>{const f=m=>o.textContent?o.textContent(m):m?.toString().toLowerCase();return o.options.map((m,n)=>({index:n,textContent:f(m)}))});function I(f,m){if(!e.firstValue?.value||!e.multiple.value||!Array.isArray(e.modelValue.value))return;const q=i().filter(P=>P.ref.dataset.disabled!=="").find(P=>P.ref===e.highlightedElement.value)?.value;if(!q)return;let $=null;switch(m){case"prev":case"next":{$=De(o.options,e.firstValue.value,q);break}case"first":{$=De(o.options,e.firstValue.value,o.options?.[0]);break}case"last":{$=De(o.options,e.firstValue.value,o.options?.[o.options.length-1]);break}}e.modelValue.value=$}return e.virtualKeydownHook.on(f=>{const m=f.altKey||f.ctrlKey||f.metaKey;if(f.key==="Tab"&&!m)return;let q=Qt[f.key];if(m&&f.key==="a"&&e.multiple.value?(f.preventDefault(),e.modelValue.value=[...o.options],q="last"):f.shiftKey&&q&&I(f,q),["first","last"].includes(q)){f.preventDefault();const $=q==="first"?0:o.options.length-1;p.value.scrollToIndex($),requestAnimationFrame(()=>{const P=i(),M=q==="first"?P[0]:P[P.length-1];M&&e.changeHighlight(M.ref)})}else if(!q&&!m){k.value+=f.key;const $=Number(bt()?.getAttribute("data-index")),P=C.value[$].textContent,M=C.value.map(w=>w.textContent??""),Y=Wt(M,k.value,P),j=C.value.find(w=>w.textContent===Y);j&&(p.value.scrollToIndex(j.index,{align:"start"}),requestAnimationFrame(()=>{const w=l.value.querySelector(`[data-index="${j.index}"]`);w instanceof HTMLElement&&e.changeHighlight(w)}))}}),(f,m)=>(c(),G("div",{"data-reka-virtualizer":"",style:yt({position:"relative",width:"100%",height:`${t(p).getTotalSize()}px`})},[(c(!0),G(ie,null,Pe(v.value,({is:n,item:q})=>(c(),_(lt(n),{key:q.index}))),128))],4))}}),Ca=xa;const[re,qa]=Se("ComboboxRoot");var Sa=V({__name:"ComboboxRoot",props:{open:{type:Boolean,required:!1,default:void 0},defaultOpen:{type:Boolean,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},openOnFocus:{type:Boolean,required:!1,default:!1},openOnClick:{type:Boolean,required:!1,default:!1},ignoreFilter:{type:Boolean,required:!1},resetModelValueOnClear:{type:Boolean,required:!1,default:!1},modelValue:{type:null,required:!1},defaultValue:{type:null,required:!1},multiple:{type:Boolean,required:!1},dir:{type:String,required:!1},disabled:{type:Boolean,required:!1},highlightOnHover:{type:Boolean,required:!1,default:!0},by:{type:[String,Function],required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:["update:modelValue","highlight","update:open"],setup(s,{expose:o,emit:a}){const e=s,l=a,{primitiveElement:i,currentElement:u}=Fe(),{multiple:p,disabled:v,ignoreFilter:k,resetSearchTermOnSelect:C,openOnFocus:I,openOnClick:f,dir:m,resetModelValueOnClear:n,highlightOnHover:q}=je(e),$=rt(m),P=Le(e,"modelValue",l,{defaultValue:e.defaultValue??(p.value?[]:void 0),passive:e.modelValue===void 0,deep:!0}),M=Le(e,"open",l,{defaultValue:e.defaultOpen,passive:e.open===void 0});async function Y(B){M.value=B,J.value="",B?(await ce(),i.value?.highlightSelected(),w.value=!0,O.value?.focus()):(w.value=!1,setTimeout(()=>{!B&&e.resetSearchTermOnBlur&&j.trigger()},1))}const j=Ke(),w=H(!1),xe=H(!1),O=H(),se=H(),Q=L(()=>i.value?.highlightedElement??void 0),ee=H(new Map),ne=H(new Map),{contains:me}=st({sensitivity:"base"}),J=H(""),te=L(B=>{if(!J.value||e.ignoreFilter||xe.value)return{count:ee.value.size,items:B?.items??new Map,groups:B?.groups??new Set(ne.value.keys())};let X=0;const Z=new Map,ae=new Set;for(const[ge,le]of ee.value){const g=me(le,J.value);Z.set(ge,g?1:0),g&&X++}for(const[ge,le]of ne.value)for(const g of le)if(Z.get(g)>0){ae.add(ge);break}return{count:X,items:Z,groups:ae}}),R=_t();return ve(()=>{R?.exposed&&(R.exposed.highlightItem=i.value?.highlightItem,R.exposed.highlightFirstItem=i.value?.highlightFirstItem,R.exposed.highlightSelected=i.value?.highlightSelected)}),o({filtered:te,highlightedElement:Q,highlightItem:i.value?.highlightItem,highlightFirstItem:i.value?.highlightFirstItem,highlightSelected:i.value?.highlightSelected}),qa({modelValue:P,multiple:p,disabled:v,open:M,onOpenChange:Y,contentId:"",isUserInputted:w,isVirtual:xe,inputElement:O,highlightedElement:Q,onInputElementChange:B=>O.value=B,triggerElement:se,onTriggerElementChange:B=>se.value=B,parentElement:u,resetSearchTermOnSelect:C,onResetSearchTerm:j.on,allItems:ee,allGroups:ne,filterSearch:J,filterState:te,ignoreFilter:k,openOnFocus:I,openOnClick:f,resetModelValueOnClear:n}),(B,X)=>(c(),_(t(Mt),null,{default:h(()=>[F(t(ra),T({ref_key:"primitiveElement",ref:i},B.$attrs,{modelValue:t(P),"onUpdate:modelValue":X[0]||(X[0]=Z=>it(P)?P.value=Z:null),style:{pointerEvents:t(M)?"auto":void 0},as:B.as,"as-child":B.asChild,dir:t($),multiple:t(p),name:B.name,required:B.required,disabled:t(v),"highlight-on-hover":t(q),by:e.by,onHighlight:X[1]||(X[1]=Z=>l("highlight",Z))}),{default:h(()=>[S(B.$slots,"default",{open:t(M),modelValue:t(P)})]),_:3},16,["modelValue","style","as","as-child","dir","multiple","name","required","disabled","highlight-on-hover","by"])]),_:3}))}}),Ia=Sa;const[wa,ka]=Se("ComboboxContent");var za=V({__name:"ComboboxContentImpl",props:{position:{type:String,required:!1,default:"inline"},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(s,{emit:o}){const a=s,e=o,{position:l}=je(a),i=re(),{forwardRef:u,currentElement:p}=oe();Dt(a.bodyLock),$t(i.parentElement);const v=L(()=>a.position==="popper"?a:{}),k=xt(v.value),C={boxSizing:"border-box","--reka-combobox-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-combobox-content-available-width":"var(--reka-popper-available-width)","--reka-combobox-content-available-height":"var(--reka-popper-available-height)","--reka-combobox-trigger-width":"var(--reka-popper-anchor-width)","--reka-combobox-trigger-height":"var(--reka-popper-anchor-height)"};ka({position:l});const I=H(!1);return ve(()=>{i.inputElement.value&&(I.value=p.value.contains(i.inputElement.value),I.value&&i.inputElement.value.focus())}),Re(()=>{I.value&&i.triggerElement.value?.focus()}),(f,m)=>(c(),_(t(na),{"as-child":""},{default:h(()=>[F(t(Ct),{"as-child":"","disable-outside-pointer-events":f.disableOutsidePointerEvents,onDismiss:m[0]||(m[0]=n=>t(i).onOpenChange(!1)),onFocusOutside:m[1]||(m[1]=n=>{t(i).parentElement.value?.contains(n.target)&&n.preventDefault(),e("focusOutside",n)}),onInteractOutside:m[2]||(m[2]=n=>e("interactOutside",n)),onEscapeKeyDown:m[3]||(m[3]=n=>e("escapeKeyDown",n)),onPointerDownOutside:m[4]||(m[4]=n=>{t(i).parentElement.value?.contains(n.target)&&n.preventDefault(),e("pointerDownOutside",n)})},{default:h(()=>[(c(),_(lt(t(l)==="popper"?t(Ht):t(W)),T({...f.$attrs,...t(k)},{id:t(i).contentId,ref:t(u),"data-state":t(i).open.value?"open":"closed",style:{display:"flex",flexDirection:"column",outline:"none",...t(l)==="popper"?C:{}}}),{default:h(()=>[S(f.$slots,"default")]),_:3},16,["id","data-state","style"]))]),_:3},8,["disable-outside-pointer-events"])]),_:3}))}}),La=za,Ea=V({__name:"ComboboxArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(s){const o=s,a=re(),e=wa();return oe(),(l,i)=>t(a).open.value&&t(e).position.value==="popper"?(c(),_(t(Gt),_e(T({key:0},o)),{default:h(()=>[S(l.$slots,"default")]),_:3},16)):N("v-if",!0)}}),Fa=Ea,Ba=V({__name:"ComboboxContent",props:{forceMount:{type:Boolean,required:!1},position:{type:String,required:!1},bodyLock:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(s,{emit:o}){const l=ot(s,o),{forwardRef:i}=oe(),u=re();return u.contentId||=Ie(void 0,"reka-combobox-content"),(p,v)=>(c(),_(t(qt),{present:p.forceMount||t(u).open.value},{default:h(()=>[F(La,T({...t(l),...p.$attrs},{ref:t(i)}),{default:h(()=>[S(p.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),Aa=Ba,Ta=V({__name:"ComboboxEmpty",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const o=s,a=re(),e=L(()=>a.ignoreFilter.value?a.allItems.value.size===0:a.filterState.value.count===0);return(l,i)=>e.value?(c(),_(t(W),_e(T({key:0},o)),{default:h(()=>[S(l.$slots,"default",{},()=>[i[0]||(i[0]=ye("No options"))])]),_:3},16)):N("v-if",!0)}}),Va=Ta;const[nt,Oa]=Se("ComboboxGroup");var Ka=V({__name:"ComboboxGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const o=s,a=Ie(void 0,"reka-combobox-group"),e=re(),l=L(()=>e.ignoreFilter.value?!0:e.filterSearch.value?e.filterState.value.groups.has(a):!0),i=Oa({id:a,labelId:""});return ve(()=>{e.allGroups.value.has(a)||e.allGroups.value.set(a,new Set)}),Re(()=>{e.allGroups.value.delete(a)}),(u,p)=>(c(),_(t(fa),T({id:t(a),"aria-labelledby":t(i).labelId},o,{hidden:l.value?void 0:!0}),{default:h(()=>[S(u.$slots,"default")]),_:3},16,["id","aria-labelledby","hidden"]))}}),He=Ka,Pa=V({__name:"ComboboxInput",props:{displayValue:{type:Function,required:!1},modelValue:{type:String,required:!1},autoFocus:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"input"}},emits:["update:modelValue"],setup(s,{emit:o}){const a=s,e=o,l=re(),i=Ae(),{primitiveElement:u,currentElement:p}=Fe(),v=Le(a,"modelValue",e,{passive:a.modelValue===void 0});ve(()=>{p.value&&l.onInputElementChange(p.value)});function k(n){l.open.value||l.onOpenChange(!0)}function C(n){const q=n.target;l.open.value?l.filterSearch.value=q.value:(l.onOpenChange(!0),ce(()=>{q.value&&(l.filterSearch.value=q.value,i.highlightFirstItem())}))}function I(){l.openOnFocus.value&&!l.open.value&&l.onOpenChange(!0)}function f(){l.openOnClick.value&&!l.open.value&&l.onOpenChange(!0)}function m(){const n=l.modelValue.value;a.displayValue?v.value=a.displayValue(n):!l.multiple.value&&n&&!Array.isArray(n)&&typeof n!="object"?v.value=n.toString():v.value="",ce(()=>{v.value=v.value})}return l.onResetSearchTerm(()=>{m()}),Ge(l.modelValue,async()=>{!l.isUserInputted.value&&l.resetSearchTermOnSelect.value&&m()},{immediate:!0,deep:!0}),Ge(l.filterState,(n,q)=>{!l.isVirtual.value&&q.count===0&&i.highlightFirstItem()}),(n,q)=>(c(),_(t(da),{ref_key:"primitiveElement",ref:u,modelValue:t(v),"onUpdate:modelValue":q[0]||(q[0]=$=>it(v)?v.value=$:null),as:n.as,"as-child":n.asChild,"auto-focus":n.autoFocus,disabled:n.disabled,"aria-expanded":t(l).open.value,"aria-controls":t(l).contentId,"aria-autocomplete":"list",role:"combobox",autocomplete:"off",onClick:f,onInput:C,onKeydown:qe(Be(k,["prevent"]),["down","up"]),onFocus:I},{default:h(()=>[S(n.$slots,"default")]),_:3},8,["modelValue","as","as-child","auto-focus","disabled","aria-expanded","aria-controls","onKeydown"]))}}),Da=Pa,$a=V({__name:"ComboboxItem",props:{textValue:{type:String,required:!1},value:{type:null,required:!0},disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(s,{emit:o}){const a=s,e=o,l=Ie(void 0,"reka-combobox-item"),i=re(),u=nt(null),{primitiveElement:p,currentElement:v}=Fe();if(a.value==="")throw new Error("A <ComboboxItem /> must have a value prop that is not an empty string. This is because the Combobox value can be set to an empty string to clear the selection and show the placeholder.");const k=L(()=>{if(i.isVirtual.value||i.ignoreFilter.value||!i.filterSearch.value)return!0;{const C=i.filterState.value.items.get(l);return C===void 0?!0:C>0}});return ve(()=>{i.allItems.value.set(l,a.textValue||v.value.textContent||v.value.innerText);const C=u?.id;C&&(i.allGroups.value.has(C)?i.allGroups.value.get(C)?.add(l):i.allGroups.value.set(C,new Set([l])))}),Re(()=>{i.allItems.value.delete(l)}),(C,I)=>k.value?(c(),_(t(ba),T({key:0},a,{id:t(l),ref_key:"primitiveElement",ref:p,disabled:t(i).disabled.value||C.disabled,onSelect:I[0]||(I[0]=f=>{e("select",f),!f.defaultPrevented&&!t(i).multiple.value&&!C.disabled&&!t(i).disabled.value&&(f.preventDefault(),t(i).onOpenChange(!1),t(i).modelValue.value=a.value)})}),{default:h(()=>[S(C.$slots,"default",{},()=>[ye(de(C.value),1)])]),_:3},16,["id","disabled"])):N("v-if",!0)}}),et=$a,Ra=V({__name:"ComboboxItemIndicator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(s){const o=s;return(a,e)=>(c(),_(t(_a),_e(Ee(o)),{default:h(()=>[S(a.$slots,"default")]),_:3},16))}}),Na=Ra,Ma=V({__name:"ComboboxLabel",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(s){const o=s;oe();const a=nt({id:"",labelId:""});return a.labelId||=Ie(void 0,"reka-combobox-group-label"),(e,l)=>(c(),_(t(W),T(o,{id:t(a).labelId}),{default:h(()=>[S(e.$slots,"default")]),_:3},16,["id"]))}}),Ha=Ma,Ga=V({__name:"ComboboxPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(s){const o=s;return(a,e)=>(c(),_(t(St),_e(Ee(o)),{default:h(()=>[S(a.$slots,"default")]),_:3},16))}}),ja=Ga,Ua=V({__name:"ComboboxSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(s){const o=s;return oe(),(a,e)=>(c(),_(t(W),T(o,{"aria-hidden":"true"}),{default:h(()=>[S(a.$slots,"default")]),_:3},16))}}),Wa=Ua,Ya=V({__name:"ComboboxTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(s){const o=s,{forwardRef:a,currentElement:e}=oe(),l=re(),i=L(()=>o.disabled||l.disabled.value||!1);return ve(()=>{e.value&&l.onTriggerElementChange(e.value)}),(u,p)=>(c(),_(t(W),T(o,{ref:t(a),type:u.as==="button"?"button":void 0,tabindex:"-1","aria-label":"Show popup","aria-haspopup":"listbox","aria-expanded":t(l).open.value,"aria-controls":t(l).contentId,"data-state":t(l).open.value?"open":"closed",disabled:i.value,"data-disabled":i.value?"":void 0,"aria-disabled":i.value??void 0,onClick:p[0]||(p[0]=v=>t(l).onOpenChange(!t(l).open.value))}),{default:h(()=>[S(u.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","disabled","data-disabled","aria-disabled"]))}}),Qa=Ya,Ja=V({__name:"ComboboxVirtualizer",props:{options:{type:Array,required:!0},overscan:{type:Number,required:!1},estimateSize:{type:Number,required:!1},textContent:{type:Function,required:!1}},setup(s){const o=s,a=re();return a.isVirtual.value=!0,(e,l)=>(c(),_(Ca,_e(Ee(o)),{default:h(i=>[S(e.$slots,"default",_e(Ee(i)))]),_:3},16))}}),Xa=Ja;function Za(s,o){if(typeof s!="object"||s===null)return!1;const a=pe(s,o);return a!=null&&a!==""}function el(s,o){return o?{xs:44,sm:48,md:52,lg:56,xl:60}[s]:{xs:24,sm:28,md:32,lg:36,xl:40}[s]}function tl(s,o,a){const e=a?s.some(l=>Za(l,a)):!1;return el(o,e)}const al={slots:{base:["relative group rounded-md inline-flex items-center focus:outline-none disabled:cursor-not-allowed disabled:opacity-75","transition-colors"],leading:"absolute inset-y-0 start-0 flex items-center",leadingIcon:"shrink-0 text-dimmed",leadingAvatar:"shrink-0",leadingAvatarSize:"",trailing:"absolute inset-y-0 end-0 flex items-center",trailingIcon:"shrink-0 text-dimmed",value:"truncate pointer-events-none",placeholder:"truncate text-dimmed",arrow:"fill-default",content:["max-h-60 w-(--reka-select-trigger-width) bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-select-content-transform-origin) pointer-events-auto flex flex-col","origin-(--reka-combobox-content-transform-origin) w-(--reka-combobox-trigger-width)"],viewport:"relative scroll-py-1 overflow-y-auto flex-1",group:"p-1 isolate",empty:"text-center text-muted",label:"font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:["group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75 text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["shrink-0 text-dimmed group-data-highlighted:not-group-data-disabled:text-default","transition-colors"],itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemLeadingChip:"shrink-0",itemLeadingChipSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemWrapper:"flex-1 flex flex-col min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",input:"border-b border-default",focusScope:"flex flex-col min-h-0"},variants:{fieldGroup:{horizontal:"not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]",vertical:"not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]"},size:{xs:{base:"px-2 py-1 text-xs gap-1",leading:"ps-2",trailing:"pe-2",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1 text-[10px]/3 gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-1 text-xs"},sm:{base:"px-2.5 py-1.5 text-xs gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-4",leadingAvatarSize:"3xs",trailingIcon:"size-4",label:"p-1.5 text-[10px]/3 gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemLeadingChip:"size-4",itemLeadingChipSize:"sm",itemTrailingIcon:"size-4",empty:"p-1.5 text-xs"},md:{base:"px-2.5 py-1.5 text-sm gap-1.5",leading:"ps-2.5",trailing:"pe-2.5",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-1.5 text-sm"},lg:{base:"px-3 py-2 text-sm gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-5",leadingAvatarSize:"2xs",trailingIcon:"size-5",label:"p-2 text-xs gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemLeadingChip:"size-5",itemLeadingChipSize:"md",itemTrailingIcon:"size-5",empty:"p-2 text-sm"},xl:{base:"px-3 py-2 text-base gap-2",leading:"ps-3",trailing:"pe-3",leadingIcon:"size-6",leadingAvatarSize:"xs",trailingIcon:"size-6",label:"p-2 text-sm gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemLeadingChip:"size-6",itemLeadingChipSize:"lg",itemTrailingIcon:"size-6",empty:"p-2 text-base"}},variant:{outline:"text-highlighted bg-default ring ring-inset ring-accented",soft:"text-highlighted bg-elevated/50 hover:bg-elevated focus:bg-elevated disabled:bg-elevated/50",subtle:"text-highlighted bg-elevated ring ring-inset ring-accented",ghost:"text-highlighted bg-transparent hover:bg-elevated focus:bg-elevated disabled:bg-transparent dark:disabled:bg-transparent",none:"text-highlighted bg-transparent"},color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},leading:{true:""},trailing:{true:""},loading:{true:""},highlight:{true:""},type:{file:"file:me-1.5 file:font-medium file:text-muted file:outline-none"},virtualize:{true:{viewport:"p-1 isolate"},false:{viewport:"divide-y divide-default"}}},compoundVariants:[{color:"primary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary"},{color:"secondary",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-secondary"},{color:"success",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-success"},{color:"info",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-info"},{color:"warning",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-warning"},{color:"error",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-error"},{color:"primary",highlight:!0,class:"ring ring-inset ring-primary"},{color:"secondary",highlight:!0,class:"ring ring-inset ring-secondary"},{color:"success",highlight:!0,class:"ring ring-inset ring-success"},{color:"info",highlight:!0,class:"ring ring-inset ring-info"},{color:"warning",highlight:!0,class:"ring ring-inset ring-warning"},{color:"error",highlight:!0,class:"ring ring-inset ring-error"},{color:"neutral",variant:["outline","subtle"],class:"focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-inverted"},{color:"neutral",highlight:!0,class:"ring ring-inset ring-inverted"},{leading:!0,size:"xs",class:"ps-7"},{leading:!0,size:"sm",class:"ps-8"},{leading:!0,size:"md",class:"ps-9"},{leading:!0,size:"lg",class:"ps-10"},{leading:!0,size:"xl",class:"ps-11"},{trailing:!0,size:"xs",class:"pe-7"},{trailing:!0,size:"sm",class:"pe-8"},{trailing:!0,size:"md",class:"pe-9"},{trailing:!0,size:"lg",class:"pe-10"},{trailing:!0,size:"xl",class:"pe-11"},{loading:!0,leading:!0,class:{leadingIcon:"animate-spin"}},{loading:!0,leading:!1,trailing:!0,class:{trailingIcon:"animate-spin"}}],defaultVariants:{size:"md",color:"primary",variant:"outline"}},hl=Object.assign({inheritAttrs:!1},{__name:"USelectMenu",props:We({id:{type:String,required:!1},placeholder:{type:String,required:!1},searchInput:{type:[Boolean,Object],required:!1,default:!0},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},required:{type:Boolean,required:!1},trailingIcon:{type:null,required:!1},selectedIcon:{type:null,required:!1},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},virtualize:{type:[Boolean,Object],required:!1,default:!1},valueKey:{type:null,required:!1},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},items:{type:null,required:!1},defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1},modelModifiers:{type:Object,required:!1},multiple:{type:Boolean,required:!1},highlight:{type:Boolean,required:!1},createItem:{type:[Boolean,String,Object],required:!1},filterFields:{type:Array,required:!1},ignoreFilter:{type:Boolean,required:!1},autofocus:{type:Boolean,required:!1},autofocusDelay:{type:Number,required:!1,default:0},class:{type:null,required:!1},ui:{type:null,required:!1},open:{type:Boolean,required:!1},defaultOpen:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},name:{type:String,required:!1},resetSearchTermOnBlur:{type:Boolean,required:!1,default:!0},resetSearchTermOnSelect:{type:Boolean,required:!1,default:!0},highlightOnHover:{type:Boolean,required:!1},icon:{type:null,required:!1},avatar:{type:Object,required:!1},leading:{type:Boolean,required:!1},leadingIcon:{type:null,required:!1},trailing:{type:Boolean,required:!1},loading:{type:Boolean,required:!1},loadingIcon:{type:null,required:!1}},{searchTerm:{type:String,default:""},searchTermModifiers:{}}),emits:We(["update:open","change","blur","focus","create","highlight","update:modelValue"],["update:searchTerm"]),setup(s,{expose:o,emit:a}){const e=s,l=a,i=at(),u=It(s,"searchTerm",{type:String,default:""}),{t:p}=wt(),v=kt(),{contains:k}=st({sensitivity:"base"}),C=ot(zt(e,"modelValue","defaultValue","open","defaultOpen","required","multiple","resetSearchTermOnBlur","resetSearchTermOnSelect","highlightOnHover"),l),I=Lt(be(()=>e.portal)),f=be(()=>Ve(e.content,{side:"bottom",sideOffset:8,collisionPadding:8,position:"popper"})),m=be(()=>e.arrow),n=be(()=>e.virtualize?Ve(typeof e.virtualize=="boolean"?{}:e.virtualize,{estimateSize:tl(we.value,e.size||"md",e.descriptionKey)}):!1),q=be(()=>Ve(e.searchInput,{placeholder:p("selectMenu.search"),variant:"none"})),{emitFormBlur:$,emitFormFocus:P,emitFormInput:M,emitFormChange:Y,size:j,color:w,id:xe,name:O,highlight:se,disabled:Q,ariaAttrs:ee}=Et(e),{orientation:ne,size:me}=Ft(e),{isLeading:J,isTrailing:te,leadingIconName:R,trailingIconName:B}=Bt(be(()=>Ve(e,{trailingIcon:v.ui.icons.chevronDown}))),X=L(()=>me.value||j.value),[Z,ae]=Xe(),[ge,le]=Xe({props:{item:{type:[Object,String,Number,Boolean],required:!0},index:{type:Number,required:!1}}}),g=L(()=>Ye({extend:Ye(al),...v.ui?.selectMenu||{}})({color:w.value,variant:e.variant,size:X?.value,loading:e.loading,highlight:se.value,leading:J.value||!!e.avatar||!!i.leading,trailing:te.value||!!i.trailing,fieldGroup:ne.value,virtualize:!!e.virtualize}));function Ne(b){if(e.multiple&&Array.isArray(b)){const A=b.map(r=>Je(we.value,r,{labelKey:e.labelKey,valueKey:e.valueKey})).filter(r=>r!=null&&r!=="");return A.length>0?A.join(", "):void 0}return Je(we.value,b,{labelKey:e.labelKey,valueKey:e.valueKey})}const Ce=L(()=>e.items?.length?At(e.items)?e.items:[e.items]:[]),we=L(()=>Ce.value.flatMap(b=>b)),ke=L(()=>{if(e.ignoreFilter||!u.value)return Ce.value;const b=Array.isArray(e.filterFields)?e.filterFields:[e.labelKey];return Ce.value.map(A=>A.filter(r=>r==null?!1:typeof r!="object"?k(String(r),u.value):r.type&&["label","separator"].includes(r.type)?!0:b.some(U=>{const K=pe(r,U);return K!=null&&k(String(K),u.value)}))).filter(A=>A.filter(r=>!D(r)||!r.type||!["label","separator"].includes(r.type)).length>0)}),d=L(()=>ke.value.flatMap(b=>b)),y=L(()=>{if(!e.createItem||!u.value)return!1;const b=e.valueKey?{[e.valueKey]:u.value}:u.value;return typeof e.createItem=="object"&&e.createItem.when==="always"||e.createItem==="always"?!d.value.find(A=>Tt(A,b,e.valueKey)):!d.value.length}),x=L(()=>typeof e.createItem=="object"?e.createItem.position:"bottom"),E=Vt("triggerRef");function ue(){e.autofocus&&E.value?.$el?.focus({focusVisible:!0})}ve(()=>{setTimeout(()=>{ue()},e.autofocusDelay)});function Me(b){if(Kt(e.modelValue)===b)return;e.modelModifiers?.trim&&(b=b?.trim()??null),e.modelModifiers?.number&&(b=Pt(b)),e.modelModifiers?.nullable&&(b??=null),e.modelModifiers?.optional&&(b??=void 0);const A=new Event("change",{target:{value:b}});l("change",A),Y(),M(),e.resetSearchTermOnSelect&&(u.value="")}function he(b){let A;if(b){const r=new FocusEvent("focus");l("focus",r),P(),clearTimeout(A)}else{const r=new FocusEvent("blur");l("blur",r),$(),e.resetSearchTermOnBlur&&(A=setTimeout(()=>{u.value=""},100))}}function ut(b){b.preventDefault(),b.stopPropagation(),l("create",u.value)}function dt(b,A){if(D(A)){if(A.disabled){b.preventDefault();return}A.onSelect?.(b)}}function D(b){return typeof b=="object"&&b!==null}return o({triggerRef:be(()=>E.value?.$el)}),(b,A)=>(c(),G(ie,null,[F(t(Z),null,{default:h(()=>[F(t(et),{"data-slot":"item",class:z(g.value.item({class:e.ui?.item})),value:u.value,onSelect:ut},{default:h(()=>[ze("span",{"data-slot":"itemLabel",class:z(g.value.itemLabel({class:e.ui?.itemLabel}))},[S(b.$slots,"create-item-label",{item:u.value},()=>[ye(de(t(p)("selectMenu.create",{label:u.value})),1)])],2)]),_:3},8,["class","value"])]),_:3}),F(t(ge),null,{default:h(({item:r,index:U})=>[D(r)&&r.type==="label"?(c(),_(t(Ha),{key:0,"data-slot":"label",class:z(g.value.label({class:[e.ui?.label,r.ui?.label,r.class]}))},{default:h(()=>[ye(de(t(pe)(r,e.labelKey)),1)]),_:2},1032,["class"])):D(r)&&r.type==="separator"?(c(),_(t(Wa),{key:1,"data-slot":"separator",class:z(g.value.separator({class:[e.ui?.separator,r.ui?.separator,r.class]}))},null,8,["class"])):(c(),_(t(et),{key:2,"data-slot":"item",class:z(g.value.item({class:[e.ui?.item,D(r)&&r.ui?.item,D(r)&&r.class]})),disabled:D(r)&&r.disabled,value:e.valueKey&&D(r)?t(pe)(r,e.valueKey):r,onSelect:K=>dt(K,r)},{default:h(()=>[S(b.$slots,"item",{item:r,index:U,ui:g.value},()=>[S(b.$slots,"item-leading",{item:r,index:U,ui:g.value},()=>[D(r)&&r.icon?(c(),_(Oe,{key:0,name:r.icon,"data-slot":"itemLeadingIcon",class:z(g.value.itemLeadingIcon({class:[e.ui?.itemLeadingIcon,r.ui?.itemLeadingIcon]}))},null,8,["name","class"])):D(r)&&r.avatar?(c(),_(Qe,T({key:1,size:r.ui?.itemLeadingAvatarSize||e.ui?.itemLeadingAvatarSize||g.value.itemLeadingAvatarSize()},r.avatar,{"data-slot":"itemLeadingAvatar",class:g.value.itemLeadingAvatar({class:[e.ui?.itemLeadingAvatar,r.ui?.itemLeadingAvatar]})}),null,16,["size","class"])):D(r)&&r.chip?(c(),_(Ot,T({key:2,size:e.ui?.itemLeadingChipSize||g.value.itemLeadingChipSize(),inset:"",standalone:""},r.chip,{"data-slot":"itemLeadingChip",class:g.value.itemLeadingChip({class:[e.ui?.itemLeadingChip,r.ui?.itemLeadingChip]})}),null,16,["size","class"])):N("",!0)]),ze("span",{"data-slot":"itemWrapper",class:z(g.value.itemWrapper({class:[e.ui?.itemWrapper,D(r)&&r.ui?.itemWrapper]}))},[ze("span",{"data-slot":"itemLabel",class:z(g.value.itemLabel({class:[e.ui?.itemLabel,D(r)&&r.ui?.itemLabel]}))},[S(b.$slots,"item-label",{item:r,index:U},()=>[ye(de(D(r)?t(pe)(r,e.labelKey):r),1)])],2),D(r)&&(t(pe)(r,e.descriptionKey)||i["item-description"])?(c(),G("span",{key:0,"data-slot":"itemDescription",class:z(g.value.itemDescription({class:[e.ui?.itemDescription,D(r)&&r.ui?.itemDescription]}))},[S(b.$slots,"item-description",{item:r,index:U},()=>[ye(de(t(pe)(r,e.descriptionKey)),1)])],2)):N("",!0)],2),ze("span",{"data-slot":"itemTrailing",class:z(g.value.itemTrailing({class:[e.ui?.itemTrailing,D(r)&&r.ui?.itemTrailing]}))},[S(b.$slots,"item-trailing",{item:r,index:U,ui:g.value}),F(t(Na),{"as-child":""},{default:h(()=>[F(Oe,{name:s.selectedIcon||t(v).ui.icons.check,"data-slot":"itemTrailingIcon",class:z(g.value.itemTrailingIcon({class:[e.ui?.itemTrailingIcon,D(r)&&r.ui?.itemTrailingIcon]}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:2},1032,["class","disabled","value","onSelect"]))]),_:3}),F(t(Ia),T({id:t(xe)},{...t(C),...b.$attrs,...t(ee)},{"ignore-filter":"","as-child":"",name:t(O),disabled:t(Q),"onUpdate:modelValue":Me,"onUpdate:open":he}),{default:h(({modelValue:r,open:U})=>[F(t(aa),{"as-child":""},{default:h(()=>[F(t(Qa),{ref_key:"triggerRef",ref:E,"data-slot":"base",class:z(g.value.base({class:[e.ui?.base,e.class]})),tabindex:"0"},{default:h(()=>[t(J)||s.avatar||i.leading?(c(),G("span",{key:0,"data-slot":"leading",class:z(g.value.leading({class:e.ui?.leading}))},[S(b.$slots,"leading",{modelValue:r,open:U,ui:g.value},()=>[t(J)&&t(R)?(c(),_(Oe,{key:0,name:t(R),"data-slot":"leadingIcon",class:z(g.value.leadingIcon({class:e.ui?.leadingIcon}))},null,8,["name","class"])):s.avatar?(c(),_(Qe,T({key:1,size:e.ui?.itemLeadingAvatarSize||g.value.itemLeadingAvatarSize()},s.avatar,{"data-slot":"itemLeadingAvatar",class:g.value.itemLeadingAvatar({class:e.ui?.itemLeadingAvatar})}),null,16,["size","class"])):N("",!0)])],2)):N("",!0),S(b.$slots,"default",{modelValue:r,open:U,ui:g.value},()=>[(c(!0),G(ie,null,Pe([Ne(r)],K=>(c(),G(ie,{key:K},[K!=null?(c(),G("span",{key:0,"data-slot":"value",class:z(g.value.value({class:e.ui?.value}))},de(K),3)):(c(),G("span",{key:1,"data-slot":"placeholder",class:z(g.value.placeholder({class:e.ui?.placeholder}))},de(s.placeholder??" "),3))],64))),128))]),t(te)||i.trailing?(c(),G("span",{key:1,"data-slot":"trailing",class:z(g.value.trailing({class:e.ui?.trailing}))},[S(b.$slots,"trailing",{modelValue:r,open:U,ui:g.value},()=>[t(B)?(c(),_(Oe,{key:0,name:t(B),"data-slot":"trailingIcon",class:z(g.value.trailingIcon({class:e.ui?.trailingIcon}))},null,8,["name","class"])):N("",!0)])],2)):N("",!0)]),_:2},1032,["class"])]),_:2},1024),F(t(ja),_e(Ee(t(I))),{default:h(()=>[F(t(Aa),T({"data-slot":"content",class:g.value.content({class:e.ui?.content})},f.value),{default:h(()=>[F(t(Rt),{trapped:"","data-slot":"focusScope",class:z(g.value.focusScope({class:e.ui?.focusScope}))},{default:h(()=>[S(b.$slots,"content-top"),s.searchInput?(c(),_(t(Da),{key:0,modelValue:u.value,"onUpdate:modelValue":A[1]||(A[1]=K=>u.value=K),"display-value":()=>u.value,"as-child":""},{default:h(()=>[F(Zt,T({autofocus:"",autocomplete:"off",size:s.size},q.value,{"data-slot":"input",class:g.value.input({class:e.ui?.input}),onChange:A[0]||(A[0]=Be(()=>{},["stop"]))}),null,16,["size","class"])]),_:1},8,["modelValue","display-value"])):N("",!0),F(t(Va),{"data-slot":"empty",class:z(g.value.empty({class:e.ui?.empty}))},{default:h(()=>[S(b.$slots,"empty",{searchTerm:u.value},()=>[ye(de(u.value?t(p)("selectMenu.noMatch",{searchTerm:u.value}):t(p)("selectMenu.noData")),1)])]),_:3},8,["class"]),ze("div",{role:"presentation","data-slot":"viewport",class:z(g.value.viewport({class:e.ui?.viewport}))},[s.virtualize?(c(),G(ie,{key:0},[y.value&&x.value==="top"?(c(),_(t(ae),{key:0})):N("",!0),F(t(Xa),T({options:d.value,"text-content":K=>D(K)?t(pe)(K,e.labelKey):String(K)},n.value),{default:h(({option:K,virtualItem:Te})=>[F(t(le),{item:K,index:Te.index},null,8,["item","index"])]),_:1},16,["options","text-content"]),y.value&&x.value==="bottom"?(c(),_(t(ae),{key:1})):N("",!0)],64)):(c(),G(ie,{key:1},[y.value&&x.value==="top"?(c(),_(t(He),{key:0,"data-slot":"group",class:z(g.value.group({class:e.ui?.group}))},{default:h(()=>[F(t(ae))]),_:1},8,["class"])):N("",!0),(c(!0),G(ie,null,Pe(ke.value,(K,Te)=>(c(),_(t(He),{key:`group-${Te}`,"data-slot":"group",class:z(g.value.group({class:e.ui?.group}))},{default:h(()=>[(c(!0),G(ie,null,Pe(K,(pt,Ue)=>(c(),_(t(le),{key:`group-${Te}-${Ue}`,item:pt,index:Ue},null,8,["item","index"]))),128))]),_:2},1032,["class"]))),128)),y.value&&x.value==="bottom"?(c(),_(t(He),{key:1,"data-slot":"group",class:z(g.value.group({class:e.ui?.group}))},{default:h(()=>[F(t(ae))]),_:1},8,["class"])):N("",!0)],64))],2),S(b.$slots,"content-bottom")]),_:3},8,["class"]),s.arrow?(c(),_(t(Fa),T({key:0},m.value,{"data-slot":"arrow",class:g.value.arrow({class:e.ui?.arrow})}),null,16,["class"])):N("",!0)]),_:3},16,["class"])]),_:3},16)]),_:3},16,["id","name","disabled"])],64))}});export{ba as L,hl as _,_a as a,da as b,na as c,Ca as d,fa as e,ra as f,tl as g,gl as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as C,a as B,_ as P,b as R}from"./D472oOJg.js";import{N,X as j,aB as M,c as T,G as S,R as r,aa as b,a3 as l,V as q,C as e,ah as x,ak as y,U as n,Q as m,a8 as f,an as V,T as z,S as D,aM as c,aN as g,_ as A,a9 as O,ad as U,a2 as K}from"./CmF_IsFj.js";import{c as E}from"./CAGIVdiL.js";const F={slots:{root:"relative flex flex-col min-w-0 min-h-svh lg:not-last:border-e lg:not-last:border-default shrink-0",body:"flex flex-col gap-4 sm:gap-6 flex-1 overflow-y-auto p-4 sm:p-6",handle:""},variants:{size:{true:{root:"w-full lg:w-(--width)"},false:{root:"flex-1"}}}},G=["data-dragging"],L=Object.assign({inheritAttrs:!1},{__name:"UDashboardPanel",props:{class:{type:null,required:!1},ui:{type:null,required:!1},id:{type:String,required:!1},minSize:{type:Number,required:!1,default:15},maxSize:{type:Number,required:!1},defaultSize:{type:Number,required:!1},resizable:{type:Boolean,required:!1,default:!1}},setup(a){const t=a,p=N(),h=C({storageKey:"dashboard",unit:"%"}),i=`${h.storageKey}-panel-${t.id||j()}`,{el:v,size:u,isDragging:s,onMouseDown:o,onTouchStart:$,onDoubleClick:w}=B(i,M(()=>({...h,...t}))),k=T(()=>y({extend:y(F),...p.ui?.dashboardPanel||{}})({size:!!u.value}));return(d,Q)=>(r(),S(x,null,[b("div",q({id:i,ref_key:"el",ref:v},d.$attrs,{"data-dragging":e(s),"data-slot":"root",class:k.value.root({class:[t.ui?.root,t.class]}),style:[e(u)?{"--width":`${e(u)}${e(h).unit}`}:void 0]}),[l(d.$slots,"default",{},()=>[l(d.$slots,"header"),b("div",{"data-slot":"body",class:n(k.value.body({class:t.ui?.body}))},[l(d.$slots,"body")],2),l(d.$slots,"footer")])],16,G),l(d.$slots,"resize-handle",{onMouseDown:e(o),onTouchStart:e($),onDoubleClick:e(w)},()=>[a.resizable?(r(),m(P,{key:0,"aria-controls":i,"data-slot":"handle",class:n(k.value.handle({class:t.ui?.handle})),onMousedown:e(o),onTouchstart:e($),onDblclick:e(w)},null,8,["class","onMousedown","onTouchstart","onDblclick"])):f("",!0)])],64))}}),I={slots:{root:"h-(--ui-header-height) shrink-0 flex items-center justify-between border-b border-default px-4 sm:px-6 gap-1.5",left:"flex items-center gap-1.5 min-w-0",icon:"shrink-0 size-5 self-center me-1.5",title:"flex items-center gap-1.5 font-semibold text-highlighted truncate",center:"hidden lg:flex",right:"flex items-center shrink-0 gap-1.5",toggle:""},variants:{toggleSide:{left:{toggle:""},right:{toggle:""}}}},W=Object.assign({inheritAttrs:!1},{__name:"UDashboardNavbar",props:{as:{type:null,required:!1},icon:{type:null,required:!1},title:{type:String,required:!1},toggle:{type:[Boolean,Object],required:!1,default:!0},toggleSide:{type:String,required:!1,default:"left"},class:{type:null,required:!1},ui:{type:null,required:!1}},setup(a){const t=a,p=V(),h=N(),i=C({}),[v,u]=E(),s=T(()=>y({extend:y(I),...h.ui?.dashboardNavbar||{}})());return(o,$)=>(r(),S(x,null,[z(e(v),null,{default:D(()=>[l(o.$slots,"toggle",c(g({...e(i),ui:s.value})),()=>[a.toggle?(r(),m(R,q({key:0},typeof a.toggle=="object"?a.toggle:{},{side:a.toggleSide,"data-slot":"toggle",class:s.value.toggle({class:t.ui?.toggle,toggleSide:a.toggleSide})}),null,16,["side","class"])):f("",!0)])]),_:3}),z(e(K),q({as:a.as},o.$attrs,{"data-slot":"root",class:s.value.root({class:[t.ui?.root,t.class]})}),{default:D(()=>[b("div",{"data-slot":"left",class:n(s.value.left({class:t.ui?.left}))},[a.toggleSide==="left"?(r(),m(e(u),{key:0})):f("",!0),l(o.$slots,"left",c(g(e(i))),()=>[l(o.$slots,"leading",c(g({...e(i),ui:s.value})),()=>[a.icon?(r(),m(A,{key:0,name:a.icon,"data-slot":"icon",class:n(s.value.icon({class:t.ui?.icon}))},null,8,["name","class"])):f("",!0)]),b("h1",{"data-slot":"title",class:n(s.value.title({class:t.ui?.title}))},[l(o.$slots,"title",{},()=>[O(U(a.title),1)])],2),l(o.$slots,"trailing",c(g({...e(i),ui:s.value})))])],2),p.default?(r(),S("div",{key:0,"data-slot":"center",class:n(s.value.center({class:t.ui?.center}))},[l(o.$slots,"default",c(g(e(i))))],2)):f("",!0),b("div",{"data-slot":"right",class:n(s.value.right({class:t.ui?.right}))},[l(o.$slots,"right",c(g(e(i)))),a.toggleSide==="right"?(r(),m(e(u),{key:0})):f("",!0)],2)]),_:3},16,["as","class"])],64))}});export{L as _,W as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l}from"./KAzeBbaL.js";import{N as c,c as p,Q as n,R as u,S as i,U as m,ak as s}from"./CmF_IsFj.js";import{_ as d}from"./Cn1H4f01.js";import"./iik6CYzq.js";const f={base:"rounded-full"},k={__name:"ProseBadge",props:{class:{type:null,required:!1}},setup(a){const e=a,o=c(),r=p(()=>s({extend:s(f),...o.ui?.prose?.badge||{}}));return(t,_)=>(u(),n(d,{color:"primary",variant:"subtle",class:m(r.value({class:e.class}))},{default:i(()=>[l(t.$slots,"default",{mdcUnwrap:"p"})]),_:3},8,["class"]))}};export{k as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as oe}from"./Cn1H4f01.js";import{a as Q,c as U,G as F,R as v,aa as k,T as l,U as Z,C as s,_ as se,am as $e,Q as B,a8 as E,ad as j,S as m,a9 as S,aV as ue,ah as ae,ai as le,W as J,aj as z,e as b,f as q,ag as De,bb as Ce,af as Ue,q as Ve,n as ce}from"./CmF_IsFj.js";import{_ as Fe}from"./DYTkcgRd.js";import{_ as Se,a as Ie}from"./B_paJhyq.js";import{_ as ne}from"./BUjpjVNI.js";import{_ as de}from"./D08h2e32.js";import{_ as Pe}from"./Csa19Lyu.js";import{_ as me}from"./DQunOghN.js";import{_ as Ee}from"./BOb3QiPL.js";import{_ as Ae}from"./DhIluGHO.js";import{_ as ze,a as Be}from"./BzWvPP8W.js";import{_ as Le}from"./DFs-kxzi.js";import{_ as Oe}from"./IQoLFBX8.js";import{_ as Me}from"./C7NKjT6R.js";import{_ as Ne}from"./DcIiuvW-.js";import{_ as qe}from"./DjzaeRs8.js";import{u as He}from"./QOhiCNXN.js";import"./D472oOJg.js";import"./CAGIVdiL.js";import"./CtJTw_81.js";import"./pqmDf_cQ.js";import"./C1hs5K_e.js";import"./BkRZ4-cg.js";import"./B8gRcrNP.js";import"./BFmbqknL.js";import"./CqsT2LL7.js";import"./Dcv_tyzb.js";import"./CcRijyCZ.js";import"./C6Y-ieo6.js";import"./BFtDSgo7.js";import"./0p0wrrYN.js";import"./CU3_Ewk2.js";import"./B4T7pJz5.js";import"./Vcq4gwWv.js";import"./HUnwr3r4.js";import"./ZToTf_46.js";import"./DX5y-Dpt.js";import"./88opOQSr.js";import"./iik6CYzq.js";import"./DLkyutNs.js";import"./ytKsJZlj.js";const Re={class:"flex items-center gap-2"},Qe={class:"flex items-center flex-wrap gap-2 mt-2"},Ge={key:4,class:"text-xs text-dimmed"},We=Q({__name:"TaskCard",props:{task:{}},emits:["toggle","edit","delete","view"],setup(e,{emit:w}){const r=e,h=w,i={1:{label:"Low",color:"neutral",icon:"i-lucide-arrow-down"},2:{label:"Medium",color:"warning",icon:"i-lucide-minus"},3:{label:"High",color:"error",icon:"i-lucide-arrow-up"}},C={todo:{label:"Todo",color:"neutral",icon:"i-lucide-circle"},in_progress:{label:"In Progress",color:"info",icon:"i-lucide-clock"},done:{label:"Done",color:"success",icon:"i-lucide-check-circle"},blocked:{label:"Blocked",color:"error",icon:"i-lucide-alert-circle"}},u=U(()=>i[r.task.priority]||i[2]),g=U(()=>C[r.task.status]),_=U(()=>r.task.status==="done"),c=U(()=>!!r.task.description?.trim()),a=U(()=>!r.task.dueDate||_.value?!1:new Date(r.task.dueDate)<new Date);function p(I){return I?new Date(I).toLocaleDateString("en-US",{month:"short",day:"numeric"}):null}const $=U(()=>[[{label:"Edit",icon:"i-lucide-pencil",onSelect:()=>h("edit",r.task)},{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>h("delete",r.task.id)}]]);return(I,A)=>{const o=se,t=oe,n=J,T=Ee;return v(),F("div",{class:Z(["group flex items-start gap-3 p-3 rounded-lg border border-default hover:bg-elevated transition-colors",{"opacity-60":s(_)}])},[k("button",{class:"mt-0.5 shrink-0",onClick:A[0]||(A[0]=$e(V=>h("toggle",e.task.id),["stop"]))},[l(o,{name:s(_)?"i-lucide-check-circle-2":"i-lucide-circle",class:Z(["size-5",s(_)?"text-success":"text-dimmed hover:text-default"])},null,8,["name","class"])]),k("button",{class:"flex-1 min-w-0 text-left",onClick:A[1]||(A[1]=V=>h("view",e.task))},[k("div",Re,[k("span",{class:Z(["font-medium",{"line-through text-dimmed":s(_)}])},j(e.task.title),3),s(c)?(v(),B(o,{key:0,name:"i-lucide-file-text",class:"size-3.5 text-dimmed shrink-0"})):E("",!0)]),k("div",Qe,[e.task.project?(v(),B(t,{key:0,variant:"subtle",color:"neutral",size:"xs"},{default:m(()=>[k("span",{class:"size-2 rounded-full mr-1",style:ue({backgroundColor:e.task.project.color})},null,4),S(" "+j(e.task.project.name),1)]),_:1})):E("",!0),e.task.priority!==2?(v(),B(t,{key:1,color:s(u).color,variant:"subtle",size:"xs"},{default:m(()=>[l(o,{name:s(u).icon,class:"size-3 mr-1"},null,8,["name"]),S(" "+j(s(u).label),1)]),_:1},8,["color"])):E("",!0),e.task.status==="in_progress"||e.task.status==="blocked"?(v(),B(t,{key:2,color:s(g).color,variant:"subtle",size:"xs"},{default:m(()=>[l(o,{name:s(g).icon,class:"size-3 mr-1"},null,8,["name"]),S(" "+j(s(g).label),1)]),_:1},8,["color"])):E("",!0),e.task.dueDate?(v(),F("span",{key:3,class:Z(["text-xs flex items-center gap-1",s(a)?"text-error":"text-dimmed"])},[l(o,{name:"i-lucide-calendar",class:"size-3"}),S(" "+j(p(e.task.dueDate)),1)],2)):E("",!0),(v(!0),F(ae,null,le(e.task.tags?.slice(0,3),V=>(v(),B(t,{key:V,variant:"subtle",color:"neutral",size:"xs"},{default:m(()=>[S(j(V),1)]),_:2},1024))),128)),e.task.tags&&e.task.tags.length>3?(v(),F("span",Ge," +"+j(e.task.tags.length-3),1)):E("",!0)])]),l(T,{items:s($)},{default:m(()=>[l(n,{icon:"i-lucide-more-vertical",color:"neutral",variant:"ghost",size:"xs",class:"opacity-0 group-hover:opacity-100 transition-opacity"})]),_:1},8,["items"])],2)}}}),Je=Object.assign(We,{__name:"TasksTaskCard"}),Ke={key:0,class:"flex items-center justify-center py-12"},Xe={class:"text-center py-8 text-dimmed"},Ye={key:2,class:"space-y-2"},Ze=Q({__name:"TaskList",props:{tasks:{},loading:{type:Boolean}},emits:["toggle","edit","delete","create","view"],setup(e,{emit:w}){const r=w;return(h,i)=>{const C=se,u=J,g=me,_=Je;return v(),F("div",null,[e.loading?(v(),F("div",Ke,[l(C,{name:"i-lucide-loader-2",class:"size-8 animate-spin text-dimmed"})])):e.tasks.length===0?(v(),B(g,{key:1},{default:m(()=>[k("div",Xe,[l(C,{name:"i-lucide-check-square",class:"size-12 mx-auto mb-2 opacity-50"}),i[5]||(i[5]=k("p",{class:"font-medium"}," No tasks yet ",-1)),i[6]||(i[6]=k("p",{class:"text-sm mt-1"}," Create your first task to get started. ",-1)),l(u,{class:"mt-4",icon:"i-lucide-plus",label:"Add Task",onClick:i[0]||(i[0]=c=>r("create"))})])]),_:1})):(v(),F("div",Ye,[(v(!0),F(ae,null,le(e.tasks,c=>(v(),B(_,{key:c.id,task:c,onToggle:i[1]||(i[1]=a=>r("toggle",a)),onEdit:i[2]||(i[2]=a=>r("edit",a)),onDelete:i[3]||(i[3]=a=>r("delete",a)),onView:i[4]||(i[4]=a=>r("view",a))},null,8,["task"]))),128))]))])}}}),et=Object.assign(Ze,{__name:"TasksTaskList"}),te="__none__",tt=Q({__name:"ProjectSelect",props:{modelValue:{},projects:{}},emits:["update:modelValue"],setup(e,{emit:w}){const r=e,h=w,i=U({get:()=>r.modelValue||te,set:u=>h("update:modelValue",u===te?null:u)}),C=U(()=>[{value:te,label:"No Project"},...r.projects.filter(u=>!u.deletedAt).map(u=>({value:u.id,label:u.name}))]);return(u,g)=>{const _=ne;return v(),B(_,{modelValue:s(i),"onUpdate:modelValue":g[0]||(g[0]=c=>z(i)?i.value=c:null),items:s(C),"value-key":"value",class:"w-full"},null,8,["modelValue","items"])}}}),ot=Object.assign(tt,{__name:"TasksProjectSelect"}),st={class:"task-form-body"},at={class:"task-form-description"},lt={class:"task-form-fields"},nt={class:"grid grid-cols-2 gap-4"},it={class:"flex justify-end gap-2 w-full"},rt=Q({__name:"TaskForm",props:{open:{type:Boolean},task:{},projects:{}},emits:["update:open","submit"],setup(e,{emit:w}){const r=e,h=w,i=U(()=>!!r.task?.id),C=U(()=>i.value?"Edit Task":"Create Task"),u=b(""),g=b(""),_=b("todo"),c=b(2),a=b(null),p=b(""),$=b([]),I=[{value:"todo",label:"Todo"},{value:"in_progress",label:"In Progress"},{value:"done",label:"Done"},{value:"blocked",label:"Blocked"}],A=[{value:1,label:"Low"},{value:2,label:"Medium"},{value:3,label:"High"}],o=[[{kind:"mark",mark:"bold",icon:"i-lucide-bold"},{kind:"mark",mark:"italic",icon:"i-lucide-italic"},{kind:"mark",mark:"code",icon:"i-lucide-code"}],[{kind:"bulletList",icon:"i-lucide-list"},{kind:"orderedList",icon:"i-lucide-list-ordered"}],[{kind:"link",icon:"i-lucide-link"}]],t=U(()=>g.value||void 0);q(()=>r.task,x=>{x?(u.value=x.title,g.value=x.description||"",_.value=x.status,c.value=x.priority,a.value=x.projectId||null,p.value=x.dueDate&&new Date(x.dueDate).toISOString().split("T")[0]||"",$.value=x.tags||[]):n()},{immediate:!0}),q(()=>r.open,x=>{x||n()});function n(){u.value="",g.value="",_.value="todo",c.value=2,a.value=null,p.value="",$.value=[]}function T(){h("update:open",!1)}function V(){if(!u.value.trim())return;const x={title:u.value.trim(),description:g.value.trim()||void 0,status:_.value,priority:c.value,projectId:a.value,dueDate:p.value||void 0,tags:$.value};h("submit",x),T()}return(x,y)=>{const K=de,M=Ae,G=ze,X=Be,O=ne,N=ot,H=Le,R=J,Y=Oe;return v(),B(Y,{open:e.open,title:s(C),"onUpdate:open":y[7]||(y[7]=D=>h("update:open",D))},{body:m(()=>[k("div",st,[l(M,{label:"Title",required:""},{default:m(()=>[l(K,{modelValue:s(u),"onUpdate:modelValue":y[0]||(y[0]=D=>z(u)?u.value=D:null),placeholder:"Task title...",autofocus:"",class:"w-full"},null,8,["modelValue"])]),_:1}),k("div",at,[y[8]||(y[8]=k("label",{class:"block text-sm font-medium text-default mb-1.5"},"Description",-1)),l(X,{"model-value":s(t),"content-type":"markdown",placeholder:"Add a description...",class:"task-editor","onUpdate:modelValue":y[1]||(y[1]=D=>g.value=D)},{default:m(({editor:D})=>[l(G,{editor:D,items:o,class:"border-b border-default"},null,8,["editor"])]),_:1},8,["model-value"])]),k("div",lt,[k("div",nt,[l(M,{label:"Status"},{default:m(()=>[l(O,{modelValue:s(_),"onUpdate:modelValue":y[2]||(y[2]=D=>z(_)?_.value=D:null),items:I,"value-key":"value",class:"w-full"},null,8,["modelValue"])]),_:1}),l(M,{label:"Priority"},{default:m(()=>[l(O,{modelValue:s(c),"onUpdate:modelValue":y[3]||(y[3]=D=>z(c)?c.value=D:null),items:A,"value-key":"value",class:"w-full"},null,8,["modelValue"])]),_:1})]),l(M,{label:"Project"},{default:m(()=>[l(N,{modelValue:s(a),"onUpdate:modelValue":y[4]||(y[4]=D=>z(a)?a.value=D:null),projects:e.projects,class:"w-full"},null,8,["modelValue","projects"])]),_:1}),l(M,{label:"Due Date"},{default:m(()=>[l(K,{modelValue:s(p),"onUpdate:modelValue":y[5]||(y[5]=D=>z(p)?p.value=D:null),type:"date",class:"w-full"},null,8,["modelValue"])]),_:1}),l(M,{label:"Tags"},{default:m(()=>[l(H,{modelValue:s($),"onUpdate:modelValue":y[6]||(y[6]=D=>z($)?$.value=D:null),placeholder:"Add tags...",class:"w-full"},null,8,["modelValue"])]),_:1})])])]),footer:m(()=>[k("div",it,[l(R,{color:"neutral",variant:"ghost",onClick:T},{default:m(()=>[...y[9]||(y[9]=[S(" Cancel ",-1)])]),_:1}),l(R,{disabled:!s(u).trim(),onClick:V},{default:m(()=>[S(j(s(i)?"Save Changes":"Create Task"),1)]),_:1},8,["disabled"])])]),_:1},8,["open","title"])}}}),ct=Object.assign(rt,{__name:"TasksTaskForm"}),ut={class:"flex items-start justify-between gap-4"},dt={class:"text-lg font-semibold"},mt={class:"space-y-4"},pt={class:"flex flex-wrap items-center gap-3 text-sm"},ft={key:0,class:"flex items-center gap-1.5"},kt={class:"text-dimmed"},vt={class:"flex items-center gap-1.5"},_t={key:1,class:"flex items-center gap-1.5"},gt={class:"text-dimmed"},yt={key:0,class:"flex flex-wrap gap-1.5"},bt={key:1,class:"pt-2 border-t border-default"},ht={class:"prose prose-sm dark:prose-invert max-w-none"},wt={class:"pt-2 border-t border-default text-xs text-dimmed space-y-1"},Tt={key:0},xt={key:0},jt={class:"flex justify-between"},$t={class:"flex gap-2"},Dt=Q({__name:"TaskDetail",props:{task:{}},emits:["edit","close","toggle"],setup(e,{emit:w}){const r=e,h=w,i={1:{label:"Low",color:"neutral"},2:{label:"Medium",color:"warning"},3:{label:"High",color:"error"}},C={todo:{label:"Todo",color:"neutral"},in_progress:{label:"In Progress",color:"info"},done:{label:"Done",color:"success"},blocked:{label:"Blocked",color:"error"}},u=U(()=>i[r.task.priority]||i[2]),g=U(()=>C[r.task.status]),_=U(()=>r.task.status==="done");function c(a){return a?new Date(a).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric"}):null}return(a,p)=>{const $=oe,I=se,A=Me,o=J,t=me;return v(),B(t,null,{header:m(()=>[k("div",ut,[k("h3",dt,j(e.task.title),1),l($,{color:s(g).color,variant:"subtle"},{default:m(()=>[S(j(s(g).label),1)]),_:1},8,["color"])])]),footer:m(()=>[k("div",jt,[l(o,{icon:s(_)?"i-lucide-rotate-ccw":"i-lucide-check",color:s(_)?"neutral":"success",variant:s(_)?"ghost":"soft",onClick:p[0]||(p[0]=n=>h("toggle"))},{default:m(()=>[S(j(s(_)?"Mark Incomplete":"Mark Complete"),1)]),_:1},8,["icon","color","variant"]),k("div",$t,[l(o,{color:"neutral",variant:"ghost",onClick:p[1]||(p[1]=n=>h("close"))},{default:m(()=>[...p[3]||(p[3]=[S(" Close ",-1)])]),_:1}),l(o,{icon:"i-lucide-pencil",onClick:p[2]||(p[2]=n=>h("edit"))},{default:m(()=>[...p[4]||(p[4]=[S(" Edit ",-1)])]),_:1})])])]),default:m(()=>[k("div",mt,[k("div",pt,[e.task.project?(v(),F("div",ft,[k("span",{class:"size-2.5 rounded-full",style:ue({backgroundColor:e.task.project.color})},null,4),k("span",kt,j(e.task.project.name),1)])):E("",!0),k("div",vt,[l(I,{name:"i-lucide-flag",class:"size-4 text-dimmed"}),l($,{color:s(u).color,variant:"subtle",size:"xs"},{default:m(()=>[S(j(s(u).label),1)]),_:1},8,["color"])]),e.task.dueDate?(v(),F("div",_t,[l(I,{name:"i-lucide-calendar",class:"size-4 text-dimmed"}),k("span",gt,j(c(e.task.dueDate)),1)])):E("",!0)]),e.task.tags&&e.task.tags.length>0?(v(),F("div",yt,[(v(!0),F(ae,null,le(e.task.tags,n=>(v(),B($,{key:n,variant:"subtle",color:"neutral",size:"sm"},{default:m(()=>[S(j(n),1)]),_:2},1024))),128))])):E("",!0),e.task.description?(v(),F("div",bt,[k("div",ht,[l(A,{value:e.task.description},null,8,["value"])])])):E("",!0),k("div",wt,[k("p",null,[S(" Created: "+j(c(e.task.createdAt))+" ",1),e.task.creator?(v(),F("span",Tt," by "+j(e.task.creator.name),1)):E("",!0)]),e.task.completedAt?(v(),F("p",xt," Completed: "+j(c(e.task.completedAt)),1)):E("",!0)])])]),_:1})}}}),Ct=Object.assign(Dt,{__name:"TasksTaskDetail"});function Ut(){const e=b([]),w=b(!1),r=b(null),h=b([]),i=De({status:void 0,projectId:void 0,search:void 0,includeDeleted:!1});async function C(o){w.value=!0,r.value=null;const t=o||i;try{const n={};t.status&&(Array.isArray(t.status)?t.status.forEach(V=>n.status=V):n.status=t.status),t.projectId&&(n.projectId=t.projectId),t.search&&(n.search=t.search),t.includeDeleted&&(n.includeDeleted="true");const T=await $fetch("/api/tasks",{query:n});return e.value=T.data,T.data}catch(n){throw r.value="Failed to load tasks",console.error("Failed to load tasks:",n),n}finally{w.value=!1}}async function u(){try{const o=await $fetch("/api/tasks/tags");return h.value=o.data,o.data}catch(o){throw console.error("Failed to fetch tags:",o),o}}async function g(o){try{return(await $fetch(`/api/tasks/${o}`)).data}catch(t){throw console.error("Failed to get task:",t),t}}async function _(o){try{const t=await $fetch("/api/tasks",{method:"POST",body:o});return e.value=[t.data,...e.value],t.data}catch(t){throw console.error("Failed to create task:",t),t}}async function c(o,t){try{const n=await $fetch(`/api/tasks/${o}`,{method:"PUT",body:t}),T=e.value.findIndex(V=>V.id===o);return T!==-1&&(e.value[T]=n.data),n.data}catch(n){throw console.error("Failed to update task:",n),n}}async function a(o){try{const t=await $fetch(`/api/tasks/${o}`,{method:"DELETE"});return e.value=e.value.filter(n=>n.id!==o),t.data}catch(t){throw console.error("Failed to delete task:",t),t}}async function p(o){try{const t=await $fetch(`/api/tasks/${o}/restore`,{method:"POST"});return await C(),t.data}catch(t){throw console.error("Failed to restore task:",t),t}}async function $(o){const t=e.value.find(T=>T.id===o);if(!t)return;const n=t.status==="done"?"todo":"done";return c(o,{status:n})}const I=U(()=>{let o=[...e.value];if(i.status){const t=Array.isArray(i.status)?i.status:[i.status];o=o.filter(n=>t.includes(n.status))}if(i.projectId&&(o=o.filter(t=>t.projectId===i.projectId)),i.search){const t=i.search.toLowerCase();o=o.filter(n=>n.title.toLowerCase().includes(t)||n.description?.toLowerCase().includes(t))}return i.includeDeleted||(o=o.filter(t=>!t.deletedAt)),o}),A=U(()=>{const o={todo:0,in_progress:0,done:0,blocked:0,total:0};return e.value.forEach(t=>{t.deletedAt||(o[t.status]++,o.total++)}),o});return{tasks:e,filteredTasks:I,loading:w,error:r,tags:h,filters:i,taskCounts:A,fetchTasks:C,fetchTags:u,getTask:g,createTask:_,updateTask:c,deleteTask:a,restoreTask:p,toggleComplete:$}}function Vt(){const e=b([]),w=b(!1),r=b(null);async function h(c=!1){w.value=!0,r.value=null;try{const a=await $fetch("/api/projects",{query:{includeDeleted:c.toString()}});return e.value=a.data,a.data}catch(a){throw r.value="Failed to load projects",console.error("Failed to load projects:",a),a}finally{w.value=!1}}async function i(c){try{return(await $fetch(`/api/projects/${c}`)).data}catch(a){throw console.error("Failed to get project:",a),a}}async function C(c){try{const a=await $fetch("/api/projects",{method:"POST",body:c});return e.value=[...e.value,a.data],a.data}catch(a){throw console.error("Failed to create project:",a),a}}async function u(c,a){try{const p=await $fetch(`/api/projects/${c}`,{method:"PUT",body:a}),$=e.value.findIndex(I=>I.id===c);return $!==-1&&(e.value[$]=p.data),p.data}catch(p){throw console.error("Failed to update project:",p),p}}async function g(c){try{const a=await $fetch(`/api/projects/${c}`,{method:"DELETE"});return e.value=e.value.filter(p=>p.id!==c),a.data}catch(a){throw console.error("Failed to delete project:",a),a}}function _(c){if(c)return e.value.find(a=>a.id===c)}return{projects:e,loading:w,error:r,fetchProjects:h,getProject:i,createProject:C,updateProject:u,deleteProject:g,getProjectById:_}}const Ft={class:"contents"},St={class:"flex items-center gap-2 text-sm"},L="__all__",ho=Q({__name:"tasks",setup(e){const w=Ce(),r=Ue(),{filteredTasks:h,tasks:i,loading:C,filters:u,taskCounts:g,fetchTasks:_,createTask:c,updateTask:a,deleteTask:p,toggleComplete:$}=Ut(),{projects:I,fetchProjects:A}=Vt(),o=b(!1),t=b(null),n=b(!1),T=b(null),V=b(!1),x=b(null),y=b(!1),K=[{value:L,label:"All Status"},{value:"todo",label:"Todo"},{value:"in_progress",label:"In Progress"},{value:"done",label:"Done"},{value:"blocked",label:"Blocked"}],M=U(()=>[{value:L,label:"All Projects"},...I.value.filter(d=>!d.deletedAt).map(d=>({value:d.id,label:d.name}))]),{taskStatusFilter:G,taskProjectFilter:X}=He(),O=b(G.value==="all"?L:G.value),N=b(X.value||L),H=b("");q(O,d=>{u.status=d===L?void 0:d,G.value=d===L?"all":d}),q(N,d=>{u.projectId=d===L?void 0:d,X.value=d===L?null:d}),q(H,d=>{u.search=d||void 0}),O.value!==L&&(u.status=O.value),N.value!==L&&(u.projectId=N.value);function R(){t.value=null,o.value=!0}function Y(d){t.value=d,o.value=!0}function D(d){T.value=d,n.value=!0}async function pe(d){try{t.value?(await a(t.value.id,d),r.add({title:"Task updated",color:"success",icon:"i-lucide-check"})):(await c(d),r.add({title:"Task created",color:"success",icon:"i-lucide-check"})),t.value=null}catch(f){r.add({title:"Failed to save task",description:f instanceof Error?f.message:"An unexpected error occurred",color:"error",icon:"i-lucide-alert-circle"})}}function fe(d){x.value=d,V.value=!0}async function ke(){if(x.value){y.value=!0;try{await p(x.value),r.add({title:"Task deleted",color:"success",icon:"i-lucide-trash"}),V.value=!1,x.value=null}catch(d){r.add({title:"Failed to delete task",description:d instanceof Error?d.message:"An unexpected error occurred",color:"error",icon:"i-lucide-alert-circle"})}finally{y.value=!1}}}async function ie(d){try{await $(d)}catch(f){r.add({title:"Failed to update task",description:f instanceof Error?f.message:"An unexpected error occurred",color:"error",icon:"i-lucide-alert-circle"})}}return q([()=>w.query.selected,i],([d,f])=>{if(d&&f.length>0){const W=f.find(ee=>ee.id===d);W&&(T.value=W,n.value=!0,ce("/tasks",{replace:!0}))}},{immediate:!0}),q(()=>w.query.action,d=>{d==="new"&&(R(),ce("/tasks",{replace:!0}))},{immediate:!0}),Ve(async()=>{await Promise.all([_(),A()])}),(d,f)=>{const W=oe,ee=J,ve=Fe,_e=Ie,re=ne,ge=de,ye=Pe,be=et,he=Se,we=ct,Te=Ct,xe=Ne,je=qe;return v(),F("div",Ft,[l(he,{id:"tasks",grow:""},{header:m(()=>[l(_e,{title:"Tasks"},{left:m(()=>[k("div",St,[l(W,{color:"neutral",variant:"subtle"},{default:m(()=>[S(j(s(g).total)+" total ",1)]),_:1}),s(g).done>0?(v(),B(W,{key:0,color:"success",variant:"subtle"},{default:m(()=>[S(j(s(g).done)+" done ",1)]),_:1})):E("",!0)])]),right:m(()=>[l(ee,{icon:"i-lucide-plus",label:"Add Task",onClick:R}),l(ve)]),_:1}),l(ye,null,{left:m(()=>[l(re,{modelValue:s(O),"onUpdate:modelValue":f[0]||(f[0]=P=>z(O)?O.value=P:null),items:K,"value-key":"value",class:"w-36"},null,8,["modelValue"]),l(re,{modelValue:s(N),"onUpdate:modelValue":f[1]||(f[1]=P=>z(N)?N.value=P:null),items:s(M),"value-key":"value",class:"w-40"},null,8,["modelValue","items"])]),right:m(()=>[l(ge,{modelValue:s(H),"onUpdate:modelValue":f[2]||(f[2]=P=>z(H)?H.value=P:null),placeholder:"Search tasks...",icon:"i-lucide-search",class:"w-64"},null,8,["modelValue"])]),_:1})]),body:m(()=>[l(be,{tasks:s(h),loading:s(C),onToggle:ie,onEdit:Y,onDelete:fe,onCreate:R,onView:D},null,8,["tasks","loading"])]),_:1}),l(we,{open:s(o),"onUpdate:open":f[3]||(f[3]=P=>z(o)?o.value=P:null),task:s(t),projects:s(I),onSubmit:pe},null,8,["open","task","projects"]),l(xe,{open:s(n),"onUpdate:open":f[7]||(f[7]=P=>z(n)?n.value=P:null),title:s(T)?.title},{content:m(()=>[s(T)?(v(),B(Te,{key:0,task:s(T),onEdit:f[4]||(f[4]=P=>{Y(s(T)),n.value=!1}),onClose:f[5]||(f[5]=P=>n.value=!1),onToggle:f[6]||(f[6]=P=>{ie(s(T).id),n.value=!1})},null,8,["task"])):E("",!0)]),_:1},8,["open","title"]),l(je,{open:s(V),"onUpdate:open":f[8]||(f[8]=P=>z(V)?V.value=P:null),title:"Delete Task",description:"Are you sure you want to delete this task? This action cannot be undone.","confirm-label":"Delete","confirm-color":"error",icon:"i-lucide-trash-2",loading:s(y),onConfirm:ke,onCancel:f[9]||(f[9]=P=>x.value=null)},null,8,["open","loading"])])}}});export{ho as default};
|