super-time-tracker-ui 0.1.9 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/bin/stt-ui.js +2 -1
  2. package/dist/standalone/next-output/BUILD_ID +1 -1
  3. package/dist/standalone/next-output/build-manifest.json +3 -3
  4. package/dist/standalone/next-output/server/app/_global-error.html +1 -1
  5. package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
  6. package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  7. package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
  8. package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
  9. package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
  10. package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  11. package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/dist/standalone/next-output/server/app/_not-found.html +1 -1
  13. package/dist/standalone/next-output/server/app/_not-found.rsc +3 -3
  14. package/dist/standalone/next-output/server/app/_not-found.segments/_full.segment.rsc +3 -3
  15. package/dist/standalone/next-output/server/app/_not-found.segments/_head.segment.rsc +1 -1
  16. package/dist/standalone/next-output/server/app/_not-found.segments/_index.segment.rsc +2 -2
  17. package/dist/standalone/next-output/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  18. package/dist/standalone/next-output/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  19. package/dist/standalone/next-output/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  20. package/dist/standalone/next-output/server/app/api/entry/route.js +1 -1
  21. package/dist/standalone/next-output/server/app/api/entry/route.js.nft.json +1 -1
  22. package/dist/standalone/next-output/server/app/api/in/route.js +1 -1
  23. package/dist/standalone/next-output/server/app/api/in/route.js.nft.json +1 -1
  24. package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
  25. package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
  26. package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
  27. package/dist/standalone/next-output/server/app/reporting.html +1 -1
  28. package/dist/standalone/next-output/server/app/reporting.rsc +5 -5
  29. package/dist/standalone/next-output/server/app/reporting.segments/_full.segment.rsc +5 -5
  30. package/dist/standalone/next-output/server/app/reporting.segments/_head.segment.rsc +1 -1
  31. package/dist/standalone/next-output/server/app/reporting.segments/_index.segment.rsc +2 -2
  32. package/dist/standalone/next-output/server/app/reporting.segments/_tree.segment.rsc +2 -2
  33. package/dist/standalone/next-output/server/app/reporting.segments/reporting/__PAGE__.segment.rsc +2 -2
  34. package/dist/standalone/next-output/server/app/reporting.segments/reporting.segment.rsc +1 -1
  35. package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
  36. package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
  37. package/dist/standalone/next-output/server/app/settings/data.html +1 -1
  38. package/dist/standalone/next-output/server/app/settings/data.rsc +9 -9
  39. package/dist/standalone/next-output/server/app/settings/data.segments/_full.segment.rsc +9 -9
  40. package/dist/standalone/next-output/server/app/settings/data.segments/_head.segment.rsc +1 -1
  41. package/dist/standalone/next-output/server/app/settings/data.segments/_index.segment.rsc +2 -2
  42. package/dist/standalone/next-output/server/app/settings/data.segments/_tree.segment.rsc +2 -2
  43. package/dist/standalone/next-output/server/app/settings/data.segments/settings/data/__PAGE__.segment.rsc +6 -6
  44. package/dist/standalone/next-output/server/app/settings/data.segments/settings/data.segment.rsc +1 -1
  45. package/dist/standalone/next-output/server/app/settings/data.segments/settings.segment.rsc +1 -1
  46. package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
  47. package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
  48. package/dist/standalone/next-output/server/app/settings/display.html +1 -1
  49. package/dist/standalone/next-output/server/app/settings/display.rsc +20 -20
  50. package/dist/standalone/next-output/server/app/settings/display.segments/_full.segment.rsc +20 -20
  51. package/dist/standalone/next-output/server/app/settings/display.segments/_head.segment.rsc +1 -1
  52. package/dist/standalone/next-output/server/app/settings/display.segments/_index.segment.rsc +2 -2
  53. package/dist/standalone/next-output/server/app/settings/display.segments/_tree.segment.rsc +2 -2
  54. package/dist/standalone/next-output/server/app/settings/display.segments/settings/display/__PAGE__.segment.rsc +17 -17
  55. package/dist/standalone/next-output/server/app/settings/display.segments/settings/display.segment.rsc +1 -1
  56. package/dist/standalone/next-output/server/app/settings/display.segments/settings.segment.rsc +1 -1
  57. package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
  58. package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
  59. package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
  60. package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
  61. package/dist/standalone/next-output/server/app/settings/tags.html +1 -1
  62. package/dist/standalone/next-output/server/app/settings/tags.rsc +5 -5
  63. package/dist/standalone/next-output/server/app/settings/tags.segments/_full.segment.rsc +5 -5
  64. package/dist/standalone/next-output/server/app/settings/tags.segments/_head.segment.rsc +1 -1
  65. package/dist/standalone/next-output/server/app/settings/tags.segments/_index.segment.rsc +2 -2
  66. package/dist/standalone/next-output/server/app/settings/tags.segments/_tree.segment.rsc +2 -2
  67. package/dist/standalone/next-output/server/app/settings/tags.segments/settings/tags/__PAGE__.segment.rsc +2 -2
  68. package/dist/standalone/next-output/server/app/settings/tags.segments/settings/tags.segment.rsc +1 -1
  69. package/dist/standalone/next-output/server/app/settings/tags.segments/settings.segment.rsc +1 -1
  70. package/dist/standalone/next-output/server/app/settings.html +1 -1
  71. package/dist/standalone/next-output/server/app/settings.rsc +11 -11
  72. package/dist/standalone/next-output/server/app/settings.segments/_full.segment.rsc +11 -11
  73. package/dist/standalone/next-output/server/app/settings.segments/_head.segment.rsc +1 -1
  74. package/dist/standalone/next-output/server/app/settings.segments/_index.segment.rsc +2 -2
  75. package/dist/standalone/next-output/server/app/settings.segments/_tree.segment.rsc +2 -2
  76. package/dist/standalone/next-output/server/app/settings.segments/settings/__PAGE__.segment.rsc +8 -8
  77. package/dist/standalone/next-output/server/app/settings.segments/settings.segment.rsc +1 -1
  78. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0_vmm81._.js +3 -0
  79. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0y8pcoc._.js +3 -0
  80. package/dist/standalone/next-output/server/chunks/ssr/{_0gz6nul._.js → _02-gx7.._.js} +2 -2
  81. package/dist/standalone/next-output/server/chunks/ssr/_02_~c39._.js +1 -1
  82. package/dist/standalone/next-output/server/chunks/ssr/_0hg~x6b._.js +1 -1
  83. package/dist/standalone/next-output/server/chunks/ssr/_0ll5ibs._.js +3 -0
  84. package/dist/standalone/next-output/server/chunks/ssr/{_0wjdrek._.js → _0ui3u54._.js} +2 -2
  85. package/dist/standalone/next-output/server/chunks/ssr/{_02pv8kk._.js → _0w8k735._.js} +2 -2
  86. package/dist/standalone/next-output/server/chunks/ssr/{_0ct61hc._.js → _12t56ma._.js} +2 -2
  87. package/dist/standalone/next-output/server/chunks/ssr/components_109-aj4._.js +1 -1
  88. package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +1 -1
  89. package/dist/standalone/next-output/server/middleware-build-manifest.js +3 -3
  90. package/dist/standalone/next-output/server/pages/404.html +1 -1
  91. package/dist/standalone/next-output/server/pages/500.html +1 -1
  92. package/dist/standalone/next-output/static/chunks/002_cxi.67d5i.js +1 -0
  93. package/dist/standalone/next-output/static/chunks/00gppo5nrk9ov.js +1 -0
  94. package/dist/standalone/next-output/static/chunks/04~lsgqjxciw_.js +1 -0
  95. package/dist/standalone/next-output/static/chunks/0e8tmpq~qz.dz.js +1 -0
  96. package/dist/standalone/next-output/static/chunks/0ewk7kj3yfts~.css +3 -0
  97. package/dist/standalone/next-output/static/chunks/0js9~7rlpndqf.js +1 -0
  98. package/dist/standalone/next-output/static/chunks/0ytd28-7d8.21.js +1 -0
  99. package/dist/standalone/next-output/static/chunks/14dlpcnjaw-zw.js +1 -0
  100. package/dist/standalone/package.json +1 -1
  101. package/package.json +1 -1
  102. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0d1w0cs._.js +0 -3
  103. package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0qmw9wb._.js +0 -3
  104. package/dist/standalone/next-output/server/chunks/ssr/_07raa2f._.js +0 -3
  105. package/dist/standalone/next-output/static/chunks/0-4qto4zejzdf.js +0 -1
  106. package/dist/standalone/next-output/static/chunks/05zy2m..vwhne.js +0 -1
  107. package/dist/standalone/next-output/static/chunks/09__rtwky2ffd.js +0 -1
  108. package/dist/standalone/next-output/static/chunks/0c9knh~t~22o1.js +0 -1
  109. package/dist/standalone/next-output/static/chunks/0ev966.breqju.js +0 -1
  110. package/dist/standalone/next-output/static/chunks/0fx83q6t~ep.v.js +0 -1
  111. package/dist/standalone/next-output/static/chunks/0g2ra41_1p6y6.js +0 -1
  112. package/dist/standalone/next-output/static/chunks/0sqkcyb268i44.css +0 -3
  113. /package/dist/standalone/next-output/static/{nCFHHujcYM5EFaWSlUj2N → wHoiBM1uMbUIrfXkizlyC}/_buildManifest.js +0 -0
  114. /package/dist/standalone/next-output/static/{nCFHHujcYM5EFaWSlUj2N → wHoiBM1uMbUIrfXkizlyC}/_clientMiddlewareManifest.js +0 -0
  115. /package/dist/standalone/next-output/static/{nCFHHujcYM5EFaWSlUj2N → wHoiBM1uMbUIrfXkizlyC}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(78677)),i=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",o=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(34416);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(31047),s=e.r(63334);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return b}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),i=e.r(54710),o=a._(e.r(34416)),l=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),f=e.r(20321);e.r(90503);let h=e.r(38520),p=e.r(19947),_=e.r(59246),m=e.r(99046);function g(t){var r,n;let s,a,g,[b,E]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:S,as:y,children:T,prefetch:j=null,passHref:N,replace:k,shallow:O,scroll:A,onClick:w,onMouseEnter:C,onTouchStart:I,legacyBehavior:D=!1,onNavigate:R,transitionTypes:L,ref:M,unstable_dynamicOnHover:F,...U}=t;s=T,D&&("string"==typeof s||"number"==typeof s)&&(s=(0,i.jsx)("a",{children:s}));let K=o.default.useContext(c.AppRouterContext),P=!1!==j,H=!1!==j?null===(n=j)||"auto"===n?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,G="string"==typeof(r=y||S)?r:(0,l.formatUrl)(r);if(D){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(s)}let $=D?a&&"object"==typeof a&&a.ref:M,B=o.default.useCallback(e=>(null!==K&&(v.current=(0,p.mountLinkInstance)(e,G,K,H,P,E)),()=>{v.current&&((0,p.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,p.unmountPrefetchableInstance)(e)}),[P,G,K,H,E]),Y={ref:(0,u.useMergedRef)(B,$),onClick(t){D||"function"!=typeof w||w(t),D&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!K||t.defaultPrevented||function(t,r,n,s,a,i,l){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,_.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);o.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,G,v,k,A,R,L)},onMouseEnter(e){D||"function"!=typeof C||C(e),D&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),K&&P&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)},onTouchStart:function(e){D||"function"!=typeof I||I(e),D&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),K&&P&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)}};return(0,d.isAbsoluteUrl)(G)?Y.href=G:D&&!N&&("a"!==a.type||"href"in a.props)||(Y.href=(0,f.addBasePath)(G)),g=D?o.default.cloneElement(a,Y):(0,i.jsx)("a",{...U,...Y,children:s}),(0,i.jsx)(x.Provider,{value:b,children:g})}e.r(10364);let x=(0,o.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,o.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},28089,e=>{"use strict";var t=e.i(54710);e.s(["HelpIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),(0,t.jsx)("path",{d:"M12 17h.01"})]})}])},14574,e=>{"use strict";var t=e.i(34995);e.s(["get_tracker_keyboard_shortcut_sections",0,function(){return[...(0,t.get_app_keyboard_shortcut_sections)(),{title:"Tracker",entries:[{label:"C",description:"Check in (focus description)"},{label:"O",description:"Check out"},{label:"E",description:"Edit active entry description"},{label:"N",description:"Add note to active entry"},{label:"[",description:"Previous sheet"},{label:"]",description:"Next sheet"}]}]}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(34416),a=e.i(28089),i=e.i(88680),o=e.i(34995),l=e.i(14574);function c(){let e=(0,n.usePathname)(),r=(0,s.useMemo)(()=>"/"===e?(0,l.get_tracker_keyboard_shortcut_sections)():(0,o.get_app_keyboard_shortcut_sections)(),[e]);return(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Keyboard shortcuts","aria-describedby":"keyboard-shortcuts-tooltip",children:(0,t.jsx)(a.HelpIcon,{})}),(0,t.jsx)("div",{id:"keyboard-shortcuts-tooltip",role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 w-max max-w-[min(18rem,calc(100vw-2.5rem))] pt-2 opacity-0 transition-opacity duration-150 group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-lg border border-panel-border bg-panel p-3 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Keyboard shortcuts"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(i.KeyboardShortcutsContent,{sections:r,compact:!0})})]})})]})}function u(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function d(){return u()}function f(){return"dark"}var h=e.i(35434),p=e.i(17798),_=e.i(10464),m=e.i(81553);function g(){let e="dark"===u()?"light":"dark";(0,p.apply_theme)(e),(0,m.write_stored_theme)(e),_.theme_mode_preference.write(e),_.theme_mode_preference.notify(),(0,h.notify_theme_subscribers)()}function x(){let e=(0,s.useSyncExternalStore)(h.subscribe_theme,d,f),r="dark"===e?"Dark":"Light",n="dark"===e?"Switch to light theme":"Switch to dark theme";return(0,t.jsxs)("button",{type:"button",className:"inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-panel-border bg-ghost-bg px-3 py-1.5 font-inherit text-[0.85rem] font-semibold text-inherit hover:bg-surface-hover disabled:cursor-wait disabled:opacity-60",onClick:g,"aria-label":`${r} theme. ${n}`,title:n,suppressHydrationWarning:!0,children:[(0,t.jsx)("span",{className:"text-base leading-none","aria-hidden":"true",children:"dark"===e?"☾":"☀"}),(0,t.jsx)("span",{suppressHydrationWarning:!0,children:r})]})}function b({current:e,parent:n}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"text-muted",children:n.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"font-medium text-foreground","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-5",children:[(0,t.jsx)("span",{className:"inline-flex shrink-0 items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)(b,{current:e.current,parent:e.parent}):null,(0,t.jsxs)("div",{className:"ml-auto flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/",children:"Tracker"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/reporting",children:"Reporting"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/settings/tags",children:"Manage tags"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/settings",children:"Settings"}),(0,t.jsx)(c,{}),(0,t.jsx)(x,{})]})]})})}],75404)},46549,e=>{"use strict";let t=new Set,r="Settings saved",n=null,s=r;e.s(["SETTINGS_SAVED_DEFAULT_MESSAGE",0,r,"notify_settings_saved",0,function(e=r){s=e,null!==n&&clearTimeout(n),n=setTimeout(()=>{n=null;let e=s;t.forEach(t=>{t(e)})},200)},"subscribe_settings_saved",0,function(e){return t.add(e),()=>{t.delete(e)}}])},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"m-0 flex w-full list-none flex-col gap-0.5 p-0",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:n.href,"aria-current":s?"page":void 0,className:`block rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},17446,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(46549);e.s(["SettingsSavedToast",0,function(){let[e,s]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let e=null,t=(0,n.subscribe_settings_saved)(t=>{s(t),null!==e&&clearTimeout(e),e=setTimeout(()=>{s(null),e=null},2800)});return()=>{t(),null!==e&&clearTimeout(e)}},[]),null===e)?null:(0,t.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"pointer-events-none fixed bottom-6 left-1/2 z-50 -translate-x-1/2 rounded-md border border-accent-border bg-panel px-4 py-2.5 text-[0.88rem] font-medium text-foreground shadow-md transition-[opacity,transform] duration-200",children:e||n.SETTINGS_SAVED_DEFAULT_MESSAGE})}])},7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},72550,e=>{"use strict";e.s(["ACTIVE_SHEET_COOKIE_NAME",0,"stt-active-sheet","ACTIVE_SHEET_STORAGE_KEY",0,"super-time-tracker-active-sheet","COMPACT_LISTS_STORAGE_KEY",0,"super-time-tracker-compact-lists","DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME",0,"stt-default-sheet-fixed-name","DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY",0,"super-time-tracker-default-sheet-fixed-name","DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME",0,"stt-default-sheet-session-mode","DEFAULT_SHEET_SESSION_MODE_DEFAULT",0,"last_viewed","DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY",0,"super-time-tracker-default-sheet-session-mode","SHEET_TAG_FILTERS_STORAGE_KEY",0,"super-time-tracker-sheet-tag-filters"])},65742,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLEAR_TAG_FILTERS_ON_SHEET_CHANGE_STORAGE_KEY,default_value:r.CLEAR_TAG_FILTERS_ON_SHEET_CHANGE_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["clear_tag_filters_on_sheet_change_preference",0,n])},97026,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CONFIRM_BEFORE_CHECKOUT_STORAGE_KEY,default_value:r.CONFIRM_BEFORE_CHECKOUT_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["confirm_before_checkout_preference",0,n])},36405,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CONFIRM_DESTRUCTIVE_ACTIONS_STORAGE_KEY,default_value:r.CONFIRM_DESTRUCTIVE_ACTIONS_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["confirm_destructive_actions_preference",0,n])},91653,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(65742),s=e.i(7902);e.s(["ClearTagFiltersOnSheetChangeSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.clear_tag_filters_on_sheet_change_preference.subscribe,n.clear_tag_filters_on_sheet_change_preference.get_snapshot,n.clear_tag_filters_on_sheet_change_preference.get_server_snapshot);return(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.clear_tag_filters_on_sheet_change_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Clear tag filters on sheet change"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Remove tag filters when you switch to another sheet."})]})]})}])},98295,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(97026),s=e.i(7902);e.s(["ConfirmBeforeCheckoutSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.confirm_before_checkout_preference.subscribe,n.confirm_before_checkout_preference.get_snapshot,n.confirm_before_checkout_preference.get_server_snapshot);return(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.confirm_before_checkout_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Confirm before checkout"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Show a confirmation dialog when you stop the active timer."})]})]})}])},256,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(36405),s=e.i(7902);e.s(["ConfirmDestructiveActionsSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.confirm_destructive_actions_preference.subscribe,n.confirm_destructive_actions_preference.get_snapshot,n.confirm_destructive_actions_preference.get_server_snapshot);return(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.confirm_destructive_actions_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Confirm destructive actions"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Ask before deleting entries or sheets. Turn off for fast mode."})]})]})}])},62344,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(52405),s=e.i(72550);function a(e){return"last_viewed"===e||"active_timer"===e||"fixed"===e?e:s.DEFAULT_SHEET_SESSION_MODE_DEFAULT}var i=e.i(46549);function o(e){let t=e.trim();if(0!==t.length){try{window.localStorage.setItem(s.DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY,t)}catch{}try{let e=encodeURIComponent(t);document.cookie=`${s.DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}}}let l=[{value:"last_viewed",label:"Last viewed",description:"Open the sheet you were viewing when you last used the tracker."},{value:"active_timer",label:"Sheet with active timer",description:"Open the sheet that has a running timer, when one exists."},{value:"fixed",label:"Specific sheet",description:"Always open a chosen sheet when you start a new session."}];e.s(["DefaultSheetSessionSetting",0,function({sheet_names:e}){let[c,u]=(0,r.useState)("last_viewed"),[d,f]=(0,r.useState)("");return(0,r.useEffect)(()=>{u(function(){try{let e=window.localStorage.getItem(s.DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY);return a(e)}catch{return a(null)}}());let t=function(){try{let e=window.localStorage.getItem(s.DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY)?.trim()??"";return e.length>0?e:null}catch{return null}}(),r=e[0]??"";f(t??r)},[e]),(0,t.jsxs)("fieldset",{className:"m-0 flex w-full flex-col gap-3 border-0 p-0",children:[(0,t.jsx)("legend",{className:"mb-2 text-[0.95rem] font-semibold",children:"Default sheet on new session"}),(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:l.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-start gap-2.5",children:[(0,t.jsx)("input",{type:"radio",name:"default-sheet-session-mode",className:"mt-0.5 shrink-0",checked:c===e.value,onChange:()=>(e=>{u(e);try{window.localStorage.setItem(s.DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY,e)}catch{}try{document.cookie=`${s.DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}"fixed"===e&&d.length>0&&o(d),(0,i.notify_settings_saved)()})(e.value)}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.9rem] font-semibold",children:e.label}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:e.description})]})]})},e.value))}),"fixed"===c?(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-[0.82rem] text-muted",children:["Sheet",(0,t.jsx)("select",{className:(0,n.get_input_class_name)("compact"),value:d,disabled:0===e.length,onChange:e=>{var t;f(t=e.target.value),o(t),(0,i.notify_settings_saved)()},children:e.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]}):null]})}],62344)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return i},formatWithValidation:function(){return u},urlObjectKeys:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(44066)._(e.r(78677)),l=/https?|ftp|gopher|file/;function i(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",i=e.hash||"",s=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),s&&"object"==typeof s&&(s=String(o.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||l.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),i&&"#"!==i[0]&&(i="#"+i),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${i}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return i(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(34416);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return o}});let n=e.r(31047),a=e.r(63334);function o(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return v}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let o=e.r(44066),l=e.r(54710),i=o._(e.r(34416)),s=e.r(42552),u=e.r(61717),c=e.r(37879),d=e.r(31047),f=e.r(20321);e.r(90503);let p=e.r(38520),h=e.r(19947),m=e.r(59246),b=e.r(99046);function g(t){var r,n;let a,o,g,[v,y]=(0,i.useOptimistic)(h.IDLE_LINK_STATUS),j=(0,i.useRef)(null),{href:_,as:k,children:w,prefetch:N=null,passHref:S,replace:T,shallow:E,scroll:O,onClick:R,onMouseEnter:C,onTouchStart:P,legacyBehavior:L=!1,onNavigate:M,transitionTypes:U,ref:A,unstable_dynamicOnHover:D,...I}=t;a=w,L&&("string"==typeof a||"number"==typeof a)&&(a=(0,l.jsx)("a",{children:a}));let B=i.default.useContext(u.AppRouterContext),K=!1!==N,$=!1!==N?null===(n=N)||"auto"===n?b.FetchStrategy.PPR:b.FetchStrategy.Full:b.FetchStrategy.PPR,F="string"==typeof(r=k||_)?r:(0,s.formatUrl)(r);if(L){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});o=i.default.Children.only(a)}let W=L?o&&"object"==typeof o&&o.ref:A,z=i.default.useCallback(e=>(null!==B&&(j.current=(0,h.mountLinkInstance)(e,F,B,$,K,y)),()=>{j.current&&((0,h.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,h.unmountPrefetchableInstance)(e)}),[K,F,B,$,y]),G={ref:(0,c.useMergedRef)(z,W),onClick(t){L||"function"!=typeof R||R(t),L&&o.props&&"function"==typeof o.props.onClick&&o.props.onClick(t),!B||t.defaultPrevented||function(t,r,n,a,o,l,s){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);i.default.startTransition(()=>{d(r,a?"replace":"push",!1===o?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,s)})}}(t,F,j,T,O,M,U)},onMouseEnter(e){L||"function"!=typeof C||C(e),L&&o.props&&"function"==typeof o.props.onMouseEnter&&o.props.onMouseEnter(e),B&&K&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){L||"function"!=typeof P||P(e),L&&o.props&&"function"==typeof o.props.onTouchStart&&o.props.onTouchStart(e),B&&K&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(F)?G.href=F:L&&!S&&("a"!==o.type||"href"in o.props)||(G.href=(0,f.addBasePath)(F)),g=L?i.default.cloneElement(o,G):(0,l.jsx)("a",{...I,...G,children:a}),(0,l.jsx)(x.Provider,{value:v,children:g})}e.r(10364);let x=(0,i.createContext)(h.IDLE_LINK_STATUS),v=()=>(0,i.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},28089,e=>{"use strict";var t=e.i(54710);e.s(["HelpIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),(0,t.jsx)("path",{d:"M12 17h.01"})]})}])},14574,e=>{"use strict";var t=e.i(34995);e.s(["get_tracker_keyboard_shortcut_sections",0,function(){return[...(0,t.get_app_keyboard_shortcut_sections)(),{title:"Tracker",entries:[{label:"C",description:"Check in (focus description)"},{label:"O",description:"Check out"},{label:"E",description:"Edit active entry description"},{label:"N",description:"Add note to active entry"},{label:"[",description:"Previous sheet"},{label:"]",description:"Next sheet"}]}]}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),a=e.i(34416),o=e.i(28089),l=e.i(88680),i=e.i(34995),s=e.i(14574);function u(){let e=(0,n.usePathname)(),r=(0,a.useMemo)(()=>"/"===e?(0,s.get_tracker_keyboard_shortcut_sections)():(0,i.get_app_keyboard_shortcut_sections)(),[e]);return(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Keyboard shortcuts","aria-describedby":"keyboard-shortcuts-tooltip",children:(0,t.jsx)(o.HelpIcon,{})}),(0,t.jsx)("div",{id:"keyboard-shortcuts-tooltip",role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 w-max max-w-[min(18rem,calc(100vw-2.5rem))] pt-2 opacity-0 transition-opacity duration-150 group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-lg border border-panel-border bg-panel p-3 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Keyboard shortcuts"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(l.KeyboardShortcutsContent,{sections:r,compact:!0})})]})})]})}function c(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function d(){return c()}function f(){return"dark"}var p=e.i(35434),h=e.i(17798),m=e.i(10464),b=e.i(81553);function g(){let e="dark"===c()?"light":"dark";(0,h.apply_theme)(e),(0,b.write_stored_theme)(e),m.theme_mode_preference.write(e),m.theme_mode_preference.notify(),(0,p.notify_theme_subscribers)()}function x(){let e=(0,a.useSyncExternalStore)(p.subscribe_theme,d,f),r="dark"===e?"Dark":"Light",n="dark"===e?"Switch to light theme":"Switch to dark theme";return(0,t.jsxs)("button",{type:"button",className:"inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-panel-border bg-ghost-bg px-3 py-1.5 font-inherit text-[0.85rem] font-semibold text-inherit hover:bg-surface-hover disabled:cursor-wait disabled:opacity-60",onClick:g,"aria-label":`${r} theme. ${n}`,title:n,suppressHydrationWarning:!0,children:[(0,t.jsx)("span",{className:"text-base leading-none","aria-hidden":"true",children:"dark"===e?"☾":"☀"}),(0,t.jsx)("span",{suppressHydrationWarning:!0,children:r})]})}function v({current:e,parent:n}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"text-muted",children:n.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"font-medium text-foreground","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-5",children:[(0,t.jsx)("span",{className:"inline-flex shrink-0 items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)(v,{current:e.current,parent:e.parent}):null,(0,t.jsxs)("div",{className:"ml-auto flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/",children:"Tracker"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/reporting",children:"Reporting"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/settings/tags",children:"Manage tags"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/settings",children:"Settings"}),(0,t.jsx)(u,{}),(0,t.jsx)(x,{})]})]})})}],75404)},46549,e=>{"use strict";let t=new Set,r="Settings saved",n=null,a=r;e.s(["SETTINGS_SAVED_DEFAULT_MESSAGE",0,r,"notify_settings_saved",0,function(e=r){a=e,null!==n&&clearTimeout(n),n=setTimeout(()=>{n=null;let e=a;t.forEach(t=>{t(e)})},200)},"subscribe_settings_saved",0,function(e){return t.add(e),()=>{t.delete(e)}}])},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let a=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"m-0 flex w-full list-none flex-col gap-0.5 p-0",children:a.map(n=>{let a=n.match(e);return(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:n.href,"aria-current":a?"page":void 0,className:`block rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},17446,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(46549);e.s(["SettingsSavedToast",0,function(){let[e,a]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let e=null,t=(0,n.subscribe_settings_saved)(t=>{a(t),null!==e&&clearTimeout(e),e=setTimeout(()=>{a(null),e=null},2800)});return()=>{t(),null!==e&&clearTimeout(e)}},[]),null===e)?null:(0,t.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"pointer-events-none fixed bottom-6 left-1/2 z-50 -translate-x-1/2 rounded-md border border-accent-border bg-panel px-4 py-2.5 text-[0.88rem] font-medium text-foreground shadow-md transition-[opacity,transform] duration-200",children:e||n.SETTINGS_SAVED_DEFAULT_MESSAGE})}])},6216,e=>{"use strict";var t=e.i(54710),r=e.i(71060),n=e.i(34416),a=e.i(14974),o=e.i(52663);e.s(["BackupRestoreSetting",0,function({db_path:e}){let l=(0,r.useRouter)(),{confirm:i}=(0,a.use_confirm_dialog)(),s=(0,n.useRef)(null),[u,c]=(0,n.useState)(null),[d,f]=(0,n.useState)(null),[p,h]=(0,n.useState)(!1),[m,b]=(0,n.useState)(!1),g=async()=>{h(!0),c(null),f(null);try{let e=await fetch("/api/backup");if(!e.ok){let t=await e.json();throw Error(t.error??"Download failed")}let t=await e.blob(),r=URL.createObjectURL(t),n=document.createElement("a");n.href=r,n.download="db.json",n.click(),URL.revokeObjectURL(r),f("Backup downloaded.")}catch(e){c(e instanceof Error?e.message:String(e))}finally{h(!1)}},x=async e=>{let t=e.target.files?.[0];if((e.target.value="",void 0!==t)&&await i({title:"Restore backup?",message:"This will replace your current time tracker data with the uploaded backup file. This cannot be undone.",confirmLabel:"Restore",variant:"danger"})){b(!0),c(null),f(null);try{let e,r=await t.text();try{e=JSON.parse(r)}catch{throw Error("Invalid backup file: file is not valid JSON.")}let n=await fetch("/api/backup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok){let e=await n.json();throw Error(e.error??"Restore failed")}f("Backup restored. Opening tracker…"),l.push("/"),l.refresh()}catch(e){c(e instanceof Error?e.message:String(e))}finally{b(!1)}}},v=p||m;return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Backup and restore"}),(0,t.jsx)("p",{className:"m-0 text-[0.8rem] leading-snug text-muted",children:"Download a copy of your database or replace it with a previously saved backup file."})]}),(0,t.jsx)("p",{className:"m-0 overflow-wrap-anywhere font-mono text-[0.65rem] leading-snug text-muted",title:e,children:e}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost","small"),disabled:v,onClick:()=>void g(),children:p?"Downloading…":"Download backup"}),(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("danger","small"),disabled:v,onClick:()=>{s.current?.click()},children:m?"Restoring…":"Restore from file"}),(0,t.jsx)("input",{ref:s,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>void x(e)})]}),null!==d?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-accent",children:d}):null,null!==u?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:u}):null]})}],6216)}]);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-time-tracker-ui",
