super-time-tracker-ui 0.1.33 → 0.1.35
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/dist/standalone/next-output/BUILD_ID +1 -1
- package/dist/standalone/next-output/app-path-routes-manifest.json +1 -0
- package/dist/standalone/next-output/build-manifest.json +8 -7
- package/dist/standalone/next-output/routes-manifest.json +6 -0
- package/dist/standalone/next-output/server/app/_global-error/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/_global-error/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/_global-error.html +1 -1
- package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/_not-found/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/api/entries/search/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/entries/search/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/entry/delete-bulk/route.js +3 -2
- package/dist/standalone/next-output/server/app/api/entry/delete-bulk/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/entry/merge/route.js +3 -2
- package/dist/standalone/next-output/server/app/api/entry/merge/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/entry/move/route.js +3 -2
- package/dist/standalone/next-output/server/app/api/entry/move/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/entry/move-bulk/route.js +3 -2
- package/dist/standalone/next-output/server/app/api/entry/move-bulk/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/entry/route.js +2 -2
- package/dist/standalone/next-output/server/app/api/entry/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/entry/split/route.js +2 -2
- package/dist/standalone/next-output/server/app/api/entry/split/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/focus-nudges/status/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/focus-nudges/status/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/in/route.js +2 -2
- package/dist/standalone/next-output/server/app/api/in/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/note/delete/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/note/delete/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/note/delete/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/note/delete/route.js +8 -0
- package/dist/standalone/next-output/server/app/api/note/delete/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/note/delete/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/note/route.js +2 -2
- package/dist/standalone/next-output/server/app/api/note/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/out/route.js +2 -2
- package/dist/standalone/next-output/server/app/api/out/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sheet/route.js +3 -2
- package/dist/standalone/next-output/server/app/api/sheet/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/state/route.js +3 -2
- package/dist/standalone/next-output/server/app/api/state/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/ui-preferences/merge-on-load/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/ui-preferences/merge-on-load/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/login/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/login/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/offline/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/offline/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/page/react-loadable-manifest.json +20 -1
- package/dist/standalone/next-output/server/app/page.js +2 -2
- package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/pomodoro/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/register/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/register/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/reporting/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/reporting/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/reporting/page.js +1 -1
- package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/search/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/search/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/search/page.js +1 -1
- package/dist/standalone/next-output/server/app/search/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/search/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/settings/data/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/settings/display/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/settings/goals/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/settings/notifications/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/settings/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/settings/pomodoro/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/settings/tags/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/sheets/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/sheets/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/today/page/build-manifest.json +5 -4
- package/dist/standalone/next-output/server/app/today/page/react-loadable-manifest.json +8 -1
- package/dist/standalone/next-output/server/app/today/page.js +1 -1
- package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app-paths-manifest.json +1 -0
- package/dist/standalone/next-output/server/chunks/0z~i_next_dist_esm_build_templates_app-route_03g03g4.js +3 -0
- package/dist/standalone/next-output/server/chunks/0z~i_next_dist_esm_build_templates_app-route_03tgdq_.js +3 -0
- package/dist/standalone/next-output/server/chunks/0z~i_next_dist_esm_build_templates_app-route_04pkg4k.js +3 -0
- package/dist/standalone/next-output/server/chunks/0z~i_next_dist_esm_build_templates_app-route_04xu.yc.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0-s9r~f._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0.v-52m._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0a~ut1d._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0hje-x5._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0i3jybr._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0jrrc10._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0knbeau._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0p~urys._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0qj~x3r._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0u_4s37._.js +1 -1
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0pave79._.js → [root-of-the-server]__0ufti3g._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/_0.7dyz7._.js +61 -0
- package/dist/standalone/next-output/server/chunks/_02zy~~g._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_0a-mkr3._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_0l25htr._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_0oafcn7._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_0oz1whe._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_0vi~l-t._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_0x13b36._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_1210ocr._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_note_delete_route_actions_00knf8-.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_0k7l4sy._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{0z~i_next_dist_0kux32m._.js → 0z~i_next_dist_0u6ij0z._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/{node_modules__pnpm_0u1tjhh._.js → 0z~i_next_dist_client_components_0247lue._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__050iwal._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0yz-q3-._.js → [root-of-the-server]__0af8qgm._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0c786vx._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0d6wmgd._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0d9ak_~._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0hpcspt._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0i14.mc._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0laah33._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0p1zfue._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0r7bgv5._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0teulir._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__03mtg~.._.js → [root-of-the-server]__0w-1.i-._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__113s7hk._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0-4oz91._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0.6lcq2._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_02pahon._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_04wup-5._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_06q6y6m._.js +6 -0
- package/dist/standalone/next-output/server/chunks/ssr/_07zjmow._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0_vbwbg._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0arprr3._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0bl-ow8._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0bypypo._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0e29iw7._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0edisbz._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0ig7qj4._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0ka6qj5._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0kke.lq._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0li125f._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0n~tafj._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0ow880h._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0t7z076._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0tc~oq5._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0vlgde_._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0xw~xrf._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0xx3178._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0y9lue.._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0zhv27l._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_10~dvb4._.js → _10n.q--._.js} +3 -6
- package/dist/standalone/next-output/server/chunks/ssr/_11b5sl~._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_11jpj6c._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_entry-list_tsx_02.v.ur._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +1 -1
- package/dist/standalone/next-output/server/edge/chunks/[root-of-the-server]__0t9u~vh._.js +1 -1
- package/dist/standalone/next-output/server/middleware-build-manifest.js +8 -7
- package/dist/standalone/next-output/server/middleware-manifest.json +3 -3
- package/dist/standalone/next-output/server/pages/500.html +1 -1
- package/dist/standalone/next-output/static/{X1tXHWU8OQsHkaFGwq5aW → SU-RLVRUdtO2AKfS1Pl6Y}/_clientMiddlewareManifest.js +2 -2
- package/dist/standalone/next-output/static/chunks/0-h5h9pwc6~tx.js +1 -0
- package/dist/standalone/next-output/static/chunks/0.d6q7dfa~rvz.js +1 -0
- package/dist/standalone/next-output/static/chunks/001ci3z5d5_iv.js +2 -0
- package/dist/standalone/next-output/static/chunks/07cmpoll_dq7p.js +1 -0
- package/dist/standalone/next-output/static/chunks/07stv0bk.-f.c.js +1 -0
- package/dist/standalone/next-output/static/chunks/08in5jotdes88.js +1 -0
- package/dist/standalone/next-output/static/chunks/0_bhsmaiejhin.js +1 -0
- package/dist/standalone/next-output/static/chunks/0axayv~ituxt..js +1 -0
- package/dist/standalone/next-output/static/chunks/0b27kbin5~~do.js +1 -0
- package/dist/standalone/next-output/static/chunks/0de.xsooi9b2-.js +1 -0
- package/dist/standalone/next-output/static/chunks/0f-myadb_uk3f.js +1 -0
- package/dist/standalone/next-output/static/chunks/0hbb39n0td488.js +1 -0
- package/dist/standalone/next-output/static/chunks/0lke4ulbf-fg-.js +1 -0
- package/dist/standalone/next-output/static/chunks/0mx39-63srcrt.js +1 -0
- package/dist/standalone/next-output/static/chunks/0oolaow7z0is1.js +1 -0
- package/dist/standalone/next-output/static/chunks/0oybaseyora9~.js +1 -0
- package/dist/standalone/next-output/static/chunks/0pizmsm0r8hfm.js +1 -0
- package/dist/standalone/next-output/static/chunks/0si6uh~uwlodv.js +1 -0
- package/dist/standalone/next-output/static/chunks/{005x4jqipr75n.js → 0u.hvt.lrqp-c.js} +15 -15
- package/dist/standalone/next-output/static/chunks/0u2akllwu~_7..js +1 -0
- package/dist/standalone/next-output/static/chunks/0wh7a2n.kuale.js +1 -0
- package/dist/standalone/next-output/static/chunks/0wl2g2o_3a~qa.js +1 -0
- package/dist/standalone/next-output/static/chunks/0wobxr003emp1.js +31 -0
- package/dist/standalone/next-output/static/chunks/0zhsu2gpc3xwk.js +1 -0
- package/dist/standalone/next-output/static/chunks/1180009p5siza.js +1 -0
- package/dist/standalone/next-output/static/chunks/11bxv_rl8rni..js +1 -0
- package/dist/standalone/next-output/static/chunks/11qreo2lpg_cr.js +1 -0
- package/dist/standalone/next-output/static/chunks/16j24r288qh.y.js +1 -0
- package/dist/standalone/next-output/static/chunks/turbopack-0sx9yi1w3q~ee.js +1 -0
- package/dist/standalone/package.json +1 -1
- package/package.json +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__02bnr5q._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0a7wn1j._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0daa86i._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0hwik-5._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0lbu8mm._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0n.~.zo._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0n~maxn._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0skolig._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0traxfq._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0vjnznw._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~gka7i._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__13y14r6._.js +0 -3
- package/dist/standalone/next-output/server/chunks/_009-tpl._.js +0 -3
- package/dist/standalone/next-output/server/chunks/_0p0-odp._.js +0 -3
- package/dist/standalone/next-output/server/chunks/_0rz1whw._.js +0 -3
- package/dist/standalone/next-output/server/chunks/_0vvs4p8._.js +0 -3
- package/dist/standalone/next-output/server/chunks/_0ysbhok._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_0s-rnzm._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__07_7oid._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0d~vgg9._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0qwn._e._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0xp50ux._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0-a9ia4._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_002dssm._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_00x~ete._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_01m_4io._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_040_y99._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_07p~0bg._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0agxxbf._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0dxq_sx._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0hcz.gb._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0l~yvzl._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0m.iebm._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0nnp~ae._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0p5_u-y._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0q~8_bm._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0rv4ope._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0s_1q6-._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0s_yzxz._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0t2td71._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0v9kigy._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0zgllyb._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_10c-dv7._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_11je2nt._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_1218olc._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/components_0isp.qn._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/components_0s502iu._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/components_supabase-auth-form_tsx_0s9lt-1._.js +0 -3
- package/dist/standalone/next-output/static/chunks/0-pivfzfhyz.5.js +0 -1
- package/dist/standalone/next-output/static/chunks/0.e7_ejd.-kzx.js +0 -1
- package/dist/standalone/next-output/static/chunks/033lk~e30imyc.js +0 -1
- package/dist/standalone/next-output/static/chunks/03lov4c0_c3q~.js +0 -1
- package/dist/standalone/next-output/static/chunks/049ufrw2rog87.js +0 -1
- package/dist/standalone/next-output/static/chunks/04_2jzw-uhhu0.js +0 -2
- package/dist/standalone/next-output/static/chunks/04d2c_i-luh3o.js +0 -1
- package/dist/standalone/next-output/static/chunks/08sdj449boiec.js +0 -1
- package/dist/standalone/next-output/static/chunks/0ahw3noqs1atp.js +0 -1
- package/dist/standalone/next-output/static/chunks/0e7vf6ybvzpet.js +0 -1
- package/dist/standalone/next-output/static/chunks/0hse41v5a2z.p.js +0 -1
- package/dist/standalone/next-output/static/chunks/0kehy4rq7thp9.js +0 -1
- package/dist/standalone/next-output/static/chunks/0pq_8wz65_8e..js +0 -1
- package/dist/standalone/next-output/static/chunks/0q1lqhczpaxed.js +0 -1
- package/dist/standalone/next-output/static/chunks/0ufz8oxu3.gqp.js +0 -1
- package/dist/standalone/next-output/static/chunks/0xalmh45.srx..js +0 -1
- package/dist/standalone/next-output/static/chunks/0xeacy6yprulb.js +0 -1
- package/dist/standalone/next-output/static/chunks/0xmqo9jexa_hl.js +0 -1
- package/dist/standalone/next-output/static/chunks/0yd454vuc8vdt.js +0 -1
- package/dist/standalone/next-output/static/chunks/0zx~44x9cv897.js +0 -31
- package/dist/standalone/next-output/static/chunks/10hpcjpra-dzn.js +0 -1
- package/dist/standalone/next-output/static/chunks/151m05291h.pl.js +0 -1
- package/dist/standalone/next-output/static/chunks/175d60.wup0de.js +0 -1
- package/dist/standalone/next-output/static/chunks/17gch824k4dm8.js +0 -1
- package/dist/standalone/next-output/static/chunks/turbopack-01utszc95mtf1.js +0 -1
- /package/dist/standalone/next-output/static/{X1tXHWU8OQsHkaFGwq5aW → SU-RLVRUdtO2AKfS1Pl6Y}/_buildManifest.js +0 -0
- /package/dist/standalone/next-output/static/{X1tXHWU8OQsHkaFGwq5aW → SU-RLVRUdtO2AKfS1Pl6Y}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13349,e=>{"use strict";var r=e.i(410);e.s(["is_greedy_cloud_sync_enabled",0,function(){return"true"===r.greedy_cloud_sync_preference.read()}])},52663,e=>{"use strict";e.s(["get_button_class_name",0,function(e="ghost",r="default"){return`cursor-pointer appearance-none rounded-[0.65rem] border border-transparent font-inherit font-semibold disabled:cursor-not-allowed disabled:opacity-55 ${({default:"px-3.5 py-2.5",small:"px-2.5 py-1.5 text-xs"})[r]} ${({primary:"border-accent-border bg-[var(--accent)] text-[var(--accent-text-on)]",ghost:"border-panel-border bg-ghost-bg text-inherit",danger:"border-danger-border bg-danger-soft text-danger","danger-solid":"border-danger-border bg-[var(--danger-solid)] text-[var(--danger-text-on)]"})[e]}`}])},72270,4572,e=>{"use strict";let r=(0,e.i(29158).createContext)(null);e.s(["ConfirmDialogContext",0,r],72270);let t=null;e.s(["get_registered_confirm_dialog",0,function(){return t},"register_confirm_dialog",0,function(e){t=e}],4572)},56996,8654,76900,e=>{"use strict";var r=e.i(34869),t=e.i(92629);let n=(0,r.create_ui_preference_store)({storage_key:t.FOCUS_NUDGES_ENABLED_STORAGE_KEY,default_value:t.FOCUS_NUDGES_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["focus_nudges_enabled_preference",0,n],56996);let s=(0,r.create_ui_preference_store)({storage_key:t.NO_LOG_REMINDER_MINUTES_STORAGE_KEY,default_value:t.NO_LOG_REMINDER_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let r=Number.parseInt(e,10);return r>=5&&r<=240}});e.s(["no_log_reminder_minutes_preference",0,s],8654);let l=(0,r.create_ui_preference_store)({storage_key:t.OVERWORK_ALERT_HOURS_STORAGE_KEY,default_value:t.OVERWORK_ALERT_HOURS_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let r=Number.parseInt(e,10);return r>=1&&r<=16}});e.s(["overwork_alert_hours_preference",0,l],76900)},80808,71122,e=>{"use strict";var r=e.i(34869),t=e.i(92629);let n=/^([01]\d|2[0-3]):[0-5]\d$/,s=(0,r.create_ui_preference_store)({storage_key:t.WORK_HOURS_END_STORAGE_KEY,default_value:t.WORK_HOURS_END_DEFAULT,is_valid:e=>n.test(e)});e.s(["work_hours_end_preference",0,s],80808);let l=/^([01]\d|2[0-3]):[0-5]\d$/,o=(0,r.create_ui_preference_store)({storage_key:t.WORK_HOURS_START_STORAGE_KEY,default_value:t.WORK_HOURS_START_DEFAULT,is_valid:e=>l.test(e)});e.s(["work_hours_start_preference",0,o],71122)},49087,e=>{"use strict";let r=new Set;e.s(["notify_in_app",0,function(e){r.forEach(r=>{r(e)})},"subscribe_in_app_notifications",0,function(e){return r.add(e),()=>{r.delete(e)}}])},48054,e=>{"use strict";e.s(["should_ignore_keyboard_shortcut",0,function(e){let r=e.target;if(!(r instanceof HTMLElement))return!1;if(r.isContentEditable)return!0;let t=r.tagName;return"INPUT"===t||"TEXTAREA"===t||"SELECT"===t}])},11756,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return s}});let n=e.r(54696);function s({reason:e,children:r}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return r}},69314,(e,r,t)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeURIPath",{enumerable:!0,get:function(){return n}})},34730,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return a}});let n=e.r(54710),s=e.r(47869),l=e.r(54887),o=e.r(69314),i=e.r(67112);function a({moduleIds:e}){if("u">typeof window)return null;let r=l.workAsyncStorage.getStore();if(void 0===r)return null;let t=[];if(r.reactLoadableManifest&&e){let n=r.reactLoadableManifest;for(let r of e){if(!n[r])continue;let e=n[r].files;t.push(...e)}}if(0===t.length)return null;let u=(0,i.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:t.map(e=>{let t=`${r.assetPrefix}/_next/${(0,o.encodeURIPath)(e)}${u}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:t,rel:"stylesheet",as:"style",nonce:r.nonce},e):((0,s.preload)(t,{as:"script",fetchPriority:"low",nonce:r.nonce}),null)})})}},70931,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let n=e.r(54710),s=e.r(29158),l=e.r(11756),o=e.r(34730);function i(e){return{default:e&&"default"in e?e.default:e}}let a={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},u=function(e){let r={...a,...e},t=(0,s.lazy)(()=>r.loader().then(i)),u=r.loading;function c(e){let i=u?(0,n.jsx)(u,{isLoading:!0,pastDelay:!0,error:null}):null,a=!r.ssr||!!r.loading,c=a?s.Suspense:s.Fragment,d=r.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(o.PreloadChunks,{moduleIds:r.modules}):null,(0,n.jsx)(t,{...e})]}):(0,n.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(t,{...e})});return(0,n.jsx)(c,{...a?{fallback:i}:{},children:d})}return c.displayName="LoadableComponent",c}},97,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let n=e.r(81258)._(e.r(70931));function s(e,r){let t={};"function"==typeof e&&(t.loader=e);let s={...t,...r};return(0,n.default)({...s,modules:s.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},83391,14574,99211,e=>{"use strict";var r=e.i(54710),t=e.i(29158);function n({label:e,description:t,compact:s}){return(0,r.jsxs)("div",{className:"contents",children:[(0,r.jsx)("dt",{className:"m-0",children:(0,r.jsx)("kbd",{className:`inline-block min-w-7 rounded border border-panel-border bg-surface text-center font-mono font-semibold text-foreground ${s?"px-1 py-0.5 text-[0.7rem]":"px-1.5 py-0.5 text-[0.78rem]"}`,children:e})}),(0,r.jsx)("dd",{className:`m-0 self-center leading-snug text-muted ${s?"text-[0.8rem]":"text-[0.9rem]"}`,children:t})]})}function s({sections:e,compact:t=!1}){return(0,r.jsx)("div",{className:`flex flex-col ${t?"gap-2.5":"gap-4"}`,children:e.map(e=>(0,r.jsxs)("section",{children:[(0,r.jsx)("h3",{className:`m-0 font-semibold uppercase tracking-[0.04em] text-muted ${t?"text-[0.65rem]":"text-[0.72rem]"}`,children:e.title}),(0,r.jsx)("dl",{className:`m-0 grid grid-cols-[auto_minmax(0,1fr)] ${t?"mt-1.5 gap-x-3 gap-y-1.5":"mt-2 gap-x-4 gap-y-2"}`,children:e.entries.map(s=>(0,r.jsx)(n,{label:s.label,description:s.description,compact:t},`${e.title}-${s.label}-${s.description}`))})]},e.title))})}var l=e.i(52663);e.s(["KeyboardShortcutsDialog",0,function({sections:e,on_close:n}){let o=(0,t.useId)(),i=(0,t.useRef)(null);return(0,t.useEffect)(()=>{i.current?.focus();let e=e=>{"Escape"===e.key&&n()};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n]),(0,r.jsxs)("div",{className:"fixed inset-0 z-100 flex items-center justify-center p-5",role:"presentation",children:[(0,r.jsx)("button",{type:"button",className:"absolute inset-0 cursor-default border-0 bg-overlay p-0","aria-label":"Dismiss dialog",onClick:n}),(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":o,className:"relative z-1 w-full max-w-lg rounded-lg border border-panel-border bg-panel p-5 shadow-md",children:[(0,r.jsx)("h2",{id:o,className:"m-0 text-[1.1rem] font-[650] tracking-tight",children:"Keyboard shortcuts"}),(0,r.jsx)("div",{className:"mt-4 max-h-[min(28rem,70vh)] overflow-y-auto pr-1",children:(0,r.jsx)(s,{sections:e})}),(0,r.jsx)("div",{className:"mt-5 flex justify-end",children:(0,r.jsx)("button",{ref:i,type:"button",className:(0,l.get_button_class_name)("primary"),onClick:n,children:"Close"})})]})]})}],83391);var o=e.i(22373);e.s(["get_tracker_keyboard_shortcut_sections",0,function(e=o.tracker_shortcut_defaults){return[...function(e="?"){return[{title:"General",entries:[{label:"Ctrl+P",description:"Open command palette"},{label:e,description:"Show keyboard shortcuts"}]}]}("?"===e.help?"?":e.help.toUpperCase()),{title:"Tracker",entries:[{label:e["check-in"].toUpperCase(),description:"Check in (focus description)"},{label:e["check-out"].toUpperCase(),description:"Check out"},{label:e["edit-entry"].toUpperCase(),description:"Edit active entry description"},{label:e["add-note"].toUpperCase(),description:"Add note to active entry"},{label:e.pomodoro.toUpperCase(),description:"Open Pomodoro"},{label:e["previous-sheet"],description:"Previous sheet"},{label:e["next-sheet"],description:"Next sheet"}]}]}],14574);var i=e.i(72074),a=e.i(48054);e.s(["use_document_keyboard_shortcuts",0,function(e){let r=(0,t.useRef)(e);r.current=e,(0,t.useEffect)(()=>{let e=e=>{if(!(0,a.should_ignore_keyboard_shortcut)(e)&&!(0,i.is_modal_dialog_open)()){for(let t of r.current)if(t.is_available?.()!==!1&&function(e,r){let t=r.modifiers??[],n=t.includes("alt"),s=t.includes("ctrl"),l=t.includes("meta"),o=t.includes("shift");return e.altKey===n&&e.ctrlKey===s&&e.metaKey===l&&e.shiftKey===o&&(1===e.key.length?e.key.toLowerCase():e.key)===(1===r.key.length?r.key.toLowerCase():r.key)}(e,t)){e.preventDefault(),t.action();return}}};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[])}],99211)},14974,e=>{"use strict";var r=e.i(54710),t=e.i(29158),n=e.i(52663);function s({options:e,on_confirm:l,on_cancel:o}){let i=(0,t.useId)(),a=(0,t.useRef)(null),u=(0,t.useRef)(null),{cancelLabel:c="Cancel",confirmLabel:d="Confirm",message:_,title:f,variant:m="default"}=e;(0,t.useEffect)(()=>{let e=a.current;if(null!==e&&!e.open)return e.showModal(),()=>{e.open&&e.close()}},[]),(0,t.useEffect)(()=>{u.current?.focus()},[]);let p=()=>{a.current?.close(),o()};return(0,r.jsxs)("dialog",{ref:a,"aria-labelledby":i,className:"fixed inset-0 z-100 m-0 flex max-h-none w-full max-w-none items-center justify-center border-0 bg-transparent p-5 backdrop:bg-overlay open:flex",onCancel:e=>{e.preventDefault(),p()},children:[(0,r.jsx)("button",{type:"button",tabIndex:-1,"aria-label":"Dismiss dialog",className:"absolute inset-0 z-0 cursor-default border-0 bg-transparent p-0",onClick:p}),(0,r.jsxs)("div",{className:"relative z-1 w-full max-w-md rounded-lg border border-panel-border bg-panel p-5 shadow-md",children:[(0,r.jsx)("h2",{id:i,className:"m-0 text-[1.1rem] font-[650] tracking-tight",children:f}),(0,r.jsx)("p",{className:"m-0 mt-2 text-[0.9rem] leading-relaxed text-muted",children:_}),(0,r.jsxs)("div",{className:"mt-5 flex flex-wrap justify-end gap-2",children:[(0,r.jsx)("button",{type:"button",className:(0,n.get_button_class_name)("ghost"),onClick:p,children:c}),(0,r.jsx)("button",{ref:u,type:"button",className:(0,n.get_button_class_name)("danger"===m?"danger":"primary"),onClick:l,children:d})]})]})]})}var l=e.i(72270),o=e.i(4572);e.s(["ConfirmDialogProvider",0,function({children:e}){let[n,i]=(0,t.useState)(null),a=(0,t.useCallback)(e=>new Promise(r=>{i({options:e,resolve:r})}),[]);(0,o.register_confirm_dialog)(a),(0,t.useEffect)(()=>((0,o.register_confirm_dialog)(a),()=>{(0,o.register_confirm_dialog)(null)}),[a]);let u=(0,t.useMemo)(()=>({confirm:a}),[a]),c=e=>{n?.resolve(e),i(null)};return(0,r.jsxs)(l.ConfirmDialogContext.Provider,{value:u,children:[e,null===n?null:(0,r.jsx)(s,{options:n.options,on_confirm:()=>c(!0),on_cancel:()=>c(!1)})]})}],14974)},72162,e=>{"use strict";let r={runningEntry:null},t=new Set;e.s(["get_tracker_running_entry_snapshot",0,function(){return r},"publish_tracker_running_entry",0,function(e){r={runningEntry:e},t.forEach(e=>{e()})},"subscribe_tracker_running_entry",0,function(e){return t.add(e),()=>{t.delete(e)}}])},64324,e=>{"use strict";var r=e.i(54710),t=e.i(97),n=e.i(71060),s=e.i(29158),l=e.i(83391),o=e.i(14574),i=e.i(66295),a=e.i(90299),u=e.i(99211);function c(){let e=(0,n.usePathname)(),[t,c]=(0,s.useState)(!1),d="/"===e,_=(0,s.useSyncExternalStore)(a.tracker_shortcut_map_preference.subscribe,a.tracker_shortcut_map_preference.get_snapshot,a.tracker_shortcut_map_preference.get_server_snapshot),f=(0,s.useMemo)(()=>(0,i.parse_tracker_shortcut_map)(_),[_]),m=f.help,p=(0,s.useMemo)(()=>{if(d)return[];let e="?"===m?["shift"]:[];return[{id:"help",label:"?"===m?"?":m.toUpperCase(),description:"Show keyboard shortcuts",key:m,modifiers:e,action:()=>{c(e=>!e)}}]},[m,d]);return((0,u.use_document_keyboard_shortcuts)(p),t&&!d)?(0,r.jsx)(l.KeyboardShortcutsDialog,{sections:(0,o.get_tracker_keyboard_shortcut_sections)(f),on_close:()=>c(!1)}):null}var d=e.i(83105),_=e.i(18324),f=e.i(89497),m=e.i(13582);async function p(){await (0,m.with_ui_preferences_merge_guard)(async()=>{let e=(0,f.collect_ui_preferences_from_window)(),r=await fetch("/api/ui-preferences/merge-on-load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:e})});if(!r.ok)throw Error((await r.json()).error??"UI preferences merge on load failed");let t=await r.json();(0,_.apply_ui_preferences_from_record)(t.preferences??{})})}var h=e.i(76670),b=e.i(44171),g=e.i(32417),y=e.i(28274);function x(e){"function"==typeof globalThis.requestIdleCallback?globalThis.requestIdleCallback(()=>{e()}):globalThis.setTimeout(e,1)}var v=e.i(13349);function w(){return(0,v.is_greedy_cloud_sync_enabled)()}function E({children:e}){let t=(0,n.useRouter)(),l=(0,n.usePathname)(),o=(0,s.useRef)(null),i=(0,s.useRef)(!0),a=(0,s.useRef)(void 0);return(0,s.useEffect)(()=>{if(!(0,g.is_supabase_configured)()||!(0,b.is_cloud_sync_enabled)())return;let e=(0,d.create_browser_supabase_client)(),r=e=>{!w()&&(0,h.has_tracker_db_merged_this_browser_session)()?p().catch(()=>{}):(0,y.run_tracker_db_cloud_sync)({merge_on_load:!0,on_complete:e?()=>{t.refresh()}:void 0}).catch(()=>{})};e.auth.getSession().then(({data:{session:e}})=>{a.current=e?.user.id??null,null!==e&&x(()=>{r(!1)})}).catch(()=>{a.current=null});let{data:{subscription:n}}=e.auth.onAuthStateChange((e,n)=>{if("SIGNED_IN"===e){let e=n?.user.id??null;if(void 0===a.current||e===a.current)return;a.current=e,x(()=>{(0,h.clear_tracker_db_merged_this_browser_session)(),o.current=null,i.current=!0,r(!0)});return}"SIGNED_OUT"===e&&(a.current=null,(0,h.clear_tracker_db_merged_this_browser_session)(),o.current=null,i.current=!0,t.refresh())});return()=>{n.unsubscribe()}},[t]),(0,s.useEffect)(()=>{if((0,g.is_supabase_configured)()&&(0,b.is_cloud_sync_enabled)()&&w()){if(i.current){i.current=!1,o.current=l;return}o.current!==l&&(o.current=l,x(()=>{(0,y.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})}))}},[l]),(0,r.jsx)(r.Fragment,{children:e})}var k=e.i(14974),j=e.i(56996),N=e.i(8654),S=e.i(76900),T=e.i(80808),R=e.i(71122),C=e.i(72162);let P=e=>{let r=/^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);return null===r?null:60*Number.parseInt(r[1],10)+Number.parseInt(r[2],10)};function O(){let e=(0,s.useSyncExternalStore)(j.focus_nudges_enabled_preference.subscribe,j.focus_nudges_enabled_preference.get_snapshot,j.focus_nudges_enabled_preference.get_server_snapshot),r=(0,s.useSyncExternalStore)(N.no_log_reminder_minutes_preference.subscribe,N.no_log_reminder_minutes_preference.get_snapshot,N.no_log_reminder_minutes_preference.get_server_snapshot),t=(0,s.useSyncExternalStore)(S.overwork_alert_hours_preference.subscribe,S.overwork_alert_hours_preference.get_snapshot,S.overwork_alert_hours_preference.get_server_snapshot),n=(0,s.useSyncExternalStore)(R.work_hours_start_preference.subscribe,R.work_hours_start_preference.get_snapshot,R.work_hours_start_preference.get_server_snapshot),l=(0,s.useSyncExternalStore)(T.work_hours_end_preference.subscribe,T.work_hours_end_preference.get_snapshot,T.work_hours_end_preference.get_server_snapshot),o=(0,s.useSyncExternalStore)(C.subscribe_tracker_running_entry,()=>(0,C.get_tracker_running_entry_snapshot)().runningEntry,()=>null),i=(0,s.useRef)(0),a=(0,s.useRef)(null);return(0,s.useEffect)(()=>{"Notification"in window&&"true"===e&&"default"===window.Notification.permission&&window.Notification.requestPermission()},[e]),(0,s.useEffect)(()=>{if(!("Notification"in window)||"true"!==e)return;let s=60*Math.max(1,Number.parseInt(t,10)||1)*6e4,u=60*Math.max(1,Number.parseInt(r,10)||1)*1e3,c=(e,r)=>{"granted"===window.Notification.permission&&new window.Notification(e,{body:r})},d=()=>{let e=new Date,r=e.getTime();if(null===o&&((e,r,t)=>{let n=P(r),s=P(t);if(null===n||null===s)return!1;let l=e.getDay();if(0===l||6===l)return!1;let o=60*e.getHours()+e.getMinutes();return n<=s?o>=n&&o<s:o>=n||o<s})(e,n,l)&&r-i.current>=u&&(c("No active timer during work hours","Start tracking or check in to keep your work log current."),i.current=r),null!==o){let e=Date.parse(o.start);if(Number.isFinite(e)){let n=`${o.sheetName}-${o.id}`;r-e>=s&&a.current!==n&&(c("Long-running timer detected",`Timer has been running for over ${t}h. Consider splitting: ${o.description}`),a.current=n)}}else a.current=null};d();let _=window.setInterval(d,6e4);return()=>{window.clearInterval(_)}},[e,r,t,l,n,o]),null}var I=e.i(52663);let D="super-time-tracker-pwa-install-notice-dismissed";function L(){let[e,t]=(0,s.useState)(null),[n,l]=(0,s.useState)(!0),[o,i]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{let e=window.matchMedia("(display-mode: standalone)").matches||"standalone"in navigator&&!0===navigator.standalone,r="true"===window.localStorage.getItem(D);if(e||r)return void l(!0);l(!1);let n=e=>{e.preventDefault(),t(e)},s=()=>{window.localStorage.setItem(D,"true"),l(!0),t(null)};return window.addEventListener("beforeinstallprompt",n),window.addEventListener("appinstalled",s),()=>{window.removeEventListener("beforeinstallprompt",n),window.removeEventListener("appinstalled",s)}},[]),n)?null:(0,r.jsxs)("aside",{className:"fixed right-4 bottom-4 z-50 w-[min(22rem,calc(100vw-2rem))] rounded-md border border-accent-border bg-panel p-3.5 shadow-md",children:[(0,r.jsx)("p",{className:"m-0 text-[0.9rem] font-semibold",children:"Install app"}),(0,r.jsx)("p",{className:"m-0 mt-1 text-[0.82rem] leading-snug text-muted",children:null!==e?"Install Super Time Tracker for offline use and a faster startup.":"Install from your browser menu to enable app-style launch and offline support."}),(0,r.jsxs)("div",{className:"mt-3 flex gap-2",children:[null!==e?(0,r.jsx)("button",{type:"button",className:(0,I.get_button_class_name)("primary","small"),disabled:o,onClick:()=>{i(!0),e.prompt().then(async()=>{"accepted"===(await e.userChoice).outcome&&(window.localStorage.setItem(D,"true"),l(!0))}).finally(()=>{i(!1),t(null)})},children:o?"Opening…":"Install"}):null,(0,r.jsx)("button",{type:"button",className:(0,I.get_button_class_name)("ghost","small"),onClick:()=>{window.localStorage.setItem(D,"true"),l(!0)},children:"Dismiss"})]})]})}var U=e.i(47149);function A(){var e;let[t,n]=(0,s.useState)(null);if((0,s.useEffect)(()=>{let e=null,r=(0,U.subscribe_cloud_db_sync)(r=>{n(r),null!==e&&(clearTimeout(e),e=null),(r?.phase==="success"||r?.phase==="error")&&(e=setTimeout(()=>{n(null),e=null},2800))});return()=>{r(),null!==e&&clearTimeout(e)}},[]),null===t)return null;let l="syncing"===t.phase,o="error"===t.phase,i="success"===(e=t.phase)?100:"error"===e?0:null;return(0,r.jsxs)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"w-full rounded-md border border-accent-border bg-panel px-4 py-3 text-[0.88rem] font-medium text-foreground shadow-md",children:[(0,r.jsx)("p",{className:"m-0 mb-2.5 leading-snug",children:t.message}),(0,r.jsx)("div",{className:"h-1 overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--accent)_22%,var(--panel-border))]","aria-hidden":"true",children:l?(0,r.jsx)("div",{className:"cloud-db-sync-progress-indeterminate h-full w-1/3 rounded-full bg-accent"}):(0,r.jsx)("div",{className:`h-full rounded-full transition-[width] duration-300 ease-out ${o?"bg-danger":"bg-accent"}`,style:{width:`${i??0}%`}})})]})}var M=e.i(49087);function $(){let[e,t]=(0,s.useState)(null);return((0,s.useEffect)(()=>{let e=null,r=(0,M.subscribe_in_app_notifications)(r=>{t(r),null!==e&&clearTimeout(e),e=setTimeout(()=>{t(null),e=null},3200)});return()=>{r(),null!==e&&clearTimeout(e)}},[]),null===e)?null:(0,r.jsxs)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"w-full rounded-md border border-accent-border bg-panel px-4 py-2.5 text-foreground shadow-md",children:[(0,r.jsx)("p",{className:"m-0 text-[0.84rem] font-semibold",children:e.title}),(0,r.jsx)("p",{className:"m-0 mt-0.5 text-[0.8rem] leading-snug text-muted",children:e.body})]})}var K=e.i(46549);function G(){let[e,t]=(0,s.useState)(null);return((0,s.useEffect)(()=>{let e=null,r=(0,K.subscribe_settings_saved)(r=>{t(r),null!==e&&clearTimeout(e),e=setTimeout(()=>{t(null),e=null},2800)});return()=>{r(),null!==e&&clearTimeout(e)}},[]),null===e)?null:(0,r.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"w-full rounded-md border border-accent-border bg-panel px-4 py-2.5 text-[0.88rem] font-medium text-foreground shadow-md transition-[opacity,transform] duration-200",children:e||K.SETTINGS_SAVED_DEFAULT_MESSAGE})}function F(){return(0,r.jsxs)("div",{className:"pointer-events-none fixed z-50 flex w-[min(22rem,calc(100vw-2rem))] flex-col items-end gap-2 right-[max(1rem,env(safe-area-inset-right,0px))] bottom-[max(1rem,env(safe-area-inset-bottom,0px))]",children:[(0,r.jsx)($,{}),(0,r.jsx)(A,{}),(0,r.jsx)(G,{})]})}let z=(0,t.default)(()=>e.A(58067).then(e=>({default:e.CommandPaletteProvider})),{loadableGenerated:{modules:[78331]}});e.s(["AppProviders",0,function({children:e}){return(0,r.jsx)(k.ConfirmDialogProvider,{children:(0,r.jsxs)(E,{children:[e,(0,r.jsx)(c,{}),(0,r.jsx)(z,{}),(0,r.jsx)(O,{}),(0,r.jsx)(F,{}),(0,r.jsx)(L,{})]})})}],64324)},19943,e=>{"use strict";var r=e.i(29158),t=e.i(53602);e.s(["DocumentPreferencesInit",0,function(){return(0,r.useLayoutEffect)(()=>{(0,t.apply_ui_preferences_dom_from_window)()},[]),null}])},33334,e=>{"use strict";var r=e.i(29158);e.s(["PwaRegister",0,function(){return(0,r.useEffect)(()=>{"serviceWorker"in navigator&&"caches"in window&&navigator.serviceWorker.register("/sw.js").then(()=>{let e;0!==(e="u"<typeof document?[]:[...new Set([...Array.from(document.querySelectorAll("script[src]")).map(e=>e.src).filter(e=>e.length>0),...Array.from(document.querySelectorAll('link[rel="stylesheet"],link[rel="modulepreload"],link[rel="preload"][as="script"],link[rel="preload"][as="style"]')).map(e=>e.href).filter(e=>e.length>0)])].filter(e=>{try{return new URL(e).origin===window.location.origin}catch{return!1}})).length&&caches.open("super-time-tracker-shell-v1").then(r=>Promise.all(e.map(e=>fetch(e,{cache:"no-store"}).then(t=>t.ok?r.put(e,t.clone()):Promise.resolve()).catch(()=>Promise.resolve()))))})},[]),null}])},89391,e=>{"use strict";var r=e.i(29158),t=e.i(17798),n=e.i(35434),s=e.i(70223),l=e.i(10464),o=e.i(61834),i=e.i(81553);e.s(["ThemeModeSystemListener",0,function(){return(0,r.useEffect)(()=>{let e=window.matchMedia("(prefers-color-scheme: light)"),r=()=>{if("system"!==l.theme_mode_preference.read())return;let e=(0,s.resolve_theme_mode_to_theme)("system");(0,t.apply_theme)(e),(0,i.write_stored_theme)(e),(0,o.write_document_preference_cookies)({theme_mode:"system",theme:e}),(0,n.notify_theme_subscribers)()};return e.addEventListener("change",r),()=>{e.removeEventListener("change",r)}},[]),null}])},10289,e=>{"use strict";var r=e.i(29158),t=e.i(53602),n=e.i(60609);e.s(["UiPreferencesDocumentSync",0,function(){return(0,r.useEffect)(()=>{let e=()=>{(0,t.apply_ui_preferences_dom_from_window)()};return window.addEventListener(n.UI_PREFERENCES_APPLIED_EVENT,e),()=>{window.removeEventListener(n.UI_PREFERENCES_APPLIED_EVENT,e)}},[]),null}])},58067,e=>{e.v(r=>Promise.all(["static/chunks/0.d6q7dfa~rvz.js"].map(r=>e.l(r))).then(()=>r(78331)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22482,e=>{"use strict";var t=e.i(54710),n=e.i(97),a=e.i(45958),s=e.i(29158),r=e.i(14260),i=e.i(96947),l=e.i(52663),o=e.i(52405),c=e.i(69472),d=e.i(84545),u=e.i(50937),m=e.i(83327),_=e.i(49532),p=e.i(59515);function h(e){try{window.localStorage.setItem("super-time-tracker-entry-templates",JSON.stringify(e))}catch{}}function g({known_tags:e,on_submit:n,is_pending:a}){let[x,f]=(0,s.useState)([]),[b,y]=(0,s.useState)(""),[v,N]=(0,s.useState)(""),[k,j]=(0,s.useState)(""),[w,S]=(0,s.useState)(null),[E,C]=(0,s.useState)(!1),T=(0,s.useSyncExternalStore)(d.entry_suggestion_provider_preference.subscribe,d.entry_suggestion_provider_preference.get_snapshot,d.entry_suggestion_provider_preference.get_server_snapshot),$=(0,s.useSyncExternalStore)(m.openai_api_key_preference.subscribe,m.openai_api_key_preference.get_snapshot,m.openai_api_key_preference.get_server_snapshot),I=(0,s.useSyncExternalStore)(c.claude_api_key_preference.subscribe,c.claude_api_key_preference.get_snapshot,c.claude_api_key_preference.get_server_snapshot),L=(0,s.useSyncExternalStore)(u.google_ai_api_key_preference.subscribe,u.google_ai_api_key_preference.get_snapshot,u.google_ai_api_key_preference.get_server_snapshot),A=(0,i.get_api_key_for_suggestion_provider)(T,{openai:$,claude:I,google_ai:L}),D="none"!==T&&A.trim().length>0;(0,s.useEffect)(()=>{f((0,_.read_entry_templates)())},[]);let M=(0,s.useMemo)(()=>x.find(e=>e.id===b)??null,[x,b]),R=async()=>{if(D){C(!0),S(null);try{let e=await (0,p.request_ai_entry_description_suggestion)({provider:T,api_key:A,context:v,notes:""});N(e)}catch(e){S(e instanceof Error?e.message:String(e))}finally{C(!1)}}};return(0,t.jsxs)("form",{className:"flex flex-col gap-2 border border-panel-border bg-panel p-[1.1rem] shadow-sm",onSubmit:e=>{e.preventDefault();let t=v.trim();if(0===t.length)return;let a=k.trim();n({description:t,...a.length>0?{at:a}:{}}),N(""),j("")},children:[(0,t.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-description",children:"What are you working on?"}),(0,t.jsxs)("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto_auto]",children:[(0,t.jsxs)("select",{className:(0,o.get_input_class_name)(),value:b,disabled:a||0===x.length,onChange:e=>{let t=e.target.value;y(t);let n=x.find(e=>e.id===t)??null;null!==n&&N(n.description)},children:[(0,t.jsx)("option",{value:"",children:0===x.length?"No templates":"Use a template…"}),x.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]}),(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost"),disabled:a||0===v.trim().length,onClick:()=>{let e=v.trim();if(0===e.length)return;let t=e.slice(0,40),n=globalThis.prompt("Template name",t.length>0?t:"New template");if(null===n)return;let a=n.trim();if(0===a.length)return;let s="u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`,r=[...x,{id:s,name:a,description:e}];f(r),y(s),h(r)},children:"Save template"}),(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost"),disabled:a||null===M,onClick:()=>{if(null===M)return;let e=x.filter(e=>e.id!==M.id);f(e),y(""),h(e)},children:"Delete template"})]}),(0,t.jsxs)("div",{className:`grid gap-2 max-[860px]:grid-cols-1 ${D?"grid-cols-[minmax(0,1fr)_auto_auto]":"grid-cols-[minmax(0,1fr)_auto]"}`,children:[(0,t.jsx)(r.TagAutocompleteInput,{id:"check-in-description",value:v,known_tags:e,placeholder:"e.g. crafting something @design",disabled:a,autoFocus:!0,on_change:N}),D?(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost"),disabled:a||E,onClick:()=>void R(),title:"Suggest description with AI",children:E?"Suggesting…":"Suggest"}):null,(0,t.jsx)("button",{type:"submit",className:(0,l.get_button_class_name)("primary"),disabled:a||0===v.trim().length,children:"Check in"})]}),null===w?null:(0,t.jsx)("p",{className:"m-0 text-[0.8rem] text-danger",children:w}),(0,t.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-at",children:["Start time"," ",(0,t.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,t.jsx)("input",{id:"check-in-at",className:(0,o.get_input_class_name)(),value:k,onChange:e=>j(e.target.value),placeholder:"e.g. 30 minutes ago",disabled:a})]})}var x=e.i(50994);let f=(0,s.forwardRef)(function({known_tags:e,is_pending:n,on_submit:a,trailing:r},i){let o="true"===(0,s.useSyncExternalStore)(x.check_in_form_collapsed_preference.subscribe,x.check_in_form_collapsed_preference.get_snapshot,x.check_in_form_collapsed_preference.get_server_snapshot),[c,d]=(0,s.useState)(!o);return((0,s.useImperativeHandle)(i,()=>({expand_and_focus:()=>{d(!0),globalThis.requestAnimationFrame(()=>{let e=document.getElementById("check-in-description");e instanceof HTMLElement&&e.focus()})}}),[]),o&&!c)?(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-3",children:[(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("primary"),disabled:n,onClick:()=>d(!0),children:"Check in"}),r]}):(0,t.jsx)(g,{known_tags:e,is_pending:n,on_submit:e=>{a(e),o&&d(!1)}})});var b=e.i(14974),y=e.i(71060),v=e.i(83391);function N(e,t,n){if(0===e.length)return null;let a=e.findIndex(e=>e.name===t),s=((-1===a?0:a)+("next"===n?1:-1)+e.length)%e.length;return e[s]?.name??null}var k=e.i(14574),j=e.i(66295),w=e.i(90299),S=e.i(53754),E=e.i(99211);function C({sheets:e,active_sheet_name:n,active_entry:a,is_pending:r,check_in_form_ref:i,active_entry_panel_ref:l,on_select_sheet:o,on_check_out:c}){let d=(0,y.useRouter)(),[u,m]=(0,s.useState)(!1),_=(0,S.useCheckOutAction)(c),p=(0,s.useSyncExternalStore)(w.tracker_shortcut_map_preference.subscribe,w.tracker_shortcut_map_preference.get_snapshot,w.tracker_shortcut_map_preference.get_server_snapshot),h=(0,s.useMemo)(()=>(0,j.parse_tracker_shortcut_map)(p),[p]),g=h.help,x="?"===g?"?":g.toUpperCase(),f=(0,s.useMemo)(()=>{let t=null!==a,s="?"===g?["shift"]:[];return[{id:"help",label:x,description:"Show keyboard shortcuts",key:g,modifiers:s,action:()=>{m(e=>!e)}},{id:"check-in",label:h["check-in"].toUpperCase(),description:"Check in (focus description)",key:h["check-in"],is_available:()=>!r&&!t,action:()=>{i.current?.expand_and_focus()}},{id:"check-out",label:h["check-out"].toUpperCase(),description:"Check out",key:h["check-out"],is_available:()=>!r&&t,action:()=>{_()}},{id:"edit-entry",label:h["edit-entry"].toUpperCase(),description:"Edit active entry",key:h["edit-entry"],is_available:()=>!r&&t,action:()=>{l.current?.start_edit()}},{id:"add-note",label:h["add-note"].toUpperCase(),description:"Add note to active entry",key:h["add-note"],is_available:()=>!r&&t,action:()=>{l.current?.start_add_note()}},{id:"pomodoro",label:h.pomodoro.toUpperCase(),description:"Open Pomodoro",key:h.pomodoro,is_available:()=>!r,action:()=>{d.push("/pomodoro")}},{id:"previous-sheet",label:h["previous-sheet"],description:"Previous sheet",key:h["previous-sheet"],is_available:()=>!r&&e.length>1,action:()=>{let t=N(e,n,"previous");null!==t&&t!==n&&o(t)}},{id:"next-sheet",label:h["next-sheet"],description:"Next sheet",key:h["next-sheet"],is_available:()=>!r&&e.length>1,action:()=>{let t=N(e,n,"next");null!==t&&t!==n&&o(t)}}]},[a,l,n,i,_,r,o,d,g,x,h,e]);return((0,E.use_document_keyboard_shortcuts)(f),u)?(0,t.jsx)(v.KeyboardShortcutsDialog,{sections:(0,k.get_tracker_keyboard_shortcut_sections)(h),on_close:()=>m(!1)}):null}var T=e.i(18774),$=e.i(31113),I=e.i(72550);function L(){try{let e=window.localStorage.getItem(I.SHEET_TAG_FILTERS_STORAGE_KEY);if(null===e)return{};let t=JSON.parse(e);if(null===t||"object"!=typeof t)return{};return t}catch{return{}}}function A(e){let t=L()[e]??[],n=[],a=new Set;for(let e of t)try{let t=(0,$.normalize_stored_tag)(e);a.has(t)||(a.add(t),n.push(t))}catch{continue}return n}var D=e.i(86580);function M(e){return(0,D.get_stable_sheet_tag_filter_snapshot)(e,A(e))}function R(){return D.EMPTY_SHEET_TAG_FILTER}var F=e.i(98425),U=e.i(27850);function q(e,t){let n=L();0===t.length?delete n[e]:n[e]=t;try{window.localStorage.setItem(I.SHEET_TAG_FILTERS_STORAGE_KEY,JSON.stringify(n)),(0,U.schedule_ui_preferences_cloud_sync)()}catch{}(0,F.notify_sheet_tag_filters_subscribers)()}var P=e.i(47540),O=e.i(62796);function z(){return(0,s.useSyncExternalStore)(O.tag_filter_mode_preference.subscribe,O.tag_filter_mode_preference.get_snapshot,O.tag_filter_mode_preference.get_server_snapshot)}function G({sheet_name:e,sheet_tags:n}){let a=z(),r=(0,s.useSyncExternalStore)(F.subscribe_sheet_tag_filters,()=>M(e),R);if((0,s.useEffect)(()=>{!function(e,t){let n=A(e);if(0===n.length)return;let a=n.filter(e=>t.some(t=>(0,P.tags_are_equal)(e,t)));a.length!==n.length&&q(e,a)}(e,n.map(e=>e.name))},[e,n]),0===n.length)return null;let i=r.length>0;return(0,t.jsxs)("fieldset",{className:"m-0 flex flex-wrap items-center gap-x-3 gap-y-2 border-0 p-0",children:[(0,t.jsx)("legend",{className:"sr-only",children:"Filter by tag"}),(0,t.jsx)("h2",{className:"m-0 shrink-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em]",children:"Filter by tag"}),(0,t.jsx)("p",{className:"m-0 shrink-0 text-[0.8rem] text-muted",children:"any"===a?"Show entries that include any selected tag.":"Show entries that include every selected tag."}),(0,t.jsxs)("div",{className:"ml-auto flex min-w-0 flex-wrap justify-end gap-1",children:[n.map(n=>{let a=r.some(e=>(0,P.tags_are_equal)(e,n.name));return(0,t.jsxs)("button",{type:"button",className:`${(0,l.get_button_class_name)("ghost","small")} ${a?"border-accent-border bg-accent-soft text-foreground":""}`,"aria-pressed":a,onClick:()=>{var t;let a,s;return t=n.name,a=(0,$.normalize_stored_tag)(t),void((s=A(e)).some(e=>(0,P.tags_are_equal)(e,a))?q(e,s.filter(e=>!(0,P.tags_are_equal)(e,a))):q(e,[...s,a]))},children:[(0,T.format_display_tag)(n.name),(0,t.jsxs)("span",{className:"ml-1 font-normal text-muted",children:["(",n.entryCount,")"]})]},n.name)}),i?(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost","small"),onClick:()=>q(e,[]),children:"Clear filter"}):null]})]})}var H=e.i(87231),B=e.i(56586);function K({query:e,active_sheet:n,is_pending:s=!1,on_query_change:r}){let i=e.trim(),c=(0,H.build_entry_search_href)({...(0,B.get_empty_entry_search_filters)(),query:i,sheetName:n});return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Search entries"}),(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("input",{type:"search",className:(0,o.get_input_class_name)("compact"),placeholder:"Search description, tags, notes…",value:e,disabled:s,"aria-label":"Search entries on this sheet",onChange:e=>r(e.target.value)}),i.length>0?(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost","small"),disabled:s,onClick:()=>r(""),children:"Clear"}):null]})]}),i.length>0?(0,t.jsx)(a.default,{className:"self-start text-[0.8rem] font-semibold text-accent no-underline hover:underline",href:c,children:"Search all sheets with filters"}):(0,t.jsx)(a.default,{className:"self-start text-[0.8rem] font-semibold text-muted no-underline hover:text-accent hover:underline",href:"/search",children:"Open global search"})]})}var J=e.i(19946),W=e.i(37399);let Y="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";function Q({sheet_name:e,is_pending:n,can_delete:a,on_rename:r,on_delete:i}){let[l,o]=(0,s.useState)(!1),c=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!l)return;let e=e=>{null===c.current||c.current.contains(e.target)||o(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[l]);let d=()=>{o(!1)};return(0,t.jsxs)("div",{className:"relative shrink-0 self-center",ref:c,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":`Actions for sheet ${e}`,"aria-expanded":l,"aria-haspopup":"menu",disabled:n,onClick:()=>o(e=>!e),children:(0,t.jsx)(W.HamburgerIcon,{})}),l?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:Y,role:"menuitem",disabled:n,onClick:()=>{d(),r()},children:"Rename"})}),(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${Y} text-danger`,role:"menuitem",disabled:n||!a,title:a?void 0:"Cannot delete the last sheet",onClick:()=>{d(),i()},children:"Delete sheet"})})]}):null]})}var V=e.i(91966),X=e.i(25204);function Z({sheets:e,db_path:n,on_select:a,on_create:r,on_rename:i,on_delete:c,is_pending:d}){let{confirm:u}=(0,J.use_confirm_dialog)(),m=(0,V.use_confirm_destructive_actions)(),_=e.length>1,[p,h]=(0,s.useState)(!1),[g,x]=(0,s.useState)(""),[f,b]=(0,s.useState)(null),[y,v]=(0,s.useState)(""),N=()=>{h(!1),x("")},k=()=>{b(null),v("")};(0,X.use_escape_to_cancel)(k,null!==f),(0,X.use_escape_to_cancel)(N,p);let j=e=>{if(e.preventDefault(),null===f)return;let t=y.trim();0===t.length||t===f||i(f,t),k()};return(0,t.jsxs)("aside",{className:"flex min-w-0 flex-col gap-3 max-[860px]:min-w-0",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Sheets"}),(0,t.jsx)("ul",{className:"m-0 flex min-h-0 flex-1 list-none flex-col gap-1.5 p-0",children:e.map(e=>(0,t.jsx)("li",{className:"min-w-0",children:f===e.name?(0,t.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-1.5",onSubmit:j,children:[(0,t.jsx)("input",{className:(0,o.get_input_class_name)("compact"),value:y,onChange:e=>v(e.target.value),disabled:d,autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)("button",{type:"submit",className:`${(0,l.get_button_class_name)("ghost")} flex-1`,disabled:d||0===y.trim().length,children:"Save"}),(0,t.jsx)("button",{type:"button",className:`${(0,l.get_button_class_name)("ghost")} flex-1`,disabled:d,onClick:k,children:"Cancel"})]})]}):(0,t.jsxs)("div",{className:"flex min-w-0 items-stretch gap-1",children:[(0,t.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 rounded-md border border-transparent bg-transparent px-2.5 py-2 text-left transition-[background-color,color] duration-150 hover:bg-surface-hover",disabled:d&&!e.isActive,onClick:()=>a(e.name),children:[(0,t.jsx)("span",{className:`min-w-0 flex-1 truncate font-semibold ${e.isActive||e.hasActiveEntry?"text-accent":""}`,children:e.name}),(0,t.jsx)("span",{className:`shrink-0 text-xs whitespace-nowrap ${e.hasActiveEntry?"text-accent":"text-muted"}`,children:e.hasActiveEntry?"● active":`${e.entryCount} entries`})]}),(0,t.jsx)(Q,{sheet_name:e.name,is_pending:d,can_delete:_,on_rename:()=>{var t;b(t=e.name),v(t)},on_delete:async()=>{var t,n,a;let s;(!m||await u((t=e.name,n=e.entryCount,a=e.hasActiveEntry,s=0===n?"":` This will delete ${n} ${1===n?"entry":"entries"}.`,{title:"Delete sheet?",message:`Delete "${t}"?${s}${a?" This will stop the active timer.":""}`,confirmLabel:"Delete sheet",variant:"danger"})))&&c(e.name)}})]})},e.name))}),p?(0,t.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-2",onSubmit:e=>{e.preventDefault();let t=g.trim();0!==t.length&&(r(t),N())},children:[(0,t.jsx)("input",{className:(0,o.get_input_class_name)("compact"),value:g,onChange:e=>x(e.target.value),placeholder:"New sheet name",disabled:d,autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)("button",{type:"submit",className:`${(0,l.get_button_class_name)("ghost")} flex-1`,disabled:d||0===g.trim().length,children:"Add"}),(0,t.jsx)("button",{type:"button",className:`${(0,l.get_button_class_name)("ghost")} flex-1`,disabled:d,onClick:N,children:"Cancel"})]})]}):(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost"),disabled:d,onClick:()=>h(!0),children:"Add sheet"}),(0,t.jsx)("p",{className:"mt-auto shrink-0 overflow-wrap-anywhere border-t border-panel-border pt-3 font-mono text-[0.65rem] leading-snug text-muted",title:n,children:n})]})}var ee=e.i(32584),et=e.i(1800),en=e.i(60935);function ea(){return"true"===(0,s.useSyncExternalStore)(en.timer_show_seconds_preference.subscribe,en.timer_show_seconds_preference.get_snapshot,en.timer_show_seconds_preference.get_server_snapshot)}function es({entry:e,in_bar:n,is_pending:a,initial_at:r,on_cancel:i,on_submit:c}){let d=(0,et.use_duration_format)(),u=ea(),[m,_]=(0,s.useState)(()=>Date.now()-new Date(e.start).getTime()),[p,h]=(0,s.useState)(""),[g,x]=(0,s.useState)(r??""),f=(0,s.useRef)(null);(0,X.use_escape_to_cancel)(i),(0,s.useEffect)(()=>{f.current?.focus()},[]),(0,s.useEffect)(()=>{_(Date.now()-new Date(e.start).getTime());let t=globalThis.setInterval(()=>{_(Date.now()-new Date(e.start).getTime())},1e3);return()=>globalThis.clearInterval(t)},[e.start]);let b=(0,ee.format_duration)(m,d,u),y=e.description||"Untitled entry";return(0,t.jsxs)("form",{className:"flex min-w-0 flex-col gap-4","aria-label":"Check out form",onSubmit:e=>{e.preventDefault();let t=p.trim(),n=g.trim(),a=t.length>0,s=n.length>0;a||s?c({...s?{at:n}:{},...a?{note:t}:{}}):c(void 0)},children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.68rem] font-bold uppercase leading-none tracking-wider text-danger",children:"Checking out"}),(0,t.jsx)("h2",{className:"m-0 min-w-0 truncate text-[1.05rem] font-[650] leading-tight tracking-tight min-[560px]:text-[1.15rem]",children:y})]}),(0,t.jsx)("p",{className:"m-0 whitespace-nowrap font-mono text-[1.4rem] font-medium leading-none tracking-tight text-accent min-[560px]:text-[1.6rem]",children:b})]}),e.tags.length>0?(0,t.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1.5 p-0",children:e.tags.map(e=>(0,t.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-[0.72rem] text-tag-text",children:(0,T.format_display_tag)(e)},e))}):null,(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 min-[640px]:grid-cols-[minmax(0,1fr)_minmax(10rem,14rem)]",children:[(0,t.jsxs)("label",{className:"flex min-w-0 flex-col gap-1",htmlFor:"checkout-note",children:[(0,t.jsxs)("span",{className:"text-[0.8rem] font-semibold",children:["Note ",(0,t.jsx)("span",{className:"font-normal text-muted",children:"(optional)"})]}),(0,t.jsx)("input",{ref:f,id:"checkout-note",className:(0,o.get_input_class_name)("compact"),value:p,onChange:e=>h(e.target.value),placeholder:"Wrap-up, blockers, next steps…",disabled:a})]}),(0,t.jsxs)("label",{className:"flex min-w-0 flex-col gap-1",htmlFor:"checkout-at",children:[(0,t.jsxs)("span",{className:"text-[0.8rem] font-semibold",children:["End time ",(0,t.jsx)("span",{className:"font-normal text-muted",children:"(optional)"})]}),(0,t.jsx)("input",{id:"checkout-at",className:(0,o.get_input_class_name)("compact"),value:g,onChange:e=>x(e.target.value),placeholder:"e.g. now, 30 minutes ago, 5:30pm",disabled:a})]})]}),(0,t.jsxs)("div",{className:`flex flex-wrap items-center gap-2 ${n?"":"pt-1"}`,children:[(0,t.jsx)("button",{type:"submit",className:(0,l.get_button_class_name)("danger-solid"),disabled:a,children:"Confirm check out"}),(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost"),disabled:a,onClick:i,children:"Cancel"})]})]})}function er(){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",role:"presentation","aria-hidden":"true",focusable:"false",children:(0,t.jsx)("path",{d:"M12 3l1.7 4.3L18 9l-4.3 1.7L12 15l-1.7-4.3L6 9l4.3-1.7L12 3zM19 14l.9 2.1L22 17l-2.1.9L19 20l-.9-2.1L16 17l2.1-.9L19 14zM5 15l.9 2.1L8 18l-2.1.9L5 21l-.9-2.1L2 18l2.1-.9L5 15z",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})}var ei=e.i(44356);function el({entry:e,known_tags:n,is_pending:a,on_save:o,on_cancel:_}){let h=(0,s.useMemo)(()=>(0,ei.build_resume_description)(e.description,e.tags),[e.description,e.tags]),[g,x]=(0,s.useState)(h),[f,b]=(0,s.useState)(!1),[y,v]=(0,s.useState)(null),N=(0,s.useSyncExternalStore)(d.entry_suggestion_provider_preference.subscribe,d.entry_suggestion_provider_preference.get_snapshot,d.entry_suggestion_provider_preference.get_server_snapshot),k=(0,s.useSyncExternalStore)(m.openai_api_key_preference.subscribe,m.openai_api_key_preference.get_snapshot,m.openai_api_key_preference.get_server_snapshot),j=(0,s.useSyncExternalStore)(c.claude_api_key_preference.subscribe,c.claude_api_key_preference.get_snapshot,c.claude_api_key_preference.get_server_snapshot),w=(0,s.useSyncExternalStore)(u.google_ai_api_key_preference.subscribe,u.google_ai_api_key_preference.get_snapshot,u.google_ai_api_key_preference.get_server_snapshot),S=(0,i.get_api_key_for_suggestion_provider)(N,{openai:k,claude:j,google_ai:w}),E="none"!==N&&S.trim().length>0;(0,s.useEffect)(()=>{x((0,ei.build_resume_description)(e.description,e.tags))},[e.description,e.id,e.sheetName,e.tags]),(0,X.use_escape_to_cancel)(_);let C=async()=>{if(E){b(!0),v(null);try{let t=e.notes.map(e=>e.text).join("\n"),n=await (0,p.request_ai_entry_description_suggestion)({provider:N,api_key:S,context:g,notes:t});x(n)}catch(e){v(e instanceof Error?e.message:String(e))}finally{b(!1)}}};return(0,t.jsxs)("form",{className:"flex min-w-0 flex-1 flex-col gap-2",onSubmit:e=>{e.preventDefault();let t=g.trim();t===h.trim()?_():o(t)},children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-2 max-[700px]:flex-col",children:[(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(r.TagAutocompleteInput,{id:`active-entry-description-${e.id}`,value:g,known_tags:n,placeholder:"e.g. crafting something @design",disabled:a,autoFocus:!0,on_change:x})}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2 max-[700px]:w-full",children:[E?(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost","small"),disabled:a||f,title:"Revise description with AI","aria-label":"Revise description with AI",onClick:()=>void C(),children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(er,{}),f?"Revising…":"Revise with AI"]})}):null,(0,t.jsx)("button",{type:"submit",className:(0,l.get_button_class_name)("primary","small"),disabled:a||g.trim()===h.trim(),children:"Save"}),(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost","small"),disabled:a,onClick:_,children:"Cancel"})]})]}),null===y?null:(0,t.jsx)("p",{className:"m-0 text-[0.8rem] text-danger",children:y})]})}var eo=e.i(50459);let ec=`${(0,l.get_button_class_name)("danger-solid")} rounded-none first:rounded-l-[0.65rem] last:rounded-r-[0.65rem] not-first:-ml-px not-first:min-w-12 not-first:border-l not-first:border-l-[color-mix(in_srgb,#ffffff_30%,var(--danger-solid))] min-[561px]:px-2.5 min-[561px]:py-2 min-[561px]:text-[0.9rem] max-[560px]:flex-1 max-[560px]:basis-1/2`;function ed({in_bar:e=!1,is_pending:n,on_start_checkout:a}){return(0,t.jsxs)("div",{className:`inline-flex min-w-0 max-w-full ${e?"max-[560px]:w-full":"min-w-30 max-[560px]:w-full"}`,children:[(0,t.jsx)("button",{type:"button",className:ec,disabled:n,onClick:()=>a(),children:"Check out"}),(0,t.jsx)("button",{type:"button",className:ec,disabled:n,title:"Check out at a specific time",onClick:()=>{let e=(0,eo.prompt_check_out_at)();null!==e&&a(e)},children:"@"})]})}var eu=e.i(28098),em=e.i(7568),e_=e.i(4903);function ep({on_submit:e,on_cancel:n,is_pending:a,in_active_panel:r=!1,in_bar:i=!1,allow_at:c=!1}){let[d,u]=(0,s.useState)(""),[m,_]=(0,s.useState)("");return(0,X.use_escape_to_cancel)(()=>n?.(),void 0!==n),(0,t.jsxs)("form",{className:`flex flex-col gap-2 ${r&&!i?"border-t border-accent-border pt-4":i?"border-t border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))] pt-3.5":""}`,onSubmit:t=>{t.preventDefault();let n=d.trim();if(0===n.length)return;let a=m.trim();e(n,a.length>0?a:void 0),u(""),_("")},children:[(0,t.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-text",children:"Add note"}),(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 max-[860px]:grid-cols-1",children:[(0,t.jsx)("input",{id:"note-text",className:(0,o.get_input_class_name)(),value:d,onChange:e=>u(e.target.value),placeholder:"Pair with alice on the widget",disabled:a,autoFocus:!0}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 max-[860px]:w-full",children:[(0,t.jsx)("button",{type:"submit",className:(0,l.get_button_class_name)("ghost"),disabled:a||0===d.trim().length,children:"Save note"}),void 0===n?null:(0,t.jsx)("button",{type:"button",className:(0,l.get_button_class_name)("ghost"),disabled:a,onClick:n,children:"Cancel"})]})]}),c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-at",children:["Note time"," ",(0,t.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,t.jsx)("input",{id:"note-at",className:(0,o.get_input_class_name)(),value:m,onChange:e=>_(e.target.value),placeholder:"e.g. 30 minutes ago",disabled:a})]}):null]})}var eh=e.i(34937),eg=e.i(76379),ex=e.i(7554),ef=e.i(27707);let eb=(0,s.forwardRef)(function({entry:e,sheets:n,known_tags:a,in_bar:r=!1,on_check_out:i,on_delete:o,on_edit:c,on_move:d,on_add_note:u,on_edit_note:m,on_delete_note:_,is_pending:p},h){var g;let x,{confirm:f}=(0,J.use_confirm_dialog)(),b=(0,V.use_confirm_destructive_actions)(),y=(0,eg.use_confirm_before_checkout)(),v=(0,et.use_duration_format)(),N=ea(),[k,j]=(0,s.useState)(e.durationMs),[w,S]=(0,s.useState)(!1),[E,C]=(0,s.useState)(!1),[$,I]=(0,s.useState)(!1),[L,A]=(0,s.useState)(!1),[D,M]=(0,s.useState)(void 0);(0,s.useImperativeHandle)(h,()=>({start_edit:()=>{w||E||L||S(!0)},start_add_note:()=>{w||E||$||L||I(!0)}}),[$,w,E,L]),(0,s.useEffect)(()=>{I(!1),S(!1),C(!1),A(!1),M(void 0)},[e.id,e.sheetName]),(0,s.useEffect)(()=>{j(e.durationMs);let t=globalThis.setInterval(()=>{j(Date.now()-new Date(e.start).getTime())},1e3);return()=>globalThis.clearInterval(t)},[e.durationMs,e.start]);let R=()=>{A(!1),M(void 0)},F=async e=>{(!y||await f((0,ex.get_check_out_confirm_dialog)(e)))&&(i(e),R())},U=(g=w||E||L,x="flex flex-col gap-4 rounded-lg border border-accent-border p-[1.1rem] shadow-sm",r?g?`${x} rounded-md border border-accent-border bg-[color-mix(in_srgb,var(--panel)_70%,var(--background))] p-3.5`:"flex flex-col gap-3 border-0 bg-transparent p-0 shadow-none":`${x} bg-[image:var(--active-panel-bg)]`),q=async(e,t)=>{let n,a;(!b||await f({title:"Delete note?",message:(a=(n=t.trim()).length>80?`${n.slice(0,80)}…`:n).length>0?`Remove this note? "${a}"`:"Remove this note?",confirmLabel:"Delete",variant:"danger"}))&&_(e,t)},P=(0,t.jsx)(eu.EntryActionsMenu,{current_sheet_name:e.sheetName,sheets:n,is_pending:p,on_edit:()=>C(!0),on_show_add_note_form:()=>I(!0),on_move:d,on_delete:async()=>{(!b||await f((0,ef.get_delete_entry_confirm_dialog)(e)))&&o()}});return L?(0,t.jsx)("section",{className:U,"aria-label":"Check out active entry",children:(0,t.jsx)(es,{entry:e,in_bar:r,is_pending:p,initial_at:D,on_cancel:R,on_submit:e=>{F(e)}})}):E?(0,t.jsx)("section",{className:U,children:(0,t.jsx)(em.EntryEditForm,{entry:e,known_tags:a,is_pending:p,in_active_panel:!0,times_only:!0,start_only:!0,on_cancel:()=>C(!1),on_save:e=>{c(e),C(!1)}})}):(0,t.jsxs)("section",{className:U,children:[(0,t.jsxs)("div",{className:"flex min-w-0 shrink-0 items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[r?null:(0,t.jsx)("span",{className:"self-start rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"}),w?(0,t.jsx)(el,{entry:e,known_tags:a,is_pending:p,on_cancel:()=>S(!1),on_save:e=>{c({description:e}),S(!1)}}):(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1",children:[(0,t.jsx)("h2",{className:"m-0 min-w-0 truncate text-[1.12rem] font-[650] leading-tight tracking-tight min-[560px]:text-xl",children:e.description||"Untitled entry"}),(0,t.jsx)("button",{type:"button",className:"inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-[0.35rem] border-0 bg-transparent p-0 text-muted hover:bg-surface-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-55","aria-label":"Edit description",title:"Edit description",disabled:p||$,onClick:()=>S(!0),children:(0,t.jsx)(eh.PencilIcon,{})})]})]}),r?null:(0,t.jsx)("div",{className:"max-[560px]:self-end",children:P})]}),(0,t.jsxs)("div",{className:`flex shrink-0 items-end justify-between gap-4 max-[860px]:flex-col max-[860px]:items-stretch ${r?"px-3":""}`,children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsx)("p",{className:"m-0 whitespace-nowrap font-mono text-[1.65rem] font-medium leading-none tracking-tight text-accent min-[440px]:text-[1.85rem] min-[560px]:text-[2rem]",children:(0,ee.format_duration)(k,v,N)}),w||0===e.tags.length?null:(0,t.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1.5 p-0",children:e.tags.map(e=>(0,t.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,T.format_display_tag)(e)},e))})]}),(0,t.jsxs)("div",{className:`flex min-w-0 shrink-0 flex-wrap items-center justify-end gap-2 max-[560px]:flex-col max-[560px]:items-stretch ${r?"w-full":"min-w-30 max-[860px]:w-full max-[860px]:justify-stretch"}`,children:[$?null:(0,t.jsx)("button",{type:"button",className:`${(0,l.get_button_class_name)("ghost")} min-w-0 min-[561px]:px-2.5 min-[561px]:py-2 min-[561px]:text-[0.9rem] max-[560px]:flex-1`,disabled:p||w,onClick:()=>I(!0),children:"Add note"}),(0,t.jsx)(ed,{in_bar:r,is_pending:p,on_start_checkout:e=>{p||(S(!1),C(!1),I(!1),M(e),A(!0))}})]})]}),(0,t.jsx)(e_.EntryNotesList,{notes:e.notes,variant:"panel",in_bar:r,is_pending:p,on_edit_note:m,on_delete_note:q}),$?(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(ep,{in_active_panel:!0,in_bar:r,allow_at:!0,is_pending:p,on_cancel:()=>I(!1),on_submit:(e,t)=>{u(e,t),I(!1)}})}):null]})});var ey=e.i(15526);let ev=(0,s.forwardRef)(function({active_entry:e,sheets:n,known_tags:a,is_pending:r,on_check_out:i,on_delete:l,on_edit:o,on_move:c,on_add_note:d,on_edit_note:u,on_delete_note:m},_){let{confirm:p}=(0,J.use_confirm_dialog)(),h=(0,V.use_confirm_destructive_actions)(),g=(0,s.useRef)(null);return((0,s.useImperativeHandle)(_,()=>({start_edit:()=>{g.current?.start_edit()},start_add_note:()=>{g.current?.start_add_note()}})),null===e)?null:(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,t.jsxs)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted whitespace-nowrap truncate",children:["Sheet ",e.sheetName]}),(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"}),(0,ey.is_pomodoro_task_entry)(e)?(0,t.jsx)("span",{className:"shrink-0 rounded-full border border-panel-border bg-surface-raised px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-foreground",children:"Pomodoro"}):null,(0,t.jsx)("div",{className:"ml-auto",children:(0,t.jsx)(eu.EntryActionsMenu,{current_sheet_name:e.sheetName,sheets:n,is_pending:r,on_edit:()=>g.current?.start_edit(),on_show_add_note_form:()=>g.current?.start_add_note(),on_move:c,on_delete:async()=>{(!h||await p((0,ef.get_delete_entry_confirm_dialog)(e)))&&l()}})})]}),(0,t.jsx)(eb,{ref:g,entry:e,sheets:n,known_tags:a,in_bar:!0,is_pending:r,on_check_out:i,on_delete:l,on_edit:o,on_move:c,on_add_note:d,on_edit_note:u,on_delete_note:m},`${e.sheetName}-${e.id}`)]})});var eN=e.i(16967);let ek="super-time-tracker";function ej({active_entry:e}){let t="true"===(0,s.useSyncExternalStore)(eN.timer_in_title_preference.subscribe,eN.timer_in_title_preference.get_snapshot,eN.timer_in_title_preference.get_server_snapshot),n=(0,et.use_duration_format)(),a=ea(),[r,i]=(0,s.useState)(e?.durationMs??0);return(0,s.useEffect)(()=>{if(null===e)return void i(0);i(e.durationMs);let t=window.setInterval(()=>{i(Date.now()-new Date(e.start).getTime())},1e3);return()=>window.clearInterval(t)},[e]),(0,s.useEffect)(()=>{if(!t||null===e){document.title=ek;return}let s=e.description.trim()||"Tracking",i=(0,ee.format_duration)(r,n,a);return document.title=`${i} — ${s}`,()=>{document.title=ek}},[e,n,r,a,t]),null}var ew=e.i(75404),eS=e.i(36178),eE=e.i(68713);function eC(e){return`${e.sheetName}:${e.id}`}var eT=e.i(67999),e$=e.i(85323);async function eI(){let e=await fetch("/api/state",{cache:"no-store"});if(!e.ok)throw Error((await e.json()).error??"Failed to load tracker state");return await e.json()}var eL=e.i(76709),eA=e.i(3159),eD=e.i(72162),eM=e.i(51229),eR=e.i(17003);function eF(e){let t=e.activeSheetName;null!==t&&(0,eR.write_active_sheet_preference)(t)}var eU=e.i(65742),eq=e.i(48541),eP=e.i(20397);let eO=(0,n.default)(()=>e.A(6838).then(e=>({default:e.EntryList})),{loadableGenerated:{modules:[19550]},loading:()=>(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"Loading entry list…"})}),ez=(0,n.default)(()=>e.A(72432).then(e=>({default:e.FocusGoalsNudgesBanner})),{loadableGenerated:{modules:[11791]}});e.s(["TrackerApp",0,function({initial_state:e}){let[n,r]=(0,s.useState)(e),[i,o]=(0,s.useState)(null),[c,d]=(0,s.useState)(!1),[u,m]=(0,s.useState)(!1),[_,p]=(0,s.useState)(!1===e.activeSheetEntriesLoaded),[h,g]=(0,s.useState)(""),x=(0,s.useRef)(e);(0,s.useEffect)(()=>{eF(e)},[e]),(0,s.useEffect)(()=>{(0,eD.publish_tracker_running_entry)(n.runningEntry)},[n.runningEntry]),(0,s.useEffect)(()=>{!1===e.activeSheetEntriesLoaded&&eI().then(e=>{eF(e),r(e)}).catch(()=>{}).finally(()=>{p(!1)})},[e.activeSheetEntriesLoaded]);let y=async e=>{d(!0),o(null);try{let t=await e(),a=null!==n.activeEntry&&null===t.activeEntry,s=n.runningEntry,i=t.runningEntry;if(eF(t),r(t),a&&(0,eE.finish_running_pomodoro_timer)(),!j)return;if(null===s&&null!==i)return void(0,e$.notify_desktop)({title:"Tracking started",body:`${i.description||"Untitled entry"} (${i.sheetName})`,tag:"tracker-running-entry"});if(null!==s&&null===i)return void(0,e$.notify_desktop)({title:"Tracking stopped",body:`${s.description||"Untitled entry"} (${s.sheetName})`,tag:"tracker-running-entry"});null!==s&&null!==i&&eC(s)!==eC(i)&&(0,e$.notify_desktop)({title:"Tracking switched",body:`${i.description||"Untitled entry"} (${i.sheetName})`,tag:"tracker-running-entry"})}catch(e){o(e instanceof Error?e.message:String(e))}finally{d(!1)}},v=n.activeSheetName??n.sheets.find(e=>e.isActive)?.name??"main",N=z(),k=(0,eP.use_entry_list_sort)(),j="true"===(0,s.useSyncExternalStore)(eq.desktop_notifications_preference.subscribe,eq.desktop_notifications_preference.get_snapshot,eq.desktop_notifications_preference.get_server_snapshot),w="true"===(0,s.useSyncExternalStore)(eU.clear_tag_filters_on_sheet_change_preference.subscribe,eU.clear_tag_filters_on_sheet_change_preference.get_snapshot,eU.clear_tag_filters_on_sheet_change_preference.get_server_snapshot),S=(0,s.useRef)(null),E=(0,s.useRef)(null),T=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!w||null===S.current||S.current===v){S.current=v;return}q(v,[]),S.current=v},[v,w]),(0,s.useEffect)(()=>{g("")},[v]);let I=(0,s.useSyncExternalStore)(F.subscribe_sheet_tag_filters,()=>M(v),R),L=(0,s.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=new Set;for(let a of n.tags)try{let n=(0,$.normalize_stored_tag)(a);if(e.has(n))continue;e.add(n),t.set(n,(t.get(n)??0)+1)}catch{continue}}return[...t.entries()].map(([e,t])=>({name:e,entryCount:t})).sort((e,t)=>e.name.localeCompare(t.name))})(n.activeSheetEntries),[n.activeSheetEntries]),A=(0,s.useMemo)(()=>{var e;let t;if(u||_)return[];let a=[...(e=function(e,t,n="all"){return 0===t.length?e:e.filter(e=>(function(e,t,n="all"){return 0===t.length||("any"===n?t.some(t=>e.tags.some(e=>(0,P.tags_are_equal)(e,t))):t.every(t=>e.tags.some(e=>(0,P.tags_are_equal)(e,t))))})(e,t,n))}(n.activeSheetEntries,I,N),0===(t=h.trim()).length?e:e.filter(e=>(function(e,t){let n=t.trim().toLowerCase();if(0===n.length)return{matches:!0,noteSnippet:null};let a=e.description.toLowerCase().includes(n),s=e.sheetName.toLowerCase().includes(n),r=e.tags.some(e=>e.toLowerCase().includes(n));if(a||s||r)return{matches:!0,noteSnippet:null};for(let t of e.noteTexts)if(t.toLowerCase().includes(n))return{matches:!0,noteSnippet:function(e,t){let n=e.toLowerCase().indexOf(t);if(n<0)return e.slice(0,120);let a=Math.max(0,n-40),s=Math.min(e.length,n+t.length+40),r=a>0?"…":"",i=s<e.length?"…":"";return`${r}${e.slice(a,s)}${i}`}(t,n)};return{matches:!1,noteSnippet:null}})({sheetName:e.sheetName,description:e.description,tags:e.tags,noteTexts:e.notes.map(e=>e.text)},t).matches))];switch(k){case"oldest":return a.sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime());case"duration":return a.sort((e,t)=>t.durationMs-e.durationMs);case"description":return a.sort((e,t)=>{let n=e.description.trim()||"Untitled entry",a=t.description.trim()||"Untitled entry";return n.localeCompare(a)});default:return a.sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime())}},[n.activeSheetEntries,I,N,k,h,u,_]),D=(0,s.useMemo)(()=>(0,eT.get_serialized_entries_total_ms)(A),[A]);(0,s.useEffect)(()=>(0,eL.subscribe_tracker_state_sync)(()=>{c||u||eI().then(e=>{eF(e),r(e)}).catch(()=>{})}),[c,u]);let U=u||_?`Loading entries for "${v}"…`:h.trim().length>0?I.length>0?`No entries on sheet "${v}" match your search and selected tags.`:`No entries on sheet "${v}" match your search.`:I.length>0?"any"===N?`No entries on sheet "${v}" match any selected tag.`:`No entries on sheet "${v}" match all selected tags.`:`No entries on sheet "${v}".`,O=e=>{let t;if(e===v&&!u)return;x.current=n;let a=(t=n.runningEntries.find(t=>t.sheetName===e)??null,{...n,activeSheetName:e,sheets:n.sheets.map(t=>({...t,isActive:t.name===e})),activeEntry:t,activeSheetEntries:n.activeSheetEntries,activeSheetTotalMs:n.activeSheetTotalMs});eF(a),r(a),m(!0),o(null),(0,eM.post_tracker_action)("/api/sheet",{name:e}).then(e=>{eF(e),r(e)}).catch(e=>{o(e instanceof Error?e.message:String(e)),r(x.current)}).finally(()=>{m(!1)})},H=(e,t,n)=>(0,eA.patch_tracker_action)("/api/entry",{sheetName:e,entryId:t,...n});return(0,t.jsxs)(b.ConfirmDialogProvider,{children:[(0,t.jsx)(ej,{active_entry:n.activeEntry}),(0,t.jsx)(C,{sheets:n.sheets,active_sheet_name:v,active_entry:n.activeEntry,is_pending:c,check_in_form_ref:E,active_entry_panel_ref:T,on_select_sheet:O,on_check_out:e=>y(()=>(0,eM.post_tracker_action)("/api/out",(0,eS.build_check_out_request_payload)(v,e)))}),(0,t.jsx)("div",{className:"relative z-1",children:(0,t.jsx)(ew.TrackerTopbar,{})}),(0,t.jsxs)("div",{className:"mx-auto max-w-[1120px] px-4 pb-10 pt-4 sm:px-5 sm:pt-5",children:[null!==i?(0,t.jsx)("p",{className:"mb-4 border border-danger-border bg-danger-soft px-3 py-2.5 text-danger-text",children:i}):null,(0,t.jsx)(ez,{has_running_timer:null!==n.runningEntry,initial_focus_nudges_status:n.focusNudgesStatusGlobal,on_check_in_shortcut:()=>{E.current?.expand_and_focus()}}),(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(14rem,18rem)_minmax(0,1fr)] items-stretch border border-panel-border bg-panel shadow-sm max-[960px]:grid-cols-1",children:[(0,t.jsx)("div",{className:"flex min-h-0 min-w-0 flex-col border-r border-panel-border p-4 max-[860px]:border-r-0 max-[860px]:border-b",children:(0,t.jsx)(Z,{sheets:n.sheets,db_path:n.dbPath,is_pending:c,on_select:O,on_create:e=>y(()=>(0,eM.post_tracker_action)("/api/sheet",{name:e})),on_rename:(e,t)=>y(()=>(0,eA.patch_tracker_action)("/api/sheet",{name:e,newName:t})),on_delete:e=>y(()=>(0,eM.post_tracker_action)("/api/sheet",{name:e,delete:!0}))})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,t.jsxs)("section",{className:"flex min-w-0 flex-col gap-4 border-b border-panel-border border-l-4 border-l-accent p-4",children:[null===n.activeEntry?(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-panel-border bg-background px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Quick action"}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.9rem] font-medium",children:"Jump into Pomodoro without leaving the tracker."})]}),(0,t.jsxs)(a.default,{href:"/pomodoro",className:`${(0,l.get_button_class_name)("primary")} inline-flex min-w-40 flex-col items-center justify-center whitespace-nowrap text-center`,"aria-label":"Open Pomodoro timer",children:[(0,t.jsx)("span",{className:"text-white text-[0.9rem] leading-none",children:"Start Pomodoro"}),(0,t.jsx)("span",{className:"text-white mt-1 text-[0.72rem] font-medium leading-none opacity-85",children:"Focus timer"})]})]}):null,(0,t.jsx)(ev,{ref:T,active_entry:n.activeEntry,sheets:n.sheets,known_tags:n.knownTags,is_pending:c,on_check_out:e=>y(()=>(0,eM.post_tracker_action)("/api/out",(0,eS.build_check_out_request_payload)(v,e))),on_delete:()=>y(()=>(0,eM.post_tracker_action)("/api/entry",{sheetName:v,entryId:n.activeEntry?.id})),on_edit:e=>y(()=>H(v,n.activeEntry?.id??0,e)),on_move:e=>y(()=>(0,eM.post_tracker_action)("/api/entry/move",{sheetName:v,entryId:n.activeEntry?.id,targetSheetName:e})),on_add_note:(e,t)=>y(()=>(0,eM.post_tracker_action)("/api/note",{text:e,...void 0!==t?{at:t}:{},sheetName:v,entryId:n.activeEntry?.id})),on_edit_note:(e,t,a)=>y(()=>(0,eA.patch_tracker_action)("/api/note",{sheetName:v,entryId:n.activeEntry?.id,timestamp:e,originalText:t,text:a})),on_delete_note:(e,t)=>y(()=>(0,eM.post_tracker_action)("/api/note/delete",{sheetName:v,entryId:n.activeEntry?.id,timestamp:e,noteText:t}))}),null===n.activeEntry?(0,t.jsx)(f,{ref:E,known_tags:n.knownTags,is_pending:c,trailing:(0,t.jsx)("p",{className:"m-0 text-[0.85rem] leading-tight text-muted",children:"Not tracking"}),on_submit:e=>y(()=>(0,eM.post_tracker_action)("/api/in",{...e,sheetName:v}))}):null]}),(0,t.jsx)("section",{className:"flex min-w-0 flex-col gap-4 p-4",children:(0,t.jsx)(eO,{title:"Entries",entries:A,merge_context_entries:n.activeSheetEntries,sheets:n.sheets,known_tags:n.knownTags,total_ms:D,empty_message:U,is_pending:c,show_sheet_name:!1,header_extra:(0,t.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,t.jsx)(K,{query:h,active_sheet:v,is_pending:c,on_query_change:g}),(0,t.jsx)(G,{sheet_name:v,sheet_tags:L})]}),on_delete:e=>y(()=>(0,eM.post_tracker_action)("/api/entry",{sheetName:e.sheetName,entryId:e.id})),on_edit:(e,t)=>y(()=>H(e.sheetName,e.id,t)),on_move:(e,t)=>y(()=>(0,eM.post_tracker_action)("/api/entry/move",{sheetName:e.sheetName,entryId:e.id,targetSheetName:t})),on_move_many:(e,t)=>y(()=>(0,eM.post_tracker_action)("/api/entry/move-bulk",{entries:e.map(e=>({sheetName:e.sheetName,entryId:e.id})),targetSheetName:t})),on_delete_many:e=>y(()=>(0,eM.post_tracker_action)("/api/entry/delete-bulk",{entries:e.map(e=>({sheetName:e.sheetName,entryId:e.id}))})),on_edit_note:(e,t,n,a)=>y(()=>(0,eA.patch_tracker_action)("/api/note",{sheetName:e.sheetName,entryId:e.id,timestamp:t,originalText:n,text:a})),on_add_note:(e,t)=>y(()=>(0,eM.post_tracker_action)("/api/note",{sheetName:e.sheetName,entryId:e.id,text:t})),on_resume:e=>y(()=>(0,eM.post_tracker_action)("/api/in",{description:(0,ei.build_resume_description)(e.description,e.tags),sheetName:e.sheetName})),on_split:(e,t)=>y(()=>(0,eM.post_tracker_action)("/api/entry/split",{sheetName:e.sheetName,entryId:e.id,at:t})),on_merge:(e,t)=>y(()=>(0,eM.post_tracker_action)("/api/entry/merge",{sheetName:e.sheetName,entryId:e.id,direction:t}))})})]})]})]})]})}],22482)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let a=e.r(44066)._(e.r(78677)),l=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",n=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(a.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||l.test(s))&&!1!==c?(c="//"+(c||""),n&&"/"!==n[0]&&(n="/"+n)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),n=n.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${s}${c}${n}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return n}});let s=e.r(29158);function n(e,t){let r=(0,s.useRef)(null),n=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(r.current=a(e,s)),t&&(n.current=a(t,s))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let s=e.r(31047),n=e.r(63334);function a(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,n.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return g},useLinkStatus:function(){return b}};for(var n in s)Object.defineProperty(r,n,{enumerable:!0,get:s[n]});let a=e.r(44066),l=e.r(54710),o=a._(e.r(29158)),i=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),p=e.r(20321);e.r(90503);let f=e.r(38520),_=e.r(19947),h=e.r(59246),m=e.r(99046);function g(t){var r,s;let n,a,g,[b,y]=(0,o.useOptimistic)(_.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:j,as:k,children:w,prefetch:N=null,passHref:S,replace:E,shallow:O,scroll:A,onClick:C,onMouseEnter:T,onTouchStart:L,legacyBehavior:P=!1,onNavigate:R,transitionTypes:U,ref:F,unstable_dynamicOnHover:G,...M}=t;n=w,P&&("string"==typeof n||"number"==typeof n)&&(n=(0,l.jsx)("a",{children:n}));let D=o.default.useContext(c.AppRouterContext),I=!1!==N,W=!1!==N?null===(s=N)||"auto"===s?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,$="string"==typeof(r=k||j)?r:(0,i.formatUrl)(r);if(P){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(n)}let K=P?a&&"object"==typeof a&&a.ref:F,B=o.default.useCallback(e=>(null!==D&&(v.current=(0,_.mountLinkInstance)(e,$,D,W,I,y)),()=>{v.current&&((0,_.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,_.unmountPrefetchableInstance)(e)}),[I,$,D,W,y]),Y={ref:(0,u.useMergedRef)(B,K),onClick(t){P||"function"!=typeof C||C(t),P&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!D||t.defaultPrevented||function(t,r,s,n,a,l,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){n&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);o.default.startTransition(()=>{d(r,n?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,s.current,i)})}}(t,$,v,E,A,R,U)},onMouseEnter(e){P||"function"!=typeof T||T(e),P&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),D&&I&&(0,_.onNavigationIntent)(e.currentTarget,!0===G)},onTouchStart:function(e){P||"function"!=typeof L||L(e),P&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),D&&I&&(0,_.onNavigationIntent)(e.currentTarget,!0===G)}};return(0,d.isAbsoluteUrl)($)?Y.href=$:P&&!S&&("a"!==a.type||"href"in a.props)||(Y.href=(0,p.addBasePath)($)),g=P?o.default.cloneElement(a,Y):(0,l.jsx)("a",{...M,...Y,children:n}),(0,l.jsx)(x.Provider,{value:b,children:g})}e.r(10364);let x=(0,o.createContext)(_.IDLE_LINK_STATUS),b=()=>(0,o.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},37399,25204,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}],37399);var r=e.i(29158),s=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,t=!0){let n=(0,r.useRef)(e);n.current=e,(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||(0,s.is_modal_dialog_open)()||(e.preventDefault(),n.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t])}],25204)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),s=e.i(83105),n=e.i(32417),a=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[l,o]=(0,r.useState)(null),[i,c]=(0,r.useState)(!1),u=(0,n.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,s.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{o(e?.user.email??null)}).catch(()=>{o(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{o(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:l,is_pending:i,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,s.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",s=t.trim();return 0===s.length||"/"===s?r:`${r}?next=${encodeURIComponent(s)}`}])},75404,73205,e=>{"use strict";var t=e.i(54710),r=e.i(45958),s=e.i(71060);let n=[{href:"/",label:"Tracker",match:e=>"/"===e}];function a(){let e=(0,s.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:n.map(s=>{let n=s.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${n?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:s.href,"aria-current":n?"page":void 0,children:s.label},s.href)})})}function l(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}var o=e.i(77882);function i(){let{email:e,is_configured:r}=(0,o.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(l,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}var c=e.i(29158),u=e.i(37399),d=e.i(90463),p=e.i(46549),f=e.i(22373);let _=new Set(f.topbar_quick_action_ids),h=["today","search","reporting","pomodoro"];function m(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return h;let r=t.filter(e=>"string"==typeof e&&_.has(e));return Array.from(new Set(r))}catch{return h}}e.s(["parse_topbar_quick_actions",0,m],73205);var g=e.i(66295),x=e.i(34869),b=e.i(92629);let y=(0,x.create_ui_preference_store)({storage_key:b.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:b.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});var v=e.i(32792),j=e.i(90299),k=e.i(28274);function w(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function N(){return w()}function S(){return"dark"}var E=e.i(35434),O=e.i(17798),A=e.i(10464),C=e.i(61834),T=e.i(81553),L=e.i(25204);let P="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",R={today:{href:"/today",label:"Today"},search:{href:"/search",label:"Search"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},U=new Set(["manage-tags","pomodoro","sync-settings"]);function F(){let e=(0,s.useRouter)(),n=(0,s.usePathname)()??"/",a=(0,c.useSyncExternalStore)(E.subscribe_theme,N,S),l=(0,c.useSyncExternalStore)(y.subscribe,y.get_snapshot,y.get_server_snapshot),i=(0,c.useSyncExternalStore)(j.tracker_shortcut_map_preference.subscribe,j.tracker_shortcut_map_preference.get_snapshot,j.tracker_shortcut_map_preference.get_server_snapshot),_=(0,c.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),h=(0,g.parse_tracker_shortcut_map)(i),x=new Set(m(_)),b=f.topbar_quick_action_ids.filter(e=>!x.has(e)),F=Array.from(new Set([...Array.from(U),...b])),{email:G,is_configured:M,is_pending:D,sign_out:I}=(0,o.use_supabase_auth_session)(),[W,$]=(0,c.useState)(!1),K=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!W)return;let e=e=>{null===K.current||K.current.contains(e.target)||$(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[W]);let B=()=>{$(!1)};return(0,L.use_escape_to_cancel)(B,W),(0,t.jsxs)("div",{className:"relative shrink-0",ref:K,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":W,"aria-haspopup":"menu",onClick:()=>$(e=>!e),children:(0,t.jsx)(u.HamburgerIcon,{})}),W?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[M&&null!==G?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:G,children:G})}):null,F.map(e=>{let s=R[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:s.href,className:P,role:"menuitem",onClick:B,children:s.label})},e)}),M?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:P,role:"menuitemcheckbox","aria-checked":"true"===l,onClick:()=>{let e="true"===l?"false":"true";y.write(e),y.notify(),(0,p.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==G&&(0,k.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===l?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===l?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:P,role:"menuitem",onClick:()=>{let e;B(),e="dark"===w()?"light":"dark",(0,O.apply_theme)(e),(0,T.write_stored_theme)(e),A.theme_mode_preference.write(e),(0,C.write_document_preference_cookies)({theme_mode:e,theme:e}),A.theme_mode_preference.notify(),(0,E.notify_theme_subscribers)(),(0,p.notify_settings_saved)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===a?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===a?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:P,role:"menuitem",onClick:()=>{let e;B(),e=h.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),M?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===G?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:P,role:"menuitem",onClick:()=>{B(),e.push((0,d.build_auth_page_href)("sign_in",n))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${P} text-danger`,role:"menuitem",disabled:D,onClick:()=>{B(),I()},children:D?"Signing out…":"Sign out"})})]}):null]}):null]})}let G=[{id:"today",href:"/today",label:"Today"},{id:"search",href:"/search",label:"Search"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];function M(){let e=(0,s.usePathname)()??"/",n=(0,c.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),a=(0,c.useMemo)(()=>m(n),[n]);if(0===a.length)return null;let l=G.filter(e=>a.includes(e.id));return 0===l.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:l.map(s=>{let n=e.startsWith(s.href);return(0,t.jsx)(r.default,{href:s.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${n?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":n?"page":void 0,children:s.label},s.id)})})}var D=e.i(29539);function I(){let e=((0,s.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(r.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(D.SettingsIcon,{})})}function W({current:e,parent:s}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==s.href?(0,t.jsx)(r.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:s.href,children:s.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:s.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(W,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(a,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(M,{}),(0,t.jsx)(i,{}),(0,t.jsx)(I,{}),(0,t.jsx)(F,{})]})]})]})})}],75404)},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),s=e.i(71060);let n=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,s.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:n.map(s=>{let n=s.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:s.href,"aria-current":n?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${n?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:s.label})},s.href)})})})}])},7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},83821,60145,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let s=(0,t.create_ui_preference_store)({storage_key:r.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=30&&t<=720}});e.s(["daily_focus_target_minutes_preference",0,s],83821);let n=(0,t.create_ui_preference_store)({storage_key:r.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=60&&t<=4200}});e.s(["weekly_focus_target_minutes_preference",0,n],60145)},1238,51703,74597,77130,56442,73228,e=>{"use strict";e.s(["parse_focus_goals_by_name",0,function(e){if(0===e.length)return{};try{let t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))return{};let r={};for(let[e,s]of Object.entries(t)){if(null===s||"object"!=typeof s)continue;let t={};"string"==typeof s.daily&&s.daily.length>0&&(t.daily=s.daily),"string"==typeof s.weekly&&s.weekly.length>0&&(t.weekly=s.weekly),(void 0!==t.daily||void 0!==t.weekly)&&(r[e]=t)}return r}catch{return{}}}],1238);var t=e.i(34869),r=e.i(92629);let s=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SCOPE_STORAGE_KEY,default_value:r.FOCUS_GOAL_SCOPE_DEFAULT,is_valid:e=>"global"===e||"sheet"===e||"tag"===e});e.s(["focus_goal_scope_preference",0,s],51703);let n=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SHEET_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_SHEET_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_sheet_name_preference",0,n],74597);let a=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_TAG_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_TAG_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_tag_name_preference",0,a],77130);let l=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_SHEET_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_SHEET_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_sheet_preference",0,l],56442);let o=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_TAG_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_TAG_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_tag_preference",0,o],73228)},34032,e=>{"use strict";var t=e.i(54710),r=e.i(29158),s=e.i(1238);function n(e,t,r,n){if(0===t.length)return e;let a=(0,s.parse_focus_goals_by_name)(e),l=a[t]??{};if(0===n.length){let e={...l};delete e[r],void 0===e.daily&&void 0===e.weekly?delete a[t]:a[t]=e}else a[t]={...l,[r]:n};return JSON.stringify(a)}var a=e.i(83821),l=e.i(51703),o=e.i(74597),i=e.i(77130),c=e.i(56442),u=e.i(73228),d=e.i(56996),p=e.i(8654),f=e.i(76900),_=e.i(80808),h=e.i(71122),m=e.i(60145),g=e.i(7902);let x=[120,180,240,300,360,420,480],b=[600,900,1200,1500,1800,2100,2400],y=[15,30,45,60,90,120],v=[6,8,10,12,14],j=[{value:"global",label:"Global"},{value:"sheet",label:"Per-sheet"},{value:"tag",label:"Per-tag"}];function k({disabled:e,daily_target_minutes:r,weekly_target_minutes:s}){return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Global targets"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Daily target"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:r,disabled:e,onChange:e=>(0,g.persist_ui_preference)(a.daily_focus_target_minutes_preference,e.target.value),children:x.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Weekly target"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:s,disabled:e,onChange:e=>(0,g.persist_ui_preference)(m.weekly_focus_target_minutes_preference,e.target.value),children:b.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))})]})]})]})}function w({kind:e,names:r,disabled:s,active_name:a,map:l,json:d}){let p="sheet"===e?"Per-sheet targets":"Per-tag targets";if(0===r.length)return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:p}),(0,t.jsx)("p",{className:"m-0 text-[0.85rem] text-muted",children:"sheet"===e?"Create a sheet to configure per-sheet goals.":"Add a tag to a time entry to configure per-tag goals."})]});let f=`focus-goal-active-${e}`;return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:p}),(0,t.jsxs)("span",{className:"text-[0.75rem] text-muted",children:["Pick the ",e," shown in the focus banner."]})]}),(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-1.5 p-0",children:r.map(r=>{let p=l[r]??{},_=p.daily??"",h=p.weekly??"",m=a===r;return(0,t.jsxs)("li",{className:`grid items-center gap-2 rounded-md border bg-panel px-3 py-2.5 transition-colors md:grid-cols-[auto_minmax(0,1fr)_minmax(0,11rem)_minmax(0,11rem)] grid-cols-[auto_minmax(0,1fr)] ${m?"border-accent-border bg-accent-soft":"border-panel-border"}`,children:[(0,t.jsx)("label",{className:"flex shrink-0 cursor-pointer items-center justify-center","aria-label":`Show ${r} in focus banner`,children:(0,t.jsx)("input",{type:"radio",name:f,className:"cursor-pointer",checked:m,disabled:s,onChange:()=>(0,g.persist_ui_preference)("sheet"===e?o.focus_goal_sheet_name_preference:i.focus_goal_tag_name_preference,r)})}),(0,t.jsx)("span",{className:"truncate text-[0.9rem] font-medium",title:r,children:"tag"!==e||r.startsWith("@")?r:`@${r}`}),(0,t.jsxs)("label",{className:"flex items-center gap-2 md:col-start-3",children:[(0,t.jsx)("span",{className:"text-[0.75rem] text-muted",children:"Daily"}),(0,t.jsxs)("select",{className:"flex-1 rounded-md border border-panel-border bg-panel px-2 py-1.5 text-[0.85rem]",value:_,disabled:s,onChange:t=>(0,g.persist_ui_preference)("sheet"===e?c.focus_goals_per_sheet_preference:u.focus_goals_per_tag_preference,n(d,r,"daily",t.target.value)),children:[(0,t.jsx)("option",{value:"",children:"Not set"}),x.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))]})]}),(0,t.jsxs)("label",{className:"flex items-center gap-2 md:col-start-4",children:[(0,t.jsx)("span",{className:"text-[0.75rem] text-muted",children:"Weekly"}),(0,t.jsxs)("select",{className:"flex-1 rounded-md border border-panel-border bg-panel px-2 py-1.5 text-[0.85rem]",value:h,disabled:s,onChange:t=>(0,g.persist_ui_preference)("sheet"===e?c.focus_goals_per_sheet_preference:u.focus_goals_per_tag_preference,n(d,r,"weekly",t.target.value)),children:[(0,t.jsx)("option",{value:"",children:"Not set"}),b.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))]})]})]},r)})})]})}e.s(["FocusGoalsNudgesSetting",0,function({sheet_names:e,tag_names:n}){let x=(0,r.useSyncExternalStore)(d.focus_nudges_enabled_preference.subscribe,d.focus_nudges_enabled_preference.get_snapshot,d.focus_nudges_enabled_preference.get_server_snapshot),b=(0,r.useSyncExternalStore)(a.daily_focus_target_minutes_preference.subscribe,a.daily_focus_target_minutes_preference.get_snapshot,a.daily_focus_target_minutes_preference.get_server_snapshot),N=(0,r.useSyncExternalStore)(m.weekly_focus_target_minutes_preference.subscribe,m.weekly_focus_target_minutes_preference.get_snapshot,m.weekly_focus_target_minutes_preference.get_server_snapshot),S=(0,r.useSyncExternalStore)(p.no_log_reminder_minutes_preference.subscribe,p.no_log_reminder_minutes_preference.get_snapshot,p.no_log_reminder_minutes_preference.get_server_snapshot),E=(0,r.useSyncExternalStore)(f.overwork_alert_hours_preference.subscribe,f.overwork_alert_hours_preference.get_snapshot,f.overwork_alert_hours_preference.get_server_snapshot),O=(0,r.useSyncExternalStore)(h.work_hours_start_preference.subscribe,h.work_hours_start_preference.get_snapshot,h.work_hours_start_preference.get_server_snapshot),A=(0,r.useSyncExternalStore)(_.work_hours_end_preference.subscribe,_.work_hours_end_preference.get_snapshot,_.work_hours_end_preference.get_server_snapshot),C=(0,r.useSyncExternalStore)(l.focus_goal_scope_preference.subscribe,l.focus_goal_scope_preference.get_snapshot,l.focus_goal_scope_preference.get_server_snapshot),T=(0,r.useSyncExternalStore)(o.focus_goal_sheet_name_preference.subscribe,o.focus_goal_sheet_name_preference.get_snapshot,o.focus_goal_sheet_name_preference.get_server_snapshot),L=(0,r.useSyncExternalStore)(i.focus_goal_tag_name_preference.subscribe,i.focus_goal_tag_name_preference.get_snapshot,i.focus_goal_tag_name_preference.get_server_snapshot),P=(0,r.useSyncExternalStore)(c.focus_goals_per_sheet_preference.subscribe,c.focus_goals_per_sheet_preference.get_snapshot,c.focus_goals_per_sheet_preference.get_server_snapshot),R=(0,r.useSyncExternalStore)(u.focus_goals_per_tag_preference.subscribe,u.focus_goals_per_tag_preference.get_snapshot,u.focus_goals_per_tag_preference.get_server_snapshot),U=(0,s.parse_focus_goals_by_name)(P),F=(0,s.parse_focus_goals_by_name)(R);(0,r.useEffect)(()=>{"sheet"===C&&0===T.length&&e.length>0&&(0,g.persist_ui_preference)(o.focus_goal_sheet_name_preference,e[0])},[C,T,e]),(0,r.useEffect)(()=>{"tag"===C&&0===L.length&&n.length>0&&(0,g.persist_ui_preference)(i.focus_goal_tag_name_preference,n[0])},[C,L,n]);let G="true"!==x;return(0,t.jsxs)("div",{id:"focus-goals-nudges",className:"flex w-full flex-col gap-4",children:[(0,t.jsxs)("label",{"aria-label":"Focus goals and nudges",className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===x,onChange:e=>(0,g.persist_ui_preference)(d.focus_nudges_enabled_preference,e.target.checked?"true":"false")}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Goals + nudges"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Track daily/weekly focus goals, overwork alerts, and no-log reminders."})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Focus goal scope"}),(0,t.jsx)("div",{role:"radiogroup","aria-label":"Focus goal scope",className:"inline-flex w-full flex-wrap gap-1 rounded-md border border-panel-border bg-panel p-0.5",children:j.map(e=>{let r=C===e.value;return(0,t.jsx)("button",{type:"button",role:"radio","aria-checked":r,disabled:G,className:`flex-1 min-w-24 cursor-pointer rounded px-3 py-1.5 text-[0.85rem] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-55 ${r?"bg-accent-soft text-foreground":"bg-transparent text-muted hover:bg-surface-hover hover:text-foreground"}`,onClick:()=>(0,g.persist_ui_preference)(l.focus_goal_scope_preference,e.value),children:e.label},e.value)})})]}),"global"===C?(0,t.jsx)(k,{disabled:G,daily_target_minutes:b,weekly_target_minutes:N}):null,"sheet"===C?(0,t.jsx)(w,{kind:"sheet",names:e,disabled:G,active_name:T,map:U,json:P}):null,"tag"===C?(0,t.jsx)(w,{kind:"tag",names:n,disabled:G,active_name:L,map:F,json:R}):null,(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Behavior nudges"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Work hours start"}),(0,t.jsx)("input",{type:"time",className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:O,disabled:G,onChange:e=>(0,g.persist_ui_preference)(h.work_hours_start_preference,e.target.value)})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Work hours end"}),(0,t.jsx)("input",{type:"time",className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:A,disabled:G,onChange:e=>(0,g.persist_ui_preference)(_.work_hours_end_preference,e.target.value)})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"No-log reminder"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:S,disabled:G,onChange:e=>(0,g.persist_ui_preference)(p.no_log_reminder_minutes_preference,e.target.value),children:y.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," min"]},e))})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:"Overwork alert"}),(0,t.jsx)("select",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-2 text-[0.85rem]",value:E,disabled:G,onChange:e=>(0,g.persist_ui_preference)(f.overwork_alert_hours_preference,e.target.value),children:v.map(e=>(0,t.jsxs)("option",{value:String(e),children:[e," hours"]},e))})]})]}),(0,t.jsx)("p",{className:"m-0 text-[0.78rem] leading-snug text-muted",children:"Rule reminders: notify when no active timer during work hours, and alert when an active timer runs longer than the overwork threshold."})]})]})}],34032)}]);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,82276,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={WarningIcon:function(){return d},errorStyles:function(){return l},errorThemeCss:function(){return a}};for(var n in o)Object.defineProperty(t,n,{enumerable:!0,get:o[n]});e.r(81258);let i=e.r(54710);e.r(29158);let l={container:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",display:"flex",alignItems:"center",justifyContent:"center"},card:{marginTop:"-32px",maxWidth:"325px",padding:"32px 28px",textAlign:"left"},icon:{marginBottom:"24px"},title:{fontSize:"24px",fontWeight:500,letterSpacing:"-0.02em",lineHeight:"32px",margin:"0 0 12px 0",color:"var(--next-error-title)"},message:{fontSize:"14px",fontWeight:400,lineHeight:"21px",margin:"0 0 20px 0",color:"var(--next-error-message)"},form:{margin:0},buttonGroup:{display:"flex",gap:"8px",alignItems:"center"},button:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"32px",padding:"0 12px",fontSize:"14px",fontWeight:500,lineHeight:"20px",borderRadius:"6px",cursor:"pointer",color:"var(--next-error-btn-text)",background:"var(--next-error-btn-bg)",border:"var(--next-error-btn-border)"},buttonSecondary:{display:"inline-flex",alignItems:"center",justifyContent:"center",height:"32px",padding:"0 12px",fontSize:"14px",fontWeight:500,lineHeight:"20px",borderRadius:"6px",cursor:"pointer",color:"var(--next-error-btn-secondary-text)",background:"var(--next-error-btn-secondary-bg)",border:"var(--next-error-btn-secondary-border)"},digestFooter:{position:"fixed",bottom:"32px",left:"0",right:"0",textAlign:"center",fontFamily:'ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,monospace',fontSize:"12px",lineHeight:"18px",fontWeight:400,margin:"0",color:"var(--next-error-digest)"}},a=`
|
|
2
|
+
:root {
|
|
3
|
+
--next-error-bg: #fff;
|
|
4
|
+
--next-error-text: #171717;
|
|
5
|
+
--next-error-title: #171717;
|
|
6
|
+
--next-error-message: #171717;
|
|
7
|
+
--next-error-digest: #666666;
|
|
8
|
+
--next-error-btn-text: #fff;
|
|
9
|
+
--next-error-btn-bg: #171717;
|
|
10
|
+
--next-error-btn-border: none;
|
|
11
|
+
--next-error-btn-secondary-text: #171717;
|
|
12
|
+
--next-error-btn-secondary-bg: transparent;
|
|
13
|
+
--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);
|
|
14
|
+
}
|
|
15
|
+
@media (prefers-color-scheme: dark) {
|
|
16
|
+
:root {
|
|
17
|
+
--next-error-bg: #0a0a0a;
|
|
18
|
+
--next-error-text: #ededed;
|
|
19
|
+
--next-error-title: #ededed;
|
|
20
|
+
--next-error-message: #ededed;
|
|
21
|
+
--next-error-digest: #a0a0a0;
|
|
22
|
+
--next-error-btn-text: #0a0a0a;
|
|
23
|
+
--next-error-btn-bg: #ededed;
|
|
24
|
+
--next-error-btn-border: none;
|
|
25
|
+
--next-error-btn-secondary-text: #ededed;
|
|
26
|
+
--next-error-btn-secondary-bg: transparent;
|
|
27
|
+
--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }
|
|
31
|
+
`.replace(/\n\s*/g,"");function d(){return(0,i.jsx)("svg",{width:"32",height:"32",viewBox:"-0.2 -1.5 32 32",fill:"none",style:l.icon,children:(0,i.jsx)("path",{d:"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z",fill:"var(--next-error-title)"})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)},51709,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}}),e.r(81258);let o=e.r(54710);e.r(29158);let n=e.r(64565),i=e.r(82276),l=function({error:e}){let r=e?.digest,t=!!r;return(0,n.handleISRError)({error:e}),(0,o.jsxs)("html",{id:"__next_error__",children:[(0,o.jsx)("head",{children:(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:i.errorThemeCss}})}),(0,o.jsxs)("body",{children:[(0,o.jsx)("div",{style:i.errorStyles.container,children:(0,o.jsxs)("div",{style:i.errorStyles.card,children:[(0,o.jsx)(i.WarningIcon,{}),(0,o.jsx)("h1",{style:i.errorStyles.title,children:"This page couldn’t load"}),(0,o.jsx)("p",{style:i.errorStyles.message,children:t?"A server error occurred. Reload to try again.":"Reload to try again, or go back."}),(0,o.jsxs)("div",{style:i.errorStyles.buttonGroup,children:[(0,o.jsx)("form",{style:i.errorStyles.form,children:(0,o.jsx)("button",{type:"submit",style:i.errorStyles.button,children:"Reload"})}),!t&&(0,o.jsx)("button",{type:"button",style:i.errorStyles.buttonSecondary,onClick:()=>{window.history.length>1?window.history.back():window.location.href="/"},children:"Back"})]})]})}),r&&(0,o.jsxs)("p",{style:i.errorStyles.digestFooter,children:["ERROR ",r]})]})]})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),r.exports=t.default)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return a},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(44066)._(e.r(78677)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,n=e.protocol||"",i=e.pathname||"",a=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(s.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==c?(c="//"+(c||""),i&&"/"!==i[0]&&(i="/"+i)):c||(c=""),a&&"#"!==a[0]&&(a="#"+a),u&&"?"!==u[0]&&(u="?"+u),i=i.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${i}${u}${a}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return a(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return i}});let n=e.r(29158);function i(e,t){let r=(0,n.useRef)(null),i=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=i.current;t&&(i.current=null,t())}else e&&(r.current=s(e,n)),t&&(i.current=s(t,n))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return s}});let n=e.r(31047),i=e.r(63334);function s(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,i.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return x}};for(var i in n)Object.defineProperty(r,i,{enumerable:!0,get:n[i]});let s=e.r(44066),o=e.r(54710),a=s._(e.r(29158)),l=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),m=e.r(20321);e.r(90503);let p=e.r(38520),h=e.r(19947),f=e.r(59246),_=e.r(99046);function g(t){var r,n;let i,s,g,[x,v]=(0,a.useOptimistic)(h.IDLE_LINK_STATUS),y=(0,a.useRef)(null),{href:w,as:j,children:k,prefetch:N=null,passHref:S,replace:E,shallow:C,scroll:O,onClick:T,onMouseEnter:A,onTouchStart:D,legacyBehavior:I=!1,onNavigate:L,transitionTypes:P,ref:$,unstable_dynamicOnHover:R,...M}=t;i=k,I&&("string"==typeof i||"number"==typeof i)&&(i=(0,o.jsx)("a",{children:i}));let U=a.default.useContext(c.AppRouterContext),K=!1!==N,F=!1!==N?null===(n=N)||"auto"===n?_.FetchStrategy.PPR:_.FetchStrategy.Full:_.FetchStrategy.PPR,q="string"==typeof(r=j||w)?r:(0,l.formatUrl)(r);if(I){if(i?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});s=a.default.Children.only(i)}let G=I?s&&"object"==typeof s&&s.ref:$,B=a.default.useCallback(e=>(null!==U&&(y.current=(0,h.mountLinkInstance)(e,q,U,F,K,v)),()=>{y.current&&((0,h.unmountLinkForCurrentNavigation)(y.current),y.current=null),(0,h.unmountPrefetchableInstance)(e)}),[K,q,U,F,v]),Y={ref:(0,u.useMergedRef)(B,G),onClick(t){I||"function"!=typeof T||T(t),I&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!U||t.defaultPrevented||function(t,r,n,i,s,o,l){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,f.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);a.default.startTransition(()=>{d(r,i?"replace":"push",!1===s?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,l)})}}(t,q,y,E,O,L,P)},onMouseEnter(e){I||"function"!=typeof A||A(e),I&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),U&&K&&(0,h.onNavigationIntent)(e.currentTarget,!0===R)},onTouchStart:function(e){I||"function"!=typeof D||D(e),I&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),U&&K&&(0,h.onNavigationIntent)(e.currentTarget,!0===R)}};return(0,d.isAbsoluteUrl)(q)?Y.href=q:I&&!S&&("a"!==s.type||"href"in s.props)||(Y.href=(0,m.addBasePath)(q)),g=I?a.default.cloneElement(s,Y):(0,o.jsx)("a",{...M,...Y,children:i}),(0,o.jsx)(b.Provider,{value:x,children:g})}e.r(10364);let b=(0,a.createContext)(h.IDLE_LINK_STATUS),x=()=>(0,a.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},37399,25204,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}],37399);var r=e.i(29158),n=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,t=!0){let i=(0,r.useRef)(e);i.current=e,(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||(0,n.is_modal_dialog_open)()||(e.preventDefault(),i.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t])}],25204)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),i=e.i(32417),s=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[o,a]=(0,r.useState)(null),[l,c]=(0,r.useState)(!1),u=(0,i.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{a(e?.user.email??null)}).catch(()=>{a(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{a(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:o,is_pending:l,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,s.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},75404,73205,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let i=[{href:"/",label:"Tracker",match:e=>"/"===e}];function s(){let e=(0,n.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:i.map(n=>{let i=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${i?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":i?"page":void 0,children:n.label},n.href)})})}function o(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}var a=e.i(77882);function l(){let{email:e,is_configured:r}=(0,a.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(o,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}var c=e.i(29158),u=e.i(37399),d=e.i(90463),m=e.i(46549),p=e.i(22373);let h=new Set(p.topbar_quick_action_ids),f=["today","search","reporting","pomodoro"];function _(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return f;let r=t.filter(e=>"string"==typeof e&&h.has(e));return Array.from(new Set(r))}catch{return f}}e.s(["parse_topbar_quick_actions",0,_],73205);var g=e.i(66295),b=e.i(34869),x=e.i(92629);let v=(0,b.create_ui_preference_store)({storage_key:x.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:x.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});var y=e.i(32792),w=e.i(90299),j=e.i(28274);function k(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function N(){return k()}function S(){return"dark"}var E=e.i(35434),C=e.i(17798),O=e.i(10464),T=e.i(61834),A=e.i(81553),D=e.i(25204);let I="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",L={today:{href:"/today",label:"Today"},search:{href:"/search",label:"Search"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},P=new Set(["manage-tags","pomodoro","sync-settings"]);function $(){let e=(0,n.useRouter)(),i=(0,n.usePathname)()??"/",s=(0,c.useSyncExternalStore)(E.subscribe_theme,N,S),o=(0,c.useSyncExternalStore)(v.subscribe,v.get_snapshot,v.get_server_snapshot),l=(0,c.useSyncExternalStore)(w.tracker_shortcut_map_preference.subscribe,w.tracker_shortcut_map_preference.get_snapshot,w.tracker_shortcut_map_preference.get_server_snapshot),h=(0,c.useSyncExternalStore)(y.topbar_quick_actions_preference.subscribe,y.topbar_quick_actions_preference.get_snapshot,y.topbar_quick_actions_preference.get_server_snapshot),f=(0,g.parse_tracker_shortcut_map)(l),b=new Set(_(h)),x=p.topbar_quick_action_ids.filter(e=>!b.has(e)),$=Array.from(new Set([...Array.from(P),...x])),{email:R,is_configured:M,is_pending:U,sign_out:K}=(0,a.use_supabase_auth_session)(),[F,q]=(0,c.useState)(!1),G=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!F)return;let e=e=>{null===G.current||G.current.contains(e.target)||q(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[F]);let B=()=>{q(!1)};return(0,D.use_escape_to_cancel)(B,F),(0,t.jsxs)("div",{className:"relative shrink-0",ref:G,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":F,"aria-haspopup":"menu",onClick:()=>q(e=>!e),children:(0,t.jsx)(u.HamburgerIcon,{})}),F?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[M&&null!==R?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:R,children:R})}):null,$.map(e=>{let n=L[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:I,role:"menuitem",onClick:B,children:n.label})},e)}),M?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitemcheckbox","aria-checked":"true"===o,onClick:()=>{let e="true"===o?"false":"true";v.write(e),v.notify(),(0,m.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==R&&(0,j.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===o?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===o?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitem",onClick:()=>{let e;B(),e="dark"===k()?"light":"dark",(0,C.apply_theme)(e),(0,A.write_stored_theme)(e),O.theme_mode_preference.write(e),(0,T.write_document_preference_cookies)({theme_mode:e,theme:e}),O.theme_mode_preference.notify(),(0,E.notify_theme_subscribers)(),(0,m.notify_settings_saved)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===s?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===s?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitem",onClick:()=>{let e;B(),e=f.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),M?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===R?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitem",onClick:()=>{B(),e.push((0,d.build_auth_page_href)("sign_in",i))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${I} text-danger`,role:"menuitem",disabled:U,onClick:()=>{B(),K()},children:U?"Signing out…":"Sign out"})})]}):null]}):null]})}let R=[{id:"today",href:"/today",label:"Today"},{id:"search",href:"/search",label:"Search"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];function M(){let e=(0,n.usePathname)()??"/",i=(0,c.useSyncExternalStore)(y.topbar_quick_actions_preference.subscribe,y.topbar_quick_actions_preference.get_snapshot,y.topbar_quick_actions_preference.get_server_snapshot),s=(0,c.useMemo)(()=>_(i),[i]);if(0===s.length)return null;let o=R.filter(e=>s.includes(e.id));return 0===o.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:o.map(n=>{let i=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${i?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":i?"page":void 0,children:n.label},n.id)})})}var U=e.i(29539);function K(){let e=((0,n.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(r.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(U.SettingsIcon,{})})}function F({current:e,parent:n}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:n.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(F,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(s,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(M,{}),(0,t.jsx)(l,{}),(0,t.jsx)(K,{}),(0,t.jsx)($,{})]})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},19946,e=>{"use strict";var t=e.i(29158),r=e.i(72270),n=e.i(4572);e.s(["use_confirm_dialog",0,function(){let e=(0,t.useContext)(r.ConfirmDialogContext);if(null!==e)return e;let i=(0,n.get_registered_confirm_dialog)();if(null!==i)return{confirm:i};throw Error("use_confirm_dialog must be used within ConfirmDialogProvider")}])},39474,20993,e=>{"use strict";var t=e.i(13349),r=e.i(32417),n=e.i(44171),i=e.i(28274);let s=null,o=Promise.resolve();function a(){(0,r.is_supabase_configured)()&&(0,n.is_cloud_sync_enabled)()&&(null!==s&&clearTimeout(s),s=setTimeout(()=>{s=null,o=o.then(()=>(0,i.run_tracker_db_cloud_sync)()).catch(()=>{})},400))}function l(){(0,t.is_greedy_cloud_sync_enabled)()&&a()}e.s(["schedule_tracker_db_cloud_sync",0,l],20993),e.s(["push_tracker_db_cloud_after_change",0,function(){(0,t.is_greedy_cloud_sync_enabled)()?l():a()}],39474)},47540,e=>{"use strict";var t=e.i(31113);e.s(["tags_are_equal",0,function(e,r){try{return(0,t.normalize_stored_tag)(e)===(0,t.normalize_stored_tag)(r)}catch{return!1}}])},85323,e=>{"use strict";var t=e.i(49087);e.s(["notify_desktop",0,function(e){if((0,t.notify_in_app)({title:e.title,body:e.body}),"u"<typeof Notification||"u">typeof document&&"visible"===document.visibilityState&&document.hasFocus()||"granted"!==Notification.permission)return;let{body:r,tag:n,title:i}=e,s={body:r,...void 0!==n?{tag:n}:{}};try{new Notification(i,s)}catch{}},"supports_desktop_notifications",0,function(){return"u">typeof Notification}])},48541,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DESKTOP_NOTIFICATIONS_STORAGE_KEY,default_value:r.DESKTOP_NOTIFICATIONS_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["desktop_notifications_preference",0,n])},17003,e=>{"use strict";var t=e.i(27850),r=e.i(72550);e.s(["write_active_sheet_preference",0,function(e){let n=e.trim();if(0!==n.length){try{window.localStorage.setItem(r.ACTIVE_SHEET_STORAGE_KEY,n),(0,t.schedule_ui_preferences_cloud_sync)()}catch{}try{let e=encodeURIComponent(n);document.cookie=`${r.ACTIVE_SHEET_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}}}])},51229,97176,e=>{"use strict";var t=e.i(13349);async function r(e){let t=await fetch("/api/sheet/active",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})});if(!t.ok)throw Error((await t.json()).error??"Failed to update active sheet in cloud")}var n=e.i(39474),i=e.i(20993);function s(e,s){if("/api/sheet"===e&&"object"==typeof s&&null!==s&&!0!==s.delete&&!(0,t.is_greedy_cloud_sync_enabled)()){let e=s.name?.trim()??"";e.length>0&&r(e).catch(()=>{});return}(0,t.is_greedy_cloud_sync_enabled)()?(0,i.schedule_tracker_db_cloud_sync)():(0,n.push_tracker_db_cloud_after_change)()}e.s(["notify_tracker_db_cloud_sync",0,s],97176);let o=new Set(["/api/note"]);async function a(e,t){let r={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},n=await fetch(e,r);if(!n.ok){var i,a;let t,s=(await n.json()).error??"Request failed";if(i=e,a=s,o.has(i)&&((t=a.toLowerCase()).includes("duplicate key")||t.includes("unique constraint"))){if(await new Promise(e=>{setTimeout(e,25)}),!(n=await fetch(e,r)).ok)throw Error((await n.json()).error??s)}else throw Error(s)}let l=await n.json();return s(e,t),l}e.s(["post_tracker_action",0,a],51229)},87231,e=>{"use strict";e.s(["build_entry_search_href",0,function(e){let t=new URLSearchParams;e.query.trim().length>0&&t.set("q",e.query.trim()),e.sheetName.trim().length>0&&t.set("sheet",e.sheetName.trim()),e.tag.trim().length>0&&t.set("tag",e.tag.trim()),e.fromDate.trim().length>0&&t.set("from",e.fromDate.trim()),e.toDate.trim().length>0&&t.set("to",e.toDate.trim());let r=t.toString();return r.length>0?`/search?${r}`:"/search"}])},56586,e=>{"use strict";let t={query:"",sheetName:"",tag:"",fromDate:"",toDate:""};e.s(["get_empty_entry_search_filters",0,function(){return{...t}}])},49532,e=>{"use strict";let t=e=>"object"==typeof e&&null!==e&&"string"==typeof e.id&&"string"==typeof e.name&&"string"==typeof e.description;e.s(["read_entry_templates",0,function(){try{let e=window.localStorage.getItem("super-time-tracker-entry-templates");if(null===e)return[];let r=JSON.parse(e);if(!Array.isArray(r))return[];return r.filter(t)}catch{return[]}}])},15526,e=>{"use strict";let t="super-time-tracker-pomodoro-active-entry";e.s(["clear_pomodoro_task_entry_marker",0,function(){try{window.localStorage.removeItem(t)}catch{}},"is_pomodoro_task_entry",0,function(e){let r=(()=>{try{let e=window.localStorage.getItem(t);if(null===e)return null;try{let t=JSON.parse(e);if("string"==typeof t.sheetName&&t.sheetName.length>0&&"number"==typeof t.entryId&&Number.isInteger(t.entryId))return{sheetName:t.sheetName,entryId:t.entryId}}catch{}return null}catch{return null}})();return null!==r&&r.sheetName===e.sheetName&&r.entryId===e.id},"mark_pomodoro_task_entry",0,function(e){try{let r={sheetName:e.sheetName,entryId:e.id};window.localStorage.setItem(t,JSON.stringify(r))}catch{}}])},53754,7554,76379,e=>{"use strict";var t=e.i(29158),r=e.i(19946);function n(e){let t=e?.at?.trim()??"",r=e?.note?.trim()??"",n=t.length>0,i=r.length>0,s="Stop the active timer and save this entry?";return n&&i?s=`Stop the timer at "${t}" and save a checkout note?`:n?s=`Stop the timer and check out at "${t}"?`:i&&(s="Stop the timer and save this entry with your checkout note?"),{title:"Check out?",message:s,confirmLabel:"Check out",variant:"danger"}}e.s(["get_check_out_confirm_dialog",0,n],7554);var i=e.i(97026);function s(){return"true"===(0,t.useSyncExternalStore)(i.confirm_before_checkout_preference.subscribe,i.confirm_before_checkout_preference.get_snapshot,i.confirm_before_checkout_preference.get_server_snapshot)}e.s(["use_confirm_before_checkout",0,s],76379),e.s(["useCheckOutAction",0,function(e){let{confirm:i}=(0,r.use_confirm_dialog)(),o=s();return(0,t.useCallback)(async t=>(!o||!!await i(n(t)))&&(e(t),!0),[i,o,e])}],53754)},50459,e=>{"use strict";e.s(["prompt_check_out_at",0,function(){let e=window.prompt("Check out at what time?","30 minutes ago");if(null===e)return null;let t=e.trim();return 0===t.length?null:t}])},36178,68713,e=>{"use strict";e.s(["build_check_out_request_payload",0,function(e,t){let r={sheetName:e},n=t?.at?.trim(),i=t?.note?.trim();return void 0!==n&&n.length>0&&(r.at=n),void 0!==i&&i.length>0&&(r.note=i),r}],36178);var t=e.i(26740),r=e.i(15526);e.s(["finish_running_pomodoro_timer",0,function(){try{let e=window.localStorage.getItem(t.POMODORO_STORAGE_KEY);if(null===e)return;let n=JSON.parse(e),i=n.state;if(i?.status!=="running")return;let s={settings:n.settings??t.POMODORO_DEFAULT_SETTINGS,state:t.POMODORO_DEFAULT_STATE};window.localStorage.setItem(t.POMODORO_STORAGE_KEY,JSON.stringify(s)),(0,r.clear_pomodoro_task_entry_marker)()}catch{}}],68713)},18774,e=>{"use strict";e.s(["format_display_tag",0,function(e){return e.startsWith("@")?e:`@${e}`}])},31113,e=>{"use strict";e.s(["normalize_stored_tag",0,function(e){let t=e.trim().replace(/^@+/,"");if(0===t.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(t))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${t}`}])},14260,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(18774),i=e.i(52405),s=e.i(31113);e.s(["TagAutocompleteInput",0,function({id:e,value:o,known_tags:a,placeholder:l,disabled:c=!1,autoFocus:u=!1,on_change:d}){let m=(0,r.useRef)(null),p=(0,r.useRef)(null),h=(0,r.useRef)(null),[f,_]=(0,r.useState)(0),[g,b]=(0,r.useState)(0),x=function(e,t){let r=e.slice(0,t),n=r.lastIndexOf("@");if(-1===n)return null;let i=r.slice(n+1);return/\s/.test(i)?null:{query:i,start_index:n,end_index:t}}(o,f),v=null===x?[]:function(e,t,r=10){let n=t.toLowerCase();return e.filter(e=>{let t=e.replace(/^@/,"").toLowerCase();return 0===n.length||t.startsWith(n)}).slice(0,r)}(a,x.query),y=null!==x&&function(e,t){if(!/^\w+$/.test(e))return!1;let r=e.toLowerCase();return t.some(e=>{try{return(0,s.normalize_stored_tag)(e).slice(1).toLowerCase()===r}catch{return!1}})}(x.query,a),w=null!==x&&v.length>0&&!y&&!c;(0,r.useLayoutEffect)(()=>{null!==h.current&&null!==m.current&&(m.current.setSelectionRange(h.current,h.current),_(h.current),h.current=null)},[o]),(0,r.useEffect)(()=>{b(0)},[o,f,v.length]);let j=()=>{_(m.current?.selectionStart??o.length)},k=()=>{b(0)},N=e=>{let t,r,i;if(null===x)return;let{next_text:s,next_cursor:a}=(t=(0,n.format_display_tag)(e),r=o.slice(0,x.start_index),i=o.slice(x.end_index),{next_text:`${r}${t}${i}`,next_cursor:r.length+t.length});h.current=a,d(s),k()};return(0,t.jsxs)("div",{className:"relative min-w-0",children:[(0,t.jsx)("input",{ref:m,id:e,type:"text",role:"combobox",className:(0,i.get_input_class_name)(),value:o,placeholder:l,disabled:c,autoFocus:u,autoComplete:"off","aria-autocomplete":"list","aria-expanded":w,"aria-controls":w?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),_(e.target.selectionStart??e.target.value.length)},onClick:j,onKeyUp:j,onKeyDown:e=>{if(w){if("ArrowDown"===e.key){e.preventDefault(),b(e=>(e+1)%v.length);return}if("ArrowUp"===e.key){e.preventDefault(),b(e=>(e-1+v.length)%v.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=v[g];void 0!==t&&N(t);return}"Escape"===e.key&&(e.preventDefault(),k())}},onBlur:()=>{window.setTimeout(k,120)}}),w?(0,t.jsx)("ul",{ref:p,id:`${e}-tag-suggestions`,role:"listbox",className:"absolute left-0 right-0 top-full z-20 mt-1 max-h-48 list-none overflow-y-auto rounded-md border border-panel-border bg-panel p-1.5 shadow-md",children:v.map((e,r)=>(0,t.jsx)("li",{role:"option","aria-selected":r===g,children:(0,t.jsx)("button",{type:"button",className:`block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover ${r===g?"bg-surface-hover":""}`,onMouseDown:t=>{t.preventDefault(),N(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},69472,84545,50937,83327,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLAUDE_API_KEY_STORAGE_KEY,default_value:r.CLAUDE_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["claude_api_key_preference",0,n],69472);let i=(0,t.create_ui_preference_store)({storage_key:r.ENTRY_SUGGESTION_PROVIDER_STORAGE_KEY,default_value:r.ENTRY_SUGGESTION_PROVIDER_DEFAULT,is_valid:e=>"none"===e||"openai"===e||"claude"===e||"google_ai"===e});e.s(["entry_suggestion_provider_preference",0,i],84545);let s=(0,t.create_ui_preference_store)({storage_key:r.GOOGLE_AI_API_KEY_STORAGE_KEY,default_value:r.GOOGLE_AI_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["google_ai_api_key_preference",0,s],50937);let o=(0,t.create_ui_preference_store)({storage_key:r.OPENAI_API_KEY_STORAGE_KEY,default_value:r.OPENAI_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["openai_api_key_preference",0,o],83327)},44356,e=>{"use strict";var t=e.i(18774);e.s(["build_resume_description",0,function(e,r){let n=e.trim(),i=n.length>0?n:"Untitled entry",s=r.map(e=>(0,t.format_display_tag)(e)).join(" ");return s.length>0?`${i} ${s}`.trim():i}])},75899,35923,e=>{"use strict";var t=e.i(39552);e.s(["format_time",0,function(e,r="12h"){return(0,t.format)(new Date(e),"24h"===r?"HH:mm":"h:mm a")}],75899);var r=e.i(29158),n=e.i(97891);e.s(["use_time_format",0,function(){return(0,r.useSyncExternalStore)(n.time_format_preference.subscribe,n.time_format_preference.get_snapshot,n.time_format_preference.get_server_snapshot)}],35923)},35877,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DEBUG_LOGGING_STORAGE_KEY,default_value:r.DEBUG_LOGGING_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["debug_logging_preference",0,n])},96947,59515,91966,e=>{"use strict";e.s(["get_api_key_for_suggestion_provider",0,function(e,t){return"openai"===e?t.openai:"claude"===e?t.claude:"google_ai"===e?t.google_ai:""}],96947);var t=e.i(35877);async function r(e){if("none"===e.provider)throw Error("AI suggestion provider is disabled");let r="true"===t.debug_logging_preference.read(),n=Date.now(),i={provider:e.provider,context:e.context,notes:e.notes,debug_logging:r};r&&console.info("[ai-suggestion] client request start",{provider:e.provider,context_length:e.context.length,notes_length:e.notes.length});try{let t=await fetch("/api/entry/suggest-description",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...i,api_key:e.api_key})});if(!t.ok){let i=await t.json().catch(()=>({}));throw r&&console.warn("[ai-suggestion] client request failed",{provider:e.provider,status:t.status,elapsed_ms:Date.now()-n,error:i.error??"Failed to suggest description"}),Error(i.error??"Failed to suggest description")}let s=await t.json(),o=s.description?.trim()??"";if(0===o.length)throw Error("Suggestion was empty");return r&&console.info("[ai-suggestion] client request success",{provider:e.provider,elapsed_ms:Date.now()-n,description_length:o.length}),o}catch(t){throw r&&console.error("[ai-suggestion] client request error",{provider:e.provider,elapsed_ms:Date.now()-n,error:t instanceof Error?t.message:String(t)}),t}}e.s(["request_ai_entry_description_suggestion",0,r],59515);var n=e.i(29158),i=e.i(36405);e.s(["use_confirm_destructive_actions",0,function(){return"true"===(0,n.useSyncExternalStore)(i.confirm_destructive_actions_preference.subscribe,i.confirm_destructive_actions_preference.get_snapshot,i.confirm_destructive_actions_preference.get_server_snapshot)}],91966)},28098,7568,34937,4903,27707,20397,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(37399),i=e.i(25204);let s="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";e.s(["EntryActionsMenu",0,function(e){var o,a,l,c,u,d;let{current_sheet_name:m,sheets:p,is_pending:h,on_edit:f,on_add_note:_,on_show_add_note_form:g,on_revise_description_ai:b,can_revise_description_ai:x=!1,on_resume:v,entry_is_active:y=!1,can_split:w=!1,on_split:j,can_merge_previous:k=!1,can_merge_next:N=!1,on_merge:S,on_delete:E,on_move:C}=e,O=p.find(e=>e.name===m),T=y||O?.hasActiveEntry===!0&&!y,A=p.filter(e=>e.name!==m),[D,I]=(0,r.useState)(!1),L=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!D)return;let e=e=>{null===L.current||L.current.contains(e.target)||I(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[D]);let P=()=>{I(!1)};return(0,i.use_escape_to_cancel)(P,D),(0,t.jsxs)("div",{className:"relative shrink-0",ref:L,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":"Entry actions","aria-expanded":D,"aria-haspopup":"menu",disabled:h,onClick:()=>I(e=>!e),children:(0,t.jsx)(n.HamburgerIcon,{})}),D?(0,t.jsxs)("div",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(o=h,a=P,l=f,(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:o,onClick:()=>{a(),l()},children:"Edit times"})})),function({is_pending:e,close_menu:r,on_show_add_note_form:n,on_add_note:i}){return void 0===n&&void 0===i?null:(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e,onClick:()=>{if(r(),void 0!==n)return void n();let e=function(){let e=window.prompt("Add note","");if(null===e)return null;let t=e.trim();return 0===t.length?null:t}();null!==e&&void 0!==i&&i(e)},children:"Add note"})})}({is_pending:h,close_menu:P,on_show_add_note_form:g,on_add_note:_}),function({is_pending:e,can_revise_description_ai:r,close_menu:n,on_revise_description_ai:i}){return void 0===i?null:(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||!r,title:r?"Revise with AI":"Configure provider and key in Settings → AI suggestions",onClick:()=>{n(),i()},children:"Revise description with AI"})})}({is_pending:h,can_revise_description_ai:x,close_menu:P,on_revise_description_ai:b}),function({is_pending:e,resume_blocked:r,resume_blocked_reason:n,close_menu:i,on_resume:o}){return void 0===o?null:(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||r,title:r?n:void 0,onClick:()=>{i(),o()},children:"Resume"})})}({is_pending:h,resume_blocked:T,resume_blocked_reason:y?"This entry is already active":"Another entry is active on this sheet",close_menu:P,on_resume:v}),function({is_pending:e,can_split:r,close_menu:n,on_split:i}){return void 0===i?null:(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||!r,title:r?"Split into two entries at a time":"Only completed entries can be split",onClick:()=>{if(n(),!r)return;let e=function(){let e=window.prompt("Split at what time?","1 hour ago");if(null===e)return null;let t=e.trim();return 0===t.length?null:t}();null!==e&&i(e)},children:"Split entry"})})}({is_pending:h,can_split:w,close_menu:P,on_split:j}),function({is_pending:e,can_merge_previous:r,can_merge_next:n,close_menu:i,on_merge:o}){return void 0===o?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||!r,title:r?"Merge with the previous entry":"No touching previous entry",onClick:()=>{i(),r&&o("previous")},children:"Merge with previous"})}),(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:e||!n,title:n?"Merge with the next entry":"No touching next entry",onClick:()=>{i(),n&&o("next")},children:"Merge with next"})})]})}({is_pending:h,can_merge_previous:k,can_merge_next:N,close_menu:P,on_merge:S}),(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("hr",{className:"my-1 border-0 border-t border-panel-border","aria-hidden":"true"})}),(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("p",{className:"m-0 px-2.5 py-0.5 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Move to sheet"})}),function({other_sheets:e,is_pending:r,close_menu:n,on_move:i}){return 0===e.length?(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:s,role:"menuitem",disabled:!0,children:"No other sheets"})}):e.map(e=>(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${s} pl-4`,role:"menuitem",disabled:r||e.hasActiveEntry,title:e.hasActiveEntry?"That sheet already has an active entry":void 0,onClick:()=>{n(),i(e.name)},children:e.name})},e.name))}({other_sheets:A,is_pending:h,close_menu:P,on_move:C}),(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("hr",{className:"my-1 border-0 border-t border-panel-border","aria-hidden":"true"})}),(c=h,u=P,d=E,(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${s} text-danger`,role:"menuitem",disabled:c,onClick:()=>{u(),d()},children:"Delete"})}))]}):null]})}],28098);var o=e.i(39552);function a(e){return(0,o.format)(new Date(e),"MMM d, h:mm a")}var l=e.i(14260),c=e.i(44356),u=e.i(52663),d=e.i(52405);function m({rotated:e=!1,className:r=""}){return(0,t.jsx)("svg",{className:`h-3 w-3 shrink-0 transition-transform duration-150 ${e?"rotate-90":""} ${r}`.trim(),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"m9 18 6-6-6-6"})})}e.s(["EntryEditForm",0,function({entry:e,known_tags:n,is_pending:s,initial_description_override:o,in_active_panel:m=!1,times_only:p=!1,start_only:h=!1,on_save:f,on_cancel:_}){let g=(0,r.useMemo)(()=>o??(0,c.build_resume_description)(e.description,e.tags),[e.description,e.tags,o]),[b,x]=(0,r.useState)(g),[v,y]=(0,r.useState)(""),[w,j]=(0,r.useState)("");(0,r.useEffect)(()=>{x(o??(0,c.build_resume_description)(e.description,e.tags)),y(""),j("")},[e.description,e.id,e.sheetName,e.tags,o]),(0,i.use_escape_to_cancel)(_);let k=e.isActive?"still running":a(e.end??e.start),N=p?v.trim().length>0||!h&&w.trim().length>0:b.trim()!==g.trim()||v.trim().length>0||!h&&w.trim().length>0;return(0,t.jsxs)("form",{className:`flex flex-col gap-3 rounded-[0.65rem] border border-panel-border bg-input-bg p-3 ${m?"mt-2":""}`,onSubmit:e=>{e.preventDefault();let t=b.trim(),r=v.trim(),n=w.trim(),i={};p||t===g.trim()||(i.description=t),r.length>0&&(i.start=r),!h&&n.length>0&&(i.end=n),(void 0!==i.description||void 0!==i.start||void 0!==i.end)&&f(i)},children:[(0,t.jsx)("p",{className:"m-0 text-[0.85rem] font-semibold",children:p?"Edit times":"Edit entry"}),p?null:(0,t.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-description-${e.id}`,children:[(0,t.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"Description"}),(0,t.jsx)(l.TagAutocompleteInput,{id:`entry-description-${e.id}`,value:b,known_tags:n,placeholder:"e.g. crafting something @design",disabled:s,autoFocus:m,on_change:x})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("p",{className:"m-0 text-[0.8rem] font-semibold text-muted",children:"Times (optional)"}),(0,t.jsxs)("div",{className:`grid gap-2.5 max-[860px]:grid-cols-1 ${h?"grid-cols-1":"grid-cols-2"}`,children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-start-${e.id}`,children:[(0,t.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"Start"}),(0,t.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",a(e.start)]}),(0,t.jsx)("input",{id:`entry-start-${e.id}`,className:(0,d.get_input_class_name)("compact"),value:v,onChange:e=>y(e.target.value),placeholder:"e.g. 10am, 30 minutes ago",disabled:s,autoFocus:p&&m})]}),h?null:(0,t.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-end-${e.id}`,children:[(0,t.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"End"}),(0,t.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",k]}),(0,t.jsx)("input",{id:`entry-end-${e.id}`,className:(0,d.get_input_class_name)("compact"),value:w,onChange:e=>j(e.target.value),placeholder:e.isActive?"e.g. now, 5 minutes ago":"e.g. 11:30am",disabled:s})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"submit",className:(0,u.get_button_class_name)("primary","small"),disabled:s||!N,children:"Save"}),(0,t.jsx)("button",{type:"button",className:(0,u.get_button_class_name)("ghost","small"),disabled:s,onClick:_,children:"Cancel"})]})]})}],7568);var p=e.i(75899);function h({initial_text:e,is_pending:n,inline:s=!1,on_save:o,on_cancel:a}){let[l,c]=(0,r.useState)(e);(0,i.use_escape_to_cancel)(a);let m=Math.min(6,Math.max(2,e.split("\n").length)),p=s?`${(0,d.get_input_class_name)()} min-h-10 w-full resize-y text-xs leading-snug`:`${(0,d.get_input_class_name)()} min-h-10 w-full resize-y text-[0.85rem] leading-snug`;return(0,t.jsxs)("form",{className:"flex w-full flex-col gap-1.5",onSubmit:e=>{e.preventDefault();let t=l.trim();0!==t.length&&o(t)},children:[(0,t.jsx)("textarea",{className:p,value:l,rows:m,disabled:n,onChange:e=>c(e.target.value)}),(0,t.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,t.jsx)("button",{type:"button",className:(0,u.get_button_class_name)("ghost"),disabled:n,onClick:a,children:"Cancel"}),(0,t.jsx)("button",{type:"submit",className:(0,u.get_button_class_name)("ghost"),disabled:n||0===l.trim().length,children:"Save"})]})]})}function f(){return(0,t.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12 20h9"}),(0,t.jsx)("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}function _(){return(0,t.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M3 6h18"}),(0,t.jsx)("path",{d:"M8 6V4h8v2"}),(0,t.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),(0,t.jsx)("path",{d:"M10 11v6"}),(0,t.jsx)("path",{d:"M14 11v6"})]})}e.s(["PencilIcon",0,f],34937);var g=e.i(35923);let b="inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-[0.35rem] border-0 bg-transparent p-0 text-muted hover:bg-surface-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-55";function x({note:e,is_inline:r,is_panel_in_bar:n,is_pending:i,is_editing:s,time_format:o,on_cancel_edit:a,on_save:l,on_start_edit:c,on_delete:u,on_edit_note:d,on_delete_note:m}){let g=r?"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-ghost-bg px-2 py-1.5 compact:rounded-none compact:px-1.5 compact:py-1":n?"flex min-h-0 flex-col justify-center gap-0.5 rounded-sm border border-panel-border bg-[color-mix(in_srgb,var(--panel)_55%,var(--background))] px-2.5 py-2":"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-[color-mix(in_srgb,var(--panel)_55%,var(--background))] px-2.5 py-2",v=function({is_pending:e,on_start_edit:r,on_delete:n,on_edit_note:i,on_delete_note:s}){return void 0===i&&void 0===s?null:(0,t.jsxs)("div",{className:"flex shrink-0 gap-0.5",children:[void 0===i?null:(0,t.jsx)("button",{type:"button",className:b,"aria-label":"Edit note",title:"Edit note",disabled:e,onClick:e=>{e.stopPropagation(),r()},children:(0,t.jsx)(f,{})}),void 0===s?null:(0,t.jsx)("button",{type:"button",className:`${b} hover:text-danger`,"aria-label":"Delete note",title:"Delete note",disabled:e,onClick:e=>{e.stopPropagation(),n()},children:(0,t.jsx)(_,{})})]})}({note:e,is_pending:i,on_start_edit:c,on_delete:u,on_edit_note:d,on_delete_note:m});return s?(0,t.jsx)("li",{className:g,children:(0,t.jsx)(h,{initial_text:e.text,inline:r,is_pending:i,on_cancel:a,on_save:l})}):r?(0,t.jsx)("li",{className:g,children:(0,t.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,t.jsxs)("p",{className:"m-0 flex min-w-0 flex-1 items-baseline gap-1.5 text-xs leading-snug text-foreground compact:text-[0.72rem]",children:[(0,t.jsx)("time",{className:"shrink-0 font-mono text-[0.68rem] text-muted",dateTime:e.timestamp,children:(0,p.format_time)(e.timestamp,o)}),(0,t.jsx)("span",{className:"min-w-0 overflow-wrap-anywhere whitespace-pre-wrap",children:e.text})]}),v]})}):(0,t.jsxs)("li",{className:g,children:[(0,t.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,t.jsx)("time",{className:"font-mono text-[0.72rem] text-muted",dateTime:e.timestamp,children:(0,p.format_time)(e.timestamp,o)}),v]}),(0,t.jsx)("p",{className:"m-0 overflow-wrap-anywhere text-[0.9rem] leading-snug whitespace-pre-wrap",children:e.text})]})}e.s(["EntryNotesList",0,function({notes:e,variant:n="panel",in_bar:i=!1,is_pending:s=!1,on_edit_note:o,on_delete_note:a}){var l;let c,u,d=(0,g.use_time_format)(),[p,h]=(0,r.useState)(null),[f,_]=(0,r.useState)("panel"===n&&!i);if(0===e.length)return null;let b=[...e].sort((e,t)=>new Date(e.timestamp).getTime()-new Date(t.timestamp).getTime()),v="inline"===n,y="panel"===n&&i,w=f||null!==p,j=(l=e.length,v?`${l} ${1===l?"note":"notes"}`:`Notes (${l})`),k=(c=[v?"m-0 w-full p-0":"border-t border-accent-border pt-3.5"],i&&!v&&c.push("border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))]"),y&&w?c.push("flex min-h-0 flex-1 flex-col"):y&&c.push("flex shrink-0 flex-col"),c.join(" ")),N=v?"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 font-inherit text-xs font-medium normal-case tracking-normal text-muted hover:text-foreground":"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent px-0 py-0.5 font-inherit text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted hover:text-foreground",S=(u=w?"mt-1.5":"hidden",v?`m-0 flex list-none flex-col gap-1.5 overflow-visible p-0 compact:gap-0.5 ${u}`:y?`m-0 grid min-h-0 flex-1 list-none auto-rows-fr grid-cols-2 gap-2 p-0 max-[860px]:grid-cols-1 ${u}`:`m-0 grid list-none grid-cols-2 gap-2 p-0 max-[860px]:grid-cols-1 ${u}`);return(0,t.jsxs)("section",{className:k,"aria-label":"Entry notes",children:[(0,t.jsxs)("button",{type:"button",className:N,"aria-expanded":w,onClick:e=>{e.stopPropagation(),null===p&&_(e=>!e)},children:[(0,t.jsx)(m,{rotated:w}),(0,t.jsx)("span",{children:j})]}),(0,t.jsx)("ul",{className:S,children:b.map((e,r)=>(0,t.jsx)(x,{note:e,is_inline:v,is_panel_in_bar:y,is_pending:s,is_editing:p===e.timestamp,time_format:d,on_cancel_edit:()=>h(null),on_save:t=>{var r,n;return r=e.timestamp,n=e.text,void(o?.(r,n,t),h(null))},on_start_edit:()=>{var t;return t=e.timestamp,void(_(!0),h(t))},on_delete:()=>{var t,r;return t=e.timestamp,r=e.text,void(p===t&&h(null),a?.(t,r))},on_edit_note:o,on_delete_note:a},`${e.timestamp}-${r}`))})]})}],4903),e.s(["get_delete_entry_confirm_dialog",0,function(e){let t=e.description.trim()||"Untitled entry",r=e.isActive?" This will stop the active timer.":"";return{title:"Delete entry?",message:`Delete "${t}" on sheet "${e.sheetName}"?${r}`,confirmLabel:"Delete",variant:"danger"}}],27707);var v=e.i(4874);e.s(["use_entry_list_sort",0,function(){return(0,r.useSyncExternalStore)(v.entry_list_sort_preference.subscribe,v.entry_list_sort_preference.get_snapshot,v.entry_list_sort_preference.get_server_snapshot)}],20397)},67999,e=>{"use strict";e.s(["get_serialized_entries_total_ms",0,function(e){return e.reduce((e,t)=>e+t.durationMs,0)}])},3159,e=>{"use strict";var t=e.i(97176);let r=new Set(["/api/note"]);async function n(e,n){let i={method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)},s=await fetch(e,i);if(!s.ok){var o,a;let t,n=(await s.json()).error??"Request failed";if(o=e,a=n,r.has(o)&&((t=a.toLowerCase()).includes("duplicate key")||t.includes("unique constraint"))){if(await new Promise(e=>{setTimeout(e,25)}),!(s=await fetch(e,i)).ok)throw Error((await s.json()).error??n)}else throw Error(n)}let l=await s.json();return(0,t.notify_tracker_db_cloud_sync)(e,n),l}e.s(["patch_tracker_action",0,n])},6838,e=>{e.v(t=>Promise.all(["static/chunks/0si6uh~uwlodv.js"].map(t=>e.l(t))).then(()=>t(19550)))},72432,e=>{e.v(t=>Promise.all(["static/chunks/0lke4ulbf-fg-.js"].map(t=>e.l(t))).then(()=>t(11791)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return o}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(78677)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",l=e.hash||"",o=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),o&&"object"==typeof o&&(o=String(a.urlQueryToSearchParams(o)));let u=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${l}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(29158);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(31047),s=e.r(63334);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return _},useLinkStatus:function(){return b}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),i=e.r(54710),l=a._(e.r(29158)),o=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),p=e.r(20321);e.r(90503);let f=e.r(38520),h=e.r(19947),m=e.r(59246),g=e.r(99046);function _(t){var r,n;let s,a,_,[b,y]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),v=(0,l.useRef)(null),{href:j,as:k,children:w,prefetch:N=null,passHref:S,replace:E,shallow:A,scroll:C,onClick:P,onMouseEnter:O,onTouchStart:T,legacyBehavior:I=!1,onNavigate:L,transitionTypes:R,ref:U,unstable_dynamicOnHover:D,...K}=t;s=w,I&&("string"==typeof s||"number"==typeof s)&&(s=(0,i.jsx)("a",{children:s}));let M=l.default.useContext(c.AppRouterContext),G=!1!==N,$=!1!==N?null===(n=N)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,W="string"==typeof(r=k||j)?r:(0,o.formatUrl)(r);if(I){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=l.default.Children.only(s)}let q=I?a&&"object"==typeof a&&a.ref:U,Y=l.default.useCallback(e=>(null!==M&&(v.current=(0,h.mountLinkInstance)(e,W,M,$,G,y)),()=>{v.current&&((0,h.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,h.unmountPrefetchableInstance)(e)}),[G,W,M,$,y]),B={ref:(0,u.useMergedRef)(Y,q),onClick(t){I||"function"!=typeof P||P(t),I&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!M||t.defaultPrevented||function(t,r,n,s,a,i,o){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);l.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,o)})}}(t,W,v,E,C,L,R)},onMouseEnter(e){I||"function"!=typeof O||O(e),I&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),M&&G&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){I||"function"!=typeof T||T(e),I&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),M&&G&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(W)?B.href=W:I&&!S&&("a"!==a.type||"href"in a.props)||(B.href=(0,p.addBasePath)(W)),_=I?l.default.cloneElement(a,B):(0,i.jsx)("a",{...K,...B,children:s}),(0,i.jsx)(x.Provider,{value:b,children:_})}e.r(10364);let x=(0,l.createContext)(h.IDLE_LINK_STATUS),b=()=>(0,l.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},37399,25204,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}],37399);var r=e.i(29158),n=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,t=!0){let s=(0,r.useRef)(e);s.current=e,(0,r.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||(0,n.is_modal_dialog_open)()||(e.preventDefault(),s.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t])}],25204)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),s=e.i(32417),a=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[i,l]=(0,r.useState)(null),[o,c]=(0,r.useState)(!1),u=(0,s.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{l(e?.user.email??null)}).catch(()=>{l(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{l(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:i,is_pending:o,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},75404,73205,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/",label:"Tracker",match:e=>"/"===e}];function a(){let e=(0,n.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":s?"page":void 0,children:n.label},n.href)})})}function i(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}var l=e.i(77882);function o(){let{email:e,is_configured:r}=(0,l.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(i,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}var c=e.i(29158),u=e.i(37399),d=e.i(90463),p=e.i(46549),f=e.i(22373);let h=new Set(f.topbar_quick_action_ids),m=["today","search","reporting","pomodoro"];function g(e){try{let t=JSON.parse(e);if(!Array.isArray(t))return m;let r=t.filter(e=>"string"==typeof e&&h.has(e));return Array.from(new Set(r))}catch{return m}}e.s(["parse_topbar_quick_actions",0,g],73205);var _=e.i(66295),x=e.i(34869),b=e.i(92629);let y=(0,x.create_ui_preference_store)({storage_key:b.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:b.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});var v=e.i(32792),j=e.i(90299),k=e.i(28274);function w(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function N(){return w()}function S(){return"dark"}var E=e.i(35434),A=e.i(17798),C=e.i(10464),P=e.i(61834),O=e.i(81553),T=e.i(25204);let I="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",L={today:{href:"/today",label:"Today"},search:{href:"/search",label:"Search"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},R=new Set(["manage-tags","pomodoro","sync-settings"]);function U(){let e=(0,n.useRouter)(),s=(0,n.usePathname)()??"/",a=(0,c.useSyncExternalStore)(E.subscribe_theme,N,S),i=(0,c.useSyncExternalStore)(y.subscribe,y.get_snapshot,y.get_server_snapshot),o=(0,c.useSyncExternalStore)(j.tracker_shortcut_map_preference.subscribe,j.tracker_shortcut_map_preference.get_snapshot,j.tracker_shortcut_map_preference.get_server_snapshot),h=(0,c.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),m=(0,_.parse_tracker_shortcut_map)(o),x=new Set(g(h)),b=f.topbar_quick_action_ids.filter(e=>!x.has(e)),U=Array.from(new Set([...Array.from(R),...b])),{email:D,is_configured:K,is_pending:M,sign_out:G}=(0,l.use_supabase_auth_session)(),[$,W]=(0,c.useState)(!1),q=(0,c.useRef)(null);(0,c.useEffect)(()=>{if(!$)return;let e=e=>{null===q.current||q.current.contains(e.target)||W(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[$]);let Y=()=>{W(!1)};return(0,T.use_escape_to_cancel)(Y,$),(0,t.jsxs)("div",{className:"relative shrink-0",ref:q,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":$,"aria-haspopup":"menu",onClick:()=>W(e=>!e),children:(0,t.jsx)(u.HamburgerIcon,{})}),$?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[K&&null!==D?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:D,children:D})}):null,U.map(e=>{let n=L[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:I,role:"menuitem",onClick:Y,children:n.label})},e)}),K?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitemcheckbox","aria-checked":"true"===i,onClick:()=>{let e="true"===i?"false":"true";y.write(e),y.notify(),(0,p.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==D&&(0,k.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===i?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===i?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitem",onClick:()=>{let e;Y(),e="dark"===w()?"light":"dark",(0,A.apply_theme)(e),(0,O.write_stored_theme)(e),C.theme_mode_preference.write(e),(0,P.write_document_preference_cookies)({theme_mode:e,theme:e}),C.theme_mode_preference.notify(),(0,E.notify_theme_subscribers)(),(0,p.notify_settings_saved)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===a?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===a?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitem",onClick:()=>{let e;Y(),e=m.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),K?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===D?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:I,role:"menuitem",onClick:()=>{Y(),e.push((0,d.build_auth_page_href)("sign_in",s))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${I} text-danger`,role:"menuitem",disabled:M,onClick:()=>{Y(),G()},children:M?"Signing out…":"Sign out"})})]}):null]}):null]})}let D=[{id:"today",href:"/today",label:"Today"},{id:"search",href:"/search",label:"Search"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];function K(){let e=(0,n.usePathname)()??"/",s=(0,c.useSyncExternalStore)(v.topbar_quick_actions_preference.subscribe,v.topbar_quick_actions_preference.get_snapshot,v.topbar_quick_actions_preference.get_server_snapshot),a=(0,c.useMemo)(()=>g(s),[s]);if(0===a.length)return null;let i=D.filter(e=>a.includes(e.id));return 0===i.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:i.map(n=>{let s=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":s?"page":void 0,children:n.label},n.id)})})}var M=e.i(29539);function G(){let e=((0,n.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(r.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(M.SettingsIcon,{})})}function $({current:e,parent:n}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:n.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)($,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(a,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(K,{}),(0,t.jsx)(o,{}),(0,t.jsx)(G,{}),(0,t.jsx)(U,{})]})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:n.href,"aria-current":s?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},77352,e=>{"use strict";var t=e.i(54710),r=e.i(42800),n=e.i(75404);e.s(["SettingsPageLayout",0,function({breadcrumb:e,title:s,description:a,children:i}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.TrackerTopbar,{breadcrumb:e}),(0,t.jsxs)("main",{className:"mx-auto grid w-full max-w-[1120px] grid-cols-[minmax(12rem,16rem)_minmax(0,1fr)] gap-4 px-4 pb-10 pt-5 sm:gap-6 sm:px-5 sm:pt-6 max-[860px]:grid-cols-1",children:[(0,t.jsxs)("aside",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Settings"}),(0,t.jsx)(r.SettingsNav,{})]}),(0,t.jsxs)("section",{className:"flex min-w-0 flex-col gap-4",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h1",{className:"m-0 text-[1.35rem] font-[650] tracking-tight",children:s}),void 0!==a?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:a}):null]}),i]})]})]})}])},69472,84545,50937,83327,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLAUDE_API_KEY_STORAGE_KEY,default_value:r.CLAUDE_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["claude_api_key_preference",0,n],69472);let s=(0,t.create_ui_preference_store)({storage_key:r.ENTRY_SUGGESTION_PROVIDER_STORAGE_KEY,default_value:r.ENTRY_SUGGESTION_PROVIDER_DEFAULT,is_valid:e=>"none"===e||"openai"===e||"claude"===e||"google_ai"===e});e.s(["entry_suggestion_provider_preference",0,s],84545);let a=(0,t.create_ui_preference_store)({storage_key:r.GOOGLE_AI_API_KEY_STORAGE_KEY,default_value:r.GOOGLE_AI_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["google_ai_api_key_preference",0,a],50937);let i=(0,t.create_ui_preference_store)({storage_key:r.OPENAI_API_KEY_STORAGE_KEY,default_value:r.OPENAI_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["openai_api_key_preference",0,i],83327)},28393,e=>{"use strict";var t=e.i(54710);e.s(["SettingRadioGroup",0,function({name:e,legend:r,description:n,value:s,options:a,disabled:i=!1,on_change:l}){var o;return(0,t.jsxs)("fieldset",{className:"m-0 border-0 p-0",children:[(0,t.jsx)("legend",{className:"m-0 mb-1 text-[0.95rem] font-semibold",children:r}),void 0!==n?(0,t.jsx)("p",{className:"m-0 mb-2 text-[0.8rem] leading-snug text-muted",children:n}):null,(0,t.jsx)("div",{className:(o=a.length)<=2||o<=4?"grid grid-cols-1 gap-1.5 sm:grid-cols-2":"grid grid-cols-1 gap-1.5 sm:grid-cols-2 lg:grid-cols-3",children:a.map(r=>{let n=r.value===s;return(0,t.jsxs)("label",{className:`flex h-full cursor-pointer flex-col gap-2 rounded-md border px-2.5 py-2 transition-colors duration-150 ${n?"border-accent-border bg-accent-soft":"border-panel-border hover:bg-surface-hover"}`,children:[(0,t.jsxs)("span",{className:"flex items-start gap-2",children:[(0,t.jsx)("input",{type:"radio",className:"mt-0.5 shrink-0",name:e,value:r.value,checked:n,disabled:i,onChange:()=>l(r.value)}),(0,t.jsx)("span",{className:"text-[0.9rem] font-semibold leading-snug",children:r.label})]}),void 0!==r.description?(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:r.description}):null]},r.value)})})]})}],28393)},29745,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(28393),s=e.i(77352),a=e.i(52405),i=e.i(69472),l=e.i(84545),o=e.i(50937),c=e.i(83327),u=e.i(7902);let d=[{value:"none",label:"Disabled",description:"Do not call any AI provider."},{value:"openai",label:"OpenAI",description:"Use OpenAI for suggestions."},{value:"claude",label:"Claude",description:"Use Claude for suggestions."},{value:"google_ai",label:"Google AI",description:"Use Gemini for suggestions."}],p=e=>{(0,u.persist_ui_preference)(l.entry_suggestion_provider_preference,e)};e.s(["EntrySuggestionsSettingsView",0,function(){let e=(0,r.useSyncExternalStore)(l.entry_suggestion_provider_preference.subscribe,l.entry_suggestion_provider_preference.get_snapshot,l.entry_suggestion_provider_preference.get_server_snapshot),u=(0,r.useSyncExternalStore)(c.openai_api_key_preference.subscribe,c.openai_api_key_preference.get_snapshot,c.openai_api_key_preference.get_server_snapshot),f=(0,r.useSyncExternalStore)(i.claude_api_key_preference.subscribe,i.claude_api_key_preference.get_snapshot,i.claude_api_key_preference.get_server_snapshot),h=(0,r.useSyncExternalStore)(o.google_ai_api_key_preference.subscribe,o.google_ai_api_key_preference.get_snapshot,o.google_ai_api_key_preference.get_server_snapshot);return(0,t.jsx)(s.SettingsPageLayout,{breadcrumb:{current:"AI suggestions",parent:{label:"Settings",href:"/settings"}},title:"AI suggestions",description:"Choose an LLM provider and API key for entry description suggestions.",children:(0,t.jsxs)("ul",{className:"m-0 flex w-full list-none flex-col gap-2 p-0","aria-label":"AI suggestion settings",children:[(0,t.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,t.jsx)(n.SettingRadioGroup,{name:"entry-suggestion-provider",legend:"Suggestion provider",description:"The check-in form uses this provider when Suggest is clicked.",value:e,options:d,on_change:p})}),(0,t.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,t.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"OpenAI API key"}),(0,t.jsx)("input",{type:"password",className:(0,a.get_input_class_name)(),value:u,onChange:e=>{var t;return t=e.target.value,void(c.openai_api_key_preference.write(t.trim()),c.openai_api_key_preference.notify())},placeholder:"sk-...",autoComplete:"off"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Stored locally in your browser. Used only for suggestion requests."})]})}),(0,t.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,t.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Claude API key"}),(0,t.jsx)("input",{type:"password",className:(0,a.get_input_class_name)(),value:f,onChange:e=>{var t;return t=e.target.value,void(i.claude_api_key_preference.write(t.trim()),i.claude_api_key_preference.notify())},placeholder:"sk-ant-...",autoComplete:"off"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Stored locally in your browser. Used only for suggestion requests."})]})}),(0,t.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,t.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Google AI API key"}),(0,t.jsx)("input",{type:"password",className:(0,a.get_input_class_name)(),value:h,onChange:e=>{var t;return t=e.target.value,void(o.google_ai_api_key_preference.write(t.trim()),o.google_ai_api_key_preference.notify())},placeholder:"AIza...",autoComplete:"off"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Stored locally in your browser. Used only for suggestion requests."})]})})]})})}])}]);
|