@dubusoft/toodo-linux-arm64 1.11.1-dev.183 → 1.11.1-dev.190

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/web/sw.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Generated by vite-pwa.ts for this build.
2
- const CACHE = "toodo-shell-b8ae63a56f160c55";
3
- const SHELL = ["/","/assets/Item-CxXDVdxg.js","/assets/LayoutChangeSnapshot-CKXseiXe.js","/assets/MenuBottomSheet-mlD8Gm29.js","/assets/MenuBottomSheetActionList-Dbjqtifj.js","/assets/Selector-B5jbIiZk.js","/assets/SwipeActionsLayer-Bejm-fRw.js","/assets/Tooltip-D5RzAbgJ.js","/assets/button-CBaPb4j9.js","/assets/createLucideIcon-DtNDbJdC.js","/assets/details-sheet-m1U7cINQ.js","/assets/disabledInteraction-u9yjM5Jo.js","/assets/event-CSYkpd32.js","/assets/focusOutline.stylex-ZXdUNMFw.js","/assets/focusReturn-BAqtMp_d.js","/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2","/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2","/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2","/assets/geist-latin-wght-normal-BgDaEnEv.woff2","/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2","/assets/index-CEWalcgJ.js","/assets/index-bmzrMLgi.css","/assets/inputHold-CZa_Ny55.js","/assets/jsx-runtime-C3cWAN_r.js","/assets/markdown-qm8X61w7.js","/assets/mergeProps-Poh9JbFs.js","/assets/offline-screen-Dd05eBVY.js","/assets/opener-DWhHPoCL.js","/assets/padding.stylex-Q-kmgnXU.js","/assets/primaryClick-88oQu3_u.js","/assets/queries-qy-Fgikw.js","/assets/reducedMotion-DCkUC6gt.js","/assets/resolveSnapPoint-CBS37OcT.js","/assets/review-DMyn842Z.js","/assets/rolldown-runtime-XKyaHtl9.js","/assets/server-access-Bq8jX3SY.js","/assets/session-sBDFnC3r.js","/assets/task-details-9__-MrOK.js","/assets/task-graph-DLioOiRN.css","/assets/task-graph-DPobWe6a.js","/assets/useDevWarning-DtAYt56R.js","/assets/useLayerDismissal-BWIjwIJ-.js","/assets/useLinkComponent-CqCWDM4X.js","/assets/useTooltip-C_x74aGj.js","/favicon.svg","/manifest.webmanifest","/pwa/apple-touch-icon.png","/pwa/icon-192.png","/pwa/icon-512.png","/pwa/icon-maskable-192.png","/pwa/icon-maskable-512.png"];
2
+ const CACHE = "toodo-shell-5b00dca1f0345ae3";
3
+ const SHELL = ["/","/assets/Item-CYeHP9x3.js","/assets/LayoutChangeSnapshot-CKXseiXe.js","/assets/MenuBottomSheet-DTrICmho.js","/assets/MenuBottomSheetActionList-PkbkLEyi.js","/assets/Selector-D_XL1cT9.js","/assets/SwipeActionsLayer-DIWq2pow.js","/assets/Tooltip-D5RzAbgJ.js","/assets/button-CBaPb4j9.js","/assets/createLucideIcon-DtNDbJdC.js","/assets/details-sheet-Bi7DoMJh.js","/assets/disabledInteraction-u9yjM5Jo.js","/assets/event-CSYkpd32.js","/assets/focusOutline.stylex-ZXdUNMFw.js","/assets/focusReturn-BAqtMp_d.js","/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2","/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2","/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2","/assets/geist-latin-wght-normal-BgDaEnEv.woff2","/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2","/assets/index-CsInHoHY.js","/assets/index-bmzrMLgi.css","/assets/inputHold-CZa_Ny55.js","/assets/jsx-runtime-C3cWAN_r.js","/assets/markdown-Bh9eEY5s.js","/assets/mergeProps-Poh9JbFs.js","/assets/offline-screen-DE0QwTVx.js","/assets/opener-DWhHPoCL.js","/assets/padding.stylex-Q-kmgnXU.js","/assets/primaryClick-88oQu3_u.js","/assets/queries-01NiAvqS.js","/assets/reducedMotion-DCkUC6gt.js","/assets/resolveSnapPoint-CBS37OcT.js","/assets/review-2RqEEvjf.js","/assets/rolldown-runtime-XKyaHtl9.js","/assets/server-access-dLztdn9t.js","/assets/session-sBDFnC3r.js","/assets/task-details-DK77SGWd.js","/assets/task-graph-CZXSZ3LO.js","/assets/task-graph-DLioOiRN.css","/assets/useDevWarning-DtAYt56R.js","/assets/useLayerDismissal-BWIjwIJ-.js","/assets/useLinkComponent-CqCWDM4X.js","/assets/useTooltip-C_x74aGj.js","/favicon.svg","/manifest.webmanifest","/pwa/apple-touch-icon.png","/pwa/icon-192.png","/pwa/icon-512.png","/pwa/icon-maskable-192.png","/pwa/icon-maskable-512.png"];
4
4
  const SERVER_PATHS = ["/api","/mcp"];
5
5
  const NOTIFICATION_ICON = "/pwa/icon-192.png";
6
6
  // The message that asks an open page to show a task; see listenForOpenTask in src/web/push.ts.
