super-time-tracker-ui 0.1.30 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/standalone/next-output/BUILD_ID +1 -1
- package/dist/standalone/next-output/app-path-routes-manifest.json +1 -0
- package/dist/standalone/next-output/build-manifest.json +3 -3
- package/dist/standalone/next-output/routes-manifest.json +6 -0
- package/dist/standalone/next-output/server/app/_global-error.html +1 -1
- package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/app-paths-manifest.json +3 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/build-manifest.json +17 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/next-font-manifest.json +11 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/react-loadable-manifest.json +1 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/server-reference-manifest.json +4 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page.js +16 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -0
- package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +3 -0
- package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app-paths-manifest.json +1 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0.ztg_g._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0a7wn1j._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0z~i_next_dist_esm_build_templates_app-page_0r4hd.l.js +4 -0
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0bowsf1._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0k~hq1g._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0oqgod_._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_002dssm._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_00ic3j9._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_00x~ete._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_07p~0bg._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/{_10n~~xo._.js → _088~qfj._.js} +3 -3
- package/dist/standalone/next-output/server/chunks/ssr/_08qe8j9._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0agxxbf._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0c0txs~._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0cxg26n._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0l6-7m4._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0m.iebm._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0nnp~ae._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0q~8_bm._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0v9kigy._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/_0y3ypyx._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_13crob-._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_13y76jr._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_next-internal_server_app_settings_quick-actions_page_actions_031bu28.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +1 -1
- package/dist/standalone/next-output/server/middleware-build-manifest.js +3 -3
- package/dist/standalone/next-output/server/middleware-manifest.json +1 -1
- package/dist/standalone/next-output/server/next-font-manifest.js +1 -1
- package/dist/standalone/next-output/server/next-font-manifest.json +4 -0
- package/dist/standalone/next-output/server/pages/500.html +1 -1
- package/dist/standalone/next-output/static/chunks/0.4obx1-sv46-.js +1 -0
- package/dist/standalone/next-output/static/chunks/029pvmqxn_t4z.js +1 -0
- package/dist/standalone/next-output/static/chunks/04~.lbegcwd41.js +1 -0
- package/dist/standalone/next-output/static/chunks/05tg.ske01w0a.js +1 -0
- package/dist/standalone/next-output/static/chunks/06xf_oh5oqbs2.js +1 -0
- package/dist/standalone/next-output/static/chunks/09acxdggb87~w.js +1 -0
- package/dist/standalone/next-output/static/chunks/09tjbwcc~3p_e.js +1 -0
- package/dist/standalone/next-output/static/chunks/0crn_fc6.6569.js +1 -0
- package/dist/standalone/next-output/static/chunks/0fkr5kz7p1r5l.js +1 -0
- package/dist/standalone/next-output/static/chunks/0lhj2p9.4g20~.js +1 -0
- package/dist/standalone/next-output/static/chunks/0o4zvrm3q.9k3.js +1 -0
- package/dist/standalone/next-output/static/chunks/0pqilbd~jphqs.css +3 -0
- package/dist/standalone/next-output/static/chunks/0q05k1wfzh4_a.js +1 -0
- package/dist/standalone/next-output/static/chunks/0vov8ngx9~8m2.js +1 -0
- package/dist/standalone/next-output/static/chunks/0watkjb-fw0vn.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0znvz4n7decra.js → 0x9s1xcq69ppx.js} +5 -5
- package/dist/standalone/next-output/static/chunks/0xj4dodycy1oc.js +1 -0
- package/dist/standalone/next-output/static/chunks/12eaief5vtso9.js +1 -0
- package/dist/standalone/next-output/static/chunks/13-nw2q_c_9mk.js +1 -0
- package/dist/standalone/next-output/static/chunks/14jtaz5s.4ih1.js +1 -0
- package/dist/standalone/package.json +1 -1
- package/package.json +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0-hc~ba._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_00_8gfw._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_059wg4v._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_08dnxqq._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0hs4c5u._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0nz4ym1._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/_0wg9~zr._.js +0 -3
- package/dist/standalone/next-output/static/chunks/00rjs5ywh4_np.css +0 -3
- package/dist/standalone/next-output/static/chunks/03d24rbiv.lx7.js +0 -1
- package/dist/standalone/next-output/static/chunks/03flgrd7bw9r5.js +0 -1
- package/dist/standalone/next-output/static/chunks/041fttxys-zjw.js +0 -1
- package/dist/standalone/next-output/static/chunks/055~9w5b9lao5.js +0 -1
- package/dist/standalone/next-output/static/chunks/09mbpw08eiqwx.js +0 -1
- package/dist/standalone/next-output/static/chunks/0bw3uow4-~3fr.js +0 -1
- package/dist/standalone/next-output/static/chunks/0d2d-s..s8cfz.js +0 -1
- package/dist/standalone/next-output/static/chunks/0h72~3~6gq3fn.js +0 -1
- package/dist/standalone/next-output/static/chunks/0hhu330gm_fnl.js +0 -1
- package/dist/standalone/next-output/static/chunks/0ls_5qyf15z5_.js +0 -1
- package/dist/standalone/next-output/static/chunks/0n0.21h11yrv2.js +0 -1
- package/dist/standalone/next-output/static/chunks/0n2~cs.u7bygu.js +0 -1
- package/dist/standalone/next-output/static/chunks/0sywv5h95uodq.js +0 -1
- package/dist/standalone/next-output/static/chunks/0xccil3r~k_7n.js +0 -1
- package/dist/standalone/next-output/static/chunks/0~z41.7~3tpw3.js +0 -1
- package/dist/standalone/next-output/static/chunks/14oa3e0hktvxi.js +0 -1
- package/dist/standalone/next-output/static/chunks/15ixzo9s2kj_o.js +0 -1
- /package/dist/standalone/next-output/static/{Ohbr2ePvonj7GxdJPkXBY → gS32e4Tv_70ot1IWBJddE}/_buildManifest.js +0 -0
- /package/dist/standalone/next-output/static/{Ohbr2ePvonj7GxdJPkXBY → gS32e4Tv_70ot1IWBJddE}/_clientMiddlewareManifest.js +0 -0
- /package/dist/standalone/next-output/static/{Ohbr2ePvonj7GxdJPkXBY → gS32e4Tv_70ot1IWBJddE}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,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)())}])},39474,20993,e=>{"use strict";var t=e.i(13349),r=e.i(32417),n=e.i(44171),a=e.i(28274);let i=null,o=Promise.resolve();function s(){(0,r.is_supabase_configured)()&&(0,n.is_cloud_sync_enabled)()&&(null!==i&&clearTimeout(i),i=setTimeout(()=>{i=null,o=o.then(()=>(0,a.run_tracker_db_cloud_sync)()).catch(()=>{})},400))}function l(){(0,t.is_greedy_cloud_sync_enabled)()&&s()}e.s(["schedule_tracker_db_cloud_sync",0,l],20993),e.s(["push_tracker_db_cloud_after_change",0,function(){(0,t.is_greedy_cloud_sync_enabled)()?l():s()}],39474)},42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(44066)._(e.r(78677)),o=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",s=e.hash||"",l=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)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(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(29158);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=i(e,n)),t&&(a.current=i(t,n))},[e,t])}function i(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 i}});let n=e.r(31047),a=e.r(63334);function i(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 y}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(44066),o=e.r(54710),s=i._(e.r(29158)),l=e.r(42552),u=e.r(61717),c=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 a,i,g,[y,x]=(0,s.useOptimistic)(p.IDLE_LINK_STATUS),w=(0,s.useRef)(null),{href:v,as:k,children:E,prefetch:S=null,passHref:O,replace:T,shallow:j,scroll:N,onClick:A,onMouseEnter:D,onTouchStart:L,legacyBehavior:C=!1,onNavigate:P,transitionTypes:M,ref:G,unstable_dynamicOnHover:R,...F}=t;a=E,C&&("string"==typeof a||"number"==typeof a)&&(a=(0,o.jsx)("a",{children:a}));let Y=s.default.useContext(u.AppRouterContext),U=!1!==S,I=!1!==S?null===(n=S)||"auto"===n?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=k||v)?r:(0,l.formatUrl)(r);if(C){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});i=s.default.Children.only(a)}let $=C?i&&"object"==typeof i&&i.ref:G,q=s.default.useCallback(e=>(null!==Y&&(w.current=(0,p.mountLinkInstance)(e,K,Y,I,U,x)),()=>{w.current&&((0,p.unmountLinkForCurrentNavigation)(w.current),w.current=null),(0,p.unmountPrefetchableInstance)(e)}),[U,K,Y,I,x]),W={ref:(0,c.useMergedRef)(q,$),onClick(t){C||"function"!=typeof A||A(t),C&&i.props&&"function"==typeof i.props.onClick&&i.props.onClick(t),!Y||t.defaultPrevented||function(t,r,n,a,i,o,l){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,_.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);s.default.startTransition(()=>{d(r,a?"replace":"push",!1===i?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,K,w,T,N,P,M)},onMouseEnter(e){C||"function"!=typeof D||D(e),C&&i.props&&"function"==typeof i.props.onMouseEnter&&i.props.onMouseEnter(e),Y&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===R)},onTouchStart:function(e){C||"function"!=typeof L||L(e),C&&i.props&&"function"==typeof i.props.onTouchStart&&i.props.onTouchStart(e),Y&&U&&(0,p.onNavigationIntent)(e.currentTarget,!0===R)}};return(0,d.isAbsoluteUrl)(K)?W.href=K:C&&!O&&("a"!==i.type||"href"in i.props)||(W.href=(0,f.addBasePath)(K)),g=C?s.default.cloneElement(i,W):(0,o.jsx)("a",{...F,...W,children:a}),(0,o.jsx)(b.Provider,{value:y,children:g})}e.r(10364);let b=(0,s.createContext)(p.IDLE_LINK_STATUS),y=()=>(0,s.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),a.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),a=e.i(32417),i=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[o,s]=(0,r.useState)(null),[l,u]=(0,r.useState)(!1),c=(0,a.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!c)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{s(e?.user.email??null)}).catch(()=>{s(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{s(t?.user.email??null)});return()=>{t.unsubscribe()}},[c]),{is_configured:c,email:o,is_pending:l,sign_out:(0,r.useCallback)(async()=>{u(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,i.notify_settings_saved)("Signed out"),e.refresh()}finally{u(!1)}},[e])}}])},45200,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let a=[{href:"/",label:"Tracker",match:e=>"/"===e}];function i(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:a.map(n=>{let a=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":a?"page":void 0,children:n.label},n.href)})})}],45200);var o=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,o.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(i,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},73205,2268,76003,38240,e=>{"use strict";let t=new Set(e.i(22373).topbar_quick_action_ids),r=["today","reporting","pomodoro"];e.s(["parse_topbar_quick_actions",0,function(e){try{let n=JSON.parse(e);if(!Array.isArray(n))return r;let a=n.filter(e=>"string"==typeof e&&t.has(e));return Array.from(new Set(a))}catch{return r}}],73205);var n=e.i(34869),a=e.i(92629);let i=(0,n.create_ui_preference_store)({storage_key:a.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:a.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function o(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,i],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return o()}],76003);var s=e.i(17798),l=e.i(46549),u=e.i(10464),c=e.i(35434),d=e.i(61834),f=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===o()?"light":"dark";(0,s.apply_theme)(e),(0,f.write_stored_theme)(e),u.theme_mode_preference.write(e),(0,d.write_document_preference_cookies)({theme_mode:e,theme:e}),u.theme_mode_preference.notify(),(0,c.notify_theme_subscribers)(),(0,l.notify_settings_saved)()}],38240)},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),a=e.i(29158),i=e.i(37399),o=e.i(90463),s=e.i(46549),l=e.i(73205),u=e.i(66295),c=e.i(2268),d=e.i(32792),f=e.i(90299),h=e.i(28274),p=e.i(76003),_=e.i(35434),m=e.i(38240),g=e.i(22373),b=e.i(25204),y=e.i(77882);let x="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",w={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},v=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),k=(0,n.usePathname)()??"/",E=(0,a.useSyncExternalStore)(_.subscribe_theme,p.get_theme_snapshot,p.get_theme_server_snapshot),S=(0,a.useSyncExternalStore)(c.cloud_sync_enabled_preference.subscribe,c.cloud_sync_enabled_preference.get_snapshot,c.cloud_sync_enabled_preference.get_server_snapshot),O=(0,a.useSyncExternalStore)(f.tracker_shortcut_map_preference.subscribe,f.tracker_shortcut_map_preference.get_snapshot,f.tracker_shortcut_map_preference.get_server_snapshot),T=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),j=(0,u.parse_tracker_shortcut_map)(O),N=new Set((0,l.parse_topbar_quick_actions)(T)),A=g.topbar_quick_action_ids.filter(e=>!N.has(e)),D=Array.from(new Set([...Array.from(v),...A])),{email:L,is_configured:C,is_pending:P,sign_out:M}=(0,y.use_supabase_auth_session)(),[G,R]=(0,a.useState)(!1),F=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!G)return;let e=e=>{null===F.current||F.current.contains(e.target)||R(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[G]);let Y=()=>{R(!1)};return(0,b.use_escape_to_cancel)(Y,G),(0,t.jsxs)("div",{className:"relative shrink-0",ref:F,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":G,"aria-haspopup":"menu",onClick:()=>R(e=>!e),children:(0,t.jsx)(i.HamburgerIcon,{})}),G?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[C&&null!==L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:L,children:L})}):null,D.map(e=>{let n=w[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:x,role:"menuitem",onClick:Y,children:n.label})},e)}),C?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitemcheckbox","aria-checked":"true"===S,onClick:()=>{let e="true"===S?"false":"true";c.cloud_sync_enabled_preference.write(e),c.cloud_sync_enabled_preference.notify(),(0,s.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==L&&(0,h.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===S?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===S?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitem",onClick:()=>{Y(),(0,m.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===E?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===E?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitem",onClick:()=>{let e;Y(),e=j.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),C?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:x,role:"menuitem",onClick:()=>{Y(),e.push((0,o.build_auth_page_href)("sign_in",k))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${x} text-danger`,role:"menuitem",disabled:P,onClick:()=>{Y(),M()},children:P?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let k=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",i=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),o=(0,a.useMemo)(()=>(0,l.parse_topbar_quick_actions)(i),[i]);if(0===o.length)return null;let s=k.filter(e=>o.includes(e.id));return 0===s.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:s.map(n=>{let a=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":a?"page":void 0,children:n.label},n.id)})})}],76080)},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),a=e.i(1976),i=e.i(76080),o=e.i(45958),s=e.i(71060),l=e.i(29539);function u(){let e=((0,s.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(o.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(l.SettingsIcon,{})})}function c({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(o.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(o.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(c,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(i.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(u,{}),(0,t.jsx)(a.TopbarOverflowMenu,{})]})]})]})})}],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}])},31113,e=>{"use strict";e.s(["normalize_stored_tag",0,function(e){let t=e.trim().replace(/^@+/,"");if(0===t.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(t))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${t}`}])},18774,e=>{"use strict";e.s(["format_display_tag",0,function(e){return e.startsWith("@")?e:`@${e}`}])},14260,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(18774),a=e.i(52405),i=e.i(31113);e.s(["TagAutocompleteInput",0,function({id:e,value:o,known_tags:s,placeholder:l,disabled:u=!1,autoFocus:c=!1,on_change:d}){let f=(0,r.useRef)(null),h=(0,r.useRef)(null),p=(0,r.useRef)(null),[_,m]=(0,r.useState)(0),[g,b]=(0,r.useState)(0),y=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}}(o,_),x=null===y?[]: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,y.query),w=null!==y&&function(e,t){if(!/^\w+$/.test(e))return!1;let r=e.toLowerCase();return t.some(e=>{try{return(0,i.normalize_stored_tag)(e).slice(1).toLowerCase()===r}catch{return!1}})}(y.query,s),v=null!==y&&x.length>0&&!w&&!u;(0,r.useLayoutEffect)(()=>{null!==p.current&&null!==f.current&&(f.current.setSelectionRange(p.current,p.current),m(p.current),p.current=null)},[o]),(0,r.useEffect)(()=>{b(0)},[o,_,x.length]);let k=()=>{m(f.current?.selectionStart??o.length)},E=()=>{b(0)},S=e=>{let t,r,a;if(null===y)return;let{next_text:i,next_cursor:s}=(t=(0,n.format_display_tag)(e),r=o.slice(0,y.start_index),a=o.slice(y.end_index),{next_text:`${r}${t}${a}`,next_cursor:r.length+t.length});p.current=s,d(i),E()};return(0,t.jsxs)("div",{className:"relative min-w-0",children:[(0,t.jsx)("input",{ref:f,id:e,type:"text",className:(0,a.get_input_class_name)(),value:o,placeholder:l,disabled:u,autoFocus:c,autoComplete:"off","aria-autocomplete":"list","aria-expanded":v,"aria-controls":v?`${e}-tag-suggestions`:void 0,onChange:e=>{d(e.target.value),m(e.target.selectionStart??e.target.value.length)},onClick:k,onKeyUp:k,onKeyDown:e=>{if(v){if("ArrowDown"===e.key){e.preventDefault(),b(e=>(e+1)%x.length);return}if("ArrowUp"===e.key){e.preventDefault(),b(e=>(e-1+x.length)%x.length);return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault();let t=x[g];void 0!==t&&S(t);return}"Escape"===e.key&&(e.preventDefault(),E())}},onBlur:()=>{window.setTimeout(E,120)}}),v?(0,t.jsx)("ul",{ref:h,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:x.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(),S(e)},children:(0,n.format_display_tag)(e)})},e))}):null]})}],14260)},66770,e=>{"use strict";e.s(["get_entry_list_sort_options",0,function(){return[{value:"newest",label:"Newest"},{value:"oldest",label:"Oldest"},{value:"duration",label:"Duration"},{value:"description",label:"Description"}]}])},35877,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DEBUG_LOGGING_STORAGE_KEY,default_value:r.DEBUG_LOGGING_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["debug_logging_preference",0,n])},85323,e=>{"use strict";var t=e.i(49087);e.s(["notify_desktop",0,function(e){if((0,t.notify_in_app)({title:e.title,body:e.body}),"u"<typeof Notification||"u">typeof document&&"visible"===document.visibilityState&&document.hasFocus()||"granted"!==Notification.permission)return;let{body:r,tag:n,title:a}=e,i={body:r,...void 0!==n?{tag:n}:{}};try{new Notification(a,i)}catch{}},"supports_desktop_notifications",0,function(){return"u">typeof Notification}])},48541,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DESKTOP_NOTIFICATIONS_STORAGE_KEY,default_value:r.DESKTOP_NOTIFICATIONS_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["desktop_notifications_preference",0,n])},69472,84545,50937,83327,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.CLAUDE_API_KEY_STORAGE_KEY,default_value:r.CLAUDE_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["claude_api_key_preference",0,n],69472);let a=(0,t.create_ui_preference_store)({storage_key:r.ENTRY_SUGGESTION_PROVIDER_STORAGE_KEY,default_value:r.ENTRY_SUGGESTION_PROVIDER_DEFAULT,is_valid:e=>"none"===e||"openai"===e||"claude"===e||"google_ai"===e});e.s(["entry_suggestion_provider_preference",0,a],84545);let i=(0,t.create_ui_preference_store)({storage_key:r.GOOGLE_AI_API_KEY_STORAGE_KEY,default_value:r.GOOGLE_AI_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["google_ai_api_key_preference",0,i],50937);let o=(0,t.create_ui_preference_store)({storage_key:r.OPENAI_API_KEY_STORAGE_KEY,default_value:r.OPENAI_API_KEY_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["openai_api_key_preference",0,o],83327)},90873,e=>{"use strict";var t=e.i(54710),r=e.i(29158);let n="inline-flex shrink-0 cursor-pointer items-center gap-1.5";e.s(["Checkbox",0,function({checked:e,disabled:a=!1,indeterminate:i=!1,nested:o=!1,on_change:s,label:l,aria_label:u,className:c}){let d=(0,r.useRef)(null);(0,r.useEffect)(()=>{null!==d.current&&(d.current.indeterminate=i)},[i]);let f=void 0===c?n:`${n} ${c}`,h=(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:a,"aria-label":o&&void 0===l?u:void 0,onChange:s}),(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 o?(0,t.jsx)("span",{className:f,children:h}):(0,t.jsxs)("label",{className:f,children:[h,void 0!==l?(0,t.jsx)("span",{className:"select-none text-[0.8rem] leading-tight text-muted",children:l}):null]})}])},83821,60145,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=30&&t<=720}});e.s(["daily_focus_target_minutes_preference",0,n],83821);let a=(0,t.create_ui_preference_store)({storage_key:r.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:r.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:e=>{if(!/^\d+$/.test(e))return!1;let t=Number.parseInt(e,10);return t>=60&&t<=4200}});e.s(["weekly_focus_target_minutes_preference",0,a],60145)},1238,51703,74597,77130,56442,73228,e=>{"use strict";e.s(["parse_focus_goals_by_name",0,function(e){if(0===e.length)return{};try{let t=JSON.parse(e);if(null===t||"object"!=typeof t||Array.isArray(t))return{};let r={};for(let[e,n]of Object.entries(t)){if(null===n||"object"!=typeof n)continue;let t={};"string"==typeof n.daily&&n.daily.length>0&&(t.daily=n.daily),"string"==typeof n.weekly&&n.weekly.length>0&&(t.weekly=n.weekly),(void 0!==t.daily||void 0!==t.weekly)&&(r[e]=t)}return r}catch{return{}}}],1238);var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SCOPE_STORAGE_KEY,default_value:r.FOCUS_GOAL_SCOPE_DEFAULT,is_valid:e=>"global"===e||"sheet"===e||"tag"===e});e.s(["focus_goal_scope_preference",0,n],51703);let a=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_SHEET_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_SHEET_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_sheet_name_preference",0,a],74597);let i=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOAL_TAG_NAME_STORAGE_KEY,default_value:r.FOCUS_GOAL_TAG_NAME_DEFAULT,is_valid:e=>e.trim().length>0});e.s(["focus_goal_tag_name_preference",0,i],77130);let o=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_SHEET_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_SHEET_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_sheet_preference",0,o],56442);let s=(0,t.create_ui_preference_store)({storage_key:r.FOCUS_GOALS_PER_TAG_STORAGE_KEY,default_value:r.FOCUS_GOALS_PER_TAG_DEFAULT,is_valid:e=>{if(0===e.length)return!1;try{let t=JSON.parse(e);return null!==t&&"object"==typeof t&&!Array.isArray(t)}catch{return!1}}});e.s(["focus_goals_per_tag_preference",0,s],73228)},39552,36519,35292,7312,43360,69978,42874,66852,16245,93415,e=>{"use strict";var t=e.i(26313),r=e.i(36145),n=e.i(72424),a=e.i(16913),i=e.i(8627),o=e.i(29263);function s(e,t){let r=(0,o.toDate)(e,t?.in);return r.setHours(0,0,0,0),r}function l(e,t){let r=(0,o.toDate)(e,t?.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}function u(e,t){let n=(0,r.getDefaultOptions)(),a=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=(0,o.toDate)(e,t?.in),s=i.getDay();return i.setDate(i.getDate()-(7*(s<a)+s-a)),i.setHours(0,0,0,0),i}function c(e,t){return u(e,{...t,weekStartsOn:1})}e.s(["startOfDay",0,s],36519),e.s(["startOfYear",0,l],35292),e.s(["startOfWeek",0,u],7312),e.s(["startOfISOWeek",0,c],43360);var d=e.i(25402);function f(e,t){let r=(0,o.toDate)(e,t?.in),n=r.getFullYear(),a=(0,d.constructFrom)(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);let i=c(a),s=(0,d.constructFrom)(r,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);let l=c(s);return r.getTime()>=i.getTime()?n+1:r.getTime()>=l.getTime()?n:n-1}function h(e,t){let r,n,a=(0,o.toDate)(e,t?.in);return Math.round((c(a)-(r=f(a,void 0),(n=(0,d.constructFrom)(a,0)).setFullYear(r,0,4),n.setHours(0,0,0,0),c(n)))/i.millisecondsInWeek)+1}function p(e,t){let n=(0,o.toDate)(e,t?.in),a=n.getFullYear(),i=(0,r.getDefaultOptions)(),s=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,l=(0,d.constructFrom)(t?.in||e,0);l.setFullYear(a+1,0,s),l.setHours(0,0,0,0);let c=u(l,t),f=(0,d.constructFrom)(t?.in||e,0);f.setFullYear(a,0,s),f.setHours(0,0,0,0);let h=u(f,t);return+n>=+c?a+1:+n>=+h?a:a-1}function _(e,t){let n,a,s,l,c=(0,o.toDate)(e,t?.in);return Math.round((u(c,t)-(n=(0,r.getDefaultOptions)(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,s=p(c,t),(l=(0,d.constructFrom)(t?.in||c,0)).setFullYear(s,0,a),l.setHours(0,0,0,0),u(l,t)))/i.millisecondsInWeek)+1}function m(e,t){let r=Math.abs(e).toString().padStart(t,"0");return(e<0?"-":"")+r}e.s(["getISOWeek",0,h],69978),e.s(["getWeekYear",0,p],42874),e.s(["getWeek",0,_],66852);let g={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return m("yy"===t?n%100:n,t.length)},M(e,t){let r=e.getMonth();return"M"===t?String(r+1):m(r+1,2)},d:(e,t)=>m(e.getDate(),t.length),a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:(e,t)=>m(e.getHours()%12||12,t.length),H:(e,t)=>m(e.getHours(),t.length),m:(e,t)=>m(e.getMinutes(),t.length),s:(e,t)=>m(e.getSeconds(),t.length),S(e,t){let r=t.length;return m(Math.trunc(e.getMilliseconds()*Math.pow(10,r-3)),t.length)}},b={G:function(e,t,r){let n=+(e.getFullYear()>0);switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){let t=e.getFullYear();return r.ordinalNumber(t>0?t:1-t,{unit:"year"})}return g.y(e,t)},Y:function(e,t,r,n){let a=p(e,n),i=a>0?a:1-a;return"YY"===t?m(i%100,2):"Yo"===t?r.ordinalNumber(i,{unit:"year"}):m(i,t.length)},R:function(e,t){return m(f(e),t.length)},u:function(e,t){return m(e.getFullYear(),t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return m(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return m(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return g.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return m(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let a=_(e,n);return"wo"===t?r.ordinalNumber(a,{unit:"week"}):m(a,t.length)},I:function(e,t,r){let n=h(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):m(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):g.d(e,t)},D:function(e,t,r){let u,c=function(e,t){let[r,o]=(0,a.normalizeDates)(void 0,e,t),l=s(r),u=s(o);return Math.round((l-(0,n.getTimezoneOffsetInMilliseconds)(l)-(u-(0,n.getTimezoneOffsetInMilliseconds)(u)))/i.millisecondsInDay)}(u=(0,o.toDate)(e,void 0),l(u))+1;return"Do"===t?r.ordinalNumber(c,{unit:"dayOfYear"}):m(c,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){let a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return m(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){let a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return m(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),a=0===n?7:n;switch(t){case"i":return String(a);case"ii":return m(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n,a=e.getHours();switch(n=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n,a=e.getHours();switch(n=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),r.ordinalNumber(t,{unit:"hour"})}return g.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):g.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},k:function(e,t,r){let n=e.getHours();return(0===n&&(n=24),"ko"===t)?r.ordinalNumber(n,{unit:"hour"}):m(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):g.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):g.s(e,t)},S:function(e,t){return g.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(0===n)return"Z";switch(t){case"X":return x(n);case"XXXX":case"XX":return w(n);default:return w(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return x(n);case"xxxx":case"xx":return w(n);default:return w(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+y(n,":");default:return"GMT"+w(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+y(n,":");default:return"GMT"+w(n,":")}},t:function(e,t,r){return m(Math.trunc(e/1e3),t.length)},T:function(e,t,r){return m(+e,t.length)}};function y(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return 0===i?r+String(a):r+String(a)+t+m(i,2)}function x(e,t){return e%60==0?(e>0?"-":"+")+m(Math.abs(e)/60,2):w(e,t)}function w(e,t=""){let r=Math.abs(e);return(e>0?"-":"+")+m(Math.trunc(r/60),2)+t+m(r%60,2)}let v=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},k=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},E={p:k,P:(e,t)=>{let r,n=e.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return v(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",v(a,t)).replace("{{time}}",k(i,t))}};e.s(["longFormatters",0,E],16245);let S=/^D+$/,O=/^Y+$/,T=["D","DD","YY","YYYY"];function j(e){return S.test(e)}function N(e){return O.test(e)}function A(e,t,r){var n,a,i;let o,s=(n=e,a=t,i=r,o="Y"===n[0]?"years":"days of the month",`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${a}\`) for formatting ${o} to the input \`${i}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if(console.warn(s),T.includes(e))throw RangeError(s)}e.s(["isProtectedDayOfYearToken",0,j,"isProtectedWeekYearToken",0,N,"warnOrThrowProtectedError",0,A],93415);let D=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,L=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,C=/^'([^]*?)'?$/,P=/''/g,M=/[a-zA-Z]/;e.s(["format",0,function(e,n,a){let i=(0,r.getDefaultOptions)(),s=a?.locale??i.locale??t.defaultLocale,l=a?.firstWeekContainsDate??a?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,u=a?.weekStartsOn??a?.locale?.options?.weekStartsOn??i.weekStartsOn??i.locale?.options?.weekStartsOn??0,c=(0,o.toDate)(e,a?.in);if(!(c instanceof Date||"object"==typeof c&&"[object Date]"===Object.prototype.toString.call(c))&&"number"!=typeof c||isNaN(+(0,o.toDate)(c)))throw RangeError("Invalid time value");let d=n.match(L).map(e=>{let t=e[0];return"p"===t||"P"===t?(0,E[t])(e,s.formatLong):e}).join("").match(D).map(e=>{if("''"===e)return{isToken:!1,value:"'"};let t=e[0];if("'"===t){var r;let t;return{isToken:!1,value:(t=(r=e).match(C))?t[1].replace(P,"'"):r}}if(b[t])return{isToken:!0,value:e};if(t.match(M))throw RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});s.localize.preprocessor&&(d=s.localize.preprocessor(c,d));let f={firstWeekContainsDate:l,weekStartsOn:u,locale:s};return d.map(t=>{if(!t.isToken)return t.value;let r=t.value;return(!a?.useAdditionalWeekYearTokens&&N(r)||!a?.useAdditionalDayOfYearTokens&&j(r))&&A(r,n,String(e)),(0,b[r[0]])(c,r,s.localize,f)}).join("")}],39552)},67999,e=>{"use strict";e.s(["get_serialized_entries_total_ms",0,function(e){return e.reduce((e,t)=>e+t.durationMs,0)}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return u},urlObjectKeys:function(){return i}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=e.r(44066)._(e.r(78677)),o=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",l=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(s.urlQueryToSearchParams(i)));let c=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${l}`}let i=["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 a}});let n=e.r(29158);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=s(e,n)),t&&(a.current=s(t,n))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return s}});let n=e.r(31047),a=e.r(63334);function s(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,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 _},useLinkStatus:function(){return x}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let s=e.r(44066),o=e.r(54710),l=s._(e.r(29158)),i=e.r(42552),u=e.r(61717),c=e.r(37879),d=e.r(31047),p=e.r(20321);e.r(90503);let f=e.r(38520),h=e.r(19947),m=e.r(59246),b=e.r(99046);function _(t){var r,n;let a,s,_,[x,y]=(0,l.useOptimistic)(h.IDLE_LINK_STATUS),v=(0,l.useRef)(null),{href:j,as:w,children:k,prefetch:N=null,passHref:S,replace:C,shallow:E,scroll:T,onClick:P,onMouseEnter:O,onTouchStart:L,legacyBehavior:A=!1,onNavigate:R,transitionTypes:U,ref:M,unstable_dynamicOnHover:$,...I}=t;a=k,A&&("string"==typeof a||"number"==typeof a)&&(a=(0,o.jsx)("a",{children:a}));let B=l.default.useContext(u.AppRouterContext),q=!1!==N,D=!1!==N?null===(n=N)||"auto"===n?b.FetchStrategy.PPR:b.FetchStrategy.Full:b.FetchStrategy.PPR,K="string"==typeof(r=w||j)?r:(0,i.formatUrl)(r);if(A){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});s=l.default.Children.only(a)}let W=A?s&&"object"==typeof s&&s.ref:M,F=l.default.useCallback(e=>(null!==B&&(v.current=(0,h.mountLinkInstance)(e,K,B,D,q,y)),()=>{v.current&&((0,h.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,h.unmountPrefetchableInstance)(e)}),[q,K,B,D,y]),z={ref:(0,c.useMergedRef)(F,W),onClick(t){A||"function"!=typeof P||P(t),A&&s.props&&"function"==typeof s.props.onClick&&s.props.onClick(t),!B||t.defaultPrevented||function(t,r,n,a,s,o,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,m.isLocalURL)(r)){a&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);l.default.startTransition(()=>{d(r,a?"replace":"push",!1===s?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,i)})}}(t,K,v,C,T,R,U)},onMouseEnter(e){A||"function"!=typeof O||O(e),A&&s.props&&"function"==typeof s.props.onMouseEnter&&s.props.onMouseEnter(e),B&&q&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)},onTouchStart:function(e){A||"function"!=typeof L||L(e),A&&s.props&&"function"==typeof s.props.onTouchStart&&s.props.onTouchStart(e),B&&q&&(0,h.onNavigationIntent)(e.currentTarget,!0===$)}};return(0,d.isAbsoluteUrl)(K)?z.href=K:A&&!S&&("a"!==s.type||"href"in s.props)||(z.href=(0,p.addBasePath)(K)),_=A?l.default.cloneElement(s,z):(0,o.jsx)("a",{...I,...z,children:a}),(0,o.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)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),a=e.i(32417),s=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[o,l]=(0,r.useState)(null),[i,u]=(0,r.useState)(!1),c=(0,a.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!c)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{l(e?.user.email??null)}).catch(()=>{l(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{l(t?.user.email??null)});return()=>{t.unsubscribe()}},[c]),{is_configured:c,email:o,is_pending:i,sign_out:(0,r.useCallback)(async()=>{u(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,s.notify_settings_saved)("Signed out"),e.refresh()}finally{u(!1)}},[e])}}])},45200,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let a=[{href:"/",label:"Tracker",match:e=>"/"===e}];function s(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:a.map(n=>{let a=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":a?"page":void 0,children:n.label},n.href)})})}],45200);var o=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,o.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(s,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},73205,2268,76003,38240,e=>{"use strict";let t=new Set(e.i(22373).topbar_quick_action_ids),r=["today","reporting","pomodoro"];e.s(["parse_topbar_quick_actions",0,function(e){try{let n=JSON.parse(e);if(!Array.isArray(n))return r;let a=n.filter(e=>"string"==typeof e&&t.has(e));return Array.from(new Set(a))}catch{return r}}],73205);var n=e.i(34869),a=e.i(92629);let s=(0,n.create_ui_preference_store)({storage_key:a.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:a.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function o(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,s],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return o()}],76003);var l=e.i(17798),i=e.i(46549),u=e.i(10464),c=e.i(35434),d=e.i(61834),p=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===o()?"light":"dark";(0,l.apply_theme)(e),(0,p.write_stored_theme)(e),u.theme_mode_preference.write(e),(0,d.write_document_preference_cookies)({theme_mode:e,theme:e}),u.theme_mode_preference.notify(),(0,c.notify_theme_subscribers)(),(0,i.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let a=(0,t.useRef)(e);a.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),a.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),a=e.i(29158),s=e.i(37399),o=e.i(90463),l=e.i(46549),i=e.i(73205),u=e.i(66295),c=e.i(2268),d=e.i(32792),p=e.i(90299),f=e.i(28274),h=e.i(76003),m=e.i(35434),b=e.i(38240),_=e.i(22373),g=e.i(25204),x=e.i(77882);let y="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",v={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},j=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),w=(0,n.usePathname)()??"/",k=(0,a.useSyncExternalStore)(m.subscribe_theme,h.get_theme_snapshot,h.get_theme_server_snapshot),N=(0,a.useSyncExternalStore)(c.cloud_sync_enabled_preference.subscribe,c.cloud_sync_enabled_preference.get_snapshot,c.cloud_sync_enabled_preference.get_server_snapshot),S=(0,a.useSyncExternalStore)(p.tracker_shortcut_map_preference.subscribe,p.tracker_shortcut_map_preference.get_snapshot,p.tracker_shortcut_map_preference.get_server_snapshot),C=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),E=(0,u.parse_tracker_shortcut_map)(S),T=new Set((0,i.parse_topbar_quick_actions)(C)),P=_.topbar_quick_action_ids.filter(e=>!T.has(e)),O=Array.from(new Set([...Array.from(j),...P])),{email:L,is_configured:A,is_pending:R,sign_out:U}=(0,x.use_supabase_auth_session)(),[M,$]=(0,a.useState)(!1),I=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!M)return;let e=e=>{null===I.current||I.current.contains(e.target)||$(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[M]);let B=()=>{$(!1)};return(0,g.use_escape_to_cancel)(B,M),(0,t.jsxs)("div",{className:"relative shrink-0",ref:I,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":M,"aria-haspopup":"menu",onClick:()=>$(e=>!e),children:(0,t.jsx)(s.HamburgerIcon,{})}),M?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[A&&null!==L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:L,children:L})}):null,O.map(e=>{let n=v[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:y,role:"menuitem",onClick:B,children:n.label})},e)}),A?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitemcheckbox","aria-checked":"true"===N,onClick:()=>{let e="true"===N?"false":"true";c.cloud_sync_enabled_preference.write(e),c.cloud_sync_enabled_preference.notify(),(0,l.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==L&&(0,f.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===N?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===N?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{B(),(0,b.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===k?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===k?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{let e;B(),e=E.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{B(),e.push((0,o.build_auth_page_href)("sign_in",w))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${y} text-danger`,role:"menuitem",disabled:R,onClick:()=>{B(),U()},children:R?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let w=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",s=(0,a.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),o=(0,a.useMemo)(()=>(0,i.parse_topbar_quick_actions)(s),[s]);if(0===o.length)return null;let l=w.filter(e=>o.includes(e.id));return 0===l.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:l.map(n=>{let a=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${a?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":a?"page":void 0,children:n.label},n.id)})})}],76080)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),a=e.i(1976),s=e.i(76080),o=e.i(45958),l=e.i(71060),i=e.i(29539);function u(){let e=((0,l.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(o.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(i.SettingsIcon,{})})}function c({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(o.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(o.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(c,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(s.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(u,{}),(0,t.jsx)(a.TopbarOverflowMenu,{})]})]})]})})}],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}])},6343,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),a=e.i(29158),s=e.i(89497),o=e.i(83105),l=e.i(90463),i=e.i(52663),u=e.i(52405),c=e.i(32417);e.s(["SupabaseAuthForm",0,function({mode:e,redirect_to:d="/"}){var p;let f,h,m=(0,n.useRouter)(),[b,_]=(0,a.useState)(""),[g,x]=(0,a.useState)(""),[y,v]=(0,a.useState)(""),[j,w]=(0,a.useState)(null),[k,N]=(0,a.useState)(null),[S,C]=(0,a.useState)(!1),E="sign_up"===e,T=(0,l.build_auth_page_href)(E?"sign_in":"sign_up",d),P=(f=(p={email:b,password:g,password_confirm:y,is_sign_up:E}).email.trim(),h=p.password.length>0,f.length>0&&!!h&&!(p.password.length<8)&&(!p.is_sign_up||p.password_confirm.length>0&&p.password===p.password_confirm)),O=E&&y.length>0&&g!==y;if(!(0,c.is_supabase_configured)())return(0,t.jsx)("p",{className:"m-0 text-[0.85rem] text-danger",children:"Supabase is not configured. Add NEXT_PUBLIC_SUPABASE_URL and NEXT_PUBLIC_SUPABASE_ANON_KEY to your environment."});let L=async e=>{if(e.preventDefault(),!P)return;C(!0),w(null),N(null);let t=(0,o.create_browser_supabase_client)(),r=b.trim();try{if(E){let{error:e}=await t.auth.signUp({email:r,password:g,options:{emailRedirectTo:`${window.location.origin}/auth/callback?next=${encodeURIComponent(d)}`}});if(null!==e)throw e;N("Check your email to confirm the account, then sign in here.");return}let{error:e}=await t.auth.signInWithPassword({email:r,password:g});if(null!==e)throw e;let n=await fetch("/api/sync/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:(0,s.collect_ui_preferences_from_window)()})});if(!n.ok){let e=await n.json();throw Error(e.error??"Cloud import failed")}m.push(d),m.refresh()}catch(e){w(e instanceof Error?e.message:String(e))}finally{C(!1)}};return(0,t.jsxs)("form",{className:"flex w-full flex-col gap-3",onSubmit:e=>void L(e),children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-[0.85rem]",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Email"}),(0,t.jsx)("input",{type:"email",autoComplete:"email",required:!0,className:(0,u.get_input_class_name)(),value:b,onChange:e=>_(e.target.value)})]}),(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-[0.85rem]",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Password"}),(0,t.jsx)("input",{type:"password",autoComplete:E?"new-password":"current-password",required:!0,minLength:8,className:(0,u.get_input_class_name)(),value:g,onChange:e=>x(e.target.value)})]}),E?(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-[0.85rem]",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Confirm password"}),(0,t.jsx)("input",{type:"password",autoComplete:"new-password",required:!0,minLength:8,className:(0,u.get_input_class_name)(),value:y,onChange:e=>v(e.target.value)})]}):null,O?(0,t.jsx)("p",{className:"m-0 text-[0.82rem] text-danger",children:"Passwords do not match."}):null,(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2",children:[(0,t.jsx)("button",{type:"submit",className:(0,i.get_button_class_name)("primary"),disabled:S||!P,children:S?"Working…":E?"Create account":"Sign in"}),(0,t.jsx)(r.default,{href:T,className:`${(0,i.get_button_class_name)("ghost","small")} no-underline`,children:E?"Already have an account?":"Need an account?"})]}),null!==k?(0,t.jsx)("p",{className:"m-0 text-center text-[0.82rem] text-accent",children:k}):null,null!==j?(0,t.jsx)("p",{className:"m-0 text-center text-[0.82rem] text-danger",children:j}):null]})}],6343)}]);
|
|
@@ -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 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(29158);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(31047),s=e.r(63334);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return _}};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(29158)),l=e.r(42552),c=e.r(61717),u=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 s,a,g,[_,y]=(0,o.useOptimistic)(h.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:j,as:k,children:w,prefetch:N=null,passHref:S,replace:T,shallow:C,scroll:E,onClick:O,onMouseEnter:P,onTouchStart:L,legacyBehavior:A=!1,onNavigate:R,transitionTypes:M,ref:I,unstable_dynamicOnHover:D,...U}=t;s=w,A&&("string"==typeof s||"number"==typeof s)&&(s=(0,i.jsx)("a",{children:s}));let W=o.default.useContext(c.AppRouterContext),$=!1!==N,q=!1!==N?null===(n=N)||"auto"===n?b.FetchStrategy.PPR:b.FetchStrategy.Full:b.FetchStrategy.PPR,K="string"==typeof(r=k||j)?r:(0,l.formatUrl)(r);if(A){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 B=A?a&&"object"==typeof a&&a.ref:I,F=o.default.useCallback(e=>(null!==W&&(v.current=(0,h.mountLinkInstance)(e,K,W,q,$,y)),()=>{v.current&&((0,h.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,h.unmountPrefetchableInstance)(e)}),[$,K,W,q,y]),z={ref:(0,u.useMergedRef)(F,B),onClick(t){A||"function"!=typeof O||O(t),A&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!W||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,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);o.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?p.ScrollBehavior.NoScroll:p.ScrollBehavior.Default,n.current,l)})}}(t,K,v,T,E,R,M)},onMouseEnter(e){A||"function"!=typeof P||P(e),A&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),W&&$&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)},onTouchStart:function(e){A||"function"!=typeof L||L(e),A&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),W&&$&&(0,h.onNavigationIntent)(e.currentTarget,!0===D)}};return(0,d.isAbsoluteUrl)(K)?z.href=K:A&&!S&&("a"!==a.type||"href"in a.props)||(z.href=(0,f.addBasePath)(K)),g=A?o.default.cloneElement(a,z):(0,i.jsx)("a",{...U,...z,children:s}),(0,i.jsx)(x.Provider,{value:_,children:g})}e.r(10364);let x=(0,o.createContext)(h.IDLE_LINK_STATUS),_=()=>(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)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),s=e.i(32417),a=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[i,o]=(0,r.useState)(null),[l,c]=(0,r.useState)(!1),u=(0,s.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{o(e?.user.email??null)}).catch(()=>{o(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{o(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:i,is_pending:l,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},45200,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/",label:"Tracker",match:e=>"/"===e}];function a(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":s?"page":void 0,children:n.label},n.href)})})}],45200);var i=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,i.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(a,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},73205,2268,76003,38240,e=>{"use strict";let t=new Set(e.i(22373).topbar_quick_action_ids),r=["today","reporting","pomodoro"];e.s(["parse_topbar_quick_actions",0,function(e){try{let n=JSON.parse(e);if(!Array.isArray(n))return r;let s=n.filter(e=>"string"==typeof e&&t.has(e));return Array.from(new Set(s))}catch{return r}}],73205);var n=e.i(34869),s=e.i(92629);let a=(0,n.create_ui_preference_store)({storage_key:s.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:s.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function i(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,a],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return i()}],76003);var o=e.i(17798),l=e.i(46549),c=e.i(10464),u=e.i(35434),d=e.i(61834),f=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===i()?"light":"dark";(0,o.apply_theme)(e),(0,f.write_stored_theme)(e),c.theme_mode_preference.write(e),(0,d.write_document_preference_cookies)({theme_mode:e,theme:e}),c.theme_mode_preference.notify(),(0,u.notify_theme_subscribers)(),(0,l.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let s=(0,t.useRef)(e);s.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),s.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(29158),a=e.i(37399),i=e.i(90463),o=e.i(46549),l=e.i(73205),c=e.i(66295),u=e.i(2268),d=e.i(32792),f=e.i(90299),p=e.i(28274),h=e.i(76003),m=e.i(35434),b=e.i(38240),g=e.i(22373),x=e.i(25204),_=e.i(77882);let y="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",v={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},j=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),k=(0,n.usePathname)()??"/",w=(0,s.useSyncExternalStore)(m.subscribe_theme,h.get_theme_snapshot,h.get_theme_server_snapshot),N=(0,s.useSyncExternalStore)(u.cloud_sync_enabled_preference.subscribe,u.cloud_sync_enabled_preference.get_snapshot,u.cloud_sync_enabled_preference.get_server_snapshot),S=(0,s.useSyncExternalStore)(f.tracker_shortcut_map_preference.subscribe,f.tracker_shortcut_map_preference.get_snapshot,f.tracker_shortcut_map_preference.get_server_snapshot),T=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),C=(0,c.parse_tracker_shortcut_map)(S),E=new Set((0,l.parse_topbar_quick_actions)(T)),O=g.topbar_quick_action_ids.filter(e=>!E.has(e)),P=Array.from(new Set([...Array.from(j),...O])),{email:L,is_configured:A,is_pending:R,sign_out:M}=(0,_.use_supabase_auth_session)(),[I,D]=(0,s.useState)(!1),U=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!I)return;let e=e=>{null===U.current||U.current.contains(e.target)||D(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[I]);let W=()=>{D(!1)};return(0,x.use_escape_to_cancel)(W,I),(0,t.jsxs)("div",{className:"relative shrink-0",ref:U,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":I,"aria-haspopup":"menu",onClick:()=>D(e=>!e),children:(0,t.jsx)(a.HamburgerIcon,{})}),I?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[A&&null!==L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:L,children:L})}):null,P.map(e=>{let n=v[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:y,role:"menuitem",onClick:W,children:n.label})},e)}),A?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitemcheckbox","aria-checked":"true"===N,onClick:()=>{let e="true"===N?"false":"true";u.cloud_sync_enabled_preference.write(e),u.cloud_sync_enabled_preference.notify(),(0,o.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==L&&(0,p.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===N?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===N?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{W(),(0,b.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===w?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===w?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{let e;W(),e=C.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:y,role:"menuitem",onClick:()=>{W(),e.push((0,i.build_auth_page_href)("sign_in",k))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${y} text-danger`,role:"menuitem",disabled:R,onClick:()=>{W(),M()},children:R?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let k=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",a=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),i=(0,s.useMemo)(()=>(0,l.parse_topbar_quick_actions)(a),[a]);if(0===i.length)return null;let o=k.filter(e=>i.includes(e.id));return 0===o.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:o.map(n=>{let s=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":s?"page":void 0,children:n.label},n.id)})})}],76080)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),s=e.i(1976),a=e.i(76080),i=e.i(45958),o=e.i(71060),l=e.i(29539);function c(){let e=((0,o.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(i.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(l.SettingsIcon,{})})}function u({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(i.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(i.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(u,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(a.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(c,{}),(0,t.jsx)(s.TopbarOverflowMenu,{})]})]})]})})}],75404)},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:n.href,"aria-current":s?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},85323,e=>{"use strict";var t=e.i(49087);e.s(["notify_desktop",0,function(e){if((0,t.notify_in_app)({title:e.title,body:e.body}),"u"<typeof Notification||"u">typeof document&&"visible"===document.visibilityState&&document.hasFocus()||"granted"!==Notification.permission)return;let{body:r,tag:n,title:s}=e,a={body:r,...void 0!==n?{tag:n}:{}};try{new Notification(s,a)}catch{}},"supports_desktop_notifications",0,function(){return"u">typeof Notification}])},48541,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DESKTOP_NOTIFICATIONS_STORAGE_KEY,default_value:r.DESKTOP_NOTIFICATIONS_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["desktop_notifications_preference",0,n])},70957,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(48541),s=e.i(7902),a=e.i(85323);e.s(["DesktopNotificationsSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.desktop_notifications_preference.subscribe,n.desktop_notifications_preference.get_snapshot,n.desktop_notifications_preference.get_server_snapshot),i=(0,a.supports_desktop_notifications)(),[o,l]=(0,r.useState)(()=>i?Notification.permission:null);return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-2.5",children:[(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,disabled:!i,onChange:e=>{var t;return t=e.target.checked,void(0,s.persist_ui_preference)(n.desktop_notifications_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:"Desktop notifications"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Show browser notifications when tracking starts or stops."})]})]}),i?(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("p",{className:"m-0 text-[0.78rem] text-muted",children:["Permission: ",o??"default"]}),"granted"!==o?(0,t.jsx)("button",{type:"button",className:"rounded-md border border-panel-border bg-surface-raised px-2 py-1 text-[0.78rem] font-semibold hover:bg-surface-hover",onClick:async()=>{l(await Notification.requestPermission())},children:"Allow notifications"}):null]}):(0,t.jsx)("p",{className:"m-0 text-[0.78rem] text-muted",children:"Your browser does not support desktop notifications."})]})}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,42552,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return l},formatWithValidation:function(){return c},urlObjectKeys:function(){return o}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066)._(e.r(78677)),i=/https?|ftp|gopher|file/;function l(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",l=e.hash||"",o=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),o&&"object"==typeof o&&(o=String(a.urlQueryToSearchParams(o)));let u=e.search||o&&`?${o}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),l&&"#"!==l[0]&&(l="#"+l),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${l}`}let o=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return l(e)}},37879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(29158);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},59246,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(31047),s=e.r(63334);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},10364,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},45958,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return _},useLinkStatus:function(){return b}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(44066),i=e.r(54710),l=a._(e.r(29158)),o=e.r(42552),c=e.r(61717),u=e.r(37879),d=e.r(31047),h=e.r(20321);e.r(90503);let f=e.r(38520),p=e.r(19947),m=e.r(59246),g=e.r(99046);function _(t){var r,n;let s,a,_,[b,v]=(0,l.useOptimistic)(p.IDLE_LINK_STATUS),y=(0,l.useRef)(null),{href:j,as:w,children:k,prefetch:S=null,passHref:N,replace:E,shallow:T,scroll:C,onClick:O,onMouseEnter:A,onTouchStart:L,legacyBehavior:D=!1,onNavigate:P,transitionTypes:M,ref:R,unstable_dynamicOnHover:I,...U}=t;s=k,D&&("string"==typeof s||"number"==typeof s)&&(s=(0,i.jsx)("a",{children:s}));let $=l.default.useContext(c.AppRouterContext),F=!1!==S,K=!1!==S?null===(n=S)||"auto"===n?g.FetchStrategy.PPR:g.FetchStrategy.Full:g.FetchStrategy.PPR,B="string"==typeof(r=w||j)?r:(0,o.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=l.default.Children.only(s)}let W=D?a&&"object"==typeof a&&a.ref:R,q=l.default.useCallback(e=>(null!==$&&(y.current=(0,p.mountLinkInstance)(e,B,$,K,F,v)),()=>{y.current&&((0,p.unmountLinkForCurrentNavigation)(y.current),y.current=null),(0,p.unmountPrefetchableInstance)(e)}),[F,B,$,K,v]),G={ref:(0,u.useMergedRef)(q,W),onClick(t){D||"function"!=typeof O||O(t),D&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!$||t.defaultPrevented||function(t,r,n,s,a,i,o){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(91087);l.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,o)})}}(t,B,y,E,C,P,M)},onMouseEnter(e){D||"function"!=typeof A||A(e),D&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){D||"function"!=typeof L||L(e),D&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),$&&F&&(0,p.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(B)?G.href=B:D&&!N&&("a"!==a.type||"href"in a.props)||(G.href=(0,h.addBasePath)(B)),_=D?l.default.cloneElement(a,G):(0,i.jsx)("a",{...U,...G,children:s}),(0,i.jsx)(x.Provider,{value:b,children:_})}e.r(10364);let x=(0,l.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,l.useContext)(x);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},77882,e=>{"use strict";var t=e.i(71060),r=e.i(29158),n=e.i(83105),s=e.i(32417),a=e.i(46549);e.s(["use_supabase_auth_session",0,function(){let e=(0,t.useRouter)(),[i,l]=(0,r.useState)(null),[o,c]=(0,r.useState)(!1),u=(0,s.is_supabase_configured)();return(0,r.useEffect)(()=>{if(!u)return;let e=(0,n.create_browser_supabase_client)();e.auth.getSession().then(({data:{session:e}})=>{l(e?.user.email??null)}).catch(()=>{l(null)});let{data:{subscription:t}}=e.auth.onAuthStateChange((e,t)=>{l(t?.user.email??null)});return()=>{t.unsubscribe()}},[u]),{is_configured:u,email:i,is_pending:o,sign_out:(0,r.useCallback)(async()=>{c(!0);try{await fetch("/api/auth/signout",{method:"POST"});let t=(0,n.create_browser_supabase_client)();await t.auth.signOut().catch(()=>{}),(0,a.notify_settings_saved)("Signed out"),e.refresh()}finally{c(!1)}},[e])}}])},45200,648,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/",label:"Tracker",match:e=>"/"===e}];function a(){return(0,t.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}e.s(["TrackerNavLinks",0,function(){let e=(0,n.usePathname)()??"/";return(0,t.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)(r.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:n.href,"aria-current":s?"page":void 0,children:n.label},n.href)})})}],45200);var i=e.i(77882);e.s(["TopbarCloudStatus",0,function(){let{email:e,is_configured:r}=(0,i.use_supabase_auth_session)();return r&&null!==e?(0,t.jsxs)("div",{className:"group relative flex items-center",children:[(0,t.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${e}`,role:"img",children:(0,t.jsx)(a,{})}),(0,t.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,t.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,t.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:e,children:e})]})})]}):null}],648)},37399,e=>{"use strict";var t=e.i(54710);e.s(["HamburgerIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4 text-muted",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M4 7h16"}),(0,t.jsx)("path",{d:"M4 12h16"}),(0,t.jsx)("path",{d:"M4 17h16"})]})}])},90463,e=>{"use strict";e.s(["build_auth_page_href",0,function(e,t){let r="sign_in"===e?"/login":"/register",n=t.trim();return 0===n.length||"/"===n?r:`${r}?next=${encodeURIComponent(n)}`}])},73205,2268,76003,38240,e=>{"use strict";let t=new Set(e.i(22373).topbar_quick_action_ids),r=["today","reporting","pomodoro"];e.s(["parse_topbar_quick_actions",0,function(e){try{let n=JSON.parse(e);if(!Array.isArray(n))return r;let s=n.filter(e=>"string"==typeof e&&t.has(e));return Array.from(new Set(s))}catch{return r}}],73205);var n=e.i(34869),s=e.i(92629);let a=(0,n.create_ui_preference_store)({storage_key:s.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:s.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:e=>"true"===e||"false"===e});function i(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}e.s(["cloud_sync_enabled_preference",0,a],2268),e.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return i()}],76003);var l=e.i(17798),o=e.i(46549),c=e.i(10464),u=e.i(35434),d=e.i(61834),h=e.i(81553);e.s(["toggle_theme",0,function(){let e="dark"===i()?"light":"dark";(0,l.apply_theme)(e),(0,h.write_stored_theme)(e),c.theme_mode_preference.write(e),(0,d.write_document_preference_cookies)({theme_mode:e,theme:e}),c.theme_mode_preference.notify(),(0,u.notify_theme_subscribers)(),(0,o.notify_settings_saved)()}],38240)},25204,e=>{"use strict";var t=e.i(29158),r=e.i(72074);e.s(["use_escape_to_cancel",0,function(e,n=!0){let s=(0,t.useRef)(e);s.current=e,(0,t.useEffect)(()=>{if(!n)return;let e=e=>{"Escape"!==e.key||(0,r.is_modal_dialog_open)()||(e.preventDefault(),s.current())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n])}])},1976,76080,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060),s=e.i(29158),a=e.i(37399),i=e.i(90463),l=e.i(46549),o=e.i(73205),c=e.i(66295),u=e.i(2268),d=e.i(32792),h=e.i(90299),f=e.i(28274),p=e.i(76003),m=e.i(35434),g=e.i(38240),_=e.i(22373),x=e.i(25204),b=e.i(77882);let v="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55",y={today:{href:"/today",label:"Today"},sheets:{href:"/sheets",label:"Sheets"},reporting:{href:"/reporting",label:"Reporting"},pomodoro:{href:"/pomodoro",label:"Pomodoro"},"manage-tags":{href:"/settings/tags",label:"Manage tags"},"sync-settings":{href:"/settings/cloud-sync",label:"Sync settings"}},j=new Set(["manage-tags","pomodoro","sync-settings"]);e.s(["TopbarOverflowMenu",0,function(){let e=(0,n.useRouter)(),w=(0,n.usePathname)()??"/",k=(0,s.useSyncExternalStore)(m.subscribe_theme,p.get_theme_snapshot,p.get_theme_server_snapshot),S=(0,s.useSyncExternalStore)(u.cloud_sync_enabled_preference.subscribe,u.cloud_sync_enabled_preference.get_snapshot,u.cloud_sync_enabled_preference.get_server_snapshot),N=(0,s.useSyncExternalStore)(h.tracker_shortcut_map_preference.subscribe,h.tracker_shortcut_map_preference.get_snapshot,h.tracker_shortcut_map_preference.get_server_snapshot),E=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),T=(0,c.parse_tracker_shortcut_map)(N),C=new Set((0,o.parse_topbar_quick_actions)(E)),O=_.topbar_quick_action_ids.filter(e=>!C.has(e)),A=Array.from(new Set([...Array.from(j),...O])),{email:L,is_configured:D,is_pending:P,sign_out:M}=(0,b.use_supabase_auth_session)(),[R,I]=(0,s.useState)(!1),U=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!R)return;let e=e=>{null===U.current||U.current.contains(e.target)||I(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[R]);let $=()=>{I(!1)};return(0,x.use_escape_to_cancel)($,R),(0,t.jsxs)("div",{className:"relative shrink-0",ref:U,children:[(0,t.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":R,"aria-haspopup":"menu",onClick:()=>I(e=>!e),children:(0,t.jsx)(a.HamburgerIcon,{})}),R?(0,t.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[D&&null!==L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:L,children:L})}):null,A.map(e=>{let n=y[e];return(0,t.jsx)("li",{role:"none",children:(0,t.jsx)(r.default,{href:n.href,className:v,role:"menuitem",onClick:$,children:n.label})},e)}),D?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:v,role:"menuitemcheckbox","aria-checked":"true"===S,onClick:()=>{let e="true"===S?"false":"true";u.cloud_sync_enabled_preference.write(e),u.cloud_sync_enabled_preference.notify(),(0,l.notify_settings_saved)("true"===e?"Cloud sync enabled":"Cloud sync disabled"),"true"===e&&null!==L&&(0,f.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"true"===S?"Pause cloud sync":"Resume cloud sync"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===S?"On":"Off"})]})})}):null,(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:v,role:"menuitem",onClick:()=>{$(),(0,g.toggle_theme)()},suppressHydrationWarning:!0,children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsxs)("span",{children:["dark"===k?"Dark":"Light"," theme"]}),(0,t.jsx)("span",{"aria-hidden":"true",children:"dark"===k?"☾":"☀"})]})})}),(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:v,role:"menuitem",onClick:()=>{let e;$(),e=T.help,document.dispatchEvent(new KeyboardEvent("keydown",{key:e,shiftKey:"?"===e,bubbles:!0}))},children:(0,t.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,t.jsx)("span",{children:"Keyboard shortcuts"}),(0,t.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),D?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===L?(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:v,role:"menuitem",onClick:()=>{$(),e.push((0,i.build_auth_page_href)("sign_in",w))},children:"Sign in"})}):(0,t.jsx)("li",{role:"none",children:(0,t.jsx)("button",{type:"button",className:`${v} text-danger`,role:"menuitem",disabled:P,onClick:()=>{$(),M()},children:P?"Signing out…":"Sign out"})})]}):null]}):null]})}],1976);let w=[{id:"today",href:"/today",label:"Today"},{id:"sheets",href:"/sheets",label:"Sheets"},{id:"reporting",href:"/reporting",label:"Reporting"},{id:"pomodoro",href:"/pomodoro",label:"Pomodoro"},{id:"manage-tags",href:"/settings/tags",label:"Tags"},{id:"sync-settings",href:"/settings/cloud-sync",label:"Sync"}];e.s(["TopbarQuickActions",0,function(){let e=(0,n.usePathname)()??"/",a=(0,s.useSyncExternalStore)(d.topbar_quick_actions_preference.subscribe,d.topbar_quick_actions_preference.get_snapshot,d.topbar_quick_actions_preference.get_server_snapshot),i=(0,s.useMemo)(()=>(0,o.parse_topbar_quick_actions)(a),[a]);if(0===i.length)return null;let l=w.filter(e=>i.includes(e.id));return 0===l.length?null:(0,t.jsx)("div",{className:"hidden items-center gap-1 min-[980px]:flex",children:l.map(n=>{let s=e.startsWith(n.href);return(0,t.jsx)(r.default,{href:n.href,className:`rounded-full px-2.5 py-1 text-[0.78rem] font-semibold no-underline transition-colors duration-150 ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,"aria-current":s?"page":void 0,children:n.label},n.id)})})}],76080)},29539,e=>{"use strict";var t=e.i(54710);e.s(["SettingsIcon",0,function(){return(0,t.jsxs)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},75404,e=>{"use strict";var t=e.i(54710),r=e.i(45200),n=e.i(648),s=e.i(1976),a=e.i(76080),i=e.i(45958),l=e.i(71060),o=e.i(29539);function c(){let e=((0,l.usePathname)()??"/").startsWith("/settings");return(0,t.jsx)(i.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${e?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":e?"page":void 0,children:(0,t.jsx)(o.SettingsIcon,{})})}function u({current:e,parent:r}){return(0,t.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,t.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,t.jsx)("li",{children:(0,t.jsx)(i.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{children:void 0!==r.href?(0,t.jsx)(i.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:r.href,children:r.label}):(0,t.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:r.label})})]}):null,(0,t.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,t.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:e})]})})}e.s(["TrackerTopbar",0,function({breadcrumb:e}={}){return(0,t.jsx)("header",{className:"relative z-1 border-b border-panel-border bg-[color-mix(in_srgb,var(--panel)_92%,var(--background))] shadow-sm backdrop-blur-[10px]",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,t.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==e?(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(u,{current:e.current,parent:e.parent})}):null,(0,t.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,t.jsx)(r.TrackerNavLinks,{}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,t.jsx)(a.TopbarQuickActions,{}),(0,t.jsx)(n.TopbarCloudStatus,{}),(0,t.jsx)(c,{}),(0,t.jsx)(s.TopbarOverflowMenu,{})]})]})]})})}],75404)},52405,e=>{"use strict";e.s(["get_input_class_name",0,function(e="default"){let t="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===e?`${t} px-2.5 py-2`:t}])},42800,e=>{"use strict";var t=e.i(54710),r=e.i(45958),n=e.i(71060);let s=[{href:"/settings",label:"General",match:e=>"/settings"===e},{href:"/settings/display",label:"Display & layout",match:e=>e.startsWith("/settings/display")},{href:"/settings/quick-actions",label:"Quick actions",match:e=>e.startsWith("/settings/quick-actions")},{href:"/settings/goals",label:"Goals",match:e=>e.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:e=>e.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:e=>e.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:e=>e.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:e=>e.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:e=>e.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:e=>e.startsWith("/settings/tags")}];e.s(["SettingsNav",0,function(){let e=(0,n.usePathname)()??"/settings";return(0,t.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,t.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:s.map(n=>{let s=n.match(e);return(0,t.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,t.jsx)(r.default,{href:n.href,"aria-current":s?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${s?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:n.label})},n.href)})})})}])},7902,e=>{"use strict";var t=e.i(46549);e.s(["persist_ui_preference",0,function(e,r){e.read()!==r&&(e.write(r),e.notify(),(0,t.notify_settings_saved)())}])},35877,e=>{"use strict";var t=e.i(34869),r=e.i(92629);let n=(0,t.create_ui_preference_store)({storage_key:r.DEBUG_LOGGING_STORAGE_KEY,default_value:r.DEBUG_LOGGING_DEFAULT,is_valid:e=>"true"===e||"false"===e});e.s(["debug_logging_preference",0,n])},91653,e=>{"use strict";var t=e.i(54710),r=e.i(29158),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(29158),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(29158),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."})]})]})}])},90867,e=>{"use strict";var t=e.i(54710),r=e.i(29158),n=e.i(35877),s=e.i(7902);e.s(["DebugLoggingSetting",0,function(){let e=(0,r.useSyncExternalStore)(n.debug_logging_preference.subscribe,n.debug_logging_preference.get_snapshot,n.debug_logging_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.debug_logging_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:"Debug logging"}),(0,t.jsx)("span",{className:"text-[0.8rem] leading-snug text-muted",children:"Log outgoing AI suggestion queries in the console for troubleshooting."})]})]})}])},62344,e=>{"use strict";var t=e.i(54710),r=e.i(29158),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),l=e.i(27850);function o(e){let t=e.trim();if(0!==t.length){try{window.localStorage.setItem(s.DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY,t),(0,l.schedule_ui_preferences_cloud_sync)()}catch{}try{let e=encodeURIComponent(t);document.cookie=`${s.DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}}}let c=[{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[u,d]=(0,r.useState)("last_viewed"),[h,f]=(0,r.useState)("");return(0,r.useEffect)(()=>{d(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:c.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:u===e.value,onChange:()=>(e=>{d(e);try{window.localStorage.setItem(s.DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY,e),(0,l.schedule_ui_preferences_cloud_sync)()}catch{}try{document.cookie=`${s.DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME}=${e}; Path=/; Max-Age=31536000; SameSite=Lax`}catch{}"fixed"===e&&h.length>0&&o(h),(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"===u?(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:h,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)}]);
|
package/package.json
CHANGED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[57077,a=>{"use strict";var b=a.i(7048);a.s(["persist_ui_preference",0,function(a,c){a.read()!==c&&(a.write(c),a.notify(),(0,b.notify_settings_saved)())}])},19702,a=>{"use strict";a.s(["ACTIVE_SHEET_COOKIE_NAME",0,"stt-active-sheet","ACTIVE_SHEET_STORAGE_KEY",0,"super-time-tracker-active-sheet","COMPACT_LISTS_STORAGE_KEY",0,"super-time-tracker-compact-lists","DEFAULT_SHEET_FIXED_NAME_COOKIE_NAME",0,"stt-default-sheet-fixed-name","DEFAULT_SHEET_FIXED_NAME_STORAGE_KEY",0,"super-time-tracker-default-sheet-fixed-name","DEFAULT_SHEET_SESSION_MODE_COOKIE_NAME",0,"stt-default-sheet-session-mode","DEFAULT_SHEET_SESSION_MODE_DEFAULT",0,"last_viewed","DEFAULT_SHEET_SESSION_MODE_STORAGE_KEY",0,"super-time-tracker-default-sheet-session-mode","SHEET_TAG_FILTERS_STORAGE_KEY",0,"super-time-tracker-sheet-tag-filters"])},59659,5796,a=>{"use strict";var b=a.i(87281);function c(){}function d(){(0,b.is_greedy_cloud_sync_enabled)()&&c()}a.i(63577),a.i(51652),a.i(74365),Promise.resolve(),a.s(["schedule_tracker_db_cloud_sync",0,d],5796),a.s(["push_tracker_db_cloud_after_change",0,function(){(0,b.is_greedy_cloud_sync_enabled)()?d():c()}],59659)},84365,a=>{"use strict";a.s(["get_serialized_entries_total_ms",0,function(a){return a.reduce((a,b)=>a+b.durationMs,0)}])},14945,a=>{"use strict";a.s(["get_entry_list_sort_options",0,function(){return[{value:"newest",label:"Newest"},{value:"oldest",label:"Oldest"},{value:"duration",label:"Duration"},{value:"description",label:"Description"}]}])},30004,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.DEBUG_LOGGING_STORAGE_KEY,default_value:c.DEBUG_LOGGING_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["debug_logging_preference",0,d])},78537,a=>{"use strict";var b=a.i(97917);a.s(["notify_desktop",0,function(a){(0,b.notify_in_app)({title:a.title,body:a.body})},"supports_desktop_notifications",0,function(){return!1}])},77963,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.DESKTOP_NOTIFICATIONS_STORAGE_KEY,default_value:c.DESKTOP_NOTIFICATIONS_DEFAULT,is_valid:a=>"true"===a||"false"===a});a.s(["desktop_notifications_preference",0,d])},98831,40420,6962,45273,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CLAUDE_API_KEY_STORAGE_KEY,default_value:c.CLAUDE_API_KEY_DEFAULT,is_valid:a=>a.trim().length>0});a.s(["claude_api_key_preference",0,d],98831);let e=(0,b.create_ui_preference_store)({storage_key:c.ENTRY_SUGGESTION_PROVIDER_STORAGE_KEY,default_value:c.ENTRY_SUGGESTION_PROVIDER_DEFAULT,is_valid:a=>"none"===a||"openai"===a||"claude"===a||"google_ai"===a});a.s(["entry_suggestion_provider_preference",0,e],40420);let f=(0,b.create_ui_preference_store)({storage_key:c.GOOGLE_AI_API_KEY_STORAGE_KEY,default_value:c.GOOGLE_AI_API_KEY_DEFAULT,is_valid:a=>a.trim().length>0});a.s(["google_ai_api_key_preference",0,f],6962);let g=(0,b.create_ui_preference_store)({storage_key:c.OPENAI_API_KEY_STORAGE_KEY,default_value:c.OPENAI_API_KEY_DEFAULT,is_valid:a=>a.trim().length>0});a.s(["openai_api_key_preference",0,g],45273)},39744,62082,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.DAILY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:c.DAILY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=30&&b<=720}});a.s(["daily_focus_target_minutes_preference",0,d],39744);let e=(0,b.create_ui_preference_store)({storage_key:c.WEEKLY_FOCUS_TARGET_MINUTES_STORAGE_KEY,default_value:c.WEEKLY_FOCUS_TARGET_MINUTES_DEFAULT,is_valid:a=>{if(!/^\d+$/.test(a))return!1;let b=Number.parseInt(a,10);return b>=60&&b<=4200}});a.s(["weekly_focus_target_minutes_preference",0,e],62082)},50762,13870,16777,18558,80805,9818,a=>{"use strict";a.s(["parse_focus_goals_by_name",0,function(a){if(0===a.length)return{};try{let b=JSON.parse(a);if(null===b||"object"!=typeof b||Array.isArray(b))return{};let c={};for(let[a,d]of Object.entries(b)){if(null===d||"object"!=typeof d)continue;let b={};"string"==typeof d.daily&&d.daily.length>0&&(b.daily=d.daily),"string"==typeof d.weekly&&d.weekly.length>0&&(b.weekly=d.weekly),(void 0!==b.daily||void 0!==b.weekly)&&(c[a]=b)}return c}catch{return{}}}],50762);var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOAL_SCOPE_STORAGE_KEY,default_value:c.FOCUS_GOAL_SCOPE_DEFAULT,is_valid:a=>"global"===a||"sheet"===a||"tag"===a});a.s(["focus_goal_scope_preference",0,d],13870);let e=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOAL_SHEET_NAME_STORAGE_KEY,default_value:c.FOCUS_GOAL_SHEET_NAME_DEFAULT,is_valid:a=>a.trim().length>0});a.s(["focus_goal_sheet_name_preference",0,e],16777);let f=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOAL_TAG_NAME_STORAGE_KEY,default_value:c.FOCUS_GOAL_TAG_NAME_DEFAULT,is_valid:a=>a.trim().length>0});a.s(["focus_goal_tag_name_preference",0,f],18558);let g=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOALS_PER_SHEET_STORAGE_KEY,default_value:c.FOCUS_GOALS_PER_SHEET_DEFAULT,is_valid:a=>{if(0===a.length)return!1;try{let b=JSON.parse(a);return null!==b&&"object"==typeof b&&!Array.isArray(b)}catch{return!1}}});a.s(["focus_goals_per_sheet_preference",0,g],80805);let h=(0,b.create_ui_preference_store)({storage_key:c.FOCUS_GOALS_PER_TAG_STORAGE_KEY,default_value:c.FOCUS_GOALS_PER_TAG_DEFAULT,is_valid:a=>{if(0===a.length)return!1;try{let b=JSON.parse(a);return null!==b&&"object"==typeof b&&!Array.isArray(b)}catch{return!1}}});a.s(["focus_goals_per_tag_preference",0,h],9818)},26336,77328,38842,a=>{"use strict";var b=a.i(34542),c=a.i(53030);function d(a){let b=a?.at?.trim()??"",c=a?.note?.trim()??"",d=b.length>0,e=c.length>0,f="Stop the active timer and save this entry?";return d&&e?f=`Stop the timer at "${b}" and save a checkout note?`:d?f=`Stop the timer and check out at "${b}"?`:e&&(f="Stop the timer and save this entry with your checkout note?"),{title:"Check out?",message:f,confirmLabel:"Check out",variant:"danger"}}a.s(["get_check_out_confirm_dialog",0,d],77328);var e=a.i(40947);function f(){return"true"===(0,b.useSyncExternalStore)(e.confirm_before_checkout_preference.subscribe,e.confirm_before_checkout_preference.get_snapshot,e.confirm_before_checkout_preference.get_server_snapshot)}a.s(["use_confirm_before_checkout",0,f],38842),a.s(["use_check_out_action",0,function(a){let{confirm:e}=(0,c.use_confirm_dialog)(),g=f();return(0,b.useCallback)(async b=>(!g||!!await e(d(b)))&&(a(b),!0),[e,g,a])}],26336)},76767,a=>{"use strict";var b=a.i(93301);a.s(["format_time",0,function(a,c="12h"){return(0,b.format)(new Date(a),"24h"===c?"HH:mm":"h:mm a")}])},20537,a=>{"use strict";var b=a.i(34542),c=a.i(50825);a.s(["use_time_format",0,function(){return(0,b.useSyncExternalStore)(c.time_format_preference.subscribe,c.time_format_preference.get_snapshot,c.time_format_preference.get_server_snapshot)}])},50803,a=>{"use strict";var b=a.i(48174);a.s(["build_resume_description",0,function(a,c){let d=a.trim(),e=d.length>0?d:"Untitled entry",f=c.map(a=>(0,b.format_display_tag)(a)).join(" ");return f.length>0?`${e} ${f}`.trim():e}])},61566,a=>{"use strict";a.s(["prompt_check_out_at",0,function(){let a=window.prompt("Check out at what time?","30 minutes ago");if(null===a)return null;let b=a.trim();return 0===b.length?null:b}])},68070,a=>{"use strict";a.s(["build_check_out_request_payload",0,function(a,b){let c={sheetName:a},d=b?.at?.trim(),e=b?.note?.trim();return void 0!==d&&d.length>0&&(c.at=d),void 0!==e&&e.length>0&&(c.note=e),c}])},68225,57377,115,a=>{"use strict";a.s(["finish_running_pomodoro_timer",0,function(){}],68225);var b=a.i(87281);async function c(a){let b=await fetch("/api/sheet/active",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a})});if(!b.ok)throw Error((await b.json()).error??"Failed to update active sheet in cloud")}var d=a.i(59659),e=a.i(5796);function f(a,f){if("/api/sheet"===a&&"object"==typeof f&&null!==f&&!0!==f.delete&&!(0,b.is_greedy_cloud_sync_enabled)()){let a=f.name?.trim()??"";a.length>0&&c(a).catch(()=>{});return}(0,b.is_greedy_cloud_sync_enabled)()?(0,e.schedule_tracker_db_cloud_sync)():(0,d.push_tracker_db_cloud_after_change)()}let g=new Set(["/api/note"]);async function h(a,b){let c={method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)},d=await fetch(a,c);if(!d.ok){var e,h;let b,f=(await d.json()).error??"Request failed";if(e=a,h=f,g.has(e)&&((b=h.toLowerCase()).includes("duplicate key")||b.includes("unique constraint"))){if(await new Promise(a=>{setTimeout(a,25)}),!(d=await fetch(a,c)).ok)throw Error((await d.json()).error??f)}else throw Error(f)}let i=await d.json();return f(a,b),i}a.s(["patch_tracker_action",0,h],57377);let i=new Set(["/api/note"]);async function j(a,b){let c={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)},d=await fetch(a,c);if(!d.ok){var e,g;let b,f=(await d.json()).error??"Request failed";if(e=a,g=f,i.has(e)&&((b=g.toLowerCase()).includes("duplicate key")||b.includes("unique constraint"))){if(await new Promise(a=>{setTimeout(a,25)}),!(d=await fetch(a,c)).ok)throw Error((await d.json()).error??f)}else throw Error(f)}let h=await d.json();return f(a,b),h}a.s(["post_tracker_action",0,j],115)},69749,a=>{"use strict";a.s(["get_input_class_name",0,function(a="default"){let b="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===a?`${b} px-2.5 py-2`:b}])},56924,a=>{"use strict";a.s(["normalize_stored_tag",0,function(a){let b=a.trim().replace(/^@+/,"");if(0===b.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(b))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${b}`}])},48174,a=>{"use strict";a.s(["format_display_tag",0,function(a){return a.startsWith("@")?a:`@${a}`}])},30354,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(48174),e=a.i(69749),f=a.i(56924);a.s(["TagAutocompleteInput",0,function({id:a,value:g,known_tags:h,placeholder:i,disabled:j=!1,autoFocus:k=!1,on_change:l}){let m=(0,c.useRef)(null),n=(0,c.useRef)(null),o=(0,c.useRef)(null),[p,q]=(0,c.useState)(0),[r,s]=(0,c.useState)(0),t=function(a,b){let c=a.slice(0,b),d=c.lastIndexOf("@");if(-1===d)return null;let e=c.slice(d+1);return/\s/.test(e)?null:{query:e,start_index:d,end_index:b}}(g,p),u=null===t?[]:function(a,b,c=10){let d=b.toLowerCase();return a.filter(a=>{let b=a.replace(/^@/,"").toLowerCase();return 0===d.length||b.startsWith(d)}).slice(0,c)}(h,t.query),v=null!==t&&function(a,b){if(!/^\w+$/.test(a))return!1;let c=a.toLowerCase();return b.some(a=>{try{return(0,f.normalize_stored_tag)(a).slice(1).toLowerCase()===c}catch{return!1}})}(t.query,h),w=null!==t&&u.length>0&&!v&&!j;(0,c.useLayoutEffect)(()=>{null!==o.current&&null!==m.current&&(m.current.setSelectionRange(o.current,o.current),q(o.current),o.current=null)},[g]),(0,c.useEffect)(()=>{s(0)},[g,p,u.length]);let x=()=>{q(m.current?.selectionStart??g.length)},y=()=>{s(0)},z=a=>{let b,c,e;if(null===t)return;let{next_text:f,next_cursor:h}=(b=(0,d.format_display_tag)(a),c=g.slice(0,t.start_index),e=g.slice(t.end_index),{next_text:`${c}${b}${e}`,next_cursor:c.length+b.length});o.current=h,l(f),y()};return(0,b.jsxs)("div",{className:"relative min-w-0",children:[(0,b.jsx)("input",{ref:m,id:a,type:"text",className:(0,e.get_input_class_name)(),value:g,placeholder:i,disabled:j,autoFocus:k,autoComplete:"off","aria-autocomplete":"list","aria-expanded":w,"aria-controls":w?`${a}-tag-suggestions`:void 0,onChange:a=>{l(a.target.value),q(a.target.selectionStart??a.target.value.length)},onClick:x,onKeyUp:x,onKeyDown:a=>{if(w){if("ArrowDown"===a.key){a.preventDefault(),s(a=>(a+1)%u.length);return}if("ArrowUp"===a.key){a.preventDefault(),s(a=>(a-1+u.length)%u.length);return}if("Enter"===a.key||"Tab"===a.key){a.preventDefault();let b=u[r];void 0!==b&&z(b);return}"Escape"===a.key&&(a.preventDefault(),y())}},onBlur:()=>{window.setTimeout(y,120)}}),w?(0,b.jsx)("ul",{ref:n,id:`${a}-tag-suggestions`,role:"listbox",className:"absolute left-0 right-0 top-full z-20 mt-1 max-h-48 list-none overflow-y-auto rounded-md border border-panel-border bg-panel p-1.5 shadow-md",children:u.map((a,c)=>(0,b.jsx)("li",{role:"option","aria-selected":c===r,children:(0,b.jsx)("button",{type:"button",className:`block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover ${c===r?"bg-surface-hover":""}`,onMouseDown:b=>{b.preventDefault(),z(a)},children:(0,d.format_display_tag)(a)})},a))}):null]})}],30354)},64617,a=>{"use strict";a.s(["POMODORO_DEFAULT_SETTINGS",0,{work_minutes:25,short_break_minutes:5,long_break_minutes:15,rounds_before_long_break:4,auto_start_next_phase:!0,check_in_on_work_start:!0,work_entry_description:"Pomodoro focus"},"POMODORO_DEFAULT_STATE",0,{phase:"work",status:"idle",completed_work_sessions:0,deadline_at_ms:null,paused_remaining_ms:null},"POMODORO_STORAGE_KEY",0,"super-time-tracker-pomodoro"])},18734,a=>{"use strict";a.s(["clear_pomodoro_task_entry_marker",0,function(){},"is_pomodoro_task_entry",0,function(a){return!1},"mark_pomodoro_task_entry",0,function(a){}])}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_0-hc~ba._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[26846,a=>{"use strict";var b=a.i(82508),c=a.i(34542),d=a.i(9301),e=a.i(63577),f=a.i(7048);a.s(["use_supabase_auth_session",0,function(){let a=(0,b.useRouter)(),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(!1),k=(0,e.is_supabase_configured)();return(0,c.useEffect)(()=>{if(!k)return;let a=(0,d.create_browser_supabase_client)();a.auth.getSession().then(({data:{session:a}})=>{h(a?.user.email??null)}).catch(()=>{h(null)});let{data:{subscription:b}}=a.auth.onAuthStateChange((a,b)=>{h(b?.user.email??null)});return()=>{b.unsubscribe()}},[k]),{is_configured:k,email:g,is_pending:i,sign_out:(0,c.useCallback)(async()=>{j(!0);try{await fetch("/api/auth/signout",{method:"POST"});let b=(0,d.create_browser_supabase_client)();await b.auth.signOut().catch(()=>{}),(0,f.notify_settings_saved)("Signed out"),a.refresh()}finally{j(!1)}},[a])}}])},61995,41194,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/",label:"Tracker",match:a=>"/"===a},{href:"/today",label:"Today",match:a=>a.startsWith("/today")},{href:"/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/pomodoro")},{href:"/sheets",label:"Sheets",match:a=>a.startsWith("/sheets")},{href:"/reporting",label:"Reporting",match:a=>a.startsWith("/reporting")}];function f(){return(0,b.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,b.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}a.s(["TrackerNavLinks",0,function(){let a=(0,d.usePathname)()??"/";return(0,b.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)(c.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:d.href,"aria-current":e?"page":void 0,children:d.label},d.href)})})}],61995);var g=a.i(26846);a.s(["TopbarCloudStatus",0,function(){let{email:a,is_configured:c}=(0,g.use_supabase_auth_session)();return c&&null!==a?(0,b.jsxs)("div",{className:"group relative flex items-center",children:[(0,b.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${a}`,role:"img",children:(0,b.jsx)(f,{})}),(0,b.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,b.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,b.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:a,children:a})]})})]}):null}],41194)},34435,a=>{"use strict";var b=a.i(39752);a.s(["HamburgerIcon",0,function(){return(0,b.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,b.jsx)("path",{d:"M4 7h16"}),(0,b.jsx)("path",{d:"M4 12h16"}),(0,b.jsx)("path",{d:"M4 17h16"})]})}])},41615,a=>{"use strict";a.s(["build_auth_page_href",0,function(a,b){let c="sign_in"===a?"/login":"/register",d=b.trim();return 0===d.length||"/"===d?c:`${c}?next=${encodeURIComponent(d)}`}])},28958,a=>{"use strict";a.s(["write_document_preference_cookies",0,function(a){if("u"<typeof document)return;let b="path=/; max-age=31536000; SameSite=Lax";void 0!==a.theme_mode&&(document.cookie=`stt-theme-mode=${a.theme_mode}; ${b}`),void 0!==a.theme&&(document.cookie=`stt-theme=${a.theme}; ${b}`),void 0!==a.palette&&(document.cookie=`stt-palette=${a.palette}; ${b}`),void 0!==a.compact_lists&&(document.cookie=`stt-compact-lists=${a.compact_lists?"true":"false"}; ${b}`)}],28958)},81764,34569,a=>{"use strict";a.s(["apply_theme",0,function(a){document.documentElement.setAttribute("data-theme",a)}],81764);var b=a.i(72958);a.s(["write_stored_theme",0,function(a){try{window.localStorage.setItem("super-time-tracker-theme",a),(0,b.schedule_ui_preferences_cloud_sync)()}catch{}}],34569)},65020,84089,22592,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:c.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:a=>"true"===a||"false"===a});function e(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}a.s(["cloud_sync_enabled_preference",0,d],65020),a.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return e()}],84089);var f=a.i(81764),g=a.i(7048),h=a.i(29698),i=a.i(44103),j=a.i(28958),k=a.i(34569);a.s(["toggle_theme",0,function(){let a="dark"===e()?"light":"dark";(0,f.apply_theme)(a),(0,k.write_stored_theme)(a),h.theme_mode_preference.write(a),(0,j.write_document_preference_cookies)({theme_mode:a,theme:a}),h.theme_mode_preference.notify(),(0,i.notify_theme_subscribers)(),(0,g.notify_settings_saved)()}],22592)},96359,a=>{"use strict";var b=a.i(34542),c=a.i(46299);a.s(["use_escape_to_cancel",0,function(a,d=!0){let e=(0,b.useRef)(a);e.current=a,(0,b.useEffect)(()=>{if(!d)return;let a=a=>{"Escape"!==a.key||(0,c.is_modal_dialog_open)()||(a.preventDefault(),e.current())};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[d])}])},79334,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508),e=a.i(34542),f=a.i(34435),g=a.i(41615),h=a.i(7048),i=a.i(65020),j=a.i(74365),k=a.i(84089),l=a.i(44103),m=a.i(22592),n=a.i(96359),o=a.i(26846);let p="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";a.s(["TopbarOverflowMenu",0,function(){let a=(0,d.useRouter)(),q=(0,d.usePathname)()??"/",r=(0,e.useSyncExternalStore)(l.subscribe_theme,k.get_theme_snapshot,k.get_theme_server_snapshot),s=(0,e.useSyncExternalStore)(i.cloud_sync_enabled_preference.subscribe,i.cloud_sync_enabled_preference.get_snapshot,i.cloud_sync_enabled_preference.get_server_snapshot),{email:t,is_configured:u,is_pending:v,sign_out:w}=(0,o.use_supabase_auth_session)(),[x,y]=(0,e.useState)(!1),z=(0,e.useRef)(null);(0,e.useEffect)(()=>{if(!x)return;let a=a=>{null===z.current||z.current.contains(a.target)||y(!1)};return document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a)}},[x]);let A=()=>{y(!1)};return(0,n.use_escape_to_cancel)(A,x),(0,b.jsxs)("div",{className:"relative shrink-0",ref:z,children:[(0,b.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":x,"aria-haspopup":"menu",onClick:()=>y(a=>!a),children:(0,b.jsx)(f.HamburgerIcon,{})}),x?(0,b.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[u&&null!==t?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:t,children:t})}):null,(0,b.jsx)("li",{role:"none",children:(0,b.jsx)(c.default,{href:"/settings/tags",className:p,role:"menuitem",onClick:A,children:"Manage tags"})}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)(c.default,{href:"/pomodoro",className:p,role:"menuitem",onClick:A,children:"Pomodoro"})}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)(c.default,{href:"/settings/cloud-sync",className:p,role:"menuitem",onClick:A,children:"Sync settings"})}),u?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:p,role:"menuitemcheckbox","aria-checked":"true"===s,onClick:()=>{let a="true"===s?"false":"true";i.cloud_sync_enabled_preference.write(a),i.cloud_sync_enabled_preference.notify(),(0,h.notify_settings_saved)("true"===a?"Cloud sync enabled":"Cloud sync disabled"),"true"===a&&null!==t&&(0,j.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,b.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,b.jsx)("span",{children:"true"===s?"Pause cloud sync":"Resume cloud sync"}),(0,b.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===s?"On":"Off"})]})})}):null,(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:p,role:"menuitem",onClick:()=>{A(),(0,m.toggle_theme)()},suppressHydrationWarning:!0,children:(0,b.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,b.jsxs)("span",{children:["dark"===r?"Dark":"Light"," theme"]}),(0,b.jsx)("span",{"aria-hidden":"true",children:"dark"===r?"☾":"☀"})]})})}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:p,role:"menuitem",onClick:()=>{A(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"?",shiftKey:!0,bubbles:!0}))},children:(0,b.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,b.jsx)("span",{children:"Keyboard shortcuts"}),(0,b.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),u?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===t?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:p,role:"menuitem",onClick:()=>{A(),a.push((0,g.build_auth_page_href)("sign_in",q))},children:"Sign in"})}):(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${p} text-danger`,role:"menuitem",disabled:v,onClick:()=>{A(),w()},children:v?"Signing out…":"Sign out"})})]}):null]}):null]})}])},75654,a=>{"use strict";var b=a.i(39752);a.s(["SettingsIcon",0,function(){return(0,b.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,b.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},98790,a=>{"use strict";var b=a.i(39752),c=a.i(61995),d=a.i(41194),e=a.i(79334),f=a.i(62988),g=a.i(82508),h=a.i(75654);function i(){let a=((0,g.usePathname)()??"/").startsWith("/settings");return(0,b.jsx)(f.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${a?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":a?"page":void 0,children:(0,b.jsx)(h.SettingsIcon,{})})}function j({current:a,parent:c}){return(0,b.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,b.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,b.jsx)("li",{children:(0,b.jsx)(f.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==c?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,b.jsx)("li",{children:void 0!==c.href?(0,b.jsx)(f.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:c.href,children:c.label}):(0,b.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:c.label})})]}):null,(0,b.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,b.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:a})]})})}a.s(["TrackerTopbar",0,function({breadcrumb:a}={}){return(0,b.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,b.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,b.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==a?(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)(j,{current:a.current,parent:a.parent})}):null,(0,b.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,b.jsx)(c.TrackerNavLinks,{}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,b.jsx)(d.TopbarCloudStatus,{}),(0,b.jsx)(i,{}),(0,b.jsx)(e.TopbarOverflowMenu,{})]})]})]})})}],98790)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_00_8gfw._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[75654,a=>{"use strict";var b=a.i(39752);a.s(["SettingsIcon",0,function(){return(0,b.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,b.jsx)("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}),(0,b.jsx)("circle",{cx:"12",cy:"12",r:"3"})]})}])},26846,a=>{"use strict";var b=a.i(82508),c=a.i(34542),d=a.i(9301),e=a.i(63577),f=a.i(7048);a.s(["use_supabase_auth_session",0,function(){let a=(0,b.useRouter)(),[g,h]=(0,c.useState)(null),[i,j]=(0,c.useState)(!1),k=(0,e.is_supabase_configured)();return(0,c.useEffect)(()=>{if(!k)return;let a=(0,d.create_browser_supabase_client)();a.auth.getSession().then(({data:{session:a}})=>{h(a?.user.email??null)}).catch(()=>{h(null)});let{data:{subscription:b}}=a.auth.onAuthStateChange((a,b)=>{h(b?.user.email??null)});return()=>{b.unsubscribe()}},[k]),{is_configured:k,email:g,is_pending:i,sign_out:(0,c.useCallback)(async()=>{j(!0);try{await fetch("/api/auth/signout",{method:"POST"});let b=(0,d.create_browser_supabase_client)();await b.auth.signOut().catch(()=>{}),(0,f.notify_settings_saved)("Signed out"),a.refresh()}finally{j(!1)}},[a])}}])},61995,41194,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/",label:"Tracker",match:a=>"/"===a},{href:"/today",label:"Today",match:a=>a.startsWith("/today")},{href:"/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/pomodoro")},{href:"/sheets",label:"Sheets",match:a=>a.startsWith("/sheets")},{href:"/reporting",label:"Reporting",match:a=>a.startsWith("/reporting")}];function f(){return(0,b.jsx)("svg",{className:"block h-4 w-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,b.jsx)("path",{d:"M17.5 19a4.5 4.5 0 0 0 0-9 6.5 6.5 0 0 0-12.6 1.5A4 4 0 0 0 6 19h11.5z"})})}a.s(["TrackerNavLinks",0,function(){let a=(0,d.usePathname)()??"/";return(0,b.jsx)("div",{className:"scrollbar-none flex min-w-0 flex-1 items-center gap-1 overflow-x-auto whitespace-nowrap py-0.5 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden min-[980px]:overflow-visible",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)(c.default,{className:`rounded-full px-3 py-1.5 text-[0.85rem] font-semibold no-underline transition-colors duration-150 shrink-0 ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,href:d.href,"aria-current":e?"page":void 0,children:d.label},d.href)})})}],61995);var g=a.i(26846);a.s(["TopbarCloudStatus",0,function(){let{email:a,is_configured:c}=(0,g.use_supabase_auth_session)();return c&&null!==a?(0,b.jsxs)("div",{className:"group relative flex items-center",children:[(0,b.jsx)("span",{className:"inline-flex h-8 w-8 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-accent","aria-label":`Cloud sync active for ${a}`,role:"img",children:(0,b.jsx)(f,{})}),(0,b.jsx)("div",{role:"tooltip",className:"pointer-events-none absolute right-0 top-full z-50 mt-1.5 w-max max-w-[min(18rem,calc(100vw-2.5rem))] opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:(0,b.jsxs)("div",{className:"rounded-md border border-panel-border bg-panel px-2.5 py-1.5 shadow-md",children:[(0,b.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted",children:"Signed in as"}),(0,b.jsx)("p",{className:"m-0 max-w-[16rem] truncate text-[0.82rem] font-medium",title:a,children:a})]})})]}):null}],41194)},34435,a=>{"use strict";var b=a.i(39752);a.s(["HamburgerIcon",0,function(){return(0,b.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,b.jsx)("path",{d:"M4 7h16"}),(0,b.jsx)("path",{d:"M4 12h16"}),(0,b.jsx)("path",{d:"M4 17h16"})]})}])},41615,a=>{"use strict";a.s(["build_auth_page_href",0,function(a,b){let c="sign_in"===a?"/login":"/register",d=b.trim();return 0===d.length||"/"===d?c:`${c}?next=${encodeURIComponent(d)}`}])},28958,a=>{"use strict";a.s(["write_document_preference_cookies",0,function(a){if("u"<typeof document)return;let b="path=/; max-age=31536000; SameSite=Lax";void 0!==a.theme_mode&&(document.cookie=`stt-theme-mode=${a.theme_mode}; ${b}`),void 0!==a.theme&&(document.cookie=`stt-theme=${a.theme}; ${b}`),void 0!==a.palette&&(document.cookie=`stt-palette=${a.palette}; ${b}`),void 0!==a.compact_lists&&(document.cookie=`stt-compact-lists=${a.compact_lists?"true":"false"}; ${b}`)}],28958)},81764,34569,a=>{"use strict";a.s(["apply_theme",0,function(a){document.documentElement.setAttribute("data-theme",a)}],81764);var b=a.i(72958);a.s(["write_stored_theme",0,function(a){try{window.localStorage.setItem("super-time-tracker-theme",a),(0,b.schedule_ui_preferences_cloud_sync)()}catch{}}],34569)},65020,84089,22592,a=>{"use strict";var b=a.i(52345),c=a.i(70827);let d=(0,b.create_ui_preference_store)({storage_key:c.CLOUD_SYNC_ENABLED_STORAGE_KEY,default_value:c.CLOUD_SYNC_ENABLED_DEFAULT,is_valid:a=>"true"===a||"false"===a});function e(){return"u"<typeof document?"dark":"light"===document.documentElement.getAttribute("data-theme")?"light":"dark"}a.s(["cloud_sync_enabled_preference",0,d],65020),a.s(["get_theme_server_snapshot",0,function(){return"dark"},"get_theme_snapshot",0,function(){return e()}],84089);var f=a.i(81764),g=a.i(7048),h=a.i(29698),i=a.i(44103),j=a.i(28958),k=a.i(34569);a.s(["toggle_theme",0,function(){let a="dark"===e()?"light":"dark";(0,f.apply_theme)(a),(0,k.write_stored_theme)(a),h.theme_mode_preference.write(a),(0,j.write_document_preference_cookies)({theme_mode:a,theme:a}),h.theme_mode_preference.notify(),(0,i.notify_theme_subscribers)(),(0,g.notify_settings_saved)()}],22592)},96359,a=>{"use strict";var b=a.i(34542),c=a.i(46299);a.s(["use_escape_to_cancel",0,function(a,d=!0){let e=(0,b.useRef)(a);e.current=a,(0,b.useEffect)(()=>{if(!d)return;let a=a=>{"Escape"!==a.key||(0,c.is_modal_dialog_open)()||(a.preventDefault(),e.current())};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}},[d])}])},79334,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508),e=a.i(34542),f=a.i(34435),g=a.i(41615),h=a.i(7048),i=a.i(65020),j=a.i(74365),k=a.i(84089),l=a.i(44103),m=a.i(22592),n=a.i(96359),o=a.i(26846);let p="block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit no-underline hover:bg-surface-hover disabled:cursor-not-allowed disabled:opacity-55";a.s(["TopbarOverflowMenu",0,function(){let a=(0,d.useRouter)(),q=(0,d.usePathname)()??"/",r=(0,e.useSyncExternalStore)(l.subscribe_theme,k.get_theme_snapshot,k.get_theme_server_snapshot),s=(0,e.useSyncExternalStore)(i.cloud_sync_enabled_preference.subscribe,i.cloud_sync_enabled_preference.get_snapshot,i.cloud_sync_enabled_preference.get_server_snapshot),{email:t,is_configured:u,is_pending:v,sign_out:w}=(0,o.use_supabase_auth_session)(),[x,y]=(0,e.useState)(!1),z=(0,e.useRef)(null);(0,e.useEffect)(()=>{if(!x)return;let a=a=>{null===z.current||z.current.contains(a.target)||y(!1)};return document.addEventListener("pointerdown",a),()=>{document.removeEventListener("pointerdown",a)}},[x]);let A=()=>{y(!1)};return(0,n.use_escape_to_cancel)(A,x),(0,b.jsxs)("div",{className:"relative shrink-0",ref:z,children:[(0,b.jsx)("button",{type:"button",className:"inline-flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent","aria-label":"Open menu","aria-expanded":x,"aria-haspopup":"menu",onClick:()=>y(a=>!a),children:(0,b.jsx)(f.HamburgerIcon,{})}),x?(0,b.jsxs)("ul",{className:"absolute right-0 top-full z-50 mt-1.5 min-w-56 list-none rounded-md border border-panel-border bg-panel p-1.5 shadow-md",role:"menu",children:[u&&null!==t?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("p",{className:"m-0 truncate px-2.5 py-1 text-[0.72rem] uppercase tracking-[0.04em] text-muted",title:t,children:t})}):null,(0,b.jsx)("li",{role:"none",children:(0,b.jsx)(c.default,{href:"/settings/tags",className:p,role:"menuitem",onClick:A,children:"Manage tags"})}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)(c.default,{href:"/pomodoro",className:p,role:"menuitem",onClick:A,children:"Pomodoro"})}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)(c.default,{href:"/settings/cloud-sync",className:p,role:"menuitem",onClick:A,children:"Sync settings"})}),u?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:p,role:"menuitemcheckbox","aria-checked":"true"===s,onClick:()=>{let a="true"===s?"false":"true";i.cloud_sync_enabled_preference.write(a),i.cloud_sync_enabled_preference.notify(),(0,h.notify_settings_saved)("true"===a?"Cloud sync enabled":"Cloud sync disabled"),"true"===a&&null!==t&&(0,j.run_tracker_db_cloud_sync)({merge_on_load:!0}).catch(()=>{})},children:(0,b.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,b.jsx)("span",{children:"true"===s?"Pause cloud sync":"Resume cloud sync"}),(0,b.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"true"===s?"On":"Off"})]})})}):null,(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:p,role:"menuitem",onClick:()=>{A(),(0,m.toggle_theme)()},suppressHydrationWarning:!0,children:(0,b.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,b.jsxs)("span",{children:["dark"===r?"Dark":"Light"," theme"]}),(0,b.jsx)("span",{"aria-hidden":"true",children:"dark"===r?"☾":"☀"})]})})}),(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:p,role:"menuitem",onClick:()=>{A(),document.dispatchEvent(new KeyboardEvent("keydown",{key:"?",shiftKey:!0,bubbles:!0}))},children:(0,b.jsxs)("span",{className:"inline-flex w-full items-center justify-between gap-2",children:[(0,b.jsx)("span",{children:"Keyboard shortcuts"}),(0,b.jsx)("span",{className:"text-muted","aria-hidden":"true",children:"(?)"})]})})}),u?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("li",{className:"my-1 border-t border-panel-border",role:"separator","aria-hidden":"true"}),null===t?(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:p,role:"menuitem",onClick:()=>{A(),a.push((0,g.build_auth_page_href)("sign_in",q))},children:"Sign in"})}):(0,b.jsx)("li",{role:"none",children:(0,b.jsx)("button",{type:"button",className:`${p} text-danger`,role:"menuitem",disabled:v,onClick:()=>{A(),w()},children:v?"Signing out…":"Sign out"})})]}):null]}):null]})}])},98790,a=>{"use strict";var b=a.i(39752),c=a.i(61995),d=a.i(41194),e=a.i(79334),f=a.i(62988),g=a.i(82508),h=a.i(75654);function i(){let a=((0,g.usePathname)()??"/").startsWith("/settings");return(0,b.jsx)(f.default,{href:"/settings",className:`inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-panel-border bg-ghost-bg text-muted no-underline hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent${a?" border-accent-border text-foreground":""}`,"aria-label":"Settings","aria-current":a?"page":void 0,children:(0,b.jsx)(h.SettingsIcon,{})})}function j({current:a,parent:c}){return(0,b.jsx)("nav",{"aria-label":"Breadcrumb",className:"min-w-0 text-left",children:(0,b.jsxs)("ol",{className:"m-0 flex min-w-0 list-none flex-wrap items-center gap-1.5 p-0 text-[0.85rem]",children:[(0,b.jsx)("li",{children:(0,b.jsx)(f.default,{className:"text-muted no-underline hover:text-foreground",href:"/",children:"Tracker"})}),void 0!==c?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,b.jsx)("li",{children:void 0!==c.href?(0,b.jsx)(f.default,{className:"max-w-44 truncate text-muted no-underline hover:text-foreground sm:max-w-none",href:c.href,children:c.label}):(0,b.jsx)("span",{className:"max-w-44 truncate text-muted sm:max-w-none",children:c.label})})]}):null,(0,b.jsx)("li",{className:"text-muted","aria-hidden":"true",children:"/"}),(0,b.jsx)("li",{className:"max-w-44 truncate font-medium text-foreground sm:max-w-none","aria-current":"page",children:a})]})})}a.s(["TrackerTopbar",0,function({breadcrumb:a}={}){return(0,b.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,b.jsxs)("div",{className:"mx-auto flex max-w-[1120px] min-h-13 flex-wrap items-center gap-x-4 gap-y-2 px-4 py-2 sm:px-5",children:[(0,b.jsx)("span",{className:"inline-flex min-w-0 shrink items-center font-mono text-[0.72rem] font-semibold uppercase leading-tight tracking-[0.08em] text-accent whitespace-nowrap",children:"super-time-tracker"}),void 0!==a?(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)(j,{current:a.current,parent:a.parent})}):null,(0,b.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 min-[980px]:ml-auto min-[980px]:w-auto min-[980px]:justify-end",children:[(0,b.jsx)(c.TrackerNavLinks,{}),(0,b.jsxs)("div",{className:"flex shrink-0 items-center justify-end gap-2",children:[(0,b.jsx)(d.TopbarCloudStatus,{}),(0,b.jsx)(i,{}),(0,b.jsx)(e.TopbarOverflowMenu,{})]})]})]})})}],98790)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_059wg4v._.js.map
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[85393,a=>{"use strict";var b=a.i(39752),c=a.i(62988),d=a.i(82508);let e=[{href:"/settings",label:"General",match:a=>"/settings"===a},{href:"/settings/display",label:"Display & layout",match:a=>a.startsWith("/settings/display")},{href:"/settings/goals",label:"Goals",match:a=>a.startsWith("/settings/goals")},{href:"/settings/pomodoro",label:"Pomodoro",match:a=>a.startsWith("/settings/pomodoro")},{href:"/settings/notifications",label:"Notifications",match:a=>a.startsWith("/settings/notifications")},{href:"/settings/ai-suggestions",label:"AI suggestions",match:a=>a.startsWith("/settings/ai-suggestions")},{href:"/settings/cloud-sync",label:"Sync",match:a=>a.startsWith("/settings/cloud-sync")},{href:"/settings/data",label:"Data & backup",match:a=>a.startsWith("/settings/data")},{href:"/settings/tags",label:"Tag management",match:a=>a.startsWith("/settings/tags")}];a.s(["SettingsNav",0,function(){let a=(0,d.usePathname)()??"/settings";return(0,b.jsx)("nav",{"aria-label":"Settings sections",className:"w-full",children:(0,b.jsx)("ul",{className:"scrollbar-none m-0 flex w-full list-none gap-1 overflow-x-auto p-0 pb-1 [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden max-[860px]:flex-row min-[861px]:flex-col min-[861px]:gap-0.5 min-[861px]:overflow-visible min-[861px]:pb-0",children:e.map(d=>{let e=d.match(a);return(0,b.jsx)("li",{className:"shrink-0 min-[861px]:shrink",children:(0,b.jsx)(c.default,{href:d.href,"aria-current":e?"page":void 0,className:`block whitespace-nowrap rounded-md px-3 py-2 text-[0.9rem] no-underline transition-colors duration-150 min-[861px]:whitespace-normal ${e?"bg-accent-soft text-foreground":"text-muted hover:bg-surface-hover hover:text-foreground"}`,children:d.label})},d.href)})})})}])},59659,5796,a=>{"use strict";var b=a.i(87281);function c(){}function d(){(0,b.is_greedy_cloud_sync_enabled)()&&c()}a.i(63577),a.i(51652),a.i(74365),Promise.resolve(),a.s(["schedule_tracker_db_cloud_sync",0,d],5796),a.s(["push_tracker_db_cloud_after_change",0,function(){(0,b.is_greedy_cloud_sync_enabled)()?d():c()}],59659)},69749,a=>{"use strict";a.s(["get_input_class_name",0,function(a="default"){let b="box-border max-w-full min-w-0 w-full rounded-[0.65rem] border border-panel-border bg-input-bg px-3 py-2.5 font-inherit text-inherit transition-[background-color,border-color] duration-200 focus:border-input-focus-border focus:outline-none";return"compact"===a?`${b} px-2.5 py-2`:b}])},56924,a=>{"use strict";a.s(["normalize_stored_tag",0,function(a){let b=a.trim().replace(/^@+/,"");if(0===b.length)throw Error("Tag name must not be empty.");if(!/^\w+$/.test(b))throw Error("Tags may only contain letters, numbers, and underscores.");return`@${b}`}])},48174,a=>{"use strict";a.s(["format_display_tag",0,function(a){return a.startsWith("@")?a:`@${a}`}])},30354,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(48174),e=a.i(69749),f=a.i(56924);a.s(["TagAutocompleteInput",0,function({id:a,value:g,known_tags:h,placeholder:i,disabled:j=!1,autoFocus:k=!1,on_change:l}){let m=(0,c.useRef)(null),n=(0,c.useRef)(null),o=(0,c.useRef)(null),[p,q]=(0,c.useState)(0),[r,s]=(0,c.useState)(0),t=function(a,b){let c=a.slice(0,b),d=c.lastIndexOf("@");if(-1===d)return null;let e=c.slice(d+1);return/\s/.test(e)?null:{query:e,start_index:d,end_index:b}}(g,p),u=null===t?[]:function(a,b,c=10){let d=b.toLowerCase();return a.filter(a=>{let b=a.replace(/^@/,"").toLowerCase();return 0===d.length||b.startsWith(d)}).slice(0,c)}(h,t.query),v=null!==t&&function(a,b){if(!/^\w+$/.test(a))return!1;let c=a.toLowerCase();return b.some(a=>{try{return(0,f.normalize_stored_tag)(a).slice(1).toLowerCase()===c}catch{return!1}})}(t.query,h),w=null!==t&&u.length>0&&!v&&!j;(0,c.useLayoutEffect)(()=>{null!==o.current&&null!==m.current&&(m.current.setSelectionRange(o.current,o.current),q(o.current),o.current=null)},[g]),(0,c.useEffect)(()=>{s(0)},[g,p,u.length]);let x=()=>{q(m.current?.selectionStart??g.length)},y=()=>{s(0)},z=a=>{let b,c,e;if(null===t)return;let{next_text:f,next_cursor:h}=(b=(0,d.format_display_tag)(a),c=g.slice(0,t.start_index),e=g.slice(t.end_index),{next_text:`${c}${b}${e}`,next_cursor:c.length+b.length});o.current=h,l(f),y()};return(0,b.jsxs)("div",{className:"relative min-w-0",children:[(0,b.jsx)("input",{ref:m,id:a,type:"text",className:(0,e.get_input_class_name)(),value:g,placeholder:i,disabled:j,autoFocus:k,autoComplete:"off","aria-autocomplete":"list","aria-expanded":w,"aria-controls":w?`${a}-tag-suggestions`:void 0,onChange:a=>{l(a.target.value),q(a.target.selectionStart??a.target.value.length)},onClick:x,onKeyUp:x,onKeyDown:a=>{if(w){if("ArrowDown"===a.key){a.preventDefault(),s(a=>(a+1)%u.length);return}if("ArrowUp"===a.key){a.preventDefault(),s(a=>(a-1+u.length)%u.length);return}if("Enter"===a.key||"Tab"===a.key){a.preventDefault();let b=u[r];void 0!==b&&z(b);return}"Escape"===a.key&&(a.preventDefault(),y())}},onBlur:()=>{window.setTimeout(y,120)}}),w?(0,b.jsx)("ul",{ref:n,id:`${a}-tag-suggestions`,role:"listbox",className:"absolute left-0 right-0 top-full z-20 mt-1 max-h-48 list-none overflow-y-auto rounded-md border border-panel-border bg-panel p-1.5 shadow-md",children:u.map((a,c)=>(0,b.jsx)("li",{role:"option","aria-selected":c===r,children:(0,b.jsx)("button",{type:"button",className:`block w-full cursor-pointer rounded-[0.45rem] border-0 bg-transparent px-2.5 py-1.5 text-left font-inherit text-[0.85rem] text-inherit hover:bg-surface-hover ${c===r?"bg-surface-hover":""}`,onMouseDown:b=>{b.preventDefault(),z(a)},children:(0,d.format_display_tag)(a)})},a))}):null]})}],30354)},85930,a=>{"use strict";var b=a.i(39752),c=a.i(85393),d=a.i(98790);a.s(["SettingsPageLayout",0,function({breadcrumb:a,title:e,description:f,children:g}){return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.TrackerTopbar,{breadcrumb:a}),(0,b.jsxs)("main",{className:"mx-auto grid w-full max-w-[1120px] grid-cols-[minmax(12rem,16rem)_minmax(0,1fr)] gap-4 px-4 pb-10 pt-5 sm:gap-6 sm:px-5 sm:pt-6 max-[860px]:grid-cols-1",children:[(0,b.jsxs)("aside",{className:"flex flex-col gap-2",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Settings"}),(0,b.jsx)(c.SettingsNav,{})]}),(0,b.jsxs)("section",{className:"flex min-w-0 flex-col gap-4",children:[(0,b.jsxs)("header",{className:"flex flex-col gap-1",children:[(0,b.jsx)("h1",{className:"m-0 text-[1.35rem] font-[650] tracking-tight",children:e}),void 0!==f?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] leading-relaxed text-muted",children:f}):null]}),g]})]})]})}])},53372,a=>{"use strict";var b=a.i(39752),c=a.i(34542),d=a.i(53030),e=a.i(85930),f=a.i(30354),g=a.i(48174),h=a.i(89969),i=a.i(69749);function j(a,b,c){let d=a.map(a=>(0,g.format_display_tag)(a)).join(", "),e=(0,g.format_display_tag)(b),f=1===c?"1 entry will be updated.":`${c} entries will be updated.`;return{title:"Merge tags?",message:`Merge ${d} into ${e}? ${f}`,confirmLabel:"Merge tags",variant:"danger"}}var k=a.i(59659);a.s(["TagManagementView",0,function({initial_tags:a}){let{confirm:l}=(0,d.use_confirm_dialog)(),[m,n]=(0,c.useState)(a),[o,p]=(0,c.useState)(()=>new Set),[q,r]=(0,c.useState)({}),[s,t]=(0,c.useState)(""),[u,v]=(0,c.useState)(null),[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(!1),A=(0,c.useMemo)(()=>m.map(a=>a.name),[m]),B=m.filter(a=>o.has(a.name)).reduce((a,b)=>a+b.entryCount,0),C=async a=>{let b=await fetch("/api/tags",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!b.ok)throw Error((await b.json()).error??"Tag update failed");let c=await b.json();n(c.tags),p(new Set),x(1===c.entries_updated?"Updated 1 entry.":`Updated ${c.entries_updated} entries.`),(0,k.push_tracker_db_cloud_after_change)()},D=async a=>{let b=q[a]?.trim()??"";if(0===b.length)return void v("Enter a new tag name.");let c=m.find(b=>b.name===a);if(void 0===c)return;let d=m.find(a=>(0,g.format_display_tag)(a.name)===(0,g.format_display_tag)(b)),e=void 0!==d&&d.name!==a?c.entryCount+d.entryCount:c.entryCount;if(await l(j([a],b,e))){z(!0),v(null),x(null);try{await C({action:"rename",fromTag:a,toTag:b}),r(b=>{let c={...b};return delete c[a],c})}catch(a){v(a instanceof Error?a.message:String(a))}finally{z(!1)}}},E=async()=>{let a=[...o];if(a.length<2)return void v("Select at least two tags to merge.");if(0===s.trim().length)return void v("Enter a target tag for the merge.");if(await l(j(a,s,B))){z(!0),v(null),x(null);try{await C({action:"merge",sourceTags:a,targetTag:s}),t("")}catch(a){v(a instanceof Error?a.message:String(a))}finally{z(!1)}}};return(0,b.jsxs)(e.SettingsPageLayout,{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,b.jsxs)("section",{className:"rounded-md border border-panel-border bg-panel p-3.5 shadow-sm",children:[(0,b.jsx)("h2",{className:"m-0 text-[0.95rem] font-semibold",children:"Merge tags"}),(0,b.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,b.jsxs)("label",{className:"mt-3 flex flex-col gap-1 text-[0.82rem] text-muted",children:["Target tag",(0,b.jsx)(f.TagAutocompleteInput,{id:"merge-target-tag",value:s,known_tags:A,placeholder:"e.g. @project",disabled:y,on_change:t})]}),(0,b.jsxs)("button",{type:"button",className:`${(0,h.get_button_class_name)("primary","small")} mt-3`,disabled:y||o.size<2,onClick:()=>void E(),children:["Merge ",o.size," tags"]})]}),0===m.length?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"No tags yet. Add @tags when you check in to an entry."}):(0,b.jsx)("ul",{className:"m-0 flex list-none flex-col gap-2 p-0","aria-label":"Tags",children:m.map(a=>(0,b.jsx)("li",{className:"rounded-md border border-panel-border bg-panel px-3.5 py-2.5 shadow-sm",children:(0,b.jsxs)("form",{className:"flex flex-wrap items-center gap-x-3 gap-y-2",onSubmit:b=>{b.preventDefault(),D(a.name)},children:[(0,b.jsx)("input",{type:"checkbox",className:"shrink-0",checked:o.has(a.name),disabled:y,"aria-label":`Select ${(0,g.format_display_tag)(a.name)}`,onChange:()=>{var b;return b=a.name,void p(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})}}),(0,b.jsxs)("div",{className:"flex min-w-0 shrink-0 flex-wrap items-baseline gap-x-2 gap-y-0.5",children:[(0,b.jsx)("span",{className:"font-semibold leading-tight",children:(0,g.format_display_tag)(a.name)}),(0,b.jsxs)("span",{className:"text-[0.82rem] text-muted",children:[a.entryCount," ",1===a.entryCount?"entry":"entries"]})]}),(0,b.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,b.jsx)("input",{className:(0,i.get_input_class_name)("compact"),value:q[a.name]??"",placeholder:"Rename to…","aria-label":`Rename ${(0,g.format_display_tag)(a.name)}`,disabled:y,onChange:b=>r(c=>({...c,[a.name]:b.target.value}))}),(0,b.jsx)("button",{type:"submit",className:`${(0,h.get_button_class_name)("ghost","small")} shrink-0`,disabled:y||(q[a.name]?.trim().length??0)===0,children:"Rename"})]})]})},a.name))}),null!==w?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] text-accent",children:w}):null,null!==u?(0,b.jsx)("p",{className:"m-0 text-[0.9rem] text-danger",children:u}):null]})}],53372)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=_08dnxqq._.js.map
|