super-time-tracker-ui 0.1.32 → 0.1.34
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/bin/stt-ui.js +4 -4
- package/dist/standalone/next-output/BUILD_ID +1 -1
- package/dist/standalone/next-output/app-path-routes-manifest.json +5 -0
- package/dist/standalone/next-output/build-manifest.json +5 -5
- package/dist/standalone/next-output/routes-manifest.json +30 -0
- package/dist/standalone/next-output/server/app/_global-error/page/build-manifest.json +2 -2
- 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 +2 -2
- package/dist/standalone/next-output/server/app/_not-found/page.js +1 -2
- 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/command-palette/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/command-palette/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/command-palette/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/command-palette/route.js +6 -0
- package/dist/standalone/next-output/server/app/api/command-palette/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/command-palette/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route.js +7 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/entries/search/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/entry/delete-bulk/route.js +1 -1
- 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/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/entry/merge/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/entry/merge/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/entry/merge/route.js +7 -0
- package/dist/standalone/next-output/server/app/api/entry/merge/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/entry/merge/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/entry/move/route.js +1 -1
- 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 +1 -1
- 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/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/entry/split/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/entry/split/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/entry/split/route.js +8 -0
- package/dist/standalone/next-output/server/app/api/entry/split/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/entry/split/route_client-reference-manifest.js +3 -0
- 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 +1 -1
- package/dist/standalone/next-output/server/app/api/in/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/note/route.js +1 -1
- 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/active/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sheet/active/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sheet/route.js +1 -1
- 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 +1 -1
- package/dist/standalone/next-output/server/app/api/state/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/import/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/import/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/sync/pull/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/pull/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/push/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/push/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/tags/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/tags/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/login/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/login/page.js +1 -2
- 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 +2 -2
- package/dist/standalone/next-output/server/app/offline/page.js +1 -2
- 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 +2 -2
- package/dist/standalone/next-output/server/app/page.js +2 -3
- 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 +2 -2
- package/dist/standalone/next-output/server/app/pomodoro/page.js +2 -3
- 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 +2 -2
- package/dist/standalone/next-output/server/app/register/page.js +1 -2
- 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 +2 -2
- package/dist/standalone/next-output/server/app/reporting/page.js +2 -3
- 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/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/search/page/build-manifest.json +17 -0
- package/dist/standalone/next-output/server/app/search/page/next-font-manifest.json +11 -0
- package/dist/standalone/next-output/server/app/search/page/react-loadable-manifest.json +1 -0
- package/dist/standalone/next-output/server/app/search/page/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/search/page.js +16 -0
- package/dist/standalone/next-output/server/app/search/page.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/search/page_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js +1 -2
- 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 +2 -2
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js +1 -2
- 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 +2 -2
- package/dist/standalone/next-output/server/app/settings/data/page.js +2 -3
- 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 +2 -2
- package/dist/standalone/next-output/server/app/settings/display/page.js +1 -2
- 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 +2 -2
- package/dist/standalone/next-output/server/app/settings/goals/page.js +2 -3
- 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 +2 -2
- package/dist/standalone/next-output/server/app/settings/notifications/page.js +1 -2
- 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 +2 -2
- package/dist/standalone/next-output/server/app/settings/page.js +2 -3
- 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 +2 -2
- package/dist/standalone/next-output/server/app/settings/pomodoro/page.js +2 -3
- 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 +2 -2
- package/dist/standalone/next-output/server/app/settings/quick-actions/page.js +1 -2
- 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 +2 -2
- package/dist/standalone/next-output/server/app/settings/tags/page.js +2 -3
- 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 +2 -2
- package/dist/standalone/next-output/server/app/sheets/page.js +2 -3
- 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 +2 -2
- package/dist/standalone/next-output/server/app/today/page.js +2 -3
- 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 +5 -0
- package/dist/standalone/next-output/server/chunks/0z~i_next_dist_esm_build_templates_app-route_0~jv_po.js +3 -0
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0ixkum3._.js → [root-of-the-server]__01ng47y._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0.ztg_g._.js → [root-of-the-server]__02bnr5q._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0daa86i._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0hwik-5._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0lbu8mm._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0n.~.zo._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0n~maxn._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0pave79._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0qj~x3r._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0skolig._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0traxfq._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0u_4s37._.js +3 -0
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0qxlpdo._.js → [root-of-the-server]__0vivr1t._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0vjnznw._.js +3 -0
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__01dpndl._.js → [root-of-the-server]__0wp5dks._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/{[root-of-the-server]__0g~~yai._.js → [root-of-the-server]__0~_od9c._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~gka7i._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~zviro._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__13y14r6._.js +3 -0
- package/dist/standalone/next-output/server/chunks/{_0y.amf.._.js → _009-tpl._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/_0p0-odp._.js +3 -0
- package/dist/standalone/next-output/server/chunks/{_0vzosja._.js → _0rz1whw._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_command-palette_route_actions_0n5r28j.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_entries_search_route_actions_09m9ljm.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_entry_merge_route_actions_047yt1x.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_entry_split_route_actions_0g-iltq.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_04bpslp._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0huho7_.js +4 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__052~wmx._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__07_7oid._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0x6yv3u._.js → [root-of-the-server]__0c786vx._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0gi2idc._.js → [root-of-the-server]__0d6wmgd._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0d9ak_~._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0d~vgg9._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0fzz02j._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0hpcspt._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0kp.3u5._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0yrs18n._.js → [root-of-the-server]__0laah33._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0n8s9zq._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0_wxrlk._.js → [root-of-the-server]__0teulir._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0hx9602._.js → [root-of-the-server]__0xp50ux._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0yz-q3-._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__113s7hk._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_002dssm._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_036rv.y._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_0_k2414._.js → _04.8jwp._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/_040_y99._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_07p~0bg._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0dxq_sx._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0fzq9xc._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0hcz.gb._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0hy_8.b._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0lhrvkv._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0m.iebm._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0nnp~ae._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0ntfdc9._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0p5_u-y._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0q214m8._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0q~8_bm._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0rv4ope._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0s_1q6-._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0s_yzxz._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0syjj1b._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0v9kigy._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0woiueg._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0zfyg1r._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0zgllyb._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_088~qfj._.js → _10~dvb4._.js} +3 -3
- package/dist/standalone/next-output/server/chunks/ssr/_11je2nt._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_1218olc._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_search_page_actions_0koh-tf.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_0isp.qn._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_0rm~268._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/components_0s502iu._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_reporting-view_tsx_0-0ofcv._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/components_supabase-auth-form_tsx_0s9lt-1._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_today-focus-view_tsx_0~eac-w._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +1 -1
- package/dist/standalone/next-output/server/middleware-build-manifest.js +5 -5
- package/dist/standalone/next-output/server/middleware-manifest.json +1 -1
- package/dist/standalone/next-output/server/next-font-manifest.js +1 -1
- package/dist/standalone/next-output/server/next-font-manifest.json +4 -0
- package/dist/standalone/next-output/server/pages/500.html +1 -1
- package/dist/standalone/next-output/static/chunks/0-pivfzfhyz.5.js +1 -0
- package/dist/standalone/next-output/static/chunks/0.e7_ejd.-kzx.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0x9s1xcq69ppx.js → 005x4jqipr75n.js} +5 -5
- package/dist/standalone/next-output/static/chunks/02~oo04e0po4k.css +3 -0
- package/dist/standalone/next-output/static/chunks/033lk~e30imyc.js +1 -0
- package/dist/standalone/next-output/static/chunks/03dh~3.gq~kw7.js +1 -0
- package/dist/standalone/next-output/static/chunks/04d2c_i-luh3o.js +1 -0
- package/dist/standalone/next-output/static/chunks/08sdj449boiec.js +1 -0
- package/dist/standalone/next-output/static/chunks/09u_29en-yaxy.js +1 -0
- package/dist/standalone/next-output/static/chunks/0aru5x_.qsjc3.js +1 -0
- package/dist/standalone/next-output/static/chunks/0c0i5ey6h8qet.js +1 -0
- package/dist/standalone/next-output/static/chunks/0c2088mpz.z.3.js +1 -0
- package/dist/standalone/next-output/static/chunks/0e7vf6ybvzpet.js +1 -0
- package/dist/standalone/next-output/static/chunks/0jn1~13s4qy3c.js +1 -0
- package/dist/standalone/next-output/static/chunks/0jwrz3zhj9oat.js +1 -0
- package/dist/standalone/next-output/static/chunks/0kehy4rq7thp9.js +1 -0
- package/dist/standalone/next-output/static/chunks/0mcmtes_owmfo.js +1 -0
- package/dist/standalone/next-output/static/chunks/0njpt~3f0nhto.js +1 -0
- package/dist/standalone/next-output/static/chunks/0pq_8wz65_8e..js +1 -0
- package/dist/standalone/next-output/static/chunks/0s5i31vj2y6n7.js +1 -0
- package/dist/standalone/next-output/static/chunks/0s_kkoslz7uoy.js +1 -0
- package/dist/standalone/next-output/static/chunks/0tee7--l8~1jx.js +1 -0
- package/dist/standalone/next-output/static/chunks/0xmqo9jexa_hl.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0ztw.xdr4egi9.js → 0y7vk2q__th4g.js} +2 -2
- package/dist/standalone/next-output/static/chunks/151m05291h.pl.js +1 -0
- package/dist/standalone/next-output/static/chunks/175d60.wup0de.js +1 -0
- package/dist/standalone/next-output/static/chunks/17gch824k4dm8.js +1 -0
- package/dist/standalone/next-output/static/chunks/{turbopack-09e2mm19twlrw.js → turbopack-01utszc95mtf1.js} +1 -1
- package/dist/standalone/package.json +13 -4
- package/dist/standalone/public/sw.js +1 -0
- package/package.json +13 -4
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0-xbdkv._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__00_xlkl._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__02io6cv._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__07sy349._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0l9xtqh._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0o1mjxc._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0s7i732._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wtdkb3._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__13n2uo8._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0-0rjzr._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__01xqr3d._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0_b2z9m._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0bowsf1._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0dvku3t._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0k~hq1g._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0wtu388._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_00aklen._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_00ic3j9._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_00x~ete._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_08qe8j9._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0_aptb7._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0axgv9-._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0c0txs~._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0cm4hy2._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0cxg26n._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0l6-7m4._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0s1f~0y._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0xrc5.~._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0y3ypyx._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0ycs85o._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0zk9gtm._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_13crob-._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_13y76jr._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/lib_0c0z4q-._.js +0 -3
- package/dist/standalone/next-output/static/chunks/0.4obx1-sv46-.js +0 -1
- package/dist/standalone/next-output/static/chunks/029pvmqxn_t4z.js +0 -1
- package/dist/standalone/next-output/static/chunks/04~.lbegcwd41.js +0 -1
- package/dist/standalone/next-output/static/chunks/05tg.ske01w0a.js +0 -1
- package/dist/standalone/next-output/static/chunks/06xf_oh5oqbs2.js +0 -1
- package/dist/standalone/next-output/static/chunks/09acxdggb87~w.js +0 -1
- package/dist/standalone/next-output/static/chunks/09tjbwcc~3p_e.js +0 -1
- package/dist/standalone/next-output/static/chunks/0ate7k1rcitu0.js +0 -1
- package/dist/standalone/next-output/static/chunks/0crn_fc6.6569.js +0 -1
- package/dist/standalone/next-output/static/chunks/0fkr5kz7p1r5l.js +0 -1
- package/dist/standalone/next-output/static/chunks/0lhj2p9.4g20~.js +0 -1
- package/dist/standalone/next-output/static/chunks/0o4zvrm3q.9k3.js +0 -1
- package/dist/standalone/next-output/static/chunks/0pqilbd~jphqs.css +0 -3
- package/dist/standalone/next-output/static/chunks/0q05k1wfzh4_a.js +0 -1
- package/dist/standalone/next-output/static/chunks/0vov8ngx9~8m2.js +0 -1
- package/dist/standalone/next-output/static/chunks/0watkjb-fw0vn.js +0 -1
- package/dist/standalone/next-output/static/chunks/0x5_m1_cuacap.js +0 -1
- package/dist/standalone/next-output/static/chunks/0xj4dodycy1oc.js +0 -1
- package/dist/standalone/next-output/static/chunks/0yi4m~~80yeqj.js +0 -1
- package/dist/standalone/next-output/static/chunks/12eaief5vtso9.js +0 -1
- package/dist/standalone/next-output/static/chunks/13-nw2q_c_9mk.js +0 -1
- package/dist/standalone/next-output/static/chunks/14jtaz5s.4ih1.js +0 -1
- /package/dist/standalone/next-output/static/{gS32e4Tv_70ot1IWBJddE → o0yrmO-jZI10Gicr4syI_}/_buildManifest.js +0 -0
- /package/dist/standalone/next-output/static/{gS32e4Tv_70ot1IWBJddE → o0yrmO-jZI10Gicr4syI_}/_clientMiddlewareManifest.js +0 -0
- /package/dist/standalone/next-output/static/{gS32e4Tv_70ot1IWBJddE → o0yrmO-jZI10Gicr4syI_}/_ssgManifest.js +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},68194,e=>{"use strict";var t=e.i(82214);e.s(["api_error_response",0,function(e,r=400){let i=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:i},{status:r})}])},29207,e=>{"use strict";var t=e.i(5313),r=e.i(36117);async function i(){if(!(0,t.is_supabase_configured)())return null;let e=await (0,r.create_server_supabase_client)(),{data:{user:i}}=await e.auth.getUser();return i?.id??null}e.s(["get_authenticated_user_id",0,i])},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},72507,e=>{"use strict";var t=e.i(60526),r=e.i(50227);let i="db.json",n=r.default.join(t.default.homedir(),".super-time-tracker"),s=r.default.join(n,i);e.s(["DB_FILE_NAME",0,i,"DB_PATH",0,s,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,"main"])},72127,30853,e=>{"use strict";e.s(["convert_json_db",0,function(e){let{sheets:t,version:r,activeSheetName:i}=e;return{version:r,activeSheetName:i,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:i,tags:n,notes:s})=>({id:e,description:i,tags:n,notes:s.map(({timestamp:e,text:t})=>({text:t,timestamp:new Date(e)})),start:new Date(t),end:null===r?null:new Date(r)}))}))}}],72127);var t=e.i(2157);async function r(e){try{await t.promises.mkdir(e,{recursive:!0})}catch(e){if("EEXIST"!==(null!==e&&"object"==typeof e&&"code"in e&&"string"==typeof e.code?e.code:null))throw e}}e.s(["ensure_dir_exists",0,r],30853)},93361,e=>{"use strict";var t=e.i(72507);function r(e,t=[],i=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==i&&void 0===t.find(({id:e})=>e===i))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:i}}e.s(["gen_db",0,function(){return{version:t.DB_VERSION,sheets:[r(t.DEFAULT_SHEET_NAME)],activeSheetName:t.DEFAULT_SHEET_NAME}},"gen_sheet",0,r])},24507,e=>{"use strict";var t=e.i(72507);let r={2:function(e){let{sheets:t,version:r,activeSheetName:i}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:i,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:i})=>({tags:[],notes:[],id:e,end:r,start:t,description:i}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:i}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:i,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:i,tags:n})=>({notes:[],tags:n,id:e,end:r,start:t,description:i}))}))}}};e.s(["migrate_json_db",0,function(e){let i=e,n=!1,s=void 0===i.version?1:i.version;if(s>t.DB_VERSION||s<1)throw Error(`Unknown DB version ${i.version}, cannot load.`);for(;s<t.DB_VERSION;){let e=s+1,t=r[e];if(void 0===t)throw Error(`Missing migration from version ${s} to ${e}.`);if((i=t(i)).version!==e)throw Error(`Invalid migration output for version ${e}.`);s=e,n=!0}return{json_db:i,did_migrate:n}}],24507)},16366,e=>{"use strict";e.s(["convert_db_to_json",0,function(e){let t=e.sheets.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entries:e.entries.map(e=>({id:e.id,description:e.description,tags:e.tags,start:e.start.getTime(),end:null===e.end?null:e.end.getTime(),notes:e.notes.map(e=>({text:e.text,timestamp:e.timestamp.getTime()}))}))}));return{version:e.version,activeSheetName:e.activeSheetName,sheets:t}}])},71786,32806,e=>{"use strict";var t=e.i(50227),r=e.i(2157),i=e.i(72507),n=e.i(72127),s=e.i(30853),a=e.i(93361),o=e.i(24507),l=e.i(16366);async function u(e,t=i.DB_PATH){let n=JSON.stringify((0,l.convert_db_to_json)(e));try{await r.promises.writeFile(t,n)}catch(e){throw Error(`Failed to save DB: ${String(e)}`,{cause:e})}}async function d(e=i.DB_PATH){let l,c=t.default.dirname(e);await (0,s.ensure_dir_exists)(c);try{await r.promises.access(e)}catch{let t=(0,a.gen_db)();return await u(t,e),t}let p=await r.promises.readFile(e,"utf-8");try{l=JSON.parse(p)}catch(t){throw Error(`DB at ${e} is invalid JSON: ${String(t)}`,{cause:t})}let _=(0,o.migrate_json_db)(l);l=_.json_db;let v=(0,n.convert_json_db)(l);return _.did_migrate&&await u(v,e),v}e.s(["write_local_db",0,u],32806),e.s(["read_local_db",0,d],71786)},27440,e=>{"use strict";var t=e.i(71786);async function r(e){return(0,t.read_local_db)(e)}e.s(["read_db",0,r])},18212,e=>{"use strict";var t=e.i(32806);async function r(e,r){await (0,t.write_local_db)(e,r)}e.s(["write_db",0,r])},93204,e=>{"use strict";e.s(["get_sheet",0,function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)throw Error(`Sheet ${t} not found`);return r}])},81207,76249,e=>{"use strict";e.s(["collect_known_tags",0,function(e){let t=new Set;for(let r of e.sheets)for(let e of r.entries)for(let r of e.tags){let e=r.trim();e.length>0&&t.add(e)}return[...t].sort((e,t)=>e.localeCompare(t))}],81207);var t=e.i(72507),r=e.i(29207),i=e.i(5313);async function n(){return!!(0,i.is_supabase_configured)()&&null!==await (0,r.get_authenticated_user_id)()}async function s(){return await n()?`Cloud sync (${"https://ctruizaqyeyidujmtxhc.supabase.co".trim()??"Supabase"})`:t.DB_PATH}e.s(["resolve_db_path_label",0,s],76249)},4760,95634,e=>{"use strict";var t=e.i(81207),r=e.i(76249),i=e.i(93204),n=e.i(27440),s=e.i(72507);function a(e,t,r){return{id:e.id,description:e.description,start:e.start.toISOString(),end:null===e.end?null:e.end.toISOString(),tags:e.tags,notes:e.notes.map(({timestamp:e,text:t})=>({timestamp:e.toISOString(),text:t})),sheetName:t,durationMs:function(e,t=Date.now()){let{end:r,start:i}=e;return Math.max(0,(null===r?t:+r)-i)}(e),isActive:r}}var o=e.i(93361),l=e.i(18212);async function u(e){let t=await (0,n.read_db)();t.sheets.some(({name:t})=>t===e)||t.sheets.push((0,o.gen_sheet)(e)),t.activeSheetName=e,await (0,l.write_db)(t)}async function d(e){let o=await (0,n.read_db)(),l=function(e,t){let r=t?.trim()??"";if(r.length>0&&e.sheets.some(e=>e.name===r))return r;if(null!==e.activeSheetName&&e.sheets.some(t=>t.name===e.activeSheetName))return e.activeSheetName;let i=e.sheets.find(e=>null!==e.activeEntryID);return void 0!==i?i.name:e.sheets[0]?.name??s.DEFAULT_SHEET_NAME}(o,e);o.activeSheetName!==l&&(await u(l),o.activeSheetName=l);let{sheets:d}=o,c=[];c=function(e,t){let r=[...e];switch(t){case"oldest":return r.sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime());case"duration":return r.sort((e,t)=>t.durationMs-e.durationMs);case"description":return r.sort((e,t)=>{let r=e.description.trim()||"Untitled entry",i=t.description.trim()||"Untitled entry";return r.localeCompare(i)});default:return r.sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime())}}(function(e){let{activeEntryID:t,entries:r,name:i}=e;return r.map(e=>a(e,i,t===e.id&&null===e.end))}((0,i.get_sheet)(o,l)),"newest");let p=function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)return null;let{activeEntryID:i,entries:n,name:s}=r;if(null===i)return null;let o=n.find(({id:e})=>e===i);return void 0===o?null:a(o,s,null===o.end)}(o,l),_=function(e){let t=[];for(let r of e.sheets){let{activeEntryID:e,entries:i,name:n}=r;if(null===e)continue;let s=i.find(({id:t})=>t===e);void 0!==s&&null===s.end&&t.push(a(s,n,!0))}return t}(o),v=p??_[0]??null;return{dbPath:await (0,r.resolve_db_path_label)(),activeSheetName:l,knownTags:(0,t.collect_known_tags)(o),sheets:d.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entryCount:e.entries.length,isActive:e.name===l,hasActiveEntry:null!==e.activeEntryID})),activeEntry:p,runningEntry:v,runningEntries:_,activeSheetEntries:c,activeSheetTotalMs:c.reduce((e,t)=>e+t.durationMs,0)}}e.s(["set_active_sheet",0,u],95634),e.s(["get_tracker_state",0,d],4760)},42094,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>e.charAt(0).toUpperCase()+e.slice(1)},72078,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.capitalize=void 0,r.capitalize=e.r(64311).__importDefault(e.r(42094)).default},99519,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});class i extends Error{_input;_detail;constructor(e,t){const r=void 0===t?`Invalid input: ${e}`:`Invalid input (${t}): ${e}`;super(r),this._input=e,this._detail=t??"",this.message=r,this.name="InvalidInputError",Object.setPrototypeOf(this,i.prototype)}get detail(){return this._detail}get input(){return this._input}}r.default=i},39021,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.InvalidInputError=void 0,r.InvalidInputError=e.r(64311).__importDefault(e.r(99519)).default},70998,(e,t,r)=>{"use strict";var i,n,s,a,o,l,u,d;Object.defineProperty(r,"__esModule",{value:!0}),r.Magnitudes=r.Multiples=r.Teens=r.Numbers=void 0,(o=i||(r.Numbers=i={}))[o.Zero=0]="Zero",o[o.One=1]="One",o[o.Two=2]="Two",o[o.Three=3]="Three",o[o.Four=4]="Four",o[o.Five=5]="Five",o[o.Six=6]="Six",o[o.Seven=7]="Seven",o[o.Eight=8]="Eight",o[o.Nine=9]="Nine",(l=n||(r.Teens=n={}))[l.Ten=10]="Ten",l[l.Eleven=11]="Eleven",l[l.Twelve=12]="Twelve",l[l.Thirteen=13]="Thirteen",l[l.Fourteen=14]="Fourteen",l[l.Fifteen=15]="Fifteen",l[l.Sixteen=16]="Sixteen",l[l.Seventeen=17]="Seventeen",l[l.Eighteen=18]="Eighteen",l[l.Nineteen=19]="Nineteen",(u=s||(r.Multiples=s={}))[u.Twenty=20]="Twenty",u[u.Thirty=30]="Thirty",u[u.Forty=40]="Forty",u[u.Fifty=50]="Fifty",u[u.Sixty=60]="Sixty",u[u.Seventy=70]="Seventy",u[u.Eighty=80]="Eighty",u[u.Ninety=90]="Ninety",(d=a||(r.Magnitudes=a={}))[d.Hundred=100]="Hundred",d[d.Thousand=1e3]="Thousand",d[d.Million=1e6]="Million",d[d.Billion=1e9]="Billion",d[d.Trillion=1e12]="Trillion",d[d.Quadrillion=1e15]="Quadrillion"},29892,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TEENS_WORDS=r.MULTIPLES_WORDS=r.MAGNITUDE_WORDS=r.NUMBER_WORDS=void 0;let i=e.r(70998);r.NUMBER_WORDS=Object.keys(i.Numbers).filter(e=>!Number.isFinite(+e)),r.MAGNITUDE_WORDS=Object.keys(i.Magnitudes).filter(e=>!Number.isFinite(+e)),r.MULTIPLES_WORDS=Object.keys(i.Multiples).filter(e=>!Number.isFinite(+e)),r.TEENS_WORDS=Object.keys(i.Teens).filter(e=>!Number.isFinite(+e))},15284,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let i=e.r(64311).__importStar(e.r(72078)),n=e.r(39021),s=e.r(70998),a=e.r(29892);r.default=e=>{let t=e.replace(/-/g," ").split(" "),r=0,o=null,l=null;for(let u=0;u<t.length;u++){let d=t[u].toLowerCase().replace(/\W/g,"");if("and"===d){null!==l&&(r+=l,l=null);continue}let c=i.capitalize(d);if(a.MULTIPLES_WORDS.includes(c)){if(null!==o)throw new n.InvalidInputError(e,"parsed two multiples in a row");if(null!==l)throw new n.InvalidInputError(e,"parsed a number before a multiple");o=s.Multiples[c]}else if(a.NUMBER_WORDS.includes(c)){let t=s.Numbers[c];if(null!==l)throw new n.InvalidInputError(e,"parsed two numbers in a row");null!==o?(r+=o+t,o=null):l=t}else if(a.MAGNITUDE_WORDS.includes(c)){let t=s.Magnitudes[c];if(null===l)throw new n.InvalidInputError(e,"parsed magnitude without number");r+=l*t,l=null,o=null}}return null!==l?r+=l:null!==o&&(r+=o),r}},32341,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.InvalidInputError=r.parse=void 0,r.parse=e.r(64311).__importDefault(e.r(15284)).default;let i=e.r(39021);Object.defineProperty(r,"InvalidInputError",{enumerable:!0,get:function(){return i.InvalidInputError}})},95426,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>e[0].toUpperCase()+e.slice(1)},66756,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>new Date(Date.now()-e)},44954,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>new Date(Date.now()+e)},97881,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getFutureDate=r.getPastDate=r.capitalize=void 0;let i=e.r(64311);r.capitalize=i.__importDefault(e.r(95426)).default,r.getPastDate=i.__importDefault(e.r(66756)).default,r.getFutureDate=i.__importDefault(e.r(44954)).default},44606,(e,t,r)=>{t.exports=function(e){return void 0===e}},22748,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let i=e.r(64311).__importDefault(e.r(44606));class n extends Error{_input;_detail;constructor(e,t){const r=(0,i.default)(t)?`Invalid input: ${e}`:`Invalid input (${t}): ${e}`;super(r),this._input=e,this._detail=t??"",this.message=r,this.name="InvalidInputError",Object.setPrototypeOf(this,n.prototype)}get detail(){return this._detail}get input(){return this._input}}r.default=n},61384,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.InvalidInputError=void 0,r.InvalidInputError=e.r(64311).__importDefault(e.r(22748)).default},54459,(e,t,r)=>{"use strict";var i,n,s,a;Object.defineProperty(r,"__esModule",{value:!0}),r.TimeUnitPlural=r.TimeUnit=void 0,(s=i||(r.TimeUnit=i={}))[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Month=2592e6]="Month",s[s.Year=31536e6]="Year",s[s.Decade=31536e7]="Decade",s[s.Century=31536e8]="Century",(a=n||(r.TimeUnitPlural=n={}))[a.Milliseconds=1]="Milliseconds",a[a.Seconds=1e3]="Seconds",a[a.Minutes=6e4]="Minutes",a[a.Hours=36e5]="Hours",a[a.Days=864e5]="Days",a[a.Weeks=6048e5]="Weeks",a[a.Months=2592e6]="Months",a[a.Years=31536e6]="Years",a[a.Decades=31536e7]="Decades",a[a.Centuries=31536e8]="Centuries"},86520,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let i=e.r(64311),n=e.r(32341),s=i.__importStar(e.r(97881)),a=i.__importStar(e.r(61384)),o=e.r(54459);r.default=e=>{let t=Date.parse(e);if(Number.isFinite(t))return new Date(t);let r=e.toLowerCase().trim().split(" "),i=0,l=!1,u=!1,d=null;for(let t=0;t<r.length;t++){let c=r[t].replace(/\W/g,"");try{let e=(0,n.parse)(c);0!==e&&(c=`${e}`)}catch(e){}if("and"!==c){if("in"===c||"ago"===c){if("in"===c?u=!0:"ago"===c&&(l=!0),l&&u)throw new a.InvalidInputError(e,"cannot be both in the past and in the future");continue}if("a"===c)d=1;else if(Number.isFinite(+c)){if(null!==d)throw new a.InvalidInputError(e,`quantity already specified: ${d}`);d=+c}else{let t=s.capitalize(c),r=o.TimeUnit[t]??o.TimeUnitPlural[t];if(void 0===r)throw new a.InvalidInputError(e,`invalid unit: ${c}`);i+=(d??1)*r,d=null}}}return l?s.getPastDate(i):u?s.getFutureDate(i):i}},12044,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parse=r.InvalidInputError=void 0;let i=e.r(64311).__importDefault(e.r(86520));r.parse=i.default;let n=e.r(61384);Object.defineProperty(r,"InvalidInputError",{enumerable:!0,get:function(){return n.InvalidInputError}}),r.default=i.default},64562,e=>{"use strict";var t=e.i(12044);e.s(["parse_natural_language_date",0,function(e){let r=e.trim();if(0===r.length)throw Error("Time expression is required");try{let e=(0,t.default)(r);return new Date(+e)}catch(e){if(e instanceof t.InvalidInputError)throw Error(`Could not parse time: ${r}`,{cause:e});throw e}}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0l9xtqh._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},68194,e=>{"use strict";var t=e.i(82214);e.s(["api_error_response",0,function(e,r=400){let n=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:n},{status:r})}])},29207,e=>{"use strict";var t=e.i(5313),r=e.i(36117);async function n(){if(!(0,t.is_supabase_configured)())return null;let e=await (0,r.create_server_supabase_client)(),{data:{user:n}}=await e.auth.getUser();return n?.id??null}e.s(["get_authenticated_user_id",0,n])},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},72507,e=>{"use strict";var t=e.i(60526),r=e.i(50227);let n="db.json",a=r.default.join(t.default.homedir(),".super-time-tracker"),i=r.default.join(a,n);e.s(["DB_FILE_NAME",0,n,"DB_PATH",0,i,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,"main"])},72127,30853,e=>{"use strict";e.s(["convert_json_db",0,function(e){let{sheets:t,version:r,activeSheetName:n}=e;return{version:r,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:a,notes:i})=>({id:e,description:n,tags:a,notes:i.map(({timestamp:e,text:t})=>({text:t,timestamp:new Date(e)})),start:new Date(t),end:null===r?null:new Date(r)}))}))}}],72127);var t=e.i(2157);async function r(e){try{await t.promises.mkdir(e,{recursive:!0})}catch(e){if("EEXIST"!==(null!==e&&"object"==typeof e&&"code"in e&&"string"==typeof e.code?e.code:null))throw e}}e.s(["ensure_dir_exists",0,r],30853)},93361,e=>{"use strict";var t=e.i(72507);function r(e,t=[],n=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==n&&void 0===t.find(({id:e})=>e===n))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:n}}e.s(["gen_db",0,function(){return{version:t.DB_VERSION,sheets:[r(t.DEFAULT_SHEET_NAME)],activeSheetName:t.DEFAULT_SHEET_NAME}},"gen_sheet",0,r])},24507,e=>{"use strict";var t=e.i(72507);let r={2:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n})=>({tags:[],notes:[],id:e,end:r,start:t,description:n}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:a})=>({notes:[],tags:a,id:e,end:r,start:t,description:n}))}))}}};e.s(["migrate_json_db",0,function(e){let n=e,a=!1,i=void 0===n.version?1:n.version;if(i>t.DB_VERSION||i<1)throw Error(`Unknown DB version ${n.version}, cannot load.`);for(;i<t.DB_VERSION;){let e=i+1,t=r[e];if(void 0===t)throw Error(`Missing migration from version ${i} to ${e}.`);if((n=t(n)).version!==e)throw Error(`Invalid migration output for version ${e}.`);i=e,a=!0}return{json_db:n,did_migrate:a}}],24507)},16366,e=>{"use strict";e.s(["convert_db_to_json",0,function(e){let t=e.sheets.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entries:e.entries.map(e=>({id:e.id,description:e.description,tags:e.tags,start:e.start.getTime(),end:null===e.end?null:e.end.getTime(),notes:e.notes.map(e=>({text:e.text,timestamp:e.timestamp.getTime()}))}))}));return{version:e.version,activeSheetName:e.activeSheetName,sheets:t}}])},71786,32806,e=>{"use strict";var t=e.i(50227),r=e.i(2157),n=e.i(72507),a=e.i(72127),i=e.i(30853),s=e.i(93361),o=e.i(24507),l=e.i(16366);async function u(e,t=n.DB_PATH){let a=JSON.stringify((0,l.convert_db_to_json)(e));try{await r.promises.writeFile(t,a)}catch(e){throw Error(`Failed to save DB: ${String(e)}`,{cause:e})}}async function d(e=n.DB_PATH){let l,c=t.default.dirname(e);await (0,i.ensure_dir_exists)(c);try{await r.promises.access(e)}catch{let t=(0,s.gen_db)();return await u(t,e),t}let p=await r.promises.readFile(e,"utf-8");try{l=JSON.parse(p)}catch(t){throw Error(`DB at ${e} is invalid JSON: ${String(t)}`,{cause:t})}let h=(0,o.migrate_json_db)(l);l=h.json_db;let v=(0,a.convert_json_db)(l);return h.did_migrate&&await u(v,e),v}e.s(["write_local_db",0,u],32806),e.s(["read_local_db",0,d],71786)},27440,e=>{"use strict";var t=e.i(71786);async function r(e){return(0,t.read_local_db)(e)}e.s(["read_db",0,r])},18212,e=>{"use strict";var t=e.i(32806);async function r(e,r){await (0,t.write_local_db)(e,r)}e.s(["write_db",0,r])},81207,76249,e=>{"use strict";e.s(["collect_known_tags",0,function(e){let t=new Set;for(let r of e.sheets)for(let e of r.entries)for(let r of e.tags){let e=r.trim();e.length>0&&t.add(e)}return[...t].sort((e,t)=>e.localeCompare(t))}],81207);var t=e.i(72507),r=e.i(29207),n=e.i(5313);async function a(){return!!(0,n.is_supabase_configured)()&&null!==await (0,r.get_authenticated_user_id)()}async function i(){return await a()?`Cloud sync (${"https://ctruizaqyeyidujmtxhc.supabase.co".trim()??"Supabase"})`:t.DB_PATH}e.s(["resolve_db_path_label",0,i],76249)},93204,e=>{"use strict";e.s(["get_sheet",0,function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)throw Error(`Sheet ${t} not found`);return r}])},4760,95634,e=>{"use strict";var t=e.i(81207),r=e.i(76249),n=e.i(93204),a=e.i(27440),i=e.i(72507);function s(e,t,r){return{id:e.id,description:e.description,start:e.start.toISOString(),end:null===e.end?null:e.end.toISOString(),tags:e.tags,notes:e.notes.map(({timestamp:e,text:t})=>({timestamp:e.toISOString(),text:t})),sheetName:t,durationMs:function(e,t=Date.now()){let{end:r,start:n}=e;return Math.max(0,(null===r?t:+r)-n)}(e),isActive:r}}var o=e.i(93361),l=e.i(18212);async function u(e){let t=await (0,a.read_db)();t.sheets.some(({name:t})=>t===e)||t.sheets.push((0,o.gen_sheet)(e)),t.activeSheetName=e,await (0,l.write_db)(t)}async function d(e){let o=await (0,a.read_db)(),l=function(e,t){let r=t?.trim()??"";if(r.length>0&&e.sheets.some(e=>e.name===r))return r;if(null!==e.activeSheetName&&e.sheets.some(t=>t.name===e.activeSheetName))return e.activeSheetName;let n=e.sheets.find(e=>null!==e.activeEntryID);return void 0!==n?n.name:e.sheets[0]?.name??i.DEFAULT_SHEET_NAME}(o,e);o.activeSheetName!==l&&(await u(l),o.activeSheetName=l);let{sheets:d}=o,c=[];c=function(e,t){let r=[...e];switch(t){case"oldest":return r.sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime());case"duration":return r.sort((e,t)=>t.durationMs-e.durationMs);case"description":return r.sort((e,t)=>{let r=e.description.trim()||"Untitled entry",n=t.description.trim()||"Untitled entry";return r.localeCompare(n)});default:return r.sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime())}}(function(e){let{activeEntryID:t,entries:r,name:n}=e;return r.map(e=>s(e,n,t===e.id&&null===e.end))}((0,n.get_sheet)(o,l)),"newest");let p=function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)return null;let{activeEntryID:n,entries:a,name:i}=r;if(null===n)return null;let o=a.find(({id:e})=>e===n);return void 0===o?null:s(o,i,null===o.end)}(o,l),h=function(e){let t=[];for(let r of e.sheets){let{activeEntryID:e,entries:n,name:a}=r;if(null===e)continue;let i=n.find(({id:t})=>t===e);void 0!==i&&null===i.end&&t.push(s(i,a,!0))}return t}(o),v=p??h[0]??null;return{dbPath:await (0,r.resolve_db_path_label)(),activeSheetName:l,knownTags:(0,t.collect_known_tags)(o),sheets:d.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entryCount:e.entries.length,isActive:e.name===l,hasActiveEntry:null!==e.activeEntryID})),activeEntry:p,runningEntry:v,runningEntries:h,activeSheetEntries:c,activeSheetTotalMs:c.reduce((e,t)=>e+t.durationMs,0)}}e.s(["set_active_sheet",0,u],95634),e.s(["get_tracker_state",0,d],4760)},44373,e=>{"use strict";var t=e.i(973),r=e.i(39210),n=e.i(13132),a=e.i(14579),i=e.i(47092),s=e.i(34740),o=e.i(77667),l=e.i(11979),u=e.i(54202),d=e.i(39093),c=e.i(95106),p=e.i(57255),h=e.i(96492),v=e.i(27930),m=e.i(24131),f=e.i(93695);e.i(20216);var _=e.i(84975),g=e.i(82214),E=e.i(68194),w=e.i(4760);async function x(){try{let e=await (0,w.get_tracker_state)();return g.NextResponse.json(e)}catch(e){return(0,E.api_error_response)(e)}}e.s(["GET",0,x],80755);var y=e.i(80755);let R=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/state/route",pathname:"/api/state",filename:"route",bundlePath:""},distDir:"next-output",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/state/route.ts",nextConfigOutput:"standalone",userland:y,...{}}),{workAsyncStorage:S,workUnitAsyncStorage:b,serverHooks:N}=R;async function D(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),R.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/state/route";g=g.replace(/\/index$/,"")||"/";let E=await R.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,deploymentId:x,params:y,nextConfig:S,parsedUrl:b,isDraftMode:N,prerenderManifest:D,routerServerContext:T,isOnDemandRevalidate:A,revalidateOnlyGenerated:C,resolvedPathname:I,clientReferenceManifest:j,serverActionsManifest:O}=E,k=(0,o.normalizeAppPath)(g),P=!!(D.dynamicRoutes[k]||D.routes[I]),q=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,b,!1):t.end("This page could not be found"),null);if(P&&!N){let e=!!D.routes[I],t=D.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(S.adapterPath)return await q();throw new f.NoFallbackError}}let M=null;!P||R.isDev||N||(M="/index"===(M=I)?"/":M);let H=!0===R.isDev||!P,U=P&&!H;O&&j&&(0,s.setManifestsSingleton)({page:g,clientReferenceManifest:j,serverActionsManifest:O});let B=e.method||"GET",$=(0,i.getTracer)(),F=$.getActiveScopeSpan(),L=!!(null==T?void 0:T.isWrappedByNextServer),K=!!(0,a.getRequestMeta)(e,"minimalMode"),V=(0,a.getRequestMeta)(e,"incrementalCache")||await R.getIncrementalCache(e,S,D,K);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let G={params:y,previewProps:D.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts},cacheComponents:!!S.cacheComponents,supportsDynamicResponse:H,incrementalCache:V,cacheLifeProfiles:S.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>R.onRequestError(e,t,n,a,T)},sharedContext:{buildId:w,deploymentId:x}},X=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),W=u.NextRequestAdapter.fromNodeNextRequest(X,(0,u.signalFromNodeResponse)(t));try{let a,s=async e=>R.handle(W,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${B} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${B} ${g}`)}),o=async a=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&A&&C&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(a);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!P)return await (0,p.sendResponse)(X,J,i,G.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==G.renderOpts.collectedRevalidate&&!(G.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&G.renderOpts.collectedRevalidate,n=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:_.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,T),t}},u=await R.handleResponse({req:e,nextConfig:S,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:D,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:C,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:K});if(!P)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==_.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",A?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return K&&P||d.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,v.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(X,J,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};L&&F?await o(F):(a=$.getActiveScopeSpan(),await $.withPropagatedContext(e.headers,()=>$.trace(d.BaseServerSpan.handleRequest,{spanName:`${B} ${g}`,kind:i.SpanKind.SERVER,attributes:{"http.method":B,"http.target":e.url}},o),void 0,!L))}catch(t){if(t instanceof f.NoFallbackError||await R.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,T),P)throw t;return await (0,p.sendResponse)(X,J,new Response(null,{status:500})),null}}e.s(["handler",0,D,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:S,workUnitAsyncStorage:b})},"routeModule",0,R,"serverHooks",0,N,"workAsyncStorage",0,S,"workUnitAsyncStorage",0,b],44373)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0o1mjxc._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},68194,e=>{"use strict";var t=e.i(82214);e.s(["api_error_response",0,function(e,r=400){let i=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:i},{status:r})}])},29207,e=>{"use strict";var t=e.i(5313),r=e.i(36117);async function i(){if(!(0,t.is_supabase_configured)())return null;let e=await (0,r.create_server_supabase_client)(),{data:{user:i}}=await e.auth.getUser();return i?.id??null}e.s(["get_authenticated_user_id",0,i])},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},72507,e=>{"use strict";var t=e.i(60526),r=e.i(50227);let i="db.json",n=r.default.join(t.default.homedir(),".super-time-tracker"),s=r.default.join(n,i);e.s(["DB_FILE_NAME",0,i,"DB_PATH",0,s,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,"main"])},93361,e=>{"use strict";var t=e.i(72507);function r(e,t=[],i=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==i&&void 0===t.find(({id:e})=>e===i))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:i}}e.s(["gen_db",0,function(){return{version:t.DB_VERSION,sheets:[r(t.DEFAULT_SHEET_NAME)],activeSheetName:t.DEFAULT_SHEET_NAME}},"gen_sheet",0,r])},72127,30853,e=>{"use strict";e.s(["convert_json_db",0,function(e){let{sheets:t,version:r,activeSheetName:i}=e;return{version:r,activeSheetName:i,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:i,tags:n,notes:s})=>({id:e,description:i,tags:n,notes:s.map(({timestamp:e,text:t})=>({text:t,timestamp:new Date(e)})),start:new Date(t),end:null===r?null:new Date(r)}))}))}}],72127);var t=e.i(2157);async function r(e){try{await t.promises.mkdir(e,{recursive:!0})}catch(e){if("EEXIST"!==(null!==e&&"object"==typeof e&&"code"in e&&"string"==typeof e.code?e.code:null))throw e}}e.s(["ensure_dir_exists",0,r],30853)},24507,e=>{"use strict";var t=e.i(72507);let r={2:function(e){let{sheets:t,version:r,activeSheetName:i}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:i,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:i})=>({tags:[],notes:[],id:e,end:r,start:t,description:i}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:i}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:i,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:i,tags:n})=>({notes:[],tags:n,id:e,end:r,start:t,description:i}))}))}}};e.s(["migrate_json_db",0,function(e){let i=e,n=!1,s=void 0===i.version?1:i.version;if(s>t.DB_VERSION||s<1)throw Error(`Unknown DB version ${i.version}, cannot load.`);for(;s<t.DB_VERSION;){let e=s+1,t=r[e];if(void 0===t)throw Error(`Missing migration from version ${s} to ${e}.`);if((i=t(i)).version!==e)throw Error(`Invalid migration output for version ${e}.`);s=e,n=!0}return{json_db:i,did_migrate:n}}],24507)},16366,e=>{"use strict";e.s(["convert_db_to_json",0,function(e){let t=e.sheets.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entries:e.entries.map(e=>({id:e.id,description:e.description,tags:e.tags,start:e.start.getTime(),end:null===e.end?null:e.end.getTime(),notes:e.notes.map(e=>({text:e.text,timestamp:e.timestamp.getTime()}))}))}));return{version:e.version,activeSheetName:e.activeSheetName,sheets:t}}])},71786,32806,e=>{"use strict";var t=e.i(50227),r=e.i(2157),i=e.i(72507),n=e.i(72127),s=e.i(30853),a=e.i(93361),o=e.i(24507),l=e.i(16366);async function u(e,t=i.DB_PATH){let n=JSON.stringify((0,l.convert_db_to_json)(e));try{await r.promises.writeFile(t,n)}catch(e){throw Error(`Failed to save DB: ${String(e)}`,{cause:e})}}async function d(e=i.DB_PATH){let l,c=t.default.dirname(e);await (0,s.ensure_dir_exists)(c);try{await r.promises.access(e)}catch{let t=(0,a.gen_db)();return await u(t,e),t}let p=await r.promises.readFile(e,"utf-8");try{l=JSON.parse(p)}catch(t){throw Error(`DB at ${e} is invalid JSON: ${String(t)}`,{cause:t})}let _=(0,o.migrate_json_db)(l);l=_.json_db;let v=(0,n.convert_json_db)(l);return _.did_migrate&&await u(v,e),v}e.s(["write_local_db",0,u],32806),e.s(["read_local_db",0,d],71786)},27440,e=>{"use strict";var t=e.i(71786);async function r(e){return(0,t.read_local_db)(e)}e.s(["read_db",0,r])},18212,e=>{"use strict";var t=e.i(32806);async function r(e,r){await (0,t.write_local_db)(e,r)}e.s(["write_db",0,r])},93204,e=>{"use strict";e.s(["get_sheet",0,function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)throw Error(`Sheet ${t} not found`);return r}])},81207,76249,e=>{"use strict";e.s(["collect_known_tags",0,function(e){let t=new Set;for(let r of e.sheets)for(let e of r.entries)for(let r of e.tags){let e=r.trim();e.length>0&&t.add(e)}return[...t].sort((e,t)=>e.localeCompare(t))}],81207);var t=e.i(72507),r=e.i(29207),i=e.i(5313);async function n(){return!!(0,i.is_supabase_configured)()&&null!==await (0,r.get_authenticated_user_id)()}async function s(){return await n()?`Cloud sync (${"https://ctruizaqyeyidujmtxhc.supabase.co".trim()??"Supabase"})`:t.DB_PATH}e.s(["resolve_db_path_label",0,s],76249)},4760,95634,e=>{"use strict";var t=e.i(81207),r=e.i(76249),i=e.i(93204),n=e.i(27440),s=e.i(72507);function a(e,t,r){return{id:e.id,description:e.description,start:e.start.toISOString(),end:null===e.end?null:e.end.toISOString(),tags:e.tags,notes:e.notes.map(({timestamp:e,text:t})=>({timestamp:e.toISOString(),text:t})),sheetName:t,durationMs:function(e,t=Date.now()){let{end:r,start:i}=e;return Math.max(0,(null===r?t:+r)-i)}(e),isActive:r}}var o=e.i(93361),l=e.i(18212);async function u(e){let t=await (0,n.read_db)();t.sheets.some(({name:t})=>t===e)||t.sheets.push((0,o.gen_sheet)(e)),t.activeSheetName=e,await (0,l.write_db)(t)}async function d(e){let o=await (0,n.read_db)(),l=function(e,t){let r=t?.trim()??"";if(r.length>0&&e.sheets.some(e=>e.name===r))return r;if(null!==e.activeSheetName&&e.sheets.some(t=>t.name===e.activeSheetName))return e.activeSheetName;let i=e.sheets.find(e=>null!==e.activeEntryID);return void 0!==i?i.name:e.sheets[0]?.name??s.DEFAULT_SHEET_NAME}(o,e);o.activeSheetName!==l&&(await u(l),o.activeSheetName=l);let{sheets:d}=o,c=[];c=function(e,t){let r=[...e];switch(t){case"oldest":return r.sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime());case"duration":return r.sort((e,t)=>t.durationMs-e.durationMs);case"description":return r.sort((e,t)=>{let r=e.description.trim()||"Untitled entry",i=t.description.trim()||"Untitled entry";return r.localeCompare(i)});default:return r.sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime())}}(function(e){let{activeEntryID:t,entries:r,name:i}=e;return r.map(e=>a(e,i,t===e.id&&null===e.end))}((0,i.get_sheet)(o,l)),"newest");let p=function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)return null;let{activeEntryID:i,entries:n,name:s}=r;if(null===i)return null;let o=n.find(({id:e})=>e===i);return void 0===o?null:a(o,s,null===o.end)}(o,l),_=function(e){let t=[];for(let r of e.sheets){let{activeEntryID:e,entries:i,name:n}=r;if(null===e)continue;let s=i.find(({id:t})=>t===e);void 0!==s&&null===s.end&&t.push(a(s,n,!0))}return t}(o),v=p??_[0]??null;return{dbPath:await (0,r.resolve_db_path_label)(),activeSheetName:l,knownTags:(0,t.collect_known_tags)(o),sheets:d.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entryCount:e.entries.length,isActive:e.name===l,hasActiveEntry:null!==e.activeEntryID})),activeEntry:p,runningEntry:v,runningEntries:_,activeSheetEntries:c,activeSheetTotalMs:c.reduce((e,t)=>e+t.durationMs,0)}}e.s(["set_active_sheet",0,u],95634),e.s(["get_tracker_state",0,d],4760)},42094,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>e.charAt(0).toUpperCase()+e.slice(1)},72078,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.capitalize=void 0,r.capitalize=e.r(64311).__importDefault(e.r(42094)).default},99519,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});class i extends Error{_input;_detail;constructor(e,t){const r=void 0===t?`Invalid input: ${e}`:`Invalid input (${t}): ${e}`;super(r),this._input=e,this._detail=t??"",this.message=r,this.name="InvalidInputError",Object.setPrototypeOf(this,i.prototype)}get detail(){return this._detail}get input(){return this._input}}r.default=i},39021,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.InvalidInputError=void 0,r.InvalidInputError=e.r(64311).__importDefault(e.r(99519)).default},70998,(e,t,r)=>{"use strict";var i,n,s,a,o,l,u,d;Object.defineProperty(r,"__esModule",{value:!0}),r.Magnitudes=r.Multiples=r.Teens=r.Numbers=void 0,(o=i||(r.Numbers=i={}))[o.Zero=0]="Zero",o[o.One=1]="One",o[o.Two=2]="Two",o[o.Three=3]="Three",o[o.Four=4]="Four",o[o.Five=5]="Five",o[o.Six=6]="Six",o[o.Seven=7]="Seven",o[o.Eight=8]="Eight",o[o.Nine=9]="Nine",(l=n||(r.Teens=n={}))[l.Ten=10]="Ten",l[l.Eleven=11]="Eleven",l[l.Twelve=12]="Twelve",l[l.Thirteen=13]="Thirteen",l[l.Fourteen=14]="Fourteen",l[l.Fifteen=15]="Fifteen",l[l.Sixteen=16]="Sixteen",l[l.Seventeen=17]="Seventeen",l[l.Eighteen=18]="Eighteen",l[l.Nineteen=19]="Nineteen",(u=s||(r.Multiples=s={}))[u.Twenty=20]="Twenty",u[u.Thirty=30]="Thirty",u[u.Forty=40]="Forty",u[u.Fifty=50]="Fifty",u[u.Sixty=60]="Sixty",u[u.Seventy=70]="Seventy",u[u.Eighty=80]="Eighty",u[u.Ninety=90]="Ninety",(d=a||(r.Magnitudes=a={}))[d.Hundred=100]="Hundred",d[d.Thousand=1e3]="Thousand",d[d.Million=1e6]="Million",d[d.Billion=1e9]="Billion",d[d.Trillion=1e12]="Trillion",d[d.Quadrillion=1e15]="Quadrillion"},29892,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.TEENS_WORDS=r.MULTIPLES_WORDS=r.MAGNITUDE_WORDS=r.NUMBER_WORDS=void 0;let i=e.r(70998);r.NUMBER_WORDS=Object.keys(i.Numbers).filter(e=>!Number.isFinite(+e)),r.MAGNITUDE_WORDS=Object.keys(i.Magnitudes).filter(e=>!Number.isFinite(+e)),r.MULTIPLES_WORDS=Object.keys(i.Multiples).filter(e=>!Number.isFinite(+e)),r.TEENS_WORDS=Object.keys(i.Teens).filter(e=>!Number.isFinite(+e))},15284,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let i=e.r(64311).__importStar(e.r(72078)),n=e.r(39021),s=e.r(70998),a=e.r(29892);r.default=e=>{let t=e.replace(/-/g," ").split(" "),r=0,o=null,l=null;for(let u=0;u<t.length;u++){let d=t[u].toLowerCase().replace(/\W/g,"");if("and"===d){null!==l&&(r+=l,l=null);continue}let c=i.capitalize(d);if(a.MULTIPLES_WORDS.includes(c)){if(null!==o)throw new n.InvalidInputError(e,"parsed two multiples in a row");if(null!==l)throw new n.InvalidInputError(e,"parsed a number before a multiple");o=s.Multiples[c]}else if(a.NUMBER_WORDS.includes(c)){let t=s.Numbers[c];if(null!==l)throw new n.InvalidInputError(e,"parsed two numbers in a row");null!==o?(r+=o+t,o=null):l=t}else if(a.MAGNITUDE_WORDS.includes(c)){let t=s.Magnitudes[c];if(null===l)throw new n.InvalidInputError(e,"parsed magnitude without number");r+=l*t,l=null,o=null}}return null!==l?r+=l:null!==o&&(r+=o),r}},32341,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.InvalidInputError=r.parse=void 0,r.parse=e.r(64311).__importDefault(e.r(15284)).default;let i=e.r(39021);Object.defineProperty(r,"InvalidInputError",{enumerable:!0,get:function(){return i.InvalidInputError}})},95426,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>e[0].toUpperCase()+e.slice(1)},66756,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>new Date(Date.now()-e)},44954,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=e=>new Date(Date.now()+e)},97881,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.getFutureDate=r.getPastDate=r.capitalize=void 0;let i=e.r(64311);r.capitalize=i.__importDefault(e.r(95426)).default,r.getPastDate=i.__importDefault(e.r(66756)).default,r.getFutureDate=i.__importDefault(e.r(44954)).default},44606,(e,t,r)=>{t.exports=function(e){return void 0===e}},22748,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let i=e.r(64311).__importDefault(e.r(44606));class n extends Error{_input;_detail;constructor(e,t){const r=(0,i.default)(t)?`Invalid input: ${e}`:`Invalid input (${t}): ${e}`;super(r),this._input=e,this._detail=t??"",this.message=r,this.name="InvalidInputError",Object.setPrototypeOf(this,n.prototype)}get detail(){return this._detail}get input(){return this._input}}r.default=n},61384,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.InvalidInputError=void 0,r.InvalidInputError=e.r(64311).__importDefault(e.r(22748)).default},54459,(e,t,r)=>{"use strict";var i,n,s,a;Object.defineProperty(r,"__esModule",{value:!0}),r.TimeUnitPlural=r.TimeUnit=void 0,(s=i||(r.TimeUnit=i={}))[s.Millisecond=1]="Millisecond",s[s.Second=1e3]="Second",s[s.Minute=6e4]="Minute",s[s.Hour=36e5]="Hour",s[s.Day=864e5]="Day",s[s.Week=6048e5]="Week",s[s.Month=2592e6]="Month",s[s.Year=31536e6]="Year",s[s.Decade=31536e7]="Decade",s[s.Century=31536e8]="Century",(a=n||(r.TimeUnitPlural=n={}))[a.Milliseconds=1]="Milliseconds",a[a.Seconds=1e3]="Seconds",a[a.Minutes=6e4]="Minutes",a[a.Hours=36e5]="Hours",a[a.Days=864e5]="Days",a[a.Weeks=6048e5]="Weeks",a[a.Months=2592e6]="Months",a[a.Years=31536e6]="Years",a[a.Decades=31536e7]="Decades",a[a.Centuries=31536e8]="Centuries"},86520,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let i=e.r(64311),n=e.r(32341),s=i.__importStar(e.r(97881)),a=i.__importStar(e.r(61384)),o=e.r(54459);r.default=e=>{let t=Date.parse(e);if(Number.isFinite(t))return new Date(t);let r=e.toLowerCase().trim().split(" "),i=0,l=!1,u=!1,d=null;for(let t=0;t<r.length;t++){let c=r[t].replace(/\W/g,"");try{let e=(0,n.parse)(c);0!==e&&(c=`${e}`)}catch(e){}if("and"!==c){if("in"===c||"ago"===c){if("in"===c?u=!0:"ago"===c&&(l=!0),l&&u)throw new a.InvalidInputError(e,"cannot be both in the past and in the future");continue}if("a"===c)d=1;else if(Number.isFinite(+c)){if(null!==d)throw new a.InvalidInputError(e,`quantity already specified: ${d}`);d=+c}else{let t=s.capitalize(c),r=o.TimeUnit[t]??o.TimeUnitPlural[t];if(void 0===r)throw new a.InvalidInputError(e,`invalid unit: ${c}`);i+=(d??1)*r,d=null}}}return l?s.getPastDate(i):u?s.getFutureDate(i):i}},12044,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.parse=r.InvalidInputError=void 0;let i=e.r(64311).__importDefault(e.r(86520));r.parse=i.default;let n=e.r(61384);Object.defineProperty(r,"InvalidInputError",{enumerable:!0,get:function(){return n.InvalidInputError}}),r.default=i.default},64562,e=>{"use strict";var t=e.i(12044);e.s(["parse_natural_language_date",0,function(e){let r=e.trim();if(0===r.length)throw Error("Time expression is required");try{let e=(0,t.default)(r);return new Date(+e)}catch(e){if(e instanceof t.InvalidInputError)throw Error(`Could not parse time: ${r}`,{cause:e});throw e}}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0s7i732._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},68194,e=>{"use strict";var t=e.i(82214);e.s(["api_error_response",0,function(e,r=400){let n=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:n},{status:r})}])},29207,e=>{"use strict";var t=e.i(5313),r=e.i(36117);async function n(){if(!(0,t.is_supabase_configured)())return null;let e=await (0,r.create_server_supabase_client)(),{data:{user:n}}=await e.auth.getUser();return n?.id??null}e.s(["get_authenticated_user_id",0,n])},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},72507,e=>{"use strict";var t=e.i(60526),r=e.i(50227);let n="db.json",i=r.default.join(t.default.homedir(),".super-time-tracker"),a=r.default.join(i,n);e.s(["DB_FILE_NAME",0,n,"DB_PATH",0,a,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,"main"])},72127,30853,e=>{"use strict";e.s(["convert_json_db",0,function(e){let{sheets:t,version:r,activeSheetName:n}=e;return{version:r,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:i,notes:a})=>({id:e,description:n,tags:i,notes:a.map(({timestamp:e,text:t})=>({text:t,timestamp:new Date(e)})),start:new Date(t),end:null===r?null:new Date(r)}))}))}}],72127);var t=e.i(2157);async function r(e){try{await t.promises.mkdir(e,{recursive:!0})}catch(e){if("EEXIST"!==(null!==e&&"object"==typeof e&&"code"in e&&"string"==typeof e.code?e.code:null))throw e}}e.s(["ensure_dir_exists",0,r],30853)},93361,e=>{"use strict";var t=e.i(72507);function r(e,t=[],n=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==n&&void 0===t.find(({id:e})=>e===n))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:n}}e.s(["gen_db",0,function(){return{version:t.DB_VERSION,sheets:[r(t.DEFAULT_SHEET_NAME)],activeSheetName:t.DEFAULT_SHEET_NAME}},"gen_sheet",0,r])},24507,e=>{"use strict";var t=e.i(72507);let r={2:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n})=>({tags:[],notes:[],id:e,end:r,start:t,description:n}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:i})=>({notes:[],tags:i,id:e,end:r,start:t,description:n}))}))}}};e.s(["migrate_json_db",0,function(e){let n=e,i=!1,a=void 0===n.version?1:n.version;if(a>t.DB_VERSION||a<1)throw Error(`Unknown DB version ${n.version}, cannot load.`);for(;a<t.DB_VERSION;){let e=a+1,t=r[e];if(void 0===t)throw Error(`Missing migration from version ${a} to ${e}.`);if((n=t(n)).version!==e)throw Error(`Invalid migration output for version ${e}.`);a=e,i=!0}return{json_db:n,did_migrate:i}}],24507)},16366,e=>{"use strict";e.s(["convert_db_to_json",0,function(e){let t=e.sheets.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entries:e.entries.map(e=>({id:e.id,description:e.description,tags:e.tags,start:e.start.getTime(),end:null===e.end?null:e.end.getTime(),notes:e.notes.map(e=>({text:e.text,timestamp:e.timestamp.getTime()}))}))}));return{version:e.version,activeSheetName:e.activeSheetName,sheets:t}}])},71786,32806,e=>{"use strict";var t=e.i(50227),r=e.i(2157),n=e.i(72507),i=e.i(72127),a=e.i(30853),s=e.i(93361),o=e.i(24507),l=e.i(16366);async function u(e,t=n.DB_PATH){let i=JSON.stringify((0,l.convert_db_to_json)(e));try{await r.promises.writeFile(t,i)}catch(e){throw Error(`Failed to save DB: ${String(e)}`,{cause:e})}}async function d(e=n.DB_PATH){let l,c=t.default.dirname(e);await (0,a.ensure_dir_exists)(c);try{await r.promises.access(e)}catch{let t=(0,s.gen_db)();return await u(t,e),t}let p=await r.promises.readFile(e,"utf-8");try{l=JSON.parse(p)}catch(t){throw Error(`DB at ${e} is invalid JSON: ${String(t)}`,{cause:t})}let h=(0,o.migrate_json_db)(l);l=h.json_db;let v=(0,i.convert_json_db)(l);return h.did_migrate&&await u(v,e),v}e.s(["write_local_db",0,u],32806),e.s(["read_local_db",0,d],71786)},27440,e=>{"use strict";var t=e.i(71786);async function r(e){return(0,t.read_local_db)(e)}e.s(["read_db",0,r])},18212,e=>{"use strict";var t=e.i(32806);async function r(e,r){await (0,t.write_local_db)(e,r)}e.s(["write_db",0,r])},93204,e=>{"use strict";e.s(["get_sheet",0,function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)throw Error(`Sheet ${t} not found`);return r}])},81207,76249,e=>{"use strict";e.s(["collect_known_tags",0,function(e){let t=new Set;for(let r of e.sheets)for(let e of r.entries)for(let r of e.tags){let e=r.trim();e.length>0&&t.add(e)}return[...t].sort((e,t)=>e.localeCompare(t))}],81207);var t=e.i(72507),r=e.i(29207),n=e.i(5313);async function i(){return!!(0,n.is_supabase_configured)()&&null!==await (0,r.get_authenticated_user_id)()}async function a(){return await i()?`Cloud sync (${"https://ctruizaqyeyidujmtxhc.supabase.co".trim()??"Supabase"})`:t.DB_PATH}e.s(["resolve_db_path_label",0,a],76249)},4760,95634,e=>{"use strict";var t=e.i(81207),r=e.i(76249),n=e.i(93204),i=e.i(27440),a=e.i(72507);function s(e,t,r){return{id:e.id,description:e.description,start:e.start.toISOString(),end:null===e.end?null:e.end.toISOString(),tags:e.tags,notes:e.notes.map(({timestamp:e,text:t})=>({timestamp:e.toISOString(),text:t})),sheetName:t,durationMs:function(e,t=Date.now()){let{end:r,start:n}=e;return Math.max(0,(null===r?t:+r)-n)}(e),isActive:r}}var o=e.i(93361),l=e.i(18212);async function u(e){let t=await (0,i.read_db)();t.sheets.some(({name:t})=>t===e)||t.sheets.push((0,o.gen_sheet)(e)),t.activeSheetName=e,await (0,l.write_db)(t)}async function d(e){let o=await (0,i.read_db)(),l=function(e,t){let r=t?.trim()??"";if(r.length>0&&e.sheets.some(e=>e.name===r))return r;if(null!==e.activeSheetName&&e.sheets.some(t=>t.name===e.activeSheetName))return e.activeSheetName;let n=e.sheets.find(e=>null!==e.activeEntryID);return void 0!==n?n.name:e.sheets[0]?.name??a.DEFAULT_SHEET_NAME}(o,e);o.activeSheetName!==l&&(await u(l),o.activeSheetName=l);let{sheets:d}=o,c=[];c=function(e,t){let r=[...e];switch(t){case"oldest":return r.sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime());case"duration":return r.sort((e,t)=>t.durationMs-e.durationMs);case"description":return r.sort((e,t)=>{let r=e.description.trim()||"Untitled entry",n=t.description.trim()||"Untitled entry";return r.localeCompare(n)});default:return r.sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime())}}(function(e){let{activeEntryID:t,entries:r,name:n}=e;return r.map(e=>s(e,n,t===e.id&&null===e.end))}((0,n.get_sheet)(o,l)),"newest");let p=function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)return null;let{activeEntryID:n,entries:i,name:a}=r;if(null===n)return null;let o=i.find(({id:e})=>e===n);return void 0===o?null:s(o,a,null===o.end)}(o,l),h=function(e){let t=[];for(let r of e.sheets){let{activeEntryID:e,entries:n,name:i}=r;if(null===e)continue;let a=n.find(({id:t})=>t===e);void 0!==a&&null===a.end&&t.push(s(a,i,!0))}return t}(o),v=p??h[0]??null;return{dbPath:await (0,r.resolve_db_path_label)(),activeSheetName:l,knownTags:(0,t.collect_known_tags)(o),sheets:d.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entryCount:e.entries.length,isActive:e.name===l,hasActiveEntry:null!==e.activeEntryID})),activeEntry:p,runningEntry:v,runningEntries:h,activeSheetEntries:c,activeSheetTotalMs:c.reduce((e,t)=>e+t.durationMs,0)}}e.s(["set_active_sheet",0,u],95634),e.s(["get_tracker_state",0,d],4760)},46424,e=>{"use strict";var t=e.i(973),r=e.i(39210),n=e.i(13132),i=e.i(14579),a=e.i(47092),s=e.i(34740),o=e.i(77667),l=e.i(11979),u=e.i(54202),d=e.i(39093),c=e.i(95106),p=e.i(57255),h=e.i(96492),v=e.i(27930),m=e.i(24131),f=e.i(93695);e.i(20216);var _=e.i(84975),g=e.i(82214),w=e.i(68194),E=e.i(93204),y=e.i(27440),x=e.i(18212);async function b(e){let{entries:t}=e;if(0===t.length)throw Error("No entries selected");let r=await (0,y.read_db)(),n=new Set,i=new Map;for(let{entry_id:e,sheet_name:r}of t){let t=`${r}:${e}`;if(n.has(t))continue;n.add(t);let a=i.get(r)??[];a.push(e),i.set(r,a)}for(let[e,t]of i){let n=(0,E.get_sheet)(r,e);for(let e of[...t].sort((e,t)=>t-e)){let t=n.entries.findIndex(({id:t})=>t===e);-1!==t&&(n.activeEntryID===e&&(n.activeEntryID=null),n.entries.splice(t,1))}}await (0,x.write_db)(r)}var S=e.i(4760);async function R(e){try{let t=(await e.json()).entries??[];if(0===t.length)return(0,w.api_error_response)(Error("No entries selected"));let r=t.map((e,t)=>{let r=e.sheetName?.trim()??"",n=e.entryId;if(0===r.length)throw Error(`Entry ${t+1} is missing a sheet name`);if(void 0===n||!Number.isFinite(n))throw Error(`Entry ${t+1} is missing an entry id`);return{sheet_name:r,entry_id:n}});await b({entries:r});let n=await (0,S.get_tracker_state)();return g.NextResponse.json(n)}catch(e){return(0,w.api_error_response)(e)}}e.s(["POST",0,R],64506);var N=e.i(64506);let D=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/entry/delete-bulk/route",pathname:"/api/entry/delete-bulk",filename:"route",bundlePath:""},distDir:"next-output",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/entry/delete-bulk/route.ts",nextConfigOutput:"standalone",userland:N,...{}}),{workAsyncStorage:T,workUnitAsyncStorage:A,serverHooks:I}=D;async function C(e,t,n){n.requestMeta&&(0,i.setRequestMeta)(e,n.requestMeta),D.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/entry/delete-bulk/route";g=g.replace(/\/index$/,"")||"/";let w=await D.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:E,deploymentId:y,params:x,nextConfig:b,parsedUrl:S,isDraftMode:R,prerenderManifest:N,routerServerContext:T,isOnDemandRevalidate:A,revalidateOnlyGenerated:I,resolvedPathname:C,clientReferenceManifest:k,serverActionsManifest:j}=w,O=(0,o.normalizeAppPath)(g),P=!!(N.dynamicRoutes[O]||N.routes[C]),q=async()=>((null==T?void 0:T.render404)?await T.render404(e,t,S,!1):t.end("This page could not be found"),null);if(P&&!R){let e=!!N.routes[C],t=N.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await q();throw new f.NoFallbackError}}let M=null;!P||D.isDev||R||(M="/index"===(M=C)?"/":M);let H=!0===D.isDev||!P,U=P&&!H;j&&k&&(0,s.setManifestsSingleton)({page:g,clientReferenceManifest:k,serverActionsManifest:j});let $=e.method||"GET",B=(0,a.getTracer)(),F=B.getActiveScopeSpan(),L=!!(null==T?void 0:T.isWrappedByNextServer),K=!!(0,i.getRequestMeta)(e,"minimalMode"),V=(0,i.getRequestMeta)(e,"incrementalCache")||await D.getIncrementalCache(e,b,N,K);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let X={params:x,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:H,incrementalCache:V,cacheLifeProfiles:b.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,i)=>D.onRequestError(e,t,n,i,T)},sharedContext:{buildId:E,deploymentId:y}},G=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),W=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let i,s=async e=>D.handle(W,X).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=B.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${$} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",n),i.updateName(t))}else e.updateName(`${$} ${g}`)}),o=async i=>{var a,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&A&&I&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await s(i);e.fetchMetrics=X.renderOpts.fetchMetrics;let o=X.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=X.renderOpts.collectedTags;if(!P)return await (0,p.sendResponse)(G,J,a,X.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:X.renderOpts.collectedExpire;return{value:{kind:_.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await D.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,T),t}},u=await D.handleResponse({req:e,nextConfig:b,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:I,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:K});if(!P)return null;if((null==u||null==(a=u.value)?void 0:a.kind)!==_.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",A?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),R&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return K&&P||d.delete(m.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,v.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(G,J,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};L&&F?await o(F):(i=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(d.BaseServerSpan.handleRequest,{spanName:`${$} ${g}`,kind:a.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},o),void 0,!L))}catch(t){if(t instanceof f.NoFallbackError||await D.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,T),P)throw t;return await (0,p.sendResponse)(G,J,new Response(null,{status:500})),null}}e.s(["handler",0,C,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:A})},"routeModule",0,D,"serverHooks",0,I,"workAsyncStorage",0,T,"workUnitAsyncStorage",0,A],46424)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0wtdkb3._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},68194,e=>{"use strict";var t=e.i(82214);e.s(["api_error_response",0,function(e,r=400){let n=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:n},{status:r})}])},29207,e=>{"use strict";var t=e.i(5313),r=e.i(36117);async function n(){if(!(0,t.is_supabase_configured)())return null;let e=await (0,r.create_server_supabase_client)(),{data:{user:n}}=await e.auth.getUser();return n?.id??null}e.s(["get_authenticated_user_id",0,n])},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},72507,e=>{"use strict";var t=e.i(60526),r=e.i(50227);let n="db.json",a=r.default.join(t.default.homedir(),".super-time-tracker"),i=r.default.join(a,n);e.s(["DB_FILE_NAME",0,n,"DB_PATH",0,i,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,"main"])},72127,30853,e=>{"use strict";e.s(["convert_json_db",0,function(e){let{sheets:t,version:r,activeSheetName:n}=e;return{version:r,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:a,notes:i})=>({id:e,description:n,tags:a,notes:i.map(({timestamp:e,text:t})=>({text:t,timestamp:new Date(e)})),start:new Date(t),end:null===r?null:new Date(r)}))}))}}],72127);var t=e.i(2157);async function r(e){try{await t.promises.mkdir(e,{recursive:!0})}catch(e){if("EEXIST"!==(null!==e&&"object"==typeof e&&"code"in e&&"string"==typeof e.code?e.code:null))throw e}}e.s(["ensure_dir_exists",0,r],30853)},93361,e=>{"use strict";var t=e.i(72507);function r(e,t=[],n=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==n&&void 0===t.find(({id:e})=>e===n))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:n}}e.s(["gen_db",0,function(){return{version:t.DB_VERSION,sheets:[r(t.DEFAULT_SHEET_NAME)],activeSheetName:t.DEFAULT_SHEET_NAME}},"gen_sheet",0,r])},24507,e=>{"use strict";var t=e.i(72507);let r={2:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n})=>({tags:[],notes:[],id:e,end:r,start:t,description:n}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:a})=>({notes:[],tags:a,id:e,end:r,start:t,description:n}))}))}}};e.s(["migrate_json_db",0,function(e){let n=e,a=!1,i=void 0===n.version?1:n.version;if(i>t.DB_VERSION||i<1)throw Error(`Unknown DB version ${n.version}, cannot load.`);for(;i<t.DB_VERSION;){let e=i+1,t=r[e];if(void 0===t)throw Error(`Missing migration from version ${i} to ${e}.`);if((n=t(n)).version!==e)throw Error(`Invalid migration output for version ${e}.`);i=e,a=!0}return{json_db:n,did_migrate:a}}],24507)},16366,e=>{"use strict";e.s(["convert_db_to_json",0,function(e){let t=e.sheets.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entries:e.entries.map(e=>({id:e.id,description:e.description,tags:e.tags,start:e.start.getTime(),end:null===e.end?null:e.end.getTime(),notes:e.notes.map(e=>({text:e.text,timestamp:e.timestamp.getTime()}))}))}));return{version:e.version,activeSheetName:e.activeSheetName,sheets:t}}])},71786,32806,e=>{"use strict";var t=e.i(50227),r=e.i(2157),n=e.i(72507),a=e.i(72127),i=e.i(30853),s=e.i(93361),o=e.i(24507),l=e.i(16366);async function u(e,t=n.DB_PATH){let a=JSON.stringify((0,l.convert_db_to_json)(e));try{await r.promises.writeFile(t,a)}catch(e){throw Error(`Failed to save DB: ${String(e)}`,{cause:e})}}async function d(e=n.DB_PATH){let l,c=t.default.dirname(e);await (0,i.ensure_dir_exists)(c);try{await r.promises.access(e)}catch{let t=(0,s.gen_db)();return await u(t,e),t}let p=await r.promises.readFile(e,"utf-8");try{l=JSON.parse(p)}catch(t){throw Error(`DB at ${e} is invalid JSON: ${String(t)}`,{cause:t})}let h=(0,o.migrate_json_db)(l);l=h.json_db;let m=(0,a.convert_json_db)(l);return h.did_migrate&&await u(m,e),m}e.s(["write_local_db",0,u],32806),e.s(["read_local_db",0,d],71786)},27440,e=>{"use strict";var t=e.i(71786);async function r(e){return(0,t.read_local_db)(e)}e.s(["read_db",0,r])},18212,e=>{"use strict";var t=e.i(32806);async function r(e,r){await (0,t.write_local_db)(e,r)}e.s(["write_db",0,r])},81207,76249,e=>{"use strict";e.s(["collect_known_tags",0,function(e){let t=new Set;for(let r of e.sheets)for(let e of r.entries)for(let r of e.tags){let e=r.trim();e.length>0&&t.add(e)}return[...t].sort((e,t)=>e.localeCompare(t))}],81207);var t=e.i(72507),r=e.i(29207),n=e.i(5313);async function a(){return!!(0,n.is_supabase_configured)()&&null!==await (0,r.get_authenticated_user_id)()}async function i(){return await a()?`Cloud sync (${"https://ctruizaqyeyidujmtxhc.supabase.co".trim()??"Supabase"})`:t.DB_PATH}e.s(["resolve_db_path_label",0,i],76249)},93204,e=>{"use strict";e.s(["get_sheet",0,function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)throw Error(`Sheet ${t} not found`);return r}])},4760,95634,e=>{"use strict";var t=e.i(81207),r=e.i(76249),n=e.i(93204),a=e.i(27440),i=e.i(72507);function s(e,t,r){return{id:e.id,description:e.description,start:e.start.toISOString(),end:null===e.end?null:e.end.toISOString(),tags:e.tags,notes:e.notes.map(({timestamp:e,text:t})=>({timestamp:e.toISOString(),text:t})),sheetName:t,durationMs:function(e,t=Date.now()){let{end:r,start:n}=e;return Math.max(0,(null===r?t:+r)-n)}(e),isActive:r}}var o=e.i(93361),l=e.i(18212);async function u(e){let t=await (0,a.read_db)();t.sheets.some(({name:t})=>t===e)||t.sheets.push((0,o.gen_sheet)(e)),t.activeSheetName=e,await (0,l.write_db)(t)}async function d(e){let o=await (0,a.read_db)(),l=function(e,t){let r=t?.trim()??"";if(r.length>0&&e.sheets.some(e=>e.name===r))return r;if(null!==e.activeSheetName&&e.sheets.some(t=>t.name===e.activeSheetName))return e.activeSheetName;let n=e.sheets.find(e=>null!==e.activeEntryID);return void 0!==n?n.name:e.sheets[0]?.name??i.DEFAULT_SHEET_NAME}(o,e);o.activeSheetName!==l&&(await u(l),o.activeSheetName=l);let{sheets:d}=o,c=[];c=function(e,t){let r=[...e];switch(t){case"oldest":return r.sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime());case"duration":return r.sort((e,t)=>t.durationMs-e.durationMs);case"description":return r.sort((e,t)=>{let r=e.description.trim()||"Untitled entry",n=t.description.trim()||"Untitled entry";return r.localeCompare(n)});default:return r.sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime())}}(function(e){let{activeEntryID:t,entries:r,name:n}=e;return r.map(e=>s(e,n,t===e.id&&null===e.end))}((0,n.get_sheet)(o,l)),"newest");let p=function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)return null;let{activeEntryID:n,entries:a,name:i}=r;if(null===n)return null;let o=a.find(({id:e})=>e===n);return void 0===o?null:s(o,i,null===o.end)}(o,l),h=function(e){let t=[];for(let r of e.sheets){let{activeEntryID:e,entries:n,name:a}=r;if(null===e)continue;let i=n.find(({id:t})=>t===e);void 0!==i&&null===i.end&&t.push(s(i,a,!0))}return t}(o),m=p??h[0]??null;return{dbPath:await (0,r.resolve_db_path_label)(),activeSheetName:l,knownTags:(0,t.collect_known_tags)(o),sheets:d.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entryCount:e.entries.length,isActive:e.name===l,hasActiveEntry:null!==e.activeEntryID})),activeEntry:p,runningEntry:m,runningEntries:h,activeSheetEntries:c,activeSheetTotalMs:c.reduce((e,t)=>e+t.durationMs,0)}}e.s(["set_active_sheet",0,u],95634),e.s(["get_tracker_state",0,d],4760)},76792,e=>{"use strict";var t=e.i(973),r=e.i(39210),n=e.i(13132),a=e.i(14579),i=e.i(47092),s=e.i(34740),o=e.i(77667),l=e.i(11979),u=e.i(54202),d=e.i(39093),c=e.i(95106),p=e.i(57255),h=e.i(96492),m=e.i(27930),v=e.i(24131),f=e.i(93695);e.i(20216);var _=e.i(84975),w=e.i(82214),g=e.i(68194),E=e.i(27440),y=e.i(18212);async function x(e){let t=await (0,E.read_db)(),r=t.sheets.findIndex(({name:t})=>t===e);if(-1===r)throw Error(`Sheet ${e} not found`);if(t.activeSheetName===e&&(t.activeSheetName=null),t.sheets.splice(r,1),0===t.sheets.length)throw Error("Cannot delete the last sheet");null===t.activeSheetName&&(t.activeSheetName=t.sheets[0]?.name??null),await (0,y.write_db)(t)}var S=e.i(4760),N=e.i(93204);async function R(e){let{sheet_name:t}=e,r=e.new_name.trim();if(0===r.length)throw Error("Sheet name must not be empty");if(r===t)return;let n=await (0,E.read_db)(),a=(0,N.get_sheet)(n,t);if(n.sheets.some(({name:e})=>e===r))throw Error(`Sheet ${r} already exists`);a.name=r,n.activeSheetName===t&&(n.activeSheetName=r),await (0,y.write_db)(n)}var b=e.i(95634);async function D(e){try{let t=await e.json(),r=t.name?.trim()??"";if(0===r.length)return(0,g.api_error_response)(Error("Sheet name is required"));!0===t.delete?await x(r):await (0,b.set_active_sheet)(r);let n=await (0,S.get_tracker_state)(!0===t.delete?void 0:r);return w.NextResponse.json(n)}catch(e){return(0,g.api_error_response)(e)}}async function T(e){try{let t=await e.json(),r=t.name?.trim()??"",n=t.newName?.trim()??"";if(0===r.length)return(0,g.api_error_response)(Error("Sheet name is required"));if(0===n.length)return(0,g.api_error_response)(Error("New sheet name is required"));await R({sheet_name:r,new_name:n});let a=await (0,S.get_tracker_state)();return w.NextResponse.json(a)}catch(e){return(0,g.api_error_response)(e)}}e.s(["PATCH",0,T,"POST",0,D],69092);var A=e.i(69092);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/sheet/route",pathname:"/api/sheet",filename:"route",bundlePath:""},distDir:"next-output",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/sheet/route.ts",nextConfigOutput:"standalone",userland:A,...{}}),{workAsyncStorage:I,workUnitAsyncStorage:j,serverHooks:O}=C;async function q(e,t,n){n.requestMeta&&(0,a.setRequestMeta)(e,n.requestMeta),C.isDev&&(0,a.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let w="/api/sheet/route";w=w.replace(/\/index$/,"")||"/";let g=await C.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:E,deploymentId:y,params:x,nextConfig:S,parsedUrl:N,isDraftMode:R,prerenderManifest:b,routerServerContext:D,isOnDemandRevalidate:T,revalidateOnlyGenerated:A,resolvedPathname:I,clientReferenceManifest:j,serverActionsManifest:O}=g,q=(0,o.normalizeAppPath)(w),P=!!(b.dynamicRoutes[q]||b.routes[I]),k=async()=>((null==D?void 0:D.render404)?await D.render404(e,t,N,!1):t.end("This page could not be found"),null);if(P&&!R){let e=!!b.routes[I],t=b.dynamicRoutes[q];if(t&&!1===t.fallback&&!e){if(S.adapterPath)return await k();throw new f.NoFallbackError}}let M=null;!P||C.isDev||R||(M="/index"===(M=I)?"/":M);let H=!0===C.isDev||!P,U=P&&!H;O&&j&&(0,s.setManifestsSingleton)({page:w,clientReferenceManifest:j,serverActionsManifest:O});let $=e.method||"GET",B=(0,i.getTracer)(),F=B.getActiveScopeSpan(),L=!!(null==D?void 0:D.isWrappedByNextServer),K=!!(0,a.getRequestMeta)(e,"minimalMode"),V=(0,a.getRequestMeta)(e,"incrementalCache")||await C.getIncrementalCache(e,S,b,K);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let X={params:x,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts},cacheComponents:!!S.cacheComponents,supportsDynamicResponse:H,incrementalCache:V,cacheLifeProfiles:S.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,a)=>C.onRequestError(e,t,n,a,D)},sharedContext:{buildId:E,deploymentId:y}},G=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),W=u.NextRequestAdapter.fromNodeNextRequest(G,(0,u.signalFromNodeResponse)(t));try{let a,s=async e=>C.handle(W,X).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=B.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${$} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),a&&a!==e&&(a.setAttribute("http.route",n),a.updateName(t))}else e.updateName(`${$} ${w}`)}),o=async a=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&T&&A&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(a);e.fetchMetrics=X.renderOpts.fetchMetrics;let o=X.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=X.renderOpts.collectedTags;if(!P)return await (0,p.sendResponse)(G,J,i,X.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);l&&(t[v.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:X.renderOpts.collectedExpire;return{value:{kind:_.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,D),t}},u=await C.handleResponse({req:e,nextConfig:S,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:A,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:K});if(!P)return null;if((null==u||null==(i=u.value)?void 0:i.kind)!==_.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(o=u.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});K||t.setHeader("x-nextjs-cache",T?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),R&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let d=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return K&&P||d.delete(v.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||d.get("Cache-Control")||d.set("Cache-Control",(0,m.getCacheControlHeader)(u.cacheControl)),await (0,p.sendResponse)(G,J,new Response(u.value.body,{headers:d,status:u.value.status||200})),null};L&&F?await o(F):(a=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(d.BaseServerSpan.handleRequest,{spanName:`${$} ${w}`,kind:i.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},o),void 0,!L))}catch(t){if(t instanceof f.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:q,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:T})},!1,D),P)throw t;return await (0,p.sendResponse)(G,J,new Response(null,{status:500})),null}}e.s(["handler",0,q,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:I,workUnitAsyncStorage:j})},"routeModule",0,C,"serverHooks",0,O,"workAsyncStorage",0,I,"workUnitAsyncStorage",0,j],76792)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__13n2uo8._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},19045,a=>{"use strict";a.s(["serialize_entry",0,function(a,b,c){return{id:a.id,description:a.description,start:a.start.toISOString(),end:null===a.end?null:a.end.toISOString(),tags:a.tags,notes:a.notes.map(({timestamp:a,text:b})=>({timestamp:a.toISOString(),text:b})),sheetName:b,durationMs:function(a,b=Date.now()){let{end:c,start:d}=a;return Math.max(0,(null===c?b:+c)-d)}(a),isActive:c}}],19045)},67835,88028,a=>{"use strict";a.s(["get_serialized_entries_total_ms",0,function(a){return a.reduce((a,b)=>a+b.durationMs,0)}],67835);var b=a.i(19045);a.s(["serialize_sheet_entries",0,function(a){let{activeEntryID:c,entries:d,name:e}=a;return d.map(a=>(0,b.serialize_entry)(a,e,c===a.id&&null===a.end))}],88028)},2985,82478,2798,93835,12781,a=>{"use strict";let b=Symbol.for("constructDateFrom");function c(a,c){return"function"==typeof a?a(c):a&&"object"==typeof a&&b in a?a[b](c):a instanceof Date?new a.constructor(c):new Date(c)}function d(a,b){return c(b||a,a)}function e(a,b){let c=d(a,b?.in);return c.setHours(23,59,59,999),c}a.s(["constructFrom",0,c],82478),a.s(["toDate",0,d],2798),a.s(["endOfDay",0,e],93835);let f={};function g(a,b){let c=d(a,b?.in);return c.setHours(0,0,0,0),c}a.s(["startOfDay",0,g],12781),a.s(["get_period_range_ms",0,function(a,b=new Date,c=1){switch(a){case"week":var h,i;let j,k,l,m,n,o;return{startMs:+(h={weekStartsOn:c},j=h?.weekStartsOn??h?.locale?.options?.weekStartsOn??f.weekStartsOn??f.locale?.options?.weekStartsOn??0,l=(k=d(b,h?.in)).getDay(),k.setDate(k.getDate()-(7*(l<j)+l-j)),k.setHours(0,0,0,0),k),endMs:+(i={weekStartsOn:c},m=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??f.weekStartsOn??f.locale?.options?.weekStartsOn??0,o=(n=d(b,i?.in)).getDay(),n.setDate(n.getDate()+((o<m?-7:0)+6-(o-m))),n.setHours(23,59,59,999),n)};case"month":let p,q,r;return{startMs:+((p=d(b,void 0)).setDate(1),p.setHours(0,0,0,0),p),endMs:+(r=(q=d(b,void 0)).getMonth(),q.setFullYear(q.getFullYear(),r+1,0),q.setHours(23,59,59,999),q)};default:return{startMs:+g(b),endMs:+e(b)}}}],2985)},23035,a=>{"use strict";a.s(["get_clipped_entry_duration_ms",0,function(a,b,c,d=Date.now()){let e=+a.start;return Math.max(0,Math.min(null===a.end?d:+a.end,c)-Math.max(e,b))}])},2317,51196,a=>{"use strict";function b(a,b){return 0===b?0:a/b}a.s(["get_average_entry_ms",0,b],51196);var c=a.i(23035);a.s(["get_sheet_report_stats_for_range",0,function(a,d,e,f=Date.now()){let g=0,h=0,i=!1;for(let b of a.entries){let j=(0,c.get_clipped_entry_duration_ms)(b,d,e,f);j<=0||(g+=j,h+=1,a.activeEntryID===b.id&&null===b.end&&(i=!0))}return{sheetName:a.name,totalMs:g,entryCount:h,averageEntryMs:b(g,h),hasActiveEntry:i}}],2317)},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},13159,a=>{"use strict";a.s(["ReportingView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ReportingView() from the server but ReportingView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/reporting-view.tsx <module evaluation>","ReportingView")},74088,a=>{"use strict";a.s(["ReportingView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ReportingView() from the server but ReportingView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/reporting-view.tsx","ReportingView")},47613,a=>{"use strict";a.i(13159);var b=a.i(74088);a.n(b)},27001,a=>{"use strict";var b=a.i(46193),c=a.i(47613),d=a.i(51196),e=a.i(2985),f=a.i(23035);function g(a,b,c,d=Date.now()){let e=0;for(let g of a)for(let a of g.entries)e+=(0,f.get_clipped_entry_duration_ms)(a,b,c,d);return e}var h=a.i(67835),i=a.i(88028),j=a.i(2317),k=a.i(4813);async function l(){let a=await (0,k.read_db)();return{sourceSheets:a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,start:a.start.toISOString(),end:null===a.end?null:a.end.toISOString(),tags:a.tags}))})),stats:function(a,b=null,c=Date.now(),f=1){let k=a.map(a=>{let e,f,g;return null===b?(e=(0,i.serialize_sheet_entries)(a),f=a.entries.length,g=(0,h.get_serialized_entries_total_ms)(e),{sheetName:a.name,totalMs:g,entryCount:f,averageEntryMs:(0,d.get_average_entry_ms)(g,f),hasActiveEntry:null!==a.activeEntryID}):(0,j.get_sheet_report_stats_for_range)(a,b.startMs,b.endMs,c)}),{activeSheets:l,idleSheets:m}=function(a){let b=[],c=[];for(let d of a)0===d.entryCount||0===d.totalMs?c.push(d):b.push(d);return{activeSheets:b,idleSheets:c}}(k),n=k.reduce((a,b)=>a+b.totalMs,0),o=k.reduce((a,b)=>a+b.entryCount,0);return{activeSheets:l,idleSheets:m,grandTotalMs:n,totalEntryCount:o,grandAverageEntryMs:(0,d.get_average_entry_ms)(n,o),periodTotals:null===b?function(a,b=new Date,c=Date.now(),d=1){let f=(0,e.get_period_range_ms)("today",b,d),h=(0,e.get_period_range_ms)("week",b,d),i=(0,e.get_period_range_ms)("month",b,d);return{todayMs:g(a,f.startMs,f.endMs,c),weekMs:g(a,h.startMs,h.endMs,c),monthMs:g(a,i.startMs,i.endMs,c)}}(a,new Date(c),c,f):{todayMs:0,weekMs:0,monthMs:0}}}(a.sheets)}}async function m(){let{sourceSheets:a}=await l(),d=Date.now();return(0,b.jsx)(c.ReportingView,{source_sheets:a,reference_now:d})}a.s(["default",0,m],27001)},76842,a=>{a.n(a.i(27001))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0-0rjzr._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},84245,a=>{"use strict";a.s(["TrackerTopbar",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TrackerTopbar() from the server but TrackerTopbar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tracker-topbar.tsx <module evaluation>","TrackerTopbar")},43680,a=>{"use strict";a.s(["TrackerTopbar",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TrackerTopbar() from the server but TrackerTopbar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tracker-topbar.tsx","TrackerTopbar")},54675,a=>{"use strict";a.i(84245);var b=a.i(43680);a.n(b)},85168,a=>{"use strict";a.s(["SettingsNav",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SettingsNav() from the server but SettingsNav is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/settings-nav.tsx <module evaluation>","SettingsNav")},28678,a=>{"use strict";a.s(["SettingsNav",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SettingsNav() from the server but SettingsNav is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/settings-nav.tsx","SettingsNav")},9615,a=>{"use strict";a.i(85168);var b=a.i(28678);a.n(b)},5894,a=>{"use strict";var b=a.i(46193),c=a.i(9615),d=a.i(54675);a.s(["SettingsPageLayout",0,function({breadcrumb:a,title:e,description:f,children:g}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.TrackerTopbar,{breadcrumb:a}),(0,b.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,b.jsxs)("aside",{className:"flex flex-col gap-2",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Settings"}),(0,b.jsx)(c.SettingsNav,{})]}),(0,b.jsxs)("section",{className:"flex min-w-0 flex-col gap-4",children:[(0,b.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,b.jsx)("h1",{className:"m-0 text-[1.35rem] font-[650] tracking-tight",children:e}),void 0!==f?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:f}):null]}),g]})]})]})}])},4200,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(41445);a.n(d("[project]/node_modules/.pnpm/next@16.2.6_@babel+core@7.29.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/app-dir/link.js <module evaluation>"))},26530,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(41445);a.n(d("[project]/node_modules/.pnpm/next@16.2.6_@babel+core@7.29.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/client/app-dir/link.js"))},63103,a=>{"use strict";a.i(4200);var b=a.i(26530);a.n(b)},85779,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return i},useLinkStatus:function(){return h.useLinkStatus}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(54508),g=a.r(46193),h=f._(a.r(63103));function i(a){let b=a.legacyBehavior,c="string"==typeof a.children||"number"==typeof a.children||"string"==typeof a.children?.type,d=a.children?.type?.$$typeof===Symbol.for("react.client.reference");return!b||c||d||(a.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,g.jsx)(h.default,{...a})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},75021,a=>{"use strict";a.s(["BackupRestoreSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call BackupRestoreSetting() from the server but BackupRestoreSetting is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/backup-restore-setting.tsx <module evaluation>","BackupRestoreSetting")},46679,a=>{"use strict";a.s(["BackupRestoreSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call BackupRestoreSetting() from the server but BackupRestoreSetting is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/backup-restore-setting.tsx","BackupRestoreSetting")},20349,a=>{"use strict";a.i(75021);var b=a.i(46679);a.n(b)},48262,a=>{"use strict";a.s(["DbExportSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DbExportSetting() from the server but DbExportSetting is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/db-export-setting.tsx <module evaluation>","DbExportSetting")},12266,a=>{"use strict";a.s(["DbExportSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DbExportSetting() from the server but DbExportSetting is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/db-export-setting.tsx","DbExportSetting")},29373,a=>{"use strict";a.i(48262);var b=a.i(12266);a.n(b)},38876,a=>{"use strict";var b=a.i(46193),c=a.i(85779),d=a.i(20349),e=a.i(29373),f=a.i(5894);function g({db_path:a,db:h}){return(0,b.jsx)(f.SettingsPageLayout,{breadcrumb:{current:"Data & backup",parent:{label:"Settings",href:"/settings"}},title:"Data & backup",description:"Database backups and bulk operations on stored entries.",children:(0,b.jsxs)("ul",{className:"m-0 flex w-full list-none flex-col gap-2 p-0","aria-label":"Data settings",children:[(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(d.BackupRestoreSetting,{db_path:a})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(e.DbExportSetting,{db:h})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,b.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Tag management"}),(0,b.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Rename or merge @tags used across all entries."}),(0,b.jsx)(c.default,{className:"mt-2 self-start text-[0.85rem] font-semibold text-accent no-underline hover:underline",href:"/settings/tags",children:"Manage tags"})]})})]})})}var h=a.i(6931),i=a.i(4813),j=a.i(60197);async function k(){let a=await (0,i.read_db)(),c=(0,h.convert_db_to_json)(a),d=await (0,j.resolve_db_path_label)();return(0,b.jsx)(g,{db_path:d,db:c})}a.s(["default",0,k],38876)},12678,a=>{a.n(a.i(38876))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__01xqr3d._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},84245,a=>{"use strict";a.s(["TrackerTopbar",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TrackerTopbar() from the server but TrackerTopbar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tracker-topbar.tsx <module evaluation>","TrackerTopbar")},43680,a=>{"use strict";a.s(["TrackerTopbar",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TrackerTopbar() from the server but TrackerTopbar is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/tracker-topbar.tsx","TrackerTopbar")},54675,a=>{"use strict";a.i(84245);var b=a.i(43680);a.n(b)},85168,a=>{"use strict";a.s(["SettingsNav",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SettingsNav() from the server but SettingsNav is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/settings-nav.tsx <module evaluation>","SettingsNav")},28678,a=>{"use strict";a.s(["SettingsNav",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SettingsNav() from the server but SettingsNav is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/settings-nav.tsx","SettingsNav")},9615,a=>{"use strict";a.i(85168);var b=a.i(28678);a.n(b)},5894,a=>{"use strict";var b=a.i(46193),c=a.i(9615),d=a.i(54675);a.s(["SettingsPageLayout",0,function({breadcrumb:a,title:e,description:f,children:g}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.TrackerTopbar,{breadcrumb:a}),(0,b.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,b.jsxs)("aside",{className:"flex flex-col gap-2",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Settings"}),(0,b.jsx)(c.SettingsNav,{})]}),(0,b.jsxs)("section",{className:"flex min-w-0 flex-col gap-4",children:[(0,b.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,b.jsx)("h1",{className:"m-0 text-[1.35rem] font-[650] tracking-tight",children:e}),void 0!==f?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:f}):null]}),g]})]})]})}])},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},23750,a=>{"use strict";a.s(["collect_known_tags",0,function(a){let b=new Set;for(let c of a.sheets)for(let a of c.entries)for(let c of a.tags){let a=c.trim();a.length>0&&b.add(a)}return[...b].sort((a,b)=>a.localeCompare(b))}])},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},10216,a=>{"use strict";a.s(["FocusGoalsNudgesSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call FocusGoalsNudgesSetting() from the server but FocusGoalsNudgesSetting is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/focus-goals-nudges-setting.tsx <module evaluation>","FocusGoalsNudgesSetting")},98251,a=>{"use strict";a.s(["FocusGoalsNudgesSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call FocusGoalsNudgesSetting() from the server but FocusGoalsNudgesSetting is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/focus-goals-nudges-setting.tsx","FocusGoalsNudgesSetting")},70023,a=>{"use strict";a.i(10216);var b=a.i(98251);a.n(b)},8235,a=>{"use strict";var b=a.i(46193),c=a.i(70023),d=a.i(5894);function e({sheet_names:a,tag_names:f}){return(0,b.jsx)(d.SettingsPageLayout,{breadcrumb:{current:"Goals",parent:{label:"Settings",href:"/settings"}},title:"Goals",description:"Configure focus targets globally, per-sheet, or per-tag.",children:(0,b.jsx)("ul",{className:"m-0 flex w-full list-none flex-col gap-2 p-0","aria-label":"Goal settings",children:(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(c.FocusGoalsNudgesSetting,{sheet_names:a,tag_names:f})})})})}var f=a.i(23750),g=a.i(4813);async function h(){let a=await (0,g.read_db)(),c=a.sheets.map(a=>a.name),d=(0,f.collect_known_tags)(a);return(0,b.jsx)(e,{sheet_names:c,tag_names:d})}a.s(["default",0,h],8235)},98105,a=>{a.n(a.i(8235))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0_b2z9m._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[55120,a=>{a.v({className:"geist_f53a3a98-module__E6rLHq__className",variable:"geist_f53a3a98-module__E6rLHq__variable"})},91129,a=>{a.v({className:"geist_mono_a0a08e0-module__UZhpWW__className",variable:"geist_mono_a0a08e0-module__UZhpWW__variable"})},1798,a=>{"use strict";a.s(["AppKeyboardShortcuts",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call AppKeyboardShortcuts() from the server but AppKeyboardShortcuts is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/app-keyboard-shortcuts.tsx <module evaluation>","AppKeyboardShortcuts")},69726,a=>{"use strict";a.s(["AppKeyboardShortcuts",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call AppKeyboardShortcuts() from the server but AppKeyboardShortcuts is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/app-keyboard-shortcuts.tsx","AppKeyboardShortcuts")},67636,a=>{"use strict";a.i(1798);var b=a.i(69726);a.n(b)},74035,a=>{"use strict";a.s(["CloudSyncProvider",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call CloudSyncProvider() from the server but CloudSyncProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/cloud-sync-provider.tsx <module evaluation>","CloudSyncProvider")},21912,a=>{"use strict";a.s(["CloudSyncProvider",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call CloudSyncProvider() from the server but CloudSyncProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/cloud-sync-provider.tsx","CloudSyncProvider")},69669,a=>{"use strict";a.i(74035);var b=a.i(21912);a.n(b)},22990,a=>{"use strict";a.s(["ToastNotifications",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ToastNotifications() from the server but ToastNotifications is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/toast-notifications.tsx <module evaluation>","ToastNotifications")},10467,a=>{"use strict";a.s(["ToastNotifications",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ToastNotifications() from the server but ToastNotifications is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/toast-notifications.tsx","ToastNotifications")},88936,a=>{"use strict";a.i(22990);var b=a.i(10467);a.n(b)},95670,a=>{"use strict";a.s(["ConfirmDialogProvider",()=>c,"use_confirm_dialog",()=>d]);var b=a.i(41445);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call ConfirmDialogProvider() from the server but ConfirmDialogProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/confirm-dialog-provider.tsx <module evaluation>","ConfirmDialogProvider"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call use_confirm_dialog() from the server but use_confirm_dialog is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/confirm-dialog-provider.tsx <module evaluation>","use_confirm_dialog")},37424,a=>{"use strict";a.s(["ConfirmDialogProvider",()=>c,"use_confirm_dialog",()=>d]);var b=a.i(41445);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call ConfirmDialogProvider() from the server but ConfirmDialogProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/confirm-dialog-provider.tsx","ConfirmDialogProvider"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call use_confirm_dialog() from the server but use_confirm_dialog is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/confirm-dialog-provider.tsx","use_confirm_dialog")},64762,a=>{"use strict";a.i(95670);var b=a.i(37424);a.n(b)},4684,a=>{"use strict";a.s(["DocumentPreferencesInit",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DocumentPreferencesInit() from the server but DocumentPreferencesInit is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/document-preferences-init.tsx <module evaluation>","DocumentPreferencesInit")},8602,a=>{"use strict";a.s(["DocumentPreferencesInit",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DocumentPreferencesInit() from the server but DocumentPreferencesInit is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/document-preferences-init.tsx","DocumentPreferencesInit")},41505,a=>{"use strict";a.i(4684);var b=a.i(8602);a.n(b)},17830,a=>{"use strict";a.s(["NotificationRulesRunner",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call NotificationRulesRunner() from the server but NotificationRulesRunner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/notification-rules-runner.tsx <module evaluation>","NotificationRulesRunner")},3899,a=>{"use strict";a.s(["NotificationRulesRunner",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call NotificationRulesRunner() from the server but NotificationRulesRunner is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/notification-rules-runner.tsx","NotificationRulesRunner")},31788,a=>{"use strict";a.i(17830);var b=a.i(3899);a.n(b)},85048,a=>{"use strict";a.s(["PwaInstallNotice",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call PwaInstallNotice() from the server but PwaInstallNotice is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/pwa-install-notice.tsx <module evaluation>","PwaInstallNotice")},2370,a=>{"use strict";a.s(["PwaInstallNotice",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call PwaInstallNotice() from the server but PwaInstallNotice is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/pwa-install-notice.tsx","PwaInstallNotice")},16364,a=>{"use strict";a.i(85048);var b=a.i(2370);a.n(b)},93359,a=>{"use strict";a.s(["PwaRegister",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call PwaRegister() from the server but PwaRegister is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/pwa-register.tsx <module evaluation>","PwaRegister")},33610,a=>{"use strict";a.s(["PwaRegister",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call PwaRegister() from the server but PwaRegister is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/pwa-register.tsx","PwaRegister")},22650,a=>{"use strict";a.i(93359);var b=a.i(33610);a.n(b)},80351,a=>{"use strict";a.s(["ThemeModeSystemListener",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ThemeModeSystemListener() from the server but ThemeModeSystemListener is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/theme-mode-system-listener.tsx <module evaluation>","ThemeModeSystemListener")},68139,a=>{"use strict";a.s(["ThemeModeSystemListener",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ThemeModeSystemListener() from the server but ThemeModeSystemListener is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/theme-mode-system-listener.tsx","ThemeModeSystemListener")},3905,a=>{"use strict";a.i(80351);var b=a.i(68139);a.n(b)},18073,a=>{"use strict";a.s(["UiPreferencesDocumentSync",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call UiPreferencesDocumentSync() from the server but UiPreferencesDocumentSync is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui-preferences-document-sync.tsx <module evaluation>","UiPreferencesDocumentSync")},45471,a=>{"use strict";a.s(["UiPreferencesDocumentSync",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call UiPreferencesDocumentSync() from the server but UiPreferencesDocumentSync is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/ui-preferences-document-sync.tsx","UiPreferencesDocumentSync")},90689,a=>{"use strict";a.i(18073);var b=a.i(45471);a.n(b)},33290,a=>{"use strict";var b=a.i(46193),c=a.i(55120);let d={className:c.default.className,style:{fontFamily:"'Geist', 'Geist Fallback'",fontStyle:"normal"}};null!=c.default.variable&&(d.variable=c.default.variable);var e=a.i(91129);let f={className:e.default.className,style:{fontFamily:"'Geist Mono', 'Geist Mono Fallback'",fontStyle:"normal"}};null!=e.default.variable&&(f.variable=e.default.variable);var g=a.i(67636),h=a.i(69669),i=a.i(88936),j=a.i(64762),k=a.i(41505),l=a.i(31788),m=a.i(16364),n=a.i(22650),o=a.i(3905),p=a.i(90689),q=a.i(40035);let r="default",s=["default","midnight","warm","ocean","forest","contrast","sunset","lavender","rose","slate","nord","dracula"],t={teal:"default",blue:"ocean",violet:"midnight",rose:"warm",amber:"warm",emerald:"forest"};a.i(35394);let u=function(a){let{default_value:b,is_valid:c,storage_key:d}=a,e=new Set,f=()=>b;return{storage_key:d,default_value:b,is_valid:c,read:f,write:a=>{try{window.localStorage.setItem(d,a)}catch{}},subscribe:a=>(e.add(a),()=>{e.delete(a)}),notify:()=>{e.forEach(a=>{a()})},get_snapshot:f,get_server_snapshot:()=>b}}({storage_key:"super-time-tracker-theme-mode",default_value:"system",is_valid:a=>"light"===a||"dark"===a||"system"===a});async function v(){var a;let b=await (0,q.cookies)(),c="light"===(await (0,q.headers)()).get("sec-ch-prefers-color-scheme"),d=b.get("stt-palette")?.value,e=function(a,b){if(void 0!==a&&s.includes(a))return a;if(void 0!==b){let a=t[b];if(void 0!==a)return a}return r}(d,void 0),f=b.get("stt-compact-lists")?.value==="true",g=void 0===(a=b.get("stt-theme-mode")?.value)?null:u.is_valid(a)?a:null;if(null!==g)return{theme:function(a,b){return"system"===a?b?"light":"dark":"light"===a||"dark"===a?a:"dark"}(g,c),palette:e,compact_lists:f};let h=b.get("stt-theme")?.value;return"light"===h||"dark"===h?{theme:h,palette:e,compact_lists:f}:{theme:c?"light":"dark",palette:void 0===d?r:e,compact_lists:f}}async function w({children:a}){let{theme:c,palette:e,compact_lists:q}=await v();return(0,b.jsx)("html",{lang:"en",className:`${d.variable} ${f.variable} h-full antialiased`,"data-theme":c,"data-palette":e,"data-compact-lists":q?"true":"false",suppressHydrationWarning:!0,children:(0,b.jsxs)("body",{className:"min-h-full font-sans transition-[background-color,color] duration-200",children:[(0,b.jsx)(k.DocumentPreferencesInit,{}),(0,b.jsx)(n.PwaRegister,{}),(0,b.jsx)(o.ThemeModeSystemListener,{}),(0,b.jsx)(p.UiPreferencesDocumentSync,{}),(0,b.jsx)(j.ConfirmDialogProvider,{children:(0,b.jsxs)(h.CloudSyncProvider,{children:[(0,b.jsx)(g.AppKeyboardShortcuts,{}),(0,b.jsx)(l.NotificationRulesRunner,{}),a,(0,b.jsx)(i.ToastNotifications,{}),(0,b.jsx)(m.PwaInstallNotice,{})]})})]})})}a.s(["default",0,w,"metadata",0,{title:"super-time-tracker",description:"Web UI for the super-time-tracker CLI time sheets",manifest:"/manifest.webmanifest",icons:{icon:[{url:"/icons/favicon.ico",type:"image/x-icon"},{url:"/icons/favicon-16x16.png",type:"image/png",sizes:"16x16"},{url:"/icons/favicon-32x32.png",type:"image/png",sizes:"32x32"},{url:"/icons/android-chrome-192x192.png",type:"image/png",sizes:"192x192"},{url:"/icons/android-chrome-512x512.png",type:"image/png",sizes:"512x512"}],apple:[{url:"/icons/apple-touch-icon.png",type:"image/png",sizes:"180x180"}]},appleWebApp:{capable:!0,title:"super-time-tracker",statusBarStyle:"default"}},"viewport",0,{themeColor:"#14b8a6"}],33290)},70864,a=>{a.n(a.i(33290))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0bowsf1._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},23750,a=>{"use strict";a.s(["collect_known_tags",0,function(a){let b=new Set;for(let c of a.sheets)for(let a of c.entries)for(let c of a.tags){let a=c.trim();a.length>0&&b.add(a)}return[...b].sort((a,b)=>a.localeCompare(b))}])},23035,a=>{"use strict";a.s(["get_clipped_entry_duration_ms",0,function(a,b,c,d=Date.now()){let e=+a.start;return Math.max(0,Math.min(null===a.end?d:+a.end,c)-Math.max(e,b))}])},2985,82478,2798,93835,12781,a=>{"use strict";let b=Symbol.for("constructDateFrom");function c(a,c){return"function"==typeof a?a(c):a&&"object"==typeof a&&b in a?a[b](c):a instanceof Date?new a.constructor(c):new Date(c)}function d(a,b){return c(b||a,a)}function e(a,b){let c=d(a,b?.in);return c.setHours(23,59,59,999),c}a.s(["constructFrom",0,c],82478),a.s(["toDate",0,d],2798),a.s(["endOfDay",0,e],93835);let f={};function g(a,b){let c=d(a,b?.in);return c.setHours(0,0,0,0),c}a.s(["startOfDay",0,g],12781),a.s(["get_period_range_ms",0,function(a,b=new Date,c=1){switch(a){case"week":var h,i;let j,k,l,m,n,o;return{startMs:+(h={weekStartsOn:c},j=h?.weekStartsOn??h?.locale?.options?.weekStartsOn??f.weekStartsOn??f.locale?.options?.weekStartsOn??0,l=(k=d(b,h?.in)).getDay(),k.setDate(k.getDate()-(7*(l<j)+l-j)),k.setHours(0,0,0,0),k),endMs:+(i={weekStartsOn:c},m=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??f.weekStartsOn??f.locale?.options?.weekStartsOn??0,o=(n=d(b,i?.in)).getDay(),n.setDate(n.getDate()+((o<m?-7:0)+6-(o-m))),n.setHours(23,59,59,999),n)};case"month":let p,q,r;return{startMs:+((p=d(b,void 0)).setDate(1),p.setHours(0,0,0,0),p),endMs:+(r=(q=d(b,void 0)).getMonth(),q.setFullYear(q.getFullYear(),r+1,0),q.setHours(23,59,59,999),q)};default:return{startMs:+g(b),endMs:+e(b)}}}],2985)},19045,a=>{"use strict";a.s(["serialize_entry",0,function(a,b,c){return{id:a.id,description:a.description,start:a.start.toISOString(),end:null===a.end?null:a.end.toISOString(),tags:a.tags,notes:a.notes.map(({timestamp:a,text:b})=>({timestamp:a.toISOString(),text:b})),sheetName:b,durationMs:function(a,b=Date.now()){let{end:c,start:d}=a;return Math.max(0,(null===c?b:+c)-d)}(a),isActive:c}}],19045)},80403,a=>{"use strict";var b=a.i(19045);a.s(["find_all_serialized_active_entries",0,function(a){let c=[];for(let d of a.sheets){let{activeEntryID:a,entries:e,name:f}=d;if(null===a)continue;let g=e.find(({id:b})=>b===a);void 0!==g&&null===g.end&&c.push((0,b.serialize_entry)(g,f,!0))}return c}])},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},5368,a=>{"use strict";a.s(["TodayFocusView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TodayFocusView() from the server but TodayFocusView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/today-focus-view.tsx <module evaluation>","TodayFocusView")},24356,a=>{"use strict";a.s(["TodayFocusView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TodayFocusView() from the server but TodayFocusView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/today-focus-view.tsx","TodayFocusView")},29387,a=>{"use strict";a.i(5368);var b=a.i(24356);a.n(b)},70146,a=>{"use strict";var b=a.i(46193),c=a.i(29387),d=a.i(23750),e=a.i(23035),f=a.i(2985),g=a.i(93835),h=a.i(12781),i=a.i(19045),j=a.i(80403),k=a.i(4813);async function l({scope:a="global",sheet_name:b,tag_name:c}={}){let d=await (0,k.read_db)(),g=Date.now(),h=new Date(g),i=(0,f.get_period_range_ms)("today",h),j=(0,f.get_period_range_ms)("week",h),m=0,n=0,o=null,p=null;for(let f of d.sheets)for(let d of f.entries){("global"===a||"sheet"===a&&void 0!==b&&f.name===b||"tag"===a&&void 0!==c&&d.tags.some(a=>a===c))&&(m+=(0,e.get_clipped_entry_duration_ms)(d,i.startMs,i.endMs,g),n+=(0,e.get_clipped_entry_duration_ms)(d,j.startMs,j.endMs,g));let h=+d.start,k=null===d.end?null:+d.end,l=null===k?h:Math.max(h,k);if((null===p||l>p)&&(p=l),null===d.end){let a=Math.max(0,g-h);(null===o||a>o)&&(o=a)}}let q=null!==o||null===p?null:Math.floor((g-p)/6e4);return{todayTrackedMs:m,weekTrackedMs:n,activeTimerDurationMs:o,minutesSinceLastLog:q}}var m=a.i(82478),n=a.i(2798);async function o(){let a=await (0,k.read_db)(),b=await l(),c=function(a,b=Date.now()){let c=new Date(b),{endMs:d,startMs:j}=(0,f.get_period_range_ms)("today",c),k=[];for(let f of a)for(let a of f.entries){if(!function(a,b){let{end:c,start:d}=b,e=(0,h.startOfDay)(a),f=(0,g.endOfDay)(a),i=c??new Date;return+d<=+f&&+i>=+e}(c,a))continue;let l=(0,e.get_clipped_entry_duration_ms)(a,j,d,b);l<=0||k.push({...(0,i.serialize_entry)(a,f.name,f.activeEntryID===a.id&&null===a.end),todayDurationMs:l})}return k.sort((a,b)=>new Date(b.start)-new Date(a.start))}(a.sheets),o=c.reduce((a,b)=>a+b.todayDurationMs,0);return{runningEntries:(0,j.find_all_serialized_active_entries)(a),todayEntries:c,todayTotalMs:o,focusStatus:b,startDaySuggestions:function(a,b=new Date){var c;let d,e=(c=void 0,d=(0,n.toDate)(b,c?.in),isNaN(-1)?(0,m.constructFrom)(c?.in||b,NaN):(d.setDate(d.getDate()+-1),d)),f=+(0,h.startOfDay)(e),i=+(0,g.endOfDay)(e),j=[];for(let b of a){let a=null,c=-1/0;for(let d of b.entries){let b=null===d.end?+d.start:+d.end;b<f||b>i||b>c&&(a=d,c=b)}null!==a&&j.push({sheetName:b.name,suggestedDescription:a.description,suggestedTags:a.tags,lastLoggedAt:new Date(c).toISOString()})}return j.sort((a,b)=>new Date(b.lastLoggedAt)-new Date(a.lastLoggedAt))}(a.sheets),sheetNames:a.sheets.map(a=>a.name),sheets:a.sheets.map(b=>({name:b.name,activeEntryID:b.activeEntryID,entryCount:b.entries.length,isActive:b.name===a.activeSheetName,hasActiveEntry:null!==b.activeEntryID})),knownTags:(0,d.collect_known_tags)(a)}}async function p(){let a=await o();return(0,b.jsx)(c.TodayFocusView,{initial_data:a})}a.s(["default",0,p],70146)},257,a=>{a.n(a.i(70146))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0dvku3t._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},43285,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/dynamic-access-async-storage.external.js",()=>require("next/dist/server/app-render/dynamic-access-async-storage.external.js"))},94877,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored.contexts.HooksClientContext},12273,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored.contexts.ServerInsertedHtml},85058,(a,b,c)=>{"use strict";b.exports=a.r(18622)},39752,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored["react-ssr"].ReactJsxRuntime},34542,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored["react-ssr"].React},72034,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored.contexts.AppRouterContext},71535,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored["react-ssr"].ReactServerDOMTurbopackClient},3988,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},38371,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={DEFAULT_SEGMENT_KEY:function(){return l},NOT_FOUND_SEGMENT_KEY:function(){return m},PAGE_SEGMENT_KEY:function(){return k},addSearchParamsIfPageSegment:function(){return i},computeSelectedLayoutSegment:function(){return j},getSegmentValue:function(){return f},getSelectedLayoutSegmentPath:function(){return function a(b,c,d=!0,e=[]){let g;if(d)g=b[1][c];else{let a=b[1];g=a.children??Object.values(a)[0]}if(!g)return e;let h=f(g[0]);return!h||h.startsWith(k)?e:(e.push(h),a(g,c,!1,e))}},isGroupSegment:function(){return g},isParallelRouteSegment:function(){return h}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});function f(a){return Array.isArray(a)?a[1]:a}function g(a){return"("===a[0]&&a.endsWith(")")}function h(a){return a.startsWith("@")&&"@children"!==a}function i(a,b){if(a.includes(k)){let a=JSON.stringify(b);return"{}"!==a?k+"?"+a:k}return a}function j(a,b){if(!a||0===a.length)return null;let c="children"===b?a[0]:a[a.length-1];return c===l?null:c}let k="__PAGE__",l="__DEFAULT__",m="/_not-found"},21154,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"InvariantError",{enumerable:!0,get:function(){return d}});class d extends Error{constructor(a,b){super(`Invariant: ${a.endsWith(".")?a:a+"."} This is a bug in Next.js.`,b),this.name="InvariantError"}}},40959,(a,b,c)=>{"use strict";function d(){let a,b,c=new Promise((c,d)=>{a=c,b=d});return{resolve:a,reject:b,promise:c}}Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"createPromiseWithResolvers",{enumerable:!0,get:function(){return d}})},89969,a=>{"use strict";a.s(["get_button_class_name",0,function(a="ghost",b="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"})[b]} ${({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)]"})[a]}`}])},53030,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(89969);function e({options:a,on_confirm:f,on_cancel:g}){let h=(0,c.useId)(),i=(0,c.useRef)(null),{cancelLabel:j="Cancel",confirmLabel:k="Confirm",message:l,title:m,variant:n="default"}=a;return(0,c.useEffect)(()=>{i.current?.focus();let a=a=>{"Escape"===a.key&&g()};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[g]),(0,b.jsxs)("div",{className:"fixed inset-0 z-100 flex items-center justify-center p-5",role:"presentation",children:[(0,b.jsx)("button",{type:"button",className:"absolute inset-0 cursor-default border-0 bg-overlay p-0","aria-label":"Dismiss dialog",onClick:g}),(0,b.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":h,className:"relative z-1 w-full max-w-md rounded-lg border border-panel-border bg-panel p-5 shadow-md",children:[(0,b.jsx)("h2",{id:h,className:"m-0 text-[1.1rem] font-[650] tracking-tight",children:m}),(0,b.jsx)("p",{className:"m-0 mt-2 text-[0.9rem] leading-relaxed text-muted",children:l}),(0,b.jsxs)("div",{className:"mt-5 flex flex-wrap justify-end gap-2",children:[(0,b.jsx)("button",{type:"button",className:(0,d.get_button_class_name)("ghost"),onClick:g,children:j}),(0,b.jsx)("button",{ref:i,type:"button",className:(0,d.get_button_class_name)("danger"===n?"danger":"primary"),onClick:f,children:k})]})]})]})}let f=(0,c.createContext)(null);a.s(["ConfirmDialogProvider",0,function({children:a}){let[d,g]=(0,c.useState)(null),h=(0,c.useCallback)(a=>new Promise(b=>{g({options:a,resolve:b})}),[]),i=a=>{d?.resolve(a),g(null)};return(0,b.jsxs)(f.Provider,{value:{confirm:h},children:[a,null!==d?(0,b.jsx)(e,{options:d.options,on_confirm:()=>i(!0),on_cancel:()=>i(!1)}):null]})},"use_confirm_dialog",0,function(){let a=(0,c.useContext)(f);if(null===a)throw Error("use_confirm_dialog must be used within ConfirmDialogProvider");return a}],53030)},87281,a=>{"use strict";var b=a.i(49170);a.s(["is_greedy_cloud_sync_enabled",0,function(){return"true"===b.greedy_cloud_sync_preference.read()}])},97917,a=>{"use strict";let b=new Set;a.s(["notify_in_app",0,function(a){},"subscribe_in_app_notifications",0,function(a){return b.add(a),()=>{b.delete(a)}}])},72327,40395,76121,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_NUDGES_ENABLED_STORAGE_KEY,default_value:c.FOCUS_NUDGES_ENABLED_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["focus_nudges_enabled_preference",0,d],72327);let e=(0,b.create_ui_preference_store)({storage_key:c.NO_LOG_REMINDER_MINUTES_STORAGE_KEY,default_value:c.NO_LOG_REMINDER_MINUTES_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=5&&b<=240}});a.s(["no_log_reminder_minutes_preference",0,e],40395);let f=(0,b.create_ui_preference_store)({storage_key:c.OVERWORK_ALERT_HOURS_STORAGE_KEY,default_value:c.OVERWORK_ALERT_HOURS_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=1&&b<=16}});a.s(["overwork_alert_hours_preference",0,f],76121)},22496,43329,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=/^([01]\d|2[0-3]):[0-5]\d$/,e=(0,b.create_ui_preference_store)({storage_key:c.WORK_HOURS_END_STORAGE_KEY,default_value:c.WORK_HOURS_END_DEFAULT,is_valid:a=>d.test(a)});a.s(["work_hours_end_preference",0,e],22496);let f=/^([01]\d|2[0-3]):[0-5]\d$/,g=(0,b.create_ui_preference_store)({storage_key:c.WORK_HOURS_START_STORAGE_KEY,default_value:c.WORK_HOURS_START_DEFAULT,is_valid:a=>f.test(a)});a.s(["work_hours_start_preference",0,g],43329)},7386,85928,89184,a=>{"use strict";var b=a.i(39752),c=a.i(34542);function d({label:a,description:c,compact:e}){return(0,b.jsxs)("div",{className:"contents",children:[(0,b.jsx)("dt",{className:"m-0",children:(0,b.jsx)("kbd",{className:`inline-block min-w-7 rounded border border-panel-border bg-surface text-center font-mono font-semibold text-foreground ${e?"px-1 py-0.5 text-[0.7rem]":"px-1.5 py-0.5 text-[0.78rem]"}`,children:a})}),(0,b.jsx)("dd",{className:`m-0 self-center leading-snug text-muted ${e?"text-[0.8rem]":"text-[0.9rem]"}`,children:c})]})}function e({sections:a,compact:c=!1}){return(0,b.jsx)("div",{className:`flex flex-col ${c?"gap-2.5":"gap-4"}`,children:a.map(a=>(0,b.jsxs)("section",{children:[(0,b.jsx)("h3",{className:`m-0 font-semibold uppercase tracking-[0.04em] text-muted ${c?"text-[0.65rem]":"text-[0.72rem]"}`,children:a.title}),(0,b.jsx)("dl",{className:`m-0 grid grid-cols-[auto_minmax(0,1fr)] ${c?"mt-1.5 gap-x-3 gap-y-1.5":"mt-2 gap-x-4 gap-y-2"}`,children:a.entries.map(e=>(0,b.jsx)(d,{label:e.label,description:e.description,compact:c},`${a.title}-${e.label}-${e.description}`))})]},a.title))})}var f=a.i(89969);a.s(["KeyboardShortcutsDialog",0,function({sections:a,on_close:d}){let g=(0,c.useId)(),h=(0,c.useRef)(null);return(0,c.useEffect)(()=>{h.current?.focus();let a=a=>{"Escape"===a.key&&d()};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[d]),(0,b.jsxs)("div",{className:"fixed inset-0 z-100 flex items-center justify-center p-5",role:"presentation",children:[(0,b.jsx)("button",{type:"button",className:"absolute inset-0 cursor-default border-0 bg-overlay p-0","aria-label":"Dismiss dialog",onClick:d}),(0,b.jsxs)("div",{role:"dialog","aria-modal":"true","aria-labelledby":g,className:"relative z-1 w-full max-w-lg rounded-lg border border-panel-border bg-panel p-5 shadow-md",children:[(0,b.jsx)("h2",{id:g,className:"m-0 text-[1.1rem] font-[650] tracking-tight",children:"Keyboard shortcuts"}),(0,b.jsx)("div",{className:"mt-4 max-h-[min(28rem,70vh)] overflow-y-auto pr-1",children:(0,b.jsx)(e,{sections:a})}),(0,b.jsx)("div",{className:"mt-5 flex justify-end",children:(0,b.jsx)("button",{ref:h,type:"button",className:(0,f.get_button_class_name)("primary"),onClick:d,children:"Close"})})]})]})}],7386);var g=a.i(75049);a.s(["get_tracker_keyboard_shortcut_sections",0,function(a=g.tracker_shortcut_defaults){return[...function(a="?"){return[{title:"General",entries:[{label:a,description:"Show keyboard shortcuts"}]}]}("?"===a.help?"?":a.help.toUpperCase()),{title:"Tracker",entries:[{label:a["check-in"].toUpperCase(),description:"Check in (focus description)"},{label:a["check-out"].toUpperCase(),description:"Check out"},{label:a["edit-entry"].toUpperCase(),description:"Edit active entry description"},{label:a["add-note"].toUpperCase(),description:"Add note to active entry"},{label:a.pomodoro.toUpperCase(),description:"Open Pomodoro"},{label:a["previous-sheet"],description:"Previous sheet"},{label:a["next-sheet"],description:"Next sheet"}]}]}],85928);var h=a.i(46299);a.s(["use_document_keyboard_shortcuts",0,function(a){let b=(0,c.useRef)(a);b.current=a,(0,c.useEffect)(()=>{let a=a=>{if(!function(a){let b=a.target;if(!(b instanceof HTMLElement))return!1;if(b.isContentEditable)return!0;let c=b.tagName;return"INPUT"===c||"TEXTAREA"===c||"SELECT"===c}(a)&&!(0,h.is_modal_dialog_open)()){for(let c of b.current)if(c.is_available?.()!==!1&&function(a,b){let c=b.modifiers??[],d=c.includes("alt"),e=c.includes("ctrl"),f=c.includes("meta"),g=c.includes("shift");return a.altKey===d&&a.ctrlKey===e&&a.metaKey===f&&a.shiftKey===g&&(1===a.key.length?a.key.toLowerCase():a.key)===(1===b.key.length?b.key.toLowerCase():b.key)}(a,c)){a.preventDefault(),c.action();return}}};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[])}],89184)},17037,a=>{"use strict";var b=a.i(39752),c=a.i(82508),d=a.i(34542),e=a.i(7386),f=a.i(85928),g=a.i(11937),h=a.i(54212),i=a.i(89184);a.s(["AppKeyboardShortcuts",0,function(){let a=(0,c.usePathname)(),[j,k]=(0,d.useState)(!1),l="/"===a,m=(0,d.useSyncExternalStore)(h.tracker_shortcut_map_preference.subscribe,h.tracker_shortcut_map_preference.get_snapshot,h.tracker_shortcut_map_preference.get_server_snapshot),n=(0,d.useMemo)(()=>(0,g.parse_tracker_shortcut_map)(m),[m]),o=n.help,p="?"===o?["shift"]:[],q=(0,d.useMemo)(()=>l?[]:[{id:"help",label:"?"===o?"?":o.toUpperCase(),description:"Show keyboard shortcuts",key:o,modifiers:p,action:()=>{k(a=>!a)}}],[o,p,l]);return((0,i.use_document_keyboard_shortcuts)(q),!j||l)?null:(0,b.jsx)(e.KeyboardShortcutsDialog,{sections:(0,f.get_tracker_keyboard_shortcut_sections)(n),on_close:()=>k(!1)})}])},24480,a=>{"use strict";var b=a.i(39752),c=a.i(82508),d=a.i(34542),e=a.i(9301),f=a.i(19519),g=a.i(64169),h=a.i(17465);async function i(){await (0,h.with_ui_preferences_merge_guard)(async()=>{let a=(0,g.collect_ui_preferences_from_window)(),b=await fetch("/api/ui-preferences/merge-on-load",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:a})});if(!b.ok)throw Error((await b.json()).error??"UI preferences merge on load failed");let c=await b.json();(0,f.apply_ui_preferences_from_record)(c.preferences??{})})}var j=a.i(80097),k=a.i(51652),l=a.i(63577),m=a.i(74365),n=a.i(87281);function o(){return(0,n.is_greedy_cloud_sync_enabled)()}a.s(["CloudSyncProvider",0,function({children:a}){let f=(0,c.useRouter)(),g=(0,c.usePathname)(),h=(0,d.useRef)(null),n=(0,d.useRef)(!0);return(0,d.useEffect)(()=>{if(!(0,l.is_supabase_configured)()||!(0,k.is_cloud_sync_enabled)())return;let a=(0,e.create_browser_supabase_client)(),b=a=>{!o()&&(0,j.has_tracker_db_merged_this_browser_session)()?i().catch(()=>{}):(0,m.run_tracker_db_cloud_sync)({merge_on_load:!0,on_complete:a?()=>{f.refresh()}:void 0}).catch(()=>{})};a.auth.getSession().then(({data:{session:a}})=>{null!==a&&b(!1)});let{data:{subscription:c}}=a.auth.onAuthStateChange(a=>{if("SIGNED_IN"===a){(0,j.clear_tracker_db_merged_this_browser_session)(),h.current=null,n.current=!0,b(!0);return}"SIGNED_OUT"===a&&((0,j.clear_tracker_db_merged_this_browser_session)(),h.current=null,n.current=!0,f.refresh())});return()=>{c.unsubscribe()}},[f]),(0,d.useEffect)(()=>{if((0,l.is_supabase_configured)()&&(0,k.is_cloud_sync_enabled)()&&o()){if(n.current){n.current=!1,h.current=g;return}h.current!==g&&(h.current=g,(0,m.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{}))}},[g]),(0,b.jsx)(b.Fragment,{children:a})}],24480)},48889,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(14676);function e(){let[a,e]=(0,c.useState)(null);if((0,c.useEffect)(()=>{let a=null,b=(0,d.subscribe_cloud_db_sync)(b=>{e(b),null!==a&&(clearTimeout(a),a=null),(b?.phase==="success"||b?.phase==="error")&&(a=setTimeout(()=>{e(null),a=null},2800))});return()=>{b(),null!==a&&clearTimeout(a)}},[]),null===a)return null;let f="syncing"===a.phase,g="error"===a.phase,h="success"===a.phase?100:"error"===a.phase?0:null;return(0,b.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,b.jsx)("p",{className:"m-0 mb-2.5 leading-snug",children:a.message}),(0,b.jsx)("div",{className:"h-1 overflow-hidden rounded-full bg-[color-mix(in_srgb,var(--accent)_22%,var(--panel-border))]","aria-hidden":"true",children:f?(0,b.jsx)("div",{className:"cloud-db-sync-progress-indeterminate h-full w-1/3 rounded-full bg-accent"}):(0,b.jsx)("div",{className:`h-full rounded-full transition-[width] duration-300 ease-out ${g?"bg-danger":"bg-accent"}`,style:{width:`${h??0}%`}})})]})}var f=a.i(97917);function g(){let[a,d]=(0,c.useState)(null);return((0,c.useEffect)(()=>{let a=null,b=(0,f.subscribe_in_app_notifications)(b=>{d(b),null!==a&&clearTimeout(a),a=setTimeout(()=>{d(null),a=null},3200)});return()=>{b(),null!==a&&clearTimeout(a)}},[]),null===a)?null:(0,b.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,b.jsx)("p",{className:"m-0 text-[0.84rem] font-semibold",children:a.title}),(0,b.jsx)("p",{className:"m-0 mt-0.5 text-[0.8rem] leading-snug text-muted",children:a.body})]})}var h=a.i(7048);function i(){let[a,d]=(0,c.useState)(null);return((0,c.useEffect)(()=>{let a=null,b=(0,h.subscribe_settings_saved)(b=>{d(b),null!==a&&clearTimeout(a),a=setTimeout(()=>{d(null),a=null},2800)});return()=>{b(),null!==a&&clearTimeout(a)}},[]),null===a)?null:(0,b.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:a||h.SETTINGS_SAVED_DEFAULT_MESSAGE})}a.s(["ToastNotifications",0,function(){return(0,b.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,b.jsx)(g,{}),(0,b.jsx)(e,{}),(0,b.jsx)(i,{})]})}],48889)},70648,a=>{"use strict";var b=a.i(34542),c=a.i(37183);a.s(["DocumentPreferencesInit",0,function(){return(0,b.useLayoutEffect)(()=>{(0,c.apply_ui_preferences_dom_from_window)()},[]),null}])},34174,a=>{"use strict";var b=a.i(34542),c=a.i(72327),d=a.i(40395),e=a.i(76121),f=a.i(22496),g=a.i(43329);a.s(["NotificationRulesRunner",0,function(){let a=(0,b.useSyncExternalStore)(c.focus_nudges_enabled_preference.subscribe,c.focus_nudges_enabled_preference.get_snapshot,c.focus_nudges_enabled_preference.get_server_snapshot),h=(0,b.useSyncExternalStore)(d.no_log_reminder_minutes_preference.subscribe,d.no_log_reminder_minutes_preference.get_snapshot,d.no_log_reminder_minutes_preference.get_server_snapshot),i=(0,b.useSyncExternalStore)(e.overwork_alert_hours_preference.subscribe,e.overwork_alert_hours_preference.get_snapshot,e.overwork_alert_hours_preference.get_server_snapshot),j=(0,b.useSyncExternalStore)(g.work_hours_start_preference.subscribe,g.work_hours_start_preference.get_snapshot,g.work_hours_start_preference.get_server_snapshot),k=(0,b.useSyncExternalStore)(f.work_hours_end_preference.subscribe,f.work_hours_end_preference.get_snapshot,f.work_hours_end_preference.get_server_snapshot);return(0,b.useRef)(0),(0,b.useRef)(null),(0,b.useEffect)(()=>{},[a]),(0,b.useEffect)(()=>{},[a,h,i,k,j]),null}])},19494,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(89969);let e="super-time-tracker-pwa-install-notice-dismissed";a.s(["PwaInstallNotice",0,function(){let[a,f]=(0,c.useState)(null),[g,h]=(0,c.useState)(!0),[i,j]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{},[]),g)?null:(0,b.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,b.jsx)("p",{className:"m-0 text-[0.9rem] font-semibold",children:"Install app"}),(0,b.jsx)("p",{className:"m-0 mt-1 text-[0.82rem] leading-snug text-muted",children:null!==a?"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,b.jsxs)("div",{className:"mt-3 flex gap-2",children:[null!==a?(0,b.jsx)("button",{type:"button",className:(0,d.get_button_class_name)("primary","small"),disabled:i,onClick:()=>{j(!0),a.prompt().then(async()=>{"accepted"===(await a.userChoice).outcome&&(window.localStorage.setItem(e,"true"),h(!0))}).finally(()=>{j(!1),f(null)})},children:i?"Opening…":"Install"}):null,(0,b.jsx)("button",{type:"button",className:(0,d.get_button_class_name)("ghost","small"),onClick:()=>{window.localStorage.setItem(e,"true"),h(!0)},children:"Dismiss"})]})]})}])},82429,a=>{"use strict";var b=a.i(34542);a.s(["PwaRegister",0,function(){return(0,b.useEffect)(()=>{},[]),null}])},97658,a=>{"use strict";var b=a.i(34542);a.i(29698),a.s(["ThemeModeSystemListener",0,function(){return(0,b.useEffect)(()=>{},[]),null}])},16081,a=>{"use strict";var b=a.i(34542),c=a.i(37183),d=a.i(17310);a.s(["UiPreferencesDocumentSync",0,function(){return(0,b.useEffect)(()=>{let a=()=>{(0,c.apply_ui_preferences_dom_from_window)()};return window.addEventListener(d.UI_PREFERENCES_APPLIED_EVENT,a),()=>{window.removeEventListener(d.UI_PREFERENCES_APPLIED_EVENT,a)}},[]),null}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0k~hq1g._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},54508,(a,b,c)=>{"use strict";function d(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(d=function(a){return a?c:b})(a)}c._=function(a,b){if(!b&&a&&a.__esModule)return a;if(null===a||"object"!=typeof a&&"function"!=typeof a)return{default:a};var c=d(b);if(c&&c.has(a))return c.get(a);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var g in a)if("default"!==g&&Object.prototype.hasOwnProperty.call(a,g)){var h=f?Object.getOwnPropertyDescriptor(a,g):null;h&&(h.get||h.set)?Object.defineProperty(e,g,h):e[g]=a[g]}return e.default=a,c&&c.set(a,e),e}},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},59341,40388,67511,92398,26351,a=>{"use strict";var b=a.i(60526),c=a.i(50227);let d="main",e=c.default.join(b.default.homedir(),".super-time-tracker"),f=c.default.join(e,"db.json");a.s(["DB_PATH",0,f,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,d],59341),a.s(["convert_json_db",0,function(a){let{sheets:b,version:c,activeSheetName:d}=a;return{version:c,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e,notes:f})=>({id:a,description:d,tags:e,notes:f.map(({timestamp:a,text:b})=>({text:b,timestamp:new Date(a)})),start:new Date(b),end:null===c?null:new Date(c)}))}))}}],40388);var g=a.i(2157);async function h(a){try{await g.promises.mkdir(a,{recursive:!0})}catch(a){if("EEXIST"!==(null!==a&&"object"==typeof a&&"code"in a&&"string"==typeof a.code?a.code:null))throw a}}function i(a,b=[],c=null){if(0===a.length)throw Error("New sheet name must not be empty");if(null!==c&&void 0===b.find(({id:a})=>a===c))throw Error("New sheet active entry does not exist");return{name:a,entries:b,activeEntryID:c}}a.s(["ensure_dir_exists",0,h],67511),a.s(["gen_db",0,function(){return{version:3,sheets:[i(d)],activeSheetName:d}},"gen_sheet",0,i],92398);let j={2:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(1!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 2.`);return{version:2,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d})=>({tags:[],notes:[],id:a,end:c,start:b,description:d}))}))}},3:function(a){let{sheets:b,version:c,activeSheetName:d}=a;if(2!==c&&void 0!==c)throw Error(`DB is version ${c}, cannot migrate to version 3.`);return{version:3,activeSheetName:d,sheets:b.map(({name:a,entries:b,activeEntryID:c})=>({name:a,activeEntryID:c,entries:b.map(({id:a,start:b,end:c,description:d,tags:e})=>({notes:[],tags:e,id:a,end:c,start:b,description:d}))}))}}};a.s(["migrate_json_db",0,function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>3||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<3;){let a=d+1,e=j[a];if(void 0===e)throw Error(`Missing migration from version ${d} to ${a}.`);if((b=e(b)).version!==a)throw Error(`Invalid migration output for version ${a}.`);d=a,c=!0}return{json_db:b,did_migrate:c}}],26351)},6931,a=>{"use strict";a.s(["convert_db_to_json",0,function(a){let b=a.sheets.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entries:a.entries.map(a=>({id:a.id,description:a.description,tags:a.tags,start:a.start.getTime(),end:null===a.end?null:a.end.getTime(),notes:a.notes.map(a=>({text:a.text,timestamp:a.timestamp.getTime()}))}))}));return{version:a.version,activeSheetName:a.activeSheetName,sheets:b}}])},4813,23761,a=>{"use strict";var b=a.i(50227),c=a.i(2157),d=a.i(59341),e=a.i(40388),f=a.i(67511),g=a.i(92398),h=a.i(26351),i=a.i(6931);async function j(a,b=d.DB_PATH){let e=JSON.stringify((0,i.convert_db_to_json)(a));try{await c.promises.writeFile(b,e)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function k(a=d.DB_PATH){let i,l=b.default.dirname(a);await (0,f.ensure_dir_exists)(l);try{await c.promises.access(a)}catch{let b=(0,g.gen_db)();return await j(b,a),b}let m=await c.promises.readFile(a,"utf-8");try{i=JSON.parse(m)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let n=(0,h.migrate_json_db)(i);i=n.json_db;let o=(0,e.convert_json_db)(i);return n.did_migrate&&await j(o,a),o}async function l(a){return k(a)}a.s(["write_local_db",0,j],23761),a.s(["read_db",0,l],4813)},2985,82478,2798,93835,12781,a=>{"use strict";let b=Symbol.for("constructDateFrom");function c(a,c){return"function"==typeof a?a(c):a&&"object"==typeof a&&b in a?a[b](c):a instanceof Date?new a.constructor(c):new Date(c)}function d(a,b){return c(b||a,a)}function e(a,b){let c=d(a,b?.in);return c.setHours(23,59,59,999),c}a.s(["constructFrom",0,c],82478),a.s(["toDate",0,d],2798),a.s(["endOfDay",0,e],93835);let f={};function g(a,b){let c=d(a,b?.in);return c.setHours(0,0,0,0),c}a.s(["startOfDay",0,g],12781),a.s(["get_period_range_ms",0,function(a,b=new Date,c=1){switch(a){case"week":var h,i;let j,k,l,m,n,o;return{startMs:+(h={weekStartsOn:c},j=h?.weekStartsOn??h?.locale?.options?.weekStartsOn??f.weekStartsOn??f.locale?.options?.weekStartsOn??0,l=(k=d(b,h?.in)).getDay(),k.setDate(k.getDate()-(7*(l<j)+l-j)),k.setHours(0,0,0,0),k),endMs:+(i={weekStartsOn:c},m=i?.weekStartsOn??i?.locale?.options?.weekStartsOn??f.weekStartsOn??f.locale?.options?.weekStartsOn??0,o=(n=d(b,i?.in)).getDay(),n.setDate(n.getDate()+((o<m?-7:0)+6-(o-m))),n.setHours(23,59,59,999),n)};case"month":let p,q,r;return{startMs:+((p=d(b,void 0)).setDate(1),p.setHours(0,0,0,0),p),endMs:+(r=(q=d(b,void 0)).getMonth(),q.setFullYear(q.getFullYear(),r+1,0),q.setHours(23,59,59,999),q)};default:return{startMs:+g(b),endMs:+e(b)}}}],2985)},23035,a=>{"use strict";a.s(["get_clipped_entry_duration_ms",0,function(a,b,c,d=Date.now()){let e=+a.start;return Math.max(0,Math.min(null===a.end?d:+a.end,c)-Math.max(e,b))}])},2317,51196,a=>{"use strict";function b(a,b){return 0===b?0:a/b}a.s(["get_average_entry_ms",0,b],51196);var c=a.i(23035);a.s(["get_sheet_report_stats_for_range",0,function(a,d,e,f=Date.now()){let g=0,h=0,i=!1;for(let b of a.entries){let j=(0,c.get_clipped_entry_duration_ms)(b,d,e,f);j<=0||(g+=j,h+=1,a.activeEntryID===b.id&&null===b.end&&(i=!0))}return{sheetName:a.name,totalMs:g,entryCount:h,averageEntryMs:b(g,h),hasActiveEntry:i}}],2317)},26758,a=>{a.v("/_next/static/media/favicon.0x3dzn~oxb6tn.ico"+(globalThis.NEXT_CLIENT_ASSET_SUFFIX||""))},38872,a=>{"use strict";let b={src:a.i(26758).default,width:256,height:256};a.s(["default",0,b])},57577,a=>{"use strict";a.s(["SheetHubView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SheetHubView() from the server but SheetHubView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/sheet-hub-view.tsx <module evaluation>","SheetHubView")},68434,a=>{"use strict";a.s(["SheetHubView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SheetHubView() from the server but SheetHubView is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/sheet-hub-view.tsx","SheetHubView")},14012,a=>{"use strict";a.i(57577);var b=a.i(68434);a.n(b)},23853,a=>{"use strict";var b=a.i(46193),c=a.i(14012),d=a.i(2985),e=a.i(2317),f=a.i(4813);async function g(){return{rows:function(a,b=Date.now(),c=1){let f=new Date(b),g=(0,d.get_period_range_ms)("week",f,c),h=(0,d.get_period_range_ms)("month",f);return a.map(a=>{let c=(0,e.get_sheet_report_stats_for_range)(a,g.startMs,g.endMs,b),d=(0,e.get_sheet_report_stats_for_range)(a,h.startMs,h.endMs,b),f=function(a,b=Date.now()){let c=null;for(let d of a.entries){let a=null===d.end?b:+d.end,e=Math.max(+d.start,a);(null===c||e>c)&&(c=e)}return c}(a,b);return{sheetName:a.name,entryCount:a.entries.length,hasActiveEntry:null!==a.activeEntryID,weekTotalMs:c.totalMs,monthTotalMs:d.totalMs,lastActivityAt:null===f?null:new Date(f).toISOString()}})}((await (0,f.read_db)()).sheets)}}async function h(){let{rows:a}=await g();return(0,b.jsx)(c.SheetHubView,{rows:a})}a.s(["default",0,h],23853)},12349,a=>{a.n(a.i(23853))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0wtu388._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[19702,a=>{"use strict";a.s(["ACTIVE_SHEET_COOKIE_NAME",0,"stt-active-sheet","ACTIVE_SHEET_STORAGE_KEY",0,"super-time-tracker-active-sheet","COMPACT_LISTS_STORAGE_KEY",0,"super-time-tracker-compact-lists","DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME",0,"stt-default-sheet-fixed-name","DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY",0,"super-time-tracker-default-sheet-fixed-name","DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME",0,"stt-default-sheet-session-mode","DEFAULT_SHEET_SESSION_MODE_DEFAULT",0,"last_viewed","DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY",0,"super-time-tracker-default-sheet-session-mode","SHEET_TAG_FILTERS_STORAGE_KEY",0,"super-time-tracker-sheet-tag-filters"])},69749,a=>{"use strict";a.s(["get_input_class_name",0,function(a="default"){let b="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"===a?`${b} px-2.5 py-2`:b}])},56924,a=>{"use strict";a.s(["normalize_stored_tag",0,function(a){let b=a.trim().replace(/^@+/,"");if(0===b.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(b))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${b}`}])},48174,a=>{"use strict";a.s(["format_display_tag",0,function(a){return a.startsWith("@")?a:`@${a}`}])},30354,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(48174),e=a.i(69749),f=a.i(56924);a.s(["TagAutocompleteInput",0,function({id:a,value:g,known_tags:h,placeholder:i,disabled:j=!1,autoFocus:k=!1,on_change:l}){let m=(0,c.useRef)(null),n=(0,c.useRef)(null),o=(0,c.useRef)(null),[p,q]=(0,c.useState)(0),[r,s]=(0,c.useState)(0),t=function(a,b){let c=a.slice(0,b),d=c.lastIndexOf("@");if(-1===d)return null;let e=c.slice(d+1);return/\s/.test(e)?null:{query:e,start_index:d,end_index:b}}(g,p),u=null===t?[]:function(a,b,c=10){let d=b.toLowerCase();return a.filter(a=>{let b=a.replace(/^@/,"").toLowerCase();return 0===d.length||b.startsWith(d)}).slice(0,c)}(h,t.query),v=null!==t&&function(a,b){if(!/^\w+$/.test(a))return!1;let c=a.toLowerCase();return b.some(a=>{try{return(0,f.normalize_stored_tag)(a).slice(1).toLowerCase()===c}catch{return!1}})}(t.query,h),w=null!==t&&u.length>0&&!v&&!j;(0,c.useLayoutEffect)(()=>{null!==o.current&&null!==m.current&&(m.current.setSelectionRange(o.current,o.current),q(o.current),o.current=null)},[g]),(0,c.useEffect)(()=>{s(0)},[g,p,u.length]);let x=()=>{q(m.current?.selectionStart??g.length)},y=()=>{s(0)},z=a=>{let b,c,e;if(null===t)return;let{next_text:f,next_cursor:h}=(b=(0,d.format_display_tag)(a),c=g.slice(0,t.start_index),e=g.slice(t.end_index),{next_text:`${c}${b}${e}`,next_cursor:c.length+b.length});o.current=h,l(f),y()};return(0,b.jsxs)("div",{className:"relative min-w-0",children:[(0,b.jsx)("input",{ref:m,id:a,type:"text",className:(0,e.get_input_class_name)(),value:g,placeholder:i,disabled:j,autoFocus:k,autoComplete:"off","aria-autocomplete":"list","aria-expanded":w,"aria-controls":w?`${a}-tag-suggestions`:void 0,onChange:a=>{l(a.target.value),q(a.target.selectionStart??a.target.value.length)},onClick:x,onKeyUp:x,onKeyDown:a=>{if(w){if("ArrowDown"===a.key){a.preventDefault(),s(a=>(a+1)%u.length);return}if("ArrowUp"===a.key){a.preventDefault(),s(a=>(a-1+u.length)%u.length);return}if("Enter"===a.key||"Tab"===a.key){a.preventDefault();let b=u[r];void 0!==b&&z(b);return}"Escape"===a.key&&(a.preventDefault(),y())}},onBlur:()=>{window.setTimeout(y,120)}}),w?(0,b.jsx)("ul",{ref:n,id:`${a}-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:u.map((a,c)=>(0,b.jsx)("li",{role:"option","aria-selected":c===r,children:(0,b.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 ${c===r?"bg-surface-hover":""}`,onMouseDown:b=>{b.preventDefault(),z(a)},children:(0,d.format_display_tag)(a)})},a))}):null]})}],30354)},64617,a=>{"use strict";a.s(["POMODORO_DEFAULT_SETTINGS",0,{work_minutes:25,short_break_minutes:5,long_break_minutes:15,rounds_before_long_break:4,auto_start_next_phase:!0,check_in_on_work_start:!0,work_entry_description:"Pomodoro focus"},"POMODORO_DEFAULT_STATE",0,{phase:"work",status:"idle",completed_work_sessions:0,deadline_at_ms:null,paused_remaining_ms:null},"POMODORO_STORAGE_KEY",0,"super-time-tracker-pomodoro"])},78537,a=>{"use strict";var b=a.i(97917);a.s(["notify_desktop",0,function(a){(0,b.notify_in_app)({title:a.title,body:a.body})},"supports_desktop_notifications",0,function(){return!1}])},18734,a=>{"use strict";a.s(["clear_pomodoro_task_entry_marker",0,function(){},"is_pomodoro_task_entry",0,function(a){return!1},"mark_pomodoro_task_entry",0,function(a){}])},54015,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(34542),e=a.i(75654),f=a.i(30354),g=a.i(98790),h=a.i(89969),i=a.i(78537),j=a.i(18734),k=a.i(19702),l=a.i(64617);a.s(["PomodoroView",0,function({known_tags:a}){let[m,n]=(0,d.useState)(l.POMODORO_DEFAULT_SETTINGS),[o,p]=(0,d.useState)(l.POMODORO_DEFAULT_STATE),[q,r]=(0,d.useState)(()=>Date.now()),[s,t]=(0,d.useState)(!1),[u,v]=(0,d.useState)(null),[w,x]=(0,d.useState)(!1),y=(0,d.useRef)(null),z=(0,d.useRef)(l.POMODORO_DEFAULT_SETTINGS),A=(0,d.useRef)(l.POMODORO_DEFAULT_STATE),B=(0,d.useCallback)((a,b)=>{(0,i.notify_desktop)({title:a,body:b,tag:"pomodoro-phase-event"})},[]);(0,d.useEffect)(()=>{},[]),(0,d.useEffect)(()=>{z.current=m},[m]),(0,d.useEffect)(()=>{A.current=o},[o]);let C=(0,d.useCallback)((a,b)=>{},[]),D=(0,d.useCallback)(a=>{p(b=>{let c="function"==typeof a?a(b):a;return A.current=c,C(z.current,c),c})},[C]);(0,d.useEffect)(()=>{},[s,C,m,o]),(0,d.useEffect)(()=>{},[C]),(0,d.useEffect)(()=>{if("running"!==o.status)return;let a=window.setInterval(()=>{r(Date.now())},1e3);return()=>{window.clearInterval(a)}},[o.status,o.deadline_at_ms]);let E=(0,d.useCallback)(a=>{switch(a){case"work":return 6e4*m.work_minutes;case"short_break":return 6e4*m.short_break_minutes;case"long_break":return 6e4*m.long_break_minutes}},[m.long_break_minutes,m.short_break_minutes,m.work_minutes]),F=(0,d.useCallback)(async()=>{let a=await fetch("/api/state",{method:"GET",cache:"no-store"});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error??"Failed to read tracker state");let b=await a.json().catch(()=>null);return b?.runningEntry!==null&&b?.runningEntry!==void 0},[]),G=(0,d.useCallback)(async()=>{try{x(await F())}catch{}},[F]),H=async()=>{let a=m.work_entry_description.trim();if(0===a.length)return;if(await F())return void x(!0);let b=await fetch("/api/in",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({description:a,sheetName:function(){try{let a=window.localStorage.getItem(k.ACTIVE_SHEET_STORAGE_KEY)?.trim()??"";return a.length>0?a:null}catch{return null}}()??void 0})});if(b.ok){let a=await b.json().catch(()=>null),c=a?.activeEntry;null!=c&&(0,j.mark_pomodoro_task_entry)({id:c.id,sheetName:c.sheetName}),x(!0);return}throw Error((await b.json().catch(()=>({}))).error??"Failed to start tracker entry for Pomodoro")},I=async()=>{let a=await fetch("/api/out",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});if(a.ok){(0,j.clear_pomodoro_task_entry_marker)(),x(!1);return}let b=(await a.json().catch(()=>({}))).error??"Failed to check out active tracker entry";if(!b.includes("No active entry"))throw Error(b)},J=async()=>{v(null);try{let a=await fetch("/api/state",{method:"GET",cache:"no-store"});if(!a.ok){let b=await a.json().catch(()=>({}));throw Error(b.error??"Failed to read tracker state")}let b=await a.json().catch(()=>null),c=b?.runningEntry;if(c?.start===void 0)throw Error("No active task found to start from");let d=Date.parse(c.start);if(!Number.isFinite(d))throw Error("Active task start time is invalid");let e=Math.max(0,Date.now()-d),f=E(o.phase),g=Math.max(0,f-e);D(a=>({...a,status:"running",deadline_at_ms:Date.now()+g,paused_remaining_ms:null}))}catch(a){v(a instanceof Error?a.message:String(a))}},K=(0,d.useCallback)(()=>{let a="work"===o.phase,b=o.completed_work_sessions+1;if(D(a=>{let b="work"===a.phase?a.completed_work_sessions+1:a.completed_work_sessions,c="work"===a.phase?b%m.rounds_before_long_break==0?"long_break":"short_break":"work",d=E(c);return m.auto_start_next_phase?{phase:c,status:"running",completed_work_sessions:b,deadline_at_ms:Date.now()+d,paused_remaining_ms:null}:{phase:c,status:"idle",completed_work_sessions:b,deadline_at_ms:null,paused_remaining_ms:null}}),a&&B("Pomodoro focus session complete",`Completed focus session ${b}.`),m.auto_start_next_phase){let a="work"===o.phase?o.completed_work_sessions%m.rounds_before_long_break==m.rounds_before_long_break-1?"long break":"short break":"focus";B("work"===o.phase?"Pomodoro break started":"Pomodoro focus started",`Auto-started ${a} timer.`)}},[E,B,D,o.completed_work_sessions,o.phase,m.auto_start_next_phase,m.rounds_before_long_break]);(0,d.useEffect)(()=>{let a=window.setTimeout(()=>{G()},0);return()=>{window.clearTimeout(a)}},[G]),(0,d.useEffect)(()=>{let a=window.setInterval(()=>{G()},5e3);return()=>{window.clearInterval(a)}},[G]),(0,d.useEffect)(()=>{if("running"!==o.status||null===o.deadline_at_ms||q<o.deadline_at_ms)return;let a=window.setTimeout(()=>{K()},0);return()=>{window.clearTimeout(a)}},[K,q,o.deadline_at_ms,o.status]);let L=E(o.phase),M="running"===o.status&&null!==o.deadline_at_ms?Math.max(0,o.deadline_at_ms-q):"paused"===o.status?o.paused_remaining_ms??L:L,N=Math.min(100,Math.max(0,(L-M)/L*100)),O=`${Math.floor(M/6e4).toString().padStart(2,"0")}:${Math.floor(M%6e4/1e3).toString().padStart(2,"0")}`,P={work:"Focus",short_break:"Short break",long_break:"Long break"}[o.phase],Q="work"===o.phase?o.completed_work_sessions%m.rounds_before_long_break==m.rounds_before_long_break-1?"long_break":"short_break":"work",R="work"===o.phase?`${o.completed_work_sessions+1} / ${m.rounds_before_long_break} focus rounds`:"short_break"===o.phase?"Recover before the next focus block.":"Take the long break before the next round.",S="running"===o.status?"Pause":"paused"===o.status?"Resume":"Start",T=`${O} \xb7 ${P} \xb7 Pomodoro`;return(0,d.useEffect)(()=>{if("u">typeof document)return null===y.current&&(y.current=document.title),()=>{null!==y.current&&(document.title=y.current)}},[]),(0,d.useEffect)(()=>{"u">typeof document&&(document.title=T)},[T]),(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.TrackerTopbar,{breadcrumb:{current:"Pomodoro"}}),(0,b.jsxs)("main",{className:"mx-auto flex w-full max-w-2xl flex-col gap-6 px-5 pb-12 pt-6",children:[(0,b.jsxs)("header",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("h1",{className:"m-0 text-[1.5rem] font-[650] tracking-tight",children:"Pomodoro"}),(0,b.jsx)("p",{className:"m-0 mt-2 text-[0.9rem] leading-relaxed text-muted",children:"Keep a simple focus cycle running alongside your time tracker."})]}),(0,b.jsx)(c.default,{href:"/settings/pomodoro",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","aria-label":"Pomodoro settings",title:"Pomodoro settings",children:(0,b.jsx)(e.SettingsIcon,{})})]}),(0,b.jsx)("section",{className:"rounded-md border border-panel-border bg-panel p-5 shadow-sm",children:(0,b.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Current phase"}),(0,b.jsx)("p",{className:"m-0 mt-1 text-[1.3rem] font-semibold",children:P}),(0,b.jsx)("p",{className:"m-0 mt-1 text-[0.88rem] leading-relaxed text-muted",children:R})]}),(0,b.jsxs)("div",{className:"text-right",children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Next phase"}),(0,b.jsx)("p",{className:"m-0 mt-1 text-[0.95rem] font-semibold text-accent",children:{work:"Focus",short_break:"Short break",long_break:"Long break"}[Q]}),(0,b.jsx)("p",{className:"m-0 mt-1 text-[0.84rem] text-muted",children:m.auto_start_next_phase?"Auto-start enabled":"Waiting for you"})]})]}),(0,b.jsxs)("div",{className:"rounded-md border border-panel-border bg-background px-4 py-5 text-center",children:[(0,b.jsx)("p",{className:"m-0 font-mono text-[3rem] font-semibold tracking-tight text-accent","aria-live":"polite",children:O}),(0,b.jsx)("div",{className:"mt-4 h-2 overflow-hidden rounded-full bg-surface-strong",children:(0,b.jsx)("div",{className:"h-full rounded-full bg-accent transition-[width] duration-200",style:{width:`${N}%`}})}),(0,b.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-2 text-[0.82rem] text-muted",children:[(0,b.jsxs)("span",{children:[o.completed_work_sessions," focus sessions done"]}),(0,b.jsx)("span",{children:"•"}),(0,b.jsx)("span",{children:"running"===o.status?"Running":"paused"===o.status?"Paused":"Idle"})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,b.jsx)("button",{type:"button",className:(0,h.get_button_class_name)("primary"),onClick:()=>{let a,b,c;"running"===o.status?(v(null),D(a=>"running"!==a.status||null===a.deadline_at_ms?a:{...a,status:"paused",deadline_at_ms:null,paused_remaining_ms:Math.max(0,a.deadline_at_ms-Date.now())}),I().catch(a=>{v(a instanceof Error?a.message:String(a))})):(v(null),D(a=>{let b="paused"===a.status&&null!==a.paused_remaining_ms?a.paused_remaining_ms:E(a.phase);return{...a,status:"running",deadline_at_ms:Date.now()+b,paused_remaining_ms:null}}),a="paused"===o.status,b="short_break"===o.phase||"long_break"===o.phase,c=a||"running"!==o.status&&"work"===o.phase&&m.check_in_on_work_start,a||"running"===o.status||B(b?"Pomodoro break started":"Pomodoro focus started",b?"Break timer is running.":"Focus timer is running."),c&&H().catch(a=>{v(a instanceof Error?a.message:String(a))}))},children:S}),(0,b.jsx)("button",{type:"button",className:(0,h.get_button_class_name)("ghost"),onClick:K,children:"Skip phase"}),(0,b.jsx)("button",{type:"button",className:(0,h.get_button_class_name)("ghost"),onClick:()=>{D(l.POMODORO_DEFAULT_STATE),r(Date.now())},children:"Reset"}),(0,b.jsx)("button",{type:"button",className:(0,h.get_button_class_name)("ghost"),disabled:"running"===o.status,onClick:()=>{J()},children:"Start from active task start time"})]}),null!==u?(0,b.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:u}):null,m.check_in_on_work_start&&!w?(0,b.jsx)("div",{className:"grid gap-2 rounded-md border border-panel-border bg-background p-3 md:grid-cols-2",children:(0,b.jsxs)("label",{className:"flex flex-col gap-1.5 md:col-span-2",children:[(0,b.jsx)("span",{className:"text-[0.8rem] font-semibold text-muted",children:"New entry description (supports @tags)"}),(0,b.jsx)(f.TagAutocompleteInput,{id:"pomodoro-work-entry-description",value:m.work_entry_description,known_tags:a,placeholder:"Pomodoro focus @pomodoro @focus",on_change:a=>{n(b=>({...b,work_entry_description:a}))}})]})}):null]})})]})]})}],54015)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_00aklen._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[69749,a=>{"use strict";a.s(["get_input_class_name",0,function(a="default"){let b="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"===a?`${b} px-2.5 py-2`:b}])},85393,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/settings",label:"General",match:a=>"/settings"===a},{href:"/settings/display",label:"Display & layout",match:a=>a.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:a=>a.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:a=>a.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:a=>a.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:a=>a.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:a=>a.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:a=>a.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:a=>a.startsWith("/settings/tags")}];a.s(["SettingsNav",0,function(){let a=(0,d.usePathname)()??"/settings";return(0,b.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,b.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:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"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 ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},85930,a=>{"use strict";var b=a.i(39752),c=a.i(85393),d=a.i(98790);a.s(["SettingsPageLayout",0,function({breadcrumb:a,title:e,description:f,children:g}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.TrackerTopbar,{breadcrumb:a}),(0,b.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,b.jsxs)("aside",{className:"flex flex-col gap-2",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Settings"}),(0,b.jsx)(c.SettingsNav,{})]}),(0,b.jsxs)("section",{className:"flex min-w-0 flex-col gap-4",children:[(0,b.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,b.jsx)("h1",{className:"m-0 text-[1.35rem] font-[650] tracking-tight",children:e}),void 0!==f?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:f}):null]}),g]})]})]})}])},64723,a=>{"use strict";var b=a.i(39752),c=a.i(34542);let d="inline-flex shrink-0 cursor-pointer items-center gap-1.5";a.s(["Checkbox",0,function({checked:a,disabled:e=!1,indeterminate:f=!1,nested:g=!1,on_change:h,label:i,aria_label:j,className:k}){let l=(0,c.useRef)(null);(0,c.useEffect)(()=>{null!==l.current&&(l.current.indeterminate=f)},[f]);let m=void 0===k?d:`${d} ${k}`,n=(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("input",{ref:l,type:"checkbox",className:"peer absolute m-0 h-px w-px overflow-hidden opacity-0",checked:a,disabled:e,"aria-label":g&&void 0===i?j:void 0,onChange:h}),(0,b.jsx)("span",{className:'relative block h-[0.85rem] w-[0.85rem] shrink-0 rounded-[0.2rem] border border-panel-border bg-input-bg box-border transition-[background-color,border-color] duration-150 peer-checked:border-accent peer-checked:bg-accent peer-indeterminate:border-accent peer-indeterminate:bg-accent peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-input-focus-border peer-focus-visible:outline-offset-1 peer-disabled:cursor-not-allowed peer-disabled:opacity-55 after:absolute after:left-1/2 after:top-[44%] after:hidden after:h-[0.28rem] after:w-[0.45rem] after:-translate-x-1/2 after:-translate-y-[60%] after:rotate-[-45deg] after:border-b-[1.5px] after:border-l-[1.5px] after:border-accent-text-on after:content-[""] peer-checked:after:block peer-indeterminate:after:top-1/2 peer-indeterminate:after:block peer-indeterminate:after:h-[1.5px] peer-indeterminate:after:w-[0.45rem] peer-indeterminate:after:-translate-x-1/2 peer-indeterminate:after:-translate-y-1/2 peer-indeterminate:after:rotate-0 peer-indeterminate:after:border-0 peer-indeterminate:after:bg-accent-text-on',"aria-hidden":"true"})]});return g?(0,b.jsx)("span",{className:m,children:n}):(0,b.jsxs)("label",{className:m,children:[n,void 0!==i?(0,b.jsx)("span",{className:"select-none text-[0.8rem] leading-tight text-muted",children:i}):null]})}])},6e3,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(64723),e=a.i(85930),f=a.i(69749),g=a.i(7048),h=a.i(44404),i=a.i(11937),j=a.i(26749),k=a.i(54212),l=a.i(75049);let m={help:"Show keyboard shortcuts","check-in":"Check in","check-out":"Check out","edit-entry":"Edit active entry","add-note":"Add note",pomodoro:"Open Pomodoro","previous-sheet":"Previous sheet","next-sheet":"Next sheet"},n={today:"Today",sheets:"Sheets",reporting:"Reporting",pomodoro:"Pomodoro","manage-tags":"Tag management","sync-settings":"Sync settings"};a.s(["QuickActionsSettingsView",0,function(){let[a,o]=(0,c.useState)(!1),p=(0,c.useSyncExternalStore)(k.tracker_shortcut_map_preference.subscribe,k.tracker_shortcut_map_preference.get_snapshot,k.tracker_shortcut_map_preference.get_server_snapshot),q=(0,c.useSyncExternalStore)(j.topbar_quick_actions_preference.subscribe,j.topbar_quick_actions_preference.get_snapshot,j.topbar_quick_actions_preference.get_server_snapshot),r=(0,c.useMemo)(()=>(0,i.parse_tracker_shortcut_map)(p),[p]),s=(0,c.useMemo)(()=>(0,h.parse_topbar_quick_actions)(q),[q]),[t,u]=(0,c.useState)(r);(0,c.useEffect)(()=>{o(!0)},[]),(0,c.useEffect)(()=>{u(r)},[r]);let v=(0,c.useMemo)(()=>{let a=new Map;for(let b of l.tracker_shortcut_action_ids){let c=r[b];a.set(c,(a.get(c)??0)+1)}return new Set(Array.from(a.entries()).filter(([,a])=>a>1).map(([a])=>a))},[r]);return a?(0,b.jsx)(e.SettingsPageLayout,{breadcrumb:{current:"Quick actions",parent:{label:"Settings",href:"/settings"}},title:"Quick actions config",description:"Customize keyboard shortcuts and topbar shortcuts.",children:(0,b.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,b.jsxs)("section",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Keyboard shortcuts"}),(0,b.jsx)("p",{className:"m-0 mt-1 text-[0.8rem] leading-snug text-muted",children:"Choose one key per action. If a key is reused, only the first matching action will trigger."}),(0,b.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-2 md:grid-cols-2",children:l.tracker_shortcut_action_ids.map(a=>{let c=r[a],d=t[a]??c,e=v.has(c),h=d!==c;return(0,b.jsxs)("div",{className:"grid min-h-20 content-center grid-cols-[minmax(0,1fr)_3.5rem] items-center gap-2 rounded-md border border-panel-border px-2.5 py-2",children:[(0,b.jsx)("span",{className:"text-[0.86rem]",children:m[a]}),(0,b.jsx)("input",{type:"text",className:`${(0,f.get_input_class_name)("compact")} h-8 w-14 justify-self-end px-2 text-center`,value:"?"===d?"?":d.toUpperCase(),readOnly:!0,onKeyDown:b=>((a,b)=>{if("Enter"===b.key){let c;b.preventDefault();let d=t[a];1===d.length&&(c={...r,[a]:d},k.tracker_shortcut_map_preference.write(JSON.stringify(c)),k.tracker_shortcut_map_preference.notify(),(0,g.notify_settings_saved)("Quick actions updated"));return}if("Escape"===b.key){b.preventDefault(),u(b=>({...b,[a]:r[a]}));return}if(1!==b.key.length)return;let c=b.key.toLowerCase();/^[a-z\[\]\?]$/.test(c)&&(b.preventDefault(),u(b=>({...b,[a]:c})))})(a,b),onFocus:a=>a.currentTarget.select(),"aria-label":`${m[a]} shortcut`}),(0,b.jsx)("span",{className:`col-span-2 text-[0.72rem] ${e?"text-danger":h?"text-muted":"text-transparent"}`,children:e?"Duplicate":h?"Press Enter to save":"Ready"})]},a)})})]}),(0,b.jsxs)("section",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Topbar shortcuts"}),(0,b.jsx)("p",{className:"m-0 mt-1 text-[0.8rem] leading-snug text-muted",children:"Show quick links in the topbar on larger screens."}),(0,b.jsx)("div",{className:"mt-3 flex flex-wrap gap-3",children:l.topbar_quick_action_ids.map(a=>(0,b.jsx)(d.Checkbox,{checked:s.includes(a),on_change:()=>{let b;return b=s.includes(a)?s.filter(b=>b!==a):[...s,a],void(j.topbar_quick_actions_preference.write(JSON.stringify(b)),j.topbar_quick_actions_preference.notify(),(0,g.notify_settings_saved)("Topbar shortcuts updated"))},label:n[a]},a))})]})]})}):(0,b.jsx)(e.SettingsPageLayout,{breadcrumb:{current:"Quick actions",parent:{label:"Settings",href:"/settings"}},title:"Quick actions config",description:"Customize keyboard shortcuts and topbar shortcuts.",children:(0,b.jsx)("p",{className:"m-0 text-[0.85rem] text-muted",children:"Loading quick action settings…"})})}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_00ic3j9._.js.map
|