package/web/version.json CHANGED
@@ -1 +1 @@
1
- {"build":"90fe804e32d7c686"}
1
+ {"build":"57d12f9ed88be056"}
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{n as t,t as n}from"./jsx-runtime-C3cWAN_r.js";import{c as r,g as i,i as a,l as o,o as s,t as c}from"./session-sBDFnC3r.js";import{n as l}from"./event-CSYkpd32.js";var u=e(t(),1),d=u.createContext(!1),f=()=>u.useContext(d);d.Provider;var p=n(),m=u.createContext(void 0),h=e=>{let t=u.useContext(m);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},g=({client:e,children:t})=>(u.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,p.jsx)(m.Provider,{value:e,children:t}));function _(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var v=u.createContext(_()),y=()=>u.useContext(v),b=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},x=new class extends b{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ee={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},S=new class{#e=ee;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function te(e){setTimeout(e,0)}var ne=typeof window>`u`||`Deno`in globalThis;function C(){}function re(e,t){return typeof e==`function`?e(t):e}function ie(e){return typeof e==`number`&&e>=0&&e!==1/0}function ae(e,t){return Math.max(e+(t||0)-Date.now(),0)}function w(e,t){return typeof e==`function`?e(t):e}function oe(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ce(o,t.options))return!1}else if(!E(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function se(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(T(t.options.mutationKey)!==T(a))return!1}else if(!E(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ce(e,t){return(t?.queryKeyHashFn||T)(e)}function T(e){return JSON.stringify(e,(e,t)=>O(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function E(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)!==Array.isArray(t))return!1;if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!E(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!E(e[r],t[r]))return!1;return!0}return!1}var le=Object.prototype.hasOwnProperty;function ue(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=de(e)&&de(t);if(!r&&!(O(e)&&O(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:le.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ue(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function D(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!le.call(t,n)||e[n]!==t[n])return!1;return!0}function de(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function O(e){if(!fe(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!fe(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function fe(e){return Object.prototype.toString.call(e)===`[object Object]`}function pe(e){return new Promise(t=>{S.setTimeout(t,e)})}function k(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ue(e,t)}function me(e,t,n,r){let i=r?[t,...e]:[...e,t];return n&&i.length>n?r?i.slice(0,n):i.slice(-n):i}var he=Symbol();function ge(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===he?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function _e(e,t){return typeof e==`function`?e(...t):!!e}var ve=Symbol();function ye(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[ve]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var be=()=>ne,xe=()=>be();function Se(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{ye(e,()=>t.signal,()=>n=!0,l[ve])},d=ge(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options;return{pages:me(e.pages,o,s,i),pageParams:me(e.pageParams,r,s,i)}};if(i&&a.length){let e=i===`backward`,t=e?we:Ce,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:Ce(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Ce(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function we(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Te(e,t){return t?Ce(e,t)!=null:!1}function Ee(e,t){return!t||!e.getPreviousPageParam?!1:we(e,t)!=null}var De=te;function Oe(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=De,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var A=Oe(),ke=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ie(this.gcTime)&&(this.#e=S.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xe()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(S.clearTimeout(this.#e),this.#e=void 0)}},j=new class extends b{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Ae(e){return Math.min(1e3*2**e,3e4)}function je(e){return(e??`online`)!==`online`||j.isOnline()}var M=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Me(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(C);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new M(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>x.isFocused()&&(e.networkMode===`always`||j.isOnline())&&e.canRun(),p=()=>je(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(xe()?0:3),a=e.retryDelay??Ae,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),pe(o).then(()=>c()||f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var Ne=class extends ke{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ie(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ie(this.options);e.data!==void 0&&(this.setState(Fe(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=k(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(C).catch(C):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>w(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===he||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>w(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!ae(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[ve]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=ge(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Se(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Me({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof M&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof M){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Pe(t.data,this.options),fetchMeta:e.meta??null};case`success`:{let n={...t,...Fe(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n}case`error`:{let n=e.error;return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:`idle`,status:`error`,isInvalidated:!0}}case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),A.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Pe(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:je(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Fe(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ie(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Le=class extends b{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ze(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return N(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return N(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof w(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!D(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Be(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||w(this.options.enabled,this.#t)!==w(t.enabled,this.#t)||w(this.options.staleTime,this.#t)!==w(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||w(this.options.enabled,this.#t)!==w(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return D(this.getCurrentResult(),n)||(this.#r=n,this.#i=e),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(C)),t}#h(e){return!xe()&&w(this.options.enabled,this.#t)!==!1&&ie(e)}#g(){this.#b();let e=w(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=ae(this.#r.dataUpdatedAt,e)+1;this.#u=S.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return w(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=S.setInterval(()=>{(this.options.refetchIntervalInBackground||x.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(S.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(S.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=e===n?this.#n:e.state,{state:s}=e,c={...s},l=!1,u;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&ze(e,t),o=i&&Be(e,n,t,r);(a||o)&&(c={...c,...Pe(s.data,e.options)}),t._optimisticResults===`isRestoring`&&(c.fetchStatus=`idle`)}let{error:d,errorUpdatedAt:f,status:p}=c;u=c.data;let m=!1;if(t.placeholderData!==void 0&&u===void 0&&p===`pending`){let e,n=i?.isPlaceholderData&&t.placeholderData===a?.placeholderData;n?(e=i.data,m=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,(n||e!==void 0)&&(p=`success`,u=k(t.select&&!m?this.#s:i?.data,e,t),l=!0)}if(t.select&&u!==void 0&&!m){if(u===this.#s&&t.select===this.#o)u=this.#c;else try{this.#o=t.select,this.#s=u,u=t.select(u),u=k(i?.data,u,t),this.#c=u,this.#a=null}catch(e){this.#a=e}}else u===void 0&&(this.#s=void 0,this.#a=null);this.#a&&(d=this.#a,u=this.#c,f=i?.error===d?i.errorUpdatedAt:Date.now(),p=`error`,l=!1);let h=c.fetchStatus===`fetching`,g=p===`pending`,_=p===`error`,v=g&&h,y=u!==void 0;return{status:p,fetchStatus:c.fetchStatus,isPending:g,isSuccess:p===`success`,isError:_,isInitialLoading:v,isLoading:v,data:u,dataUpdatedAt:c.dataUpdatedAt,error:d,errorUpdatedAt:f,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:c.dataUpdateCount>o.dataUpdateCount||c.errorUpdateCount>o.errorUpdateCount,isFetching:h,isRefetching:h&&!g,isLoadingError:_&&!y,isPaused:c.fetchStatus===`paused`,isPlaceholderData:l,isRefetchError:_&&y,isStale:P(e,t),refetch:this.refetch,isEnabled:w(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.options,this.#t.state.data!==void 0&&(this.#l=this.#t),D(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();A.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Re(e,t){return w(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||w(t.retryOnMount,e)!==!1)}function ze(e,t){return Re(e,t)||e.state.data!==void 0&&N(e,t,t.refetchOnMount)}function N(e,t,n){if(w(t.enabled,e)!==!1&&w(t.staleTime,e)!==`static`){let r=w(n,e);return r===`always`||r!==!1&&P(e,t)}return!1}function Be(e,t,n,r){return(e!==t||w(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&P(e,n)}function P(e,t){return w(t.enabled,e)!==!1&&e.isStaleByTime(w(t.staleTime,e))}var Ve=class extends Le{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Te(t,n.data),hasPreviousPage:Ee(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},He=class extends ke{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Ue(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=Me({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),A.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ue(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var We=class extends b{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),D(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&T(t.mutationKey)!==T(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Ue();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){A.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Ge=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?_e(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Ke=e=>{u.useEffect(()=>{e.clearReset()},[e])},qe=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||_e(n,[e.error,r])),Je=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ye=(e,t)=>e?.suspense&&t.isPending,Xe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ze(e,t,n){let r=f(),i=y(),a=h(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Je(o),Ge(o,i,s),Ke(i);let[l]=u.useState(()=>new t(a,o)),d=l.getOptimisticResult(o);u.useEffect(()=>{l.setOptions(o)},[o,l]);let p=!r&&c;if(u.useSyncExternalStore(u.useCallback(e=>{let t=p?l.subscribe(A.batchCalls(e)):C;return l.updateResult(),t},[l,p]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),Ye(o,d))throw Xe(o,l,i);if(qe({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return o.notifyOnChangeProps?d:l.trackResult(d)}function F(e,t){return Ze(e,Le,t)}function I(e,t){let n=h(t),[r]=u.useState(()=>new We(n,e));u.useEffect(()=>{r.setOptions(e)},[r,e]);let i=u.useSyncExternalStore(u.useCallback(e=>r.subscribe(A.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=u.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(C)},[r]);if(i.error&&_e(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Qe(e,t){return Ze(e,Ve,t)}var L={planned:`Blocked`,ready:`Ready`,waiting:`Planned`,paused:`Paused`,in_progress:`In progress`,in_review:`Awaiting completion`,done:`Done`,not_adopted:`Not adopted`},$e=`Planned on`,et={neutral:`bg-muted text-foreground/70`,info:`bg-sky-100 text-sky-800 dark:bg-sky-950 dark:text-sky-200`,progress:`bg-blue-100 text-blue-800 dark:bg-blue-950 dark:text-blue-200`,review:`bg-violet-100 text-violet-800 dark:bg-violet-950 dark:text-violet-200`,success:`bg-emerald-100 text-emerald-800 dark:bg-emerald-950 dark:text-emerald-200`,attention:`bg-amber-100 text-amber-900 dark:bg-amber-950 dark:text-amber-200`,danger:`bg-rose-100 text-rose-800 dark:bg-rose-950 dark:text-rose-200`},tt={neutral:`text-muted-foreground`,info:`text-sky-700 dark:text-sky-300`,progress:`text-blue-700 dark:text-blue-300`,review:`text-violet-700 dark:text-violet-300`,success:`text-emerald-700 dark:text-emerald-300`,attention:`text-amber-700 dark:text-amber-300`,danger:`text-rose-700 dark:text-rose-300`},nt={neutral:`border-border text-muted-foreground`,info:`border-sky-300 text-sky-700 dark:border-sky-800 dark:text-sky-300`,progress:`border-blue-300 text-blue-700 dark:border-blue-800 dark:text-blue-300`,review:`border-violet-300 text-violet-700 dark:border-violet-800 dark:text-violet-300`,success:`border-emerald-300 text-emerald-700 dark:border-emerald-800 dark:text-emerald-300`,attention:`border-amber-300 text-amber-700 dark:border-amber-800 dark:text-amber-300`,danger:`border-rose-300 text-rose-700 dark:border-rose-800 dark:text-rose-300`},rt={info:`border border-sky-300 bg-sky-50 text-sky-900 dark:border-sky-800 dark:bg-sky-950 dark:text-sky-100`,attention:`border border-amber-300 bg-amber-50 text-amber-900 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-100`,danger:`border border-rose-300 bg-rose-50 text-rose-900 dark:border-rose-800 dark:bg-rose-950 dark:text-rose-100`},it={neutral:`bg-neutral-400`,info:`bg-sky-500`,progress:`bg-blue-500`,review:`bg-violet-500`,success:`bg-emerald-500`,attention:`bg-amber-500`,danger:`bg-rose-500`},at={neutral:`border-muted-foreground`,info:`border-sky-500`,progress:`border-blue-500`,review:`border-violet-500`,success:`border-emerald-500`,attention:`border-amber-500`,danger:`border-rose-500 dark:border-rose-400`},ot={done:`border-emerald-500 bg-emerald-100 dark:bg-emerald-950`,ready:`border-amber-500 shadow-none`,blocked:`border-dashed border-muted-foreground shadow-none`,paused:`border-dashed border-muted-foreground bg-muted shadow-none`,behindDue:`border-2 border-rose-500 dark:border-rose-400`},st=`border-foreground/70`,ct=`text-foreground`,lt=[[`plannedAt`,`Planned`],[`startedAt`,`Started`],[`reviewAt`,L.in_review],[`completedAt`,`Completed`],[`reopenedAt`,`Reopened`],[`pausedAt`,L.paused]];function ut(e){let t=new Date(e*1e3),n=e=>String(e).padStart(2,`0`);return`${t.getFullYear()}-${n(t.getMonth()+1)}-${n(t.getDate())}`}var dt=new Intl.RelativeTimeFormat(`en`,{numeric:`auto`,style:`short`}),ft=604800;function pt(e,t=Date.now()/1e3){let n=e-t,r=Math.abs(n);if(r<60)return`just now`;if(r<ft){let[e,t]=r<3600?[Math.trunc(n/60),`minute`]:r<86400?[Math.trunc(n/3600),`hour`]:[Math.trunc(n/86400),`day`];return dt.format(e,t)}let i=new Date(e*1e3),a=i.getFullYear()===new Date(t*1e3).getFullYear();return i.toLocaleDateString(`en`,{month:`short`,day:`numeric`,...a?{}:{year:`numeric`}})}function mt(e,t=Date.now()/1e3){let n=Math.max(0,Math.floor((e-t)/60));if(n<60)return`${n}m`;if(n<1440)return`${Math.floor(n/30)/2}h`;let r=Math.floor(n/1440);return r<14?`${r}d`:r<60?`${Math.floor(r/7)}w`:r<365?`${Math.floor(r/30)}mo`:`${Math.floor(r/365)}y`}function ht(e){return new Date(e*1e3).toLocaleString(`en`,{dateStyle:`medium`,timeStyle:`short`})}function gt(e){let t=[];for(let n of e){let e=t.at(-1);e!==void 0&&e.end===null&&(e.end=n.at),n.status!==`done`&&(n.status===`planned`?t.length>0&&t.push({state:`paused`,start:n.at,end:null,reason:n.reason}):t.push({state:n.status,start:n.at,end:null,reason:null}))}return t}function _t(e,t){return yt(e,t,e=>e!==`paused`)}function vt(e,t){return yt(e,t,e=>e===`paused`)}function yt(e,t,n){let r=gt(e);return r.length===0?null:r.filter(e=>n(e.state)).reduce((e,n)=>e+Math.max((n.end??t)-n.start,0),0)}function bt(e){return lt.flatMap(([t,n])=>{let r=e[t];return r===null?[]:[{label:n,at:r}]}).sort((e,t)=>e.at-t.at)}function xt({at:e,prefix:t=``,className:n}){return(0,p.jsx)(`time`,{className:n,dateTime:new Date(e*1e3).toISOString(),title:ht(e),children:`${t}${pt(e)}`})}var St=3e4;function Ct(e){return typeof e==`object`&&!!e&&typeof e.kind==`string`&&typeof e.code==`string`&&typeof e.message==`string`}async function R(e,t={}){let n=a();if(n===null)throw Error(`No access token for the Toodo server.`);let c=new AbortController,l=setTimeout(()=>c.abort(),St),u,d;try{if(u=await i(`/api/rpc/${encodeURIComponent(e)}`,{method:`POST`,headers:{...n,"Content-Type":`application/json`},body:JSON.stringify(t),signal:c.signal}),u.status===401)throw await o(u)?(s(),Error(`The Toodo server did not accept the access token.`)):r();d=await u.text()}catch(t){throw c.signal.aborted?Error(`The Toodo server did not answer ${e} within ${St/1e3} s.`):t}finally{clearTimeout(l)}if(u.ok)return d?JSON.parse(d):null;let f=null;try{f=JSON.parse(d)}catch{}throw Ct(f)?f:Error(d||`${u.status} ${u.statusText}`)}var z={appInfo:()=>R(`app_info`),checkUpdate:()=>R(`check_update`),listWorkspaces:()=>V(R(`list_workspaces`)),getWorkspace:e=>V(R(`get_workspace`,{id:e})),createWorkspace:e=>V(R(`create_workspace`,{workspace:e})),updateWorkspace:e=>V(R(`update_workspace`,{workspace:e})),deleteWorkspace:e=>V(R(`delete_workspace`,{id:e})),restoreWorkspace:e=>V(R(`restore_workspace`,{id:e})),purgeWorkspace:e=>V(R(`purge_workspace`,{id:e})),listArchive:()=>V(R(`list_archive`)),listGuidelines:e=>V(R(`list_guidelines`,{workspaceId:e})),addGuideline:e=>V(R(`add_guideline`,{guideline:e})),updateGuideline:e=>V(R(`update_guideline`,{guideline:e})),deleteGuideline:e=>V(R(`delete_guideline`,{id:e})),listTasks:e=>V(R(`list_tasks`,{filter:e})),listTaskRelations:()=>V(R(`list_task_relations`)),addTaskRelation:(e,t)=>V(R(`add_task_relation`,{taskId:e,relatedId:t})),removeTaskRelation:(e,t)=>V(R(`remove_task_relation`,{taskId:e,relatedId:t})),getTask:e=>V(R(`get_task`,{id:e})),createTask:e=>V(R(`create_task`,{task:e})),updateTask:e=>V(R(`update_task`,{task:e})),moveTask:(e,t)=>V(R(`move_task`,{id:e,workspaceId:t})),pauseTask:e=>V(R(`pause_task`,{id:e})),waitTask:(e,t,n)=>V(R(`wait_task`,{id:e,until:t,reason:n})),endWait:e=>V(R(`end_wait`,{id:e})),setCompletionNote:(e,t)=>V(R(`set_completion_note`,{id:e,note:t})),reopenTask:(e,t)=>V(R(`reopen_task`,{id:e,reason:t})),setTaskOutcome:(e,t,n)=>V(R(`set_task_outcome`,{id:e,resolution:t,note:n})),checkCriterion:(e,t,n,r)=>V(R(`check_criterion`,{taskId:e,criterionId:t,met:n,evidence:r})),deleteTask:e=>V(R(`delete_task`,{id:e})),deleteDoneTasks:e=>V(R(`delete_done_tasks`,{workspaceId:e})),restoreTask:e=>V(R(`restore_task`,{id:e})),purgeTask:e=>V(R(`purge_task`,{id:e})),addDependency:(e,t,n)=>V(R(`add_dependency`,{taskId:e,dependsOn:t,confirmPause:n})),removeDependency:(e,t)=>V(R(`remove_dependency`,{taskId:e,dependsOn:t})),startTask:(e,t,n)=>V(R(`start_task`,{id:e,reason:t,refs:n})),completeTask:(e,t,n)=>V(R(`complete_task`,{id:e,note:t,refs:n})),concludeTask:(e,t,n,r)=>V(R(`conclude_task`,{id:e,note:t,outcome:n,shippedWith:r})),linkIssue:(e,t)=>V(R(`link_issue`,{id:e,reference:t})),mcpServerInfo:()=>R(`mcp_server_info`),listConnectedApps:()=>V(R(`list_connected_apps`)),revokeConnectedApp:e=>V(R(`revoke_connected_app`,{grantId:e})),reviewPeriod:(e,t)=>V(R(`review_period`,{from:e,to:t})),reviewReport:e=>V(R(`review_report`,{request:e})),getReviewTimeZone:()=>V(R(`get_review_time_zone`)),setReviewTimeZone:e=>V(R(`set_review_time_zone`,{timeZone:e})),saveReviewSnapshot:e=>V(R(`save_review_snapshot`,{request:e})),listReviewSnapshots:()=>V(R(`list_review_snapshots`)),getReviewSnapshot:e=>V(R(`get_review_snapshot`,{id:e})),deleteReviewSnapshot:e=>V(R(`delete_review_snapshot`,{id:e})),getBackupSettings:()=>R(`get_backup_settings`),getBackupStatus:()=>R(`get_backup_status`),saveBackupSettings:e=>V(R(`save_backup_settings`,{settings:e})),listBackups:()=>V(R(`list_backups`)),restoreBackup:e=>V(R(`restore_backup`,{name:e}))},B={tasksChanged:H(`tasks-changed`),workspacesChanged:H(`workspaces-changed`),guidelinesChanged:H(`guidelines-changed`),taskStatusChanged:H(`task-status-changed`),taskReady:H(`task-ready`)};async function V(e){try{return{status:`ok`,data:await e}}catch(e){if(e instanceof Error)throw e;return{status:`error`,error:e}}}function H(e){return{listen:t=>l(e,t)}}function wt(e){switch(e.code){case`unknownCommand`:case`invalidArguments`:return`This page is out of date with the Toodo server. Reload the page, then try again.`;case`commandPanicked`:return`Something went wrong on the Toodo server. Try again; if it keeps failing, look for "a command panicked" in the toodo-server log.`;case`guidelineNotFound`:return`This guideline no longer exists; it was deleted elsewhere. Reload the page to see the current guidelines, and add your text as a new guideline if it is still needed.`;case`storageFailed`:return`The Toodo server could not use its database (${e.message}). Try again; if it keeps failing, check the toodo-server log.`;default:return e.message}}function Tt(e,t){return/filename="([^"]+)"/.exec(e.headers.get(`Content-Disposition`)??``)?.[1]??t}function U(e,t){let n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=e,r.click(),setTimeout(()=>URL.revokeObjectURL(n),0)}async function Et(){let e=await c(`/api/backups/export`),t=Tt(e,`toodo-backup.sqlite3`);return U(t,await e.blob()),t}async function Dt(e){return U(e,await(await c(`/api/backups/${encodeURIComponent(e)}`)).blob()),e}async function Ot(e){return await(await c(`/api/backups/restore`,{method:`POST`,headers:{"Content-Type":`application/octet-stream`},body:e})).json()}var kt=`toodo-install-dismissed`;function At(){let{userAgent:e,maxTouchPoints:t}=navigator;return/iPhone|iPad|iPod/.test(e)||e.includes(`Macintosh`)&&t>1}function jt(){return matchMedia(`(display-mode: standalone)`).matches||`standalone`in navigator&&navigator.standalone===!0}var W=null,Mt=!1,G=new Set;function K(){G.forEach(e=>e())}function Nt(e){return G.add(e),()=>G.delete(e)}function Pt(){return Mt||jt()||localStorage.getItem(kt)!==null?`none`:W===null?At()?`home-screen`:`none`:`prompt`}function Ft(){localStorage.setItem(kt,`1`),K()}async function It(){let e=W;if(e===null)return;W=null,await e.prompt();let{outcome:t}=await e.userChoice;t===`dismissed`?Ft():K()}function Lt(){addEventListener(`beforeinstallprompt`,e=>{e.preventDefault(),W=e,K()}),addEventListener(`appinstalled`,()=>{W=null,Mt=!0,K()})}function Rt(){return`serviceWorker`in navigator&&`PushManager`in window&&`Notification`in window?`supported`:At()&&!jt()?`needs-install`:`unsupported`}var q=null,zt={completion:[`Task awaiting completion`]};function Bt(e){return q!==null&&Object.keys(zt).some(t=>q?.[t]===!0&&zt[t].includes(e))}function Vt(e){let t=e.replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=t.padEnd(Math.ceil(t.length/4)*4,`=`);return Uint8Array.from(atob(n),e=>e.charCodeAt(0))}function Ht(e,t){let n=e.options.applicationServerKey;return n===null||n.byteLength===t.length&&new Uint8Array(n).every((e,n)=>e===t[n])}function Ut(){return navigator.serviceWorker.getRegistration()}async function Wt(e){let t=await(await Ut())?.pushManager.getSubscription()??null;return t===null||Ht(t,e)?t:(await t.unsubscribe(),null)}function J(e){return typeof e==`object`&&!!e}function Gt(e){return J(e)&&typeof e.completion==`boolean`}function Kt(e){return J(e)&&typeof e.message==`string`&&typeof e.at==`number`}function qt(e){return J(e)&&typeof e.endpoint==`string`&&Gt(e.settings)&&(e.lastFailure===null||Kt(e.lastFailure))}function Jt(e){return J(e)&&typeof e.publicKey==`string`&&(e.subscription===null||qt(e.subscription))}async function Yt(e,t,n){let r=await t.text(),i;try{i=JSON.parse(r)}catch{throw Error(`The answer to ${e} is not JSON; a proxy in front of the Toodo server may have answered instead.`)}if(!n(i))throw Error(`The answer to ${e} is not the push data this app expects; the Toodo server may be older or newer than the app. Reload the app.`);return i}async function Xt(e){return Yt(`PUT /api/push/subscription`,await c(`/api/push/subscription`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e.toJSON())}),qt)}async function Zt(){let e=await Yt(`GET /api/push`,await c(`/api/push`),Jt),t=await Wt(Vt(e.publicKey)),n=t===null?null:t.endpoint===e.subscription?.endpoint?e.subscription:await Xt(t);return q=n?.settings??null,{publicKey:e.publicKey,permission:Notification.permission,subscription:n}}var Qt=1e4;async function $t(){let e,t=new Promise((t,n)=>{e=setTimeout(()=>n(Error(`The service worker did not become active within ${Qt/1e3} seconds. Reload the app and try again.`)),Qt)});try{return await Promise.race([navigator.serviceWorker.ready,t])}finally{clearTimeout(e)}}async function en(e,t){if(await e!==`granted`)throw Error(`Notifications were not allowed.`);if(await Ut()===void 0)throw Error(`Notifications need the service worker, which only the built app installs.`);let{pushManager:n}=await $t(),r=Vt(t),i=await Wt(r)??await n.subscribe({userVisibleOnly:!0,applicationServerKey:r});try{let e=await Xt(i);return q=e.settings,e}catch(e){throw await i.unsubscribe(),e}}async function tn(){await(await(await Ut())?.pushManager.getSubscription())?.unsubscribe(),q=null,await c(`/api/push/subscription`,{method:`DELETE`})}async function nn(e){let t=await Yt(`PUT /api/push/settings`,await c(`/api/push/settings`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),qt);return q=t.settings,t}async function rn(){await c(`/api/push/test`,{method:`POST`})}var an=`toodo-open-task`;function on(e){if(!(`serviceWorker`in navigator))return()=>{};let t=navigator.serviceWorker,n=({data:t})=>{typeof t==`object`&&t&&`type`in t&&t.type===an&&`taskId`in t&&typeof t.taskId==`number`&&e(t.taskId)};return t.addEventListener(`message`,n),()=>t.removeEventListener(`message`,n)}async function sn(){return`Notification`in window&&Notification.permission===`granted`}async function cn(){return`Notification`in window?Notification.requestPermission():`denied`}function ln(e){Bt(e.title)||new Notification(e.title,{body:e.body})}var un={planned:`Planned`,in_progress:`In progress`,in_review:`Awaiting completion`,done:`Done`};function dn(e){return e.status===`done`&&e.resolution===`completed`?`Completed`:e.status===`done`&&e.resolution===`not_adopted`?`Not adopted`:un[e.status]}function fn(e,t){switch(t.status){case`in_progress`:return`Task started`;case`in_review`:return`Task awaiting completion`;case`done`:return t.resolution===`not_adopted`?`Task concluded without merging`:`Task done`;case`planned`:return e===`in_progress`?`Task paused`:`Task status changed`}}function pn(e,t){let n=new Map(e.map(e=>[e.id,e.status]));return t.flatMap(e=>{let t=n.get(e.id);return t===void 0||t===e.status?[]:[{title:fn(t,e),body:`#${e.id} ${e.title}: ${un[t]} -> ${dn(e)}`}]})}async function mn(e){if(e.length!==0&&(await sn()||await cn()===`granted`))for(let t of e)ln(t)}var hn=class extends Error{kind;code;constructor(e){super(wt(e)),this.name=`CommandFailure`,this.kind=e.kind,this.code=e.code}};async function Y(e){let t=await e;if(t.status===`error`)throw new hn(t.error);return t.data}var X={workspaces:[`workspaces`],guidelines:e=>[`guidelines`,e],tasks:[`task-list`,`pages`],taskRelations:[`tasks`,`relations`],archive:[`tasks`,`archive`],backups:[`backups`],backupSettings:[`backup-settings`],backupStatus:[`backup-status`],mcpServerInfo:[`mcp-server-info`],review:(e,t)=>[`review`,e,t],reviewTimeZone:[`review`,`time-zone`],reviewSnapshots:[`review-snapshots`],reviewSnapshot:e=>[`review-snapshots`,e]};function gn(){return F({queryKey:X.mcpServerInfo,queryFn:()=>z.mcpServerInfo(),refetchInterval:5e3})}function _n(){return F({queryKey:X.backups,queryFn:()=>Y(z.listBackups())})}function vn(){return F({queryKey:X.backupSettings,queryFn:()=>z.getBackupSettings()})}function yn(){return F({queryKey:X.backupStatus,queryFn:()=>z.getBackupStatus(),refetchInterval:6e4})}function bn(){let e=h();return I({mutationFn:e=>Y(z.saveBackupSettings(e)),onSuccess:t=>(e.setQueryData(X.backupSettings,t),Promise.all([e.invalidateQueries({queryKey:X.backups}),e.invalidateQueries({queryKey:X.backupStatus})]))})}function xn(){let e=h();return I({mutationFn:e=>Y(z.restoreBackup(e)),onSuccess:()=>e.invalidateQueries()})}function Sn(){return I({mutationFn:Et})}function Cn(){return I({mutationFn:Dt})}function wn(){let e=h();return I({mutationFn:Ot,onSuccess:()=>e.invalidateQueries()})}function Tn(){return F({queryKey:X.workspaces,queryFn:()=>Y(z.listWorkspaces())})}function En(){let e=h();return I({mutationFn:e=>Y(z.createWorkspace(e)),onSuccess:()=>e.invalidateQueries({queryKey:X.workspaces})})}function Dn(){let e=h();return I({mutationFn:e=>Y(z.updateWorkspace(e)),onSuccess:()=>e.invalidateQueries({queryKey:X.workspaces,exact:!0})})}function On(){return Z(e=>Y(z.deleteWorkspace(e)))}function kn(){return F({queryKey:X.archive,queryFn:()=>Y(z.listArchive())})}function Z(e){let t=h();return I({mutationFn:e,onSuccess:()=>Promise.all([t.invalidateQueries({queryKey:X.tasks}),t.invalidateQueries({queryKey:X.workspaces,exact:!0}),t.invalidateQueries({queryKey:X.archive}),t.invalidateQueries({queryKey:[`review`]})])})}function An(){return Z(e=>Y(z.restoreWorkspace(e)))}function jn(){return Z(e=>Y(z.purgeWorkspace(e)))}function Mn(){return Z(e=>Y(z.restoreTask(e)))}function Nn(){return Z(e=>Y(z.purgeTask(e)))}function Pn(e){return F({queryKey:X.guidelines(e),queryFn:()=>Y(z.listGuidelines(e))})}function Fn(e){let t=h();return I({mutationFn:e,onSuccess:e=>t.invalidateQueries({queryKey:X.guidelines(e.workspaceId)})})}function In(){return Fn(e=>Y(z.addGuideline(e)))}function Ln(){return Fn(e=>Y(z.updateGuideline(e)))}function Rn(){return Fn(e=>Y(z.deleteGuideline(e)))}var zn=[`planned`,`in_progress`,`in_review`];function Q(e){return Y(z.listTasks(e))}async function Bn(e){let t=Q({statuses:[`done`],before:e,limit:100}),n=e=>e.length<100?null:Math.min(...e.map(e=>e.id));if(e!==null){let e=await t;return{tasks:e,olderBefore:n(e)}}let[r,i]=await Promise.all([Q({statuses:zn}),t]),a=new Set([...r,...i].map(e=>e.id)),o=[...new Set(r.flatMap(e=>e.dependsOn))].filter(e=>!a.has(e)),s=[];for(let e=0;e<o.length;e+=100)s.push(o.slice(e,e+100));let c=await Promise.all(s.map(e=>Q({ids:e})));return{tasks:[...r,...i,...c.flat()],olderBefore:n(i)}}function Vn(e){let t=new Map;for(let n of e.pages)for(let e of n.tasks)t.set(e.id,e);return[...t.values()].sort((e,t)=>e.id-t.id)}function Hn(e){let t=e.getQueryData(X.tasks);return t===void 0?void 0:Vn(t)}async function Un(e){let t=e.getQueryData(X.tasks);t===void 0||t.pages.length<=1||(await e.cancelQueries({queryKey:X.tasks,exact:!0}),e.setQueryData(X.tasks,e=>e===void 0?e:{pages:e.pages.slice(0,1),pageParams:e.pageParams.slice(0,1)}))}function Wn(e){let t=h();(0,u.useEffect)(()=>{if(!e)Un(t);else return()=>void Un(t)},[e,t])}function Gn(e=[]){let t=Qe({queryKey:X.tasks,queryFn:({pageParam:e})=>Bn(e),initialPageParam:null,getNextPageParam:e=>e.olderBefore,select:Vn}),n=t.data,r=new Set(n?.map(e=>e.id)),i=[...new Set(e.filter(e=>e!=null&&!r.has(e)))].sort((e,t)=>e-t),a=F({queryKey:[...X.tasks,`by-id`,i],queryFn:()=>Q({ids:i}),enabled:n!==void 0&&i.length>0}),o=i.length===0?[]:a.data??[];return n===void 0||o.length===0?t:{...t,data:[...n,...o].sort((e,t)=>e.id-t.id)}}function Kn(e,t){return F({queryKey:X.review(e,t),queryFn:()=>Y(z.reviewPeriod(e,t))})}function qn(){return F({queryKey:X.reviewTimeZone,queryFn:()=>Y(z.getReviewTimeZone())})}function Jn(){let e=h();return I({mutationFn:e=>Y(z.setReviewTimeZone(e)),onSuccess:()=>e.invalidateQueries({queryKey:[`review`]})})}function Yn(){return F({queryKey:X.reviewSnapshots,queryFn:()=>Y(z.listReviewSnapshots())})}function Xn(e){return F({queryKey:X.reviewSnapshot(e??0),queryFn:()=>Y(z.getReviewSnapshot(e??0)),enabled:e!==null,staleTime:1/0})}function Zn(){let e=h();return I({mutationFn:e=>Y(z.saveReviewSnapshot(e)),onSuccess:()=>e.invalidateQueries({queryKey:X.reviewSnapshots})})}function Qn(){let e=h();return I({mutationFn:e=>Y(z.deleteReviewSnapshot(e)),onSuccess:()=>e.invalidateQueries({queryKey:X.reviewSnapshots})})}function $n(){let e=h();(0,u.useEffect)(()=>{let t=[B.tasksChanged.listen(async()=>{let t=Hn(e);await e.invalidateQueries({queryKey:X.tasks}),t===void 0||document.hasFocus()||mn(pn(t,Hn(e)??[])).catch(e=>console.error(`toodo: failed to show status notifications`,e))}),B.workspacesChanged.listen(()=>e.invalidateQueries({queryKey:X.workspaces,exact:!0})),B.guidelinesChanged.listen(t=>e.invalidateQueries({queryKey:X.guidelines(t.payload.workspaceId)}))];return()=>{for(let e of t)e.then(e=>e())}},[e])}function er(){let e=h();return I({mutationFn:e=>Y(z.startTask(e,null,null)),onSuccess:()=>e.invalidateQueries({queryKey:X.tasks})})}function tr(){let e=h();return I({mutationFn:e=>Y(z.completeTask(e,null,null)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function nr(){let e=h();return I({mutationFn:({id:e,note:t,shippedWith:n=null})=>Y(z.concludeTask(e,t,n===null?`not_adopted`:`shipped_with`,n)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function rr(){let e=h();return I({mutationFn:({id:e,note:t})=>Y(z.setCompletionNote(e,t)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function ir(){let e=h();return I({mutationFn:({id:e,reason:t})=>Y(z.reopenTask(e,t)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function ar(){let e=h();return I({mutationFn:({id:e,resolution:t,note:n})=>Y(z.setTaskOutcome(e,t,n)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function or(){let e=h();return I({mutationFn:e=>Y(z.updateTask(e)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function sr(){let e=h();return I({mutationFn:({id:e,workspaceId:t})=>Y(z.moveTask(e,t)),onSuccess:()=>Promise.all([e.invalidateQueries({queryKey:X.tasks}),e.invalidateQueries({queryKey:[`review`]})])})}function $(e){let t=h();return I({mutationFn:e,onSuccess:()=>t.invalidateQueries({queryKey:X.tasks})})}function cr(){return $(e=>Y(z.pauseTask(e)))}function lr(){return $(({id:e,until:t,reason:n})=>Y(z.waitTask(e,t,n)))}function ur(){return $(e=>Y(z.endWait(e)))}function dr(){return $(({taskId:e,criterionId:t,met:n,evidence:r})=>Y(z.checkCriterion(e,t,n,r)))}function fr(){return Z(e=>Y(z.deleteTask(e)))}function pr(){return Z(e=>Y(z.deleteDoneTasks(e)))}function mr(e,t){return F({queryKey:[...X.tasks,`done-count`,e],queryFn:async()=>(await Q({workspaceId:e,statuses:[`done`]})).length,enabled:t})}function hr(){return $(({id:e,dependsOn:t,confirmPause:n})=>Y(z.addDependency(e,t,n)))}function gr(){return $(({id:e,dependsOn:t})=>Y(z.removeDependency(e,t)))}function _r(){return F({queryKey:X.taskRelations,queryFn:()=>Y(z.listTaskRelations())})}function vr(e){let t=h();return I({mutationFn:e,onSuccess:()=>t.invalidateQueries({queryKey:X.taskRelations})})}function yr(){return vr(({taskId:e,relatedId:t})=>Y(z.addTaskRelation(e,t)))}function br(){return vr(({taskId:e,relatedId:t})=>Y(z.removeTaskRelation(e,t)))}function xr(){let e=h();return I({mutationFn:e=>Y(z.createTask(e)),onSuccess:()=>e.invalidateQueries({queryKey:X.tasks})})}export{wn as $,g as $t,jn as A,et as At,qn as B,j as Bt,ur as C,vt as Ct,Wn as D,st as Dt,sr as E,ct as Et,Mn as F,tt as Ft,Jn as G,se as Gt,Zn as H,re as Ht,An as I,I as It,_r as J,E as Jt,ar as K,oe as Kt,Kn as L,F as Lt,br as M,at as Mt,ir as N,nt as Nt,cr as O,$e as Ot,xn as P,rt as Pt,Dn as Q,b as Qt,Xn as R,He as Rt,Sn as S,bt as St,gn as T,ot as Tt,$n as U,T as Ut,bn as V,A as Vt,rr as W,ce as Wt,Ln as X,he as Xt,Gn as Y,w as Yt,or as Z,x as Zt,Qn as _,_t,yr as a,on as at,mr as b,mt as bt,yn as c,rn as ct,tr as d,Pt as dt,h as en,lr as et,nr as f,Nt as ft,Rn as g,xt as gt,pr as h,z as ht,In as i,Zt as it,gr as j,it as jt,Nn as k,L as kt,_n as l,Ft as lt,En as m,U as mt,Y as n,tn as nt,kn as o,Rt as ot,xr as p,Lt as pt,er as q,C as qt,hr as r,en as rt,vn as s,nn as st,X as t,Tn as tt,dr as u,It as ut,fr as v,ut as vt,Pn as w,gt as wt,Cn as x,pt as xt,On as y,ht as yt,Yn as z,Ne as zt};