super-time-tracker-ui 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/standalone/next-output/BUILD_ID +1 -1
- package/dist/standalone/next-output/app-path-routes-manifest.json +11 -1
- package/dist/standalone/next-output/build-manifest.json +8 -8
- package/dist/standalone/next-output/prerender-manifest.json +0 -145
- package/dist/standalone/next-output/routes-manifest.json +60 -0
- package/dist/standalone/next-output/server/app/_global-error/page/build-manifest.json +5 -5
- package/dist/standalone/next-output/server/app/_global-error/page.js +1 -1
- package/dist/standalone/next-output/server/app/_global-error/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/_global-error.html +1 -1
- package/dist/standalone/next-output/server/app/_global-error.rsc +8 -8
- package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +8 -8
- package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +4 -4
- package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page/build-manifest.json +5 -5
- package/dist/standalone/next-output/server/app/_not-found/page.js +4 -3
- 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/backup/route.js +1 -2
- package/dist/standalone/next-output/server/app/api/backup/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/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/sheet/active/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/sheet/active/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/sheet/active/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/sheet/active/route.js +7 -0
- package/dist/standalone/next-output/server/app/api/sheet/active/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/sheet/active/route_client-reference-manifest.js +3 -0
- 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/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js +7 -0
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/sync/pull/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/sync/pull/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/sync/pull/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/sync/pull/route.js +7 -0
- package/dist/standalone/next-output/server/app/api/sync/pull/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/sync/pull/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/sync/push/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/sync/push/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/sync/push/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/sync/push/route.js +7 -0
- package/dist/standalone/next-output/server/app/api/sync/push/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/sync/push/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/sync/status/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/sync/status/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/sync/status/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/sync/status/route.js +7 -0
- package/dist/standalone/next-output/server/app/api/sync/status/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/sync/status/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/tags/route.js +1 -2
- package/dist/standalone/next-output/server/app/api/tags/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/ui-preferences/merge-on-load/route/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/api/ui-preferences/merge-on-load/route/build-manifest.json +9 -0
- package/dist/standalone/next-output/server/app/api/ui-preferences/merge-on-load/route/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/api/ui-preferences/merge-on-load/route.js +7 -0
- package/dist/standalone/next-output/server/app/api/ui-preferences/merge-on-load/route.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/api/ui-preferences/merge-on-load/route_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/api/ui-preferences/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/ui-preferences/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/auth/callback/route.js +1 -1
- package/dist/standalone/next-output/server/app/auth/callback/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/login/page/build-manifest.json +5 -5
- package/dist/standalone/next-output/server/app/login/page.js +4 -3
- 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/page/build-manifest.json +5 -5
- package/dist/standalone/next-output/server/app/page.js +5 -4
- 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/register/page/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/register/page/build-manifest.json +17 -0
- package/dist/standalone/next-output/server/app/register/page/next-font-manifest.json +11 -0
- package/dist/standalone/next-output/server/app/register/page/react-loadable-manifest.json +1 -0
- package/dist/standalone/next-output/server/app/register/page/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/register/page.js +15 -0
- package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/reporting/page/build-manifest.json +5 -5
- package/dist/standalone/next-output/server/app/reporting/page.js +5 -5
- 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/settings/cloud-sync/page/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page/build-manifest.json +17 -0
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page/next-font-manifest.json +11 -0
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page/react-loadable-manifest.json +1 -0
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js +15 -0
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/settings/data/page/build-manifest.json +5 -5
- package/dist/standalone/next-output/server/app/settings/data/page.js +5 -4
- package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page/build-manifest.json +5 -5
- package/dist/standalone/next-output/server/app/settings/display/page.js +4 -3
- 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/page/build-manifest.json +5 -5
- package/dist/standalone/next-output/server/app/settings/page.js +5 -5
- 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/tags/page/build-manifest.json +5 -5
- package/dist/standalone/next-output/server/app/settings/tags/page.js +5 -5
- 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/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/sheets/page/build-manifest.json +17 -0
- package/dist/standalone/next-output/server/app/sheets/page/next-font-manifest.json +11 -0
- package/dist/standalone/next-output/server/app/sheets/page/react-loadable-manifest.json +1 -0
- package/dist/standalone/next-output/server/app/sheets/page/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/sheets/page.js +15 -0
- package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/today/page/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/today/page/build-manifest.json +17 -0
- package/dist/standalone/next-output/server/app/today/page/next-font-manifest.json +11 -0
- package/dist/standalone/next-output/server/app/today/page/react-loadable-manifest.json +1 -0
- package/dist/standalone/next-output/server/app/today/page/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/today/page.js +15 -0
- package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app-paths-manifest.json +11 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0-~y~9m._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0.tfxy.._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__02~w0lb._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__045he4k._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06efo~9._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__09bkv_j._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0bflmy0._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0cbimu4._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0e3._t7._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0goaz9z._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0i1baam._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0mnx_nu._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0szq3qr._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0uvo97t._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wzuxc6._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0xb8jjk._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__118xfg0._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__11e-p11._.js +1 -1
- package/dist/standalone/next-output/server/chunks/_0--hi7m._.js +6 -6
- package/dist/standalone/next-output/server/chunks/_0_wbuqv._.js +6 -6
- package/dist/standalone/next-output/server/chunks/{_0vzosja._.js → _0rz1whw._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/_13eeory._.js +5 -5
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_sheet_active_route_actions_0vwkhw..js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_sync_merge-on-load_route_actions_0yu2xg-.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_sync_pull_route_actions_0zi~i0m.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_sync_push_route_actions_0sag.tp.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_sync_status_route_actions_0zvttty.js +3 -0
- package/dist/standalone/next-output/server/chunks/_next-internal_server_app_api_ui-preferences_merge-on-load_route_actions_06ep~.j.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/0elt_date-fns_format_0j.rx2u.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_0pyvy-l._.js +6 -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_0u6ij0z._.js → 0z~i_next_dist_0kux32m._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0-2k5eh.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0-6~y~c.js +4 -0
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0194h-6.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_03p53oc.js +4 -0
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_040c8th.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_04kdnd9.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_08fopnn.js +4 -0
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0eyb0.j.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0gpy3lz.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0pw4c6_.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0r_137h.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0wy5eu6.js +4 -0
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_12a781y.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__04et1.j._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__04rw9_a._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0f.je14._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0ljly6c._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0p74awc._.js → [root-of-the-server]__0n8s9zq._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0q7e6b0._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0rf.8qg._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0s84deg._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0sh_dni._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0tynjfp._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0ue-tr6._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0wmfvtj._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__12q4x7c._.js → [root-of-the-server]__0ygx8l9._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0zxgb-a._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0~rrg79._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__11qrqnz._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0-ov5_n._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_00x~ete._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{0z~i_next_dist_0s-rnzm._.js → _073x~fa._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/_0_aptb7._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0axgv9-._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0bs7t.7._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0bu5pcm._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0cxipsf._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0dj7qxj._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_0ekhh25._.js → _0k06nbl._.js} +9 -9
- package/dist/standalone/next-output/server/chunks/ssr/_0ld3xfd._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0ls83bx._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0p4r3~t._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0s1f~0y._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0su4mzm._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0thins~._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0v9l~2y._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0ycs85o._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0zk9gtm._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_113zjr0._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_03kx6a3._.js → _11amno3._.js} +8 -8
- package/dist/standalone/next-output/server/chunks/ssr/_11d2qve._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_register_page_actions_0zq7ka0.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_settings_cloud-sync_page_actions_0ld6e8p.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_sheets_page_actions_0cqf0.l.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_today_page_actions_0of2-iy.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_109-aj4._.js +1 -1
- 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_tracker-app_tsx_0qs9.7y._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/lib_0c0z4q-._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{0z~i_next_dist_client_components_0247lue._.js → node_modules__pnpm_0u1tjhh._.js} +2 -2
- package/dist/standalone/next-output/server/edge/chunks/[root-of-the-server]__0t9u~vh._.js +7 -7
- package/dist/standalone/next-output/server/middleware-build-manifest.js +8 -8
- 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 +16 -0
- package/dist/standalone/next-output/server/pages/500.html +1 -1
- package/dist/standalone/next-output/server/pages-manifest.json +0 -1
- package/dist/standalone/next-output/static/chunks/02h6za.al3c7p.js +1 -0
- package/dist/standalone/next-output/static/chunks/04_2jzw-uhhu0.js +2 -0
- package/dist/standalone/next-output/static/chunks/04niua5h~-1f..js +1 -0
- package/dist/standalone/next-output/static/chunks/06u43x9tl391w.js +1 -0
- package/dist/standalone/next-output/static/chunks/0a5y_udluz6e6.js +1 -0
- package/dist/standalone/next-output/static/chunks/0b0a23hps.ate.js +4 -0
- package/dist/standalone/next-output/static/chunks/0bly.8gr9nkdz.js +1 -0
- package/dist/standalone/next-output/static/chunks/0i8_d5-g6pduc.css +3 -0
- package/dist/standalone/next-output/static/chunks/{0koldw9zjijry.js → 0jcqig-f5dwq7.js} +2 -2
- package/dist/standalone/next-output/static/chunks/0ker2ur7q6j6n.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0n~v8~rri7~t2.js → 0lgo02csmvyps.js} +1 -1
- package/dist/standalone/next-output/static/chunks/0l~uil8w-ewlm.js +1 -0
- package/dist/standalone/next-output/static/chunks/0uik_f_e6e0e6.js +1 -0
- package/dist/standalone/next-output/static/chunks/0uxm1dlh.6xck.js +1 -0
- package/dist/standalone/next-output/static/chunks/0vm3.l6rc2kie.js +1 -0
- package/dist/standalone/next-output/static/chunks/0xo5n.1q2uz95.js +1 -0
- package/dist/standalone/next-output/static/chunks/0yi4m~~80yeqj.js +1 -0
- package/dist/standalone/next-output/static/chunks/0z9uuysy9qb.4.js +1 -0
- package/dist/standalone/next-output/static/chunks/10_mtmf57jsww.js +1 -0
- package/dist/standalone/next-output/static/chunks/10c83.nq801k1.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0.jsu2wyaii~1.js → 12rxdn65.z_85.js} +12 -12
- package/dist/standalone/next-output/static/chunks/15xhm5fbzvyag.js +1 -0
- package/dist/standalone/next-output/static/chunks/18adan1jcwejd.js +1 -0
- package/dist/standalone/next-output/static/chunks/{turbopack-0st0r~j~gn7ke.js → turbopack-00m4i0dy4on-a.js} +1 -1
- package/dist/standalone/package.json +1 -1
- package/package.json +1 -1
- package/dist/standalone/next-output/server/app/_not-found.html +0 -1
- package/dist/standalone/next-output/server/app/_not-found.meta +0 -16
- package/dist/standalone/next-output/server/app/_not-found.rsc +0 -25
- package/dist/standalone/next-output/server/app/_not-found.segments/_full.segment.rsc +0 -25
- package/dist/standalone/next-output/server/app/_not-found.segments/_head.segment.rsc +0 -6
- package/dist/standalone/next-output/server/app/_not-found.segments/_index.segment.rsc +0 -10
- package/dist/standalone/next-output/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +0 -5
- package/dist/standalone/next-output/server/app/_not-found.segments/_not-found.segment.rsc +0 -5
- package/dist/standalone/next-output/server/app/_not-found.segments/_tree.segment.rsc +0 -2
- package/dist/standalone/next-output/server/app/reporting.html +0 -1
- package/dist/standalone/next-output/server/app/reporting.meta +0 -15
- package/dist/standalone/next-output/server/app/reporting.rsc +0 -29
- package/dist/standalone/next-output/server/app/reporting.segments/_full.segment.rsc +0 -29
- package/dist/standalone/next-output/server/app/reporting.segments/_head.segment.rsc +0 -6
- package/dist/standalone/next-output/server/app/reporting.segments/_index.segment.rsc +0 -10
- package/dist/standalone/next-output/server/app/reporting.segments/_tree.segment.rsc +0 -4
- package/dist/standalone/next-output/server/app/reporting.segments/reporting/__PAGE__.segment.rsc +0 -6
- package/dist/standalone/next-output/server/app/reporting.segments/reporting.segment.rsc +0 -5
- package/dist/standalone/next-output/server/app/settings/data.html +0 -1
- package/dist/standalone/next-output/server/app/settings/data.meta +0 -16
- package/dist/standalone/next-output/server/app/settings/data.rsc +0 -35
- package/dist/standalone/next-output/server/app/settings/data.segments/_full.segment.rsc +0 -35
- package/dist/standalone/next-output/server/app/settings/data.segments/_head.segment.rsc +0 -6
- package/dist/standalone/next-output/server/app/settings/data.segments/_index.segment.rsc +0 -10
- package/dist/standalone/next-output/server/app/settings/data.segments/_tree.segment.rsc +0 -4
- package/dist/standalone/next-output/server/app/settings/data.segments/settings/data/__PAGE__.segment.rsc +0 -11
- package/dist/standalone/next-output/server/app/settings/data.segments/settings/data.segment.rsc +0 -5
- package/dist/standalone/next-output/server/app/settings/data.segments/settings.segment.rsc +0 -5
- package/dist/standalone/next-output/server/app/settings/display.html +0 -1
- package/dist/standalone/next-output/server/app/settings/display.meta +0 -16
- package/dist/standalone/next-output/server/app/settings/display.rsc +0 -44
- package/dist/standalone/next-output/server/app/settings/display.segments/_full.segment.rsc +0 -44
- package/dist/standalone/next-output/server/app/settings/display.segments/_head.segment.rsc +0 -6
- package/dist/standalone/next-output/server/app/settings/display.segments/_index.segment.rsc +0 -10
- package/dist/standalone/next-output/server/app/settings/display.segments/_tree.segment.rsc +0 -4
- package/dist/standalone/next-output/server/app/settings/display.segments/settings/display/__PAGE__.segment.rsc +0 -21
- package/dist/standalone/next-output/server/app/settings/display.segments/settings/display.segment.rsc +0 -5
- package/dist/standalone/next-output/server/app/settings/display.segments/settings.segment.rsc +0 -5
- package/dist/standalone/next-output/server/app/settings/tags.html +0 -1
- package/dist/standalone/next-output/server/app/settings/tags.meta +0 -16
- package/dist/standalone/next-output/server/app/settings/tags.rsc +0 -30
- package/dist/standalone/next-output/server/app/settings/tags.segments/_full.segment.rsc +0 -30
- package/dist/standalone/next-output/server/app/settings/tags.segments/_head.segment.rsc +0 -6
- package/dist/standalone/next-output/server/app/settings/tags.segments/_index.segment.rsc +0 -10
- package/dist/standalone/next-output/server/app/settings/tags.segments/_tree.segment.rsc +0 -4
- package/dist/standalone/next-output/server/app/settings/tags.segments/settings/tags/__PAGE__.segment.rsc +0 -6
- package/dist/standalone/next-output/server/app/settings/tags.segments/settings/tags.segment.rsc +0 -5
- package/dist/standalone/next-output/server/app/settings/tags.segments/settings.segment.rsc +0 -5
- package/dist/standalone/next-output/server/app/settings.html +0 -1
- package/dist/standalone/next-output/server/app/settings.meta +0 -15
- package/dist/standalone/next-output/server/app/settings.rsc +0 -35
- package/dist/standalone/next-output/server/app/settings.segments/_full.segment.rsc +0 -35
- package/dist/standalone/next-output/server/app/settings.segments/_head.segment.rsc +0 -6
- package/dist/standalone/next-output/server/app/settings.segments/_index.segment.rsc +0 -10
- package/dist/standalone/next-output/server/app/settings.segments/_tree.segment.rsc +0 -4
- package/dist/standalone/next-output/server/app/settings.segments/settings/__PAGE__.segment.rsc +0 -12
- package/dist/standalone/next-output/server/app/settings.segments/settings.segment.rsc +0 -5
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__00yo3_1._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__05eq9_g._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__061y6pa._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0ai1p94._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0p1kxjf._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0z09g1h._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__00t2myd._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__070_uw2._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0c4ohc.._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0mjp16u._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0rtwdhy._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0ucb5c~._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0x2t88.._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__108je_d._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__10jikzl._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__13dr511._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_00.2r03._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_01xe83y._.js +0 -64
- package/dist/standalone/next-output/server/chunks/ssr/_06yb2en._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0iqbilg._.js +0 -64
- package/dist/standalone/next-output/server/chunks/ssr/_0kvm6av._.js +0 -6
- package/dist/standalone/next-output/server/chunks/ssr/_0l_p-.k._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0li90xb._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0okkb_~._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0qowa2d._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0x1bw~i._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0zabe_~._.js +0 -3
- package/dist/standalone/next-output/server/pages/404.html +0 -1
- package/dist/standalone/next-output/static/chunks/0-0w4ml~c22t..js +0 -1
- package/dist/standalone/next-output/static/chunks/01mevzl3z5cgt.js +0 -1
- package/dist/standalone/next-output/static/chunks/05161-t.3egqv.js +0 -4
- package/dist/standalone/next-output/static/chunks/0708yw9dysifo.js +0 -2
- package/dist/standalone/next-output/static/chunks/0aohgkyesjriz.js +0 -1
- package/dist/standalone/next-output/static/chunks/0bcmkbb2bxpr-.js +0 -1
- package/dist/standalone/next-output/static/chunks/0bym88q-qlydb.js +0 -1
- package/dist/standalone/next-output/static/chunks/0e8tmpq~qz.dz.js +0 -1
- package/dist/standalone/next-output/static/chunks/0g7b1~gza1y3a.js +0 -1
- package/dist/standalone/next-output/static/chunks/0h-q8kc3tbcj8.js +0 -1
- package/dist/standalone/next-output/static/chunks/0js9~7rlpndqf.js +0 -1
- package/dist/standalone/next-output/static/chunks/0uezeykgodd86.js +0 -1
- package/dist/standalone/next-output/static/chunks/0xvqo8vfg40zk.js +0 -1
- package/dist/standalone/next-output/static/chunks/11y-z.w7p8i8a.css +0 -3
- package/dist/standalone/next-output/static/chunks/12v1sx2j-is-9.js +0 -1
- package/dist/standalone/next-output/static/chunks/13pryy_qphr.u.js +0 -1
- /package/dist/standalone/next-output/static/{xfRBlnU13styXnCBd60jn → b-GDdUy-cIcWNA_TGvVQz}/_buildManifest.js +0 -0
- /package/dist/standalone/next-output/static/{xfRBlnU13styXnCBd60jn → b-GDdUy-cIcWNA_TGvVQz}/_clientMiddlewareManifest.js +0 -0
- /package/dist/standalone/next-output/static/{xfRBlnU13styXnCBd60jn → b-GDdUy-cIcWNA_TGvVQz}/_ssgManifest.js +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[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"))},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"))},68194,e=>{"use strict";var t=e.i(82214);e.s(["api_error_response",0,function(e,r=400){let a=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:a},{status:r})}])},29207,e=>{"use strict";var t=e.i(5313),r=e.i(36117);async function a(){if(!(0,t.is_supabase_configured)())return null;let e=await (0,r.create_server_supabase_client)(),{data:{user:a}}=await e.auth.getUser();return a?.id??null}e.s(["get_authenticated_user_id",0,a])},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 a="db.json",n=r.default.join(t.default.homedir(),".super-time-tracker"),i=r.default.join(n,a);e.s(["DB_FILE_NAME",0,a,"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:a}=e;return{version:r,activeSheetName:a,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:a,tags:n,notes:i})=>({id:e,description:a,tags:n,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=[],a=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==a&&void 0===t.find(({id:e})=>e===a))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:a}}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:a}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:a,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:a})=>({tags:[],notes:[],id:e,end:r,start:t,description:a}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:a}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:a,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:a,tags:n})=>({notes:[],tags:n,id:e,end:r,start:t,description:a}))}))}}};e.s(["migrate_json_db",0,function(e){let a=e,n=!1,i=void 0===a.version?1:a.version;if(i>t.DB_VERSION||i<1)throw Error(`Unknown DB version ${a.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((a=t(a)).version!==e)throw Error(`Invalid migration output for version ${e}.`);i=e,n=!0}return{json_db:a,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,95822,99054,e=>{"use strict";var t=e.i(50227),r=e.i(2157),a=e.i(72507),n=e.i(72127),i=e.i(30853),s=e.i(93361),o=e.i(24507),l=e.i(16366);async function d(e,t=a.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 u(e=a.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 d(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 _=(0,n.convert_json_db)(l);return h.did_migrate&&await d(_,e),_}e.s(["write_local_db",0,d],32806),e.s(["read_local_db",0,u],71786);var c=e.i(36117);async function p(e){let t=await (0,c.create_server_supabase_client)(),{data:r,error:n}=await t.from("tracker_accounts").select("active_sheet_name, db_version").eq("user_id",e).maybeSingle();if(null!==n)throw Error(`Failed to load tracker account: ${n.message}`);if(null===r)return(0,s.gen_db)();let{data:i,error:o}=await t.from("sheets").select("id, name, active_entry_id").eq("user_id",e).order("name",{ascending:!0});if(null!==o)throw Error(`Failed to load sheets: ${o.message}`);let l=i??[];if(0===l.length)return{version:r.db_version??a.DB_VERSION,activeSheetName:r.active_sheet_name,sheets:[]};let d=l.map(e=>e.id),{data:u,error:p}=await t.from("entries").select("sheet_id, id, start_at, end_at, description, tags").in("sheet_id",d).order("id",{ascending:!0});if(null!==p)throw Error(`Failed to load entries: ${p.message}`);let{data:h,error:_}=await t.from("entry_notes").select("sheet_id, entry_id, note_index, noted_at, text").in("sheet_id",d).order("note_index",{ascending:!0});if(null!==_)throw Error(`Failed to load entry notes: ${_.message}`);let m=new Map;for(let e of h??[]){let t=`${e.sheet_id}:${e.entry_id}`,r=m.get(t)??[];r.push({text:e.text,timestamp:new Date(e.noted_at)}),m.set(t,r)}let f=new Map;for(let e of u??[]){let t=`${e.sheet_id}:${e.id}`,r=f.get(e.sheet_id)??[];r.push({id:e.id,description:e.description,tags:e.tags??[],start:new Date(e.start_at),end:null===e.end_at?null:new Date(e.end_at),notes:m.get(t)??[]}),f.set(e.sheet_id,r)}let g=l.map(e=>(0,s.gen_sheet)(e.name,f.get(e.id)??[],e.active_entry_id));return{version:r.db_version??a.DB_VERSION,activeSheetName:r.active_sheet_name,sheets:g}}async function h(e,t){let r=await (0,c.create_server_supabase_client)(),{error:a}=await r.from("tracker_accounts").upsert({user_id:t,active_sheet_name:e.activeSheetName,db_version:e.version,updated_at:new Date().toISOString()});if(null!==a)throw Error(`Failed to save tracker account: ${a.message}`);let{data:n,error:i}=await r.from("sheets").select("id").eq("user_id",t);if(null!==i)throw Error(`Failed to list sheets: ${i.message}`);let s=(n??[]).map(e=>e.id);if(s.length>0){let{error:e}=await r.from("sheets").delete().in("id",s);if(null!==e)throw Error(`Failed to clear sheets: ${e.message}`)}for(let a of e.sheets){let e={user_id:t,name:a.name,active_entry_id:a.activeEntryID},{data:n,error:i}=await r.from("sheets").insert(e).select("id").single();if(null!==i)throw Error(`Failed to save sheet "${a.name}": ${i.message}`);let s=n.id;if(0===a.entries.length)continue;let o=a.entries.map(e=>({sheet_id:s,id:e.id,start_at:e.start.toISOString(),end_at:null===e.end?null:e.end.toISOString(),description:e.description,tags:e.tags})),{error:l}=await r.from("entries").insert(o);if(null!==l)throw Error(`Failed to save entries for "${a.name}": ${l.message}`);let d=[];for(let e of a.entries)e.notes.forEach((t,r)=>{d.push({sheet_id:s,entry_id:e.id,note_index:r,noted_at:t.timestamp.toISOString(),text:t.text})});if(0===d.length)continue;let{error:u}=await r.from("entry_notes").insert(d);if(null!==u)throw Error(`Failed to save notes for "${a.name}": ${u.message}`)}}e.s(["read_supabase_db",0,p],95822),e.s(["write_supabase_db",0,h],99054)},27440,18212,e=>{"use strict";var t=e.i(29207),r=e.i(5313),a=e.i(71786),n=e.i(95822);async function i(e){if((0,r.is_supabase_configured)()){let e=await (0,t.get_authenticated_user_id)();if(null!==e)return(0,n.read_supabase_db)(e)}return(0,a.read_local_db)(e)}e.s(["read_db",0,i],27440);var s=e.i(32806),o=e.i(99054);async function l(e,a){if((0,r.is_supabase_configured)()){let r=await (0,t.get_authenticated_user_id)();if(null!==r)return void await (0,o.write_supabase_db)(e,r)}await (0,s.write_local_db)(e,a)}e.s(["write_db",0,l],18212)},14986,e=>{"use strict";var t=e.i(973),r=e.i(39210),a=e.i(13132),n=e.i(14579),i=e.i(47092),s=e.i(34740),o=e.i(77667),l=e.i(11979),d=e.i(54202),u=e.i(39093),c=e.i(95106),p=e.i(57255),h=e.i(96492),_=e.i(27930),m=e.i(24131),f=e.i(93695);e.i(20216);var g=e.i(84975),v=e.i(82214),w=e.i(68194);function E(e){let t=e.trim().replace(/^@+/,"");if(0===t.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(t))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${t}`}function x(e){let t=new Map;for(let r of e.sheets)for(let e of r.entries)for(let r of e.tags)try{let e=E(r);t.set(e,(t.get(e)??0)+1)}catch{continue}return[...t.entries()].map(([e,t])=>({name:e,entryCount:t})).sort((e,t)=>e.name.localeCompare(t.name))}var y=e.i(27440);function b(e,t){try{return E(e)===E(t)}catch{return!1}}var R=e.i(18212);async function S(e,t){let r=E(t),a=[...new Set(e.map(e=>E(e)).filter(e=>!b(e,r)))];if(0===a.length)throw Error("Choose at least one source tag different from the target.");let n=await (0,y.read_db)(),i=0;for(let e of n.sheets)for(let t of e.entries){let e=!1,n=[],s=new Set;for(let i of t.tags){let t;try{t=E(i)}catch{t=i}a.some(e=>b(e,t))&&(t=r,e=!0),s.has(t)||(s.add(t),n.push(t))}e&&(t.tags=n,i+=1)}return i>0&&await (0,R.write_db)(n),{entries_updated:i,tags:x(n)}}async function N(e,t){if(b(e,t))throw Error("Choose a different name for the tag.");return S([e],t)}async function D(){try{let e=await (0,y.read_db)();return v.NextResponse.json({tags:x(e)})}catch(e){return(0,w.api_error_response)(e,500)}}async function T(e){try{let t=await e.json();if("rename"===t.action){let e=t.fromTag?.trim()??"",r=t.toTag?.trim()??"";if(0===e.length||0===r.length)return(0,w.api_error_response)(Error("Both tag names are required."));let a=await N(e,r);return v.NextResponse.json(a)}if("merge"===t.action){let e=t.sourceTags??[],r=t.targetTag?.trim()??"";if(0===e.length||0===r.length)return(0,w.api_error_response)(Error("Source tags and a target tag are required."));let a=await S(e,r);return v.NextResponse.json(a)}return(0,w.api_error_response)(Error("Unknown tag action."))}catch(e){return(0,w.api_error_response)(e,400)}}e.s(["GET",0,D,"PATCH",0,T],4945);var A=e.i(4945);let C=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/tags/route",pathname:"/api/tags",filename:"route",bundlePath:""},distDir:"next-output",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/tags/route.ts",nextConfigOutput:"standalone",userland:A,...{}}),{workAsyncStorage:I,workUnitAsyncStorage:$,serverHooks:O}=C;async function j(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),C.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let v="/api/tags/route";v=v.replace(/\/index$/,"")||"/";let w=await C.prepare(e,t,{srcPage:v,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,deploymentId:x,params:y,nextConfig:b,parsedUrl:R,isDraftMode:S,prerenderManifest:N,routerServerContext:D,isOnDemandRevalidate:T,revalidateOnlyGenerated:A,resolvedPathname:I,clientReferenceManifest:$,serverActionsManifest:O}=w,j=(0,o.normalizeAppPath)(v),q=!!(N.dynamicRoutes[j]||N.routes[I]),k=async()=>((null==D?void 0:D.render404)?await D.render404(e,t,R,!1):t.end("This page could not be found"),null);if(q&&!S){let e=!!N.routes[I],t=N.dynamicRoutes[j];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await k();throw new f.NoFallbackError}}let P=null;!q||C.isDev||S||(P="/index"===(P=I)?"/":P);let F=!0===C.isDev||!q,H=q&&!F;O&&$&&(0,s.setManifestsSingleton)({page:v,clientReferenceManifest:$,serverActionsManifest:O});let M=e.method||"GET",B=(0,i.getTracer)(),U=B.getActiveScopeSpan(),L=!!(null==D?void 0:D.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await C.getIncrementalCache(e,b,N,V);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let G={params:y,previewProps:N.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:F,incrementalCache:K,cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>C.onRequestError(e,t,a,n,D)},sharedContext:{buildId:E,deploymentId:x}},X=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(X,(0,d.signalFromNodeResponse)(t));try{let n,s=async e=>C.handle(W,G).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")!==u.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 a=r.get("next.route");if(a){let t=`${M} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${M} ${v}`)}),o=async n=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!V&&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(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!q)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,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await C.onRequestError(e,t,{routerKind:"App Router",routePath:v,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:T})},!1,D),t}},d=await C.handleResponse({req:e,nextConfig:b,cacheKey:P,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:A,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:V});if(!q)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",T?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),S&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return V&&q||u.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,_.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(X,J,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};L&&U?await o(U):(n=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(u.BaseServerSpan.handleRequest,{spanName:`${M} ${v}`,kind:i.SpanKind.SERVER,attributes:{"http.method":M,"http.target":e.url}},o),void 0,!L))}catch(t){if(t instanceof f.NoFallbackError||await C.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:T})},!1,D),q)throw t;return await (0,p.sendResponse)(X,J,new Response(null,{status:500})),null}}e.s(["handler",0,j,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:I,workUnitAsyncStorage:$})},"routeModule",0,C,"serverHooks",0,O,"workAsyncStorage",0,I,"workUnitAsyncStorage",0,$],14986)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__05eq9_g._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[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"))},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"))},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])},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})}])},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"),a=r.default.join(n,i);e.s(["DB_FILE_NAME",0,i,"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: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:a})=>({id:e,description:i,tags:n,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=[],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,a=void 0===i.version?1:i.version;if(a>t.DB_VERSION||a<1)throw Error(`Unknown DB version ${i.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((i=t(i)).version!==e)throw Error(`Invalid migration output for version ${e}.`);a=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,95822,99054,e=>{"use strict";var t=e.i(50227),r=e.i(2157),i=e.i(72507),n=e.i(72127),a=e.i(30853),s=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,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 _=await r.promises.readFile(e,"utf-8");try{l=JSON.parse(_)}catch(t){throw Error(`DB at ${e} is invalid JSON: ${String(t)}`,{cause:t})}let p=(0,o.migrate_json_db)(l);l=p.json_db;let f=(0,n.convert_json_db)(l);return p.did_migrate&&await u(f,e),f}e.s(["write_local_db",0,u],32806),e.s(["read_local_db",0,d],71786);var c=e.i(36117);async function _(e){let t=await (0,c.create_server_supabase_client)(),{data:r,error:n}=await t.from("tracker_accounts").select("active_sheet_name, db_version").eq("user_id",e).maybeSingle();if(null!==n)throw Error(`Failed to load tracker account: ${n.message}`);if(null===r)return(0,s.gen_db)();let{data:a,error:o}=await t.from("sheets").select("id, name, active_entry_id").eq("user_id",e).order("name",{ascending:!0});if(null!==o)throw Error(`Failed to load sheets: ${o.message}`);let l=a??[];if(0===l.length)return{version:r.db_version??i.DB_VERSION,activeSheetName:r.active_sheet_name,sheets:[]};let u=l.map(e=>e.id),{data:d,error:_}=await t.from("entries").select("sheet_id, id, start_at, end_at, description, tags").in("sheet_id",u).order("id",{ascending:!0});if(null!==_)throw Error(`Failed to load entries: ${_.message}`);let{data:p,error:f}=await t.from("entry_notes").select("sheet_id, entry_id, note_index, noted_at, text").in("sheet_id",u).order("note_index",{ascending:!0});if(null!==f)throw Error(`Failed to load entry notes: ${f.message}`);let v=new Map;for(let e of p??[]){let t=`${e.sheet_id}:${e.entry_id}`,r=v.get(t)??[];r.push({text:e.text,timestamp:new Date(e.noted_at)}),v.set(t,r)}let m=new Map;for(let e of d??[]){let t=`${e.sheet_id}:${e.id}`,r=m.get(e.sheet_id)??[];r.push({id:e.id,description:e.description,tags:e.tags??[],start:new Date(e.start_at),end:null===e.end_at?null:new Date(e.end_at),notes:v.get(t)??[]}),m.set(e.sheet_id,r)}let h=l.map(e=>(0,s.gen_sheet)(e.name,m.get(e.id)??[],e.active_entry_id));return{version:r.db_version??i.DB_VERSION,activeSheetName:r.active_sheet_name,sheets:h}}async function p(e,t){let r=await (0,c.create_server_supabase_client)(),{error:i}=await r.from("tracker_accounts").upsert({user_id:t,active_sheet_name:e.activeSheetName,db_version:e.version,updated_at:new Date().toISOString()});if(null!==i)throw Error(`Failed to save tracker account: ${i.message}`);let{data:n,error:a}=await r.from("sheets").select("id").eq("user_id",t);if(null!==a)throw Error(`Failed to list sheets: ${a.message}`);let s=(n??[]).map(e=>e.id);if(s.length>0){let{error:e}=await r.from("sheets").delete().in("id",s);if(null!==e)throw Error(`Failed to clear sheets: ${e.message}`)}for(let i of e.sheets){let e={user_id:t,name:i.name,active_entry_id:i.activeEntryID},{data:n,error:a}=await r.from("sheets").insert(e).select("id").single();if(null!==a)throw Error(`Failed to save sheet "${i.name}": ${a.message}`);let s=n.id;if(0===i.entries.length)continue;let o=i.entries.map(e=>({sheet_id:s,id:e.id,start_at:e.start.toISOString(),end_at:null===e.end?null:e.end.toISOString(),description:e.description,tags:e.tags})),{error:l}=await r.from("entries").insert(o);if(null!==l)throw Error(`Failed to save entries for "${i.name}": ${l.message}`);let u=[];for(let e of i.entries)e.notes.forEach((t,r)=>{u.push({sheet_id:s,entry_id:e.id,note_index:r,noted_at:t.timestamp.toISOString(),text:t.text})});if(0===u.length)continue;let{error:d}=await r.from("entry_notes").insert(u);if(null!==d)throw Error(`Failed to save notes for "${i.name}": ${d.message}`)}}e.s(["read_supabase_db",0,_],95822),e.s(["write_supabase_db",0,p],99054)},27440,18212,e=>{"use strict";var t=e.i(29207),r=e.i(5313),i=e.i(71786),n=e.i(95822);async function a(e){if((0,r.is_supabase_configured)()){let e=await (0,t.get_authenticated_user_id)();if(null!==e)return(0,n.read_supabase_db)(e)}return(0,i.read_local_db)(e)}e.s(["read_db",0,a],27440);var s=e.i(32806),o=e.i(99054);async function l(e,i){if((0,r.is_supabase_configured)()){let r=await (0,t.get_authenticated_user_id)();if(null!==r)return void await (0,o.write_supabase_db)(e,r)}await (0,s.write_local_db)(e,i)}e.s(["write_db",0,l],18212)},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 a(){if(await n()){let e=process.env.NEXT_PUBLIC_SUPABASE_URL?.trim()??"Supabase";return`Cloud sync (${e})`}return 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),i=e.i(93204),n=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: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??a.DEFAULT_SHEET_NAME}(o,e);o.activeSheetName!==l&&(await u(l),o.activeSheetName=l);let{activeSheetName:d,sheets:c}=o,_=[];null!==d&&(_=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=>s(e,i,t===e.id&&null===e.end))}((0,i.get_sheet)(o,d)),"newest"));let p=null!==d?function(e,t){let r=e.sheets.find(({name:e})=>e===t);if(void 0===r)return null;let{activeEntryID:i,entries:n,name:a}=r;if(null===i)return null;let o=n.find(({id:e})=>e===i);return void 0===o?null:s(o,a,null===o.end)}(o,d):null,f=function(e){let t=[];for(let r of e.sheets){let{activeEntryID:e,entries:i,name:n}=r;if(null===e)continue;let a=i.find(({id:t})=>t===e);void 0!==a&&null===a.end&&t.push(s(a,n,!0))}return t}(o),v=p??f[0]??null;return{dbPath:await (0,r.resolve_db_path_label)(),activeSheetName:d,knownTags:(0,t.collect_known_tags)(o),sheets:c.map(e=>({name:e.name,activeEntryID:e.activeEntryID,entryCount:e.entries.length,isActive:e.name===d,hasActiveEntry:null!==e.activeEntryID})),activeEntry:p,runningEntry:v,runningEntries:f,activeSheetEntries:_,activeSheetTotalMs:_.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,a,s,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=a||(r.Multiples=a={}))[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=s||(r.Magnitudes=s={}))[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),a=e.r(70998),s=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(s.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=a.Multiples[c]}else if(s.NUMBER_WORDS.includes(c)){let t=a.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(s.MAGNITUDE_WORDS.includes(c)){let t=a.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,a,s;Object.defineProperty(r,"__esModule",{value:!0}),r.TimeUnitPlural=r.TimeUnit=void 0,(a=i||(r.TimeUnit=i={}))[a.Millisecond=1]="Millisecond",a[a.Second=1e3]="Second",a[a.Minute=6e4]="Minute",a[a.Hour=36e5]="Hour",a[a.Day=864e5]="Day",a[a.Week=6048e5]="Week",a[a.Month=2592e6]="Month",a[a.Year=31536e6]="Year",a[a.Decade=31536e7]="Decade",a[a.Century=31536e8]="Century",(s=n||(r.TimeUnitPlural=n={}))[s.Milliseconds=1]="Milliseconds",s[s.Seconds=1e3]="Seconds",s[s.Minutes=6e4]="Minutes",s[s.Hours=36e5]="Hours",s[s.Days=864e5]="Days",s[s.Weeks=6048e5]="Weeks",s[s.Months=2592e6]="Months",s[s.Years=31536e6]="Years",s[s.Decades=31536e7]="Decades",s[s.Centuries=31536e8]="Centuries"},86520,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});let i=e.r(64311),n=e.r(32341),a=i.__importStar(e.r(97881)),s=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 s.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 s.InvalidInputError(e,`quantity already specified: ${d}`);d=+c}else{let t=a.capitalize(c),r=o.TimeUnit[t]??o.TimeUnitPlural[t];if(void 0===r)throw new s.InvalidInputError(e,`invalid unit: ${c}`);i+=(d??1)*r,d=null}}}return l?a.getPastDate(i):u?a.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__061y6pa._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[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"))},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"))},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"))},72507,e=>{"use strict";var t=e.i(60526),r=e.i(50227);let a="db.json",n=r.default.join(t.default.homedir(),".super-time-tracker"),i=r.default.join(n,a);e.s(["DB_FILE_NAME",0,a,"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:a}=e;return{version:r,activeSheetName:a,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:a,tags:n,notes:i})=>({id:e,description:a,tags:n,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=[],a=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==a&&void 0===t.find(({id:e})=>e===a))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:a}}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:a}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:a,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:a})=>({tags:[],notes:[],id:e,end:r,start:t,description:a}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:a}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:a,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:a,tags:n})=>({notes:[],tags:n,id:e,end:r,start:t,description:a}))}))}}};e.s(["migrate_json_db",0,function(e){let a=e,n=!1,i=void 0===a.version?1:a.version;if(i>t.DB_VERSION||i<1)throw Error(`Unknown DB version ${a.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((a=t(a)).version!==e)throw Error(`Invalid migration output for version ${e}.`);i=e,n=!0}return{json_db:a,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,95822,99054,e=>{"use strict";var t=e.i(50227),r=e.i(2157),a=e.i(72507),n=e.i(72127),i=e.i(30853),s=e.i(93361),o=e.i(24507),l=e.i(16366);async function d(e,t=a.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 c(e=a.DB_PATH){let l,u=t.default.dirname(e);await (0,i.ensure_dir_exists)(u);try{await r.promises.access(e)}catch{let t=(0,s.gen_db)();return await d(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 _=(0,n.convert_json_db)(l);return h.did_migrate&&await d(_,e),_}e.s(["write_local_db",0,d],32806),e.s(["read_local_db",0,c],71786);var u=e.i(36117);async function p(e){let t=await (0,u.create_server_supabase_client)(),{data:r,error:n}=await t.from("tracker_accounts").select("active_sheet_name, db_version").eq("user_id",e).maybeSingle();if(null!==n)throw Error(`Failed to load tracker account: ${n.message}`);if(null===r)return(0,s.gen_db)();let{data:i,error:o}=await t.from("sheets").select("id, name, active_entry_id").eq("user_id",e).order("name",{ascending:!0});if(null!==o)throw Error(`Failed to load sheets: ${o.message}`);let l=i??[];if(0===l.length)return{version:r.db_version??a.DB_VERSION,activeSheetName:r.active_sheet_name,sheets:[]};let d=l.map(e=>e.id),{data:c,error:p}=await t.from("entries").select("sheet_id, id, start_at, end_at, description, tags").in("sheet_id",d).order("id",{ascending:!0});if(null!==p)throw Error(`Failed to load entries: ${p.message}`);let{data:h,error:_}=await t.from("entry_notes").select("sheet_id, entry_id, note_index, noted_at, text").in("sheet_id",d).order("note_index",{ascending:!0});if(null!==_)throw Error(`Failed to load entry notes: ${_.message}`);let m=new Map;for(let e of h??[]){let t=`${e.sheet_id}:${e.entry_id}`,r=m.get(t)??[];r.push({text:e.text,timestamp:new Date(e.noted_at)}),m.set(t,r)}let v=new Map;for(let e of c??[]){let t=`${e.sheet_id}:${e.id}`,r=v.get(e.sheet_id)??[];r.push({id:e.id,description:e.description,tags:e.tags??[],start:new Date(e.start_at),end:null===e.end_at?null:new Date(e.end_at),notes:m.get(t)??[]}),v.set(e.sheet_id,r)}let f=l.map(e=>(0,s.gen_sheet)(e.name,v.get(e.id)??[],e.active_entry_id));return{version:r.db_version??a.DB_VERSION,activeSheetName:r.active_sheet_name,sheets:f}}async function h(e,t){let r=await (0,u.create_server_supabase_client)(),{error:a}=await r.from("tracker_accounts").upsert({user_id:t,active_sheet_name:e.activeSheetName,db_version:e.version,updated_at:new Date().toISOString()});if(null!==a)throw Error(`Failed to save tracker account: ${a.message}`);let{data:n,error:i}=await r.from("sheets").select("id").eq("user_id",t);if(null!==i)throw Error(`Failed to list sheets: ${i.message}`);let s=(n??[]).map(e=>e.id);if(s.length>0){let{error:e}=await r.from("sheets").delete().in("id",s);if(null!==e)throw Error(`Failed to clear sheets: ${e.message}`)}for(let a of e.sheets){let e={user_id:t,name:a.name,active_entry_id:a.activeEntryID},{data:n,error:i}=await r.from("sheets").insert(e).select("id").single();if(null!==i)throw Error(`Failed to save sheet "${a.name}": ${i.message}`);let s=n.id;if(0===a.entries.length)continue;let o=a.entries.map(e=>({sheet_id:s,id:e.id,start_at:e.start.toISOString(),end_at:null===e.end?null:e.end.toISOString(),description:e.description,tags:e.tags})),{error:l}=await r.from("entries").insert(o);if(null!==l)throw Error(`Failed to save entries for "${a.name}": ${l.message}`);let d=[];for(let e of a.entries)e.notes.forEach((t,r)=>{d.push({sheet_id:s,entry_id:e.id,note_index:r,noted_at:t.timestamp.toISOString(),text:t.text})});if(0===d.length)continue;let{error:c}=await r.from("entry_notes").insert(d);if(null!==c)throw Error(`Failed to save notes for "${a.name}": ${c.message}`)}}e.s(["read_supabase_db",0,p],95822),e.s(["write_supabase_db",0,h],99054)},33496,e=>{"use strict";var t=e.i(2157),r=e.i(72507),a=e.i(71786),n=e.i(95822),i=e.i(99054),s=e.i(36117);async function o(e){let o;if((await (0,n.read_supabase_db)(e)).sheets.length>0)return!1;try{await t.promises.access(r.DB_PATH),o=await (0,a.read_local_db)()}catch{return!1}if(0===o.sheets.length)return!1;await (0,i.write_supabase_db)(o,e);let l=await (0,s.create_server_supabase_client)();return await l.from("tracker_accounts").update({local_imported_at:new Date().toISOString()}).eq("user_id",e),!0}e.s(["import_local_db_to_supabase",0,o])},47720,e=>{"use strict";var t=e.i(973),r=e.i(39210),a=e.i(13132),n=e.i(14579),i=e.i(47092),s=e.i(34740),o=e.i(77667),l=e.i(11979),d=e.i(54202),c=e.i(39093),u=e.i(95106),p=e.i(57255),h=e.i(96492),_=e.i(27930),m=e.i(24131),v=e.i(93695);e.i(20216);var f=e.i(84975),g=e.i(82214),w=e.i(36117),E=e.i(33496);async function x(e){let{searchParams:t,origin:r}=new URL(e.url),a=t.get("code"),n=t.get("next")??"/";if(null===a)return g.NextResponse.redirect(`${r}/login?error=auth`);let i=await (0,w.create_server_supabase_client)(),{error:s}=await i.auth.exchangeCodeForSession(a);if(null!==s)return g.NextResponse.redirect(`${r}/login?error=auth`);let{data:{user:o}}=await i.auth.getUser();return null!==o&&await (0,E.import_local_db_to_supabase)(o.id),g.NextResponse.redirect(`${r}${n}`)}e.s(["GET",0,x],46523);var y=e.i(46523);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/auth/callback/route",pathname:"/auth/callback",filename:"route",bundlePath:""},distDir:"next-output",relativeProjectDir:"",resolvedPagePath:"[project]/app/auth/callback/route.ts",nextConfigOutput:"standalone",userland:y,...{}}),{workAsyncStorage:R,workUnitAsyncStorage:S,serverHooks:N}=b;async function D(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),b.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/auth/callback/route";g=g.replace(/\/index$/,"")||"/";let w=await b.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,deploymentId:x,params:y,nextConfig:R,parsedUrl:S,isDraftMode:N,prerenderManifest:D,routerServerContext:A,isOnDemandRevalidate:I,revalidateOnlyGenerated:T,resolvedPathname:$,clientReferenceManifest:C,serverActionsManifest:O}=w,k=(0,o.normalizeAppPath)(g),q=!!(D.dynamicRoutes[k]||D.routes[$]),j=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,S,!1):t.end("This page could not be found"),null);if(q&&!N){let e=!!D.routes[$],t=D.dynamicRoutes[k];if(t&&!1===t.fallback&&!e){if(R.adapterPath)return await j();throw new v.NoFallbackError}}let P=null;!q||b.isDev||N||(P="/index"===(P=$)?"/":P);let F=!0===b.isDev||!q,H=q&&!F;O&&C&&(0,s.setManifestsSingleton)({page:g,clientReferenceManifest:C,serverActionsManifest:O});let B=e.method||"GET",M=(0,i.getTracer)(),U=M.getActiveScopeSpan(),L=!!(null==A?void 0:A.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await b.getIncrementalCache(e,R,D,V);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let G={params:y,previewProps:D.preview,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:F,incrementalCache:K,cacheLifeProfiles:R.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>b.onRequestError(e,t,a,n,A)},sharedContext:{buildId:E,deploymentId:x}},X=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(X,(0,d.signalFromNodeResponse)(t));try{let n,s=async e=>b.handle(W,G).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=M.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.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 a=r.get("next.route");if(a){let t=`${B} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${B} ${g}`)}),o=async n=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!V&&I&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(n);e.fetchMetrics=G.renderOpts.fetchMetrics;let o=G.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=G.renderOpts.collectedTags;if(!q)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,a=void 0===G.renderOpts.collectedExpire||G.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:G.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:I})},!1,A),t}},d=await b.handleResponse({req:e,nextConfig:R,cacheKey:P,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:D,isRoutePPREnabled:!1,isOnDemandRevalidate:I,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:V});if(!q)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",I?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return V&&q||c.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,_.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(X,J,new Response(d.value.body,{headers:c,status:d.value.status||200})),null};L&&U?await o(U):(n=M.getActiveScopeSpan(),await M.withPropagatedContext(e.headers,()=>M.trace(c.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 v.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:I})},!1,A),q)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,a.patchFetch)({workAsyncStorage:R,workUnitAsyncStorage:S})},"routeModule",0,b,"serverHooks",0,N,"workAsyncStorage",0,R,"workUnitAsyncStorage",0,S],47720)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0ai1p94._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[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"))},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"))},68194,e=>{"use strict";var t=e.i(82214);e.s(["api_error_response",0,function(e,r=400){let a=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:a},{status:r})}])},29207,e=>{"use strict";var t=e.i(5313),r=e.i(36117);async function a(){if(!(0,t.is_supabase_configured)())return null;let e=await (0,r.create_server_supabase_client)(),{data:{user:a}}=await e.auth.getUser();return a?.id??null}e.s(["get_authenticated_user_id",0,a])},12675,e=>{"use strict";var t=e.i(36117);async function r(e,r){let a=await (0,t.create_server_supabase_client)(),{data:n,error:s}=await a.from("tracker_accounts").select("ui_preferences").eq("user_id",e).maybeSingle();if(null!==s)throw Error(`Failed to read UI preferences: ${s.message}`);let i=n?.ui_preferences,o={};if("object"==typeof i&&null!==i&&!Array.isArray(i))for(let[e,t]of Object.entries(i))"string"==typeof t&&(o[e]=t);let l={...o,...r},{error:u}=await a.from("tracker_accounts").update({ui_preferences:l}).eq("user_id",e);if(null!==u)throw Error(`Failed to save UI preferences: ${u.message}`);return l}e.s(["write_supabase_ui_preferences",0,r])},94770,e=>{"use strict";var t=e.i(973),r=e.i(39210),a=e.i(13132),n=e.i(14579),s=e.i(47092),i=e.i(34740),o=e.i(77667),l=e.i(11979),u=e.i(54202),p=e.i(39093),d=e.i(95106),c=e.i(57255),f=e.i(96492),h=e.i(27930),_=e.i(24131),x=e.i(93695);e.i(20216);var v=e.i(84975),g=e.i(82214),R=e.i(68194),w=e.i(29207),m=e.i(36117);async function y(e){let t=await (0,m.create_server_supabase_client)(),{data:r,error:a}=await t.from("tracker_accounts").select("ui_preferences").eq("user_id",e).maybeSingle();if(null!==a)throw Error(`Failed to load UI preferences: ${a.message}`);if(null===r)return{};let n=r.ui_preferences;if("object"!=typeof n||null===n||Array.isArray(n))return{};let s={};for(let[e,t]of Object.entries(n))"string"==typeof t&&(s[e]=t);return s}var E=e.i(12675);async function b(){try{let e=await (0,w.get_authenticated_user_id)();if(null===e)return(0,R.api_error_response)(Error("Sign in required"),401);let t=await y(e);return g.NextResponse.json({preferences:t})}catch(e){return(0,R.api_error_response)(e,500)}}async function C(e){try{let t=await (0,w.get_authenticated_user_id)();if(null===t)return(0,R.api_error_response)(Error("Sign in required"),401);let r=(await e.json()).preferences??{},a=await (0,E.write_supabase_ui_preferences)(t,r);return g.NextResponse.json({preferences:a})}catch(e){return(0,R.api_error_response)(e,500)}}e.s(["GET",0,b,"PUT",0,C],49123);var A=e.i(49123);let q=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/ui-preferences/route",pathname:"/api/ui-preferences",filename:"route",bundlePath:""},distDir:"next-output",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/ui-preferences/route.ts",nextConfigOutput:"standalone",userland:A,...{}}),{workAsyncStorage:N,workUnitAsyncStorage:S,serverHooks:T}=q;async function j(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),q.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/ui-preferences/route";g=g.replace(/\/index$/,"")||"/";let R=await q.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,deploymentId:m,params:y,nextConfig:E,parsedUrl:b,isDraftMode:C,prerenderManifest:A,routerServerContext:N,isOnDemandRevalidate:S,revalidateOnlyGenerated:T,resolvedPathname:j,clientReferenceManifest:P,serverActionsManifest:k}=R,O=(0,o.normalizeAppPath)(g),U=!!(A.dynamicRoutes[O]||A.routes[j]),I=async()=>((null==N?void 0:N.render404)?await N.render404(e,t,b,!1):t.end("This page could not be found"),null);if(U&&!C){let e=!!A.routes[j],t=A.dynamicRoutes[O];if(t&&!1===t.fallback&&!e){if(E.adapterPath)return await I();throw new x.NoFallbackError}}let H=null;!U||q.isDev||C||(H="/index"===(H=j)?"/":H);let M=!0===q.isDev||!U,D=U&&!M;k&&P&&(0,i.setManifestsSingleton)({page:g,clientReferenceManifest:P,serverActionsManifest:k});let $=e.method||"GET",F=(0,s.getTracer)(),K=F.getActiveScopeSpan(),B=!!(null==N?void 0:N.isWrappedByNextServer),L=!!(0,n.getRequestMeta)(e,"minimalMode"),G=(0,n.getRequestMeta)(e,"incrementalCache")||await q.getIncrementalCache(e,E,A,L);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let V={params:y,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:M,incrementalCache:G,cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>q.onRequestError(e,t,a,n,N)},sharedContext:{buildId:w,deploymentId:m}},W=new l.NodeNextRequest(e),X=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(W,(0,u.signalFromNodeResponse)(t));try{let n,i=async e=>q.handle(z,V).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.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 a=r.get("next.route");if(a){let t=`${$} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${$} ${g}`)}),o=async n=>{var s,o;let l=async({previousCacheEntry:r})=>{try{if(!L&&S&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(n);e.fetchMetrics=V.renderOpts.fetchMetrics;let o=V.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=V.renderOpts.collectedTags;if(!U)return await (0,c.sendResponse)(W,X,s,V.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,f.toNodeOutgoingHttpHeaders)(s.headers);l&&(t[_.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=_.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,a=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=_.INFINITE_CACHE?void 0:V.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await q.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,N),t}},u=await q.handleResponse({req:e,nextConfig:E,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:S,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:L});if(!U)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==v.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});L||t.setHeader("x-nextjs-cache",S?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),C&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,f.fromNodeOutgoingHttpHeaders)(u.value.headers);return L&&U||p.delete(_.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,h.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(W,X,new Response(u.value.body,{headers:p,status:u.value.status||200})),null};B&&K?await o(K):(n=F.getActiveScopeSpan(),await F.withPropagatedContext(e.headers,()=>F.trace(p.BaseServerSpan.handleRequest,{spanName:`${$} ${g}`,kind:s.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},o),void 0,!B))}catch(t){if(t instanceof x.NoFallbackError||await q.onRequestError(e,t,{routerKind:"App Router",routePath:O,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:S})},!1,N),U)throw t;return await (0,c.sendResponse)(W,X,new Response(null,{status:500})),null}}e.s(["handler",0,j,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:S})},"routeModule",0,q,"serverHooks",0,T,"workAsyncStorage",0,N,"workUnitAsyncStorage",0,S],94770)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0p1kxjf._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[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"))},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"))},68194,e=>{"use strict";var t=e.i(82214);e.s(["api_error_response",0,function(e,r=400){let a=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:a},{status:r})}])},29207,e=>{"use strict";var t=e.i(5313),r=e.i(36117);async function a(){if(!(0,t.is_supabase_configured)())return null;let e=await (0,r.create_server_supabase_client)(),{data:{user:a}}=await e.auth.getUser();return a?.id??null}e.s(["get_authenticated_user_id",0,a])},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 a="db.json",n=r.default.join(t.default.homedir(),".super-time-tracker"),i=r.default.join(n,a);e.s(["DB_FILE_NAME",0,a,"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:a}=e;return{version:r,activeSheetName:a,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:a,tags:n,notes:i})=>({id:e,description:a,tags:n,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=[],a=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==a&&void 0===t.find(({id:e})=>e===a))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:a}}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:a}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:a,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:a})=>({tags:[],notes:[],id:e,end:r,start:t,description:a}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:a}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:a,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:a,tags:n})=>({notes:[],tags:n,id:e,end:r,start:t,description:a}))}))}}};e.s(["migrate_json_db",0,function(e){let a=e,n=!1,i=void 0===a.version?1:a.version;if(i>t.DB_VERSION||i<1)throw Error(`Unknown DB version ${a.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((a=t(a)).version!==e)throw Error(`Invalid migration output for version ${e}.`);i=e,n=!0}return{json_db:a,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,95822,99054,e=>{"use strict";var t=e.i(50227),r=e.i(2157),a=e.i(72507),n=e.i(72127),i=e.i(30853),s=e.i(93361),o=e.i(24507),l=e.i(16366);async function d(e,t=a.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 c(e=a.DB_PATH){let l,u=t.default.dirname(e);await (0,i.ensure_dir_exists)(u);try{await r.promises.access(e)}catch{let t=(0,s.gen_db)();return await d(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 h=(0,n.convert_json_db)(l);return _.did_migrate&&await d(h,e),h}e.s(["write_local_db",0,d],32806),e.s(["read_local_db",0,c],71786);var u=e.i(36117);async function p(e){let t=await (0,u.create_server_supabase_client)(),{data:r,error:n}=await t.from("tracker_accounts").select("active_sheet_name, db_version").eq("user_id",e).maybeSingle();if(null!==n)throw Error(`Failed to load tracker account: ${n.message}`);if(null===r)return(0,s.gen_db)();let{data:i,error:o}=await t.from("sheets").select("id, name, active_entry_id").eq("user_id",e).order("name",{ascending:!0});if(null!==o)throw Error(`Failed to load sheets: ${o.message}`);let l=i??[];if(0===l.length)return{version:r.db_version??a.DB_VERSION,activeSheetName:r.active_sheet_name,sheets:[]};let d=l.map(e=>e.id),{data:c,error:p}=await t.from("entries").select("sheet_id, id, start_at, end_at, description, tags").in("sheet_id",d).order("id",{ascending:!0});if(null!==p)throw Error(`Failed to load entries: ${p.message}`);let{data:_,error:h}=await t.from("entry_notes").select("sheet_id, entry_id, note_index, noted_at, text").in("sheet_id",d).order("note_index",{ascending:!0});if(null!==h)throw Error(`Failed to load entry notes: ${h.message}`);let m=new Map;for(let e of _??[]){let t=`${e.sheet_id}:${e.entry_id}`,r=m.get(t)??[];r.push({text:e.text,timestamp:new Date(e.noted_at)}),m.set(t,r)}let v=new Map;for(let e of c??[]){let t=`${e.sheet_id}:${e.id}`,r=v.get(e.sheet_id)??[];r.push({id:e.id,description:e.description,tags:e.tags??[],start:new Date(e.start_at),end:null===e.end_at?null:new Date(e.end_at),notes:m.get(t)??[]}),v.set(e.sheet_id,r)}let f=l.map(e=>(0,s.gen_sheet)(e.name,v.get(e.id)??[],e.active_entry_id));return{version:r.db_version??a.DB_VERSION,activeSheetName:r.active_sheet_name,sheets:f}}async function _(e,t){let r=await (0,u.create_server_supabase_client)(),{error:a}=await r.from("tracker_accounts").upsert({user_id:t,active_sheet_name:e.activeSheetName,db_version:e.version,updated_at:new Date().toISOString()});if(null!==a)throw Error(`Failed to save tracker account: ${a.message}`);let{data:n,error:i}=await r.from("sheets").select("id").eq("user_id",t);if(null!==i)throw Error(`Failed to list sheets: ${i.message}`);let s=(n??[]).map(e=>e.id);if(s.length>0){let{error:e}=await r.from("sheets").delete().in("id",s);if(null!==e)throw Error(`Failed to clear sheets: ${e.message}`)}for(let a of e.sheets){let e={user_id:t,name:a.name,active_entry_id:a.activeEntryID},{data:n,error:i}=await r.from("sheets").insert(e).select("id").single();if(null!==i)throw Error(`Failed to save sheet "${a.name}": ${i.message}`);let s=n.id;if(0===a.entries.length)continue;let o=a.entries.map(e=>({sheet_id:s,id:e.id,start_at:e.start.toISOString(),end_at:null===e.end?null:e.end.toISOString(),description:e.description,tags:e.tags})),{error:l}=await r.from("entries").insert(o);if(null!==l)throw Error(`Failed to save entries for "${a.name}": ${l.message}`);let d=[];for(let e of a.entries)e.notes.forEach((t,r)=>{d.push({sheet_id:s,entry_id:e.id,note_index:r,noted_at:t.timestamp.toISOString(),text:t.text})});if(0===d.length)continue;let{error:c}=await r.from("entry_notes").insert(d);if(null!==c)throw Error(`Failed to save notes for "${a.name}": ${c.message}`)}}e.s(["read_supabase_db",0,p],95822),e.s(["write_supabase_db",0,_],99054)},12675,e=>{"use strict";var t=e.i(36117);async function r(e,r){let a=await (0,t.create_server_supabase_client)(),{data:n,error:i}=await a.from("tracker_accounts").select("ui_preferences").eq("user_id",e).maybeSingle();if(null!==i)throw Error(`Failed to read UI preferences: ${i.message}`);let s=n?.ui_preferences,o={};if("object"==typeof s&&null!==s&&!Array.isArray(s))for(let[e,t]of Object.entries(s))"string"==typeof t&&(o[e]=t);let l={...o,...r},{error:d}=await a.from("tracker_accounts").update({ui_preferences:l}).eq("user_id",e);if(null!==d)throw Error(`Failed to save UI preferences: ${d.message}`);return l}e.s(["write_supabase_ui_preferences",0,r])},33496,e=>{"use strict";var t=e.i(2157),r=e.i(72507),a=e.i(71786),n=e.i(95822),i=e.i(99054),s=e.i(36117);async function o(e){let o;if((await (0,n.read_supabase_db)(e)).sheets.length>0)return!1;try{await t.promises.access(r.DB_PATH),o=await (0,a.read_local_db)()}catch{return!1}if(0===o.sheets.length)return!1;await (0,i.write_supabase_db)(o,e);let l=await (0,s.create_server_supabase_client)();return await l.from("tracker_accounts").update({local_imported_at:new Date().toISOString()}).eq("user_id",e),!0}e.s(["import_local_db_to_supabase",0,o])},89362,e=>{"use strict";var t=e.i(973),r=e.i(39210),a=e.i(13132),n=e.i(14579),i=e.i(47092),s=e.i(34740),o=e.i(77667),l=e.i(11979),d=e.i(54202),c=e.i(39093),u=e.i(95106),p=e.i(57255),_=e.i(96492),h=e.i(27930),m=e.i(24131),v=e.i(93695);e.i(20216);var f=e.i(84975),g=e.i(82214),w=e.i(68194),E=e.i(29207),y=e.i(33496),x=e.i(12675);async function b(e){try{let t=await (0,E.get_authenticated_user_id)();if(null===t)return(0,w.api_error_response)(Error("Sign in required"),401);let r=await (0,y.import_local_db_to_supabase)(t),a={};try{a=await e.json()}catch{a={}}let n=a.preferences??{};return Object.keys(n).length>0&&await (0,x.write_supabase_ui_preferences)(t,n),g.NextResponse.json({imported:r})}catch(e){return(0,w.api_error_response)(e,500)}}e.s(["POST",0,b],45041);var R=e.i(45041);let S=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/sync/import/route",pathname:"/api/sync/import",filename:"route",bundlePath:""},distDir:"next-output",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/sync/import/route.ts",nextConfigOutput:"standalone",userland:R,...{}}),{workAsyncStorage:N,workUnitAsyncStorage:D,serverHooks:A}=S;async function I(e,t,a){a.requestMeta&&(0,n.setRequestMeta)(e,a.requestMeta),S.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let g="/api/sync/import/route";g=g.replace(/\/index$/,"")||"/";let w=await S.prepare(e,t,{srcPage:g,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,deploymentId:y,params:x,nextConfig:b,parsedUrl:R,isDraftMode:N,prerenderManifest:D,routerServerContext:A,isOnDemandRevalidate:I,revalidateOnlyGenerated:T,resolvedPathname:O,clientReferenceManifest:C,serverActionsManifest:$}=w,j=(0,o.normalizeAppPath)(g),q=!!(D.dynamicRoutes[j]||D.routes[O]),k=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,R,!1):t.end("This page could not be found"),null);if(q&&!N){let e=!!D.routes[O],t=D.dynamicRoutes[j];if(t&&!1===t.fallback&&!e){if(b.adapterPath)return await k();throw new v.NoFallbackError}}let P=null;!q||S.isDev||N||(P="/index"===(P=O)?"/":P);let F=!0===S.isDev||!q,H=q&&!F;$&&C&&(0,s.setManifestsSingleton)({page:g,clientReferenceManifest:C,serverActionsManifest:$});let U=e.method||"GET",B=(0,i.getTracer)(),M=B.getActiveScopeSpan(),L=!!(null==A?void 0:A.isWrappedByNextServer),V=!!(0,n.getRequestMeta)(e,"minimalMode"),K=(0,n.getRequestMeta)(e,"incrementalCache")||await S.getIncrementalCache(e,b,D,V);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let X={params:x,previewProps:D.preview,renderOpts:{experimental:{authInterrupts:!!b.experimental.authInterrupts},cacheComponents:!!b.cacheComponents,supportsDynamicResponse:F,incrementalCache:K,cacheLifeProfiles:b.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>S.onRequestError(e,t,a,n,A)},sharedContext:{buildId:E,deploymentId:y}},G=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let n,s=async e=>S.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")!==c.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 a=r.get("next.route");if(a){let t=`${U} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t),n&&n!==e&&(n.setAttribute("http.route",a),n.updateName(t))}else e.updateName(`${U} ${g}`)}),o=async n=>{var i,o;let l=async({previousCacheEntry:r})=>{try{if(!V&&I&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(n);e.fetchMetrics=X.renderOpts.fetchMetrics;let o=X.renderOpts.pendingWaitUntil;o&&a.waitUntil&&(a.waitUntil(o),o=void 0);let l=X.renderOpts.collectedTags;if(!q)return await (0,p.sendResponse)(G,J,i,X.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,_.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!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,a=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:X.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await S.onRequestError(e,t,{routerKind:"App Router",routePath:g,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:I})},!1,A),t}},d=await S.handleResponse({req:e,nextConfig:b,cacheKey:P,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:D,isRoutePPREnabled:!1,isOnDemandRevalidate:I,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:a.waitUntil,isMinimalMode:V});if(!q)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(o=d.value)?void 0:o.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});V||t.setHeader("x-nextjs-cache",I?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,_.fromNodeOutgoingHttpHeaders)(d.value.headers);return V&&q||c.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,h.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(G,J,new Response(d.value.body,{headers:c,status:d.value.status||200})),null};L&&M?await o(M):(n=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(c.BaseServerSpan.handleRequest,{spanName:`${U} ${g}`,kind:i.SpanKind.SERVER,attributes:{"http.method":U,"http.target":e.url}},o),void 0,!L))}catch(t){if(t instanceof v.NoFallbackError||await S.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:I})},!1,A),q)throw t;return await (0,p.sendResponse)(G,J,new Response(null,{status:500})),null}}e.s(["handler",0,I,"patchFetch",0,function(){return(0,a.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:D})},"routeModule",0,S,"serverHooks",0,A,"workAsyncStorage",0,N,"workUnitAsyncStorage",0,D],89362)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0z09g1h._.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"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},2474,(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"}}},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}},35394,a=>{"use strict";a.s(["is_supabase_configured",0,function(){let a=process.env.NEXT_PUBLIC_SUPABASE_URL?.trim()??"",b=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY?.trim()??"";return a.length>0&&b.length>0}])},4813,92398,23761,a=>{"use strict";var b=a.i(77564),c=a.i(35394),d=a.i(50227),e=a.i(2157),f=a.i(59341);async function g(a){try{await e.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 h(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}}function i(){return{version:f.DB_VERSION,sheets:[h(f.DEFAULT_SHEET_NAME)],activeSheetName:f.DEFAULT_SHEET_NAME}}a.s(["gen_db",0,i,"gen_sheet",0,h],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}))}))}}};async function k(a,b=f.DB_PATH){let c,d=JSON.stringify((c=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()}))}))})),{version:a.version,activeSheetName:a.activeSheetName,sheets:c}));try{await e.promises.writeFile(b,d)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function l(a=f.DB_PATH){let b,c=d.default.dirname(a);await g(c);try{await e.promises.access(a)}catch{let b=i();return await k(b,a),b}let h=await e.promises.readFile(a,"utf-8");try{b=JSON.parse(h)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let m=function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>f.DB_VERSION||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<f.DB_VERSION;){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}}(b),n=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)}))}))}}(b=m.json_db);return m.did_migrate&&await k(n,a),n}a.s(["write_local_db",0,k],23761);var m=a.i(44679);async function n(a){let b=await (0,m.create_server_supabase_client)(),{data:c,error:d}=await b.from("tracker_accounts").select("active_sheet_name, db_version").eq("user_id",a).maybeSingle();if(null!==d)throw Error(`Failed to load tracker account: ${d.message}`);if(null===c)return i();let{data:e,error:g}=await b.from("sheets").select("id, name, active_entry_id").eq("user_id",a).order("name",{ascending:!0});if(null!==g)throw Error(`Failed to load sheets: ${g.message}`);let j=e??[];if(0===j.length)return{version:c.db_version??f.DB_VERSION,activeSheetName:c.active_sheet_name,sheets:[]};let k=j.map(a=>a.id),{data:l,error:n}=await b.from("entries").select("sheet_id, id, start_at, end_at, description, tags").in("sheet_id",k).order("id",{ascending:!0});if(null!==n)throw Error(`Failed to load entries: ${n.message}`);let{data:o,error:p}=await b.from("entry_notes").select("sheet_id, entry_id, note_index, noted_at, text").in("sheet_id",k).order("note_index",{ascending:!0});if(null!==p)throw Error(`Failed to load entry notes: ${p.message}`);let q=new Map;for(let a of o??[]){let b=`${a.sheet_id}:${a.entry_id}`,c=q.get(b)??[];c.push({text:a.text,timestamp:new Date(a.noted_at)}),q.set(b,c)}let r=new Map;for(let a of l??[]){let b=`${a.sheet_id}:${a.id}`,c=r.get(a.sheet_id)??[];c.push({id:a.id,description:a.description,tags:a.tags??[],start:new Date(a.start_at),end:null===a.end_at?null:new Date(a.end_at),notes:q.get(b)??[]}),r.set(a.sheet_id,c)}let s=j.map(a=>h(a.name,r.get(a.id)??[],a.active_entry_id));return{version:c.db_version??f.DB_VERSION,activeSheetName:c.active_sheet_name,sheets:s}}async function o(a){if((0,c.is_supabase_configured)()){let a=await (0,b.get_authenticated_user_id)();if(null!==a)return n(a)}return l(a)}a.s(["read_db",0,o],4813)},60197,a=>{"use strict";var b=a.i(59341),c=a.i(77564),d=a.i(35394);async function e(){return!!(0,d.is_supabase_configured)()&&null!==await (0,c.get_authenticated_user_id)()}async function f(){if(await e()){let a=process.env.NEXT_PUBLIC_SUPABASE_URL?.trim()??"Supabase";return`Cloud sync (${a})`}return b.DB_PATH}a.s(["resolve_db_path_label",0,f],60197)},67835,19045,88028,a=>{"use strict";function b(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}}a.s(["get_serialized_entries_total_ms",0,function(a){return a.reduce((a,b)=>a+b.durationMs,0)}],67835),a.s(["serialize_entry",0,b],19045),a.s(["serialize_sheet_entries",0,function(a){let{activeEntryID:c,entries:d,name:e}=a;return d.map(a=>b(a,e,c===a.id&&null===a.end))}],88028)},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])},43732,a=>{"use strict";a.s(["TrackerApp",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TrackerApp() from the server but TrackerApp 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-app.tsx <module evaluation>","TrackerApp")},50367,a=>{"use strict";a.s(["TrackerApp",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TrackerApp() from the server but TrackerApp 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-app.tsx","TrackerApp")},84174,a=>{"use strict";a.i(43732);var b=a.i(50367);a.n(b)},50708,a=>{"use strict";var b=a.i(46193),c=a.i(40035),d=a.i(84174),e=a.i(90492),f=a.i(60197),g=a.i(67835),h=a.i(4813),i=a.i(59341),j=a.i(19045),k=a.i(88028),l=a.i(92398),m=a.i(77564),n=a.i(35394),o=a.i(23761),p=a.i(44679);async function q(a,b){let c=await (0,p.create_server_supabase_client)(),{error:d}=await c.from("tracker_accounts").upsert({user_id:b,active_sheet_name:a.activeSheetName,db_version:a.version,updated_at:new Date().toISOString()});if(null!==d)throw Error(`Failed to save tracker account: ${d.message}`);let{data:e,error:f}=await c.from("sheets").select("id").eq("user_id",b);if(null!==f)throw Error(`Failed to list sheets: ${f.message}`);let g=(e??[]).map(a=>a.id);if(g.length>0){let{error:a}=await c.from("sheets").delete().in("id",g);if(null!==a)throw Error(`Failed to clear sheets: ${a.message}`)}for(let d of a.sheets){let a={user_id:b,name:d.name,active_entry_id:d.activeEntryID},{data:e,error:f}=await c.from("sheets").insert(a).select("id").single();if(null!==f)throw Error(`Failed to save sheet "${d.name}": ${f.message}`);let g=e.id;if(0===d.entries.length)continue;let h=d.entries.map(a=>({sheet_id:g,id:a.id,start_at:a.start.toISOString(),end_at:null===a.end?null:a.end.toISOString(),description:a.description,tags:a.tags})),{error:i}=await c.from("entries").insert(h);if(null!==i)throw Error(`Failed to save entries for "${d.name}": ${i.message}`);let j=[];for(let a of d.entries)a.notes.forEach((b,c)=>{j.push({sheet_id:g,entry_id:a.id,note_index:c,noted_at:b.timestamp.toISOString(),text:b.text})});if(0===j.length)continue;let{error:k}=await c.from("entry_notes").insert(j);if(null!==k)throw Error(`Failed to save notes for "${d.name}": ${k.message}`)}}async function r(a,b){if((0,n.is_supabase_configured)()){let b=await (0,m.get_authenticated_user_id)();if(null!==b)return void await q(a,b)}await (0,o.write_local_db)(a,b)}async function s(a){let b=await (0,h.read_db)();b.sheets.some(({name:b})=>b===a)||b.sheets.push((0,l.gen_sheet)(a)),b.activeSheetName=a,await r(b)}async function t(a){let b=await (0,h.read_db)(),c=function(a,b){let c=b?.trim()??"";if(c.length>0&&a.sheets.some(a=>a.name===c))return c;if(null!==a.activeSheetName&&a.sheets.some(b=>b.name===a.activeSheetName))return a.activeSheetName;let d=a.sheets.find(a=>null!==a.activeEntryID);return void 0!==d?d.name:a.sheets[0]?.name??i.DEFAULT_SHEET_NAME}(b,a);b.activeSheetName!==c&&(await s(c),b.activeSheetName=c);let{activeSheetName:d,sheets:e}=b,l=[];if(null!==d){let a=function(a,b){let c=a.sheets.find(({name:a})=>a===b);if(void 0===c)throw Error(`Sheet ${b} not found`);return c}(b,d);l=function(a,b){let c=[...a];switch(b){case"oldest":return c.sort((a,b)=>new Date(a.start).getTime()-new Date(b.start).getTime());case"duration":return c.sort((a,b)=>b.durationMs-a.durationMs);case"description":return c.sort((a,b)=>{let c=a.description.trim()||"Untitled entry",d=b.description.trim()||"Untitled entry";return c.localeCompare(d)});default:return c.sort((a,b)=>new Date(b.start).getTime()-new Date(a.start).getTime())}}((0,k.serialize_sheet_entries)(a),"newest")}let m=null!==d?function(a,b){let c=a.sheets.find(({name:a})=>a===b);if(void 0===c)return null;let{activeEntryID:d,entries:e,name:f}=c;if(null===d)return null;let g=e.find(({id:a})=>a===d);return void 0===g?null:(0,j.serialize_entry)(g,f,null===g.end)}(b,d):null,n=function(a){let b=[];for(let c of a.sheets){let{activeEntryID:a,entries:d,name:e}=c;if(null===a)continue;let f=d.find(({id:b})=>b===a);void 0!==f&&null===f.end&&b.push((0,j.serialize_entry)(f,e,!0))}return b}(b),o=m??n[0]??null;return{dbPath:await (0,f.resolve_db_path_label)(),activeSheetName:d,knownTags: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))}(b),sheets:e.map(a=>({name:a.name,activeEntryID:a.activeEntryID,entryCount:a.entries.length,isActive:a.name===d,hasActiveEntry:null!==a.activeEntryID})),activeEntry:m,runningEntry:o,runningEntries:n,activeSheetEntries:l,activeSheetTotalMs:(0,g.get_serialized_entries_total_ms)(l)}}async function u(){let a=await (0,c.cookies)(),f=function(a,b){var c;let d="last_viewed"===(c=b.session_mode)||"active_timer"===c||"fixed"===c?c:e.DEFAULT_SHEET_SESSION_MODE_DEFAULT,f=void 0!==b.last_viewed_sheet&&decodeURIComponent(b.last_viewed_sheet).trim()||null,g=void 0!==b.fixed_sheet_name&&decodeURIComponent(b.fixed_sheet_name).trim()||null;switch(d){case"fixed":{let b=g?.trim()??"";if(b.length>0&&a.sheets.some(a=>a.name===b))return b;return null}case"active_timer":{let b=a.sheets.find(a=>null!==a.activeEntryID);return b?.name??null}default:return f}}(await (0,h.read_db)(),{session_mode:a.get(e.DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME)?.value,fixed_sheet_name:a.get(e.DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME)?.value,last_viewed_sheet:a.get(e.ACTIVE_SHEET_COOKIE_NAME)?.value}),g=await t(f);return(0,b.jsx)(d.TrackerApp,{initial_state:g})}a.s(["default",0,u],50708)},26030,a=>{a.n(a.i(50708))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__00t2myd._.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"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},2474,(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"}}},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}},35394,a=>{"use strict";a.s(["is_supabase_configured",0,function(){let a=process.env.NEXT_PUBLIC_SUPABASE_URL?.trim()??"",b=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY?.trim()??"";return a.length>0&&b.length>0}])},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)},76360,a=>{"use strict";a.s(["SettingsSavedToast",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SettingsSavedToast() from the server but SettingsSavedToast 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-saved-toast.tsx <module evaluation>","SettingsSavedToast")},89827,a=>{"use strict";a.s(["SettingsSavedToast",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SettingsSavedToast() from the server but SettingsSavedToast 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-saved-toast.tsx","SettingsSavedToast")},24991,a=>{"use strict";a.i(76360);var b=a.i(89827);a.n(b)},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)},5894,a=>{"use strict";var b=a.i(46193),c=a.i(9615),d=a.i(24991),e=a.i(54675);a.s(["SettingsPageLayout",0,function({breadcrumb:a,title:f,description:g,children:h}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.SettingsSavedToast,{}),(0,b.jsx)(e.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-6 px-5 pb-10 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:f}),void 0!==g?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:g}):null]}),h]})]})]})}])},60197,a=>{"use strict";var b=a.i(59341),c=a.i(77564),d=a.i(35394);async function e(){return!!(0,d.is_supabase_configured)()&&null!==await (0,c.get_authenticated_user_id)()}async function f(){if(await e()){let a=process.env.NEXT_PUBLIC_SUPABASE_URL?.trim()??"Supabase";return`Cloud sync (${a})`}return b.DB_PATH}a.s(["resolve_db_path_label",0,f],60197)},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)},83919,a=>{"use strict";a.s(["CloudAccountSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call CloudAccountSetting() from the server but CloudAccountSetting 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-account-setting.tsx <module evaluation>","CloudAccountSetting")},10430,a=>{"use strict";a.s(["CloudAccountSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call CloudAccountSetting() from the server but CloudAccountSetting 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-account-setting.tsx","CloudAccountSetting")},72274,a=>{"use strict";a.i(83919);var b=a.i(10430);a.n(b)},38876,a=>{"use strict";var b=a.i(46193),c=a.i(85779),d=a.i(20349),e=a.i(72274),f=a.i(5894);function g({db_path:a}){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)(e.CloudAccountSetting,{})}),(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.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(60197);async function i(){let a=await (0,h.resolve_db_path_label)();return(0,b.jsx)(g,{db_path:a})}a.s(["default",0,i],38876)},12678,a=>{a.n(a.i(38876))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__070_uw2._.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"))},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},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},71535,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored["react-ssr"].ReactServerDOMTurbopackClient},32715,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored["react-ssr"].ReactDOM},1611,89711,a=>{"use strict";var b=a.i(39752);function c({label:a,description:d,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:d})]})}a.s(["KeyboardShortcutsContent",0,function({sections:a,compact:d=!1}){return(0,b.jsx)("div",{className:`flex flex-col ${d?"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 ${d?"text-[0.65rem]":"text-[0.72rem]"}`,children:a.title}),(0,b.jsx)("dl",{className:`m-0 grid grid-cols-[auto_minmax(0,1fr)] ${d?"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)(c,{label:e.label,description:e.description,compact:d},`${a.title}-${e.label}-${e.description}`))})]},a.title))})}],1611),a.s(["get_app_keyboard_shortcut_sections",0,function(){return[{title:"General",entries:[{label:"?",description:"Show keyboard shortcuts"}]}]}],89711)},72958,a=>{"use strict";a.i(63577),a.s(["schedule_ui_preferences_cloud_sync",0,function(){}])},52345,70827,a=>{"use strict";var b=a.i(72958);a.s(["create_ui_preference_store",0,function(a){let{default_value:c,is_valid:d,storage_key:e}=a,f=new Set,g=()=>c;return{storage_key:e,default_value:c,is_valid:d,read:g,write:a=>{try{window.localStorage.setItem(e,a),(0,b.schedule_ui_preferences_cloud_sync)()}catch{}},subscribe:a=>(f.add(a),()=>{f.delete(a)}),notify:()=>{f.forEach(a=>{a()})},get_snapshot:g,get_server_snapshot:()=>c}}],52345),a.s(["CHECK_IN_FORM_COLLAPSED_DEFAULT",0,"false","CHECK_IN_FORM_COLLAPSED_STORAGE_KEY",0,"super-time-tracker-check-in-form-collapsed","CLEAR_TAG_FILTERS_ON_SHEET_CHANGE_DEFAULT",0,"false","CLEAR_TAG_FILTERS_ON_SHEET_CHANGE_STORAGE_KEY",0,"super-time-tracker-clear-tag-filters-on-sheet-change","COLOR_PALETTE_DEFAULT",0,"default","COLOR_PALETTE_STORAGE_KEY",0,"super-time-tracker-color-palette","COLOR_PALETTE_VALUES",0,["default","midnight","warm","ocean","forest","contrast"],"CONFIRM_BEFORE_CHECKOUT_DEFAULT",0,"false","CONFIRM_BEFORE_CHECKOUT_STORAGE_KEY",0,"super-time-tracker-confirm-before-checkout","CONFIRM_DESTRUCTIVE_ACTIONS_DEFAULT",0,"true","CONFIRM_DESTRUCTIVE_ACTIONS_STORAGE_KEY",0,"super-time-tracker-confirm-destructive-actions","DEFAULT_REPORTING_RANGE_DEFAULT",0,"none","DEFAULT_REPORTING_RANGE_STORAGE_KEY",0,"super-time-tracker-default-reporting-range","DEFAULT_REPORTING_SORT_DEFAULT",0,"duration","DEFAULT_REPORTING_SORT_STORAGE_KEY",0,"super-time-tracker-default-reporting-sort","DURATION_FORMAT_DEFAULT",0,"humanized","DURATION_FORMAT_STORAGE_KEY",0,"super-time-tracker-duration-format","ENTRY_LIST_SORT_DEFAULT",0,"newest","ENTRY_LIST_SORT_STORAGE_KEY",0,"super-time-tracker-entry-list-sort","TAG_FILTER_MODE_DEFAULT",0,"all","TAG_FILTER_MODE_STORAGE_KEY",0,"super-time-tracker-tag-filter-mode","THEME_MODE_DEFAULT",0,"system","THEME_MODE_STORAGE_KEY",0,"super-time-tracker-theme-mode","TIMER_IN_TITLE_DEFAULT",0,"true","TIMER_IN_TITLE_STORAGE_KEY",0,"super-time-tracker-timer-in-title","TIMER_SHOW_SECONDS_DEFAULT",0,"false","TIMER_SHOW_SECONDS_STORAGE_KEY",0,"super-time-tracker-timer-show-seconds","TIME_FORMAT_DEFAULT",0,"12h","TIME_FORMAT_STORAGE_KEY",0,"super-time-tracker-time-format","WEEK_STARTS_ON_DEFAULT",0,"monday","WEEK_STARTS_ON_STORAGE_KEY",0,"super-time-tracker-week-starts-on"],70827)},29698,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.THEME_MODE_STORAGE_KEY,default_value:c.THEME_MODE_DEFAULT,is_valid:a=>"light"===a||"dark"===a||"system"===a});a.s(["theme_mode_preference",0,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)},63652,(a,b,c)=>{"use strict";c._=function(a){return a&&a.__esModule?a:{default:a}}},64169,a=>{"use strict";a.s(["collect_ui_preferences_from_window",0,function(){return{}}])},7386,46299,89184,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(1611),e=a.i(89969);function f(){return null!==document.querySelector('[role="dialog"][aria-modal="true"]')}a.s(["KeyboardShortcutsDialog",0,function({sections:a,on_close:f}){let g=(0,c.useId)(),h=(0,c.useRef)(null);return(0,c.useEffect)(()=>{h.current?.focus();let a=a=>{"Escape"===a.key&&f()};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[f]),(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:f}),(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)(d.KeyboardShortcutsContent,{sections:a})}),(0,b.jsx)("div",{className:"mt-5 flex justify-end",children:(0,b.jsx)("button",{ref:h,type:"button",className:(0,e.get_button_class_name)("primary"),onClick:f,children:"Close"})})]})]})}],7386),a.s(["is_modal_dialog_open",0,f],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)&&!f()){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)},83066,(a,b,c)=>{"use strict";b.exports=a.r(85058).vendored.contexts.HeadManagerContext},20798,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),Object.defineProperty(c,"setAttributesFromProps",{enumerable:!0,get:function(){return g}});let d={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"},e=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"];function f(a){return["async","defer","noModule"].includes(a)}function g(a,b){for(let[c,g]of Object.entries(b)){if(!b.hasOwnProperty(c)||e.includes(c)||void 0===g)continue;let h=d[c]||c.toLowerCase();"SCRIPT"===a.tagName&&f(h)?a[h]=!!g:a.setAttribute(h,String(g)),(!1===g||"SCRIPT"===a.tagName&&f(h)&&(!g||"false"===g))&&(a.setAttribute(h,""),a.removeAttribute(h))}}("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)},76415,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={cancelIdleCallback:function(){return g},requestIdleCallback:function(){return f}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(a){let b=Date.now();return self.setTimeout(function(){a({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-b))}})},1)},g="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(a){return clearTimeout(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)},70364,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={ESCAPE_REGEX:function(){return g},htmlEscapeAttributeString:function(){return k},htmlEscapeJsonString:function(){return j}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},g=/[&><\u2028\u2029]/g,h={"&":"&",'"':""","'":"'","<":"<",">":">"},i=/[&"'<>]/g;function j(a){return a.replace(g,a=>f[a])}function k(a){return a.replace(i,a=>h[a])}},45193,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return u},handleClientScriptLoad:function(){return r},initScriptLoader:function(){return s}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(63652),g=a.r(3988),h=a.r(39752),i=f._(a.r(32715)),j=g._(a.r(34542)),k=a.r(83066),l=a.r(20798),m=a.r(76415),n=a.r(70364),o=new Map,p=new Set,q=a=>{let{src:b,id:c,onLoad:d=()=>{},onReady:e=null,dangerouslySetInnerHTML:f,children:g="",strategy:h="afterInteractive",onError:j,stylesheets:k}=a,m=c||b;if(m&&p.has(m))return;if(o.has(b)){p.add(m),o.get(b).then(d,j);return}let n=()=>{e&&e(),p.add(m)},q=document.createElement("script"),r=new Promise((a,b)=>{q.addEventListener("load",function(b){a(),d&&d.call(this,b),n()}),q.addEventListener("error",function(a){b(a)})}).catch(function(a){j&&j(a)});f?(q.innerHTML=f.__html||"",n()):g?(q.textContent="string"==typeof g?g:Array.isArray(g)?g.join(""):"",n()):b&&(q.src=b,o.set(b,r)),(0,l.setAttributesFromProps)(q,a),"worker"===h&&q.setAttribute("type","text/partytown"),q.setAttribute("data-nscript",h),k&&(a=>{if(i.default.preinit)return a.forEach(a=>{i.default.preinit(a,{as:"style"})})})(k),document.body.appendChild(q)};function r(a){let{strategy:b="afterInteractive"}=a;"lazyOnload"===b?window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>q(a))}):q(a)}function s(a){a.forEach(r),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(a=>{let b=a.id||a.getAttribute("src");p.add(b)})}function t(a){let{id:b,src:c="",onLoad:d=()=>{},onReady:e=null,strategy:f="afterInteractive",onError:g,stylesheets:l,...o}=a,{updateScripts:r,scripts:s,getIsSsr:t,appDir:u,nonce:v}=(0,j.useContext)(k.HeadManagerContext);v=o.nonce||v;let w=(0,j.useRef)(!1);(0,j.useEffect)(()=>{let a=b||c;w.current||(e&&a&&p.has(a)&&e(),w.current=!0)},[e,b,c]);let x=(0,j.useRef)(!1);if((0,j.useEffect)(()=>{if(!x.current){if("afterInteractive"===f)q(a);else"lazyOnload"===f&&("complete"===document.readyState?(0,m.requestIdleCallback)(()=>q(a)):window.addEventListener("load",()=>{(0,m.requestIdleCallback)(()=>q(a))}));x.current=!0}},[a,f]),("beforeInteractive"===f||"worker"===f)&&(r?(s[f]=(s[f]||[]).concat([{id:b,src:c,onLoad:d,onReady:e,onError:g,...o,nonce:v}]),r(s)):t&&t()?p.add(b||c):t&&!t()&&q({...a,nonce:v})),u){if(l&&l.forEach(a=>{i.default.preinit(a,{as:"style"})}),"beforeInteractive"===f)if(!c)return o.dangerouslySetInnerHTML&&(o.children=o.dangerouslySetInnerHTML.__html,delete o.dangerouslySetInnerHTML),(0,h.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,n.htmlEscapeJsonString)(JSON.stringify([0,{...o,id:b}]))})`}});else return i.default.preload(c,o.integrity?{as:"script",integrity:o.integrity,nonce:v,crossOrigin:o.crossOrigin}:{as:"script",nonce:v,crossOrigin:o.crossOrigin}),(0,h.jsx)("script",{nonce:v,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${(0,n.htmlEscapeJsonString)(JSON.stringify([c,{...o,id:b}]))})`}});"afterInteractive"===f&&c&&i.default.preload(c,o.integrity?{as:"script",integrity:o.integrity,nonce:v,crossOrigin:o.crossOrigin}:{as:"script",nonce:v,crossOrigin:o.crossOrigin})}return null}Object.defineProperty(t,"__nextScript",{value:!0});let u=t;("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)},17037,a=>{"use strict";var b=a.i(39752),c=a.i(82508),d=a.i(34542),e=a.i(7386),f=a.i(89711),g=a.i(89184);a.s(["AppKeyboardShortcuts",0,function(){let a=(0,c.usePathname)(),[h,i]=(0,d.useState)(!1),j="/"===a,k=(0,d.useMemo)(()=>j?[]:[{id:"help",label:"?",description:"Show keyboard shortcuts",key:"?",modifiers:["shift"],action:()=>{i(a=>!a)}}],[j]);return((0,g.use_document_keyboard_shortcuts)(k),!h||j)?null:(0,b.jsx)(e.KeyboardShortcutsDialog,{sections:(0,f.get_app_keyboard_shortcut_sections)(),on_close:()=>i(!1)})}])},24480,a=>{"use strict";var b=a.i(39752),c=a.i(82508),d=a.i(34542),e=a.i(64169),f=a.i(9301),g=a.i(63577);a.s(["CloudSyncProvider",0,function({children:a}){let h=(0,c.useRouter)();return(0,d.useEffect)(()=>{if(!(0,g.is_supabase_configured)())return;let a=(0,f.create_browser_supabase_client)(),b=async()=>{let{data:{session:b}}=await a.auth.getSession();if(null===b)return;let c=(0,e.collect_ui_preferences_from_window)(),d=await fetch("/api/ui-preferences");if(!d.ok){Object.keys(c).length>0&&await fetch("/api/ui-preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:c})});return}(await d.json()).preferences,Object.keys(c).length>0&&await fetch("/api/ui-preferences",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:c})})};b();let{data:{subscription:c}}=a.auth.onAuthStateChange(a=>{"SIGNED_IN"===a&&b().then(()=>{h.refresh()}),"SIGNED_OUT"===a&&h.refresh()});return()=>{c.unsubscribe()}},[h]),(0,b.jsx)(b.Fragment,{children:a})}],24480)},97658,a=>{"use strict";var b=a.i(34542);a.i(29698),a.s(["ThemeModeSystemListener",0,function(){return(0,b.useEffect)(()=>{},[]),null}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0c4ohc.._.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"))},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"))},2474,(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"}}},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}},35394,a=>{"use strict";a.s(["is_supabase_configured",0,function(){let a=process.env.NEXT_PUBLIC_SUPABASE_URL?.trim()??"",b=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY?.trim()??"";return a.length>0&&b.length>0}])},4813,92398,23761,a=>{"use strict";var b=a.i(77564),c=a.i(35394),d=a.i(50227),e=a.i(2157),f=a.i(59341);async function g(a){try{await e.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 h(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}}function i(){return{version:f.DB_VERSION,sheets:[h(f.DEFAULT_SHEET_NAME)],activeSheetName:f.DEFAULT_SHEET_NAME}}a.s(["gen_db",0,i,"gen_sheet",0,h],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}))}))}}};async function k(a,b=f.DB_PATH){let c,d=JSON.stringify((c=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()}))}))})),{version:a.version,activeSheetName:a.activeSheetName,sheets:c}));try{await e.promises.writeFile(b,d)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function l(a=f.DB_PATH){let b,c=d.default.dirname(a);await g(c);try{await e.promises.access(a)}catch{let b=i();return await k(b,a),b}let h=await e.promises.readFile(a,"utf-8");try{b=JSON.parse(h)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let m=function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>f.DB_VERSION||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<f.DB_VERSION;){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}}(b),n=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)}))}))}}(b=m.json_db);return m.did_migrate&&await k(n,a),n}a.s(["write_local_db",0,k],23761);var m=a.i(44679);async function n(a){let b=await (0,m.create_server_supabase_client)(),{data:c,error:d}=await b.from("tracker_accounts").select("active_sheet_name, db_version").eq("user_id",a).maybeSingle();if(null!==d)throw Error(`Failed to load tracker account: ${d.message}`);if(null===c)return i();let{data:e,error:g}=await b.from("sheets").select("id, name, active_entry_id").eq("user_id",a).order("name",{ascending:!0});if(null!==g)throw Error(`Failed to load sheets: ${g.message}`);let j=e??[];if(0===j.length)return{version:c.db_version??f.DB_VERSION,activeSheetName:c.active_sheet_name,sheets:[]};let k=j.map(a=>a.id),{data:l,error:n}=await b.from("entries").select("sheet_id, id, start_at, end_at, description, tags").in("sheet_id",k).order("id",{ascending:!0});if(null!==n)throw Error(`Failed to load entries: ${n.message}`);let{data:o,error:p}=await b.from("entry_notes").select("sheet_id, entry_id, note_index, noted_at, text").in("sheet_id",k).order("note_index",{ascending:!0});if(null!==p)throw Error(`Failed to load entry notes: ${p.message}`);let q=new Map;for(let a of o??[]){let b=`${a.sheet_id}:${a.entry_id}`,c=q.get(b)??[];c.push({text:a.text,timestamp:new Date(a.noted_at)}),q.set(b,c)}let r=new Map;for(let a of l??[]){let b=`${a.sheet_id}:${a.id}`,c=r.get(a.sheet_id)??[];c.push({id:a.id,description:a.description,tags:a.tags??[],start:new Date(a.start_at),end:null===a.end_at?null:new Date(a.end_at),notes:q.get(b)??[]}),r.set(a.sheet_id,c)}let s=j.map(a=>h(a.name,r.get(a.id)??[],a.active_entry_id));return{version:c.db_version??f.DB_VERSION,activeSheetName:c.active_sheet_name,sheets:s}}async function o(a){if((0,c.is_supabase_configured)()){let a=await (0,b.get_authenticated_user_id)();if(null!==a)return n(a)}return l(a)}a.s(["read_db",0,o],4813)},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])},25244,a=>{"use strict";a.s(["TagManagementView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TagManagementView() from the server but TagManagementView 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/tag-management-view.tsx <module evaluation>","TagManagementView")},6889,a=>{"use strict";a.s(["TagManagementView",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TagManagementView() from the server but TagManagementView 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/tag-management-view.tsx","TagManagementView")},38116,a=>{"use strict";a.i(25244);var b=a.i(6889);a.n(b)},72299,a=>{"use strict";var b=a.i(46193),c=a.i(38116),d=a.i(4813);async function e(){let a=function(a){let b=new Map;for(let c of a.sheets)for(let a of c.entries)for(let c of a.tags)try{let a=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}`}(c);b.set(a,(b.get(a)??0)+1)}catch{continue}return[...b.entries()].map(([a,b])=>({name:a,entryCount:b})).sort((a,b)=>a.name.localeCompare(b.name))}(await (0,d.read_db)());return(0,b.jsx)(c.TagManagementView,{initial_tags:a})}a.s(["default",0,e],72299)},83074,a=>{a.n(a.i(72299))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0mjp16u._.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"))},2474,(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"}}},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}},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)},76360,a=>{"use strict";a.s(["SettingsSavedToast",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SettingsSavedToast() from the server but SettingsSavedToast 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-saved-toast.tsx <module evaluation>","SettingsSavedToast")},89827,a=>{"use strict";a.s(["SettingsSavedToast",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SettingsSavedToast() from the server but SettingsSavedToast 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-saved-toast.tsx","SettingsSavedToast")},24991,a=>{"use strict";a.i(76360);var b=a.i(89827);a.n(b)},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)},5894,a=>{"use strict";var b=a.i(46193),c=a.i(9615),d=a.i(24991),e=a.i(54675);a.s(["SettingsPageLayout",0,function({breadcrumb:a,title:f,description:g,children:h}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.SettingsSavedToast,{}),(0,b.jsx)(e.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-6 px-5 pb-10 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:f}),void 0!==g?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:g}):null]}),h]})]})]})}])},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])},21999,a=>{"use strict";a.s(["ColorPaletteSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ColorPaletteSetting() from the server but ColorPaletteSetting 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/color-palette-setting.tsx <module evaluation>","ColorPaletteSetting")},42383,a=>{"use strict";a.s(["ColorPaletteSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ColorPaletteSetting() from the server but ColorPaletteSetting 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/color-palette-setting.tsx","ColorPaletteSetting")},23735,a=>{"use strict";a.i(21999);var b=a.i(42383);a.n(b)},71584,a=>{"use strict";a.s(["CheckInFormCollapsedSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call CheckInFormCollapsedSetting() from the server but CheckInFormCollapsedSetting 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/check-in-form-collapsed-setting.tsx <module evaluation>","CheckInFormCollapsedSetting")},7368,a=>{"use strict";a.s(["CheckInFormCollapsedSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call CheckInFormCollapsedSetting() from the server but CheckInFormCollapsedSetting 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/check-in-form-collapsed-setting.tsx","CheckInFormCollapsedSetting")},50977,a=>{"use strict";a.i(71584);var b=a.i(7368);a.n(b)},31822,a=>{"use strict";a.s(["CompactListsSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call CompactListsSetting() from the server but CompactListsSetting 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/compact-lists-setting.tsx <module evaluation>","CompactListsSetting")},20771,a=>{"use strict";a.s(["CompactListsSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call CompactListsSetting() from the server but CompactListsSetting 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/compact-lists-setting.tsx","CompactListsSetting")},57918,a=>{"use strict";a.i(31822);var b=a.i(20771);a.n(b)},63348,a=>{"use strict";a.s(["DefaultReportingRangeSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DefaultReportingRangeSetting() from the server but DefaultReportingRangeSetting 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/default-reporting-range-setting.tsx <module evaluation>","DefaultReportingRangeSetting")},18259,a=>{"use strict";a.s(["DefaultReportingRangeSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DefaultReportingRangeSetting() from the server but DefaultReportingRangeSetting 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/default-reporting-range-setting.tsx","DefaultReportingRangeSetting")},97896,a=>{"use strict";a.i(63348);var b=a.i(18259);a.n(b)},57093,a=>{"use strict";a.s(["DefaultReportingSortSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DefaultReportingSortSetting() from the server but DefaultReportingSortSetting 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/default-reporting-sort-setting.tsx <module evaluation>","DefaultReportingSortSetting")},44646,a=>{"use strict";a.s(["DefaultReportingSortSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DefaultReportingSortSetting() from the server but DefaultReportingSortSetting 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/default-reporting-sort-setting.tsx","DefaultReportingSortSetting")},36651,a=>{"use strict";a.i(57093);var b=a.i(44646);a.n(b)},52089,a=>{"use strict";a.s(["DurationFormatSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DurationFormatSetting() from the server but DurationFormatSetting 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/duration-format-setting.tsx <module evaluation>","DurationFormatSetting")},17796,a=>{"use strict";a.s(["DurationFormatSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DurationFormatSetting() from the server but DurationFormatSetting 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/duration-format-setting.tsx","DurationFormatSetting")},99808,a=>{"use strict";a.i(52089);var b=a.i(17796);a.n(b)},67725,a=>{"use strict";a.s(["EntryListSortSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call EntryListSortSetting() from the server but EntryListSortSetting 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/entry-list-sort-setting.tsx <module evaluation>","EntryListSortSetting")},32758,a=>{"use strict";a.s(["EntryListSortSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call EntryListSortSetting() from the server but EntryListSortSetting 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/entry-list-sort-setting.tsx","EntryListSortSetting")},38866,a=>{"use strict";a.i(67725);var b=a.i(32758);a.n(b)},4802,a=>{"use strict";a.s(["TagFilterModeSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TagFilterModeSetting() from the server but TagFilterModeSetting 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/tag-filter-mode-setting.tsx <module evaluation>","TagFilterModeSetting")},99461,a=>{"use strict";a.s(["TagFilterModeSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TagFilterModeSetting() from the server but TagFilterModeSetting 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/tag-filter-mode-setting.tsx","TagFilterModeSetting")},65050,a=>{"use strict";a.i(4802);var b=a.i(99461);a.n(b)},33134,a=>{"use strict";a.s(["ThemeModeSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ThemeModeSetting() from the server but ThemeModeSetting 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-setting.tsx <module evaluation>","ThemeModeSetting")},3341,a=>{"use strict";a.s(["ThemeModeSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ThemeModeSetting() from the server but ThemeModeSetting 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-setting.tsx","ThemeModeSetting")},68870,a=>{"use strict";a.i(33134);var b=a.i(3341);a.n(b)},77333,a=>{"use strict";a.s(["TimeFormatSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TimeFormatSetting() from the server but TimeFormatSetting 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/time-format-setting.tsx <module evaluation>","TimeFormatSetting")},61652,a=>{"use strict";a.s(["TimeFormatSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TimeFormatSetting() from the server but TimeFormatSetting 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/time-format-setting.tsx","TimeFormatSetting")},27558,a=>{"use strict";a.i(77333);var b=a.i(61652);a.n(b)},97390,a=>{"use strict";a.s(["TimerInTitleSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TimerInTitleSetting() from the server but TimerInTitleSetting 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/timer-in-title-setting.tsx <module evaluation>","TimerInTitleSetting")},21523,a=>{"use strict";a.s(["TimerInTitleSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TimerInTitleSetting() from the server but TimerInTitleSetting 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/timer-in-title-setting.tsx","TimerInTitleSetting")},58560,a=>{"use strict";a.i(97390);var b=a.i(21523);a.n(b)},39894,a=>{"use strict";a.s(["TimerShowSecondsSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TimerShowSecondsSetting() from the server but TimerShowSecondsSetting 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/timer-show-seconds-setting.tsx <module evaluation>","TimerShowSecondsSetting")},12758,a=>{"use strict";a.s(["TimerShowSecondsSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call TimerShowSecondsSetting() from the server but TimerShowSecondsSetting 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/timer-show-seconds-setting.tsx","TimerShowSecondsSetting")},2971,a=>{"use strict";a.i(39894);var b=a.i(12758);a.n(b)},20251,a=>{"use strict";a.s(["WeekStartsOnSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call WeekStartsOnSetting() from the server but WeekStartsOnSetting 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/week-starts-on-setting.tsx <module evaluation>","WeekStartsOnSetting")},71866,a=>{"use strict";a.s(["WeekStartsOnSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call WeekStartsOnSetting() from the server but WeekStartsOnSetting 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/week-starts-on-setting.tsx","WeekStartsOnSetting")},45313,a=>{"use strict";a.i(20251);var b=a.i(71866);a.n(b)},88267,a=>{"use strict";var b=a.i(46193),c=a.i(23735),d=a.i(50977),e=a.i(57918),f=a.i(97896),g=a.i(36651),h=a.i(99808),i=a.i(38866),j=a.i(5894),k=a.i(65050),l=a.i(68870),m=a.i(27558),n=a.i(58560),o=a.i(2971),p=a.i(45313);function q(){return(0,b.jsx)(j.SettingsPageLayout,{breadcrumb:{current:"Display & layout",parent:{label:"Settings",href:"/settings"}},title:"Display & layout",description:"How things look across the tracker, reporting, and entry lists.",children:(0,b.jsxs)("ul",{className:"m-0 flex w-full list-none flex-col gap-2 p-0","aria-label":"Display settings",children:[(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(l.ThemeModeSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(c.ColorPaletteSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(e.CompactListsSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(d.CheckInFormCollapsedSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(m.TimeFormatSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(h.DurationFormatSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(o.TimerShowSecondsSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(n.TimerInTitleSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(i.EntryListSortSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(k.TagFilterModeSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(p.WeekStartsOnSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(g.DefaultReportingSortSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(f.DefaultReportingRangeSetting,{})})]})})}a.s(["default",0,function(){return(0,b.jsx)(q,{})}],88267)},2688,a=>{a.n(a.i(88267))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0rtwdhy._.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"))},2474,(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"}}},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}},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])},33179,(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/components/builtin/global-error.js <module evaluation>"))},45191,(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/components/builtin/global-error.js"))},94278,a=>{"use strict";a.i(33179);var b=a.i(45191);a.n(b)},18781,a=>{a.n(a.i(94278))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0ucb5c~._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[90492,a=>{"use strict";a.s(["ACTIVE_SHEET_COOKIE_NAME",0,"stt-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_SESSION_MODE_COOKIE_NAME",0,"stt-default-sheet-session-mode","DEFAULT_SHEET_SESSION_MODE_DEFAULT",0,"last_viewed"])},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"})},83658,(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/script.js <module evaluation>"))},90723,(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/script.js"))},28579,a=>{"use strict";a.i(83658);var b=a.i(90723);a.n(b)},32,(a,b,c)=>{b.exports=a.r(28579)},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)},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)},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)},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(32),h=a.i(67636),i=a.i(69669),j=a.i(64762),k=a.i(3905);let l="default",m=`(function(){try{var mk=${JSON.stringify("super-time-tracker-theme-mode")};var tk=${JSON.stringify("super-time-tracker-theme")};var m=localStorage.getItem(mk);if(m!=='light'&&m!=='dark'&&m!=='system'){var legacy=localStorage.getItem(tk);m=legacy==='light'||legacy==='dark'?legacy:'system';localStorage.setItem(mk,m)}var resolve=function(mode){if(mode==='light'||mode==='dark')return mode;return window.matchMedia('(prefers-color-scheme: light)').matches?'light':'dark'};var t=resolve(m);document.documentElement.setAttribute('data-theme',t);localStorage.setItem(tk,t)}catch(e){document.documentElement.setAttribute('data-theme','dark')}})();`;var n=a.i(90492);let o=`(function(){try{var k=${JSON.stringify(n.COMPACT_LISTS_STORAGE_KEY)};var s=localStorage.getItem(k);var c=s==='true';document.documentElement.setAttribute('data-compact-lists',c?'true':'false');var pk=${JSON.stringify("super-time-tracker-color-palette")};var pv=localStorage.getItem(pk);var palettes=${JSON.stringify(["default","midnight","warm","ocean","forest","contrast"])};var migrate=${JSON.stringify({teal:"default",blue:"ocean",violet:"midnight",rose:"warm",amber:"warm",emerald:"forest"})};var ak=${JSON.stringify("super-time-tracker-accent-color")};var p=palettes.indexOf(pv)>=0?pv:(migrate[localStorage.getItem(ak)]||${JSON.stringify(l)});document.documentElement.setAttribute('data-palette',p);if(palettes.indexOf(pv)<0){localStorage.setItem(pk,p)}}catch(e){document.documentElement.setAttribute('data-compact-lists','false');document.documentElement.setAttribute('data-palette',${JSON.stringify(l)})}})();`;a.s(["default",0,function({children:a}){return(0,b.jsx)("html",{lang:"en",className:`${d.variable} ${f.variable} h-full antialiased`,suppressHydrationWarning:!0,children:(0,b.jsxs)("body",{className:"min-h-full font-sans transition-[background-color,color] duration-200",children:[(0,b.jsx)(g.default,{id:"theme-init",strategy:"beforeInteractive",dangerouslySetInnerHTML:{__html:m}}),(0,b.jsx)(g.default,{id:"ui-settings-init",strategy:"beforeInteractive",dangerouslySetInnerHTML:{__html:o}}),(0,b.jsx)(k.ThemeModeSystemListener,{}),(0,b.jsx)(j.ConfirmDialogProvider,{children:(0,b.jsxs)(i.CloudSyncProvider,{children:[(0,b.jsx)(h.AppKeyboardShortcuts,{}),a]})})]})})},"metadata",0,{title:"super-time-tracker",description:"Web UI for the super-time-tracker CLI time sheets"}],33290)},70864,a=>{a.n(a.i(33290))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__0x2t88.._.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"))},2474,(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"}}},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}},35394,a=>{"use strict";a.s(["is_supabase_configured",0,function(){let a=process.env.NEXT_PUBLIC_SUPABASE_URL?.trim()??"",b=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY?.trim()??"";return a.length>0&&b.length>0}])},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])},61615,a=>{"use strict";a.s(["SupabaseAuthForm",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SupabaseAuthForm() from the server but SupabaseAuthForm 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/supabase-auth-form.tsx <module evaluation>","SupabaseAuthForm")},99113,a=>{"use strict";a.s(["SupabaseAuthForm",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SupabaseAuthForm() from the server but SupabaseAuthForm 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/supabase-auth-form.tsx","SupabaseAuthForm")},60307,a=>{"use strict";a.i(61615);var b=a.i(99113);a.n(b)},25217,a=>{"use strict";var b=a.i(46193),c=a.i(85779),d=a.i(60307),e=a.i(35394);async function f({searchParams:a}){let g=await a,h=g.next??"/",i="auth"===g.error;return(0,b.jsxs)("main",{className:"mx-auto flex min-h-full w-full max-w-lg flex-col gap-6 px-4 py-10",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)(c.default,{href:"/",className:"text-[0.85rem] text-accent no-underline hover:underline",children:"← Back to tracker"}),(0,b.jsx)("h1",{className:"m-0 text-2xl font-semibold",children:"Cloud sync sign in"}),(0,b.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"Sign in to store sheets, entries, and settings in Supabase. Your local db.json is imported automatically the first time the cloud database is empty."})]}),(0,e.is_supabase_configured)()?(0,b.jsxs)(b.Fragment,{children:[i?(0,b.jsx)("p",{className:"m-0 text-[0.85rem] text-danger",children:"Sign-in failed. Try again or use the email link from your inbox."}):null,(0,b.jsx)(d.SupabaseAuthForm,{redirect_to:h})]}):(0,b.jsx)("p",{className:"m-0 text-[0.85rem] text-danger",children:"Configure NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY, then restart the app."})]})}a.s(["default",0,f])},24327,a=>{a.n(a.i(25217))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__108je_d._.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"))},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"))},2474,(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"}}},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}},35394,a=>{"use strict";a.s(["is_supabase_configured",0,function(){let a=process.env.NEXT_PUBLIC_SUPABASE_URL?.trim()??"",b=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY?.trim()??"";return a.length>0&&b.length>0}])},4813,92398,23761,a=>{"use strict";var b=a.i(77564),c=a.i(35394),d=a.i(50227),e=a.i(2157),f=a.i(59341);async function g(a){try{await e.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 h(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}}function i(){return{version:f.DB_VERSION,sheets:[h(f.DEFAULT_SHEET_NAME)],activeSheetName:f.DEFAULT_SHEET_NAME}}a.s(["gen_db",0,i,"gen_sheet",0,h],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}))}))}}};async function k(a,b=f.DB_PATH){let c,d=JSON.stringify((c=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()}))}))})),{version:a.version,activeSheetName:a.activeSheetName,sheets:c}));try{await e.promises.writeFile(b,d)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function l(a=f.DB_PATH){let b,c=d.default.dirname(a);await g(c);try{await e.promises.access(a)}catch{let b=i();return await k(b,a),b}let h=await e.promises.readFile(a,"utf-8");try{b=JSON.parse(h)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let m=function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>f.DB_VERSION||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<f.DB_VERSION;){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}}(b),n=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)}))}))}}(b=m.json_db);return m.did_migrate&&await k(n,a),n}a.s(["write_local_db",0,k],23761);var m=a.i(44679);async function n(a){let b=await (0,m.create_server_supabase_client)(),{data:c,error:d}=await b.from("tracker_accounts").select("active_sheet_name, db_version").eq("user_id",a).maybeSingle();if(null!==d)throw Error(`Failed to load tracker account: ${d.message}`);if(null===c)return i();let{data:e,error:g}=await b.from("sheets").select("id, name, active_entry_id").eq("user_id",a).order("name",{ascending:!0});if(null!==g)throw Error(`Failed to load sheets: ${g.message}`);let j=e??[];if(0===j.length)return{version:c.db_version??f.DB_VERSION,activeSheetName:c.active_sheet_name,sheets:[]};let k=j.map(a=>a.id),{data:l,error:n}=await b.from("entries").select("sheet_id, id, start_at, end_at, description, tags").in("sheet_id",k).order("id",{ascending:!0});if(null!==n)throw Error(`Failed to load entries: ${n.message}`);let{data:o,error:p}=await b.from("entry_notes").select("sheet_id, entry_id, note_index, noted_at, text").in("sheet_id",k).order("note_index",{ascending:!0});if(null!==p)throw Error(`Failed to load entry notes: ${p.message}`);let q=new Map;for(let a of o??[]){let b=`${a.sheet_id}:${a.entry_id}`,c=q.get(b)??[];c.push({text:a.text,timestamp:new Date(a.noted_at)}),q.set(b,c)}let r=new Map;for(let a of l??[]){let b=`${a.sheet_id}:${a.id}`,c=r.get(a.sheet_id)??[];c.push({id:a.id,description:a.description,tags:a.tags??[],start:new Date(a.start_at),end:null===a.end_at?null:new Date(a.end_at),notes:q.get(b)??[]}),r.set(a.sheet_id,c)}let s=j.map(a=>h(a.name,r.get(a.id)??[],a.active_entry_id));return{version:c.db_version??f.DB_VERSION,activeSheetName:c.active_sheet_name,sheets:s}}async function o(a){if((0,c.is_supabase_configured)()){let a=await (0,b.get_authenticated_user_id)();if(null!==a)return n(a)}return l(a)}a.s(["read_db",0,o],4813)},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)},76360,a=>{"use strict";a.s(["SettingsSavedToast",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SettingsSavedToast() from the server but SettingsSavedToast 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-saved-toast.tsx <module evaluation>","SettingsSavedToast")},89827,a=>{"use strict";a.s(["SettingsSavedToast",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call SettingsSavedToast() from the server but SettingsSavedToast 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-saved-toast.tsx","SettingsSavedToast")},24991,a=>{"use strict";a.i(76360);var b=a.i(89827);a.n(b)},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)},5894,a=>{"use strict";var b=a.i(46193),c=a.i(9615),d=a.i(24991),e=a.i(54675);a.s(["SettingsPageLayout",0,function({breadcrumb:a,title:f,description:g,children:h}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.SettingsSavedToast,{}),(0,b.jsx)(e.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-6 px-5 pb-10 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:f}),void 0!==g?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:g}):null]}),h]})]})]})}])},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])},73368,a=>{"use strict";a.s(["ClearTagFiltersOnSheetChangeSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ClearTagFiltersOnSheetChangeSetting() from the server but ClearTagFiltersOnSheetChangeSetting 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/clear-tag-filters-on-sheet-change-setting.tsx <module evaluation>","ClearTagFiltersOnSheetChangeSetting")},52811,a=>{"use strict";a.s(["ClearTagFiltersOnSheetChangeSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ClearTagFiltersOnSheetChangeSetting() from the server but ClearTagFiltersOnSheetChangeSetting 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/clear-tag-filters-on-sheet-change-setting.tsx","ClearTagFiltersOnSheetChangeSetting")},48597,a=>{"use strict";a.i(73368);var b=a.i(52811);a.n(b)},44583,a=>{"use strict";a.s(["ConfirmBeforeCheckoutSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ConfirmBeforeCheckoutSetting() from the server but ConfirmBeforeCheckoutSetting 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-before-checkout-setting.tsx <module evaluation>","ConfirmBeforeCheckoutSetting")},46049,a=>{"use strict";a.s(["ConfirmBeforeCheckoutSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ConfirmBeforeCheckoutSetting() from the server but ConfirmBeforeCheckoutSetting 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-before-checkout-setting.tsx","ConfirmBeforeCheckoutSetting")},2889,a=>{"use strict";a.i(44583);var b=a.i(46049);a.n(b)},59245,a=>{"use strict";a.s(["ConfirmDestructiveActionsSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ConfirmDestructiveActionsSetting() from the server but ConfirmDestructiveActionsSetting 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-destructive-actions-setting.tsx <module evaluation>","ConfirmDestructiveActionsSetting")},22659,a=>{"use strict";a.s(["ConfirmDestructiveActionsSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call ConfirmDestructiveActionsSetting() from the server but ConfirmDestructiveActionsSetting 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-destructive-actions-setting.tsx","ConfirmDestructiveActionsSetting")},39763,a=>{"use strict";a.i(59245);var b=a.i(22659);a.n(b)},53605,a=>{"use strict";a.s(["DefaultSheetSessionSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DefaultSheetSessionSetting() from the server but DefaultSheetSessionSetting 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/default-sheet-session-setting.tsx <module evaluation>","DefaultSheetSessionSetting")},27942,a=>{"use strict";a.s(["DefaultSheetSessionSetting",()=>b]);let b=(0,a.i(41445).registerClientReference)(function(){throw Error("Attempted to call DefaultSheetSessionSetting() from the server but DefaultSheetSessionSetting 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/default-sheet-session-setting.tsx","DefaultSheetSessionSetting")},82951,a=>{"use strict";a.i(53605);var b=a.i(27942);a.n(b)},72017,a=>{"use strict";var b=a.i(46193),c=a.i(48597),d=a.i(2889),e=a.i(39763),f=a.i(82951),g=a.i(5894);function h({sheet_names:a}){return(0,b.jsx)(g.SettingsPageLayout,{breadcrumb:{current:"General",parent:{label:"Settings"}},title:"General",description:"Tracker startup, confirmations, and session behavior.",children:(0,b.jsxs)("ul",{className:"m-0 flex w-full list-none flex-col gap-2 p-0","aria-label":"General settings",children:[(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(f.DefaultSheetSessionSetting,{sheet_names:a})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(d.ConfirmBeforeCheckoutSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(e.ConfirmDestructiveActionsSetting,{})}),(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:(0,b.jsx)(c.ClearTagFiltersOnSheetChangeSetting,{})})]})})}var i=a.i(4813);async function j(){let a=(await (0,i.read_db)()).sheets.map(a=>a.name);return(0,b.jsx)(h,{sheet_names:a})}a.s(["default",0,j],72017)},51425,a=>{a.n(a.i(72017))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__10jikzl._.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"))},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"))},2474,(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"}}},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}},35394,a=>{"use strict";a.s(["is_supabase_configured",0,function(){let a=process.env.NEXT_PUBLIC_SUPABASE_URL?.trim()??"",b=process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY?.trim()??"";return a.length>0&&b.length>0}])},4813,92398,23761,a=>{"use strict";var b=a.i(77564),c=a.i(35394),d=a.i(50227),e=a.i(2157),f=a.i(59341);async function g(a){try{await e.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 h(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}}function i(){return{version:f.DB_VERSION,sheets:[h(f.DEFAULT_SHEET_NAME)],activeSheetName:f.DEFAULT_SHEET_NAME}}a.s(["gen_db",0,i,"gen_sheet",0,h],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}))}))}}};async function k(a,b=f.DB_PATH){let c,d=JSON.stringify((c=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()}))}))})),{version:a.version,activeSheetName:a.activeSheetName,sheets:c}));try{await e.promises.writeFile(b,d)}catch(a){throw Error(`Failed to save DB: ${String(a)}`,{cause:a})}}async function l(a=f.DB_PATH){let b,c=d.default.dirname(a);await g(c);try{await e.promises.access(a)}catch{let b=i();return await k(b,a),b}let h=await e.promises.readFile(a,"utf-8");try{b=JSON.parse(h)}catch(b){throw Error(`DB at ${a} is invalid JSON: ${String(b)}`,{cause:b})}let m=function(a){let b=a,c=!1,d=void 0===b.version?1:b.version;if(d>f.DB_VERSION||d<1)throw Error(`Unknown DB version ${b.version}, cannot load.`);for(;d<f.DB_VERSION;){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}}(b),n=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)}))}))}}(b=m.json_db);return m.did_migrate&&await k(n,a),n}a.s(["write_local_db",0,k],23761);var m=a.i(44679);async function n(a){let b=await (0,m.create_server_supabase_client)(),{data:c,error:d}=await b.from("tracker_accounts").select("active_sheet_name, db_version").eq("user_id",a).maybeSingle();if(null!==d)throw Error(`Failed to load tracker account: ${d.message}`);if(null===c)return i();let{data:e,error:g}=await b.from("sheets").select("id, name, active_entry_id").eq("user_id",a).order("name",{ascending:!0});if(null!==g)throw Error(`Failed to load sheets: ${g.message}`);let j=e??[];if(0===j.length)return{version:c.db_version??f.DB_VERSION,activeSheetName:c.active_sheet_name,sheets:[]};let k=j.map(a=>a.id),{data:l,error:n}=await b.from("entries").select("sheet_id, id, start_at, end_at, description, tags").in("sheet_id",k).order("id",{ascending:!0});if(null!==n)throw Error(`Failed to load entries: ${n.message}`);let{data:o,error:p}=await b.from("entry_notes").select("sheet_id, entry_id, note_index, noted_at, text").in("sheet_id",k).order("note_index",{ascending:!0});if(null!==p)throw Error(`Failed to load entry notes: ${p.message}`);let q=new Map;for(let a of o??[]){let b=`${a.sheet_id}:${a.entry_id}`,c=q.get(b)??[];c.push({text:a.text,timestamp:new Date(a.noted_at)}),q.set(b,c)}let r=new Map;for(let a of l??[]){let b=`${a.sheet_id}:${a.id}`,c=r.get(a.sheet_id)??[];c.push({id:a.id,description:a.description,tags:a.tags??[],start:new Date(a.start_at),end:null===a.end_at?null:new Date(a.end_at),notes:q.get(b)??[]}),r.set(a.sheet_id,c)}let s=j.map(a=>h(a.name,r.get(a.id)??[],a.active_entry_id));return{version:c.db_version??f.DB_VERSION,activeSheetName:c.active_sheet_name,sheets:s}}async function o(a){if((0,c.is_supabase_configured)()){let a=await (0,b.get_authenticated_user_id)();if(null!==a)return n(a)}return l(a)}a.s(["read_db",0,o],4813)},67835,19045,88028,a=>{"use strict";function b(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}}a.s(["get_serialized_entries_total_ms",0,function(a){return a.reduce((a,b)=>a+b.durationMs,0)}],67835),a.s(["serialize_entry",0,b],19045),a.s(["serialize_sheet_entries",0,function(a){let{activeEntryID:c,entries:d,name:e}=a;return d.map(a=>b(a,e,c===a.id&&null===a.end))}],88028)},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);function d(a,b){return 0===b?0:a/b}let e=Symbol.for("constructDateFrom");function f(a,b){var c;return c=b||a,"function"==typeof c?c(a):c&&"object"==typeof c&&e in c?c[e](a):c instanceof Date?new c.constructor(a):new Date(a)}let g={};function h(a,b=new Date,c=1){switch(a){case"week":var d,e;let i,j,k,l,m,n;return{startMs:+(d={weekStartsOn:c},i=d?.weekStartsOn??d?.locale?.options?.weekStartsOn??g.weekStartsOn??g.locale?.options?.weekStartsOn??0,k=(j=f(b,d?.in)).getDay(),j.setDate(j.getDate()-(7*(k<i)+k-i)),j.setHours(0,0,0,0),j),endMs:+(e={weekStartsOn:c},l=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??g.weekStartsOn??g.locale?.options?.weekStartsOn??0,n=(m=f(b,e?.in)).getDay(),m.setDate(m.getDate()+((n<l?-7:0)+6-(n-l))),m.setHours(23,59,59,999),m)};case"month":let o,p,q;return{startMs:+((o=f(b,void 0)).setDate(1),o.setHours(0,0,0,0),o),endMs:+(q=(p=f(b,void 0)).getMonth(),p.setFullYear(p.getFullYear(),q+1,0),p.setHours(23,59,59,999),p)};default:let r,s;return{startMs:+((r=f(b,void 0)).setHours(0,0,0,0),r),endMs:+((s=f(b,void 0)).setHours(23,59,59,999),s)}}}function i(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))}function j(a,b,c,d=Date.now()){let e=0;for(let f of a)for(let a of f.entries)e+=i(a,b,c,d);return e}var k=a.i(67835),l=a.i(88028),m=a.i(4813);async function n(){let a=await (0,m.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()}))})),stats:function(a,b=null,c=Date.now(),e=1){let f=a.map(a=>{let e,f,g;return null===b?(e=(0,l.serialize_sheet_entries)(a),f=a.entries.length,g=(0,k.get_serialized_entries_total_ms)(e),{sheetName:a.name,totalMs:g,entryCount:f,averageEntryMs:d(g,f),hasActiveEntry:null!==a.activeEntryID}):function(a,b,c,e=Date.now()){let f=0,g=0,h=!1;for(let d of a.entries){let j=i(d,b,c,e);j<=0||(f+=j,g+=1,a.activeEntryID===d.id&&null===d.end&&(h=!0))}return{sheetName:a.name,totalMs:f,entryCount:g,averageEntryMs:d(f,g),hasActiveEntry:h}}(a,b.startMs,b.endMs,c)}),{activeSheets:g,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}}(f),n=f.reduce((a,b)=>a+b.totalMs,0),o=f.reduce((a,b)=>a+b.entryCount,0);return{activeSheets:g,idleSheets:m,grandTotalMs:n,totalEntryCount:o,grandAverageEntryMs:d(n,o),periodTotals:null===b?function(a,b=new Date,c=Date.now(),d=1){let e=h("today",b,d),f=h("week",b,d),g=h("month",b,d);return{todayMs:j(a,e.startMs,e.endMs,c),weekMs:j(a,f.startMs,f.endMs,c),monthMs:j(a,g.startMs,g.endMs,c)}}(a,new Date(c),c,e):{todayMs:0,weekMs:0,monthMs:0}}}(a.sheets)}}async function o(){let{sourceSheets:a}=await n();return(0,b.jsx)(c.ReportingView,{source_sheets:a})}a.s(["default",0,o],27001)},76842,a=>{a.n(a.i(27001))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__13dr511._.js.map
|