3
- "version": "0.1.9",
3
+ "version": "0.1.13",
4
4
  "description": "Web UI for the super-time-tracker CLI time sheets",
5
5
  "keywords": [
6
6
  "nextjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "super-time-tracker-ui",
3
- "version": "0.1.9",
3
+ "version": "0.1.13",
4
4
  "description": "Web UI for the super-time-tracker CLI time sheets",
5
5
  "keywords": [
6
6
  "nextjs",
@@ -1,3 +0,0 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},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"))},68194,e=>{"use strict";var t=e.i(82214);e.s(["api_error_response",0,function(e,r=400){let n=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:n},{status:r})}])},72507,e=>{"use strict";var t=e.i(60526),r=e.i(50227);let n="db.json",i=r.default.join(t.default.homedir(),".super-time-tracker"),a=r.default.join(i,n);e.s(["DB_FILE_NAME",0,n,"DB_PATH",0,a,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,"main"])},72127,30853,e=>{"use strict";e.s(["convert_json_db",0,function(e){let{sheets:t,version:r,activeSheetName:n}=e;return{version:r,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:i,notes:a})=>({id:e,description:n,tags:i,notes:a.map(({timestamp:e,text:t})=>({text:t,timestamp:new Date(e)})),start:new Date(t),end:null===r?null:new Date(r)}))}))}}],72127);var t=e.i(2157);async function r(e){try{await t.promises.mkdir(e,{recursive:!0})}catch(e){if("EEXIST"!==(null!==e&&"object"==typeof e&&"code"in e&&"string"==typeof e.code?e.code:null))throw e}}e.s(["ensure_dir_exists",0,r],30853)},93361,e=>{"use strict";var t=e.i(72507);function r(e,t=[],n=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==n&&void 0===t.find(({id:e})=>e===n))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:n}}e.s(["gen_db",0,function(){return{version:t.DB_VERSION,sheets:[r(t.DEFAULT_SHEET_NAME)],activeSheetName:t.DEFAULT_SHEET_NAME}},"gen_sheet",0,r])},27440,24507,18212,e=>{"use strict";var t=e.i(50227),r=e.i(2157),n=e.i(72507),i=e.i(72127),a=e.i(30853),s=e.i(93361);let o={2:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n})=>({tags:[],notes:[],id:e,end:r,start:t,description:n}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:i})=>({notes:[],tags:i,id:e,end:r,start:t,description:n}))}))}}};function l(e){let t=e,r=!1,i=void 0===t.version?1:t.version;if(i>n.DB_VERSION||i<1)throw Error(`Unknown DB version ${t.version}, cannot load.`);for(;i<n.DB_VERSION;){let e=i+1,n=o[e];if(void 0===n)throw Error(`Missing migration from version ${i} to ${e}.`);if((t=n(t)).version!==e)throw Error(`Invalid migration output for version ${e}.`);i=e,r=!0}return{json_db:t,did_migrate:r}}async function d(e,t=n.DB_PATH){let i=JSON.stringify(e);try{await r.promises.writeFile(t,i)}catch(e){throw Error(`Failed to save DB: ${String(e)}`,{cause:e})}}async function u(e=n.DB_PATH){let o,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 d(t,e),t}let p=await r.promises.readFile(e,"utf-8");try{o=JSON.parse(p)}catch(t){throw Error(`DB at ${e} is invalid JSON: ${String(t)}`,{cause:t})}let h=l(o);o=h.json_db;let v=(0,i.convert_json_db)(o);return h.did_migrate&&await d(v,e),v}e.s(["migrate_json_db",0,l],24507),e.s(["write_db",0,d],18212),e.s(["read_db",0,u],27440)},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,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))}])},4760,95634,e=>{"use strict";var t=e.i(81207),r=e.i(72507),n=e.i(93204),i=e.i(27440);function a(e,t,r){return{id:e.id,description:e.description,start:e.start.toISOString(),end:null===e.end?null:e.end.toISOString(),tags:e.tags,notes:e.notes.map(({timestamp:e,text:t})=>({timestamp:e.toISOString(),text:t})),sheetName:t,durationMs:function(e,t=Date.now()){let{end:r,start:n}=e;return Math.max(0,(null===r?t:+r)-n)}(e),isActive:r}}var s=e.i(93361),o=e.i(18212);async function l(e){let t=await (0,i.read_db)();t.sheets.some(({name:t})=>t===e)||t.sheets.push((0,s.gen_sheet)(e)),t.activeSheetName=e,await (0,o.write_db)(t)}async function d(e){let s=await (0,i.read_db)(),o=function(e,t){let n=t?.trim()??"";if(n.length>0&&e.sheets.some(e=>e.name===n))return n;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??r.DEFAULT_SHEET_NAME}(s,e);s.activeSheetName!==o&&(await l(o),s.activeSheetName=o);let{activeSheetName:d,sheets:u}=s,c=[];null!==d&&(c=function(e,t){let r=[...e];switch(t){case"oldest":return r.sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime());case"duration":return r.sort((e,t)=>t.durationMs-e.durationMs);case"description":return r.sort((e,t)=>{let r=e.description.trim()||"Untitled entry",n=t.description.trim()||"Untitled entry";return r.localeCompare(n)});default:return r.sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime())}}(function(e){let{activeEntryID:t,entries:r,name:n}=e;return r.map(e=>a(e,n,t===e.id&&null===e.end))}((0,n.get_sheet)(s,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:n,entries:i,name:s}=r;if(null===n)return null;let o=i.find(({id:e})=>e===n);return void 0===o?null:a(o,s,null===o.end)}(s,d):null,h=function(e){let t=[];for(let r of e.sheets){let{activeEntryID:e,entries:n,name:i}=r;if(null===e)continue;let s=n.find(({id:t})=>t===e);void 0!==s&&null===s.end&&t.push(a(s,i,!0))}return t}(s),v=p??h[0]??null;return{dbPath:r.DB_PATH,activeSheetName:d,knownTags:(0,t.collect_known_tags)(s),sheets:u.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:h,activeSheetEntries:c,activeSheetTotalMs:c.reduce((e,t)=>e+t.durationMs,0)}}e.s(["set_active_sheet",0,l],95634),e.s(["get_tracker_state",0,d],4760)},6341,e=>{"use strict";e.s(["validate_entry_times",0,function(e,t){if(null!==t&&+e>=+t)throw Error("Start must be before end")}])},3763,e=>{"use strict";var t=e.i(973),r=e.i(39210),n=e.i(13132),i=e.i(14579),a=e.i(47092),s=e.i(34740),o=e.i(77667),l=e.i(11979),d=e.i(54202),u=e.i(39093),c=e.i(95106),p=e.i(57255),h=e.i(96492),v=e.i(27930),m=e.i(24131),f=e.i(93695);e.i(20216);var E=e.i(84975),_=e.i(82214),g=e.i(68194),w=e.i(93204),y=e.i(27440),x=e.i(18212);async function R(e){let{entry_id:t,sheet_name:r}=e,n=await (0,y.read_db)(),i=(0,w.get_sheet)(n,r),a=i.entries.findIndex(({id:e})=>e===t);if(-1===a)throw Error(`Entry ${t} not found in sheet ${r}`);i.activeEntryID===t&&(i.activeEntryID=null),i.entries.splice(a,1),await (0,x.write_db)(n)}function S(e){return void 0!==e&&e.trim().length>0}var N=e.i(64562),b=e.i(6341);async function D(e){let{description:t,end:r,entry_id:n,sheet_name:i,start:a}=e,s=await (0,y.read_db)(),o=(0,w.get_sheet)(s,i).entries.find(({id:e})=>e===n);if(void 0===o)throw Error(`Entry ${n} not found in sheet ${i}`);let l=!1;if(S(t)&&(o.description=t.trim(),l=!0),S(a)&&(o.start=(0,N.parse_natural_language_date)(a),l=!0),S(r)&&(o.end=(0,N.parse_natural_language_date)(r),l=!0),!l)throw Error("No changes provided");return(0,b.validate_entry_times)(o.start,o.end),await (0,x.write_db)(s),o}var A=e.i(4760);async function T(e){try{let t=await e.json(),r=t.sheetName?.trim()??"",n=t.entryId;if(0===r.length)return(0,g.api_error_response)(Error("Sheet name is required"));if(void 0===n||!Number.isFinite(n))return(0,g.api_error_response)(Error("Entry id is required"));await R({sheet_name:r,entry_id:n});let i=await (0,A.get_tracker_state)();return _.NextResponse.json(i)}catch(e){return(0,g.api_error_response)(e)}}async function I(e){try{let t=await e.json(),r=t.sheetName?.trim()??"",n=t.entryId;if(0===r.length)return(0,g.api_error_response)(Error("Sheet name is required"));if(void 0===n||!Number.isFinite(n))return(0,g.api_error_response)(Error("Entry id is required"));await D({sheet_name:r,entry_id:n,start:t.start,end:t.end,description:t.description});let i=await (0,A.get_tracker_state)();return _.NextResponse.json(i)}catch(e){return(0,g.api_error_response)(e)}}e.s(["PATCH",0,I,"POST",0,T],58581);var C=e.i(58581);let O=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/entry/route",pathname:"/api/entry",filename:"route",bundlePath:""},distDir:"next-output",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/entry/route.ts",nextConfigOutput:"standalone",userland:C,...{}}),{workAsyncStorage:q,workUnitAsyncStorage:P,serverHooks:j}=O;async function k(e,t,n){n.requestMeta&&(0,i.setRequestMeta)(e,n.requestMeta),O.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let _="/api/entry/route";_=_.replace(/\/index$/,"")||"/";let g=await O.prepare(e,t,{srcPage:_,multiZoneDraftMode:!1});if(!g)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:w,deploymentId:y,params:x,nextConfig:R,parsedUrl:S,isDraftMode:N,prerenderManifest:b,routerServerContext:D,isOnDemandRevalidate:A,revalidateOnlyGenerated:T,resolvedPathname:I,clientReferenceManifest:C,serverActionsManifest:q}=g,P=(0,o.normalizeAppPath)(_),j=!!(b.dynamicRoutes[P]||b.routes[I]),k=async()=>((null==D?void 0:D.render404)?await D.render404(e,t,S,!1):t.end("This page could not be found"),null);if(j&&!N){let e=!!b.routes[I],t=b.dynamicRoutes[P];if(t&&!1===t.fallback&&!e){if(R.adapterPath)return await k();throw new f.NoFallbackError}}let M=null;!j||O.isDev||N||(M="/index"===(M=I)?"/":M);let H=!0===O.isDev||!j,U=j&&!H;q&&C&&(0,s.setManifestsSingleton)({page:_,clientReferenceManifest:C,serverActionsManifest:q});let $=e.method||"GET",B=(0,a.getTracer)(),F=B.getActiveScopeSpan(),L=!!(null==D?void 0:D.isWrappedByNextServer),K=!!(0,i.getRequestMeta)(e,"minimalMode"),V=(0,i.getRequestMeta)(e,"incrementalCache")||await O.getIncrementalCache(e,R,b,K);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let X={params:x,previewProps:b.preview,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:H,incrementalCache:V,cacheLifeProfiles:R.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,i)=>O.onRequestError(e,t,n,i,D)},sharedContext:{buildId:w,deploymentId:y}},G=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let i,s=async e=>O.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")!==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 n=r.get("next.route");if(n){let t=`${$} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",n),i.updateName(t))}else e.updateName(`${$} ${_}`)}),o=async i=>{var a,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&A&&T&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await s(i);e.fetchMetrics=X.renderOpts.fetchMetrics;let o=X.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=X.renderOpts.collectedTags;if(!j)return await (0,p.sendResponse)(G,J,a,X.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:X.renderOpts.collectedExpire;return{value:{kind:E.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await O.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,D),t}},d=await O.handleResponse({req:e,nextConfig:R,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:b,isRoutePPREnabled:!1,isOnDemandRevalidate:A,revalidateOnlyGenerated:T,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:K});if(!j)return null;if((null==d||null==(a=d.value)?void 0:a.kind)!==E.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});K||t.setHeader("x-nextjs-cache",A?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return K&&j||u.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,v.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(G,J,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};L&&F?await o(F):(i=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(u.BaseServerSpan.handleRequest,{spanName:`${$} ${_}`,kind:a.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},o),void 0,!L))}catch(t){if(t instanceof f.NoFallbackError||await O.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:A})},!1,D),j)throw t;return await (0,p.sendResponse)(G,J,new Response(null,{status:500})),null}}e.s(["handler",0,k,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:q,workUnitAsyncStorage:P})},"routeModule",0,O,"serverHooks",0,j,"workAsyncStorage",0,q,"workUnitAsyncStorage",0,P],3763)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0d1w0cs._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},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"))},68194,e=>{"use strict";var t=e.i(82214);e.s(["api_error_response",0,function(e,r=400){let n=e instanceof Error?e.message:String(e);return t.NextResponse.json({error:n},{status:r})}])},72507,e=>{"use strict";var t=e.i(60526),r=e.i(50227);let n="db.json",i=r.default.join(t.default.homedir(),".super-time-tracker"),a=r.default.join(i,n);e.s(["DB_FILE_NAME",0,n,"DB_PATH",0,a,"DB_VERSION",0,3,"DEFAULT_SHEET_NAME",0,"main"])},93361,e=>{"use strict";var t=e.i(72507);function r(e,t=[],n=null){if(0===e.length)throw Error("New sheet name must not be empty");if(null!==n&&void 0===t.find(({id:e})=>e===n))throw Error("New sheet active entry does not exist");return{name:e,entries:t,activeEntryID:n}}e.s(["gen_db",0,function(){return{version:t.DB_VERSION,sheets:[r(t.DEFAULT_SHEET_NAME)],activeSheetName:t.DEFAULT_SHEET_NAME}},"gen_sheet",0,r])},72127,30853,e=>{"use strict";e.s(["convert_json_db",0,function(e){let{sheets:t,version:r,activeSheetName:n}=e;return{version:r,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:i,notes:a})=>({id:e,description:n,tags:i,notes:a.map(({timestamp:e,text:t})=>({text:t,timestamp:new Date(e)})),start:new Date(t),end:null===r?null:new Date(r)}))}))}}],72127);var t=e.i(2157);async function r(e){try{await t.promises.mkdir(e,{recursive:!0})}catch(e){if("EEXIST"!==(null!==e&&"object"==typeof e&&"code"in e&&"string"==typeof e.code?e.code:null))throw e}}e.s(["ensure_dir_exists",0,r],30853)},27440,24507,18212,e=>{"use strict";var t=e.i(50227),r=e.i(2157),n=e.i(72507),i=e.i(72127),a=e.i(30853),s=e.i(93361);let o={2:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(1!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 2.`);return{version:2,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n})=>({tags:[],notes:[],id:e,end:r,start:t,description:n}))}))}},3:function(e){let{sheets:t,version:r,activeSheetName:n}=e;if(2!==r&&void 0!==r)throw Error(`DB is version ${r}, cannot migrate to version 3.`);return{version:3,activeSheetName:n,sheets:t.map(({name:e,entries:t,activeEntryID:r})=>({name:e,activeEntryID:r,entries:t.map(({id:e,start:t,end:r,description:n,tags:i})=>({notes:[],tags:i,id:e,end:r,start:t,description:n}))}))}}};function l(e){let t=e,r=!1,i=void 0===t.version?1:t.version;if(i>n.DB_VERSION||i<1)throw Error(`Unknown DB version ${t.version}, cannot load.`);for(;i<n.DB_VERSION;){let e=i+1,n=o[e];if(void 0===n)throw Error(`Missing migration from version ${i} to ${e}.`);if((t=n(t)).version!==e)throw Error(`Invalid migration output for version ${e}.`);i=e,r=!0}return{json_db:t,did_migrate:r}}async function d(e,t=n.DB_PATH){let i=JSON.stringify(e);try{await r.promises.writeFile(t,i)}catch(e){throw Error(`Failed to save DB: ${String(e)}`,{cause:e})}}async function u(e=n.DB_PATH){let o,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 d(t,e),t}let p=await r.promises.readFile(e,"utf-8");try{o=JSON.parse(p)}catch(t){throw Error(`DB at ${e} is invalid JSON: ${String(t)}`,{cause:t})}let h=l(o);o=h.json_db;let v=(0,i.convert_json_db)(o);return h.did_migrate&&await d(v,e),v}e.s(["migrate_json_db",0,l],24507),e.s(["write_db",0,d],18212),e.s(["read_db",0,u],27440)},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,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))}])},4760,95634,e=>{"use strict";var t=e.i(81207),r=e.i(72507),n=e.i(93204),i=e.i(27440);function a(e,t,r){return{id:e.id,description:e.description,start:e.start.toISOString(),end:null===e.end?null:e.end.toISOString(),tags:e.tags,notes:e.notes.map(({timestamp:e,text:t})=>({timestamp:e.toISOString(),text:t})),sheetName:t,durationMs:function(e,t=Date.now()){let{end:r,start:n}=e;return Math.max(0,(null===r?t:+r)-n)}(e),isActive:r}}var s=e.i(93361),o=e.i(18212);async function l(e){let t=await (0,i.read_db)();t.sheets.some(({name:t})=>t===e)||t.sheets.push((0,s.gen_sheet)(e)),t.activeSheetName=e,await (0,o.write_db)(t)}async function d(e){let s=await (0,i.read_db)(),o=function(e,t){let n=t?.trim()??"";if(n.length>0&&e.sheets.some(e=>e.name===n))return n;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??r.DEFAULT_SHEET_NAME}(s,e);s.activeSheetName!==o&&(await l(o),s.activeSheetName=o);let{activeSheetName:d,sheets:u}=s,c=[];null!==d&&(c=function(e,t){let r=[...e];switch(t){case"oldest":return r.sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime());case"duration":return r.sort((e,t)=>t.durationMs-e.durationMs);case"description":return r.sort((e,t)=>{let r=e.description.trim()||"Untitled entry",n=t.description.trim()||"Untitled entry";return r.localeCompare(n)});default:return r.sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime())}}(function(e){let{activeEntryID:t,entries:r,name:n}=e;return r.map(e=>a(e,n,t===e.id&&null===e.end))}((0,n.get_sheet)(s,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:n,entries:i,name:s}=r;if(null===n)return null;let o=i.find(({id:e})=>e===n);return void 0===o?null:a(o,s,null===o.end)}(s,d):null,h=function(e){let t=[];for(let r of e.sheets){let{activeEntryID:e,entries:n,name:i}=r;if(null===e)continue;let s=n.find(({id:t})=>t===e);void 0!==s&&null===s.end&&t.push(a(s,i,!0))}return t}(s),v=p??h[0]??null;return{dbPath:r.DB_PATH,activeSheetName:d,knownTags:(0,t.collect_known_tags)(s),sheets:u.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:h,activeSheetEntries:c,activeSheetTotalMs:c.reduce((e,t)=>e+t.durationMs,0)}}e.s(["set_active_sheet",0,l],95634),e.s(["get_tracker_state",0,d],4760)},24087,e=>{"use strict";var t=e.i(973),r=e.i(39210),n=e.i(13132),i=e.i(14579),a=e.i(47092),s=e.i(34740),o=e.i(77667),l=e.i(11979),d=e.i(54202),u=e.i(39093),c=e.i(95106),p=e.i(57255),h=e.i(96492),v=e.i(27930),m=e.i(24131),f=e.i(93695);e.i(20216);var g=e.i(84975),E=e.i(82214),w=e.i(68194),_=e.i(93361),x=e.i(93204),y=e.i(64562),R=e.i(27440),S=e.i(18212);async function N(e){var t,r;let n,{at:i,description:a,note:s,sheet_name:o}=e,l=await (0,R.read_db)(),d=l.activeSheetName,u=void 0===o||0===o.length?d:o;if(null===u)throw Error("No active sheet");let c=l.sheets.some(({name:e})=>e===u)?(0,x.get_sheet)(l,u):(t=l,r=u,n=(0,_.gen_sheet)(r),t.sheets.push(n),n);if(null!==c.activeEntryID){let e=c.entries.find(({id:e})=>e===c.activeEntryID);if(void 0!==e)throw Error(`An entry is already active (${e.id}): ${e.description}`);c.activeEntryID=null}let p=void 0===i||0===i.trim().length?new Date:(0,y.parse_natural_language_date)(i),h=c.entries.length,v={id:h,tags:a.match(/@\w+/g)??[],notes:[],description:a.split(/@\w+/).join(" ").trim(),start:p??new Date,end:(void 0)??null},m={...v,description:v.description.length>0?v.description:a.trim()};return void 0!==s&&s.length>0&&m.notes.push({timestamp:new Date,text:s}),c.entries.push(m),c.activeEntryID=h,l.activeSheetName=c.name,await (0,S.write_db)(l),m}var D=e.i(4760);async function A(e){try{let t=await e.json(),r=t.description?.trim()??"";if(0===r.length)return(0,w.api_error_response)(Error("Description is required"));await N({description:r,sheet_name:t.sheetName,note:t.note,at:t.at});let n=await (0,D.get_tracker_state)();return E.NextResponse.json(n)}catch(e){return(0,w.api_error_response)(e)}}e.s(["POST",0,A],18532);var b=e.i(18532);let T=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/in/route",pathname:"/api/in",filename:"route",bundlePath:""},distDir:"next-output",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/in/route.ts",nextConfigOutput:"standalone",userland:b,...{}}),{workAsyncStorage:I,workUnitAsyncStorage:C,serverHooks:O}=T;async function P(e,t,n){n.requestMeta&&(0,i.setRequestMeta)(e,n.requestMeta),T.isDev&&(0,i.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let E="/api/in/route";E=E.replace(/\/index$/,"")||"/";let w=await T.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:_,deploymentId:x,params:y,nextConfig:R,parsedUrl:S,isDraftMode:N,prerenderManifest:D,routerServerContext:A,isOnDemandRevalidate:b,revalidateOnlyGenerated:I,resolvedPathname:C,clientReferenceManifest:O,serverActionsManifest:P}=w,j=(0,o.normalizeAppPath)(E),k=!!(D.dynamicRoutes[j]||D.routes[C]),q=async()=>((null==A?void 0:A.render404)?await A.render404(e,t,S,!1):t.end("This page could not be found"),null);if(k&&!N){let e=!!D.routes[C],t=D.dynamicRoutes[j];if(t&&!1===t.fallback&&!e){if(R.adapterPath)return await q();throw new f.NoFallbackError}}let M=null;!k||T.isDev||N||(M="/index"===(M=C)?"/":M);let H=!0===T.isDev||!k,U=k&&!H;P&&O&&(0,s.setManifestsSingleton)({page:E,clientReferenceManifest:O,serverActionsManifest:P});let $=e.method||"GET",B=(0,a.getTracer)(),F=B.getActiveScopeSpan(),L=!!(null==A?void 0:A.isWrappedByNextServer),K=!!(0,i.getRequestMeta)(e,"minimalMode"),V=(0,i.getRequestMeta)(e,"incrementalCache")||await T.getIncrementalCache(e,R,D,K);null==V||V.resetRequestCache(),globalThis.__incrementalCache=V;let X={params:y,previewProps:D.preview,renderOpts:{experimental:{authInterrupts:!!R.experimental.authInterrupts},cacheComponents:!!R.cacheComponents,supportsDynamicResponse:H,incrementalCache:V,cacheLifeProfiles:R.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n,i)=>T.onRequestError(e,t,n,i,A)},sharedContext:{buildId:_,deploymentId:x}},G=new l.NodeNextRequest(e),J=new l.NodeNextResponse(t),W=d.NextRequestAdapter.fromNodeNextRequest(G,(0,d.signalFromNodeResponse)(t));try{let i,s=async e=>T.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")!==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 n=r.get("next.route");if(n){let t=`${$} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t),i&&i!==e&&(i.setAttribute("http.route",n),i.updateName(t))}else e.updateName(`${$} ${E}`)}),o=async i=>{var a,o;let l=async({previousCacheEntry:r})=>{try{if(!K&&b&&I&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let a=await s(i);e.fetchMetrics=X.renderOpts.fetchMetrics;let o=X.renderOpts.pendingWaitUntil;o&&n.waitUntil&&(n.waitUntil(o),o=void 0);let l=X.renderOpts.collectedTags;if(!k)return await (0,p.sendResponse)(G,J,a,X.renderOpts.pendingWaitUntil),null;{let e=await a.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(a.headers);l&&(t[m.NEXT_CACHE_TAGS_HEADER]=l),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==X.renderOpts.collectedRevalidate&&!(X.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&X.renderOpts.collectedRevalidate,n=void 0===X.renderOpts.collectedExpire||X.renderOpts.collectedExpire>=m.INFINITE_CACHE?void 0:X.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:a.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await T.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:b})},!1,A),t}},d=await T.handleResponse({req:e,nextConfig:R,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:D,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:I,responseGenerator:l,waitUntil:n.waitUntil,isMinimalMode:K});if(!k)return null;if((null==d||null==(a=d.value)?void 0:a.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});K||t.setHeader("x-nextjs-cache",b?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return K&&k||u.delete(m.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,v.getCacheControlHeader)(d.cacheControl)),await (0,p.sendResponse)(G,J,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};L&&F?await o(F):(i=B.getActiveScopeSpan(),await B.withPropagatedContext(e.headers,()=>B.trace(u.BaseServerSpan.handleRequest,{spanName:`${$} ${E}`,kind:a.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},o),void 0,!L))}catch(t){if(t instanceof f.NoFallbackError||await T.onRequestError(e,t,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:b})},!1,A),k)throw t;return await (0,p.sendResponse)(G,J,new Response(null,{status:500})),null}}e.s(["handler",0,P,"patchFetch",0,function(){return(0,n.patchFetch)({workAsyncStorage:I,workUnitAsyncStorage:C})},"routeModule",0,T,"serverHooks",0,O,"workAsyncStorage",0,I,"workUnitAsyncStorage",0,C],24087)}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0qmw9wb._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[69749,a=>{"use strict";a.s(["get_input_class_name",0,function(a="default"){let b="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===a?`${b} px-2.5 py-2`:b}])},19702,a=>{"use strict";a.s(["COMPACT_LISTS_STORAGE_KEY",0,"super-time-tracker-compact-lists","DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME",0,"stt-default-sheet-fixed-name","DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY",0,"super-time-tracker-default-sheet-fixed-name","DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME",0,"stt-default-sheet-session-mode","DEFAULT_SHEET_SESSION_MODE_DEFAULT",0,"last_viewed","DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY",0,"super-time-tracker-default-sheet-session-mode","SHEET_TAG_FILTERS_STORAGE_KEY",0,"super-time-tracker-sheet-tag-filters"])},40947,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CONFIRM_BEFORE_CHECKOUT_STORAGE_KEY,default_value:c.CONFIRM_BEFORE_CHECKOUT_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["confirm_before_checkout_preference",0,d])},32297,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CONFIRM_DESTRUCTIVE_ACTIONS_STORAGE_KEY,default_value:c.CONFIRM_DESTRUCTIVE_ACTIONS_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["confirm_destructive_actions_preference",0,d])},35822,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CLEAR_TAG_FILTERS_ON_SHEET_CHANGE_STORAGE_KEY,default_value:c.CLEAR_TAG_FILTERS_ON_SHEET_CHANGE_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["clear_tag_filters_on_sheet_change_preference",0,d])},24047,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.DURATION_FORMAT_STORAGE_KEY,default_value:c.DURATION_FORMAT_DEFAULT,is_valid:a=>"humanized"===a||"clock"===a||"decimal"===a});a.s(["duration_format_preference",0,d])},14244,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CHECK_IN_FORM_COLLAPSED_STORAGE_KEY,default_value:c.CHECK_IN_FORM_COLLAPSED_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["check_in_form_collapsed_preference",0,d])},78702,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.TAG_FILTER_MODE_STORAGE_KEY,default_value:c.TAG_FILTER_MODE_DEFAULT,is_valid:a=>"all"===a||"any"===a});a.s(["tag_filter_mode_preference",0,d])},50825,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.TIME_FORMAT_STORAGE_KEY,default_value:c.TIME_FORMAT_DEFAULT,is_valid:a=>"12h"===a||"24h"===a});a.s(["time_format_preference",0,d])},99751,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.TIMER_SHOW_SECONDS_STORAGE_KEY,default_value:c.TIMER_SHOW_SECONDS_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["timer_show_seconds_preference",0,d])},6128,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.TIMER_IN_TITLE_STORAGE_KEY,default_value:c.TIMER_IN_TITLE_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["timer_in_title_preference",0,d])},79918,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.ENTRY_LIST_SORT_STORAGE_KEY,default_value:c.ENTRY_LIST_SORT_DEFAULT,is_valid:a=>"newest"===a||"oldest"===a||"duration"===a||"description"===a});a.s(["entry_list_sort_preference",0,d])},30354,48174,a=>{"use strict";var b=a.i(39752),c=a.i(34542);function d(a){return a.startsWith("@")?a:`@${a}`}a.s(["format_display_tag",0,d],48174);var e=a.i(69749);a.s(["TagAutocompleteInput",0,function({id:a,value:f,known_tags:g,placeholder:h,disabled:i=!1,autoFocus:j=!1,on_change:k}){let l=(0,c.useRef)(null),m=(0,c.useRef)(null),n=(0,c.useRef)(null),[o,p]=(0,c.useState)(0),[q,r]=(0,c.useState)(0),s=function(a,b){let c=a.slice(0,b),d=c.lastIndexOf("@");if(-1===d)return null;let e=c.slice(d+1);return/\s/.test(e)?null:{query:e,start_index:d,end_index:b}}(f,o),t=null===s?[]:function(a,b,c=10){let d=b.toLowerCase();return a.filter(a=>{let b=a.replace(/^@/,"").toLowerCase();return 0===d.length||b.startsWith(d)}).slice(0,c)}(g,s.query),u=null!==s&&t.length>0&&!i;(0,c.useLayoutEffect)(()=>{null!==n.current&&null!==l.current&&(l.current.setSelectionRange(n.current,n.current),p(n.current),n.current=null)},[f]),(0,c.useEffect)(()=>{r(0)},[f,o,t.length]);let v=()=>{p(l.current?.selectionStart??f.length)},w=()=>{r(0)},x=a=>{let b,c,e;if(null===s)return;let{next_text:g,next_cursor:h}=(b=d(a),c=f.slice(0,s.start_index),e=f.slice(s.end_index),{next_text:`${c}${b}${e}`,next_cursor:c.length+b.length});n.current=h,k(g),w()};return(0,b.jsxs)("div",{className:"relative min-w-0",children:[(0,b.jsx)("input",{ref:l,id:a,type:"text",className:(0,e.get_input_class_name)(),value:f,placeholder:h,disabled:i,autoFocus:j,autoComplete:"off","aria-autocomplete":"list","aria-expanded":u,"aria-controls":u?`${a}-tag-suggestions`:void 0,onChange:a=>{k(a.target.value),p(a.target.selectionStart??a.target.value.length)},onClick:v,onKeyUp:v,onKeyDown:a=>{if(u){if("ArrowDown"===a.key){a.preventDefault(),r(a=>(a+1)%t.length);return}if("ArrowUp"===a.key){a.preventDefault(),r(a=>(a-1+t.length)%t.length);return}if("Enter"===a.key||"Tab"===a.key){a.preventDefault();let b=t[q];void 0!==b&&x(b);return}"Escape"===a.key&&(a.preventDefault(),w())}},onBlur:()=>{window.setTimeout(w,120)}}),u?(0,b.jsx)("ul",{ref:m,id:`${a}-tag-suggestions`,role:"listbox",className:"absolute left-0 right-0 top-full z-20 mt-1 max-h-48 list-none overflow-y-auto rounded-md border border-panel-border bg-panel p-1.5 shadow-md",children:t.map((a,c)=>(0,b.jsx)("li",{role:"option","aria-selected":c===q,children:(0,b.jsx)("button",{type:"button",className:`block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover ${c===q?"bg-surface-hover":""}`,onMouseDown:b=>{b.preventDefault(),x(a)},children:d(a)})},a))}):null]})}],30354)}];
2
-
3
- //# sourceMappingURL=_07raa2f._.js.map
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return u},urlObjectKeys:function(){return s}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(44066)._(e.r(78677)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",l=e.hash||"",s=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),s&&"object"==typeof s&&(s=String(a.urlQueryToSearchParams(s)));let c=e.search||s&&`?${s}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==u?(u="//"+(u||""),o&&"/"!==o[0]&&(o="/"+o)):u||(u=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${o}${c}${l}`}let s=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return l(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=e.r(34416);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=a(e,n)),t&&(o.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(31047),o=e.r(63334);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return _},useLinkStatus:function(){return x}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let a=e.r(44066),i=e.r(54710),l=a._(e.r(34416)),s=e.r(42552),u=e.r(61717),c=e.r(37879),d=e.r(31047),f=e.r(20321);e.r(90503);let p=e.r(38520),h=e.r(19947),m=e.r(59246),b=e.r(99046);function _(t){var r,n;let o,a,_,[x,v]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),y=(0,l.useRef)(null),{href:j,as:k,children:T,prefetch:E=null,passHref:N,replace:R,shallow:O,scroll:w,onClick:S,onMouseEnter:A,onTouchStart:P,legacyBehavior:C=!1,onNavigate:L,transitionTypes:U,ref:M,unstable_dynamicOnHover:D,...I}=t;o=T,C&&("string"==typeof o||"number"==typeof o)&&(o=(0,i.jsx)("a",{children:o}));let K=l.default.useContext(u.AppRouterContext),F=!1!==E,$=!1!==E?null===(n=E)||"auto"===n?b.FetchStrategy.PPR:b.FetchStrategy.Full:b.FetchStrategy.PPR,B="string"==typeof(r=k||j)?r:(0,s.formatUrl)(r);if(C){if(o?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=l.default.Children.only(o)}let G=C?a&&"object"==typeof a&&a.ref:M,W=l.default.useCallback(e=>(null!==K&&(y.current=(0,h.mountLinkInstance)(e,B,K,$,F,v)),()=>{y.current&&((0,h.unmountLinkForCurrentNavigation)(y.current),y.current=null),(0,h.unmountPrefetchableInstance)(e)}),[F,B,K,$,v]),z={ref:(0,c.useMergedRef)(W,G),onClick(t){C||"function"!=typeof S||S(t),C&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!K||t.defaultPrevented||function(t,r,n,o,a,i,s){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){o&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);l.default.startTransition(()=>{d(r,o?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,s)})}}(t,B,y,R,w,L,U)},onMouseEnter(e){C||"function"!=typeof A||A(e),C&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),K&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){C||"function"!=typeof P||P(e),C&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),K&&F&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(B)?z.href=B:C&&!N&&("a"!==a.type||"href"in a.props)||(z.href=(0,f.addBasePath)(B)),_=C?l.default.cloneElement(a,z):(0,i.jsx)("a",{...I,...z,children:o}),(0,i.jsx)(g.Provider,{value:x,children:_})}e.r(10364);let g=(0,l.createContext)(h.IDLE_LINK_STATUS),x=()=>(0,l.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},28089,e=>{"use strict";var t=e.i(54710);e.s(["HelpIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),(0,t.jsx)("path",{d:"M12 17h.01"})]})}])},14574,e=>{"use strict";var t=e.i(34995);e.s(["get_tracker_keyboard_shortcut_sections",0,function(){return[...(0,t.get_app_keyboard_shortcut_sections)(),{title:"Tracker",entries:[{label:"C",description:"Check in (focus description)"},{label:"O",description:"Check out"},{label:"E",description:"Edit active entry"},{label:"N",description:"Add note to active entry"},{label:"[",description:"Previous sheet"},{label:"]",description:"Next sheet"}]}]}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),o=e.i(34416),a=e.i(28089),i=e.i(88680),l=e.i(34995),s=e.i(14574);function u(){let e=(0,n.usePathname)(),r=(0,o.useMemo)(()=>"/"===e?(0,s.get_tracker_keyboard_shortcut_sections)():(0,l.get_app_keyboard_shortcut_sections)(),[e]);return(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Keyboard shortcuts","aria-describedby":"keyboard-shortcuts-tooltip",children:(0,t.jsx)(a.HelpIcon,{})}),(0,t.jsx)("div",{id:"keyboard-shortcuts-tooltip",role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 w-max max-w-[min(18rem,calc(100vw-2.5rem))] pt-2 opacity-0 transition-opacity duration-150 group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-lg border border-panel-border bg-panel p-3 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Keyboard shortcuts"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(i.KeyboardShortcutsContent,{sections:r,compact:!0})})]})})]})}function c(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function d(){return c()}function f(){return"dark"}var p=e.i(35434),h=e.i(17798),m=e.i(10464),b=e.i(81553);function _(){let e="dark"===c()?"light":"dark";(0,h.apply_theme)(e),(0,b.write_stored_theme)(e),m.theme_mode_preference.write(e),m.theme_mode_preference.notify(),(0,p.notify_theme_subscribers)()}function g(){let e=(0,o.useSyncExternalStore)(p.subscribe_theme,d,f),r="dark"===e?"Dark":"Light",n="dark"===e?"Switch to light theme":"Switch to dark theme";return(0,t.jsxs)("button",{type:"button",className:"inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-panel-border bg-ghost-bg px-3 py-1.5 font-inherit text-[0.85rem] font-semibold text-inherit hover:bg-surface-hover disabled:cursor-wait disabled:opacity-60",onClick:_,"aria-label":`${r} theme. ${n}`,title:n,suppressHydrationWarning:!0,children:[(0,t.jsx)("span",{className:"text-base leading-none","aria-hidden":"true",children:"dark"===e?"☾":"☀"}),(0,t.jsx)("span",{suppressHydrationWarning:!0,children:r})]})}function x({current:e,parent:n}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"text-muted",children:n.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"font-medium text-foreground","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-5",children:[(0,t.jsx)("span",{className:"inline-flex shrink-0 items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)(x,{current:e.current,parent:e.parent}):null,(0,t.jsxs)("div",{className:"ml-auto flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/",children:"Tracker"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/reporting",children:"Reporting"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/settings/tags",children:"Manage tags"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/settings",children:"Settings"}),(0,t.jsx)(u,{}),(0,t.jsx)(g,{})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},8492,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DURATION_FORMAT_STORAGE_KEY,default_value:r.DURATION_FORMAT_DEFAULT,is_valid:e=>"humanized"===e||"clock"===e||"decimal"===e});e.s(["duration_format_preference",0,n])},57853,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.WEEK_STARTS_ON_STORAGE_KEY,default_value:r.WEEK_STARTS_ON_DEFAULT,is_valid:e=>"monday"===e||"sunday"===e});e.s(["week_starts_on_preference",0,n])},1997,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DEFAULT_REPORTING_SORT_STORAGE_KEY,default_value:r.DEFAULT_REPORTING_SORT_DEFAULT,is_valid:e=>"duration"===e||"name"===e||"entry_count"===e||"active_first"===e});e.s(["default_reporting_sort_preference",0,n])},68462,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DEFAULT_REPORTING_RANGE_STORAGE_KEY,default_value:r.DEFAULT_REPORTING_RANGE_DEFAULT,is_valid:e=>"none"===e||"today"===e||"week"===e});e.s(["default_reporting_range_preference",0,n])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22482,e=>{"use strict";var t=e.i(54710),n=e.i(34416),r=e.i(14260),a=e.i(52663),s=e.i(52405);function l({known_tags:e,on_submit:i,is_pending:o}){let[c,d]=(0,n.useState)(""),[m,u]=(0,n.useState)("");return(0,t.jsxs)("form",{className:"flex flex-col gap-2 rounded-lg border border-panel-border bg-panel p-[1.1rem] shadow-sm",onSubmit:e=>{e.preventDefault();let t=c.trim();if(0===t.length)return;let n=m.trim();i({description:t,...n.length>0?{at:n}:{}}),d(""),u("")},children:[(0,t.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-description",children:"What are you working on?"}),(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 max-[860px]:grid-cols-1",children:[(0,t.jsx)(r.TagAutocompleteInput,{id:"check-in-description",value:c,known_tags:e,placeholder:"e.g. crafting something @design",disabled:o,autoFocus:!0,on_change:d}),(0,t.jsx)("button",{type:"submit",className:(0,a.get_button_class_name)("primary"),disabled:o||0===c.trim().length,children:"Check in"})]}),(0,t.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-at",children:["Start time"," ",(0,t.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,t.jsx)("input",{id:"check-in-at",className:(0,s.get_input_class_name)(),value:m,onChange:e=>u(e.target.value),placeholder:"e.g. 30 minutes ago",disabled:o})]})}var i=e.i(50994);let o=(0,n.forwardRef)(function({known_tags:e,is_pending:r,on_submit:s},o){let c="true"===(0,n.useSyncExternalStore)(i.check_in_form_collapsed_preference.subscribe,i.check_in_form_collapsed_preference.get_snapshot,i.check_in_form_collapsed_preference.get_server_snapshot),[d,m]=(0,n.useState)(!c);return((0,n.useImperativeHandle)(o,()=>({expand_and_focus:()=>{m(!0),window.requestAnimationFrame(()=>{let e=document.getElementById("check-in-description");e instanceof HTMLElement&&e.focus()})}}),[]),c&&!d)?(0,t.jsx)("button",{type:"button",className:`${(0,a.get_button_class_name)("primary")} self-start`,disabled:r,onClick:()=>m(!0),children:"Check in"}):(0,t.jsx)(l,{known_tags:e,is_pending:r,on_submit:e=>{s(e),c&&m(!1)}})});var c=e.i(83391);function d(e,t,n){if(0===e.length)return null;let r=e.findIndex(e=>e.name===t),a=((-1===r?0:r)+("next"===n?1:-1)+e.length)%e.length;return e[a]?.name??null}var m=e.i(14574),u=e.i(14974),p=e.i(97026);function h(e){let{confirm:t}=(0,u.use_confirm_dialog)(),r="true"===(0,n.useSyncExternalStore)(p.confirm_before_checkout_preference.subscribe,p.confirm_before_checkout_preference.get_snapshot,p.confirm_before_checkout_preference.get_server_snapshot);return(0,n.useCallback)(async n=>{if(r){let e;if(!await t({title:"Check out?",message:(e=n?.trim()??"").length>0?`Stop the timer and check out at "${e}"?`:"Stop the active timer and save this entry?",confirmLabel:"Check out",variant:"danger"}))return}e(n)},[t,r,e])}var x=e.i(99211);function f({sheets:e,active_sheet_name:r,active_entry:a,is_pending:s,check_in_form_ref:l,active_entry_panel_ref:i,on_select_sheet:o,on_check_out:u}){let[p,g]=(0,n.useState)(!1),b=h(u),_=(0,n.useMemo)(()=>{let t=null!==a;return[{id:"help",label:"?",description:"Show keyboard shortcuts",key:"?",modifiers:["shift"],action:()=>{g(e=>!e)}},{id:"check-in",label:"C",description:"Check in (focus description)",key:"c",is_available:()=>!s&&!t,action:()=>{l.current?.expand_and_focus()}},{id:"check-out",label:"O",description:"Check out",key:"o",is_available:()=>!s&&t,action:()=>{b()}},{id:"edit-entry",label:"E",description:"Edit active entry",key:"e",is_available:()=>!s&&t,action:()=>{i.current?.start_edit()}},{id:"add-note",label:"N",description:"Add note to active entry",key:"n",is_available:()=>!s&&t,action:()=>{i.current?.start_add_note()}},{id:"previous-sheet",label:"[",description:"Previous sheet",key:"[",is_available:()=>!s&&e.length>1,action:()=>{let t=d(e,r,"previous");null!==t&&t!==r&&o(t)}},{id:"next-sheet",label:"]",description:"Next sheet",key:"]",is_available:()=>!s&&e.length>1,action:()=>{let t=d(e,r,"next");null!==t&&t!==r&&o(t)}}]},[a,i,r,l,b,s,o,e]);return((0,x.use_document_keyboard_shortcuts)(_),p)?(0,t.jsx)(c.KeyboardShortcutsDialog,{sections:(0,m.get_tracker_keyboard_shortcut_sections)(),on_close:()=>g(!1)}):null}var g=e.i(18774);function b(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}`}var _=e.i(72550);function v(){try{let e=window.localStorage.getItem(_.SHEET_TAG_FILTERS_STORAGE_KEY);if(null===e)return{};let t=JSON.parse(e);if(null===t||"object"!=typeof t)return{};return t}catch{return{}}}function j(e){let t=v()[e]??[],n=[],r=new Set;for(let e of t)try{let t=b(e);r.has(t)||(r.add(t),n.push(t))}catch{continue}return n}let y=[],w=null;function N(e){var t=j(e);let n=t.join("\0");if(null!==w&&w.sheet_name===e&&w.tags_key===n)return w.snapshot;let r=0===t.length?y:Object.freeze([...t]);return w={sheet_name:e,tags_key:n,snapshot:r},r}function k(){return y}let S=new Set;function E(e){return S.add(e),()=>{S.delete(e)}}function C(e,t){let n=v();0===t.length?delete n[e]:n[e]=t;try{window.localStorage.setItem(_.SHEET_TAG_FILTERS_STORAGE_KEY,JSON.stringify(n))}catch{}w=null,S.forEach(e=>{e()})}function $(e,t){try{return b(e)===b(t)}catch{return!1}}var T=e.i(62796);function A(){return(0,n.useSyncExternalStore)(T.tag_filter_mode_preference.subscribe,T.tag_filter_mode_preference.get_snapshot,T.tag_filter_mode_preference.get_server_snapshot)}function D({sheet_name:e,sheet_tags:r}){let s=A(),l=(0,n.useSyncExternalStore)(E,()=>N(e),k);if((0,n.useEffect)(()=>{!function(e,t){let n=j(e);if(0===n.length)return;let r=n.filter(e=>t.some(t=>$(e,t)));r.length!==n.length&&C(e,r)}(e,r.map(e=>e.name))},[e,r]),0===r.length)return null;let i=l.length>0;return(0,t.jsxs)("fieldset",{className:"m-0 rounded-lg border border-panel-border bg-panel p-3.5 shadow-sm compact:p-3",children:[(0,t.jsx)("legend",{className:"px-0.5 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Filter by tag"}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",children:[(0,t.jsx)("p",{className:"m-0 shrink-0 text-[0.8rem] leading-snug text-muted",children:"any"===s?"Show entries that include any selected tag.":"Show entries that include every selected tag."}),(0,t.jsx)("div",{className:"flex min-w-0 flex-1 flex-wrap justify-end gap-1.5",role:"group","aria-label":"Filter by tag",children:r.map(n=>{let r=l.some(e=>$(e,n.name));return(0,t.jsxs)("button",{type:"button",className:`${(0,a.get_button_class_name)("ghost","small")} ${r?"border-accent-border bg-accent-soft text-foreground":""}`,"aria-pressed":r,onClick:()=>{let t,r;return t=b(n.name),void((r=j(e)).some(e=>$(e,t))?C(e,r.filter(e=>!$(e,t))):C(e,[...r,t]))},children:[(0,g.format_display_tag)(n.name),(0,t.jsxs)("span",{className:"ml-1 font-normal text-muted",children:["(",n.entryCount,")"]})]},n.name)})})]}),i?(0,t.jsx)("button",{type:"button",className:`${(0,a.get_button_class_name)("ghost","small")} mt-2.5`,onClick:()=>C(e,[]),children:"Clear filter"}):null]})}let M="inline-flex shrink-0 cursor-pointer items-center gap-1.5";function I({checked:e,disabled:r=!1,indeterminate:a=!1,nested:s=!1,on_change:l,label:i,aria_label:o,className:c}){let d=(0,n.useRef)(null);(0,n.useEffect)(()=>{null!==d.current&&(d.current.indeterminate=a)},[a]);let m=void 0===c?M:`${M} ${c}`,u=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{ref:d,type:"checkbox",className:"peer absolute m-0 h-px w-px overflow-hidden opacity-0",checked:e,disabled:r,"aria-label":s&&void 0===i?o:void 0,onChange:l}),(0,t.jsx)("span",{className:'relative block h-[0.85rem] w-[0.85rem] shrink-0 rounded-[0.2rem] border border-panel-border bg-input-bg box-border transition-[background-color,border-color] duration-150 peer-checked:border-accent peer-checked:bg-accent peer-indeterminate:border-accent peer-indeterminate:bg-accent peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-input-focus-border peer-focus-visible:outline-offset-1 peer-disabled:cursor-not-allowed peer-disabled:opacity-55 after:absolute after:left-1/2 after:top-[44%] after:hidden after:h-[0.28rem] after:w-[0.45rem] after:-translate-x-1/2 after:-translate-y-[60%] after:rotate-[-45deg] after:border-b-[1.5px] after:border-l-[1.5px] after:border-accent-text-on after:content-[""] peer-checked:after:block peer-indeterminate:after:top-1/2 peer-indeterminate:after:block peer-indeterminate:after:h-[1.5px] peer-indeterminate:after:w-[0.45rem] peer-indeterminate:after:-translate-x-1/2 peer-indeterminate:after:-translate-y-1/2 peer-indeterminate:after:rotate-0 peer-indeterminate:after:border-0 peer-indeterminate:after:bg-accent-text-on',"aria-hidden":"true"})]});return s?(0,t.jsx)("span",{className:m,children:u}):(0,t.jsxs)("label",{className:m,children:[u,void 0!==i?(0,t.jsx)("span",{className:"select-none text-[0.8rem] leading-tight text-muted",children:i}):null]})}function R(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}var L=e.i(72074);function F(e,t=!0){let r=(0,n.useRef)(e);r.current=e,(0,n.useEffect)(()=>{if(!t)return;let e=e=>{"Escape"!==e.key||(0,L.is_modal_dialog_open)()||(e.preventDefault(),r.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[t])}let O="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";function P({current_sheet_name:e,sheets:r,is_pending:a,on_edit:s,on_add_note:l,on_show_add_note_form:i,on_resume:o,entry_is_active:c=!1,on_delete:d,on_move:m}){let u=r.find(t=>t.name===e),p=c||u?.hasActiveEntry===!0&&!c,h=r.filter(t=>t.name!==e),[x,f]=(0,n.useState)(!1),g=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!x)return;let e=e=>{null===g.current||g.current.contains(e.target)||f(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[x]);let b=()=>{f(!1)};return F(b,x),(0,t.jsxs)("div",{className:"relative shrink-0",ref:g,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":"Entry actions","aria-expanded":x,"aria-haspopup":"menu",disabled:a,onClick:()=>f(e=>!e),children:(0,t.jsx)(R,{})}),x?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:O,role:"menuitem",disabled:a,onClick:()=>{b(),s()},children:"Edit times"})}),void 0!==i||void 0!==l?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:O,role:"menuitem",disabled:a,onClick:()=>{if(b(),void 0!==i)return void i();let e=function(){let e=window.prompt("Add note","");if(null===e)return null;let t=e.trim();return 0===t.length?null:t}();null!==e&&void 0!==l&&l(e)},children:"Add note"})}):null,void 0!==o?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:O,role:"menuitem",disabled:a||p,title:p?c?"This entry is already active":"Another entry is active on this sheet":void 0,onClick:()=>{b(),o()},children:"Resume"})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 px-2.5 py-0.5 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Move to sheet"})}),0===h.length?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:O,role:"menuitem",disabled:!0,children:"No other sheets"})}):h.map(e=>(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${O} pl-4`,role:"menuitem",disabled:a||e.hasActiveEntry,title:e.hasActiveEntry?"That sheet already has an active entry":void 0,onClick:()=>{b(),m(e.name)},children:e.name})},e.name)),(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${O} text-danger`,role:"menuitem",disabled:a,onClick:()=>{b(),d()},children:"Delete"})})]}):null]})}function H({rotated:e=!1,className:n=""}){return(0,t.jsx)("svg",{className:`h-3 w-3 shrink-0 transition-transform duration-150 ${e?"rotate-90":""} ${n}`.trim(),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"m9 18 6-6-6-6"})})}var U=e.i(39552);function z(e,t="12h"){return(0,U.format)(new Date(e),"24h"===t?"HH:mm":"h:mm a")}function B({initial_text:e,is_pending:r,inline:l=!1,on_save:i,on_cancel:o}){let[c,d]=(0,n.useState)(e);F(o);let m=Math.min(6,Math.max(2,e.split("\n").length)),u=l?`${(0,s.get_input_class_name)()} min-h-10 w-full resize-y text-xs leading-snug`:`${(0,s.get_input_class_name)()} min-h-10 w-full resize-y text-[0.85rem] leading-snug`;return(0,t.jsxs)("form",{className:"flex w-full flex-col gap-1.5",onSubmit:e=>{e.preventDefault();let t=c.trim();0!==t.length&&i(t)},onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("textarea",{className:u,value:c,rows:m,disabled:r,onChange:e=>d(e.target.value)}),(0,t.jsxs)("div",{className:"flex justify-end gap-1.5",children:[(0,t.jsx)("button",{type:"button",className:(0,a.get_button_class_name)("ghost"),disabled:r,onClick:o,children:"Cancel"}),(0,t.jsx)("button",{type:"submit",className:(0,a.get_button_class_name)("ghost"),disabled:r||0===c.trim().length,children:"Save"})]})]})}function K(){return(0,t.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12 20h9"}),(0,t.jsx)("path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}function G(){return(0,t.jsxs)("svg",{className:"h-[0.85rem] w-[0.85rem]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M3 6h18"}),(0,t.jsx)("path",{d:"M8 6V4h8v2"}),(0,t.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}),(0,t.jsx)("path",{d:"M10 11v6"}),(0,t.jsx)("path",{d:"M14 11v6"})]})}var J=e.i(97891);function W(){return(0,n.useSyncExternalStore)(J.time_format_preference.subscribe,J.time_format_preference.get_snapshot,J.time_format_preference.get_server_snapshot)}let q="inline-flex h-6 w-6 shrink-0 cursor-pointer items-center justify-center rounded-[0.35rem] border-0 bg-transparent p-0 text-muted hover:bg-surface-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-55";function V({notes:e,variant:r="panel",in_bar:a=!1,is_pending:s=!1,on_edit_note:l,on_delete_note:i}){let o=W(),[c,d]=(0,n.useState)(null),[m,u]=(0,n.useState)(!1);if(0===e.length)return null;let p=[...e].sort((e,t)=>new Date(e.timestamp).getTime()-new Date(t.timestamp).getTime()),h="inline"===r,x=m||null!==c,f=h?`${e.length} ${1===e.length?"note":"notes"}`:`Notes (${e.length})`,g=[h?"m-0 w-full p-0":"border-t border-accent-border pt-3.5",a&&!h?"border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))]":""].filter(Boolean).join(" "),b=h?`m-0 flex list-none flex-col gap-1.5 overflow-visible p-0 compact:gap-0.5 ${x?"mt-1.5":"hidden"}`:`m-0 grid max-h-48 list-none grid-cols-2 gap-2 overflow-y-auto p-0 max-[860px]:grid-cols-1 ${x?"mt-1.5":"hidden"}`,_=h?"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-ghost-bg px-2 py-1.5 compact:rounded-none compact:px-1.5 compact:py-1":"flex flex-col gap-0.5 rounded-sm border border-panel-border bg-[color-mix(in_srgb,var(--panel)_55%,var(--background))] px-2.5 py-2",v=e=>void 0===l&&void 0===i?null:(0,t.jsxs)("div",{className:"flex shrink-0 gap-0.5",children:[void 0!==l?(0,t.jsx)("button",{type:"button",className:q,"aria-label":"Edit note",title:"Edit note",disabled:s,onClick:t=>{var n;t.stopPropagation(),n=e.timestamp,u(!0),d(n)},children:(0,t.jsx)(K,{})}):null,void 0!==i?(0,t.jsx)("button",{type:"button",className:`${q} hover:text-danger`,"aria-label":"Delete note",title:"Delete note",disabled:s,onClick:t=>{var n;t.stopPropagation(),c===(n=e.timestamp)&&d(null),i?.(n)},children:(0,t.jsx)(G,{})}):null]});return(0,t.jsxs)("section",{className:g,"aria-label":"Entry notes",children:[(0,t.jsxs)("button",{type:"button",className:h?"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 font-inherit text-xs font-medium normal-case tracking-normal text-muted hover:text-foreground":"inline-flex cursor-pointer items-center gap-1.5 border-0 bg-transparent px-0 py-0.5 font-inherit text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted hover:text-foreground","aria-expanded":x,onClick:e=>{e.stopPropagation(),null===c&&u(e=>!e)},children:[(0,t.jsx)(H,{rotated:x}),(0,t.jsx)("span",{children:f})]}),(0,t.jsx)("ul",{className:b,children:p.map((e,n)=>{let r=c===e.timestamp;return(0,t.jsx)("li",{className:_,children:r?(0,t.jsx)(B,{initial_text:e.text,inline:h,is_pending:s,on_cancel:()=>d(null),on_save:t=>{var n;return n=e.timestamp,void(l?.(n,t),d(null))}}):h?(0,t.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,t.jsxs)("p",{className:"m-0 flex min-w-0 flex-1 items-baseline gap-1.5 text-xs leading-snug text-foreground compact:text-[0.72rem]",children:[(0,t.jsx)("time",{className:"shrink-0 font-mono text-[0.68rem] text-muted",dateTime:e.timestamp,children:z(e.timestamp,o)}),(0,t.jsx)("span",{className:"min-w-0 overflow-wrap-anywhere whitespace-pre-wrap",children:e.text})]}),v(e)]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex w-full items-start justify-between gap-1.5",children:[(0,t.jsx)("time",{className:"font-mono text-[0.72rem] text-muted",dateTime:e.timestamp,children:z(e.timestamp,o)}),v(e)]}),(0,t.jsx)("p",{className:"m-0 overflow-wrap-anywhere text-[0.9rem] leading-snug whitespace-pre-wrap",children:e.text})]})},`${e.timestamp}-${n}`)})})]})}function Y(e){return(0,U.format)(new Date(e),"MMM d, h:mm a")}function Z({entry:e,is_pending:r,in_active_panel:l=!1,on_save:i,on_cancel:o}){let[c,d]=(0,n.useState)(""),[m,u]=(0,n.useState)("");F(o);let p=e.isActive?"still running":Y(e.end??e.start);return(0,t.jsxs)("form",{className:`flex flex-col gap-3 rounded-[0.65rem] border border-panel-border bg-input-bg p-3 ${l?"mt-2":""}`,onSubmit:e=>{e.preventDefault();let t=c.trim(),n=m.trim();(0!==t.length||0!==n.length)&&i({...t.length>0?{start:t}:{},...n.length>0?{end:n}:{}})},children:[(0,t.jsx)("p",{className:"m-0 text-[0.85rem] font-semibold",children:"Edit times"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2.5 max-[860px]:grid-cols-1",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-start-${e.id}`,children:[(0,t.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"Start"}),(0,t.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",Y(e.start)]}),(0,t.jsx)("input",{id:`entry-start-${e.id}`,className:(0,s.get_input_class_name)("compact"),value:c,onChange:e=>d(e.target.value),placeholder:"e.g. 10am, 30 minutes ago",disabled:r})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1",htmlFor:`entry-end-${e.id}`,children:[(0,t.jsx)("span",{className:"text-[0.8rem] font-semibold",children:"End"}),(0,t.jsxs)("span",{className:"text-[0.72rem] text-muted",children:["Current: ",p]}),(0,t.jsx)("input",{id:`entry-end-${e.id}`,className:(0,s.get_input_class_name)("compact"),value:m,onChange:e=>u(e.target.value),placeholder:e.isActive?"e.g. now, 5 minutes ago":"e.g. 11:30am",disabled:r})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)("button",{type:"submit",className:(0,a.get_button_class_name)("primary","small"),disabled:r||0===c.trim().length&&0===m.trim().length,children:"Save"}),(0,t.jsx)("button",{type:"button",className:(0,a.get_button_class_name)("ghost","small"),disabled:r,onClick:o,children:"Cancel"})]})]})}function Q({selected_count:e,total_count:r,all_selected:l,some_selected:i,selected_entries:o,sheets:c,is_pending:d,on_toggle_all:m,on_move:u,on_delete:p,on_clear:h}){let[x,f]=(0,n.useState)(""),g=o.some(e=>e.isActive),b=c.filter(e=>(!g||!e.hasActiveEntry)&&o.some(t=>t.sheetName!==e.name));return(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-2 rounded-md border border-accent-border bg-accent-soft px-3 py-2",children:[(0,t.jsx)(I,{className:"shrink-0",checked:l,indeterminate:i,disabled:d,aria_label:l?"Deselect all entries":"Select all entries",on_change:m}),(0,t.jsxs)("p",{className:"m-0 shrink-0 text-[0.85rem] font-semibold",children:[e,(0,t.jsx)("span",{className:"text-muted",children:` of ${r} selected`})]}),(0,t.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsxs)("select",{className:`${(0,s.get_input_class_name)("compact")} min-w-32`,value:x,disabled:d||0===b.length,"aria-label":"Move to sheet",onChange:e=>f(e.target.value),children:[(0,t.jsx)("option",{value:"",children:"Move to…"}),b.map(e=>(0,t.jsx)("option",{value:e.name,children:e.name},e.name))]}),(0,t.jsx)("button",{type:"button",className:(0,a.get_button_class_name)("ghost","small"),disabled:d||0===x.trim().length||0===b.length,onClick:()=>{let e=x.trim();0!==e.length&&(u(e),f(""))},children:"Move"})]}),(0,t.jsx)("button",{type:"button",className:(0,a.get_button_class_name)("danger","small"),disabled:d,onClick:p,children:"Delete"}),(0,t.jsx)("button",{type:"button",className:`${(0,a.get_button_class_name)("ghost","small")} shrink-0`,disabled:d,"aria-label":"Clear selection",title:"Clear selection",onClick:h,children:"✕"})]})]})}function X(e){let t=e.description.trim()||"Untitled entry",n=e.isActive?" This will stop the active timer.":"";return{title:"Delete entry?",message:`Delete "${t}" on sheet "${e.sheetName}"?${n}`,confirmLabel:"Delete",variant:"danger"}}var ee=e.i(32584);function et(e){return`${e.sheetName}-${e.id}`}var en=e.i(36405);function er(){return"true"===(0,n.useSyncExternalStore)(en.confirm_destructive_actions_preference.subscribe,en.confirm_destructive_actions_preference.get_snapshot,en.confirm_destructive_actions_preference.get_server_snapshot)}var ea=e.i(1800);function es({title:e,entries:r,sheets:a,total_ms:s,empty_message:l,is_pending:i,show_sheet_name:o=!0,on_delete:c,on_edit:d,on_move:m,on_move_many:p,on_delete_many:h,on_edit_note:x,on_add_note:f,on_resume:b}){let{confirm:_}=(0,u.use_confirm_dialog)(),v=er(),j=W(),y=(0,ea.use_duration_format)(),[w,N]=(0,n.useState)(null),[k,S]=(0,n.useState)(()=>new Set),E=r.map(e=>et(e)),C=r.filter(e=>k.has(et(e))),$=r.length>0&&C.length===r.length,T=C.length>0&&C.length<r.length;(0,n.useEffect)(()=>{S(e=>{let t=new Set(E),n=new Set([...e].filter(e=>t.has(e)));return n.size===e.size?e:n})},[E.join("|")]);let A=()=>{$?S(new Set):S(new Set(E))},D=()=>{S(new Set)},M=async()=>{let e,t,n;0!==C.length&&(!v||await _((e=C.length,t=C.some(e=>e.isActive),n=1===e?"1 entry":`${e} entries`,{title:1===e?"Delete entry?":"Delete entries?",message:`Permanently delete ${n}?${t?" This will stop the active timer.":""}`,confirmLabel:"Delete",variant:"danger"})))&&(h(C),D())},R=C.length>0;return F(D,R&&null===w),(0,t.jsxs)("section",{className:"min-w-0",children:[(0,t.jsx)("header",{className:"mb-3 flex flex-col gap-2 border-b border-panel-border pb-2.5 compact:mb-2 compact:pb-1.5",children:R?(0,t.jsx)(Q,{selected_count:C.length,total_count:r.length,all_selected:$,some_selected:T,selected_entries:C,sheets:a,is_pending:i,on_toggle_all:A,on_move:e=>{p(C,e),D()},on_delete:()=>void M(),on_clear:D}):(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5",children:[r.length>0?(0,t.jsx)(I,{className:"shrink-0",checked:$,indeterminate:T,disabled:i,aria_label:"Select all entries",on_change:A}):null,(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em]",children:e}),(0,t.jsx)("span",{className:"text-[0.8rem] text-muted",children:0===r.length?null:1===r.length?"1 entry":`${r.length} entries`})]}),(0,t.jsxs)("p",{className:"m-0 font-mono text-[0.85rem] text-muted",children:[(0,ee.format_duration)(s,y)," total"]})]})}),0===r.length?(0,t.jsx)("p",{className:"m-0 text-muted",children:l}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col p-0",children:r.map(e=>{let n=et(e),r=w===n,s=k.has(n);return r?(0,t.jsx)("li",{className:"block border-b border-panel-border py-2.5 last:border-b-0 compact:py-1.5",children:(0,t.jsx)(Z,{entry:e,is_pending:i,on_cancel:()=>N(null),on_save:t=>{d(e,t),N(null)}})},n):(0,t.jsxs)("li",{className:`group relative flex flex-col gap-0 border-b border-panel-border px-2 py-2.5 transition-colors duration-150 last:border-b-0 hover:bg-surface-hover compact:py-1.5 ${s?"bg-accent-soft hover:bg-accent-soft":""}`,children:[(0,t.jsxs)("div",{className:"flex w-full min-w-0 items-center gap-2.5 compact:gap-1.5",children:[(0,t.jsxs)("label",{className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2 has-disabled:cursor-not-allowed","aria-label":`Select entry ${e.description||"Untitled entry"}`,children:[(0,t.jsx)(I,{nested:!0,className:`shrink-0 pr-1 transition-opacity duration-150 compact:pr-0.5 ${s||R?"opacity-100":"opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"}`,checked:s,disabled:i,on_change:()=>{S(e=>{let t=new Set(e);return t.has(n)?t.delete(n):t.add(n),t})}}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("p",{className:"m-0 overflow-wrap-anywhere font-semibold leading-snug compact:text-[0.9rem] compact:leading-tight",children:e.description||"Untitled entry"}),(0,t.jsxs)("div",{className:"mt-0.5 flex flex-wrap items-center gap-1 text-[0.8rem] text-muted compact:mt-px compact:gap-0.5 compact:text-[0.72rem]",children:[o?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:e.sheetName}),(0,t.jsx)("span",{children:"·"})]}):null,(0,t.jsxs)("span",{children:["#",e.id]}),(0,t.jsx)("span",{children:"·"}),(0,t.jsxs)("span",{className:"whitespace-nowrap",children:[z(e.start,j),null===e.end?" → now":` → ${z(e.end,j)}`]}),e.tags.length>0?(0,t.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1 p-0",children:e.tags.map(e=>(0,t.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,g.format_display_tag)(e)},e))}):null]})]})]}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-row items-center gap-2 max-[860px]:flex-wrap max-[860px]:justify-end compact:gap-1.5",children:[(0,t.jsx)("p",{className:`m-0 whitespace-nowrap text-right font-mono text-[0.9rem] text-muted compact:text-[0.8rem] ${e.isActive?"text-accent":""}`,children:(0,ee.format_duration)(e.durationMs,y)}),(0,t.jsx)(P,{current_sheet_name:e.sheetName,sheets:a,is_pending:i,on_edit:()=>N(n),on_add_note:t=>f(e,t),on_resume:()=>b(e),entry_is_active:e.isActive,on_move:t=>m(e,t),on_delete:async()=>{(!v||await _(X(e)))&&c(e)}})]})]}),e.notes.length>0?(0,t.jsx)("div",{className:"w-full pt-1 pl-[calc(0.85rem+0.5rem+0.35rem)] compact:pt-0.5 compact:pl-[calc(0.85rem+0.35rem+0.2rem)]",children:(0,t.jsx)(V,{notes:e.notes,variant:"inline",is_pending:i,on_edit_note:(t,n)=>x(e,t,n)})}):null]},n)})})})]})}let el="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";function ei({sheet_name:e,is_pending:r,can_delete:a,on_rename:s,on_delete:l}){let[i,o]=(0,n.useState)(!1),c=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!i)return;let e=e=>{null===c.current||c.current.contains(e.target)||o(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[i]);let d=()=>{o(!1)};return(0,t.jsxs)("div",{className:"relative shrink-0 self-center",ref:c,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex cursor-pointer appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0.5 text-muted shadow-none hover:opacity-75 focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-55","aria-label":`Actions for sheet ${e}`,"aria-expanded":i,"aria-haspopup":"menu",disabled:r,onClick:()=>o(e=>!e),children:(0,t.jsx)(R,{})}),i?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-10 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:el,role:"menuitem",disabled:r,onClick:()=>{d(),s()},children:"Rename"})}),(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${el} text-danger`,role:"menuitem",disabled:r||!a,title:a?void 0:"Cannot delete the last sheet",onClick:()=>{d(),l()},children:"Delete sheet"})})]}):null]})}function eo({sheets:e,db_path:r,on_select:l,on_create:i,on_rename:o,on_delete:c,is_pending:d}){let{confirm:m}=(0,u.use_confirm_dialog)(),p=er(),h=e.length>1,[x,f]=(0,n.useState)(""),[g,b]=(0,n.useState)(null),[_,v]=(0,n.useState)(""),j=()=>{b(null),v("")};F(j,null!==g);let y=e=>{if(e.preventDefault(),null===g)return;let t=_.trim();0===t.length||t===g||o(g,t),j()};return(0,t.jsxs)("aside",{className:"flex min-w-0 flex-col gap-3 max-[860px]:min-w-0",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Sheets"}),(0,t.jsx)("ul",{className:"m-0 flex min-h-0 flex-1 list-none flex-col gap-1.5 p-0",children:e.map(e=>(0,t.jsx)("li",{className:"min-w-0",children:g===e.name?(0,t.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-1.5",onSubmit:y,children:[(0,t.jsx)("input",{className:(0,s.get_input_class_name)("compact"),value:_,onChange:e=>v(e.target.value),disabled:d,autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)("button",{type:"submit",className:`${(0,a.get_button_class_name)("ghost")} flex-1`,disabled:d||0===_.trim().length,children:"Save"}),(0,t.jsx)("button",{type:"button",className:`${(0,a.get_button_class_name)("ghost")} flex-1`,disabled:d,onClick:j,children:"Cancel"})]})]}):(0,t.jsxs)("div",{className:"flex min-w-0 items-stretch gap-1",children:[(0,t.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 rounded-md border border-transparent bg-transparent px-2.5 py-2 text-left transition-[background-color,color] duration-150 hover:bg-surface-hover",disabled:d,onClick:()=>l(e.name),children:[(0,t.jsx)("span",{className:`min-w-0 flex-1 truncate font-semibold ${e.isActive||e.hasActiveEntry?"text-accent":""}`,children:e.name}),(0,t.jsx)("span",{className:`shrink-0 text-xs whitespace-nowrap ${e.hasActiveEntry?"text-accent":"text-muted"}`,children:e.hasActiveEntry?"● active":`${e.entryCount} entries`})]}),(0,t.jsx)(ei,{sheet_name:e.name,is_pending:d,can_delete:h,on_rename:()=>{var t;b(t=e.name),v(t)},on_delete:async()=>{var t,n,r;let a;(!p||await m((t=e.name,n=e.entryCount,r=e.hasActiveEntry,a=0===n?"":` This will delete ${n} ${1===n?"entry":"entries"}.`,{title:"Delete sheet?",message:`Delete "${t}"?${a}${r?" This will stop the active timer.":""}`,confirmLabel:"Delete sheet",variant:"danger"})))&&c(e.name)}})]})},e.name))}),(0,t.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-2",onSubmit:e=>{e.preventDefault();let t=x.trim();0!==t.length&&(i(t),f(""))},children:[(0,t.jsx)("input",{className:(0,s.get_input_class_name)("compact"),value:x,onChange:e=>f(e.target.value),placeholder:"New sheet name",disabled:d}),(0,t.jsx)("button",{type:"submit",className:(0,a.get_button_class_name)("ghost"),disabled:d||0===x.trim().length,children:"Add"})]}),(0,t.jsx)("p",{className:"mt-auto shrink-0 overflow-wrap-anywhere border-t border-panel-border pt-3 font-mono text-[0.65rem] leading-snug text-muted",title:r,children:r})]})}let ec=`${(0,a.get_button_class_name)("danger")} text-white rounded-none first:rounded-l-[0.65rem] last:rounded-r-[0.65rem] not-first:-ml-px not-first:min-w-12 not-first:border-l not-first:border-l-[color-mix(in_srgb,var(--danger-text)_30%,var(--background))] max-[860px]:flex-1 max-[860px]:basis-1/2`;function ed({in_bar:e=!1,is_pending:n,on_check_out:r}){let a=h(r);return(0,t.jsxs)("div",{className:`inline-flex shrink-0 ${e?"min-w-0 max-[860px]:w-full":"min-w-30 max-[860px]:w-full"}`,children:[(0,t.jsx)("button",{type:"button",className:ec,disabled:n,onClick:()=>void a(),children:"Check out"}),(0,t.jsx)("button",{type:"button",className:ec,disabled:n,title:"Check out at a specific time",onClick:()=>{let e=function(){let e=window.prompt("Check out at what time?","30 minutes ago");if(null===e)return null;let t=e.trim();return 0===t.length?null:t}();null!==e&&a(e)},children:"@"})]})}function em({on_submit:e,on_cancel:r,is_pending:l,in_active_panel:i=!1,in_bar:o=!1,allow_at:c=!1}){let[d,m]=(0,n.useState)(""),[u,p]=(0,n.useState)("");return F(()=>r?.(),void 0!==r),(0,t.jsxs)("form",{className:`flex flex-col gap-2 ${i&&!o?"border-t border-accent-border pt-4":o?"border-t border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))] pt-3.5":""}`,onSubmit:t=>{t.preventDefault();let n=d.trim();if(0===n.length)return;let r=u.trim();e(n,r.length>0?r:void 0),m(""),p("")},children:[(0,t.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-text",children:"Add note"}),(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 max-[860px]:grid-cols-1",children:[(0,t.jsx)("input",{id:"note-text",className:(0,s.get_input_class_name)(),value:d,onChange:e=>m(e.target.value),placeholder:"Pair with alice on the widget",disabled:l,autoFocus:!0}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 max-[860px]:w-full",children:[(0,t.jsx)("button",{type:"submit",className:(0,a.get_button_class_name)("ghost"),disabled:l||0===d.trim().length,children:"Save note"}),void 0!==r?(0,t.jsx)("button",{type:"button",className:(0,a.get_button_class_name)("ghost"),disabled:l,onClick:r,children:"Cancel"}):null]})]}),c?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-at",children:["Note time"," ",(0,t.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,t.jsx)("input",{id:"note-at",className:(0,s.get_input_class_name)(),value:u,onChange:e=>p(e.target.value),placeholder:"e.g. 30 minutes ago",disabled:l})]}):null]})}var eu=e.i(60935);function ep(){return"true"===(0,n.useSyncExternalStore)(eu.timer_show_seconds_preference.subscribe,eu.timer_show_seconds_preference.get_snapshot,eu.timer_show_seconds_preference.get_server_snapshot)}let eh=(0,n.forwardRef)(function({entry:e,sheets:r,in_bar:s=!1,on_check_out:l,on_delete:i,on_edit:o,on_move:c,on_add_note:d,on_edit_note:m,on_delete_note:p,is_pending:h},x){let f,{confirm:b}=(0,u.use_confirm_dialog)(),_=er(),v=(0,ea.use_duration_format)(),j=ep(),[y,w]=(0,n.useState)(e.durationMs),[N,k]=(0,n.useState)(!1),[S,E]=(0,n.useState)(!1);(0,n.useImperativeHandle)(x,()=>({start_edit:()=>{N||k(!0)},start_add_note:()=>{N||S||E(!0)}}),[S,N]),(0,n.useEffect)(()=>{E(!1)},[e.id,e.sheetName]),(0,n.useEffect)(()=>{w(e.durationMs);let t=window.setInterval(()=>{w(Date.now()-new Date(e.start).getTime())},1e3);return()=>window.clearInterval(t)},[e.durationMs,e.start]);let C=(f="flex flex-col gap-4 rounded-lg border border-accent-border p-[1.1rem] shadow-sm",s?N?`${f} rounded-md border border-accent-border bg-[color-mix(in_srgb,var(--panel)_70%,var(--background))] p-3.5`:"flex flex-col gap-3.5 border-0 bg-transparent p-0 shadow-none":`${f} bg-[image:var(--active-panel-bg)]`),$=async t=>{let n,r,a=e.notes.find(e=>e.timestamp===t);(!_||await b({title:"Delete note?",message:(r=(n=(a?.text??"").trim()).length>80?`${n.slice(0,80)}…`:n).length>0?`Remove this note? "${r}"`:"Remove this note?",confirmLabel:"Delete",variant:"danger"}))&&p(t)};return N?(0,t.jsx)("section",{className:C,children:(0,t.jsx)(Z,{entry:e,is_pending:h,in_active_panel:!0,on_cancel:()=>k(!1),on_save:e=>{o(e),k(!1)}})}):(0,t.jsxs)("section",{className:C,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5",children:[s?null:(0,t.jsx)("span",{className:"self-start rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"}),(0,t.jsx)("h2",{className:"m-0 text-xl font-[650] leading-tight tracking-tight",children:e.description||"Untitled entry"})]}),(0,t.jsx)(P,{current_sheet_name:e.sheetName,sheets:r,is_pending:h,on_edit:()=>k(!0),on_show_add_note_form:()=>E(!0),on_move:c,on_delete:async()=>{(!_||await b(X(e)))&&i()}})]}),(0,t.jsxs)("div",{className:"flex items-end justify-between gap-4 max-[860px]:flex-col max-[860px]:items-stretch",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsx)("p",{className:"m-0 font-mono text-[2rem] font-medium leading-none tracking-tight text-accent",children:(0,ee.format_duration)(y,v,j)}),e.tags.length>0?(0,t.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1.5 p-0",children:e.tags.map(e=>(0,t.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,g.format_display_tag)(e)},e))}):null]}),(0,t.jsxs)("div",{className:`inline-flex shrink-0 items-center gap-2 ${s?"min-w-0 max-[860px]:w-full max-[860px]:justify-end":"min-w-30 max-[860px]:w-full max-[860px]:justify-stretch"}`,children:[S?null:(0,t.jsx)("button",{type:"button",className:`${(0,a.get_button_class_name)("ghost")} max-[860px]:flex-1`,disabled:h,onClick:()=>E(!0),children:"Add note"}),(0,t.jsx)(ed,{in_bar:s,is_pending:h,on_check_out:l})]})]}),(0,t.jsx)(V,{notes:e.notes,variant:"panel",in_bar:s,is_pending:h,on_edit_note:m,on_delete_note:$}),S?(0,t.jsx)(em,{in_active_panel:!0,in_bar:s,allow_at:!0,is_pending:h,on_cancel:()=>E(!1),on_submit:(e,t)=>{d(e,t),E(!1)}}):null]})}),ex=(0,n.forwardRef)(function({active_entry:e,sheets:n,is_pending:r,on_check_out:a,on_delete:s,on_edit:l,on_move:i,on_add_note:o,on_edit_note:c,on_delete_note:d},m){return(0,t.jsx)("div",{className:"w-full border-b border-panel-border bg-[color-mix(in_srgb,var(--accent-soft)_55%,var(--panel))]",children:(0,t.jsx)("div",{className:"mx-auto flex w-full max-w-[1120px] flex-col gap-3 px-5 py-3.5 max-[860px]:gap-2.5 max-[860px]:py-3",children:null!==e?(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,t.jsxs)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted whitespace-nowrap truncate",children:["Sheet ",e.sheetName]}),(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"})]}),(0,t.jsx)(eh,{ref:m,entry:e,sheets:n,in_bar:!0,is_pending:r,on_check_out:a,on_delete:s,on_edit:l,on_move:i,on_add_note:o,on_edit_note:c,on_delete_note:d},`${e.sheetName}-${e.id}`)]}):(0,t.jsx)("p",{className:"m-0 text-[0.85rem] leading-tight text-muted",children:"Not tracking"})})})});var ef=e.i(16967);let eg="super-time-tracker";function eb({active_entry:e}){let t="true"===(0,n.useSyncExternalStore)(ef.timer_in_title_preference.subscribe,ef.timer_in_title_preference.get_snapshot,ef.timer_in_title_preference.get_server_snapshot),r=(0,ea.use_duration_format)(),a=ep(),[s,l]=(0,n.useState)(e?.durationMs??0);return(0,n.useEffect)(()=>{if(null===e)return void l(0);l(e.durationMs);let t=window.setInterval(()=>{l(Date.now()-new Date(e.start).getTime())},1e3);return()=>window.clearInterval(t)},[e]),(0,n.useEffect)(()=>{if(!t||null===e){document.title=eg;return}let n=e.description.trim()||"Tracking",l=(0,ee.format_duration)(s,r,a);return document.title=`${l} — ${n}`,()=>{document.title=eg}},[e,r,s,a,t]),null}var e_=e.i(75404),ev=e.i(67999);async function ej(e,t){let n=await fetch(e,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error((await n.json()).error??"Request failed");return await n.json()}async function ey(e,t){let n=await fetch(e,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error((await n.json()).error??"Request failed");return await n.json()}async function ew(e,t){let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw Error((await n.json()).error??"Request failed");return await n.json()}function eN(e){let t=e.activeSheetName;if(null!==t){let e=t.trim();if(0!==e.length){try{window.localStorage.setItem(_.ACTIVE_SHEET_STORAGE_KEY,e)}catch{}try{let t=encodeURIComponent(e);document.cookie=`${_.ACTIVE_SHEET_COOKIE_NAME}=${t}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}}}}var ek=e.i(65742),eS=e.i(4874);e.s(["TrackerApp",0,function({initial_state:e}){let[r,a]=(0,n.useState)(e),[s,l]=(0,n.useState)(null),[i,c]=(0,n.useState)(!1);(0,n.useEffect)(()=>{eN(e)},[e]);let d=async e=>{c(!0),l(null);try{let t=await e();eN(t),a(t)}catch(e){l(e instanceof Error?e.message:String(e))}finally{c(!1)}},m=r.sheets.find(e=>e.isActive)?.name??"main",u=A(),p=(0,n.useSyncExternalStore)(eS.entry_list_sort_preference.subscribe,eS.entry_list_sort_preference.get_snapshot,eS.entry_list_sort_preference.get_server_snapshot),h="true"===(0,n.useSyncExternalStore)(ek.clear_tag_filters_on_sheet_change_preference.subscribe,ek.clear_tag_filters_on_sheet_change_preference.get_snapshot,ek.clear_tag_filters_on_sheet_change_preference.get_server_snapshot),x=(0,n.useRef)(null),_=(0,n.useRef)(null),v=(0,n.useRef)(null);(0,n.useEffect)(()=>{if(!h||null===x.current||x.current===m){x.current=m;return}C(m,[]),x.current=m},[m,h]);let j=(0,n.useSyncExternalStore)(E,()=>N(m),k),y=(0,n.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=new Set;for(let r of n.tags)try{let n=b(r);if(e.has(n))continue;e.add(n),t.set(n,(t.get(n)??0)+1)}catch{continue}}return[...t.entries()].map(([e,t])=>({name:e,entryCount:t})).sort((e,t)=>e.name.localeCompare(t.name))})(r.activeSheetEntries),[r.activeSheetEntries]),w=(0,n.useMemo)(()=>{let e=[...function(e,t,n="all"){return 0===t.length?e:e.filter(e=>(function(e,t,n="all"){return 0===t.length||("any"===n?t.some(t=>e.tags.some(e=>$(e,t))):t.every(t=>e.tags.some(e=>$(e,t))))})(e,t,n))}(r.activeSheetEntries,j,u)];switch(p){case"oldest":return e.sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime());case"duration":return e.sort((e,t)=>t.durationMs-e.durationMs);case"description":return e.sort((e,t)=>{let n=e.description.trim()||"Untitled entry",r=t.description.trim()||"Untitled entry";return n.localeCompare(r)});default:return e.sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime())}},[r.activeSheetEntries,j,u,p]),S=(0,n.useMemo)(()=>(0,ev.get_serialized_entries_total_ms)(w),[w]),T=j.length>0?"any"===u?`No entries on sheet "${m}" match any selected tag.`:`No entries on sheet "${m}" match all selected tags.`:`No entries on sheet "${m}".`,M=(e,t,n)=>ey("/api/entry",{sheetName:e,entryId:t,...n});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eb,{active_entry:r.activeEntry}),(0,t.jsx)(f,{sheets:r.sheets,active_sheet_name:m,active_entry:r.activeEntry,is_pending:i,check_in_form_ref:_,active_entry_panel_ref:v,on_select_sheet:e=>d(()=>ew("/api/sheet",{name:e})),on_check_out:e=>d(()=>ew("/api/out",{sheetName:m,...void 0!==e?{at:e}:{}}))}),(0,t.jsxs)("div",{className:"relative z-1",children:[(0,t.jsx)(e_.TrackerTopbar,{}),(0,t.jsx)(ex,{ref:v,active_entry:r.activeEntry,sheets:r.sheets,is_pending:i,on_check_out:e=>d(()=>ew("/api/out",{sheetName:m,...void 0!==e?{at:e}:{}})),on_delete:()=>d(()=>ew("/api/entry",{sheetName:m,entryId:r.activeEntry?.id})),on_edit:e=>d(()=>M(m,r.activeEntry?.id??0,e)),on_move:e=>d(()=>ew("/api/entry/move",{sheetName:m,entryId:r.activeEntry?.id,targetSheetName:e})),on_add_note:(e,t)=>d(()=>ew("/api/note",{text:e,...void 0!==t?{at:t}:{},sheetName:m,entryId:r.activeEntry?.id})),on_edit_note:(e,t)=>d(()=>ey("/api/note",{sheetName:m,entryId:r.activeEntry?.id,timestamp:e,text:t})),on_delete_note:e=>d(()=>ej("/api/note",{sheetName:m,entryId:r.activeEntry?.id,timestamp:e}))})]}),(0,t.jsxs)("div",{className:"mx-auto max-w-[1120px] px-5 pb-10 pt-5",children:[null!==s?(0,t.jsx)("p",{className:"mb-4 rounded-[0.65rem] border border-danger-border bg-danger-soft px-3 py-2.5 text-danger-text",children:s}):null,(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(16rem,20rem)_minmax(0,1fr)] items-start gap-4 max-[860px]:grid-cols-1",children:[(0,t.jsx)(eo,{sheets:r.sheets,db_path:r.dbPath,is_pending:i,on_select:e=>d(()=>ew("/api/sheet",{name:e})),on_create:e=>d(()=>ew("/api/sheet",{name:e})),on_rename:(e,t)=>d(()=>ey("/api/sheet",{name:e,newName:t})),on_delete:e=>d(()=>ew("/api/sheet",{name:e,delete:!0}))}),(0,t.jsxs)("main",{className:"flex min-w-0 flex-col gap-4 rounded-lg border border-panel-border bg-panel p-4 shadow-sm",children:[null===r.activeEntry?(0,t.jsx)(o,{ref:_,known_tags:r.knownTags,is_pending:i,on_submit:e=>d(()=>ew("/api/in",{...e,sheetName:m}))}):null,(0,t.jsx)(D,{sheet_name:m,sheet_tags:y}),(0,t.jsx)(es,{title:"Entries",entries:w,sheets:r.sheets,total_ms:S,empty_message:T,is_pending:i,show_sheet_name:!1,on_delete:e=>d(()=>ew("/api/entry",{sheetName:e.sheetName,entryId:e.id})),on_edit:(e,t)=>d(()=>M(e.sheetName,e.id,t)),on_move:(e,t)=>d(()=>ew("/api/entry/move",{sheetName:e.sheetName,entryId:e.id,targetSheetName:t})),on_move_many:(e,t)=>d(()=>ew("/api/entry/move-bulk",{entries:e.map(e=>({sheetName:e.sheetName,entryId:e.id})),targetSheetName:t})),on_delete_many:e=>d(()=>ew("/api/entry/delete-bulk",{entries:e.map(e=>({sheetName:e.sheetName,entryId:e.id}))})),on_edit_note:(e,t,n)=>d(()=>ey("/api/note",{sheetName:e.sheetName,entryId:e.id,timestamp:t,text:n})),on_add_note:(e,t)=>d(()=>ew("/api/note",{sheetName:e.sheetName,entryId:e.id,text:t})),on_resume:e=>d(()=>{var t,n;let r,a,s;return ew("/api/in",{description:(t=e.description,n=e.tags,a=(r=t.trim()).length>0?r:"Untitled entry",(s=n.map(e=>(0,g.format_display_tag)(e)).join(" ")).length>0?`${a} ${s}`.trim():a),sheetName:e.sheetName})})})]})]})]})]})}],22482)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,46549,e=>{"use strict";let t=new Set,r="Settings saved",n=null,s=r;e.s(["SETTINGS_SAVED_DEFAULT_MESSAGE",0,r,"notify_settings_saved",0,function(e=r){s=e,null!==n&&clearTimeout(n),n=setTimeout(()=>{n=null;let e=s;t.forEach(t=>{t(e)})},200)},"subscribe_settings_saved",0,function(e){return t.add(e),()=>{t.delete(e)}}])},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"m-0 flex w-full list-none flex-col gap-0.5 p-0",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:n.href,"aria-current":s?"page":void 0,className:`block rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},17446,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(46549);e.s(["SettingsSavedToast",0,function(){let[e,s]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let e=null,t=(0,n.subscribe_settings_saved)(t=>{s(t),null!==e&&clearTimeout(e),e=setTimeout(()=>{s(null),e=null},2800)});return()=>{t(),null!==e&&clearTimeout(e)}},[]),null===e)?null:(0,t.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"pointer-events-none fixed bottom-6 left-1/2 z-50 -translate-x-1/2 rounded-md border border-accent-border bg-panel px-4 py-2.5 text-[0.88rem] font-medium text-foreground shadow-md transition-[opacity,transform] duration-200",children:e||n.SETTINGS_SAVED_DEFAULT_MESSAGE})}])},42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(78677)),i=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",o=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(34416);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(31047),s=e.r(63334);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return b}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),i=e.r(54710),o=a._(e.r(34416)),l=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),f=e.r(20321);e.r(90503);let h=e.r(38520),p=e.r(19947),_=e.r(59246),m=e.r(99046);function g(t){var r,n;let s,a,g,[b,E]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:S,as:y,children:T,prefetch:j=null,passHref:N,replace:k,shallow:O,scroll:A,onClick:w,onMouseEnter:C,onTouchStart:I,legacyBehavior:D=!1,onNavigate:R,transitionTypes:L,ref:M,unstable_dynamicOnHover:F,...U}=t;s=T,D&&("string"==typeof s||"number"==typeof s)&&(s=(0,i.jsx)("a",{children:s}));let K=o.default.useContext(c.AppRouterContext),P=!1!==j,H=!1!==j?null===(n=j)||"auto"===n?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,G="string"==typeof(r=y||S)?r:(0,l.formatUrl)(r);if(D){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(s)}let $=D?a&&"object"==typeof a&&a.ref:M,B=o.default.useCallback(e=>(null!==K&&(v.current=(0,p.mountLinkInstance)(e,G,K,H,P,E)),()=>{v.current&&((0,p.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,p.unmountPrefetchableInstance)(e)}),[P,G,K,H,E]),Y={ref:(0,u.useMergedRef)(B,$),onClick(t){D||"function"!=typeof w||w(t),D&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!K||t.defaultPrevented||function(t,r,n,s,a,i,l){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,_.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);o.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,G,v,k,A,R,L)},onMouseEnter(e){D||"function"!=typeof C||C(e),D&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),K&&P&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)},onTouchStart:function(e){D||"function"!=typeof I||I(e),D&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),K&&P&&(0,p.onNavigationIntent)(e.currentTarget,!0===F)}};return(0,d.isAbsoluteUrl)(G)?Y.href=G:D&&!N&&("a"!==a.type||"href"in a.props)||(Y.href=(0,f.addBasePath)(G)),g=D?o.default.cloneElement(a,Y):(0,i.jsx)("a",{...U,...Y,children:s}),(0,i.jsx)(x.Provider,{value:b,children:g})}e.r(10364);let x=(0,o.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,o.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},28089,e=>{"use strict";var t=e.i(54710);e.s(["HelpIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),(0,t.jsx)("path",{d:"M12 17h.01"})]})}])},14574,e=>{"use strict";var t=e.i(34995);e.s(["get_tracker_keyboard_shortcut_sections",0,function(){return[...(0,t.get_app_keyboard_shortcut_sections)(),{title:"Tracker",entries:[{label:"C",description:"Check in (focus description)"},{label:"O",description:"Check out"},{label:"E",description:"Edit active entry"},{label:"N",description:"Add note to active entry"},{label:"[",description:"Previous sheet"},{label:"]",description:"Next sheet"}]}]}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(34416),a=e.i(28089),i=e.i(88680),o=e.i(34995),l=e.i(14574);function c(){let e=(0,n.usePathname)(),r=(0,s.useMemo)(()=>"/"===e?(0,l.get_tracker_keyboard_shortcut_sections)():(0,o.get_app_keyboard_shortcut_sections)(),[e]);return(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Keyboard shortcuts","aria-describedby":"keyboard-shortcuts-tooltip",children:(0,t.jsx)(a.HelpIcon,{})}),(0,t.jsx)("div",{id:"keyboard-shortcuts-tooltip",role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 w-max max-w-[min(18rem,calc(100vw-2.5rem))] pt-2 opacity-0 transition-opacity duration-150 group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-lg border border-panel-border bg-panel p-3 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Keyboard shortcuts"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(i.KeyboardShortcutsContent,{sections:r,compact:!0})})]})})]})}function u(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function d(){return u()}function f(){return"dark"}var h=e.i(35434),p=e.i(17798),_=e.i(10464),m=e.i(81553);function g(){let e="dark"===u()?"light":"dark";(0,p.apply_theme)(e),(0,m.write_stored_theme)(e),_.theme_mode_preference.write(e),_.theme_mode_preference.notify(),(0,h.notify_theme_subscribers)()}function x(){let e=(0,s.useSyncExternalStore)(h.subscribe_theme,d,f),r="dark"===e?"Dark":"Light",n="dark"===e?"Switch to light theme":"Switch to dark theme";return(0,t.jsxs)("button",{type:"button",className:"inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-panel-border bg-ghost-bg px-3 py-1.5 font-inherit text-[0.85rem] font-semibold text-inherit hover:bg-surface-hover disabled:cursor-wait disabled:opacity-60",onClick:g,"aria-label":`${r} theme. ${n}`,title:n,suppressHydrationWarning:!0,children:[(0,t.jsx)("span",{className:"text-base leading-none","aria-hidden":"true",children:"dark"===e?"☾":"☀"}),(0,t.jsx)("span",{suppressHydrationWarning:!0,children:r})]})}function b({current:e,parent:n}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"text-muted",children:n.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"font-medium text-foreground","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-5",children:[(0,t.jsx)("span",{className:"inline-flex shrink-0 items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)(b,{current:e.current,parent:e.parent}):null,(0,t.jsxs)("div",{className:"ml-auto flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/",children:"Tracker"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/reporting",children:"Reporting"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/settings/tags",children:"Manage tags"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/settings",children:"Settings"}),(0,t.jsx)(c,{}),(0,t.jsx)(x,{})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},72550,e=>{"use strict";e.s(["ACTIVE_SHEET_COOKIE_NAME",0,"stt-active-sheet","ACTIVE_SHEET_STORAGE_KEY",0,"super-time-tracker-active-sheet","COMPACT_LISTS_STORAGE_KEY",0,"super-time-tracker-compact-lists","DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME",0,"stt-default-sheet-fixed-name","DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY",0,"super-time-tracker-default-sheet-fixed-name","DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME",0,"stt-default-sheet-session-mode","DEFAULT_SHEET_SESSION_MODE_DEFAULT",0,"last_viewed","DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY",0,"super-time-tracker-default-sheet-session-mode","SHEET_TAG_FILTERS_STORAGE_KEY",0,"super-time-tracker-sheet-tag-filters"])},7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},65742,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLEAR_TAG_FILTERS_ON_SHEET_CHANGE_STORAGE_KEY,default_value:r.CLEAR_TAG_FILTERS_ON_SHEET_CHANGE_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["clear_tag_filters_on_sheet_change_preference",0,n])},97026,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CONFIRM_BEFORE_CHECKOUT_STORAGE_KEY,default_value:r.CONFIRM_BEFORE_CHECKOUT_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["confirm_before_checkout_preference",0,n])},36405,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CONFIRM_DESTRUCTIVE_ACTIONS_STORAGE_KEY,default_value:r.CONFIRM_DESTRUCTIVE_ACTIONS_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["confirm_destructive_actions_preference",0,n])},91653,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(65742),s=e.i(7902);e.s(["ClearTagFiltersOnSheetChangeSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.clear_tag_filters_on_sheet_change_preference.subscribe,n.clear_tag_filters_on_sheet_change_preference.get_snapshot,n.clear_tag_filters_on_sheet_change_preference.get_server_snapshot);return(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.clear_tag_filters_on_sheet_change_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Clear tag filters on sheet change"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Remove tag filters when you switch to another sheet."})]})]})}])},98295,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(97026),s=e.i(7902);e.s(["ConfirmBeforeCheckoutSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.confirm_before_checkout_preference.subscribe,n.confirm_before_checkout_preference.get_snapshot,n.confirm_before_checkout_preference.get_server_snapshot);return(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.confirm_before_checkout_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Confirm before checkout"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Show a confirmation dialog when you stop the active timer."})]})]})}])},256,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(36405),s=e.i(7902);e.s(["ConfirmDestructiveActionsSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.confirm_destructive_actions_preference.subscribe,n.confirm_destructive_actions_preference.get_snapshot,n.confirm_destructive_actions_preference.get_server_snapshot);return(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-center gap-2.5",children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:"true"===e,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.confirm_destructive_actions_preference,t?"true":"false")}}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.95rem] font-semibold",children:"Confirm destructive actions"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Ask before deleting entries or sheets. Turn off for fast mode."})]})]})}])},62344,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(52405),s=e.i(72550);function a(e){return"last_viewed"===e||"active_timer"===e||"fixed"===e?e:s.DEFAULT_SHEET_SESSION_MODE_DEFAULT}var i=e.i(46549);function o(e){let t=e.trim();if(0!==t.length){try{window.localStorage.setItem(s.DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY,t)}catch{}try{let e=encodeURIComponent(t);document.cookie=`${s.DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}}}let l=[{value:"last_viewed",label:"Last viewed",description:"Open the sheet you were viewing when you last used the tracker."},{value:"active_timer",label:"Sheet with active timer",description:"Open the sheet that has a running timer, when one exists."},{value:"fixed",label:"Specific sheet",description:"Always open a chosen sheet when you start a new session."}];e.s(["DefaultSheetSessionSetting",0,function({sheet_names:e}){let[c,u]=(0,r.useState)("last_viewed"),[d,f]=(0,r.useState)("");return(0,r.useEffect)(()=>{u(function(){try{let e=window.localStorage.getItem(s.DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY);return a(e)}catch{return a(null)}}());let t=function(){try{let e=window.localStorage.getItem(s.DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY)?.trim()??"";return e.length>0?e:null}catch{return null}}(),r=e[0]??"";f(t??r)},[e]),(0,t.jsxs)("fieldset",{className:"m-0 flex w-full flex-col gap-3 border-0 p-0",children:[(0,t.jsx)("legend",{className:"mb-2 text-[0.95rem] font-semibold",children:"Default sheet on new session"}),(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0",children:l.map(e=>(0,t.jsx)("li",{children:(0,t.jsxs)("label",{className:"flex w-full cursor-pointer items-start gap-2.5",children:[(0,t.jsx)("input",{type:"radio",name:"default-sheet-session-mode",className:"mt-0.5 shrink-0",checked:c===e.value,onChange:()=>(e=>{u(e);try{window.localStorage.setItem(s.DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY,e)}catch{}try{document.cookie=`${s.DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}"fixed"===e&&d.length>0&&o(d),(0,i.notify_settings_saved)()})(e.value)}),(0,t.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"text-[0.9rem] font-semibold",children:e.label}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:e.description})]})]})},e.value))}),"fixed"===c?(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-[0.82rem] text-muted",children:["Sheet",(0,t.jsx)("select",{className:(0,n.get_input_class_name)("compact"),value:d,disabled:0===e.length,onChange:e=>{var t;f(t=e.target.value),o(t),(0,i.notify_settings_saved)()},children:e.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]}):null]})}],62344)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let a=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"m-0 flex w-full list-none flex-col gap-0.5 p-0",children:a.map(n=>{let a=n.match(e);return(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{href:n.href,"aria-current":a?"page":void 0,className:`block rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},46549,e=>{"use strict";let t=new Set,r="Settings saved",n=null,a=r;e.s(["SETTINGS_SAVED_DEFAULT_MESSAGE",0,r,"notify_settings_saved",0,function(e=r){a=e,null!==n&&clearTimeout(n),n=setTimeout(()=>{n=null;let e=a;t.forEach(t=>{t(e)})},200)},"subscribe_settings_saved",0,function(e){return t.add(e),()=>{t.delete(e)}}])},17446,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(46549);e.s(["SettingsSavedToast",0,function(){let[e,a]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let e=null,t=(0,n.subscribe_settings_saved)(t=>{a(t),null!==e&&clearTimeout(e),e=setTimeout(()=>{a(null),e=null},2800)});return()=>{t(),null!==e&&clearTimeout(e)}},[]),null===e)?null:(0,t.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"pointer-events-none fixed bottom-6 left-1/2 z-50 -translate-x-1/2 rounded-md border border-accent-border bg-panel px-4 py-2.5 text-[0.88rem] font-medium text-foreground shadow-md transition-[opacity,transform] duration-200",children:e||n.SETTINGS_SAVED_DEFAULT_MESSAGE})}])},42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return u},urlObjectKeys:function(){return i}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let l=e.r(44066)._(e.r(78677)),s=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",o=e.hash||"",i=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),i&&"object"==typeof i&&(i=String(l.urlQueryToSearchParams(i)));let c=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||s.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return o(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(34416);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=l(e,n)),t&&(a.current=l(t,n))},[e,t])}function l(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return l}});let n=e.r(31047),a=e.r(63334);function l(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return x},useLinkStatus:function(){return y}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let l=e.r(44066),s=e.r(54710),o=l._(e.r(34416)),i=e.r(42552),u=e.r(61717),c=e.r(37879),d=e.r(31047),m=e.r(20321);e.r(90503);let f=e.r(38520),p=e.r(19947),h=e.r(59246),g=e.r(99046);function x(t){var r,n;let a,l,x,[y,v]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),_=(0,o.useRef)(null),{href:j,as:w,children:N,prefetch:S=null,passHref:k,replace:T,shallow:C,scroll:E,onClick:M,onMouseEnter:P,onTouchStart:$,legacyBehavior:R=!1,onNavigate:O,transitionTypes:A,ref:L,unstable_dynamicOnHover:D,...U}=t;a=N,R&&("string"==typeof a||"number"==typeof a)&&(a=(0,s.jsx)("a",{children:a}));let I=o.default.useContext(u.AppRouterContext),K=!1!==S,B=!1!==S?null===(n=S)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,F="string"==typeof(r=w||j)?r:(0,i.formatUrl)(r);if(R){if(a?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});l=o.default.Children.only(a)}let W=R?l&&"object"==typeof l&&l.ref:L,z=o.default.useCallback(e=>(null!==I&&(_.current=(0,p.mountLinkInstance)(e,F,I,B,K,v)),()=>{_.current&&((0,p.unmountLinkForCurrentNavigation)(_.current),_.current=null),(0,p.unmountPrefetchableInstance)(e)}),[K,F,I,B,v]),G={ref:(0,c.useMergedRef)(z,W),onClick(t){R||"function"!=typeof M||M(t),R&&l.props&&"function"==typeof l.props.onClick&&l.props.onClick(t),!I||t.defaultPrevented||function(t,r,n,a,l,s,i){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),s){let e=!1;if(s({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);o.default.startTransition(()=>{d(r,a?"replace":"push",!1===l?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,i)})}}(t,F,_,T,E,O,A)},onMouseEnter(e){R||"function"!=typeof P||P(e),R&&l.props&&"function"==typeof l.props.onMouseEnter&&l.props.onMouseEnter(e),I&&K&&(0,p.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){R||"function"!=typeof $||$(e),R&&l.props&&"function"==typeof l.props.onTouchStart&&l.props.onTouchStart(e),I&&K&&(0,p.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(F)?G.href=F:R&&!k&&("a"!==l.type||"href"in l.props)||(G.href=(0,m.addBasePath)(F)),x=R?o.default.cloneElement(l,G):(0,s.jsx)("a",{...U,...G,children:a}),(0,s.jsx)(b.Provider,{value:y,children:x})}e.r(10364);let b=(0,o.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},28089,e=>{"use strict";var t=e.i(54710);e.s(["HelpIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,t.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),(0,t.jsx)("path",{d:"M12 17h.01"})]})}])},14574,e=>{"use strict";var t=e.i(34995);e.s(["get_tracker_keyboard_shortcut_sections",0,function(){return[...(0,t.get_app_keyboard_shortcut_sections)(),{title:"Tracker",entries:[{label:"C",description:"Check in (focus description)"},{label:"O",description:"Check out"},{label:"E",description:"Edit active entry"},{label:"N",description:"Add note to active entry"},{label:"[",description:"Previous sheet"},{label:"]",description:"Next sheet"}]}]}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),a=e.i(34416),l=e.i(28089),s=e.i(88680),o=e.i(34995),i=e.i(14574);function u(){let e=(0,n.usePathname)(),r=(0,a.useMemo)(()=>"/"===e?(0,i.get_tracker_keyboard_shortcut_sections)():(0,o.get_app_keyboard_shortcut_sections)(),[e]);return(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Keyboard shortcuts","aria-describedby":"keyboard-shortcuts-tooltip",children:(0,t.jsx)(l.HelpIcon,{})}),(0,t.jsx)("div",{id:"keyboard-shortcuts-tooltip",role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 w-max max-w-[min(18rem,calc(100vw-2.5rem))] pt-2 opacity-0 transition-opacity duration-150 group-hover:pointer-events-auto group-hover:opacity-100 group-focus-within:pointer-events-auto group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-lg border border-panel-border bg-panel p-3 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Keyboard shortcuts"}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(s.KeyboardShortcutsContent,{sections:r,compact:!0})})]})})]})}function c(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}function d(){return c()}function m(){return"dark"}var f=e.i(35434),p=e.i(17798),h=e.i(10464),g=e.i(81553);function x(){let e="dark"===c()?"light":"dark";(0,p.apply_theme)(e),(0,g.write_stored_theme)(e),h.theme_mode_preference.write(e),h.theme_mode_preference.notify(),(0,f.notify_theme_subscribers)()}function b(){let e=(0,a.useSyncExternalStore)(f.subscribe_theme,d,m),r="dark"===e?"Dark":"Light",n="dark"===e?"Switch to light theme":"Switch to dark theme";return(0,t.jsxs)("button",{type:"button",className:"inline-flex cursor-pointer items-center gap-1.5 rounded-full border border-panel-border bg-ghost-bg px-3 py-1.5 font-inherit text-[0.85rem] font-semibold text-inherit hover:bg-surface-hover disabled:cursor-wait disabled:opacity-60",onClick:x,"aria-label":`${r} theme. ${n}`,title:n,suppressHydrationWarning:!0,children:[(0,t.jsx)("span",{className:"text-base leading-none","aria-hidden":"true",children:"dark"===e?"☾":"☀"}),(0,t.jsx)("span",{suppressHydrationWarning:!0,children:r})]})}function y({current:e,parent:n}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==n.href?(0,t.jsx)(r.default,{className:"text-muted no-underline hover:text-foreground",href:n.href,children:n.label}):(0,t.jsx)("span",{className:"text-muted",children:n.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"font-medium text-foreground","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-5",children:[(0,t.jsx)("span",{className:"inline-flex shrink-0 items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)(y,{current:e.current,parent:e.parent}):null,(0,t.jsxs)("div",{className:"ml-auto flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/",children:"Tracker"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/reporting",children:"Reporting"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/settings/tags",children:"Manage tags"}),(0,t.jsx)(r.default,{className:"rounded-full px-3 py-1.5 text-[0.85rem] font-semibold text-muted no-underline hover:bg-surface-hover hover:text-foreground",href:"/settings",children:"Settings"}),(0,t.jsx)(u,{}),(0,t.jsx)(b,{})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},14260,18774,e=>{"use strict";var t=e.i(54710),r=e.i(34416);function n(e){return e.startsWith("@")?e:`@${e}`}e.s(["format_display_tag",0,n],18774);var a=e.i(52405);e.s(["TagAutocompleteInput",0,function({id:e,value:l,known_tags:s,placeholder:o,disabled:i=!1,autoFocus:u=!1,on_change:c}){let d=(0,r.useRef)(null),m=(0,r.useRef)(null),f=(0,r.useRef)(null),[p,h]=(0,r.useState)(0),[g,x]=(0,r.useState)(0),b=function(e,t){let r=e.slice(0,t),n=r.lastIndexOf("@");if(-1===n)return null;let a=r.slice(n+1);return/\s/.test(a)?null:{query:a,start_index:n,end_index:t}}(l,p),y=null===b?[]:function(e,t,r=10){let n=t.toLowerCase();return e.filter(e=>{let t=e.replace(/^@/,"").toLowerCase();return 0===n.length||t.startsWith(n)}).slice(0,r)}(s,b.query),v=null!==b&&y.length>0&&!i;(0,r.useLayoutEffect)(()=>{null!==f.current&&null!==d.current&&(d.current.setSelectionRange(f.current,f.current),h(f.current),f.current=null)},[l]),(0,r.useEffect)(()=>{x(0)},[l,p,y.length]);let _=()=>{h(d.current?.selectionStart??l.length)},j=()=>{x(0)},w=e=>{let t,r,a;if(null===b)return;let{next_text:s,next_cursor:o}=(t=n(e),r=l.slice(0,b.start_index),a=l.slice(b.end_index),{next_text:`${r}${t}${a}`,next_cursor:r.length+t.length});f.current=o,c(s),j()};return(0,t.jsxs)("div",{className:"relative min-w-0",children:[(0,t.jsx)("input",{ref:d,id:e,type:"text",className:(0,a.get_input_class_name)(),value:l,placeholder:o,disabled:i,autoFocus:u,autoComplete:"off","aria-autocomplete":"list","aria-expanded":v,"aria-controls":v?`${e}-tag-suggestions`:void 0,onChange:e=>{c(e.target.value),h(e.target.selectionStart??e.target.value.length)},onClick:_,onKeyUp:_,onKeyDown:e=>{if(v){if("ArrowDown"===e.key){e.preventDefault(),x(e=>(e+1)%y.length);return}if("ArrowUp"===e.key){e.preventDefault(),x(e=>(e-1+y.length)%y.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=y[g];void 0!==t&&w(t);return}"Escape"===e.key&&(e.preventDefault(),j())}},onBlur:()=>{window.setTimeout(j,120)}}),v?(0,t.jsx)("ul",{ref:m,id:`${e}-tag-suggestions`,role:"listbox",className:"absolute left-0 right-0 top-full z-20 mt-1 max-h-48 list-none overflow-y-auto rounded-md border border-panel-border bg-panel p-1.5 shadow-md",children:y.map((e,r)=>(0,t.jsx)("li",{role:"option","aria-selected":r===g,children:(0,t.jsx)("button",{type:"button",className:`block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover ${r===g?"bg-surface-hover":""}`,onMouseDown:t=>{t.preventDefault(),w(e)},children:n(e)})},e))}):null]})}],14260)},2286,e=>{"use strict";var t=e.i(54710),r=e.i(34416),n=e.i(14974),a=e.i(42800),l=e.i(17446),s=e.i(75404);function o({breadcrumb:e,title:r,description:n,children:i}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.SettingsSavedToast,{}),(0,t.jsx)(s.TrackerTopbar,{breadcrumb:e}),(0,t.jsxs)("main",{className:"mx-auto grid w-full max-w-[1120px] grid-cols-[minmax(12rem,16rem)_minmax(0,1fr)] gap-6 px-5 pb-10 pt-6 max-[860px]:grid-cols-1",children:[(0,t.jsxs)("aside",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Settings"}),(0,t.jsx)(a.SettingsNav,{})]}),(0,t.jsxs)("section",{className:"flex min-w-0 flex-col gap-4",children:[(0,t.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h1",{className:"m-0 text-[1.35rem] font-[650] tracking-tight",children:r}),void 0!==n?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:n}):null]}),i]})]})]})}var i=e.i(14260),u=e.i(18774),c=e.i(52663),d=e.i(52405);function m(e,t,r){let n=e.map(e=>(0,u.format_display_tag)(e)).join(", "),a=(0,u.format_display_tag)(t),l=1===r?"1 entry will be updated.":`${r} entries will be updated.`;return{title:"Merge tags?",message:`Merge ${n} into ${a}? ${l}`,confirmLabel:"Merge tags",variant:"danger"}}e.s(["TagManagementView",0,function({initial_tags:e}){let{confirm:a}=(0,n.use_confirm_dialog)(),[l,s]=(0,r.useState)(e),[f,p]=(0,r.useState)(()=>new Set),[h,g]=(0,r.useState)({}),[x,b]=(0,r.useState)(""),[y,v]=(0,r.useState)(null),[_,j]=(0,r.useState)(null),[w,N]=(0,r.useState)(!1),S=(0,r.useMemo)(()=>l.map(e=>e.name),[l]),k=l.filter(e=>f.has(e.name)).reduce((e,t)=>e+t.entryCount,0),T=async e=>{let t=await fetch("/api/tags",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json()).error??"Tag update failed");let r=await t.json();s(r.tags),p(new Set),j(1===r.entries_updated?"Updated 1 entry.":`Updated ${r.entries_updated} entries.`)},C=async e=>{let t=h[e]?.trim()??"";if(0===t.length)return void v("Enter a new tag name.");let r=l.find(t=>t.name===e);if(void 0===r)return;let n=l.find(e=>(0,u.format_display_tag)(e.name)===(0,u.format_display_tag)(t)),s=void 0!==n&&n.name!==e?r.entryCount+n.entryCount:r.entryCount;if(await a(m([e],t,s))){N(!0),v(null),j(null);try{await T({action:"rename",fromTag:e,toTag:t}),g(t=>{let r={...t};return delete r[e],r})}catch(e){v(e instanceof Error?e.message:String(e))}finally{N(!1)}}},E=async()=>{let e=[...f];if(e.length<2)return void v("Select at least two tags to merge.");if(0===x.trim().length)return void v("Enter a target tag for the merge.");if(await a(m(e,x,k))){N(!0),v(null),j(null);try{await T({action:"merge",sourceTags:e,targetTag:x}),b("")}catch(e){v(e instanceof Error?e.message:String(e))}finally{N(!1)}}};return(0,t.jsxs)(o,{breadcrumb:{current:"Tag management",parent:{label:"Settings",href:"/settings"}},title:"Tag management",description:"Rename or merge tags across every entry in your database.",children:[(0,t.jsxs)("section",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Merge tags"}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.8rem] leading-snug text-muted",children:"Select two or more tags below, then choose the tag they should become."}),(0,t.jsxs)("label",{className:"mt-3 flex flex-col gap-1 text-[0.82rem] text-muted",children:["Target tag",(0,t.jsx)(i.TagAutocompleteInput,{id:"merge-target-tag",value:x,known_tags:S,placeholder:"e.g. @project",disabled:w,on_change:b})]}),(0,t.jsxs)("button",{type:"button",className:`${(0,c.get_button_class_name)("primary","small")} mt-3`,disabled:w||f.size<2,onClick:()=>void E(),children:["Merge ",f.size," tags"]})]}),0===l.length?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"No tags yet. Add @tags when you check in to an entry."}):(0,t.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0","aria-label":"Tags",children:l.map(e=>(0,t.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-2.5 shadow-sm",children:(0,t.jsxs)("form",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",onSubmit:t=>{t.preventDefault(),C(e.name)},children:[(0,t.jsx)("input",{type:"checkbox",className:"shrink-0",checked:f.has(e.name),disabled:w,"aria-label":`Select ${(0,u.format_display_tag)(e.name)}`,onChange:()=>{var t;return t=e.name,void p(e=>{let r=new Set(e);return r.has(t)?r.delete(t):r.add(t),r})}}),(0,t.jsxs)("div",{className:"flex min-w-0 shrink-0 flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[(0,t.jsx)("span",{className:"font-semibold leading-tight",children:(0,u.format_display_tag)(e.name)}),(0,t.jsxs)("span",{className:"text-[0.82rem] text-muted",children:[e.entryCount," ",1===e.entryCount?"entry":"entries"]})]}),(0,t.jsxs)("div",{className:"ml-auto flex min-w-[min(100%,14rem)] flex-1 basis-56 items-center justify-end gap-2 sm:max-w-xs",children:[(0,t.jsx)("input",{className:(0,d.get_input_class_name)("compact"),value:h[e.name]??"",placeholder:"Rename to…","aria-label":`Rename ${(0,u.format_display_tag)(e.name)}`,disabled:w,onChange:t=>g(r=>({...r,[e.name]:t.target.value}))}),(0,t.jsx)("button",{type:"submit",className:`${(0,c.get_button_class_name)("ghost","small")} shrink-0`,disabled:w||(h[e.name]?.trim().length??0)===0,children:"Rename"})]})]})},e.name))}),null!==_?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-accent",children:_}):null,null!==y?(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-danger",children:y}):null]})}],2286)}]);